Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137196
b: refs/heads/master
c: 5438614
h: refs/heads/master
v: v3
  • Loading branch information
Eric Miao committed Mar 9, 2009
1 parent 2ff229e commit aec6647
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b393c69652333be31ad7a8205761c0d5b7f3e167
refs/heads/master: 5438614509d80bc0b1981b749e9cb688f1769dfb
1 change: 0 additions & 1 deletion trunk/arch/arm/mach-pxa/include/mach/lubbock.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

/* FPGA register virtual addresses */
#define LUB_WHOAMI __LUB_REG(LUBBOCK_FPGA_PHYS + 0x000)
#define LUB_HEXLED __LUB_REG(LUBBOCK_FPGA_PHYS + 0x010)
#define LUB_DISC_BLNK_LED __LUB_REG(LUBBOCK_FPGA_PHYS + 0x040)
#define LUB_CONF_SWITCHES __LUB_REG(LUBBOCK_FPGA_PHYS + 0x050)
#define LUB_USER_SWITCHES __LUB_REG(LUBBOCK_FPGA_PHYS + 0x060)
Expand Down
10 changes: 10 additions & 0 deletions trunk/arch/arm/mach-pxa/include/mach/pm.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,13 @@ extern void pxa27x_cpu_suspend(unsigned int);
extern void pxa_cpu_resume(void);

extern int pxa_pm_enter(suspend_state_t state);

/* NOTE: this is for PM debugging on Lubbock, it's really a big
* ugly, but let's keep the crap minimum here, instead of direct
* accessing the LUBBOCK CPLD registers in arch/arm/mach-pxa/pm.c
*/
#ifdef CONFIG_ARCH_LUBBOCK
extern void lubbock_set_hexled(uint32_t value);
#else
#define lubbock_set_hexled(x)
#endif
7 changes: 7 additions & 0 deletions trunk/arch/arm/mach-pxa/lubbock.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#include <mach/irda.h>
#include <mach/pxafb.h>
#include <mach/mmc.h>
#include <mach/pm.h>

#include "generic.h"
#include "clock.h"
Expand Down Expand Up @@ -112,8 +113,14 @@ static unsigned long lubbock_pin_config[] __initdata = {
GPIO1_GPIO | WAKEUP_ON_EDGE_RISE,
};

#define LUB_HEXLED __LUB_REG(LUBBOCK_FPGA_PHYS + 0x010)
#define LUB_MISC_WR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x080)

void lubbock_set_hexled(uint32_t value)
{
LUB_HEXLED = value;
}

void lubbock_set_misc_wr(unsigned int mask, unsigned int set)
{
unsigned long flags;
Expand Down
13 changes: 3 additions & 10 deletions trunk/arch/arm/mach-pxa/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,8 @@
#include <linux/module.h>
#include <linux/suspend.h>
#include <linux/errno.h>
#include <linux/time.h>

#include <mach/hardware.h>
#include <asm/memory.h>
#include <asm/system.h>
#include <mach/pm.h>
#include <mach/pxa-regs.h>
#include <mach/lubbock.h>
#include <asm/mach/time.h>

struct pxa_cpu_pm_fns *pxa_cpu_pm_fns;
static unsigned long *sleep_save;
Expand Down Expand Up @@ -57,9 +50,9 @@ int pxa_pm_enter(suspend_state_t state)

/* if invalid, display message and wait for a hardware reset */
if (checksum != sleep_save_checksum) {
#ifdef CONFIG_ARCH_LUBBOCK
LUB_HEXLED = 0xbadbadc5;
#endif

lubbock_set_hexled(0xbadbadc5);

while (1)
pxa_cpu_pm_fns->enter(state);
}
Expand Down

0 comments on commit aec6647

Please sign in to comment.