aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Miao <eric.y.miao@gmail.com>2007-04-04 23:07:20 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-04-21 18:14:01 -0400
commit7053acbd78336abf5d4bc3d8a875a03624cfb83f (patch)
tree76dff22217a91d40c1d44292c0454d31cad55f15
parenta79220b7633b3926a9bd3527bdac3f04dbe6845c (diff)
[ARM] 4304/1: removes the unnecessary bit number from CKENnn_XXXX
This patch removes the unnecessary bit number from CKENnn_XXXX definitions for PXA, so that CKEN0_PWM0 --> CKEN_PWM0 CKEN1_PWM1 --> CKEN_PWM1 ... CKEN24_CAMERA --> CKEN_CAMERA The reasons for the change of these defitions are: 1. they do not scale - they are currently valid for pxa2xx, but definitely not valid for pxa3xx, e.g., pxa3xx has bit 3 for camera instead of bit 24 2. they are unnecessary - the peripheral name within the definition has already announced its usage, we don't need those bit numbers to know which peripheral we are going to enable/disable clock for 3. they are inconvenient - think about this: a driver programmer for pxa has to remember which bit in the CKEN register to turn on/off Another change in the patch is to make the definitions equal to its clock bit index, so that #define CKEN_CAMERA (24) instead of #define CKEN_CAMERA (1 << 24) this change, however, will add a run-time bit shift operation in pxa_set_cken(), but the benefit of this change is that it scales when bit index exceeds 32, e.g., pxa3xx has two registers CKENA and CKENB, totally 64 bit for this, suppose CAMERA clock enabling bit is CKENB:10, one can simply define CKEN_CAMERA to be (32 + 10) and so that pxa_set_cken() need minimum change to adapt to that. Signed-off-by: eric miao <eric.y.miao@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--Documentation/spi/pxa2xx2
-rw-r--r--arch/arm/mach-pxa/generic.c4
-rw-r--r--arch/arm/mach-pxa/lpd270.c4
-rw-r--r--arch/arm/mach-pxa/lubbock.c2
-rw-r--r--arch/arm/mach-pxa/mainstone.c4
-rw-r--r--arch/arm/mach-pxa/pxa27x.c4
-rw-r--r--arch/arm/mach-pxa/ssp.c12
-rw-r--r--drivers/i2c/busses/i2c-pxa.c12
-rw-r--r--drivers/mmc/pxamci.c4
-rw-r--r--drivers/net/irda/pxaficp_ir.c12
-rw-r--r--drivers/serial/pxa.c8
-rw-r--r--drivers/usb/gadget/pxa2xx_udc.c4
-rw-r--r--drivers/usb/host/ohci-pxa27x.c4
-rw-r--r--drivers/video/pxafb.c4
-rw-r--r--include/asm-arm/arch-pxa/pxa-regs.h58
-rw-r--r--sound/arm/pxa2xx-ac97.c12
-rw-r--r--sound/soc/pxa/pxa2xx-ac97.c12
-rw-r--r--sound/soc/pxa/pxa2xx-i2s.c4
18 files changed, 83 insertions, 83 deletions
diff --git a/Documentation/spi/pxa2xx b/Documentation/spi/pxa2xx
index f9717fe9bd85..215e3b8e7266 100644
--- a/Documentation/spi/pxa2xx
+++ b/Documentation/spi/pxa2xx
@@ -62,7 +62,7 @@ static struct resource pxa_spi_nssp_resources[] = {
62 62
63static struct pxa2xx_spi_master pxa_nssp_master_info = { 63static struct pxa2xx_spi_master pxa_nssp_master_info = {
64 .ssp_type = PXA25x_NSSP, /* Type of SSP */ 64 .ssp_type = PXA25x_NSSP, /* Type of SSP */
65 .clock_enable = CKEN9_NSSP, /* NSSP Peripheral clock */ 65 .clock_enable = CKEN_NSSP, /* NSSP Peripheral clock */
66 .num_chipselect = 1, /* Matches the number of chips attached to NSSP */ 66 .num_chipselect = 1, /* Matches the number of chips attached to NSSP */
67 .enable_dma = 1, /* Enables NSSP DMA */ 67 .enable_dma = 1, /* Enables NSSP DMA */
68}; 68};
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c
index b8cb79f899d5..64b08b744f9f 100644
--- a/arch/arm/mach-pxa/generic.c
+++ b/arch/arm/mach-pxa/generic.c
@@ -164,9 +164,9 @@ void pxa_set_cken(int clock, int enable)
164 local_irq_save(flags); 164 local_irq_save(flags);
165 165
166 if (enable) 166 if (enable)
167 CKEN |= clock; 167 CKEN |= (1 << clock);
168 else 168 else
169 CKEN &= ~clock; 169 CKEN &= ~(1 << clock);
170 170
171 local_irq_restore(flags); 171 local_irq_restore(flags);
172} 172}
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c
index 8e27a64fa9f4..e3097664ffe1 100644
--- a/arch/arm/mach-pxa/lpd270.c
+++ b/arch/arm/mach-pxa/lpd270.c
@@ -234,7 +234,7 @@ static void lpd270_backlight_power(int on)
234{ 234{
235 if (on) { 235 if (on) {
236 pxa_gpio_mode(GPIO16_PWM0_MD); 236 pxa_gpio_mode(GPIO16_PWM0_MD);
237 pxa_set_cken(CKEN0_PWM0, 1); 237 pxa_set_cken(CKEN_PWM0, 1);
238 PWM_CTRL0 = 0; 238 PWM_CTRL0 = 0;
239 PWM_PWDUTY0 = 0x3ff; 239 PWM_PWDUTY0 = 0x3ff;
240 PWM_PERVAL0 = 0x3ff; 240 PWM_PERVAL0 = 0x3ff;
@@ -242,7 +242,7 @@ static void lpd270_backlight_power(int on)
242 PWM_CTRL0 = 0; 242 PWM_CTRL0 = 0;
243 PWM_PWDUTY0 = 0x0; 243 PWM_PWDUTY0 = 0x0;
244 PWM_PERVAL0 = 0x3FF; 244 PWM_PERVAL0 = 0x3FF;
245 pxa_set_cken(CKEN0_PWM0, 0); 245 pxa_set_cken(CKEN_PWM0, 0);
246 } 246 }
247} 247}
248 248
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index 055de7f4f00a..6377b2e29ff0 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -220,7 +220,7 @@ static struct resource pxa_ssp_resources[] = {
220 220
221static struct pxa2xx_spi_master pxa_ssp_master_info = { 221static struct pxa2xx_spi_master pxa_ssp_master_info = {
222 .ssp_type = PXA25x_SSP, 222 .ssp_type = PXA25x_SSP,
223 .clock_enable = CKEN3_SSP, 223 .clock_enable = CKEN_SSP,
224 .num_chipselect = 0, 224 .num_chipselect = 0,
225}; 225};
226 226
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
index 56d94d88d5ca..ed99a81b98f3 100644
--- a/arch/arm/mach-pxa/mainstone.c
+++ b/arch/arm/mach-pxa/mainstone.c
@@ -266,7 +266,7 @@ static void mainstone_backlight_power(int on)
266{ 266{
267 if (on) { 267 if (on) {
268 pxa_gpio_mode(GPIO16_PWM0_MD); 268 pxa_gpio_mode(GPIO16_PWM0_MD);
269 pxa_set_cken(CKEN0_PWM0, 1); 269 pxa_set_cken(CKEN_PWM0, 1);
270 PWM_CTRL0 = 0; 270 PWM_CTRL0 = 0;
271 PWM_PWDUTY0 = 0x3ff; 271 PWM_PWDUTY0 = 0x3ff;
272 PWM_PERVAL0 = 0x3ff; 272 PWM_PERVAL0 = 0x3ff;
@@ -274,7 +274,7 @@ static void mainstone_backlight_power(int on)
274 PWM_CTRL0 = 0; 274 PWM_CTRL0 = 0;
275 PWM_PWDUTY0 = 0x0; 275 PWM_PWDUTY0 = 0x0;
276 PWM_PERVAL0 = 0x3FF; 276 PWM_PERVAL0 = 0x3FF;
277 pxa_set_cken(CKEN0_PWM0, 0); 277 pxa_set_cken(CKEN_PWM0, 0);
278 } 278 }
279} 279}
280 280
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index 74eeada1e2fc..c64bab49efc4 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -140,9 +140,9 @@ void pxa_cpu_pm_enter(suspend_state_t state)
140 extern void pxa_cpu_resume(void); 140 extern void pxa_cpu_resume(void);
141 141
142 if (state == PM_SUSPEND_STANDBY) 142 if (state == PM_SUSPEND_STANDBY)
143 CKEN = CKEN22_MEMC | CKEN9_OSTIMER | CKEN16_LCD |CKEN0_PWM0; 143 CKEN = CKEN_MEMC | CKEN_OSTIMER | CKEN_LCD | CKEN_PWM0;
144 else 144 else
145 CKEN = CKEN22_MEMC | CKEN9_OSTIMER; 145 CKEN = CKEN_MEMC | CKEN_OSTIMER;
146 146
147 /* ensure voltage-change sequencer not initiated, which hangs */ 147 /* ensure voltage-change sequencer not initiated, which hangs */
148 PCFR &= ~PCFR_FVC; 148 PCFR &= ~PCFR_FVC;
diff --git a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c
index 6cc202755fb4..71766ac0328b 100644
--- a/arch/arm/mach-pxa/ssp.c
+++ b/arch/arm/mach-pxa/ssp.c
@@ -52,13 +52,13 @@ struct ssp_info_ {
52 */ 52 */
53static const struct ssp_info_ ssp_info[PXA_SSP_PORTS] = { 53static const struct ssp_info_ ssp_info[PXA_SSP_PORTS] = {
54#if defined (CONFIG_PXA27x) 54#if defined (CONFIG_PXA27x)
55 {IRQ_SSP, CKEN23_SSP1}, 55 {IRQ_SSP, CKEN_SSP1},
56 {IRQ_SSP2, CKEN3_SSP2}, 56 {IRQ_SSP2, CKEN_SSP2},
57 {IRQ_SSP3, CKEN4_SSP3}, 57 {IRQ_SSP3, CKEN_SSP3},
58#else 58#else
59 {IRQ_SSP, CKEN3_SSP}, 59 {IRQ_SSP, CKEN_SSP},
60 {IRQ_NSSP, CKEN9_NSSP}, 60 {IRQ_NSSP, CKEN_NSSP},
61 {IRQ_ASSP, CKEN10_ASSP}, 61 {IRQ_ASSP, CKEN_ASSP},
62#endif 62#endif
63}; 63};
64 64
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index 11c7477a0ffa..4443d3bb3fbf 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -887,14 +887,14 @@ static int i2c_pxa_probe(struct platform_device *dev)
887 pxa_gpio_mode(GPIO117_I2CSCL_MD); 887 pxa_gpio_mode(GPIO117_I2CSCL_MD);
888 pxa_gpio_mode(GPIO118_I2CSDA_MD); 888 pxa_gpio_mode(GPIO118_I2CSDA_MD);
889#endif 889#endif
890 pxa_set_cken(CKEN14_I2C, 1); 890 pxa_set_cken(CKEN_I2C, 1);
891 break; 891 break;
892#ifdef CONFIG_PXA27x 892#ifdef CONFIG_PXA27x
893 case 1: 893 case 1:
894 local_irq_disable(); 894 local_irq_disable();
895 PCFR |= PCFR_PI2CEN; 895 PCFR |= PCFR_PI2CEN;
896 local_irq_enable(); 896 local_irq_enable();
897 pxa_set_cken(CKEN15_PWRI2C, 1); 897 pxa_set_cken(CKEN_PWRI2C, 1);
898#endif 898#endif
899 } 899 }
900 900
@@ -935,11 +935,11 @@ eadapt:
935ereqirq: 935ereqirq:
936 switch (dev->id) { 936 switch (dev->id) {
937 case 0: 937 case 0:
938 pxa_set_cken(CKEN14_I2C, 0); 938 pxa_set_cken(CKEN_I2C, 0);
939 break; 939 break;
940#ifdef CONFIG_PXA27x 940#ifdef CONFIG_PXA27x
941 case 1: 941 case 1:
942 pxa_set_cken(CKEN15_PWRI2C, 0); 942 pxa_set_cken(CKEN_PWRI2C, 0);
943 local_irq_disable(); 943 local_irq_disable();
944 PCFR &= ~PCFR_PI2CEN; 944 PCFR &= ~PCFR_PI2CEN;
945 local_irq_enable(); 945 local_irq_enable();
@@ -962,11 +962,11 @@ static int i2c_pxa_remove(struct platform_device *dev)
962 free_irq(i2c->irq, i2c); 962 free_irq(i2c->irq, i2c);
963 switch (dev->id) { 963 switch (dev->id) {
964 case 0: 964 case 0:
965 pxa_set_cken(CKEN14_I2C, 0); 965 pxa_set_cken(CKEN_I2C, 0);
966 break; 966 break;
967#ifdef CONFIG_PXA27x 967#ifdef CONFIG_PXA27x
968 case 1: 968 case 1:
969 pxa_set_cken(CKEN15_PWRI2C, 0); 969 pxa_set_cken(CKEN_PWRI2C, 0);
970 local_irq_disable(); 970 local_irq_disable();
971 PCFR &= ~PCFR_PI2CEN; 971 PCFR &= ~PCFR_PI2CEN;
972 local_irq_enable(); 972 local_irq_enable();
diff --git a/drivers/mmc/pxamci.c b/drivers/mmc/pxamci.c
index 9774fc68b61a..fca894e55f4a 100644
--- a/drivers/mmc/pxamci.c
+++ b/drivers/mmc/pxamci.c
@@ -369,14 +369,14 @@ static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
369 if (CLOCKRATE / clk > ios->clock) 369 if (CLOCKRATE / clk > ios->clock)
370 clk <<= 1; 370 clk <<= 1;
371 host->clkrt = fls(clk) - 1; 371 host->clkrt = fls(clk) - 1;
372 pxa_set_cken(CKEN12_MMC, 1); 372 pxa_set_cken(CKEN_MMC, 1);
373 373
374 /* 374 /*
375 * we write clkrt on the next command 375 * we write clkrt on the next command
376 */ 376 */
377 } else { 377 } else {
378 pxamci_stop_clock(host); 378 pxamci_stop_clock(host);
379 pxa_set_cken(CKEN12_MMC, 0); 379 pxa_set_cken(CKEN_MMC, 0);
380 } 380 }
381 381
382 if (host->power_mode != ios->power_mode) { 382 if (host->power_mode != ios->power_mode) {
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c
index 2272156af31e..d6d5361f0936 100644
--- a/drivers/net/irda/pxaficp_ir.c
+++ b/drivers/net/irda/pxaficp_ir.c
@@ -134,7 +134,7 @@ static int pxa_irda_set_speed(struct pxa_irda *si, int speed)
134 DCSR(si->rxdma) &= ~DCSR_RUN; 134 DCSR(si->rxdma) &= ~DCSR_RUN;
135 /* disable FICP */ 135 /* disable FICP */
136 ICCR0 = 0; 136 ICCR0 = 0;
137 pxa_set_cken(CKEN13_FICP, 0); 137 pxa_set_cken(CKEN_FICP, 0);
138 138
139 /* set board transceiver to SIR mode */ 139 /* set board transceiver to SIR mode */
140 si->pdata->transceiver_mode(si->dev, IR_SIRMODE); 140 si->pdata->transceiver_mode(si->dev, IR_SIRMODE);
@@ -144,7 +144,7 @@ static int pxa_irda_set_speed(struct pxa_irda *si, int speed)
144 pxa_gpio_mode(GPIO47_STTXD_MD); 144 pxa_gpio_mode(GPIO47_STTXD_MD);
145 145
146 /* enable the STUART clock */ 146 /* enable the STUART clock */
147 pxa_set_cken(CKEN5_STUART, 1); 147 pxa_set_cken(CKEN_STUART, 1);
148 } 148 }
149 149
150 /* disable STUART first */ 150 /* disable STUART first */
@@ -169,7 +169,7 @@ static int pxa_irda_set_speed(struct pxa_irda *si, int speed)
169 /* disable STUART */ 169 /* disable STUART */
170 STIER = 0; 170 STIER = 0;
171 STISR = 0; 171 STISR = 0;
172 pxa_set_cken(CKEN5_STUART, 0); 172 pxa_set_cken(CKEN_STUART, 0);
173 173
174 /* disable FICP first */ 174 /* disable FICP first */
175 ICCR0 = 0; 175 ICCR0 = 0;
@@ -182,7 +182,7 @@ static int pxa_irda_set_speed(struct pxa_irda *si, int speed)
182 pxa_gpio_mode(GPIO47_ICPTXD_MD); 182 pxa_gpio_mode(GPIO47_ICPTXD_MD);
183 183
184 /* enable the FICP clock */ 184 /* enable the FICP clock */
185 pxa_set_cken(CKEN13_FICP, 1); 185 pxa_set_cken(CKEN_FICP, 1);
186 186
187 si->speed = speed; 187 si->speed = speed;
188 pxa_irda_fir_dma_rx_start(si); 188 pxa_irda_fir_dma_rx_start(si);
@@ -593,7 +593,7 @@ static void pxa_irda_shutdown(struct pxa_irda *si)
593 /* disable STUART SIR mode */ 593 /* disable STUART SIR mode */
594 STISR = 0; 594 STISR = 0;
595 /* disable the STUART clock */ 595 /* disable the STUART clock */
596 pxa_set_cken(CKEN5_STUART, 0); 596 pxa_set_cken(CKEN_STUART, 0);
597 597
598 /* disable DMA */ 598 /* disable DMA */
599 DCSR(si->txdma) &= ~DCSR_RUN; 599 DCSR(si->txdma) &= ~DCSR_RUN;
@@ -601,7 +601,7 @@ static void pxa_irda_shutdown(struct pxa_irda *si)
601 /* disable FICP */ 601 /* disable FICP */
602 ICCR0 = 0; 602 ICCR0 = 0;
603 /* disable the FICP clock */ 603 /* disable the FICP clock */
604 pxa_set_cken(CKEN13_FICP, 0); 604 pxa_set_cken(CKEN_FICP, 0);
605 605
606 DRCMR17 = 0; 606 DRCMR17 = 0;
607 DRCMR18 = 0; 607 DRCMR18 = 0;
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c
index d403aaa55092..e9c6cb391a23 100644
--- a/drivers/serial/pxa.c
+++ b/drivers/serial/pxa.c
@@ -717,7 +717,7 @@ struct uart_ops serial_pxa_pops = {
717static struct uart_pxa_port serial_pxa_ports[] = { 717static struct uart_pxa_port serial_pxa_ports[] = {
718 { /* FFUART */ 718 { /* FFUART */
719 .name = "FFUART", 719 .name = "FFUART",
720 .cken = CKEN6_FFUART, 720 .cken = CKEN_FFUART,
721 .port = { 721 .port = {
722 .type = PORT_PXA, 722 .type = PORT_PXA,
723 .iotype = UPIO_MEM, 723 .iotype = UPIO_MEM,
@@ -731,7 +731,7 @@ static struct uart_pxa_port serial_pxa_ports[] = {
731 }, 731 },
732 }, { /* BTUART */ 732 }, { /* BTUART */
733 .name = "BTUART", 733 .name = "BTUART",
734 .cken = CKEN7_BTUART, 734 .cken = CKEN_BTUART,
735 .port = { 735 .port = {
736 .type = PORT_PXA, 736 .type = PORT_PXA,
737 .iotype = UPIO_MEM, 737 .iotype = UPIO_MEM,
@@ -745,7 +745,7 @@ static struct uart_pxa_port serial_pxa_ports[] = {
745 }, 745 },
746 }, { /* STUART */ 746 }, { /* STUART */
747 .name = "STUART", 747 .name = "STUART",
748 .cken = CKEN5_STUART, 748 .cken = CKEN_STUART,
749 .port = { 749 .port = {
750 .type = PORT_PXA, 750 .type = PORT_PXA,
751 .iotype = UPIO_MEM, 751 .iotype = UPIO_MEM,
@@ -759,7 +759,7 @@ static struct uart_pxa_port serial_pxa_ports[] = {
759 }, 759 },
760 }, { /* HWUART */ 760 }, { /* HWUART */
761 .name = "HWUART", 761 .name = "HWUART",
762 .cken = CKEN4_HWUART, 762 .cken = CKEN_HWUART,
763 .port = { 763 .port = {
764 .type = PORT_PXA, 764 .type = PORT_PXA,
765 .iotype = UPIO_MEM, 765 .iotype = UPIO_MEM,
diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c
index f01890dc8751..018b0d65765a 100644
--- a/drivers/usb/gadget/pxa2xx_udc.c
+++ b/drivers/usb/gadget/pxa2xx_udc.c
@@ -1497,7 +1497,7 @@ static void udc_disable(struct pxa2xx_udc *dev)
1497 1497
1498#ifdef CONFIG_ARCH_PXA 1498#ifdef CONFIG_ARCH_PXA
1499 /* Disable clock for USB device */ 1499 /* Disable clock for USB device */
1500 pxa_set_cken(CKEN11_USB, 0); 1500 pxa_set_cken(CKEN_USB, 0);
1501#endif 1501#endif
1502 1502
1503 ep0_idle (dev); 1503 ep0_idle (dev);
@@ -1543,7 +1543,7 @@ static void udc_enable (struct pxa2xx_udc *dev)
1543 1543
1544#ifdef CONFIG_ARCH_PXA 1544#ifdef CONFIG_ARCH_PXA
1545 /* Enable clock for USB device */ 1545 /* Enable clock for USB device */
1546 pxa_set_cken(CKEN11_USB, 1); 1546 pxa_set_cken(CKEN_USB, 1);
1547 udelay(5); 1547 udelay(5);
1548#endif 1548#endif
1549 1549
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
index f1563dc319d3..23d2fe5a62f4 100644
--- a/drivers/usb/host/ohci-pxa27x.c
+++ b/drivers/usb/host/ohci-pxa27x.c
@@ -80,7 +80,7 @@ static int pxa27x_start_hc(struct device *dev)
80 80
81 inf = dev->platform_data; 81 inf = dev->platform_data;
82 82
83 pxa_set_cken(CKEN10_USBHOST, 1); 83 pxa_set_cken(CKEN_USBHOST, 1);
84 84
85 UHCHR |= UHCHR_FHR; 85 UHCHR |= UHCHR_FHR;
86 udelay(11); 86 udelay(11);
@@ -123,7 +123,7 @@ static void pxa27x_stop_hc(struct device *dev)
123 UHCCOMS |= 1; 123 UHCCOMS |= 1;
124 udelay(10); 124 udelay(10);
125 125
126 pxa_set_cken(CKEN10_USBHOST, 0); 126 pxa_set_cken(CKEN_USBHOST, 0);
127} 127}
128 128
129 129
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index b4947c810706..0b195f33f84f 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -803,7 +803,7 @@ static void pxafb_enable_controller(struct pxafb_info *fbi)
803 pr_debug("reg_lccr3 0x%08x\n", (unsigned int) fbi->reg_lccr3); 803 pr_debug("reg_lccr3 0x%08x\n", (unsigned int) fbi->reg_lccr3);
804 804
805 /* enable LCD controller clock */ 805 /* enable LCD controller clock */
806 pxa_set_cken(CKEN16_LCD, 1); 806 pxa_set_cken(CKEN_LCD, 1);
807 807
808 /* Sequence from 11.7.10 */ 808 /* Sequence from 11.7.10 */
809 LCCR3 = fbi->reg_lccr3; 809 LCCR3 = fbi->reg_lccr3;
@@ -840,7 +840,7 @@ static void pxafb_disable_controller(struct pxafb_info *fbi)
840 remove_wait_queue(&fbi->ctrlr_wait, &wait); 840 remove_wait_queue(&fbi->ctrlr_wait, &wait);
841 841
842 /* disable LCD controller clock */ 842 /* disable LCD controller clock */
843 pxa_set_cken(CKEN16_LCD, 0); 843 pxa_set_cken(CKEN_LCD, 0);
844} 844}
845 845
846/* 846/*
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h
index 139c9d954818..dbcc9298b0c8 100644
--- a/include/asm-arm/arch-pxa/pxa-regs.h
+++ b/include/asm-arm/arch-pxa/pxa-regs.h
@@ -1801,35 +1801,35 @@
1801#define CCCR_M_MASK 0x0060 /* Memory Frequency to Run Mode Frequency Multiplier */ 1801#define CCCR_M_MASK 0x0060 /* Memory Frequency to Run Mode Frequency Multiplier */
1802#define CCCR_L_MASK 0x001f /* Crystal Frequency to Memory Frequency Multiplier */ 1802#define CCCR_L_MASK 0x001f /* Crystal Frequency to Memory Frequency Multiplier */
1803 1803
1804#define CKEN24_CAMERA (1 << 24) /* Camera Interface Clock Enable */ 1804#define CKEN_CAMERA (24) /* Camera Interface Clock Enable */
1805#define CKEN23_SSP1 (1 << 23) /* SSP1 Unit Clock Enable */ 1805#define CKEN_SSP1 (23) /* SSP1 Unit Clock Enable */
1806#define CKEN22_MEMC (1 << 22) /* Memory Controller Clock Enable */ 1806#define CKEN_MEMC (22) /* Memory Controller Clock Enable */
1807#define CKEN21_MEMSTK (1 << 21) /* Memory Stick Host Controller */ 1807#define CKEN_MEMSTK (21) /* Memory Stick Host Controller */
1808#define CKEN20_IM (1 << 20) /* Internal Memory Clock Enable */ 1808#define CKEN_IM (20) /* Internal Memory Clock Enable */
1809#define CKEN19_KEYPAD (1 << 19) /* Keypad Interface Clock Enable */ 1809#define CKEN_KEYPAD (19) /* Keypad Interface Clock Enable */
1810#define CKEN18_USIM (1 << 18) /* USIM Unit Clock Enable */ 1810#define CKEN_USIM (18) /* USIM Unit Clock Enable */
1811#define CKEN17_MSL (1 << 17) /* MSL Unit Clock Enable */ 1811#define CKEN_MSL (17) /* MSL Unit Clock Enable */
1812#define CKEN16_LCD (1 << 16) /* LCD Unit Clock Enable */ 1812#define CKEN_LCD (16) /* LCD Unit Clock Enable */
1813#define CKEN15_PWRI2C (1 << 15) /* PWR I2C Unit Clock Enable */ 1813#define CKEN_PWRI2C (15) /* PWR I2C Unit Clock Enable */
1814#define CKEN14_I2C (1 << 14) /* I2C Unit Clock Enable */ 1814#define CKEN_I2C (14) /* I2C Unit Clock Enable */
1815#define CKEN13_FICP (1 << 13) /* FICP Unit Clock Enable */ 1815#define CKEN_FICP (13) /* FICP Unit Clock Enable */
1816#define CKEN12_MMC (1 << 12) /* MMC Unit Clock Enable */ 1816#define CKEN_MMC (12) /* MMC Unit Clock Enable */
1817#define CKEN11_USB (1 << 11) /* USB Unit Clock Enable */ 1817#define CKEN_USB (11) /* USB Unit Clock Enable */
1818#define CKEN10_ASSP (1 << 10) /* ASSP (SSP3) Clock Enable */ 1818#define CKEN_ASSP (10) /* ASSP (SSP3) Clock Enable */
1819#define CKEN10_USBHOST (1 << 10) /* USB Host Unit Clock Enable */ 1819#define CKEN_USBHOST (10) /* USB Host Unit Clock Enable */
1820#define CKEN9_OSTIMER (1 << 9) /* OS Timer Unit Clock Enable */ 1820#define CKEN_OSTIMER (9) /* OS Timer Unit Clock Enable */
1821#define CKEN9_NSSP (1 << 9) /* NSSP (SSP2) Clock Enable */ 1821#define CKEN_NSSP (9) /* NSSP (SSP2) Clock Enable */
1822#define CKEN8_I2S (1 << 8) /* I2S Unit Clock Enable */ 1822#define CKEN_I2S (8) /* I2S Unit Clock Enable */
1823#define CKEN7_BTUART (1 << 7) /* BTUART Unit Clock Enable */ 1823#define CKEN_BTUART (7) /* BTUART Unit Clock Enable */
1824#define CKEN6_FFUART (1 << 6) /* FFUART Unit Clock Enable */ 1824#define CKEN_FFUART (6) /* FFUART Unit Clock Enable */
1825#define CKEN5_STUART (1 << 5) /* STUART Unit Clock Enable */ 1825#define CKEN_STUART (5) /* STUART Unit Clock Enable */
1826#define CKEN4_HWUART (1 << 4) /* HWUART Unit Clock Enable */ 1826#define CKEN_HWUART (4) /* HWUART Unit Clock Enable */
1827#define CKEN4_SSP3 (1 << 4) /* SSP3 Unit Clock Enable */ 1827#define CKEN_SSP3 (4) /* SSP3 Unit Clock Enable */
1828#define CKEN3_SSP (1 << 3) /* SSP Unit Clock Enable */ 1828#define CKEN_SSP (3) /* SSP Unit Clock Enable */
1829#define CKEN3_SSP2 (1 << 3) /* SSP2 Unit Clock Enable */ 1829#define CKEN_SSP2 (3) /* SSP2 Unit Clock Enable */
1830#define CKEN2_AC97 (1 << 2) /* AC97 Unit Clock Enable */ 1830#define CKEN_AC97 (2) /* AC97 Unit Clock Enable */
1831#define CKEN1_PWM1 (1 << 1) /* PWM1 Clock Enable */ 1831#define CKEN_PWM1 (1) /* PWM1 Clock Enable */
1832#define CKEN0_PWM0 (1 << 0) /* PWM0 Clock Enable */ 1832#define CKEN_PWM0 (0) /* PWM0 Clock Enable */
1833 1833
1834#define OSCC_OON (1 << 1) /* 32.768kHz OON (write-once only bit) */ 1834#define OSCC_OON (1 << 1) /* 32.768kHz OON (write-once only bit) */
1835#define OSCC_OOK (1 << 0) /* 32.768kHz OOK (read-only bit) */ 1835#define OSCC_OOK (1 << 0) /* 32.768kHz OOK (read-only bit) */
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c
index 28db4be7a16f..19c65a8d86a7 100644
--- a/sound/arm/pxa2xx-ac97.c
+++ b/sound/arm/pxa2xx-ac97.c
@@ -260,7 +260,7 @@ static int pxa2xx_ac97_do_suspend(struct snd_card *card, pm_message_t state)
260 if (platform_ops && platform_ops->suspend) 260 if (platform_ops && platform_ops->suspend)
261 platform_ops->suspend(platform_ops->priv); 261 platform_ops->suspend(platform_ops->priv);
262 GCR |= GCR_ACLINK_OFF; 262 GCR |= GCR_ACLINK_OFF;
263 pxa_set_cken(CKEN2_AC97, 0); 263 pxa_set_cken(CKEN_AC97, 0);
264 264
265 return 0; 265 return 0;
266} 266}
@@ -269,7 +269,7 @@ static int pxa2xx_ac97_do_resume(struct snd_card *card)
269{ 269{
270 pxa2xx_audio_ops_t *platform_ops = card->dev->platform_data; 270 pxa2xx_audio_ops_t *platform_ops = card->dev->platform_data;
271 271
272 pxa_set_cken(CKEN2_AC97, 1); 272 pxa_set_cken(CKEN_AC97, 1);
273 if (platform_ops && platform_ops->resume) 273 if (platform_ops && platform_ops->resume)
274 platform_ops->resume(platform_ops->priv); 274 platform_ops->resume(platform_ops->priv);
275 snd_ac97_resume(pxa2xx_ac97_ac97); 275 snd_ac97_resume(pxa2xx_ac97_ac97);
@@ -337,7 +337,7 @@ static int __devinit pxa2xx_ac97_probe(struct platform_device *dev)
337 /* Use GPIO 113 as AC97 Reset on Bulverde */ 337 /* Use GPIO 113 as AC97 Reset on Bulverde */
338 pxa_gpio_mode(113 | GPIO_ALT_FN_2_OUT); 338 pxa_gpio_mode(113 | GPIO_ALT_FN_2_OUT);
339#endif 339#endif
340 pxa_set_cken(CKEN2_AC97, 1); 340 pxa_set_cken(CKEN_AC97, 1);
341 341
342 ret = snd_ac97_bus(card, 0, &pxa2xx_ac97_ops, NULL, &ac97_bus); 342 ret = snd_ac97_bus(card, 0, &pxa2xx_ac97_ops, NULL, &ac97_bus);
343 if (ret) 343 if (ret)
@@ -361,10 +361,10 @@ static int __devinit pxa2xx_ac97_probe(struct platform_device *dev)
361 err: 361 err:
362 if (card) 362 if (card)
363 snd_card_free(card); 363 snd_card_free(card);
364 if (CKEN & CKEN2_AC97) { 364 if (CKEN & CKEN_AC97) {
365 GCR |= GCR_ACLINK_OFF; 365 GCR |= GCR_ACLINK_OFF;
366 free_irq(IRQ_AC97, NULL); 366 free_irq(IRQ_AC97, NULL);
367 pxa_set_cken(CKEN2_AC97, 0); 367 pxa_set_cken(CKEN_AC97, 0);
368 } 368 }
369 return ret; 369 return ret;
370} 370}
@@ -378,7 +378,7 @@ static int __devexit pxa2xx_ac97_remove(struct platform_device *dev)
378 platform_set_drvdata(dev, NULL); 378 platform_set_drvdata(dev, NULL);
379 GCR |= GCR_ACLINK_OFF; 379 GCR |= GCR_ACLINK_OFF;
380 free_irq(IRQ_AC97, NULL); 380 free_irq(IRQ_AC97, NULL);
381 pxa_set_cken(CKEN2_AC97, 0); 381 pxa_set_cken(CKEN_AC97, 0);
382 } 382 }
383 383
384 return 0; 384 return 0;
diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c
index 1bbbeff84ef0..b222755763e7 100644
--- a/sound/soc/pxa/pxa2xx-ac97.c
+++ b/sound/soc/pxa/pxa2xx-ac97.c
@@ -256,7 +256,7 @@ static int pxa2xx_ac97_suspend(struct platform_device *pdev,
256 struct snd_soc_cpu_dai *dai) 256 struct snd_soc_cpu_dai *dai)
257{ 257{
258 GCR |= GCR_ACLINK_OFF; 258 GCR |= GCR_ACLINK_OFF;
259 pxa_set_cken(CKEN2_AC97, 0); 259 pxa_set_cken(CKEN_AC97, 0);
260 return 0; 260 return 0;
261} 261}
262 262
@@ -271,7 +271,7 @@ static int pxa2xx_ac97_resume(struct platform_device *pdev,
271 /* Use GPIO 113 as AC97 Reset on Bulverde */ 271 /* Use GPIO 113 as AC97 Reset on Bulverde */
272 pxa_gpio_mode(113 | GPIO_ALT_FN_2_OUT); 272 pxa_gpio_mode(113 | GPIO_ALT_FN_2_OUT);
273#endif 273#endif
274 pxa_set_cken(CKEN2_AC97, 1); 274 pxa_set_cken(CKEN_AC97, 1);
275 return 0; 275 return 0;
276} 276}
277 277
@@ -296,14 +296,14 @@ static int pxa2xx_ac97_probe(struct platform_device *pdev)
296 /* Use GPIO 113 as AC97 Reset on Bulverde */ 296 /* Use GPIO 113 as AC97 Reset on Bulverde */
297 pxa_gpio_mode(113 | GPIO_ALT_FN_2_OUT); 297 pxa_gpio_mode(113 | GPIO_ALT_FN_2_OUT);
298#endif 298#endif
299 pxa_set_cken(CKEN2_AC97, 1); 299 pxa_set_cken(CKEN_AC97, 1);
300 return 0; 300 return 0;
301 301
302 err: 302 err:
303 if (CKEN & CKEN2_AC97) { 303 if (CKEN & CKEN_AC97) {
304 GCR |= GCR_ACLINK_OFF; 304 GCR |= GCR_ACLINK_OFF;
305 free_irq(IRQ_AC97, NULL); 305 free_irq(IRQ_AC97, NULL);
306 pxa_set_cken(CKEN2_AC97, 0); 306 pxa_set_cken(CKEN_AC97, 0);
307 } 307 }
308 return ret; 308 return ret;
309} 309}
@@ -312,7 +312,7 @@ static void pxa2xx_ac97_remove(struct platform_device *pdev)
312{ 312{
313 GCR |= GCR_ACLINK_OFF; 313 GCR |= GCR_ACLINK_OFF;
314 free_irq(IRQ_AC97, NULL); 314 free_irq(IRQ_AC97, NULL);
315 pxa_set_cken(CKEN2_AC97, 0); 315 pxa_set_cken(CKEN_AC97, 0);
316} 316}
317 317
318static int pxa2xx_ac97_hw_params(struct snd_pcm_substream *substream, 318static int pxa2xx_ac97_hw_params(struct snd_pcm_substream *substream,
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index 575a6137c040..50c5c83f67db 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -149,7 +149,7 @@ static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream,
149 pxa_gpio_mode(gpio_bus[pxa_i2s.master].tx); 149 pxa_gpio_mode(gpio_bus[pxa_i2s.master].tx);
150 pxa_gpio_mode(gpio_bus[pxa_i2s.master].frm); 150 pxa_gpio_mode(gpio_bus[pxa_i2s.master].frm);
151 pxa_gpio_mode(gpio_bus[pxa_i2s.master].clk); 151 pxa_gpio_mode(gpio_bus[pxa_i2s.master].clk);
152 pxa_set_cken(CKEN8_I2S, 1); 152 pxa_set_cken(CKEN_I2S, 1);
153 pxa_i2s_wait(); 153 pxa_i2s_wait();
154 154
155 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 155 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
@@ -234,7 +234,7 @@ static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream)
234 if (SACR1 & (SACR1_DREC | SACR1_DRPL)) { 234 if (SACR1 & (SACR1_DREC | SACR1_DRPL)) {
235 SACR0 &= ~SACR0_ENB; 235 SACR0 &= ~SACR0_ENB;
236 pxa_i2s_wait(); 236 pxa_i2s_wait();
237 pxa_set_cken(CKEN8_I2S, 0); 237 pxa_set_cken(CKEN_I2S, 0);
238 } 238 }
239} 239}
240 240