rapidio: convert switch drivers to modules
Rework RapidIO switch drivers to add an option to build them as loadable kernel modules. This patch removes RapidIO-specific vmlinux section and converts switch drivers to be compatible with LDM driver registration method. To simplify registration of device-specific callback routines this patch introduces rio_switch_ops data structure. The sw_sysfs() callback is removed from the list of device-specific operations because under the new structure its functions can be handled by switch driver's probe() and remove() routines. If a specific switch device driver is not loaded the RapidIO subsystem core will use default standard-based operations to configure a switch. Because the current implementation of RapidIO enumeration/discovery method relies on availability of device-specific operations for error management, switch device drivers must be loaded before the RapidIO enumeration/discovery starts. This patch also moves several common routines from enumeration/discovery module into the RapidIO core code to make switch-specific operations accessible to all components of RapidIO subsystem. Signed-off-by:Alexandre Bounine <alexandre.bounine@idt.com> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: Li Yang <leoli@freescale.com> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Andre van Herk <andre.van.herk@Prodrive.nl> Cc: Micha Nelissen <micha.nelissen@Prodrive.nl> Cc: Stef van Os <stef.van.os@Prodrive.nl> Cc: Jean Delvare <jdelvare@suse.de> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
Showing
- drivers/rapidio/Kconfig 5 additions, 0 deletionsdrivers/rapidio/Kconfig
- drivers/rapidio/rio-scan.c 9 additions, 162 deletionsdrivers/rapidio/rio-scan.c
- drivers/rapidio/rio-sysfs.c 0 additions, 4 deletionsdrivers/rapidio/rio-sysfs.c
- drivers/rapidio/rio.c 239 additions, 47 deletionsdrivers/rapidio/rio.c
- drivers/rapidio/rio.h 8 additions, 33 deletionsdrivers/rapidio/rio.h
- drivers/rapidio/switches/Kconfig 4 additions, 8 deletionsdrivers/rapidio/switches/Kconfig
- drivers/rapidio/switches/idt_gen2.c 80 additions, 18 deletionsdrivers/rapidio/switches/idt_gen2.c
- drivers/rapidio/switches/idtcps.c 70 additions, 16 deletionsdrivers/rapidio/switches/idtcps.c
- drivers/rapidio/switches/tsi568.c 62 additions, 9 deletionsdrivers/rapidio/switches/tsi568.c
- drivers/rapidio/switches/tsi57x.c 67 additions, 14 deletionsdrivers/rapidio/switches/tsi57x.c
- include/asm-generic/vmlinux.lds.h 0 additions, 7 deletionsinclude/asm-generic/vmlinux.lds.h
- include/linux/rio.h 24 additions, 27 deletionsinclude/linux/rio.h
Loading
Please register or sign in to comment