hardware.h 1021 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * arch/arm/mach-omap1/include/mach/hardware.h
  3. */
  4. #ifndef __MACH_HARDWARE_H
  5. #define __MACH_HARDWARE_H
  6. #ifndef __ASSEMBLER__
  7. /*
  8. * NOTE: Please use ioremap + __raw_read/write where possible instead of these
  9. */
  10. extern u8 omap_readb(u32 pa);
  11. extern u16 omap_readw(u32 pa);
  12. extern u32 omap_readl(u32 pa);
  13. extern void omap_writeb(u8 v, u32 pa);
  14. extern void omap_writew(u16 v, u32 pa);
  15. extern void omap_writel(u32 v, u32 pa);
  16. #include <plat/tc.h>
  17. /* Almost all documentation for chip and board memory maps assumes
  18. * BM is clear. Most devel boards have a switch to control booting
  19. * from NOR flash (using external chipselect 3) rather than mask ROM,
  20. * which uses BM to interchange the physical CS0 and CS3 addresses.
  21. */
  22. static inline u32 omap_cs0m_phys(void)
  23. {
  24. return (omap_readl(EMIFS_CONFIG) & OMAP_EMIFS_CONFIG_BM)
  25. ? OMAP_CS3_PHYS : 0;
  26. }
  27. static inline u32 omap_cs3_phys(void)
  28. {
  29. return (omap_readl(EMIFS_CONFIG) & OMAP_EMIFS_CONFIG_BM)
  30. ? 0 : OMAP_CS3_PHYS;
  31. }
  32. #endif
  33. #endif
  34. #include <plat/hardware.h>