diff options
author | Alexey Brodkin <alexey.brodkin@gmail.com> | 2013-01-03 13:35:23 +0400 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2013-02-04 12:07:08 +0100 |
commit | 7cde9f35d6753d17348512e944f0fe5c31af0acf (patch) | |
tree | 885a1497077b8a046d68572a1c15262f25022fef /drivers/block | |
parent | 6ad77d88e57f6ab815ec7e85c5ac329054318c73 (diff) | |
download | u-boot-imx-7cde9f35d6753d17348512e944f0fe5c31af0acf.zip u-boot-imx-7cde9f35d6753d17348512e944f0fe5c31af0acf.tar.gz u-boot-imx-7cde9f35d6753d17348512e944f0fe5c31af0acf.tar.bz2 |
block: systemace: Added missing "else" in "ace_writew"
System ACE compact flash controller supports either 8-bit (default) or
16-bit data transfers. And in corresponding driver we need to implement
read/write of 16-bit data words properly for both modes of operation.
In existing code if width==8 both branches get executed which may cause
unexpected behavior of SystemAce controller.
Addition of "else" fixes described issue and execution is done as
expected for both (8-bit and 16-bit) data bus widths.
Signed-off-by: Alexey Brodkin <alexey.brodkin@gmail.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/systemace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/systemace.c b/drivers/block/systemace.c index 247cf06..87c6cbc 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) |