[PATCH 10/9] Small updates for Freescale MPC52xx - Late one ...

From: Sylvain Munaut
Date: Wed Sep 15 2004 - 15:53:42 EST


Hello

Sorry for this late one, I just got it and it belongs with the others.
I've added it to the bk tree I sent earlier ( bk://bkbits.246tNt.com/linux-2.5-mpc52xx-pending )
so please pull from that tree.

The unified diff along with the patch description is below.

Thanks,

Sylvain



# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/09/15 22:03:38+02:00 tnt@xxxxxxxxxx
# ppc: Fix output of low-level serial debug on Freescale MPC52xx
# # Thanks to Roger Blofeld for pointing that out.
# # Signed-off-by: Sylvain Munaut <tnt@xxxxxxxxxx>
#
# arch/ppc/syslib/mpc52xx_setup.c
# 2004/09/15 22:02:23+02:00 tnt@xxxxxxxxxx +14 -10
# ppc: Fix output of low-level serial debug on Freescale MPC52xx
#
diff -Nru a/arch/ppc/syslib/mpc52xx_setup.c b/arch/ppc/syslib/mpc52xx_setup.c
--- a/arch/ppc/syslib/mpc52xx_setup.c 2004-09-15 22:36:07 +02:00
+++ b/arch/ppc/syslib/mpc52xx_setup.c 2004-09-15 22:36:07 +02:00
@@ -100,24 +100,28 @@
#error "mpc52xx PSC for console not selected"
#endif

+static void
+mpc52xx_psc_putc(struct mpc52xx_psc * psc, unsigned char c)
+{
+ while (!(in_be16(&psc->mpc52xx_psc_status) &
+ MPC52xx_PSC_SR_TXRDY));
+ out_8(&psc->mpc52xx_psc_buffer_8, c);
+}
+
void
mpc52xx_progress(char *s, unsigned short hex)
{
struct mpc52xx_psc *psc = (struct mpc52xx_psc *)MPC52xx_CONSOLE;
char c;

- /* Don't we need to disable serial interrupts ? */
- while ((c = *s++) != 0) {
- if (c == '\n') {
- while (!(in_be16(&psc->mpc52xx_psc_status) &
- MPC52xx_PSC_SR_TXRDY)) ;
- out_8(&psc->mpc52xx_psc_buffer_8, '\r');
- }
- while (!(in_be16(&psc->mpc52xx_psc_status) &
- MPC52xx_PSC_SR_TXRDY)) ;
- out_8(&psc->mpc52xx_psc_buffer_8, c);
+ if (c == '\n')
+ mpc52xx_psc_putc(psc, '\r');
+ mpc52xx_psc_putc(psc, c);
}
+
+ mpc52xx_psc_putc(psc, '\r');
+ mpc52xx_psc_putc(psc, '\n');
}

#endif /* CONFIG_SERIAL_TEXT_DEBUG */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/