Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a527ad88 authored by Grant Likely's avatar Grant Likely Committed by Paul Mackerras
Browse files

[POWERPC] xilinxfb: Parameterize xilinxfb platform device registration



This allows multiple xilinxfb devices to be registered and used.

Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
cc: Andrei Konovalov <akonovalov@ru.mvista.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 31a12cec
Loading
Loading
Loading
Loading
+25 −13
Original line number Original line Diff line number Diff line
@@ -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[] = {
	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
};
};