]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - arch/arm/mach-pxa/mioa701.c
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
[linux-2.6.git] / arch / arm / mach-pxa / mioa701.c
index 3cab452e556781526beaa8c38567b5396c4c9ca6..0c31fabfc7fdd46ee793252bf62fe9be2541cc47 100644 (file)
 #include <linux/irq.h>
 #include <linux/pda_power.h>
 #include <linux/power_supply.h>
-#include <linux/wm97xx_batt.h>
+#include <linux/wm97xx.h>
 #include <linux/mtd/physmap.h>
 #include <linux/usb/gpio_vbus.h>
 #include <linux/regulator/max1586.h>
+#include <linux/slab.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
 #include <mach/pxa27x.h>
 #include <mach/regs-rtc.h>
-#include <mach/pxa27x_keypad.h>
+#include <plat/pxa27x_keypad.h>
 #include <mach/pxafb.h>
 #include <mach/mmc.h>
 #include <mach/udc.h>
@@ -86,25 +87,7 @@ static unsigned long mioa701_pin_config[] = {
        MIO_CFG_OUT(GPIO22_USB_ENABLE, AF0, DRIVE_LOW),
 
        /* LCD */
-       GPIO58_LCD_LDD_0,
-       GPIO59_LCD_LDD_1,
-       GPIO60_LCD_LDD_2,
-       GPIO61_LCD_LDD_3,
-       GPIO62_LCD_LDD_4,
-       GPIO63_LCD_LDD_5,
-       GPIO64_LCD_LDD_6,
-       GPIO65_LCD_LDD_7,
-       GPIO66_LCD_LDD_8,
-       GPIO67_LCD_LDD_9,
-       GPIO68_LCD_LDD_10,
-       GPIO69_LCD_LDD_11,
-       GPIO70_LCD_LDD_12,
-       GPIO71_LCD_LDD_13,
-       GPIO72_LCD_LDD_14,
-       GPIO73_LCD_LDD_15,
-       GPIO74_LCD_FCLK,
-       GPIO75_LCD_LCLK,
-       GPIO76_LCD_PCLK,
+       GPIOxx_LCD_TFT_16BPP,
 
        /* QCI */
        GPIO12_CIF_DD_7,
@@ -155,6 +138,10 @@ static unsigned long mioa701_pin_config[] = {
        GPIO41_FFUART_RTS,
 
        /* Sound */
+       GPIO28_AC97_BITCLK,
+       GPIO29_AC97_SDATA_IN_0,
+       GPIO30_AC97_SDATA_OUT,
+       GPIO31_AC97_SYNC,
        GPIO89_AC97_SYSCLK,
        MIO_CFG_IN(GPIO12_HPJACK_INSERT, AF0),
 
@@ -439,6 +426,7 @@ struct gpio_vbus_mach_info gpio_vbus_data = {
  * to give the card a chance to fully insert/eject.
  */
 static struct pxamci_platform_data mioa701_mci_info = {
+       .detect_delay_ms        = 250,
        .ocr_mask               = MMC_VDD_32_33 | MMC_VDD_33_34,
        .gpio_card_detect       = GPIO15_SDIO_INSERT,
        .gpio_card_ro           = GPIO78_SDIO_RO,
@@ -648,7 +636,7 @@ static struct platform_device power_dev = {
        },
 };
 
-static struct wm97xx_batt_info mioa701_battery_data = {
+static struct wm97xx_batt_pdata mioa701_battery_data = {
        .batt_aux       = WM97XX_AUX_ID1,
        .temp_aux       = -1,
        .charge_gpio    = -1,
@@ -660,6 +648,10 @@ static struct wm97xx_batt_info mioa701_battery_data = {
        .batt_name      = "mioa701_battery",
 };
 
+static struct wm97xx_pdata mioa701_wm97xx_pdata = {
+       .batt_pdata     = &mioa701_battery_data,
+};
+
 /*
  * Voltage regulation
  */
@@ -709,7 +701,7 @@ static struct i2c_board_info __initdata mioa701_pi2c_devices[] = {
 };
 
 /* Board I2C devices. */
-static struct i2c_board_info __initdata mioa701_i2c_devices[] = {
+static struct i2c_board_info mioa701_i2c_devices[] = {
        {
                I2C_BOARD_INFO("mt9m111", 0x5d),
        },
@@ -728,6 +720,7 @@ struct i2c_pxa_platform_data i2c_pdata = {
 
 static pxa2xx_audio_ops_t mioa701_ac97_info = {
        .reset_gpio = 95,
+       .codec_pdata = { &mioa701_wm97xx_pdata, },
 };
 
 /*
@@ -798,13 +791,14 @@ static void __init mioa701_machine_init(void)
        UP2OCR = UP2OCR_HXOE;
 
        pxa2xx_mfp_config(ARRAY_AND_SIZE(mioa701_pin_config));
+       pxa_set_ffuart_info(NULL);
+       pxa_set_btuart_info(NULL);
+       pxa_set_stuart_info(NULL);
        mio_gpio_request(ARRAY_AND_SIZE(global_gpios));
        bootstrap_init();
        set_pxa_fb_info(&mioa701_pxafb_info);
-       mioa701_mci_info.detect_delay = msecs_to_jiffies(250);
        pxa_set_mci_info(&mioa701_mci_info);
        pxa_set_keypad_info(&mioa701_keypad_info);
-       wm97xx_bat_set_pdata(&mioa701_battery_data);
        pxa_set_udc_info(&mioa701_udc_info);
        pxa_set_ac97_info(&mioa701_ac97_info);
        pm_power_off = mioa701_poweroff;
@@ -825,8 +819,6 @@ static void mioa701_machine_exit(void)
 }
 
 MACHINE_START(MIOA701, "MIO A701")
-       .phys_io        = 0x40000000,
-       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
        .boot_params    = 0xa0000100,
        .map_io         = &pxa_map_io,
        .init_irq       = &pxa27x_init_irq,