[ARM] pxa: Add support for suspend on PalmTX, T5 and LD
Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Eric Miao <eric.miao@marvell.com>
This commit is contained in:
parent
8c8aa5fa30
commit
81854f82c5
7 changed files with 109 additions and 12 deletions
|
@ -87,6 +87,7 @@
|
||||||
#define PALMLD_IDE_SIZE 0x00100000
|
#define PALMLD_IDE_SIZE 0x00100000
|
||||||
|
|
||||||
#define PALMLD_PHYS_IO_START 0x40000000
|
#define PALMLD_PHYS_IO_START 0x40000000
|
||||||
|
#define PALMLD_STR_BASE 0xa0200000
|
||||||
|
|
||||||
/* BATTERY */
|
/* BATTERY */
|
||||||
#define PALMLD_BAT_MAX_VOLTAGE 4000 /* 4.00V maximum voltage */
|
#define PALMLD_BAT_MAX_VOLTAGE 4000 /* 4.00V maximum voltage */
|
||||||
|
|
|
@ -59,6 +59,7 @@
|
||||||
/* Various addresses */
|
/* Various addresses */
|
||||||
#define PALMT5_PHYS_RAM_START 0xa0000000
|
#define PALMT5_PHYS_RAM_START 0xa0000000
|
||||||
#define PALMT5_PHYS_IO_START 0x40000000
|
#define PALMT5_PHYS_IO_START 0x40000000
|
||||||
|
#define PALMT5_STR_BASE 0xa0200000
|
||||||
|
|
||||||
/* TOUCHSCREEN */
|
/* TOUCHSCREEN */
|
||||||
#define AC97_LINK_FRAME 21
|
#define AC97_LINK_FRAME 21
|
||||||
|
|
|
@ -78,6 +78,8 @@
|
||||||
#define PALMTX_PHYS_RAM_START 0xa0000000
|
#define PALMTX_PHYS_RAM_START 0xa0000000
|
||||||
#define PALMTX_PHYS_IO_START 0x40000000
|
#define PALMTX_PHYS_IO_START 0x40000000
|
||||||
|
|
||||||
|
#define PALMTX_STR_BASE 0xa0200000
|
||||||
|
|
||||||
#define PALMTX_PHYS_FLASH_START PXA_CS0_PHYS /* ChipSelect 0 */
|
#define PALMTX_PHYS_FLASH_START PXA_CS0_PHYS /* ChipSelect 0 */
|
||||||
#define PALMTX_PHYS_NAND_START PXA_CS1_PHYS /* ChipSelect 1 */
|
#define PALMTX_PHYS_NAND_START PXA_CS1_PHYS /* ChipSelect 1 */
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
#include <linux/wm97xx_batt.h>
|
#include <linux/wm97xx_batt.h>
|
||||||
#include <linux/power_supply.h>
|
#include <linux/power_supply.h>
|
||||||
|
#include <linux/sysdev.h>
|
||||||
|
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
|
@ -68,10 +69,10 @@ static unsigned long palmld_pin_config[] __initdata = {
|
||||||
GPIO47_FICP_TXD,
|
GPIO47_FICP_TXD,
|
||||||
|
|
||||||
/* MATRIX KEYPAD */
|
/* MATRIX KEYPAD */
|
||||||
GPIO100_KP_MKIN_0,
|
GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
|
||||||
GPIO101_KP_MKIN_1,
|
GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH,
|
||||||
GPIO102_KP_MKIN_2,
|
GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH,
|
||||||
GPIO97_KP_MKIN_3,
|
GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH,
|
||||||
GPIO103_KP_MKOUT_0,
|
GPIO103_KP_MKOUT_0,
|
||||||
GPIO104_KP_MKOUT_1,
|
GPIO104_KP_MKOUT_1,
|
||||||
GPIO105_KP_MKOUT_2,
|
GPIO105_KP_MKOUT_2,
|
||||||
|
@ -506,6 +507,33 @@ static struct pxafb_mach_info palmld_lcd_screen = {
|
||||||
.lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
|
.lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* 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)
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
device_initcall(palmld_pm_init);
|
||||||
|
#endif
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Machine init
|
* Machine init
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
|
@ -75,10 +75,10 @@ static unsigned long palmt5_pin_config[] __initdata = {
|
||||||
GPIO95_GPIO, /* usb power */
|
GPIO95_GPIO, /* usb power */
|
||||||
|
|
||||||
/* MATRIX KEYPAD */
|
/* MATRIX KEYPAD */
|
||||||
GPIO100_KP_MKIN_0,
|
GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
|
||||||
GPIO101_KP_MKIN_1,
|
GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH,
|
||||||
GPIO102_KP_MKIN_2,
|
GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH,
|
||||||
GPIO97_KP_MKIN_3,
|
GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH,
|
||||||
GPIO103_KP_MKOUT_0,
|
GPIO103_KP_MKOUT_0,
|
||||||
GPIO104_KP_MKOUT_1,
|
GPIO104_KP_MKOUT_1,
|
||||||
GPIO105_KP_MKOUT_2,
|
GPIO105_KP_MKOUT_2,
|
||||||
|
@ -449,6 +449,33 @@ static struct pxafb_mach_info palmt5_lcd_screen = {
|
||||||
.lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
|
.lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* 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 palmt5_pm_init(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
/* this is where the bootloader jumps */
|
||||||
|
addr = phys_to_virt(PALMT5_STR_BASE);
|
||||||
|
|
||||||
|
for (i = 0; i < 3; i++)
|
||||||
|
addr[i] = resume[i];
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
device_initcall(palmt5_pm_init);
|
||||||
|
#endif
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Machine init
|
* Machine init
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
|
@ -93,10 +93,10 @@ static unsigned long palmtx_pin_config[] __initdata = {
|
||||||
GPIO116_GPIO, /* wifi ready */
|
GPIO116_GPIO, /* wifi ready */
|
||||||
|
|
||||||
/* MATRIX KEYPAD */
|
/* MATRIX KEYPAD */
|
||||||
GPIO100_KP_MKIN_0,
|
GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
|
||||||
GPIO101_KP_MKIN_1,
|
GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH,
|
||||||
GPIO102_KP_MKIN_2,
|
GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH,
|
||||||
GPIO97_KP_MKIN_3,
|
GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH,
|
||||||
GPIO103_KP_MKOUT_0,
|
GPIO103_KP_MKOUT_0,
|
||||||
GPIO104_KP_MKOUT_1,
|
GPIO104_KP_MKOUT_1,
|
||||||
GPIO105_KP_MKOUT_2,
|
GPIO105_KP_MKOUT_2,
|
||||||
|
@ -458,6 +458,33 @@ static struct pxafb_mach_info palmtx_lcd_screen = {
|
||||||
.lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
|
.lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* 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 palmtx_pm_init(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
/* this is where the bootloader jumps */
|
||||||
|
addr = phys_to_virt(PALMTX_STR_BASE);
|
||||||
|
|
||||||
|
for (i = 0; i < 3; i++)
|
||||||
|
addr[i] = resume[i];
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
device_initcall(palmtx_pm_init);
|
||||||
|
#endif
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Machine init
|
* Machine init
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
|
@ -828,6 +828,17 @@ void __init reserve_node_zero(pg_data_t *pgdat)
|
||||||
BOOTMEM_DEFAULT);
|
BOOTMEM_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (machine_is_palmld() || machine_is_palmtx()) {
|
||||||
|
reserve_bootmem_node(pgdat, 0xa0000000, 0x1000,
|
||||||
|
BOOTMEM_EXCLUSIVE);
|
||||||
|
reserve_bootmem_node(pgdat, 0xa0200000, 0x1000,
|
||||||
|
BOOTMEM_EXCLUSIVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (machine_is_palmt5())
|
||||||
|
reserve_bootmem_node(pgdat, 0xa0200000, 0x1000,
|
||||||
|
BOOTMEM_EXCLUSIVE);
|
||||||
|
|
||||||
#ifdef CONFIG_SA1111
|
#ifdef CONFIG_SA1111
|
||||||
/*
|
/*
|
||||||
* Because of the SA1111 DMA bug, we want to preserve our
|
* Because of the SA1111 DMA bug, we want to preserve our
|
||||||
|
|
Loading…
Reference in a new issue