From mboxrd@z Thu Jan 1 00:00:00 1970 From: Detlev Zundel Date: Fri, 03 Apr 2009 16:55:28 +0200 Subject: [U-Boot] [PATCH] include/ns16550.h: Unify structure declaration for registers In-Reply-To: <1238769946-30370-1-git-send-email-dzu@denx.de> (Detlev Zundel's message of "Fri, 3 Apr 2009 16:45:46 +0200") References: <1238769946-30370-1-git-send-email-dzu@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Detlev Zundel writes: > Instead of special casing the different access patterns, use common > code with light macros sprinkled in to accomodate for the different > layouts of the register structure. > > Note that this also changes the types of the registers for the > "positively packed (>1)" cases. As the registers truly are unsigned > chars, this is surely the Right Thing, but it is a semantic change. > Note that for this case depending on the endianness on the bus, we may > see a change of behaviour. > > Signed-off-by: Detlev Zundel > --- > include/ns16550.h | 130 +++++++++++++++-------------------------------------- > 1 files changed, 37 insertions(+), 93 deletions(-) I forgot to say, this patch depend on the previous cleanup patch sent earlier today (Rename-common-ns16550-constants-with-UART_-prefix). Cheers Detlev -- 1. What is the best thing about Unix? A: The community. 2. What is the worst thing about Unix? A: That there are so many communities. (Rob Pike) -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de