[ARM] 5146/1: pxa2xx: convert all boards to call pxa2xx_transceiver_mode helper
authorDmitry Baryshkov <dbaryshkov@gmail.com>
Wed, 2 Jul 2008 12:54:46 +0000 (13:54 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 12 Jul 2008 20:43:45 +0000 (21:43 +0100)
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-pxa/corgi.c
arch/arm/mach-pxa/lubbock.c
arch/arm/mach-pxa/magician.c
arch/arm/mach-pxa/mainstone.c
arch/arm/mach-pxa/poodle.c
arch/arm/mach-pxa/spitz.c
arch/arm/mach-pxa/tosa.c
arch/arm/mach-pxa/trizeps4.c

index b37671b718868249e316ed503fa33b1d5fc687fe..e58504edb1404653b0bea3f5ac8ca956f6bd6db0 100644 (file)
@@ -465,6 +465,7 @@ static void corgi_irda_transceiver_mode(struct device *dev, int mode)
                GPSR(CORGI_GPIO_IR_ON) = GPIO_bit(CORGI_GPIO_IR_ON);
        else
                GPCR(CORGI_GPIO_IR_ON) = GPIO_bit(CORGI_GPIO_IR_ON);
+       pxa2xx_transceiver_mode(dev, mode);
 }
 
 static struct pxaficp_platform_data corgi_ficp_platform_data = {
index e041cceab16bbb7a0c912a67e2e6f0325d507b86..3daffbe7bb8644b081fc8b6c04e6f4be53c1bd18 100644 (file)
@@ -462,6 +462,7 @@ static void lubbock_irda_transceiver_mode(struct device *dev, int mode)
        } else if (mode & IR_FIRMODE) {
                LUB_MISC_WR |= 1 << 4;
        }
+       pxa2xx_transceiver_mode(dev, mode);
        local_irq_restore(flags);
 }
 
index bad5821be41a3eae77d2512a6703ac4e345bfe53..c9d274f0048f6f85eb8278f6d50c24e2a11d3285 100644 (file)
@@ -132,6 +132,7 @@ static unsigned long magician_pin_config[] __initdata = {
 static void magician_irda_transceiver_mode(struct device *dev, int mode)
 {
        gpio_set_value(GPIO83_MAGICIAN_nIR_EN, mode & IR_OFF);
+       pxa2xx_transceiver_mode(dev, mode);
 }
 
 static struct pxaficp_platform_data magician_ficp_info = {
index f2e9e7c4da8e625988d3d401c84a3650795caea8..8cd3f81558cb078087cf072806f060cb6d6d7bd3 100644 (file)
@@ -455,6 +455,7 @@ static void mainstone_irda_transceiver_mode(struct device *dev, int mode)
        } else if (mode & IR_FIRMODE) {
                MST_MSCWR1 |= MST_MSCWR1_IRDA_FIR;
        }
+       pxa2xx_transceiver_mode(dev, mode);
        if (mode & IR_OFF) {
                MST_MSCWR1 = (MST_MSCWR1 & ~MST_MSCWR1_IRDA_MASK) | MST_MSCWR1_IRDA_OFF;
        } else {
index f81c10cafd485760f10fb30c1988533a1973f0b2..39612cfa0b4d79191f523b6e2dbb0c1855eddcfb 100644 (file)
@@ -267,6 +267,7 @@ static void poodle_irda_transceiver_mode(struct device *dev, int mode)
        } else {
                GPCR(POODLE_GPIO_IR_ON) = GPIO_bit(POODLE_GPIO_IR_ON);
        }
+       pxa2xx_transceiver_mode(dev, mode);
 }
 
 static struct pxaficp_platform_data poodle_ficp_platform_data = {
index d58c3e906a93864e1be4cf55dbae6f1995c9b9b8..762249c03ded4e5d9311513e96b9b260e0dbc2a4 100644 (file)
@@ -451,6 +451,7 @@ static void spitz_irda_transceiver_mode(struct device *dev, int mode)
                set_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON);
        else
                reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON);
+       pxa2xx_transceiver_mode(dev, mode);
 }
 
 #ifdef CONFIG_MACH_AKITA
@@ -460,6 +461,7 @@ static void akita_irda_transceiver_mode(struct device *dev, int mode)
                akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON);
        else
                akita_reset_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON);
+       pxa2xx_transceiver_mode(dev, mode);
 }
 #endif
 
index 2d49de572ba1f14cd57fce9f430507569637266f..fea17ce6b55f5a812fa5f89e57cf851fc78850c5 100644 (file)
@@ -149,19 +149,12 @@ static unsigned long tosa_pin_config[] = {
        GPIO81_SSP2_CLK_OUT,
        GPIO82_SSP2_FRM_OUT,
        GPIO83_SSP2_TXD,
-};
-
-static unsigned long tosa_pin_irda_off[] = {
-       GPIO46_STUART_RXD,
-       GPIO47_GPIO | MFP_LPM_DRIVE_LOW,
-};
 
-static unsigned long tosa_pin_irda_on[] = {
-       GPIO46_STUART_RXD,
-       GPIO47_STUART_TXD,
+       /* IrDA is managed in other way */
+       GPIO46_GPIO,
+       GPIO47_GPIO,
 };
 
-
 /*
  * SCOOP Device
  */
@@ -360,10 +353,10 @@ static void tosa_irda_transceiver_mode(struct device *dev, int mode)
 {
        if (mode & IR_OFF) {
                gpio_set_value(TOSA_GPIO_IR_POWERDWN, 0);
-               pxa2xx_mfp_config(ARRAY_AND_SIZE(tosa_pin_irda_off));
+               pxa2xx_transceiver_mode(dev, mode);
                gpio_direction_output(TOSA_GPIO_IRDA_TX, 0);
        } else {
-               pxa2xx_mfp_config(ARRAY_AND_SIZE(tosa_pin_irda_on));
+               pxa2xx_transceiver_mode(dev, mode);
                gpio_set_value(TOSA_GPIO_IR_POWERDWN, 1);
        }
 }
@@ -775,7 +768,6 @@ static void __init tosa_init(void)
        int dummy;
 
        pxa2xx_mfp_config(ARRAY_AND_SIZE(tosa_pin_config));
-       pxa2xx_mfp_config(ARRAY_AND_SIZE(tosa_pin_irda_off));
        gpio_set_wake(MFP_PIN_GPIO1, 1);
        /* We can't pass to gpio-keys since it will drop the Reset altfunc */
 
index 61e2440230896c2a056105629765af1eee47b52d..dee7bf36f013f76af3950eed48ecf299ec010fac 100644 (file)
@@ -254,6 +254,7 @@ static void board_irda_mode(struct device *dev, int mode)
                /* Fast mode */
                trizeps_conxs_ircr |= ConXS_IRCR_MODE;
        }
+       pxa2xx_transceiver_mode(dev, mode);
        if (mode & IR_OFF) {
                trizeps_conxs_ircr |= ConXS_IRCR_SD;
        } else {