staging: Add SystemBase Multi-2/PCI driver
PATCH 1/1 staging: Add SystemBase Multi-2/PCI driver
I ported the driver supplied by SystemBase to mainline.
As the driver had MODULE_LICENSE("GPL") it is declared as a GPL module and thus I have the right to distribute it upstream. Note, I did the bare minimum to get it working. It still needs a lot of loving.
--- drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/sb105x/Kconfig | 9 + drivers/staging/sb105x/Makefile | 3 + drivers/staging/sb105x/sb_mp_register.h | 295 +++ drivers/staging/sb105x/sb_pci_mp.c | 3198 +++++++++++++++++++++++++++++++ drivers/staging/sb105x/sb_pci_mp.h | 288 +++ drivers/staging/sb105x/sb_ser_core.h | 368 ++++ 8 files changed, 4164 insertions(+) create mode 100644 drivers/staging/sb105x/Kconfig create mode 100644 drivers/staging/sb105x/Makefile create mode 100644 drivers/staging/sb105x/sb_mp_register.h create mode 100644 drivers/staging/sb105x/sb_pci_mp.c create mode 100644 drivers/staging/sb105x/sb_pci_mp.h create mode 100644 drivers/staging/sb105x/sb_ser_core.h
drivers/staging/Kconfig +2 -0
@@ -136,4 +136,6 @@ source "drivers/staging/csr/Kconfig" source "drivers/staging/omap-thermal/Kconfig" +source "drivers/staging/sb105x/Kconfig" + endif # STAGING
drivers/staging/Makefile +1 -0
@@ -60,3 +60,4 @@ obj-$(CONFIG_USB_G_CCG) += ccg/ obj-$(CONFIG_WIMAX_GDM72XX) += gdm72xx/ obj-$(CONFIG_CSR_WIFI) += csr/ obj-$(CONFIG_OMAP_BANDGAP) += omap-thermal/ +obj-$(CONFIG_SB105X) += sb105x/
drivers/staging/sb105x/Kconfig new file +9 -0
@@ -0,0 +1,9 @@ +config SB105X + tristate "SystemBase PCI Multiport UART" + select SERIAL_CORE + depends on PCI + help + A driver for the SystemBase Multi-2/PCI serial card + + To compile this driver a module, choose M here: the module + will be called "sb105x".
drivers/staging/sb105x/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +obj-$(CONFIG_SB105X) += sb105x.o + +sb105x-y := sb_pci_mp.o
drivers/staging/sb105x/sb_mp_register.h new file +295 -0
295 lines not on this page · raw message
drivers/staging/sb105x/sb_pci_mp.c new file +3198 -0
2,683 lines not on this page · raw message
drivers/staging/sb105x/sb_pci_mp.h new file +288 -0
288 lines not on this page · raw message
drivers/staging/sb105x/sb_ser_core.h new file +368 -0
368 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.10.4
Part of the diff is not shown here. View the raw message.
Greg Kroah-Hartman
maintainerQuoted 5 lines · Steven Rostedt
I ported the driver supplied by SystemBase to mainline.
As the driver had
MODULE_LICENSE("GPL")it is declared as a GPL module and thus I have the right to distribute it upstream. Note, I did the bare minimum to get it working. It still needs a lot of loving.
Being in staging only requires 2 things, proper license, and it has to build.
This fails on the second one:
In file included from drivers/staging/sb105x/sb_pci_mp.c:1:0:drivers/staging/sb105x/sb_pci_mp.h:279:40: error: array type has incomplete element type drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_startup’:drivers/staging/sb105x/sb_pci_mp.c:546:26: error: invalid type argument of ‘->’ (have ‘struct ktermios’) drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_shutdown’:drivers/staging/sb105x/sb_pci_mp.c:573:40: error: invalid type argument of ‘->’ (have ‘struct ktermios’) drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_change_speed’:drivers/staging/sb105x/sb_pci_mp.c:596:14: error: wrong type argument to unary exclamation mark drivers/staging/sb105x/sb_pci_mp.c:599:10: error: incompatible types when assigning to type ‘struct ktermios *’ from type ‘struct ktermios’ drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_throttle’:drivers/staging/sb105x/sb_pci_mp.c:734:18: error: invalid type argument of ‘->’ (have ‘struct ktermios’) drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_unthrottle’:drivers/staging/sb105x/sb_pci_mp.c:750:18: error: invalid type argument of ‘->’ (have ‘struct ktermios’) drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_set_termios’:drivers/staging/sb105x/sb_pci_mp.c:1277:35: error: invalid type argument of ‘->’ (have ‘struct ktermios’) drivers/staging/sb105x/sb_pci_mp.c:1282:4: error: invalid type argument of ‘->’ (have ‘struct ktermios’) drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_update_termios’:drivers/staging/sb105x/sb_pci_mp.c:1450:19: error: invalid type argument of ‘->’ (have ‘struct ktermios’) drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_block_til_ready’:drivers/staging/sb105x/sb_pci_mp.c:1476:24: error: invalid type argument of ‘->’ (have ‘struct ktermios’) drivers/staging/sb105x/sb_pci_mp.c:1481:25: error: invalid type argument of ‘->’ (have ‘struct ktermios’) drivers/staging/sb105x/sb_pci_mp.c: In function ‘multi_type’:drivers/staging/sb105x/sb_pci_mp.c:2763:14: error: bit-field ‘<anonymous>’ width not an integer constant
In file included from drivers/staging/sb105x/sb_pci_mp.c:1:0:drivers/staging/sb105x/sb_pci_mp.c: At top level:drivers/staging/sb105x/sb_pci_mp.h:279:40: warning: ‘uart_config’ defined but not used [-Wunused-variable] drivers/staging/sb105x/sb_pci_mp.c: In function ‘multi_type’:drivers/staging/sb105x/sb_pci_mp.c:2766:1: warning: control reaches end of non-void function [-Wreturn-type] make[3]: *** [drivers/staging/sb105x/sb_pci_mp.o] Error 1
make[2]: *** [drivers/staging/sb105x] Error 2
make[1]: *** [drivers/staging] Error 2
Care to redo this against my staging-next tree, or, even better, linux-next, which contains a bunch of tty changes in it?
Or, if you want, I can take a whack at it to get it to build properly, whichever is easier for you.
thanks,
greg k-h
Quoted 35 lines · Greg Kroah-Hartman
Quoted 5 lines · Steven Rostedt
I ported the driver supplied by SystemBase to mainline.
As the driver had
MODULE_LICENSE("GPL")it is declared as a GPL module and thus I have the right to distribute it upstream. Note, I did the bare minimum to get it working. It still needs a lot of loving.Being in staging only requires 2 things, proper license, and it has to build.
This fails on the second one:
In file included from
drivers/staging/sb105x/sb_pci_mp.c:1:0:drivers/staging/sb105x/sb_pci_mp.h:279:40: error: array type has incomplete element typedrivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_startup’:drivers/staging/sb105x/sb_pci_mp.c:546:26: error: invalid type argument of ‘->’ (have ‘struct ktermios’)drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_shutdown’:drivers/staging/sb105x/sb_pci_mp.c:573:40: error: invalid type argument of ‘->’ (have ‘struct ktermios’)drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_change_speed’:drivers/staging/sb105x/sb_pci_mp.c:596:14: error: wrong type argument to unary exclamation markdrivers/staging/sb105x/sb_pci_mp.c:599:10: error: incompatible types when assigning to type ‘struct ktermios *’ from type ‘struct ktermios’drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_throttle’:drivers/staging/sb105x/sb_pci_mp.c:734:18: error: invalid type argument of ‘->’ (have ‘struct ktermios’)drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_unthrottle’:drivers/staging/sb105x/sb_pci_mp.c:750:18: error: invalid type argument of ‘->’ (have ‘struct ktermios’)drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_set_termios’:drivers/staging/sb105x/sb_pci_mp.c:1277:35: error: invalid type argument of ‘->’ (have ‘struct ktermios’)drivers/staging/sb105x/sb_pci_mp.c:1282:4: error: invalid type argument of ‘->’ (have ‘struct ktermios’)drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_update_termios’:drivers/staging/sb105x/sb_pci_mp.c:1450:19: error: invalid type argument of ‘->’ (have ‘struct ktermios’)drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_block_til_ready’:drivers/staging/sb105x/sb_pci_mp.c:1476:24: error: invalid type argument of ‘->’ (have ‘struct ktermios’)drivers/staging/sb105x/sb_pci_mp.c:1481:25: error: invalid type argument of ‘->’ (have ‘struct ktermios’)drivers/staging/sb105x/sb_pci_mp.c: In function ‘multi_type’:drivers/staging/sb105x/sb_pci_mp.c:2763:14: error: bit-field ‘<anonymous>’ width not an integer constant
Quoted 8 lines
In file included from
drivers/staging/sb105x/sb_pci_mp.c:1:0:drivers/staging/sb105x/sb_pci_mp.c: At top level:drivers/staging/sb105x/sb_pci_mp.h:279:40: warning: ‘uart_config’ defined but not used [-Wunused-variable]drivers/staging/sb105x/sb_pci_mp.c: In function ‘multi_type’:drivers/staging/sb105x/sb_pci_mp.c:2766:1: warning: control reaches end of non-void function [-Wreturn-type] make[3]: *** [drivers/staging/sb105x/sb_pci_mp.o] Error 1
make[2]: *** [drivers/staging/sb105x] Error 2
make[1]: *** [drivers/staging] Error 2
Ah interesting, probably a missing dependency. Do you have a config I can test against. It worked for me against 3.6.6 (the kernel that runs the box with the card).
Quoted 3 lines
Care to redo this against my staging-next tree, or, even better, linux-next, which contains a bunch of tty changes in it?
Sure, and I may try it against a few randconfigs (but forcing this driver enabled, as ktest allows for that ;-)
Quoted 3 lines
Or, if you want, I can take a whack at it to get it to build properly, whichever is easier for you.
Of course it would be easier for me to have you do it :-) But you already have enough on your plate. I'll get it done, as I may be the only person using this card.
-- Steve
Greg Kroah-Hartman
maintainerQuoted 45 lines · Steven Rostedt
Quoted 35 lines · Greg Kroah-Hartman
Quoted 5 lines · Steven Rostedt
I ported the driver supplied by SystemBase to mainline.
As the driver had
MODULE_LICENSE("GPL")it is declared as a GPL module and thus I have the right to distribute it upstream. Note, I did the bare minimum to get it working. It still needs a lot of loving.Being in staging only requires 2 things, proper license, and it has to build.
This fails on the second one:
In file included from
drivers/staging/sb105x/sb_pci_mp.c:1:0:drivers/staging/sb105x/sb_pci_mp.h:279:40: error: array type has incomplete element typedrivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_startup’:drivers/staging/sb105x/sb_pci_mp.c:546:26: error: invalid type argument of ‘->’ (have ‘struct ktermios’)drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_shutdown’:drivers/staging/sb105x/sb_pci_mp.c:573:40: error: invalid type argument of ‘->’ (have ‘struct ktermios’)drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_change_speed’:drivers/staging/sb105x/sb_pci_mp.c:596:14: error: wrong type argument to unary exclamation markdrivers/staging/sb105x/sb_pci_mp.c:599:10: error: incompatible types when assigning to type ‘struct ktermios *’ from type ‘struct ktermios’drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_throttle’:drivers/staging/sb105x/sb_pci_mp.c:734:18: error: invalid type argument of ‘->’ (have ‘struct ktermios’)drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_unthrottle’:drivers/staging/sb105x/sb_pci_mp.c:750:18: error: invalid type argument of ‘->’ (have ‘struct ktermios’)drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_set_termios’:drivers/staging/sb105x/sb_pci_mp.c:1277:35: error: invalid type argument of ‘->’ (have ‘struct ktermios’)drivers/staging/sb105x/sb_pci_mp.c:1282:4: error: invalid type argument of ‘->’ (have ‘struct ktermios’)drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_update_termios’:drivers/staging/sb105x/sb_pci_mp.c:1450:19: error: invalid type argument of ‘->’ (have ‘struct ktermios’)drivers/staging/sb105x/sb_pci_mp.c: In function ‘mp_block_til_ready’:drivers/staging/sb105x/sb_pci_mp.c:1476:24: error: invalid type argument of ‘->’ (have ‘struct ktermios’)drivers/staging/sb105x/sb_pci_mp.c:1481:25: error: invalid type argument of ‘->’ (have ‘struct ktermios’)drivers/staging/sb105x/sb_pci_mp.c: In function ‘multi_type’:drivers/staging/sb105x/sb_pci_mp.c:2763:14: error: bit-field ‘<anonymous>’ width not an integer constantQuoted 8 lines
In file included from
drivers/staging/sb105x/sb_pci_mp.c:1:0:drivers/staging/sb105x/sb_pci_mp.c: At top level:drivers/staging/sb105x/sb_pci_mp.h:279:40: warning: ‘uart_config’ defined but not used [-Wunused-variable]drivers/staging/sb105x/sb_pci_mp.c: In function ‘multi_type’:drivers/staging/sb105x/sb_pci_mp.c:2766:1: warning: control reaches end of non-void function [-Wreturn-type] make[3]: *** [drivers/staging/sb105x/sb_pci_mp.o] Error 1
make[2]: *** [drivers/staging/sb105x] Error 2
make[1]: *** [drivers/staging] Error 2
Quoted 3 lines
Ah interesting, probably a missing dependency. Do you have a config I can test against. It worked for me against 3.6.6 (the kernel that runs the box with the card).
That's the issue, the tty layer has changed a bunch since 3.6, this was against 3.7-rc5. That is what has caused the build breakage here.
Redo this aginast 3.7-rc5 and we should be better off. If you really want to do this right, do this against the tty-next git tree, to catch all of the recent tty changes that will be going into 3.8.
thanks,
greg k-h
Quoted 3 lines · Greg Kroah-Hartman
Redo this aginast 3.7-rc5 and we should be better off. If you really want to do this right, do this against the tty-next git tree, to catch all of the recent tty changes that will be going into 3.8.
I did it against linux-next commit:
commit 3805711eb31d3b980c4a55a6994bbc8b22a9ec65
Author: Stephen Rothwell <[email protected]> Date: Thu Nov 15 18:07:25 2012 +1100
Add linux-next specific files for 20121115
I'm hoping this is good enough (the tty-next should be in here too).
Anyway, below is my updated patch.
-- Steve
Quoted 1 line
From
cd5386ac255f9c483d51df91c93f53aed2c43756Mon Sep 17 00:00:00 2001
From: Steven Rostedt <[email protected]>
Date: Thu, 15 Nov 2012 22:12:20 -0500
Subject: [PATCH] staging: Add SystemBase Multi-2/PCI driver
I ported the driver supplied by SystemBase to mainline.
As the driver had MODULE_LICENSE("GPL") it is declared as a GPL module and thus I have the right to distribute it upstream. Note, I did the bare minimum to get it working. It still needs a lot of loving.
--- drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/sb105x/Kconfig | 9 + drivers/staging/sb105x/Makefile | 3 + drivers/staging/sb105x/sb_mp_register.h | 295 +++ drivers/staging/sb105x/sb_pci_mp.c | 3195 +++++++++++++++++++++++++++++++ drivers/staging/sb105x/sb_pci_mp.h | 293 +++ drivers/staging/sb105x/sb_ser_core.h | 368 ++++ 8 files changed, 4166 insertions(+) create mode 100644 drivers/staging/sb105x/Kconfig create mode 100644 drivers/staging/sb105x/Makefile create mode 100644 drivers/staging/sb105x/sb_mp_register.h create mode 100644 drivers/staging/sb105x/sb_pci_mp.c create mode 100644 drivers/staging/sb105x/sb_pci_mp.h create mode 100644 drivers/staging/sb105x/sb_ser_core.h
drivers/staging/Kconfig +2 -0
@@ -142,4 +142,6 @@ source "drivers/staging/dgrp/Kconfig" source "drivers/staging/fwserial/Kconfig" +source "drivers/staging/sb105x/Kconfig" + endif # STAGING
drivers/staging/Makefile +1 -0
@@ -63,3 +63,4 @@ obj-$(CONFIG_CED1401) += ced1401/ obj-$(CONFIG_DRM_IMX) += imx-drm/ obj-$(CONFIG_DGRP) += dgrp/ obj-$(CONFIG_FIREWIRE_SERIAL) += fwserial/ +obj-$(CONFIG_SB105X) += sb105x/
drivers/staging/sb105x/Kconfig new file +9 -0
@@ -0,0 +1,9 @@ +config SB105X + tristate "SystemBase PCI Multiport UART" + select SERIAL_CORE + depends on PCI + help + A driver for the SystemBase Multi-2/PCI serial card + + To compile this driver a module, choose M here: the module + will be called "sb105x".
drivers/staging/sb105x/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +obj-$(CONFIG_SB105X) += sb105x.o + +sb105x-y := sb_pci_mp.o
drivers/staging/sb105x/sb_mp_register.h new file +295 -0
295 lines not on this page · raw message
drivers/staging/sb105x/sb_pci_mp.c new file +3195 -0
2,683 lines not on this page · raw message
drivers/staging/sb105x/sb_pci_mp.h new file +293 -0
293 lines not on this page · raw message
drivers/staging/sb105x/sb_ser_core.h new file +368 -0
368 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.10.4
Part of the diff is not shown here. View the raw message.
Greg Kroah-Hartman
maintainerQuoted 7 lines · Steven Rostedt
Quoted 3 lines · Greg Kroah-Hartman
Redo this aginast 3.7-rc5 and we should be better off. If you really want to do this right, do this against the tty-next git tree, to catch all of the recent tty changes that will be going into 3.8.
I did it against linux-next commit:
Much better, that worked, now applied.
thanks,
greg k-h
Quoted 10 lines · Greg Kroah-Hartman
Quoted 7 lines · Steven Rostedt
Quoted 3 lines · Greg Kroah-Hartman
Redo this aginast 3.7-rc5 and we should be better off. If you really want to do this right, do this against the tty-next git tree, to catch all of the recent tty changes that will be going into 3.8.
I did it against linux-next commit:
Much better, that worked, now applied.
Note, I only compiled tested that version, as the box that has my card in it is my main workstation. Not something I run test kernels on. Yeah, I'm lame :-)
-- Steve