* [PATCH 1/2] lite5200: add dts descriptions for onboard I2C eeprom and flash
@ 2010-06-11 11:52 Dmitry Eremin-Solenikov
2010-06-11 11:52 ` [PATCH 2/2] mpc52xx: fix oops during going to standby Dmitry Eremin-Solenikov
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Eremin-Solenikov @ 2010-06-11 11:52 UTC (permalink / raw)
To: linuxppc-dev
Add dts descriptions for onboard 256 byte I2C eeprom (pcf8582C-2)
and 16MB NOR flash (am29lv652d).
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
---
arch/powerpc/boot/dts/lite5200.dts | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts
index 2b64d8e..da1dafb 100644
--- a/arch/powerpc/boot/dts/lite5200.dts
+++ b/arch/powerpc/boot/dts/lite5200.dts
@@ -255,6 +255,12 @@
compatible = "fsl,mpc5200-i2c","fsl-i2c";
reg = <0x3d40 0x40>;
interrupts = <2 16 0>;
+
+ eeprom@50 {
+ compatible = "nxp,pcf8582c", "at24,24c02";
+ reg = <0x50>;
+ };
+
};
sram@8000 {
compatible = "fsl,mpc5200-sram";
@@ -281,4 +287,22 @@
0x02000000 0 0xa0000000 0xa0000000 0 0x10000000
0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
};
+
+ localbus {
+ compatible = "fsl,mpc5200b-lpb","fsl,mpc5200-lpb","simple-bus";
+
+ #address-cells = <2>;
+ #size-cells = <1>;
+
+ ranges = <0 0 0xff000000 0x00000000>;
+
+ flash@0,00000000 {
+ compatible = "amd,am29lv652d", "cfi-flash";
+ reg = <0 0x00000000 0x01000000>;
+ bank-width = <1>;
+ #size-cells = <1>;
+ #address-cells = <1>;
+ };
+ };
+
};
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] mpc52xx: fix oops during going to standby
2010-06-11 11:52 [PATCH 1/2] lite5200: add dts descriptions for onboard I2C eeprom and flash Dmitry Eremin-Solenikov
@ 2010-06-11 11:52 ` Dmitry Eremin-Solenikov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Eremin-Solenikov @ 2010-06-11 11:52 UTC (permalink / raw)
To: linuxppc-dev
When going to standby mode mpc code maps the whole soc5200 node
to access warious MBAR registers. However as of_iomap uses 'reg'
property of device node, only small part of MBAR is getting mapped.
Thus pm code gets oops when trying to access high parts of MBAR.
As a way to overcome this, make mpc52xx_pm_prepare() explicitly
map whole MBAR (0xc0000).
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
---
arch/powerpc/platforms/52xx/mpc52xx_pm.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pm.c b/arch/powerpc/platforms/52xx/mpc52xx_pm.c
index a55b0b6..7672253 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pm.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pm.c
@@ -64,10 +64,19 @@ int mpc52xx_pm_prepare(void)
{ .type = "builtin", .compatible = "mpc5200", }, /* efika */
{}
};
+ struct resource res;
/* map the whole register space */
np = of_find_matching_node(NULL, immr_ids);
- mbar = of_iomap(np, 0);
+
+ if (of_address_to_resource(np, 0, &res)) {
+ pr_err("mpc52xx_pm_prepare(): could not get IMMR address\n");
+ of_node_put(np);
+ return -ENOSYS;
+ }
+
+ mbar = ioremap(res.start, 0xc000); /* we should map whole region including SRAM */
+
of_node_put(np);
if (!mbar) {
pr_err("mpc52xx_pm_prepare(): could not map registers\n");
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-11 11:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-11 11:52 [PATCH 1/2] lite5200: add dts descriptions for onboard I2C eeprom and flash Dmitry Eremin-Solenikov
2010-06-11 11:52 ` [PATCH 2/2] mpc52xx: fix oops during going to standby Dmitry Eremin-Solenikov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).