mpp.c 877 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * arch/arm/mach-mv78x00/mpp.c
  3. *
  4. * MPP functions for Marvell MV78x00 SoCs
  5. *
  6. * This file is licensed under the terms of the GNU General Public
  7. * License version 2. This program is licensed "as is" without any
  8. * warranty of any kind, whether express or implied.
  9. */
  10. #include <linux/gpio.h>
  11. #include <linux/kernel.h>
  12. #include <linux/init.h>
  13. #include <linux/io.h>
  14. #include <plat/mpp.h>
  15. #include "mv78xx0.h"
  16. #include "common.h"
  17. #include "mpp.h"
  18. static unsigned int __init mv78xx0_variant(void)
  19. {
  20. u32 dev, rev;
  21. mv78xx0_pcie_id(&dev, &rev);
  22. if (dev == MV78100_DEV_ID && rev >= MV78100_REV_A0)
  23. return MPP_78100_A0_MASK;
  24. printk(KERN_ERR "MPP setup: unknown mv78x00 variant "
  25. "(dev %#x rev %#x)\n", dev, rev);
  26. return 0;
  27. }
  28. void __init mv78xx0_mpp_conf(unsigned int *mpp_list)
  29. {
  30. orion_mpp_conf(mpp_list, mv78xx0_variant(),
  31. MPP_MAX, DEV_BUS_VIRT_BASE);
  32. }