Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
* [PATCH] ARM: OMAP: Clear GPMC bits when applying new setting
@ 2013-02-06 14:15 Mark Jackson
  2013-02-06 14:32 ` Felipe Balbi
  2013-02-06 14:39 ` Jon Hunter
  0 siblings, 2 replies; 4+ messages in thread
From: Mark Jackson @ 2013-02-06 14:15 UTC (permalink / raw)
  To: linux-omap@vger.kernel.org

When setting the GPMC device type, make sure any previous
bits are cleared down, before applying the new setting.

Signed-off-by: Mark Jackson <mpfj@newflow.co.uk>
---
 arch/arm/mach-omap2/gpmc.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 1adb2d4..026e786 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -613,6 +613,10 @@ int gpmc_cs_configure(int cs, int cmd, int wval)

 	case GPMC_CONFIG_DEV_TYPE:
 		regval  = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
+		/* clear 3 target bits */
+		regval &= ~(GPMC_CONFIG1_DEVICETYPE(3) |
+			    GPMC_CONFIG1_MUXADDDATA);
+		/* set the proper value */
 		regval |= GPMC_CONFIG1_DEVICETYPE(wval);
 		if (wval == GPMC_DEVICETYPE_NOR)
 			regval |= GPMC_CONFIG1_MUXADDDATA;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-03-04 17:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-06 14:15 [PATCH] ARM: OMAP: Clear GPMC bits when applying new setting Mark Jackson
2013-02-06 14:32 ` Felipe Balbi
2013-02-06 14:39 ` Jon Hunter
2013-03-04 17:37   ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox