Rapidio 관련하여 IDT의 tsi721라는 PCIe to RapidIO converts 칩 드라이버를 커널에서 제공하고 있다.


ARM에서 Rapidio를 활성화하기 위해서는 커널에서 다음과 같이 수정을 합니다.


작업한 커널은 3.14 버젼입니다.


# vi arch/arm/Kconfig


1420 source "drivers/pci/Kconfig"

1421 source "drivers/pci/pcie/Kconfig"

1422

1423 config HAS_RAPIDIO

1424     bool

1425     default n

1426

1427 config RAPIDIO

1428     bool "RapidIO support"

1429     depends on HAS_RAPIDIO || PCI

1430     help

1431       If you say Y here, the kernel will include drivers and

1432       infrastructure code to support RapidIO interconnect devices.

1433

1434 config FSL_RIO

1435     bool "Freescale Embedded SRIO Controller support"

1436     depends on RAPIDIO && HAS_RAPIDIO

1437     default "n"

1438     help

1439       Include support for RapidIO controller on Freescale embedded

1440       processors (MPC8548, MPC8641, etc).

1441

1442 source "drivers/rapidio/Kconfig"

1443

1444 source "drivers/pcmcia/Kconfig"


위의 빨간 글씨 부분을 추가하고, menuconfig 옵션에서 활성화 된것을 확인할 수 있습니다.

# make menuconfig

   Bus support  --->  

      [*] PCI support
      [*] Message Signaled Interrupts (MSI and MSI-X)
      [ ] PCI Debugging
      [ ] Enable PCI resource re-allocation detection
      <*> PCI Stub driver
      [*] PCI IOV support
      [*] PCI PRI support
      [*] PCI PASID support
          PCI host controller drivers  --->
          -*- PCI Express Port Bus support
      [*]   Root Port Advanced Error Reporting support
      [*]     PCI Express ECRC settings control
      <M>     PCIe AER error injector support
      [*]   PCI Express ASPM control
      [ ]     Debug PCI Express ASPM
          Default ASPM policy (BIOS default)  --->
      [*] RapidIO support
      <*>   IDT Tsi721 PCI Express SRIO Controller support
      (30)  Discovery timeout duration (seconds)
      [*]   Enable RapidIO Input/Output Ports
      [*]   DMA Engine support for RapidIO
      [*]   RapidIO subsystem debug messages
      <*>   Enumeration method (Basic)  --->
          RapidIO Switch drivers  --->
      <*> PCCard (PCMCIA/CardBus) support  --->               

-------------
빌드시 다음과 같은 에러가 발생할 경우

1. 아래와 같은 에러가 발생할 경우에는 drivers/rapidio/devices/tsi721.c 의 파일에서 #include <linux/slab.h> 를 추가하고, 빌드하시면 됩니다.

 CC      drivers/rapidio/devices/tsi721.o
drivers/rapidio/devices/tsi721.c: In function ‘tsi721_setup_mport’:
drivers/rapidio/devices/tsi721.c:2225:2: error: implicit declaration of function ‘kzalloc’ [-Werror=implicit-function-declaration]
drivers/rapidio/devices/tsi721.c:2225:6: warning: assignment makes pointer from integer without a cast [enabled by default]
drivers/rapidio/devices/tsi721.c:2246:8: warning: assignment makes pointer from integer without a cast [enabled by default]
drivers/rapidio/devices/tsi721.c:2248:3: error: implicit declaration of function ‘kfree’ [-Werror=implicit-function-declaration]
drivers/rapidio/devices/tsi721.c: In function ‘tsi721_probe’:
drivers/rapidio/devices/tsi721.c:2323:7: warning: assignment makes pointer from integer without a cast [enabled by default]
cc1: some warnings being treated as errors
make[3]: *** [drivers/rapidio/devices/tsi721.o] 오류 1
make[2]: *** [drivers/rapidio/devices] 오류 2
make[1]: *** [drivers/rapidio] 오류 2
make: *** [drivers] 오류 2


2. 아래와 같은 에러가 발생할 경우에는 drivers/rapidio/devices/tsi721_dma.c 의 파일에서 #include <linux/slab.h> 를 추가하고, 빌드하시면 됩니다.

 CC      drivers/rapidio/devices/tsi721_dma.o
drivers/rapidio/devices/tsi721_dma.c: In function ‘tsi721_alloc_chan_resources’:
drivers/rapidio/devices/tsi721_dma.c:502:2: error: implicit declaration of function ‘kcalloc’ [-Werror=implicit-function-declaration]
drivers/rapidio/devices/tsi721_dma.c:502:7: warning: assignment makes pointer from integer without a cast [enabled by default]
drivers/rapidio/devices/tsi721_dma.c:571:2: error: implicit declaration of function ‘kfree’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [drivers/rapidio/devices/tsi721_dma.o] 오류 1
make[2]: *** [drivers/rapidio/devices] 오류 2
make[1]: *** [drivers/rapidio] 오류 2
make: *** [drivers] 오류 2