diff options
author | Stefano Babic <sbabic@denx.de> | 2010-07-06 17:05:06 +0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2010-09-29 11:24:30 +0200 |
commit | c4ea142424fc5cb43a2db750cb772e84304e5fb8 (patch) | |
tree | bc6abb5343579120ee5680c46cd927d82064b1e5 /arch/arm/include/asm/arch-mx31/mx31-regs.h | |
parent | 2e6e1772c0e34871769be4aef79748fe3e47d953 (diff) |
Use common function to set GPIOs for MX3 and MX5
The patch adds support for setting gpios to the
MX51 processor and change name to the corresponding
functions for MX31. In this way, it is possible to get rid
of nasty #ifdef switches related to the processor type.
Signed-off-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'arch/arm/include/asm/arch-mx31/mx31-regs.h')
-rw-r--r-- | arch/arm/include/asm/arch-mx31/mx31-regs.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/arm/include/asm/arch-mx31/mx31-regs.h b/arch/arm/include/asm/arch-mx31/mx31-regs.h index d72585c8a0..f05e743d76 100644 --- a/arch/arm/include/asm/arch-mx31/mx31-regs.h +++ b/arch/arm/include/asm/arch-mx31/mx31-regs.h @@ -57,6 +57,14 @@ struct clock_control_regs { u32 pdr2; }; +/* GPIO Registers */ +struct gpio_regs { + u32 gpio_dr; + u32 gpio_dir; + u32 gpio_psr; +}; + + /* Bit definitions for RCSR register in CCM */ #define CCM_RCSR_NF16B (1 << 31) #define CCM_RCSR_NFMS (1 << 30) @@ -153,9 +161,9 @@ struct clock_control_regs { /* * GPIO */ -#define GPIO1_BASE 0x53FCC000 -#define GPIO2_BASE 0x53FD0000 -#define GPIO3_BASE 0x53FA4000 +#define GPIO1_BASE_ADDR 0x53FCC000 +#define GPIO2_BASE_ADDR 0x53FD0000 +#define GPIO3_BASE_ADDR 0x53FA4000 #define GPIO_DR 0x00000000 /* data register */ #define GPIO_GDIR 0x00000004 /* direction register */ #define GPIO_PSR 0x00000008 /* pad status register */ |