ia64/xen-unstable

changeset 3851:aa7e56a968b8

bitkeeper revision 1.1218 (4214eb5c50HeO5ayekYo8U0171lEmA)

mkbuildtree, setup.c:
update to match serial changes in common
serial.h:
new file
author djm@kirby.fc.hp.com
date Thu Feb 17 19:07:08 2005 +0000 (2005-02-17)
parents 0adffee5575c
children 4b951a7aca62
files .rootkeys xen/arch/ia64/patch/linux-2.6.7/setup.c xen/arch/ia64/tools/mkbuildtree xen/include/asm-ia64/serial.h
line diff
     1.1 --- a/.rootkeys	Thu Feb 17 11:53:11 2005 +0000
     1.2 +++ b/.rootkeys	Thu Feb 17 19:07:08 2005 +0000
     1.3 @@ -1087,6 +1087,7 @@ 421098b7dX_56NCV9zjftqm1yIqC8w xen/inclu
     1.4  421098b72bPUyviWloEAIB85dGCm2Q xen/include/asm-ia64/privop.h
     1.5  421098b7Z6OwjZnrTZkh34DoDfcjrA xen/include/asm-ia64/regionreg.h
     1.6  421098b707cY5YluUcWK5Pc-71ETVw xen/include/asm-ia64/regs.h
     1.7 +4214e2f3fbO_n9Z1kIcBR83d7W4OJw xen/include/asm-ia64/serial.h
     1.8  421098b7czhvyPGFa5nskL0N4vNvFw xen/include/asm-ia64/shadow.h
     1.9  421098b7GkWOnlzSmPvNAhByOSZ1Dw xen/include/asm-ia64/time.h
    1.10  421098b7FK3xgShpnH0I0Ou3O4fJ2Q xen/include/asm-ia64/tlb.h
     2.1 --- a/xen/arch/ia64/patch/linux-2.6.7/setup.c	Thu Feb 17 11:53:11 2005 +0000
     2.2 +++ b/xen/arch/ia64/patch/linux-2.6.7/setup.c	Thu Feb 17 19:07:08 2005 +0000
     2.3 @@ -1,5 +1,5 @@
     2.4 ---- /home/djm/src/xen/xeno-ia64.bk/xen/linux-2.6.7/arch/ia64/kernel/setup.c	2004-06-15 23:18:58.000000000 -0600
     2.5 -+++ /home/djm/src/xen/xeno-ia64.bk/xen/arch/ia64/setup.c	2004-11-11 17:08:30.000000000 -0700
     2.6 +--- /home/djm/linux-2.6.7/arch/ia64/kernel/setup.c	2004-06-15 23:18:58.000000000 -0600
     2.7 ++++ arch/ia64/setup.c	2005-02-17 10:53:00.000000000 -0700
     2.8  @@ -21,6 +21,9 @@
     2.9   #include <linux/init.h>
    2.10   
    2.11 @@ -58,7 +58,21 @@
    2.12   /*
    2.13    * Filter incoming memory segments based on the primitive map created from the boot
    2.14    * parameters. Segments contained in the map are removed from the memory ranges. A
    2.15 -@@ -285,7 +298,9 @@
    2.16 +@@ -280,23 +293,40 @@
    2.17 + }
    2.18 + #endif
    2.19 + 
    2.20 ++#ifdef XEN
    2.21 ++void __init
    2.22 ++early_setup_arch(void)
    2.23 ++{
    2.24 ++	efi_init();
    2.25 ++	io_port_init();
    2.26 ++}
    2.27 ++#endif
    2.28 ++
    2.29 + void __init
    2.30 + setup_arch (char **cmdline_p)
    2.31   {
    2.32   	unw_init();
    2.33   
    2.34 @@ -68,7 +82,13 @@
    2.35   
    2.36   	*cmdline_p = __va(ia64_boot_param->command_line);
    2.37   	strlcpy(saved_command_line, *cmdline_p, sizeof(saved_command_line));
    2.38 -@@ -297,6 +312,10 @@
    2.39 + 
    2.40 ++#ifndef XEN
    2.41 + 	efi_init();
    2.42 + 	io_port_init();
    2.43 ++#endif
    2.44 + 
    2.45 + #ifdef CONFIG_IA64_GENERIC
    2.46   	machvec_init(acpi_get_sysname());
    2.47   #endif
    2.48   
    2.49 @@ -79,7 +99,7 @@
    2.50   #ifdef CONFIG_ACPI_BOOT
    2.51   	/* Initialize the ACPI boot-time table parser */
    2.52   	acpi_table_init();
    2.53 -@@ -413,6 +432,9 @@
    2.54 +@@ -413,6 +443,9 @@
    2.55   		sprintf(cp, " 0x%lx", mask);
    2.56   	}
    2.57   
    2.58 @@ -89,7 +109,7 @@
    2.59   	seq_printf(m,
    2.60   		   "processor  : %d\n"
    2.61   		   "vendor     : %s\n"
    2.62 -@@ -667,6 +689,8 @@
    2.63 +@@ -667,6 +700,8 @@
    2.64   void
    2.65   check_bugs (void)
    2.66   {
     3.1 --- a/xen/arch/ia64/tools/mkbuildtree	Thu Feb 17 11:53:11 2005 +0000
     3.2 +++ b/xen/arch/ia64/tools/mkbuildtree	Thu Feb 17 19:07:08 2005 +0000
     3.3 @@ -226,7 +226,6 @@ softlink include/asm-ia64/rwsem.h includ
     3.4  softlink include/asm-ia64/scatterlist.h include/asm-ia64/scatterlist.h
     3.5  softlink include/asm-ia64/sections.h include/asm-ia64/sections.h
     3.6  softlink include/asm-ia64/semaphore.h include/asm-ia64/semaphore.h
     3.7 -softlink include/asm-ia64/serial.h include/asm-ia64/serial.h
     3.8  softlink include/asm-ia64/sigcontext.h include/asm-ia64/sigcontext.h
     3.9  softlink include/asm-ia64/signal.h include/asm-ia64/signal.h
    3.10  softlink include/asm-ia64/smp.h include/asm-ia64/smp.h
    3.11 @@ -241,6 +240,10 @@ softlink include/asm-ia64/unistd.h inclu
    3.12  softlink include/asm-ia64/unwind.h include/asm-ia64/unwind.h
    3.13  softlink include/asm-ia64/ustack.h include/asm-ia64/ustack.h
    3.14  
    3.15 +#rename this one because xen/include/asm/serial.h already exists
    3.16 +#there is only one use of it that must be patched -- arch/ia64/setup.c 
    3.17 +#softlink include/asm-ia64/serial.h include/asm-ia64/asmserial.h
    3.18 +
    3.19  # xen/include/asm-ia64/linux/*.h (== linux/include/linux/*.h)
    3.20  
    3.21  cp_patch include/linux/bootmem.h include/asm-ia64/linux/bootmem.h bootmem.h
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/xen/include/asm-ia64/serial.h	Thu Feb 17 19:07:08 2005 +0000
     4.3 @@ -0,0 +1,91 @@
     4.4 +#ifndef __ASM_SERIAL_H__
     4.5 +#define __ASM_SERIAL_H__
     4.6 +
     4.7 +#include <asm/regs.h>
     4.8 +#include <asm/irq.h>
     4.9 +#include <xen/serial.h>
    4.10 +#include <asm/hpsim_ssc.h>
    4.11 +
    4.12 +#if 1
    4.13 +#define arch_serial_putc(_uart, _c)					\
    4.14 +	( platform_is_hp_ski() ? (ia64_ssc(c,0,0,0,SSC_PUTCHAR), 1) :	\
    4.15 +	( longs_peak_putc(c), 1 ))
    4.16 +#else
    4.17 +#define arch_serial_putc(_uart, _c)					\
    4.18 +	( platform_is_hp_ski() ? (ia64_ssc(c,0,0,0,SSC_PUTCHAR), 1) :	\
    4.19 +	( (inb((_uart)->io_base + LSR) & LSR_THRE) ?    		\
    4.20 +	(outb((_c), (_uart)->io_base + THR), 1) : 0 ))
    4.21 +#endif
    4.22 +
    4.23 +
    4.24 +#define OPT_COM1_STR "115200"
    4.25 +#define OPT_COM2_STR ""
    4.26 +
    4.27 +/* Register offsets */
    4.28 +#define RBR             0x00    /* receive buffer       */
    4.29 +#define THR             0x00    /* transmit holding     */
    4.30 +#define IER             0x01    /* interrupt enable     */
    4.31 +#define IIR             0x02    /* interrupt identity   */
    4.32 +#define FCR             0x02    /* FIFO control         */
    4.33 +#define LCR             0x03    /* line control         */
    4.34 +#define MCR             0x04    /* Modem control        */
    4.35 +#define LSR             0x05    /* line status          */
    4.36 +#define MSR             0x06    /* Modem status         */
    4.37 +#define DLL             0x00    /* divisor latch (ls) (DLAB=1) */
    4.38 +#define DLM             0x01    /* divisor latch (ms) (DLAB=1) */
    4.39 +
    4.40 +/* Interrupt Enable Register */
    4.41 +#define IER_ERDAI       0x01    /* rx data recv'd       */
    4.42 +#define IER_ETHREI      0x02    /* tx reg. empty        */
    4.43 +#define IER_ELSI        0x04    /* rx line status       */
    4.44 +#define IER_EMSI        0x08    /* MODEM status         */
    4.45 +
    4.46 +/* FIFO control register */
    4.47 +#define FCR_ENABLE      0x01    /* enable FIFO          */
    4.48 +#define FCR_CLRX        0x02    /* clear Rx FIFO        */
    4.49 +#define FCR_CLTX        0x04    /* clear Tx FIFO        */
    4.50 +#define FCR_DMA         0x10    /* enter DMA mode       */
    4.51 +#define FCR_TRG1        0x00    /* Rx FIFO trig lev 1   */
    4.52 +#define FCR_TRG4        0x40    /* Rx FIFO trig lev 4   */
    4.53 +#define FCR_TRG8        0x80    /* Rx FIFO trig lev 8   */
    4.54 +#define FCR_TRG14       0xc0    /* Rx FIFO trig lev 14  */
    4.55 +
    4.56 +/* Line control register */
    4.57 +#define LCR_DLAB        0x80    /* Divisor Latch Access */
    4.58 +
    4.59 +/* Modem Control Register */
    4.60 +#define MCR_DTR         0x01    /* Data Terminal Ready  */
    4.61 +#define MCR_RTS         0x02    /* Request to Send      */
    4.62 +#define MCR_OUT2        0x08    /* OUT2: interrupt mask */
    4.63 +
    4.64 +/* Line Status Register */
    4.65 +#define LSR_DR          0x01    /* Data ready           */
    4.66 +#define LSR_OE          0x02    /* Overrun              */
    4.67 +#define LSR_PE          0x04    /* Parity error         */
    4.68 +#define LSR_FE          0x08    /* Framing error        */
    4.69 +#define LSR_BI          0x10    /* Break                */
    4.70 +#define LSR_THRE        0x20    /* Xmit hold reg empty  */
    4.71 +#define LSR_TEMT        0x40    /* Xmitter empty        */
    4.72 +#define LSR_ERR         0x80    /* Error                */
    4.73 +
    4.74 +/* These parity settings can be ORed directly into the LCR. */
    4.75 +#define PARITY_NONE     (0<<3)
    4.76 +#define PARITY_ODD      (1<<3)
    4.77 +#define PARITY_EVEN     (3<<3)
    4.78 +#define PARITY_MARK     (5<<3)
    4.79 +#define PARITY_SPACE    (7<<3)
    4.80 +
    4.81 +#define RXBUFSZ 32
    4.82 +#define MASK_RXBUF_IDX(_i) ((_i)&(RXBUFSZ-1))
    4.83 +
    4.84 +#define UART_ENABLED(_u) ((_u)->baud != 0)
    4.85 +#define DISABLE_UART(_u) ((_u)->baud = 0)
    4.86 +
    4.87 +/* 'Serial handles' are comprise the following fields. */
    4.88 +#define SERHND_IDX      (1<<0) /* COM1 or COM2?                           */
    4.89 +
    4.90 +unsigned char irq_serial_getc(int handle);
    4.91 +
    4.92 +void serial_force_unlock(int handle);
    4.93 +
    4.94 +#endif /* __ASM_SERIAL_H__ */