aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev
diff options
context:
space:
mode:
authorAlexandre Bounine <alexandre.bounine@idt.com>2011-03-23 19:43:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-23 22:46:43 -0400
commit569fccb6b48878d654310e1ffaf9a5a6e46b3144 (patch)
tree20e6ded48adf7b36e9cfe71b8a0ed3721b977669 /arch/powerpc/sysdev
parent2f809985d2cbc78078b8da1cbed1f1ce1f4a0d5f (diff)
rapidio: modify mport ID assignment
Changes mport ID and host destination ID assignment to implement unified method common to all mport drivers. Makes "riohdid=" kernel command line parameter common for all architectures with support for more that one host destination ID assignment. Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: Li Yang <leoli@freescale.com> Cc: Thomas Moll <thomas.moll@sysgo.com> Cc: Micha Nelissen <micha@neli.hopto.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r--arch/powerpc/sysdev/fsl_rio.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c
index 576b8066089e..8d26533ba98e 100644
--- a/arch/powerpc/sysdev/fsl_rio.c
+++ b/arch/powerpc/sysdev/fsl_rio.c
@@ -1288,28 +1288,6 @@ err_out:
1288 return rc; 1288 return rc;
1289} 1289}
1290 1290
1291static char *cmdline = NULL;
1292
1293static int fsl_rio_get_hdid(int index)
1294{
1295 /* XXX Need to parse multiple entries in some format */
1296 if (!cmdline)
1297 return -1;
1298
1299 return simple_strtol(cmdline, NULL, 0);
1300}
1301
1302static int fsl_rio_get_cmdline(char *s)
1303{
1304 if (!s)
1305 return 0;
1306
1307 cmdline = s;
1308 return 1;
1309}
1310
1311__setup("riohdid=", fsl_rio_get_cmdline);
1312
1313static inline void fsl_rio_info(struct device *dev, u32 ccsr) 1291static inline void fsl_rio_info(struct device *dev, u32 ccsr)
1314{ 1292{
1315 const char *str; 1293 const char *str;
@@ -1439,7 +1417,6 @@ int fsl_rio_setup(struct platform_device *dev)
1439 rc = -ENOMEM; 1417 rc = -ENOMEM;
1440 goto err_port; 1418 goto err_port;
1441 } 1419 }
1442 port->id = 0;
1443 port->index = 0; 1420 port->index = 0;
1444 1421
1445 priv = kzalloc(sizeof(struct rio_priv), GFP_KERNEL); 1422 priv = kzalloc(sizeof(struct rio_priv), GFP_KERNEL);
@@ -1470,8 +1447,6 @@ int fsl_rio_setup(struct platform_device *dev)
1470 priv->dev = &dev->dev; 1447 priv->dev = &dev->dev;
1471 1448
1472 port->ops = ops; 1449 port->ops = ops;
1473 port->host_deviceid = fsl_rio_get_hdid(port->id);
1474
1475 port->priv = priv; 1450 port->priv = priv;
1476 port->phys_efptr = 0x100; 1451 port->phys_efptr = 0x100;
1477 rio_register_mport(port); 1452 rio_register_mport(port);