From: Michal Simek Date: Wed, 2 Jan 2013 15:20:51 +0000 (+0100) Subject: block: systemace: Fix incorrect ace_write for width 16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fd74cbd21d6d844b74119fd3b64f226312803f37;p=thirdparty%2Fu-boot.git block: systemace: Fix incorrect ace_write for width 16 Current implementation works fine for bus width = 16 bits because we never get into "if" branch. If one sets width to 8 bits there will be 2 consequent data accesses write: 1. Correct data access for 8-bit bus 2. Unconditional (and in this case incorrect) data access as if data bus is 16-bit wide Signed-off-by: Alexey Brodkin Signed-off-by: Michal Simek --- diff --git a/drivers/block/systemace.c b/drivers/block/systemace.c index 247cf060e43..b1a3914cc38 100644 --- a/drivers/block/systemace.c +++ b/drivers/block/systemace.c @@ -65,8 +65,8 @@ static void ace_writew(u16 val, unsigned off) writeb(val, base + off); writeb(val >> 8, base + off + 1); #endif - } - out16(base + off, val); + } else + out16(base + off, val); } static u16 ace_readw(unsigned off)