Merge branch 'linus' into cpus4096
[pandora-kernel.git] / arch / arm / mach-pxa / zylonite_pxa320.c
index 94c7158..2b4fc34 100644 (file)
@@ -21,7 +21,7 @@
 #include <asm/arch/mfp-pxa320.h>
 #include <asm/arch/zylonite.h>
 
-#define ARRAY_AND_SIZE(x)      (x), ARRAY_SIZE(x)
+#include "generic.h"
 
 static mfp_cfg_t mfp_cfg[] __initdata = {
        /* LCD */
@@ -49,13 +49,14 @@ static mfp_cfg_t mfp_cfg[] __initdata = {
        GPIO15_2_LCD_LCLK,
        GPIO16_2_LCD_PCLK,
        GPIO17_2_LCD_BIAS,
+       GPIO14_PWM3_OUT,        /* backlight */
 
        /* FFUART */
-       GPIO41_UART1_RXD,
+       GPIO41_UART1_RXD | MFP_LPM_EDGE_FALL,
        GPIO42_UART1_TXD,
        GPIO43_UART1_CTS,
        GPIO44_UART1_DCD,
-       GPIO45_UART1_DSR,
+       GPIO45_UART1_DSR | MFP_LPM_EDGE_FALL,
        GPIO46_UART1_RI,
        GPIO47_UART1_DTR,
        GPIO48_UART1_RTS,
@@ -68,21 +69,24 @@ static mfp_cfg_t mfp_cfg[] __initdata = {
        GPIO39_AC97_BITCLK,
        GPIO40_AC97_nACRESET,
 
+       /* WM9713 IRQ */
+       GPIO15_GPIO,
+
        /* I2C */
        GPIO32_I2C_SCL,
        GPIO33_I2C_SDA,
 
        /* Keypad */
-       GPIO105_KP_DKIN_0,
-       GPIO106_KP_DKIN_1,
-       GPIO113_KP_MKIN_0,
-       GPIO114_KP_MKIN_1,
-       GPIO115_KP_MKIN_2,
-       GPIO116_KP_MKIN_3,
-       GPIO117_KP_MKIN_4,
-       GPIO118_KP_MKIN_5,
-       GPIO119_KP_MKIN_6,
-       GPIO120_KP_MKIN_7,
+       GPIO105_KP_DKIN_0 | MFP_LPM_EDGE_BOTH,
+       GPIO106_KP_DKIN_1 | MFP_LPM_EDGE_BOTH,
+       GPIO113_KP_MKIN_0 | MFP_LPM_EDGE_BOTH,
+       GPIO114_KP_MKIN_1 | MFP_LPM_EDGE_BOTH,
+       GPIO115_KP_MKIN_2 | MFP_LPM_EDGE_BOTH,
+       GPIO116_KP_MKIN_3 | MFP_LPM_EDGE_BOTH,
+       GPIO117_KP_MKIN_4 | MFP_LPM_EDGE_BOTH,
+       GPIO118_KP_MKIN_5 | MFP_LPM_EDGE_BOTH,
+       GPIO119_KP_MKIN_6 | MFP_LPM_EDGE_BOTH,
+       GPIO120_KP_MKIN_7 | MFP_LPM_EDGE_BOTH,
        GPIO121_KP_MKOUT_0,
        GPIO122_KP_MKOUT_1,
        GPIO123_KP_MKOUT_2,
@@ -95,6 +99,23 @@ static mfp_cfg_t mfp_cfg[] __initdata = {
        /* Ethernet */
        GPIO4_nCS3,
        GPIO90_GPIO,
+
+       /* MMC1 */
+       GPIO18_MMC1_DAT0,
+       GPIO19_MMC1_DAT1 | MFP_LPM_EDGE_BOTH,
+       GPIO20_MMC1_DAT2,
+       GPIO21_MMC1_DAT3,
+       GPIO22_MMC1_CLK,
+       GPIO23_MMC1_CMD,/* CMD0 for slot 0 */
+       GPIO31_GPIO,    /* CMD1 default as GPIO for slot 0 */
+
+       /* MMC2 */
+       GPIO24_MMC2_DAT0,
+       GPIO25_MMC2_DAT1 | MFP_LPM_EDGE_BOTH,
+       GPIO26_MMC2_DAT2,
+       GPIO27_MMC2_DAT3,
+       GPIO28_MMC2_CLK,
+       GPIO29_MMC2_CMD,
 };
 
 #define NUM_LCD_DETECT_PINS    7
@@ -167,7 +188,13 @@ void __init zylonite_pxa320_init(void)
                zylonite_detect_lcd_panel();
 
                /* GPIO pin assignment */
-               gpio_backlight  = mfp_to_gpio(MFP_PIN_GPIO14);
                gpio_eth_irq    = mfp_to_gpio(MFP_PIN_GPIO9);
+
+               /* MMC card detect & write protect for controller 0 */
+               zylonite_mmc_slot[0].gpio_cd  = mfp_to_gpio(MFP_PIN_GPIO1);
+               zylonite_mmc_slot[0].gpio_wp  = mfp_to_gpio(MFP_PIN_GPIO5);
+
+               /* WM9713 IRQ */
+               wm9713_irq = mfp_to_gpio(MFP_PIN_GPIO15);
        }
 }