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