[PATCH] check comport existence for udbg
Mattias Engdegård
mattias at virtutech.se
Wed Jun 25 01:51:58 EST 2003
If no serial port is detected in the OF device tree, udbg_putc() will still
attempt to talk to an imaginary uart at physical address 0. This will likely
lead to a hang in udbg_putc(). This trivial patch prevents this by not
creating the ioremapping in that case.
--- chrp_setup.c~ Tue Jun 17 17:43:50 2003
+++ chrp_setup.c Tue Jun 24 17:37:05 2003
@@ -207,7 +207,9 @@
#endif
/* Map the uart for udbg. */
- comport = (void *)__ioremap(naca->serialPortAddr, 16, _PAGE_NO_CACHE);
+ if (naca->serialPortAddr)
+ comport = (void *)__ioremap(naca->serialPortAddr, 16,
+ _PAGE_NO_CACHE);
udbg_init_uart(comport);
ppc_md.udbg_putc = udbg_putc;
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list