hardware.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /*
  2. * arch/arm/mach-imx/include/mach/hardware.h
  3. *
  4. * Copyright (C) 1999 ARM Limited.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. */
  20. #ifndef __ASM_ARCH_HARDWARE_H
  21. #define __ASM_ARCH_HARDWARE_H
  22. #include <asm/sizes.h>
  23. #include "imx-regs.h"
  24. #ifndef __ASSEMBLY__
  25. # define __REG(x) (*((volatile u32 *)IO_ADDRESS(x)))
  26. # define __REG2(x,y) (*(volatile u32 *)((u32)&__REG(x) + (y)))
  27. #endif
  28. /*
  29. * Memory map
  30. */
  31. #define IMX_IO_PHYS 0x00200000
  32. #define IMX_IO_SIZE 0x00100000
  33. #define IMX_IO_BASE 0xe0000000
  34. #define IMX_CS0_PHYS 0x10000000
  35. #define IMX_CS0_SIZE 0x02000000
  36. #define IMX_CS0_VIRT 0xe8000000
  37. #define IMX_CS1_PHYS 0x12000000
  38. #define IMX_CS1_SIZE 0x01000000
  39. #define IMX_CS1_VIRT 0xea000000
  40. #define IMX_CS2_PHYS 0x13000000
  41. #define IMX_CS2_SIZE 0x01000000
  42. #define IMX_CS2_VIRT 0xeb000000
  43. #define IMX_CS3_PHYS 0x14000000
  44. #define IMX_CS3_SIZE 0x01000000
  45. #define IMX_CS3_VIRT 0xec000000
  46. #define IMX_CS4_PHYS 0x15000000
  47. #define IMX_CS4_SIZE 0x01000000
  48. #define IMX_CS4_VIRT 0xed000000
  49. #define IMX_CS5_PHYS 0x16000000
  50. #define IMX_CS5_SIZE 0x01000000
  51. #define IMX_CS5_VIRT 0xee000000
  52. #define IMX_FB_VIRT 0xF1000000
  53. #define IMX_FB_SIZE (256*1024)
  54. /* macro to get at IO space when running virtually */
  55. #define IO_ADDRESS(x) ((x) | IMX_IO_BASE)
  56. #ifndef __ASSEMBLY__
  57. /*
  58. * Handy routine to set GPIO functions
  59. */
  60. extern void imx_gpio_mode( int gpio_mode );
  61. #endif
  62. #define MAXIRQNUM 62
  63. #define MAXFIQNUM 62
  64. #define MAXSWINUM 62
  65. /*
  66. * Use SDRAM for memory
  67. */
  68. #define MEM_SIZE 0x01000000
  69. #ifdef CONFIG_ARCH_MX1ADS
  70. #include "mx1ads.h"
  71. #endif
  72. #endif