提交 a527ad88 编写于 作者: G Grant Likely 提交者: Paul Mackerras

[POWERPC] xilinxfb: Parameterize xilinxfb platform device registration

This allows multiple xilinxfb devices to be registered and used.
Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
cc: Andrei Konovalov <akonovalov@ru.mvista.com>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 31a12cec
...@@ -71,6 +71,21 @@ ...@@ -71,6 +71,21 @@
}, \ }, \
} }
/*
* ML300/ML403 Video Device: shortcut macro for single instance
*/
#define XPAR_TFT(num) { \
.name = "xilinxfb", \
.id = num, \
.num_resources = 1, \
.resource = (struct resource[]) { \
{ \
.start = XPAR_TFT_##num##_BASEADDR, \
.end = XPAR_TFT_##num##_BASEADDR+7, \
.flags = IORESOURCE_IO, \
}, \
}, \
}
/* UART 8250 driver platform data table */ /* UART 8250 driver platform data table */
struct plat_serial8250_port virtex_serial_platform_data[] = { struct plat_serial8250_port virtex_serial_platform_data[] = {
...@@ -146,20 +161,17 @@ struct platform_device virtex_platform_devices[] = { ...@@ -146,20 +161,17 @@ struct platform_device virtex_platform_devices[] = {
XPAR_SYSACE(1), XPAR_SYSACE(1),
#endif #endif
/* ML300/403 reference design framebuffer */
#if defined(XPAR_TFT_0_BASEADDR) #if defined(XPAR_TFT_0_BASEADDR)
{ XPAR_TFT(0),
.name = "xilinxfb", #endif
.id = 0, #if defined(XPAR_TFT_1_BASEADDR)
.num_resources = 1, XPAR_TFT(1),
.resource = (struct resource[]) { #endif
{ #if defined(XPAR_TFT_2_BASEADDR)
.start = XPAR_TFT_0_BASEADDR, XPAR_TFT(2),
.end = XPAR_TFT_0_BASEADDR+7, #endif
.flags = IORESOURCE_IO, #if defined(XPAR_TFT_3_BASEADDR)
}, XPAR_TFT(3),
},
},
#endif #endif
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册