From: Wolfgang Denk Date: Sat, 10 Mar 2012 09:16:20 +0100 Subject: [U-Boot] [PATCH v2 3/4] tegra: Implement pre-console putc() for fdt warning In-Reply-To: <1331325178-14634-3-git-send-email-sjg@chromium.org> References: <1331325178-14634-1-git-send-email-sjg@chromium.org> <1331325178-14634-3-git-send-email-sjg@chromium.org> Message-ID: <20120310081620.CB434202C07@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 Simon Glass, In message <1331325178-14634-3-git-send-email-sjg@chromium.org> you wrote: > When there is not device tree file available to U-Boot, we panic. > Implement board_pre_console_putc() so that this panic will be displayed > on the serial console. ... > +void board_pre_console_putc(int ch) > +{ ... > + for (uart_addr = uart_reg_addr; *uart_addr; uart_addr++) { > + NS16550_t regs = (NS16550_t)*uart_addr; > + > + NS16550_init(regs, divisor); > + NS16550_putc(regs, ch); > + if (ch == '\n') > + NS16550_putc(regs, '\r'); > + NS16550_drain(regs); Why is this needed for every output character? Actually, why is it needed at all? 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 All a hacker needs is a tight PUSHJ, a loose pair of UUOs, and a warm place to shift.