From: Wolfgang Denk Date: Wed, 02 Jan 2013 21:26:00 +0100 Subject: [U-Boot] [PATCH] drivers/block/systemace: fixes read/write words for bus width = 8 In-Reply-To: <1357137512-8618-1-git-send-email-alexey.brodkin@gmail.com> References: <1357137512-8618-1-git-send-email-alexey.brodkin@gmail.com> Message-ID: <20130102202600.83A3920035D@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Alexey Brodkin, In message <1357137512-8618-1-git-send-email-alexey.brodkin@gmail.com> you wrote: > From: Alexey Brodkin > > 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 > (read/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 Sorry, I don't get this. You say, if one sets width to 8 bits, then the code fails when the bus is actually 16 bits wide? But this is just a bad configuration then - why do we need to change the code? All that is needed is to run with a correct configuration? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Real programmers can write assembly code in any language. :-) - Larry Wall in <8571@jpl-devvax.JPL.NASA.GOV>