ARM: OMAP2+: gpmc: Fix writing in gpmc_cs_set_memconf
authorSemen Protsenko <semen.protsenko@globallogic.com>
Sat, 24 Jan 2015 20:28:38 +0000 (22:28 +0200)
committerRoger Quadros <rogerq@ti.com>
Wed, 25 Feb 2015 10:47:32 +0000 (12:47 +0200)
Some GPMC_CONFIG7 register bits marked as "RESERVED", means they
shouldn't be overwritten. A typical approach to handle such bits called
"Read-Modify-Write". Writing procedure used in gpmc_cs_set_memconf()
utilizes RMW technique, but implemented incorrectly. Due to obvious typo
in code read register value is being rewritten by another value, which
leads to loss of read RESERVED bits. This patch fixes this.

While at it, replace magic numbers with named constants to improve code
readability.

Signed-off-by: Semen Protsenko <semen.protsenko@globallogic.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>

No differences found