rapidio: modify configuration to support PCI-SRIO controller
authorAlexandre Bounine <alexandre.bounine@idt.com>
Wed, 23 Mar 2011 23:43:03 +0000 (16:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Mar 2011 02:46:42 +0000 (19:46 -0700)
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 <alexandre.bounine@idt.com>
Acked-by: 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>
arch/mips/Kconfig
arch/powerpc/Kconfig
arch/powerpc/kernel/cpu_setup_fsl_booke.S
arch/powerpc/sysdev/Makefile
arch/x86/Kconfig
drivers/net/rionet.c
drivers/rapidio/rio-sysfs.c

index 6e9811d40c9f57310af68020490a32fe09073a49..9905e2e85de4415d87f922dafdeefe914e0efb92 100644 (file)
@@ -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"
index ce9ff55e1026ed653cb2eb3086677f77a1f93af7..3584e4d4a4ad5f0f0409e5fc77e2fa6869b8dc67 100644 (file)
@@ -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
index 5c518ad3445c4a6e642d61a1ac24f35ee5846781..913611105c1f5154baf6a9d9ff473cd7444338c9 100644 (file)
@@ -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
index 9c2973479142125333e953e1a99f462c3350494a..1e0c933ef772d6aa2d120dc6abb7ee8d63b18a5c 100644 (file)
@@ -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/
index d57ddd7573cc5fcf71bd3c0a17cb123ae463021e..140e254fe546e195c125915392d0f1ece1d38d8f 100644 (file)
@@ -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
 
 
index 44150f2f7bfd6b206b17e0a64064d5996d0033ea..678e5777da8168aac5ba6944746f978415382358 100644 (file)
@@ -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);
 
@@ -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;
index 0d894320e227acc58ea13b3f80927a654d58f632..4dbe360989be8b3ed1b156e7f61aeaafb5b68fff 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/rio.h>
 #include <linux/rio_drv.h>
 #include <linux/stat.h>
+#include <linux/capability.h>
 
 #include "rio.h"
 
This page took 0.054107 seconds and 5 git commands to generate.