Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa...
[sfrench/cifs-2.6.git] / arch / arm / mach-pxa / palmld.c
index 1cec1806f002e270bbdf146cc14d56e5b6f17608..ed70f281dd090812f71dac139aaa795660b7b0dd 100644 (file)
@@ -62,6 +62,8 @@ static unsigned long palmld_pin_config[] __initdata = {
        GPIO29_AC97_SDATA_IN_0,
        GPIO30_AC97_SDATA_OUT,
        GPIO31_AC97_SYNC,
+       GPIO89_AC97_SYSCLK,
+       GPIO95_AC97_nRESET,
 
        /* IrDA */
        GPIO108_GPIO,   /* ir disable */
@@ -127,7 +129,7 @@ static unsigned long palmld_pin_config[] __initdata = {
        GPIO81_GPIO,    /* wifi reset */
 
        /* HDD */
-       GPIO95_GPIO,    /* HDD irq */
+       GPIO98_GPIO,    /* HDD reset */
        GPIO115_GPIO,   /* HDD power */
 
        /* MISC */
@@ -493,6 +495,14 @@ static struct platform_device palmld_asoc = {
        },
 };
 
+/******************************************************************************
+ * HDD
+ ******************************************************************************/
+static struct platform_device palmld_hdd = {
+       .name   = "pata_palmld",
+       .id     = -1,
+};
+
 /******************************************************************************
  * Framebuffer
  ******************************************************************************/
@@ -522,30 +532,18 @@ static struct pxafb_mach_info palmld_lcd_screen = {
 /******************************************************************************
  * Power management - standby
  ******************************************************************************/
-#ifdef CONFIG_PM
-static u32 *addr __initdata;
-static u32 resume[3] __initdata = {
-       0xe3a00101,     /* mov  r0,     #0x40000000 */
-       0xe380060f,     /* orr  r0, r0, #0x00f00000 */
-       0xe590f008,     /* ldr  pc, [r0, #0x08] */
-};
-
-static int __init palmld_pm_init(void)
+static void __init palmld_pm_init(void)
 {
-       int i;
-
-       /* this is where the bootloader jumps */
-       addr = phys_to_virt(PALMLD_STR_BASE);
-
-       for (i = 0; i < 3; i++)
-               addr[i] = resume[i];
-
-       return 0;
+       static u32 resume[] = {
+               0xe3a00101,     /* mov  r0,     #0x40000000 */
+               0xe380060f,     /* orr  r0, r0, #0x00f00000 */
+               0xe590f008,     /* ldr  pc, [r0, #0x08] */
+       };
+
+       /* copy the bootloader */
+       memcpy(phys_to_virt(PALMLD_STR_BASE), resume, sizeof(resume));
 }
 
-device_initcall(palmld_pm_init);
-#endif
-
 /******************************************************************************
  * Machine init
  ******************************************************************************/
@@ -557,6 +555,7 @@ static struct platform_device *devices[] __initdata = {
        &palmld_leds,
        &power_supply,
        &palmld_asoc,
+       &palmld_hdd,
 };
 
 static struct map_desc palmld_io_desc[] __initdata = {
@@ -584,6 +583,7 @@ static void __init palmld_init(void)
 {
        pxa2xx_mfp_config(ARRAY_AND_SIZE(palmld_pin_config));
 
+       palmld_pm_init();
        set_pxa_fb_info(&palmld_lcd_screen);
        pxa_set_mci_info(&palmld_mci_platform_data);
        pxa_set_ac97_info(&palmld_ac97_pdata);