aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-sa1100
diff options
context:
space:
mode:
authorThomas Kunze <thommycheck@gmx.de>2009-10-05 16:05:38 -0400
committerThomas Kunze <tkunze@tkunze-desktop.(none)>2009-11-27 15:07:16 -0500
commit1d0ad843b08f7655b8ac011bca1e3e0c69a554de (patch)
treec248de53e5c2bf8d6ad3b12b0f0658d14d86f86a /arch/arm/mach-sa1100
parentf151ccf76b38d2ffdfe9e44fa01fe2fc0a754637 (diff)
collie: prepare for gpiolib use
prefix gpio definitions for direct register access with '_' so we can use the other names for gpio_request & co
Diffstat (limited to 'arch/arm/mach-sa1100')
-rw-r--r--arch/arm/mach-sa1100/collie.c12
-rw-r--r--arch/arm/mach-sa1100/include/mach/collie.h42
2 files changed, 33 insertions, 21 deletions
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index b629cbaaec51..9f5029cb2703 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -249,22 +249,24 @@ static void __init collie_init(void)
249 GPDR = GPIO_LDD8 | GPIO_LDD9 | GPIO_LDD10 | GPIO_LDD11 | GPIO_LDD12 | 249 GPDR = GPIO_LDD8 | GPIO_LDD9 | GPIO_LDD10 | GPIO_LDD11 | GPIO_LDD12 |
250 GPIO_LDD13 | GPIO_LDD14 | GPIO_LDD15 | GPIO_SSP_TXD | 250 GPIO_LDD13 | GPIO_LDD14 | GPIO_LDD15 | GPIO_SSP_TXD |
251 GPIO_SSP_SCLK | GPIO_SSP_SFRM | GPIO_SDLC_SCLK | 251 GPIO_SSP_SCLK | GPIO_SSP_SFRM | GPIO_SDLC_SCLK |
252 COLLIE_GPIO_UCB1x00_RESET | COLLIE_GPIO_nMIC_ON | 252 _COLLIE_GPIO_UCB1x00_RESET | _COLLIE_GPIO_nMIC_ON |
253 COLLIE_GPIO_nREMOCON_ON | GPIO_32_768kHz; 253 _COLLIE_GPIO_nREMOCON_ON | GPIO_32_768kHz;
254 254
255 PPDR = PPC_LDD0 | PPC_LDD1 | PPC_LDD2 | PPC_LDD3 | PPC_LDD4 | PPC_LDD5 | 255 PPDR = PPC_LDD0 | PPC_LDD1 | PPC_LDD2 | PPC_LDD3 | PPC_LDD4 | PPC_LDD5 |
256 PPC_LDD6 | PPC_LDD7 | PPC_L_PCLK | PPC_L_LCLK | PPC_L_FCLK | PPC_L_BIAS | 256 PPC_LDD6 | PPC_LDD7 | PPC_L_PCLK | PPC_L_LCLK | PPC_L_FCLK | PPC_L_BIAS |
257 PPC_TXD1 | PPC_TXD2 | PPC_TXD3 | PPC_TXD4 | PPC_SCLK | PPC_SFRM; 257 PPC_TXD1 | PPC_TXD2 | PPC_TXD3 | PPC_TXD4 | PPC_SCLK | PPC_SFRM;
258 258
259 PWER = COLLIE_GPIO_AC_IN | COLLIE_GPIO_CO | COLLIE_GPIO_ON_KEY | 259 PWER = _COLLIE_GPIO_AC_IN | _COLLIE_GPIO_CO | _COLLIE_GPIO_ON_KEY |
260 COLLIE_GPIO_WAKEUP | COLLIE_GPIO_nREMOCON_INT | PWER_RTC; 260 _COLLIE_GPIO_WAKEUP | _COLLIE_GPIO_nREMOCON_INT | PWER_RTC;
261 261
262 PGSR = COLLIE_GPIO_nREMOCON_ON; 262 PGSR = _COLLIE_GPIO_nREMOCON_ON;
263 263
264 PSDR = PPC_RXD1 | PPC_RXD2 | PPC_RXD3 | PPC_RXD4; 264 PSDR = PPC_RXD1 | PPC_RXD2 | PPC_RXD3 | PPC_RXD4;
265 265
266 PCFR = PCFR_OPDE; 266 PCFR = PCFR_OPDE;
267 267
268 GPSR |= _COLLIE_GPIO_UCB1x00_RESET;
269
268 270
269 platform_scoop_config = &collie_pcmcia_config; 271 platform_scoop_config = &collie_pcmcia_config;
270 272
diff --git a/arch/arm/mach-sa1100/include/mach/collie.h b/arch/arm/mach-sa1100/include/mach/collie.h
index 9efb569cdb60..8c8fe46e4124 100644
--- a/arch/arm/mach-sa1100/include/mach/collie.h
+++ b/arch/arm/mach-sa1100/include/mach/collie.h
@@ -30,24 +30,34 @@
30 COLLIE_SCP_LB_VOL_CHG ) 30 COLLIE_SCP_LB_VOL_CHG )
31#define COLLIE_SCOOP_IO_OUT ( COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R ) 31#define COLLIE_SCOOP_IO_OUT ( COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R )
32 32
33/* GPIOs for which the generic definition doesn't say much */ 33/* GPIOs for gpiolib */
34 34
35#define COLLIE_GPIO_ON_KEY GPIO_GPIO (0) 35#define COLLIE_GPIO_ON_KEY (0)
36#define COLLIE_GPIO_AC_IN GPIO_GPIO (1) 36#define COLLIE_GPIO_AC_IN (1)
37#define COLLIE_GPIO_SDIO_INT GPIO_GPIO (11) 37#define COLLIE_GPIO_SDIO_INT (11)
38#define COLLIE_GPIO_CF_IRQ GPIO_GPIO (14) 38#define COLLIE_GPIO_CF_IRQ (14)
39#define COLLIE_GPIO_nREMOCON_INT GPIO_GPIO (15) 39#define COLLIE_GPIO_nREMOCON_INT (15)
40#define COLLIE_GPIO_UCB1x00_RESET GPIO_GPIO (16) 40#define COLLIE_GPIO_UCB1x00_RESET (16)
41#define COLLIE_GPIO_nMIC_ON GPIO_GPIO (17) 41#define COLLIE_GPIO_nMIC_ON (17)
42#define COLLIE_GPIO_nREMOCON_ON GPIO_GPIO (18) 42#define COLLIE_GPIO_nREMOCON_ON (18)
43#define COLLIE_GPIO_CO GPIO_GPIO (20) 43#define COLLIE_GPIO_CO (20)
44#define COLLIE_GPIO_MCP_CLK GPIO_GPIO (21) 44#define COLLIE_GPIO_MCP_CLK (21)
45#define COLLIE_GPIO_CF_CD GPIO_GPIO (22) 45#define COLLIE_GPIO_CF_CD (22)
46#define COLLIE_GPIO_UCB1x00_IRQ GPIO_GPIO (23) 46#define COLLIE_GPIO_UCB1x00_IRQ (23)
47#define COLLIE_GPIO_WAKEUP GPIO_GPIO (24) 47#define COLLIE_GPIO_WAKEUP (24)
48#define COLLIE_GPIO_GA_INT GPIO_GPIO (25) 48#define COLLIE_GPIO_GA_INT (25)
49#define COLLIE_GPIO_MAIN_BAT_LOW GPIO_GPIO (26) 49#define COLLIE_GPIO_MAIN_BAT_LOW (26)
50 50
51/* GPIO definitions for direct register access */
52
53#define _COLLIE_GPIO_ON_KEY GPIO_GPIO(0)
54#define _COLLIE_GPIO_AC_IN GPIO_GPIO(1)
55#define _COLLIE_GPIO_nREMOCON_INT GPIO_GPIO(15)
56#define _COLLIE_GPIO_UCB1x00_RESET GPIO_GPIO(16)
57#define _COLLIE_GPIO_nMIC_ON GPIO_GPIO(17)
58#define _COLLIE_GPIO_nREMOCON_ON GPIO_GPIO(18)
59#define _COLLIE_GPIO_CO GPIO_GPIO(20)
60#define _COLLIE_GPIO_WAKEUP GPIO_GPIO(24)
51/* Interrupts */ 61/* Interrupts */
52 62
53#define COLLIE_IRQ_GPIO_ON_KEY IRQ_GPIO0 63#define COLLIE_IRQ_GPIO_ON_KEY IRQ_GPIO0