aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/platforms/4xx/virtex.h
diff options
context:
space:
mode:
authorGrant C. Likely <grant.likely@secretlab.ca>2006-01-19 03:12:48 -0500
committerPaul Mackerras <paulus@samba.org>2006-02-07 06:35:58 -0500
commit1a42e53d175074f340a3f85042ed64cfc51be216 (patch)
tree6426aebaa777d30be7ea7e6f3f6334fb94029230 /arch/ppc/platforms/4xx/virtex.h
parent562e7370a4d59d7ee8988fb0e13707d1f01a046a (diff)
[PATCH] powerpc: Migrate Xilinx Vertex support from the OCP bus to the platfom bus.
This patch only deals with the serial port definitions as there is no support for any other xilinx IP cores in the kernel tree at the moment. Board specific configuration moved out of virtex.[ch] and into the xparameters.h wrapper. This also prepares for the transition to the flattened device tree model. When the bootloader provides a device tree generated from an xparameters.h files, the kernel will no longer need xparameters/*. The platform bus will get populated with data from the device tree, and the device drivers will be automatically connected to the devices. Only the bootloader (or ppcboot) will need xparameters directly. Signed-off-by: Grant C. Likely <grant.likely@secretlab.ca> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc/platforms/4xx/virtex.h')
-rw-r--r--arch/ppc/platforms/4xx/virtex.h86
1 files changed, 11 insertions, 75 deletions
diff --git a/arch/ppc/platforms/4xx/virtex.h b/arch/ppc/platforms/4xx/virtex.h
index 049c767d33e7..1a01b81cff11 100644
--- a/arch/ppc/platforms/4xx/virtex.h
+++ b/arch/ppc/platforms/4xx/virtex.h
@@ -15,85 +15,21 @@
15#ifndef __ASM_VIRTEX_H__ 15#ifndef __ASM_VIRTEX_H__
16#define __ASM_VIRTEX_H__ 16#define __ASM_VIRTEX_H__
17 17
18#include <linux/config.h>
19#include <platforms/4xx/xparameters/xparameters.h>
20
21/* serial defines */ 18/* serial defines */
22 19
23#define RS_TABLE_SIZE 4 /* change this and add more devices below 20#include <asm/ibm405.h>
24 if you have more then 4 16x50 UARTs */
25
26#define BASE_BAUD (XPAR_UARTNS550_0_CLOCK_FREQ_HZ/16)
27
28/* The serial ports in the Virtex-II Pro have each I/O byte in the
29 * LSByte of a word. This means that iomem_reg_shift needs to be 2 to
30 * change the byte offsets into word offsets. In addition the base
31 * addresses need to have 3 added to them to get to the LSByte.
32 */
33#define STD_UART_OP(num) \
34 { 0, BASE_BAUD, 0, XPAR_INTC_0_UARTNS550_##num##_VEC_ID, \
35 ASYNC_BOOT_AUTOCONF, \
36 .iomem_base = (u8 *)XPAR_UARTNS550_##num##_BASEADDR + 3, \
37 .iomem_reg_shift = 2, \
38 .io_type = SERIAL_IO_MEM},
39
40#if defined(XPAR_INTC_0_UARTNS550_0_VEC_ID)
41#define ML300_UART0 STD_UART_OP(0)
42#else
43#define ML300_UART0
44#endif
45
46#if defined(XPAR_INTC_0_UARTNS550_1_VEC_ID)
47#define ML300_UART1 STD_UART_OP(1)
48#else
49#define ML300_UART1
50#endif
51
52#if defined(XPAR_INTC_0_UARTNS550_2_VEC_ID)
53#define ML300_UART2 STD_UART_OP(2)
54#else
55#define ML300_UART2
56#endif
57
58#if defined(XPAR_INTC_0_UARTNS550_3_VEC_ID)
59#define ML300_UART3 STD_UART_OP(3)
60#else
61#define ML300_UART3
62#endif
63
64#if defined(XPAR_INTC_0_UARTNS550_4_VEC_ID)
65#error Edit this file to add more devices.
66#elif defined(XPAR_INTC_0_UARTNS550_3_VEC_ID)
67#define NR_SER_PORTS 4
68#elif defined(XPAR_INTC_0_UARTNS550_2_VEC_ID)
69#define NR_SER_PORTS 3
70#elif defined(XPAR_INTC_0_UARTNS550_1_VEC_ID)
71#define NR_SER_PORTS 2
72#elif defined(XPAR_INTC_0_UARTNS550_0_VEC_ID)
73#define NR_SER_PORTS 1
74#else
75#define NR_SER_PORTS 0
76#endif
77 21
78#if defined(CONFIG_UART0_TTYS0) 22/* Ugly, ugly, ugly! BASE_BAUD defined here to keep 8250.c happy. */
79#define SERIAL_PORT_DFNS \ 23#if !defined(BASE_BAUD)
80 ML300_UART0 \ 24 #define BASE_BAUD (0) /* dummy value; not used */
81 ML300_UART1 \
82 ML300_UART2 \
83 ML300_UART3
84#endif 25#endif
85 26
86#if defined(CONFIG_UART0_TTYS1) 27/* Device type enumeration for platform bus definitions */
87#define SERIAL_PORT_DFNS \ 28#ifndef __ASSEMBLY__
88 ML300_UART1 \ 29enum ppc_sys_devices {
89 ML300_UART0 \ 30 VIRTEX_UART,
90 ML300_UART2 \ 31};
91 ML300_UART3
92#endif 32#endif
93 33
94#define DCRN_CPMFR_BASE 0
95
96#include <asm/ibm405.h>
97
98#endif /* __ASM_VIRTEX_H__ */ 34#endif /* __ASM_VIRTEX_H__ */
99#endif /* __KERNEL__ */ 35#endif /* __KERNEL__ */