U-Boot中OMAP3的MUX操作
include/asm-arm/arch-omap3/mux.h中:
#define MUX_VAL(OFFSET,VALUE)\
writew((VALUE), OMAP34XX_CTRL_BASE + (OFFSET));
#define CP(x) (CONTROL_PADCONF_##x)
|
OMAP34XX_CTRL_BASE的定义在include/asm-arm/arch-omap3/omap3.h文件中:
/*
* L4 Peripherals - L4 Wakeup and L4 Core now
*/
#define OMAP34XX_CORE_L4_IO_BASE 0x48000000
#define OMAP34XX_WAKEUP_L4_IO_BASE 0x48300000
#define OMAP34XX_L4_PER 0x49000000
#define OMAP34XX_L4_IO_BASE OMAP34XX_CORE_L4_IO_BASE
/* CONTROL */
#define OMAP34XX_CTRL_BASE (OMAP34XX_L4_IO_BASE + 0x2000)
|
board/omap3/beagle/beagle.h中的范例:
MUX_VAL(CP(ETK_D10_ES2), (IDIS | PTU | EN | M4)) /*GPIO_24*/\
MUX_VAL(CP(ETK_D15), (IEN | PTU | EN | M4)) /*GPIO_29*/\
|
阅读(503) | 评论(0) | 转发(0) |