common.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * arch/arm/mach-orion/common.c
  3. *
  4. * Core functions for Marvell Orion System On Chip
  5. *
  6. * Maintainer: Tzachi Perelstein <tzachi@marvell.com>
  7. *
  8. * This file is licensed under the terms of the GNU General Public
  9. * License version 2. This program is licensed "as is" without any
  10. * warranty of any kind, whether express or implied.
  11. */
  12. #include <linux/kernel.h>
  13. #include <linux/init.h>
  14. #include <asm/page.h>
  15. #include <asm/mach/map.h>
  16. #include <asm/arch/orion.h>
  17. #include "common.h"
  18. /*****************************************************************************
  19. * I/O Address Mapping
  20. ****************************************************************************/
  21. static struct map_desc orion_io_desc[] __initdata = {
  22. {
  23. .virtual = ORION_REGS_BASE,
  24. .pfn = __phys_to_pfn(ORION_REGS_BASE),
  25. .length = ORION_REGS_SIZE,
  26. .type = MT_DEVICE
  27. },
  28. {
  29. .virtual = ORION_PCIE_IO_BASE,
  30. .pfn = __phys_to_pfn(ORION_PCIE_IO_BASE),
  31. .length = ORION_PCIE_IO_SIZE,
  32. .type = MT_DEVICE
  33. },
  34. {
  35. .virtual = ORION_PCI_IO_BASE,
  36. .pfn = __phys_to_pfn(ORION_PCI_IO_BASE),
  37. .length = ORION_PCI_IO_SIZE,
  38. .type = MT_DEVICE
  39. },
  40. {
  41. .virtual = ORION_PCIE_WA_BASE,
  42. .pfn = __phys_to_pfn(ORION_PCIE_WA_BASE),
  43. .length = ORION_PCIE_WA_SIZE,
  44. .type = MT_DEVICE
  45. },
  46. };
  47. void __init orion_map_io(void)
  48. {
  49. iotable_init(orion_io_desc, ARRAY_SIZE(orion_io_desc));
  50. }