Skip to contentSkip to conversation

ARM: mxc: platform-mxc-mmc: Fix register region size

PATCH New Fabio Estevam 2 participants 2 messages Oct 9, 2012 – Oct 10, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: mxc: platform-mxc-mmc: Fix register region size

Do not hardcode the register region to SZ_4K as this is not correct for mx31.

Use data->iosize instead which works for both mx27 and mx31 cases.

---
 arch/arm/plat-mxc/devices/platform-mxc-mmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/plat-mxc/devices/platform-mxc-mmc.c +1 -1
index 540d3a7..e7b920b 100644
@@ -55,7 +55,7 @@ struct platform_device *__init imx_add_mxc_mmc(
 	struct resource res[] = {
 		{
 			.start = data->iobase,
-			.end = data->iobase + SZ_4K - 1,
+			.end = data->iobase + data->iosize - 1,
 			.flags = IORESOURCE_MEM,
 		}, {
 			.start = data->irq,
Signature · 1 line
1.7.9.5
maintainer Applied
#1 lore raw

PATCH 1/1 ARM: mxc: platform-mxc-mmc: Fix register region size

Quoted 5 lines · Fabio Estevam

Do not hardcode the register region to SZ_4K as this is not correct for mx31.

Use data->iosize instead which works for both mx27 and mx31 cases.

Applied, thanks

Sascha

Quoted 22 lines
---
 arch/arm/plat-mxc/devices/platform-mxc-mmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/plat-mxc/devices/platform-mxc-mmc.c +1 -1
index 540d3a7..e7b920b 100644
@@ -55,7 +55,7 @@ struct platform_device *__init imx_add_mxc_mmc(
 	struct resource res[] = {
 		{
 			.start = data->iobase,
-			.end = data->iobase + SZ_4K - 1,
+			.end = data->iobase + data->iosize - 1,
 			.flags = IORESOURCE_MEM,
 		}, {
 			.start = data->irq,
Signature · 1 line
1.7.9.5
Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |