aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-pxa/include/mach/lubbock.h1
-rw-r--r--arch/arm/mach-pxa/include/mach/pm.h10
-rw-r--r--arch/arm/mach-pxa/lubbock.c7
-rw-r--r--arch/arm/mach-pxa/pm.c13
4 files changed, 20 insertions, 11 deletions
diff --git a/arch/arm/mach-pxa/include/mach/lubbock.h b/arch/arm/mach-pxa/include/mach/lubbock.h
index 4cb24154a5a8..751b74811d0f 100644
--- a/arch/arm/mach-pxa/include/mach/lubbock.h
+++ b/arch/arm/mach-pxa/include/mach/lubbock.h
@@ -25,7 +25,6 @@
25 25
26/* FPGA register virtual addresses */ 26/* FPGA register virtual addresses */
27#define LUB_WHOAMI __LUB_REG(LUBBOCK_FPGA_PHYS + 0x000) 27#define LUB_WHOAMI __LUB_REG(LUBBOCK_FPGA_PHYS + 0x000)
28#define LUB_HEXLED __LUB_REG(LUBBOCK_FPGA_PHYS + 0x010)
29#define LUB_DISC_BLNK_LED __LUB_REG(LUBBOCK_FPGA_PHYS + 0x040) 28#define LUB_DISC_BLNK_LED __LUB_REG(LUBBOCK_FPGA_PHYS + 0x040)
30#define LUB_CONF_SWITCHES __LUB_REG(LUBBOCK_FPGA_PHYS + 0x050) 29#define LUB_CONF_SWITCHES __LUB_REG(LUBBOCK_FPGA_PHYS + 0x050)
31#define LUB_USER_SWITCHES __LUB_REG(LUBBOCK_FPGA_PHYS + 0x060) 30#define LUB_USER_SWITCHES __LUB_REG(LUBBOCK_FPGA_PHYS + 0x060)
diff --git a/arch/arm/mach-pxa/include/mach/pm.h b/arch/arm/mach-pxa/include/mach/pm.h
index 83342469acac..a6eeef8a075f 100644
--- a/arch/arm/mach-pxa/include/mach/pm.h
+++ b/arch/arm/mach-pxa/include/mach/pm.h
@@ -27,3 +27,13 @@ extern void pxa27x_cpu_suspend(unsigned int);
27extern void pxa_cpu_resume(void); 27extern void pxa_cpu_resume(void);
28 28
29extern int pxa_pm_enter(suspend_state_t state); 29extern int pxa_pm_enter(suspend_state_t state);
30
31/* NOTE: this is for PM debugging on Lubbock, it's really a big
32 * ugly, but let's keep the crap minimum here, instead of direct
33 * accessing the LUBBOCK CPLD registers in arch/arm/mach-pxa/pm.c
34 */
35#ifdef CONFIG_ARCH_LUBBOCK
36extern void lubbock_set_hexled(uint32_t value);
37#else
38#define lubbock_set_hexled(x)
39#endif
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index 03a43ea148a9..f04c8333dff7 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -49,6 +49,7 @@
49#include <mach/irda.h> 49#include <mach/irda.h>
50#include <mach/pxafb.h> 50#include <mach/pxafb.h>
51#include <mach/mmc.h> 51#include <mach/mmc.h>
52#include <mach/pm.h>
52 53
53#include "generic.h" 54#include "generic.h"
54#include "clock.h" 55#include "clock.h"
@@ -112,8 +113,14 @@ static unsigned long lubbock_pin_config[] __initdata = {
112 GPIO1_GPIO | WAKEUP_ON_EDGE_RISE, 113 GPIO1_GPIO | WAKEUP_ON_EDGE_RISE,
113}; 114};
114 115
116#define LUB_HEXLED __LUB_REG(LUBBOCK_FPGA_PHYS + 0x010)
115#define LUB_MISC_WR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x080) 117#define LUB_MISC_WR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x080)
116 118
119void lubbock_set_hexled(uint32_t value)
120{
121 LUB_HEXLED = value;
122}
123
117void lubbock_set_misc_wr(unsigned int mask, unsigned int set) 124void lubbock_set_misc_wr(unsigned int mask, unsigned int set)
118{ 125{
119 unsigned long flags; 126 unsigned long flags;
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c
index 164eb0bb6321..884b174c8ead 100644
--- a/arch/arm/mach-pxa/pm.c
+++ b/arch/arm/mach-pxa/pm.c
@@ -14,15 +14,8 @@
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/suspend.h> 15#include <linux/suspend.h>
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/time.h>
18 17
19#include <mach/hardware.h>
20#include <asm/memory.h>
21#include <asm/system.h>
22#include <mach/pm.h> 18#include <mach/pm.h>
23#include <mach/pxa-regs.h>
24#include <mach/lubbock.h>
25#include <asm/mach/time.h>
26 19
27struct pxa_cpu_pm_fns *pxa_cpu_pm_fns; 20struct pxa_cpu_pm_fns *pxa_cpu_pm_fns;
28static unsigned long *sleep_save; 21static unsigned long *sleep_save;
@@ -57,9 +50,9 @@ int pxa_pm_enter(suspend_state_t state)
57 50
58 /* if invalid, display message and wait for a hardware reset */ 51 /* if invalid, display message and wait for a hardware reset */
59 if (checksum != sleep_save_checksum) { 52 if (checksum != sleep_save_checksum) {
60#ifdef CONFIG_ARCH_LUBBOCK 53
61 LUB_HEXLED = 0xbadbadc5; 54 lubbock_set_hexled(0xbadbadc5);
62#endif 55
63 while (1) 56 while (1)
64 pxa_cpu_pm_fns->enter(state); 57 pxa_cpu_pm_fns->enter(state);
65 } 58 }