Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 355101
b: refs/heads/master
c: d107a20
h: refs/heads/master
i:
  355099: bf35b03
v: v3
  • Loading branch information
Igor Grinberg authored and Haojian Zhuang committed Jan 23, 2013
1 parent 3943d67 commit 4045761
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 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: 6a639bb83b751bfed61be13c0e3df17e5a970a94
refs/heads/master: d107a204154ddd79339203c2deeb7433f0cf6777
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-pxa/include/mach/smemc.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#define CSADRCFG1 (SMEMC_VIRT + 0x84) /* Address Configuration Register for CS1 */
#define CSADRCFG2 (SMEMC_VIRT + 0x88) /* Address Configuration Register for CS2 */
#define CSADRCFG3 (SMEMC_VIRT + 0x8C) /* Address Configuration Register for CS3 */
#define CSMSADRCFG (SMEMC_VIRT + 0xA0) /* Chip Select Configuration Register */

/*
* More handy macros for PCMCIA
Expand Down
15 changes: 14 additions & 1 deletion trunk/arch/arm/mach-pxa/smemc.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ static void pxa3xx_smemc_resume(void)
__raw_writel(csadrcfg[1], CSADRCFG1);
__raw_writel(csadrcfg[2], CSADRCFG2);
__raw_writel(csadrcfg[3], CSADRCFG3);
/* CSMSADRCFG wakes up in its default state (0), so we need to set it */
__raw_writel(0x2, CSMSADRCFG);
}

static struct syscore_ops smemc_syscore_ops = {
Expand All @@ -49,8 +51,19 @@ static struct syscore_ops smemc_syscore_ops = {

static int __init smemc_init(void)
{
if (cpu_is_pxa3xx())
if (cpu_is_pxa3xx()) {
/*
* The only documentation we have on the
* Chip Select Configuration Register (CSMSADRCFG) is that
* it must be programmed to 0x2.
* Moreover, in the bit definitions, the second bit
* (CSMSADRCFG[1]) is called "SETALWAYS".
* Other bits are reserved in this register.
*/
__raw_writel(0x2, CSMSADRCFG);

register_syscore_ops(&smemc_syscore_ops);
}

return 0;
}
Expand Down

0 comments on commit 4045761

Please sign in to comment.