FB: sa11x0: fix shannon GPSR/GPCR accesses
authorRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 18 Jan 2012 13:47:14 +0000 (13:47 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 21 Feb 2012 11:56:21 +0000 (11:56 +0000)
The GPIO set and clear registers should only be written, rather than
read, modified, and written.  A read-modify-write will have undesired
side effects.

Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/video/sa1100fb.c

index b644f0f1268cea33ce95518491178c938b2493f3..f3f55eb61ca132ae2933fabe389bd7c523755133 100644 (file)
@@ -798,7 +798,7 @@ static void sa1100fb_enable_controller(struct sa1100fb_info *fbi)
 
        if (machine_is_shannon()) {
                GPDR |= SHANNON_GPIO_DISP_EN;
-               GPSR |= SHANNON_GPIO_DISP_EN;
+               GPSR = SHANNON_GPIO_DISP_EN;
        }
 
        dev_dbg(fbi->dev, "DBAR1 = 0x%08lx\n", DBAR1);
@@ -816,7 +816,7 @@ static void sa1100fb_disable_controller(struct sa1100fb_info *fbi)
        dev_dbg(fbi->dev, "Disabling LCD controller\n");
 
        if (machine_is_shannon()) {
-               GPCR |= SHANNON_GPIO_DISP_EN;
+               GPCR = SHANNON_GPIO_DISP_EN;
        }       
 
        set_current_state(TASK_UNINTERRUPTIBLE);