Skip to content

Commit

Permalink
[POWERPC] xilinxfb: Parameterize xilinxfb platform device registration
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Grant Likely authored and Paul Mackerras committed Jul 11, 2007
1 parent 31a12ce commit a527ad8
Showing 1 changed file with 25 additions and 13 deletions.
38 changes: 25 additions & 13 deletions arch/ppc/syslib/virtex_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand Down Expand Up @@ -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
};

Expand Down

0 comments on commit a527ad8

Please sign in to comment.