From: Wolfgang Denk Date: Tue, 05 Jan 2010 08:35:06 +0100 Subject: [U-Boot] NS16550 Register structure In-Reply-To: <2A3DCF3DA181AD40BDE86A3150B27B6B03094B2982@dbde02.ent.ti.com> References: <1261554276-20449-1-git-send-email-sudhakar.raj@ti.com> <4B34F231.9000703@googlemail.com> <02f601ca8d22$c42c6a10$4c853e30$@raj@ti.com> <201001050101.51510.vapier@gentoo.org> <2A3DCF3DA181AD40BDE86A3150B27B6B03094B2982@dbde02.ent.ti.com> Message-ID: <20100105073506.92E46EA195D@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 "Pedanekar, Hemant", In message <2A3DCF3DA181AD40BDE86A3150B27B6B03094B2982@dbde02.ent.ti.com> you wrote: > > I have observed that in the recent commit (file include/ns16550.h), the ns16550 UART register structure declaration is changed so that irrespective of the CONFIG_SYS_NS16550_REG_SIZE setting the register access will be done at byte level. This seems to be working on all systems so far, which is not so much of a surprise as the registers are 8 bit wide only. > This crates problem when UART space access is required to be word-aligned. I am particularly referring to DaVinci DM6467, where STRB over UART register space is not supported and requires 32-bit access (L/STR). Please make sure to use exact terms. Alignment is one thing, and bus width is another one. Alignment can be easily adjusted using the prepad_* or postpad_* settings. > If I go ahead and add a specific handling in ns16550.h file (structure register members as "long"), I would end up making code similar to the one earlier to last commit. Is there a better way to handle such case? No such changes should be needed, as far as I understand the code. 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 In theory, there is no difference between theory and practice. In practice, however, there is.