Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a527ad88a2f11f7ccab3038608e5c50ceae570a3
Commit:     a527ad88a2f11f7ccab3038608e5c50ceae570a3
Parent:     31a12cece7c71c47e61ab8ed45bbff5aac4c1931
Author:     Grant Likely <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 10 09:51:05 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Wed Jul 11 13:24:40 2007 +1000

    [POWERPC] xilinxfb: Parameterize xilinxfb platform device registration
    
    This allows multiple xilinxfb devices to be registered and used.
    
    Signed-off-by: Grant Likely <[EMAIL PROTECTED]>
    cc: Andrei Konovalov <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 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
 };
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to