Skip to content

Commit

Permalink
rapidio: modify configuration to support PCI-SRIO controller
Browse files Browse the repository at this point in the history
1. Add an option to include RapidIO support if the PCI is available.
2. Add FSL_RIO configuration option to enable controller selection.
3. Add RapidIO support option into x86 and MIPS architectures.

Signed-off-by: Alexandre Bounine <[email protected]>
Acked-by: Kumar Gala <[email protected]>
Cc: Matt Porter <[email protected]>
Cc: Li Yang <[email protected]>
Cc: Thomas Moll <[email protected]>
Cc: Micha Nelissen <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Alexandre Bounine authored and torvalds committed Mar 24, 2011
1 parent f8f0626 commit 388b78a
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 5 deletions.
10 changes: 10 additions & 0 deletions arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2344,6 +2344,16 @@ source "drivers/pcmcia/Kconfig"

source "drivers/pci/hotplug/Kconfig"

config RAPIDIO
bool "RapidIO support"
depends on PCI
default n
help
If you say Y here, the kernel will include drivers and
infrastructure code to support RapidIO interconnect devices.

source "drivers/rapidio/Kconfig"

endmenu

menu "Executable file formats"
Expand Down
10 changes: 9 additions & 1 deletion arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -772,11 +772,19 @@ config HAS_RAPIDIO

config RAPIDIO
bool "RapidIO support"
depends on HAS_RAPIDIO
depends on HAS_RAPIDIO || PCI
help
If you say Y here, the kernel will include drivers and
infrastructure code to support RapidIO interconnect devices.

config FSL_RIO
bool "Freescale Embedded SRIO Controller support"
depends on RAPIDIO && HAS_RAPIDIO
default "n"
---help---
Include support for RapidIO controller on Freescale embedded
processors (MPC8548, MPC8641, etc).

source "drivers/rapidio/Kconfig"

endmenu
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/cpu_setup_fsl_booke.S
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ _GLOBAL(__setup_cpu_e500v2)
bl __e500_icache_setup
bl __e500_dcache_setup
bl __setup_e500_ivors
#ifdef CONFIG_RAPIDIO
#ifdef CONFIG_FSL_RIO
/* Ensure that RFXE is set */
mfspr r3,SPRN_HID1
oris r3,r3,HID1_RFXE@h
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/sysdev/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ obj-$(CONFIG_FSL_GTM) += fsl_gtm.o
obj-$(CONFIG_MPC8xxx_GPIO) += mpc8xxx_gpio.o
obj-$(CONFIG_FSL_85XX_CACHE_SRAM) += fsl_85xx_l2ctlr.o fsl_85xx_cache_sram.o
obj-$(CONFIG_SIMPLE_GPIO) += simple_gpio.o
obj-$(CONFIG_RAPIDIO) += fsl_rio.o
obj-$(CONFIG_FSL_RIO) += fsl_rio.o
obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o
obj-$(CONFIG_QUICC_ENGINE) += qe_lib/
obj-$(CONFIG_PPC_BESTCOMM) += bestcomm/
Expand Down
10 changes: 10 additions & 0 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2096,6 +2096,16 @@ source "drivers/pcmcia/Kconfig"

source "drivers/pci/hotplug/Kconfig"

config RAPIDIO
bool "RapidIO support"
depends on PCI
default n
help
If you say Y here, the kernel will include drivers and
infrastructure code to support RapidIO interconnect devices.

source "drivers/rapidio/Kconfig"

endmenu


Expand Down
4 changes: 2 additions & 2 deletions drivers/net/rionet.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ static void rionet_remove(struct rio_dev *rdev)
struct rionet_peer *peer, *tmp;

free_pages((unsigned long)rionet_active, rdev->net->hport->sys_size ?
__ilog2(sizeof(void *)) + 4 : 0);
__fls(sizeof(void *)) + 4 : 0);
unregister_netdev(ndev);
free_netdev(ndev);

Expand Down Expand Up @@ -450,7 +450,7 @@ static int rionet_setup_netdev(struct rio_mport *mport)
}

rionet_active = (struct rio_dev **)__get_free_pages(GFP_KERNEL,
mport->sys_size ? __ilog2(sizeof(void *)) + 4 : 0);
mport->sys_size ? __fls(sizeof(void *)) + 4 : 0);
if (!rionet_active) {
rc = -ENOMEM;
goto out;
Expand Down
1 change: 1 addition & 0 deletions drivers/rapidio/rio-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/rio.h>
#include <linux/rio_drv.h>
#include <linux/stat.h>
#include <linux/capability.h>

#include "rio.h"

Expand Down

0 comments on commit 388b78a

Please sign in to comment.