ia64/xen-unstable

changeset 13845:7efb3a06c56a

[IA64] Don't assume legacy com2

If com1 isn't at a legacy I/O port address, don't assume legacy com2 exists.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild2.aw
date Tue Feb 06 15:20:26 2007 -0700 (2007-02-06)
parents 5b99d19906a7
children d3f08d39e695
files xen/arch/ia64/xen/xensetup.c
line diff
     1.1 --- a/xen/arch/ia64/xen/xensetup.c	Tue Feb 06 15:08:09 2007 -0700
     1.2 +++ b/xen/arch/ia64/xen/xensetup.c	Tue Feb 06 15:20:26 2007 -0700
     1.3 @@ -267,13 +267,16 @@ void start_kernel(void)
     1.4      early_setup_arch(&cmdline);
     1.5  
     1.6      /* We initialise the serial devices very early so we can get debugging. */
     1.7 -    if (running_on_sim) hpsim_serial_init();
     1.8 +    if (running_on_sim)
     1.9 +        hpsim_serial_init();
    1.10      else {
    1.11 -	ns16550_init(0, &ns16550_com1);
    1.12 -	/* Also init com2 for Tiger4. */
    1.13 -	ns16550_com2.io_base = 0x2f8;
    1.14 -	ns16550_com2.irq     = 3;
    1.15 -	ns16550_init(1, &ns16550_com2);
    1.16 +        ns16550_init(0, &ns16550_com1);
    1.17 +        if (ns16550_com1.io_base == 0x3f8) {
    1.18 +            /* Also init com2 for Tiger4. */
    1.19 +            ns16550_com2.io_base = 0x2f8;
    1.20 +            ns16550_com2.irq     = 3;
    1.21 +            ns16550_init(1, &ns16550_com2);
    1.22 +        }
    1.23      }
    1.24      serial_init_preirq();
    1.25