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

Commit dd64f4fe authored by Alexandre Bounine's avatar Alexandre Bounine Committed by Linus Torvalds
Browse files

powerpc/fsl_rio: changes to mport registration



Change mport object initialization/registration sequence to match
reworked version of rio_register_mport() in the core code.

Signed-off-by: default avatarAlexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
Cc: Andre van Herk <andre.van.herk@prodrive-technologies.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 748353cc
Loading
Loading
Loading
Loading
+12 −6
Original line number Original line Diff line number Diff line
@@ -606,6 +606,12 @@ int fsl_rio_setup(struct platform_device *dev)
		if (!port)
		if (!port)
			continue;
			continue;


		rc = rio_mport_initialize(port);
		if (rc) {
			kfree(port);
			continue;
		}

		i = *port_index - 1;
		i = *port_index - 1;
		port->index = (unsigned char)i;
		port->index = (unsigned char)i;


@@ -682,12 +688,6 @@ int fsl_rio_setup(struct platform_device *dev)
		dev_info(&dev->dev, "RapidIO Common Transport System size: %d\n",
		dev_info(&dev->dev, "RapidIO Common Transport System size: %d\n",
				port->sys_size ? 65536 : 256);
				port->sys_size ? 65536 : 256);


		if (rio_register_mport(port)) {
			release_resource(&port->iores);
			kfree(priv);
			kfree(port);
			continue;
		}
		if (port->host_deviceid >= 0)
		if (port->host_deviceid >= 0)
			out_be32(priv->regs_win + RIO_GCCSR, RIO_PORT_GEN_HOST |
			out_be32(priv->regs_win + RIO_GCCSR, RIO_PORT_GEN_HOST |
				RIO_PORT_GEN_MASTER | RIO_PORT_GEN_DISCOVERED);
				RIO_PORT_GEN_MASTER | RIO_PORT_GEN_DISCOVERED);
@@ -727,6 +727,12 @@ int fsl_rio_setup(struct platform_device *dev)


		dbell->mport[i] = port;
		dbell->mport[i] = port;


		if (rio_register_mport(port)) {
			release_resource(&port->iores);
			kfree(priv);
			kfree(port);
			continue;
		}
		active_ports++;
		active_ports++;
	}
	}