Thread (87 messages) 87 messages, 8 authors, 2007-05-07

Re: [PATCH 7/13] powerpc: Add arch/powerpc mv64x60 MPSC platform data setup

From: Dale Farnsworth <hidden>
Date: 2007-04-26 05:57:17

On Thu, Apr 26, 2007 at 12:14:07AM +0000, Arnd Bergmann wrote:
On Thursday 26 April 2007, Mark A. Greer wrote:
quoted
+static int __init mv64x60_mpsc_platform_device_init(void)
+{
+	struct device_node *np = NULL;
+	unsigned int i;
+	struct platform_device *pdev;
+	int err;
+
+	for (i = 0; (np = of_find_compatible_node(np, "serial", "mpsc")); i++) {
+		struct resource r[5];
+		struct mpsc_pdata pdata;
+		const unsigned int *prop;
+		const phandle *ph;
+		struct device_node *sdma, *brg;
This looks wrong to me. See drivers/serial/of_serial.c to find how we do it for
8250 compatible serial ports. You should probably just add your serial port
stuff in there as well, instead of doing your own scanning of the device tree.
Unfortunately, this hardware is very much non-8250 compatible.
quoted
+		pdev = platform_device_register_simple(MPSC_CTLR_NAME, i, r, 5);
+		if (IS_ERR(pdev)) {
+			err = PTR_ERR(pdev);
+			goto ret_node_put;
+		}
Now this really needs some explanation.

Why the heck do you have a platform device that gets its resources from
nonstandard properties of a serial port?
There is an existing mpsc driver usable on both MIPS and powerpc platforms
that requires these non-standard properties.

-Dale
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help