aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2007-07-09 19:51:05 -0400
committerPaul Mackerras <paulus@samba.org>2007-07-10 23:24:40 -0400
commita527ad88a2f11f7ccab3038608e5c50ceae570a3 (patch)
tree9c844fd697f05fffe98702215ccc4e313f117d79 /arch
parent31a12cece7c71c47e61ab8ed45bbff5aac4c1931 (diff)
[POWERPC] xilinxfb: Parameterize xilinxfb platform device registration
This allows multiple xilinxfb devices to be registered and used. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> cc: Andrei Konovalov <akonovalov@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/ppc/syslib/virtex_devices.c38
1 files changed, 25 insertions, 13 deletions
diff --git a/arch/ppc/syslib/virtex_devices.c b/arch/ppc/syslib/virtex_devices.c
index 16546788e23b..ace4ec08de51 100644
--- a/arch/ppc/syslib/virtex_devices.c
+++ b/arch/ppc/syslib/virtex_devices.c
@@ -71,6 +71,21 @@
71 }, \ 71 }, \
72} 72}
73 73
74/*
75 * ML300/ML403 Video Device: shortcut macro for single instance
76 */
77#define XPAR_TFT(num) { \
78 .name = "xilinxfb", \
79 .id = num, \
80 .num_resources = 1, \
81 .resource = (struct resource[]) { \
82 { \
83 .start = XPAR_TFT_##num##_BASEADDR, \
84 .end = XPAR_TFT_##num##_BASEADDR+7, \
85 .flags = IORESOURCE_IO, \
86 }, \
87 }, \
88}
74 89
75/* UART 8250 driver platform data table */ 90/* UART 8250 driver platform data table */
76struct plat_serial8250_port virtex_serial_platform_data[] = { 91struct plat_serial8250_port virtex_serial_platform_data[] = {
@@ -146,20 +161,17 @@ struct platform_device virtex_platform_devices[] = {
146 XPAR_SYSACE(1), 161 XPAR_SYSACE(1),
147#endif 162#endif
148 163
149 /* ML300/403 reference design framebuffer */
150#if defined(XPAR_TFT_0_BASEADDR) 164#if defined(XPAR_TFT_0_BASEADDR)
151 { 165 XPAR_TFT(0),
152 .name = "xilinxfb", 166#endif
153 .id = 0, 167#if defined(XPAR_TFT_1_BASEADDR)
154 .num_resources = 1, 168 XPAR_TFT(1),
155 .resource = (struct resource[]) { 169#endif
156 { 170#if defined(XPAR_TFT_2_BASEADDR)
157 .start = XPAR_TFT_0_BASEADDR, 171 XPAR_TFT(2),
158 .end = XPAR_TFT_0_BASEADDR+7, 172#endif
159 .flags = IORESOURCE_IO, 173#if defined(XPAR_TFT_3_BASEADDR)
160 }, 174 XPAR_TFT(3),
161 },
162 },
163#endif 175#endif
164}; 176};
165 177