Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
[linux-2.6.git] / arch / arm / mach-pxa / idp.c
index 465108d..e773dce 100644 (file)
 #include <asm/setup.h>
 #include <asm/memory.h>
 #include <asm/mach-types.h>
-#include <asm/hardware.h>
+#include <mach/hardware.h>
 #include <asm/irq.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <asm/arch/pxa-regs.h>
-#include <asm/arch/idp.h>
-#include <asm/arch/pxafb.h>
-#include <asm/arch/bitfield.h>
-#include <asm/arch/mmc.h>
+#include <mach/pxa25x.h>
+#include <mach/idp.h>
+#include <mach/pxafb.h>
+#include <mach/bitfield.h>
+#include <mach/mmc.h>
 
 #include "generic.h"
 #include "devices.h"
  * - Ethernet interrupt
  */
 
+static unsigned long idp_pin_config[] __initdata = {
+       /* LCD */
+       GPIOxx_LCD_DSTN_16BPP,
+
+       /* BTUART */
+       GPIO42_BTUART_RXD,
+       GPIO43_BTUART_TXD,
+       GPIO44_BTUART_CTS,
+       GPIO45_BTUART_RTS,
+
+       /* STUART */
+       GPIO46_STUART_RXD,
+       GPIO47_STUART_TXD,
+
+       /* MMC */
+       GPIO6_MMC_CLK,
+       GPIO8_MMC_CS0,
+
+       /* Ethernet */
+       GPIO33_nCS_5,   /* Ethernet CS */
+       GPIO4_GPIO,     /* Ethernet IRQ */
+};
+
 static struct resource smc91x_resources[] = {
        [0] = {
                .start  = (IDP_ETH_PHYS + 0x300),
@@ -54,7 +77,7 @@ static struct resource smc91x_resources[] = {
        [1] = {
                .start  = IRQ_GPIO(4),
                .end    = IRQ_GPIO(4),
-               .flags  = IORESOURCE_IRQ,
+               .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
        }
 };
 
@@ -120,44 +143,34 @@ static struct pxafb_mach_info sharp_lm8v31 = {
        .num_modes      = 1,
        .cmap_inverse   = 0,
        .cmap_static    = 0,
-       .lccr0          = LCCR0_SDS,
-       .lccr3          = LCCR3_PCP | LCCR3_Acb(255),
+       .lcd_conn       = LCD_COLOR_DSTN_16BPP | LCD_PCLK_EDGE_FALL |
+                         LCD_AC_BIAS_FREQ(255),
        .pxafb_backlight_power = &idp_backlight_power,
        .pxafb_lcd_power = &idp_lcd_power
 };
 
-static int idp_mci_init(struct device *dev, irq_handler_t idp_detect_int, void *data)
-{
-       /* setup GPIO for PXA25x MMC controller */
-       pxa_gpio_mode(GPIO6_MMCCLK_MD);
-       pxa_gpio_mode(GPIO8_MMCCS0_MD);
-
-       return 0;
-}
-
 static struct pxamci_platform_data idp_mci_platform_data = {
-       .ocr_mask       = MMC_VDD_32_33|MMC_VDD_33_34,
-       .init           = idp_mci_init,
+       .ocr_mask               = MMC_VDD_32_33|MMC_VDD_33_34,
+       .gpio_card_detect       = -1,
+       .gpio_card_ro           = -1,
+       .gpio_power             = -1,
 };
 
 static void __init idp_init(void)
 {
        printk("idp_init()\n");
 
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(idp_pin_config));
+       pxa_set_ffuart_info(NULL);
+       pxa_set_btuart_info(NULL);
+       pxa_set_stuart_info(NULL);
+
        platform_device_register(&smc91x_device);
        //platform_device_register(&mst_audio_device);
        set_pxa_fb_info(&sharp_lm8v31);
        pxa_set_mci_info(&idp_mci_platform_data);
 }
 
-static void __init idp_init_irq(void)
-{
-
-       pxa25x_init_irq();
-
-       set_irq_type(TOUCH_PANEL_IRQ, TOUCH_PANEL_IRQ_EDGE);
-}
-
 static struct map_desc idp_io_desc[] __initdata = {
        {
                .virtual        =  IDP_COREVOLT_VIRT,
@@ -176,24 +189,13 @@ static void __init idp_map_io(void)
 {
        pxa_map_io();
        iotable_init(idp_io_desc, ARRAY_SIZE(idp_io_desc));
-
-       // serial ports 2 & 3
-       pxa_gpio_mode(GPIO42_BTRXD_MD);
-       pxa_gpio_mode(GPIO43_BTTXD_MD);
-       pxa_gpio_mode(GPIO44_BTCTS_MD);
-       pxa_gpio_mode(GPIO45_BTRTS_MD);
-       pxa_gpio_mode(GPIO46_STRXD_MD);
-       pxa_gpio_mode(GPIO47_STTXD_MD);
-
 }
 
 
 MACHINE_START(PXA_IDP, "Vibren PXA255 IDP")
        /* Maintainer: Vibren Technologies */
-       .phys_io        = 0x40000000,
-       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
        .map_io         = idp_map_io,
-       .init_irq       = idp_init_irq,
+       .init_irq       = pxa25x_init_irq,
        .timer          = &pxa_timer,
        .init_machine   = idp_init,
 MACHINE_END