From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Fainelli Date: Tue, 14 Oct 2008 18:04:03 +0200 Subject: [U-Boot] [PATCH] serial: add support for the OMRPv2 simple wishbone UART In-Reply-To: <20081014130814.1947E85EE126@gemini.denx.de> References: <200809241230.21624.florian.fainelli@openpattern.org> <20081014130814.1947E85EE126@gemini.denx.de> Message-ID: <200810141804.04940.florian.fainelli@openpattern.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Wolfgang, Le Tuesday 14 October 2008 15:08:14 Wolfgang Denk, vous avez ?crit?: > It seems ther eis no board in the mainline U-Boot code which uses this > driver. > > Do you plan to submit any board support that will actually use this > driver? Of course. I actually wanted to know about the good programming pratice before submitting it. > Accesses to device registers through volatile pointers are depre- > cated. Please use the respective accessor macros / functions instead. Ok, I could probably fixup the uartlite driver with another patch to use the proper accessors. I derived this driver from it. > That's to set the baud rate. This function seems to be missing in your > driver? Baudrate is hardcoded in the IP core because it is very simple and occupyiong only a few LUTs. I do not think I will have to change the baudrate ever. > Please write like this: > > while(IO_SERIAL_UCR & WUB_BUSY) > ; Ok. > > > +void serial_puts(const char * s) > > +{ > > + while (*s) { > > + serial_putc(*s++); > > + } > > No curly braces for a single line statement, please. > > > + while(!(IO_SERIAL_UCR & WUB_DR)); > > See above. > > This makes no sense to me - a header file which contains just a > single line include for another header file? I was following the uartlite/microblaze pratice, but that's right it does not make sense at all. Thank you very much for your comments, when board support is ready I will resubmit everything in separate patches. -- Cordialement, Florian Fainelli OpenPattern SARL - Lead software architect GSM: +33.632843955 109/111 rue des C?tes 78 600 Maisons-Laffitte ------------------------------ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20081014/233e4aee/attachment.pgp