fix to allow usb modules to compile
[linux-2.4.21-pre4.git] / arch / ppc / platforms / xilinx_ml300.h
1 /*
2  * xilinx_ml300.h
3  *
4  * Include file that defines the Xilinx ML300 evaluation board
5  *
6  * Author: MontaVista Software, Inc.
7  *         source@mvista.com
8  *
9  * 2002 (c) MontaVista, Software, Inc.  This file is licensed under the terms
10  * of the GNU General Public License version 2.1.  This program is licensed
11  * "as is" without any warranty of any kind, whether express or implied.
12  */
13
14 #ifdef __KERNEL__
15 #ifndef __ASM_XILINX_ML300_H__
16 #define __ASM_XILINX_ML300_H__
17
18 /* ML300 has a Xilinx Virtex-II Pro processor */
19 #include <platforms/virtex-ii_pro.h>
20 #include <platforms/xilinx_ocp/xparameters.h>
21
22 #ifndef __ASSEMBLY__
23 typedef struct board_info {
24         unsigned int bi_memsize;        /* DRAM installed, in bytes */
25         unsigned char bi_enetaddr[6];   /* Local Ethernet MAC address */
26         unsigned int bi_intfreq;        /* Processor speed, in Hz */
27         unsigned int bi_busfreq;        /* Bus speed, in Hz */
28 } bd_t;
29
30 /* Some 4xx parts use a different timebase frequency from the internal clock.
31 */
32 #define bi_tbfreq bi_intfreq
33
34 #endif                          /* !__ASSEMBLY__ */
35
36 #define BASE_BAUD               (XPAR_UARTNS550_0_CLOCK_FREQ_HZ/16)
37
38 /* We don't need anything mapped.  Size of zero will accomplish that. */
39 #define PPC4xx_ONB_IO_PADDR     ((uint)0)
40 #define PPC4xx_ONB_IO_VADDR     ((uint)0)
41 #define PPC4xx_ONB_IO_SIZE      ((uint)0)
42
43 /* The serial ports in the Virtex-II Pro have each I/O byte in the
44  * LSByte of a word.  This means that iomem_reg_shift needs to be 2 to
45  * change the byte offsets into word offsets.  In addition the base
46  * addresses need to have 3 added to them to get to the LSByte.
47  */
48 #define STD_UART_OP(num)                                                \
49         { 0, BASE_BAUD, 0, 31-XPAR_INTC_0_UARTNS550_##num##_VEC_ID,     \
50                 (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST),                \
51                 iomem_base: (u8 *)XPAR_UARTNS550_##num##_BASEADDR + 3,  \
52                 iomem_reg_shift: 2,                                     \
53                 io_type: SERIAL_IO_MEM},
54
55 #if defined(XPAR_INTC_0_UARTNS550_0_VEC_ID)
56 #define ML300_UART0 STD_UART_OP(0)
57 #else
58 #define ML300_UART0
59 #endif
60
61 #if defined(XPAR_INTC_0_UARTNS550_1_VEC_ID)
62 #define ML300_UART1 STD_UART_OP(1)
63 #else
64 #define ML300_UART1
65 #endif
66
67 #if defined(XPAR_INTC_0_UARTNS550_2_VEC_ID)
68 #define ML300_UART2 STD_UART_OP(2)
69 #else
70 #define ML300_UART2
71 #endif
72
73 #if defined(XPAR_INTC_0_UARTNS550_3_VEC_ID)
74 #define ML300_UART3 STD_UART_OP(3)
75 #else
76 #define ML300_UART3
77 #endif
78
79 #if defined(XPAR_INTC_0_UARTNS550_4_VEC_ID)
80 #error Edit this file to add more devices.
81 #endif
82
83 #if defined(CONFIG_UART0_TTYS0)
84 #define SERIAL_PORT_DFNS        \
85         ML300_UART0             \
86         ML300_UART1             \
87         ML300_UART2             \
88         ML300_UART3
89 #endif
90
91 #if defined(CONFIG_UART0_TTYS1)
92 #define SERIAL_PORT_DFNS        \
93         ML300_UART1             \
94         ML300_UART0             \
95         ML300_UART2             \
96         ML300_UART3
97 #endif
98
99 /* ps2 keyboard and mouse */
100 #define KEYBOARD_IRQ            (31 - XPAR_INTC_0_PS2_1_VEC_ID)
101 #define AUX_IRQ                 (31 - XPAR_INTC_0_PS2_0_VEC_ID)
102
103 #define PPC4xx_MACHINE_NAME     "Xilinx ML300"
104
105 #endif                          /* __ASM_XILINX_ML300_H__ */
106 #endif                          /* __KERNEL__ */