diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2012-06-12 05:36:21 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-06-20 06:27:48 -0400 |
commit | d49679e5928709bce8937dce396458b139c4b34d (patch) | |
tree | 3f0a13a62525edd9474833a12184f48cbabe05a9 /arch/arm/mach-shmobile | |
parent | e2dcd461a7ba0c3deb44336136ea784c8b972292 (diff) |
ARM: shmobile: r8a7740: add MERAM work-around
r8a7740 chip has lasting errata on MERAM buffer, and this patch adds
its work-around on setup-r8a7740.c
It solved CEU/VIO6C/2D-DMAC/VCP1/VPU5F/JPU/DISP memroy access error.
But MERAM driver can't control this issue,
since this work-around requires access to non-MERAM register address.
So, This it will be called as board specific code at this point.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Simon Horman <horms@verge.net.au>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r-- | arch/arm/mach-shmobile/board-armadillo800eva.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7740.c | 18 |
3 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index 9e37026ef9dd..6e6839d0a2dc 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c | |||
@@ -587,6 +587,7 @@ static void __init eva_init(void) | |||
587 | eva_clock_init(); | 587 | eva_clock_init(); |
588 | 588 | ||
589 | r8a7740_pinmux_init(); | 589 | r8a7740_pinmux_init(); |
590 | r8a7740_meram_workaround(); | ||
590 | 591 | ||
591 | /* SCIFA1 */ | 592 | /* SCIFA1 */ |
592 | gpio_request(GPIO_FN_SCIFA1_RXD, NULL); | 593 | gpio_request(GPIO_FN_SCIFA1_RXD, NULL); |
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index 01e2bc014f15..45e61dada030 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h | |||
@@ -77,6 +77,7 @@ extern void r8a7779_add_standard_devices(void); | |||
77 | extern void r8a7779_clock_init(void); | 77 | extern void r8a7779_clock_init(void); |
78 | extern void r8a7779_pinmux_init(void); | 78 | extern void r8a7779_pinmux_init(void); |
79 | extern void r8a7779_pm_init(void); | 79 | extern void r8a7779_pm_init(void); |
80 | extern void r8a7740_meram_workaround(void); | ||
80 | 81 | ||
81 | extern unsigned int r8a7779_get_core_count(void); | 82 | extern unsigned int r8a7779_get_core_count(void); |
82 | extern int r8a7779_platform_cpu_kill(unsigned int cpu); | 83 | extern int r8a7779_platform_cpu_kill(unsigned int cpu); |
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index ec4eb49c1693..366311b3dc73 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c | |||
@@ -324,6 +324,24 @@ static struct platform_device *r8a7740_late_devices[] __initdata = { | |||
324 | &i2c1_device, | 324 | &i2c1_device, |
325 | }; | 325 | }; |
326 | 326 | ||
327 | /* | ||
328 | * r8a7740 chip has lasting errata on MERAM buffer. | ||
329 | * this is work-around for it. | ||
330 | * see | ||
331 | * "Media RAM (MERAM)" on r8a7740 documentation | ||
332 | */ | ||
333 | #define MEBUFCNTR 0xFE950098 | ||
334 | void r8a7740_meram_workaround(void) | ||
335 | { | ||
336 | void __iomem *reg; | ||
337 | |||
338 | reg = ioremap_nocache(MEBUFCNTR, 4); | ||
339 | if (reg) { | ||
340 | iowrite32(0x01600164, reg); | ||
341 | iounmap(reg); | ||
342 | } | ||
343 | } | ||
344 | |||
327 | #define ICCR 0x0004 | 345 | #define ICCR 0x0004 |
328 | #define ICSTART 0x0070 | 346 | #define ICSTART 0x0070 |
329 | 347 | ||