diff options
author | Mark Jackson <mpfj-list@mimc.co.uk> | 2013-03-05 10:13:40 +0000 |
---|---|---|
committer | Jon Hunter <jon-hunter@ti.com> | 2013-04-01 14:53:34 -0500 |
commit | c9fb80942444e57c75fb26c27fd77961f9ba2570 (patch) | |
tree | ddf28cbeb430b237557b6aa99adc34e5be42136d /arch/arm/mach-omap2/gpmc.c | |
parent | dca3a783400a18e2bf4503b1d4a85c4d0ca1a7e4 (diff) | |
download | linux-c9fb80942444e57c75fb26c27fd77961f9ba2570.tar.gz |
ARM: OMAP: Clear GPMC bits when applying new setting.
When setting the GPMC device type, make sure any previous bits are cleared down, before applying the new setting. For OMAP4+ devices MUXADDDATA is a 2-bit field (bits 9:8) where as for OMAP2/3 devices it was only a one bit field (bit 9). For OMAP2/3 devices bit 8 is reserved and the OMAP documentation says to write a 0 to this bit. So clearing bit 8 on OMAP2/3 devices should not be a problem. Hence update the code to handle both bits 8 and 9 for all devices. Signed-off-by: Mark Jackson <mpfj@newflow.co.uk> [jon-hunter@ti.com: updated changelog] Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/gpmc.c')
-rw-r--r-- | arch/arm/mach-omap2/gpmc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 6de31739b45c..98c5d413209e 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 4 target bits */ + regval &= ~(GPMC_CONFIG1_DEVICETYPE(3) | + GPMC_CONFIG1_MUXTYPE(3)); + /* set the proper value */ regval |= GPMC_CONFIG1_DEVICETYPE(wval); if (wval == GPMC_DEVICETYPE_NOR) regval |= GPMC_CONFIG1_MUXADDDATA; |