summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/gpmc.h
diff options
context:
space:
mode:
authorMark Jackson <mpfj-list@mimc.co.uk>2013-03-05 10:13:40 (GMT)
committerJon Hunter <jon-hunter@ti.com>2013-04-01 19:53:34 (GMT)
commitc9fb80942444e57c75fb26c27fd77961f9ba2570 (patch)
treeddf28cbeb430b237557b6aa99adc34e5be42136d /arch/arm/mach-omap2/gpmc.h
parentdca3a783400a18e2bf4503b1d4a85c4d0ca1a7e4 (diff)
downloadlinux-fsl-qoriq-c9fb80942444e57c75fb26c27fd77961f9ba2570.tar.xz
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.h')
-rw-r--r--arch/arm/mach-omap2/gpmc.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/gpmc.h b/arch/arm/mach-omap2/gpmc.h
index fe0a844..f79cbde 100644
--- a/arch/arm/mach-omap2/gpmc.h
+++ b/arch/arm/mach-omap2/gpmc.h
@@ -58,7 +58,10 @@
#define GPMC_CONFIG1_DEVICESIZE_16 GPMC_CONFIG1_DEVICESIZE(1)
#define GPMC_CONFIG1_DEVICETYPE(val) ((val & 3) << 10)
#define GPMC_CONFIG1_DEVICETYPE_NOR GPMC_CONFIG1_DEVICETYPE(0)
-#define GPMC_CONFIG1_MUXADDDATA (1 << 9)
+#define GPMC_CONFIG1_MUXTYPE(val) ((val & 3) << 8)
+#define GPMC_CONFIG1_MUXNONMUX GPMC_CONFIG1_MUXTYPE(0)
+#define GPMC_CONFIG1_MUXAAD GPMC_CONFIG1_MUXTYPE(1)
+#define GPMC_CONFIG1_MUXADDDATA GPMC_CONFIG1_MUXTYPE(2)
#define GPMC_CONFIG1_TIME_PARA_GRAN (1 << 4)
#define GPMC_CONFIG1_FCLK_DIV(val) (val & 3)
#define GPMC_CONFIG1_FCLK_DIV2 (GPMC_CONFIG1_FCLK_DIV(1))