aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/Kconfig4
-rw-r--r--drivers/rapidio/Makefile4
-rw-r--r--drivers/rapidio/rio.c27
3 files changed, 19 insertions, 16 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 10764a3d62cc..2775023a0744 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2259,11 +2259,11 @@ source "drivers/pcmcia/Kconfig"
2259source "drivers/pci/hotplug/Kconfig" 2259source "drivers/pci/hotplug/Kconfig"
2260 2260
2261config RAPIDIO 2261config RAPIDIO
2262 bool "RapidIO support" 2262 tristate "RapidIO support"
2263 depends on PCI 2263 depends on PCI
2264 default n 2264 default n
2265 help 2265 help
2266 If you say Y here, the kernel will include drivers and 2266 If enabled this option will include drivers and the core
2267 infrastructure code to support RapidIO interconnect devices. 2267 infrastructure code to support RapidIO interconnect devices.
2268 2268
2269source "drivers/rapidio/Kconfig" 2269source "drivers/rapidio/Kconfig"
diff --git a/drivers/rapidio/Makefile b/drivers/rapidio/Makefile
index 3036702ffe8b..6271ada6993f 100644
--- a/drivers/rapidio/Makefile
+++ b/drivers/rapidio/Makefile
@@ -1,7 +1,9 @@
1# 1#
2# Makefile for RapidIO interconnect services 2# Makefile for RapidIO interconnect services
3# 3#
4obj-y += rio.o rio-access.o rio-driver.o rio-sysfs.o 4obj-$(CONFIG_RAPIDIO) += rapidio.o
5rapidio-y := rio.o rio-access.o rio-driver.o rio-sysfs.o
6
5obj-$(CONFIG_RAPIDIO_ENUM_BASIC) += rio-scan.o 7obj-$(CONFIG_RAPIDIO_ENUM_BASIC) += rio-scan.o
6 8
7obj-$(CONFIG_RAPIDIO) += switches/ 9obj-$(CONFIG_RAPIDIO) += switches/
diff --git a/drivers/rapidio/rio.c b/drivers/rapidio/rio.c
index 2054b6208823..f4f30af2df68 100644
--- a/drivers/rapidio/rio.c
+++ b/drivers/rapidio/rio.c
@@ -5,7 +5,7 @@
5 * Copyright 2005 MontaVista Software, Inc. 5 * Copyright 2005 MontaVista Software, Inc.
6 * Matt Porter <mporter@kernel.crashing.org> 6 * Matt Porter <mporter@kernel.crashing.org>
7 * 7 *
8 * Copyright 2009 Integrated Device Technology, Inc. 8 * Copyright 2009 - 2013 Integrated Device Technology, Inc.
9 * Alex Bounine <alexandre.bounine@idt.com> 9 * Alex Bounine <alexandre.bounine@idt.com>
10 * 10 *
11 * This program is free software; you can redistribute it and/or modify it 11 * This program is free software; you can redistribute it and/or modify it
@@ -30,6 +30,17 @@
30 30
31#include "rio.h" 31#include "rio.h"
32 32
33MODULE_DESCRIPTION("RapidIO Subsystem Core");
34MODULE_AUTHOR("Matt Porter <mporter@kernel.crashing.org>");
35MODULE_AUTHOR("Alexandre Bounine <alexandre.bounine@idt.com>");
36MODULE_LICENSE("GPL");
37
38static int hdid[RIO_MAX_MPORTS];
39static int ids_num;
40module_param_array(hdid, int, &ids_num, 0);
41MODULE_PARM_DESC(hdid,
42 "Destination ID assignment to local RapidIO controllers");
43
33static LIST_HEAD(rio_devices); 44static LIST_HEAD(rio_devices);
34static DEFINE_SPINLOCK(rio_global_list_lock); 45static DEFINE_SPINLOCK(rio_global_list_lock);
35 46
@@ -1860,24 +1871,14 @@ no_disc:
1860 return 0; 1871 return 0;
1861} 1872}
1862 1873
1863static int hdids[RIO_MAX_MPORTS + 1];
1864
1865static int rio_get_hdid(int index) 1874static int rio_get_hdid(int index)
1866{ 1875{
1867 if (!hdids[0] || hdids[0] <= index || index >= RIO_MAX_MPORTS) 1876 if (ids_num == 0 || ids_num <= index || index >= RIO_MAX_MPORTS)
1868 return -1; 1877 return -1;
1869 1878
1870 return hdids[index + 1]; 1879 return hdid[index];
1871} 1880}
1872 1881
1873static int rio_hdid_setup(char *str)
1874{
1875 (void)get_options(str, ARRAY_SIZE(hdids), hdids);
1876 return 1;
1877}
1878
1879__setup("riohdid=", rio_hdid_setup);
1880
1881int rio_register_mport(struct rio_mport *port) 1882int rio_register_mport(struct rio_mport *port)
1882{ 1883{
1883 struct rio_scan_node *scan = NULL; 1884 struct rio_scan_node *scan = NULL;