hardware.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. * linux/include/asm-arm/arch-imx/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. /* get frequencies in Hz */
  62. extern unsigned int imx_get_system_clk(void);
  63. extern unsigned int imx_get_mcu_clk(void);
  64. extern unsigned int imx_get_perclk1(void); /* UART[12], Timer[12], PWM */
  65. extern unsigned int imx_get_perclk2(void); /* LCD, SD, SPI[12] */
  66. extern unsigned int imx_get_perclk3(void); /* SSI */
  67. extern unsigned int imx_get_hclk(void); /* SDRAM, CSI, Memory Stick,*/
  68. /* I2C, DMA */
  69. #endif
  70. #define MAXIRQNUM 62
  71. #define MAXFIQNUM 62
  72. #define MAXSWINUM 62
  73. /*
  74. * Use SDRAM for memory
  75. */
  76. #define MEM_SIZE 0x01000000
  77. #ifdef CONFIG_ARCH_MX1ADS
  78. #include "mx1ads.h"
  79. #endif
  80. #endif