diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2007-07-10 09:51:05 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-07-11 13:24:40 +1000 |
commit | a527ad88a2f11f7ccab3038608e5c50ceae570a3 (patch) | |
tree | 9c844fd697f05fffe98702215ccc4e313f117d79 | |
parent | 31a12cece7c71c47e61ab8ed45bbff5aac4c1931 (diff) | |
download | op-kernel-dev-a527ad88a2f11f7ccab3038608e5c50ceae570a3.zip op-kernel-dev-a527ad88a2f11f7ccab3038608e5c50ceae570a3.tar.gz |
[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>
-rw-r--r-- | arch/ppc/syslib/virtex_devices.c | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/arch/ppc/syslib/virtex_devices.c b/arch/ppc/syslib/virtex_devices.c index 1654678..ace4ec0 100644 --- a/arch/ppc/syslib/virtex_devices.c +++ b/arch/ppc/syslib/virtex_devices.c @@ -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 */ struct plat_serial8250_port virtex_serial_platform_data[] = { @@ -146,20 +161,17 @@ struct platform_device virtex_platform_devices[] = { XPAR_SYSACE(1), #endif - /* ML300/403 reference design framebuffer */ #if defined(XPAR_TFT_0_BASEADDR) - { - .name = "xilinxfb", - .id = 0, - .num_resources = 1, - .resource = (struct resource[]) { - { - .start = XPAR_TFT_0_BASEADDR, - .end = XPAR_TFT_0_BASEADDR+7, - .flags = IORESOURCE_IO, - }, - }, - }, + XPAR_TFT(0), +#endif +#if defined(XPAR_TFT_1_BASEADDR) + XPAR_TFT(1), +#endif +#if defined(XPAR_TFT_2_BASEADDR) + XPAR_TFT(2), +#endif +#if defined(XPAR_TFT_3_BASEADDR) + XPAR_TFT(3), #endif }; |