serial: jsm: Add support for the Digi Classic adapters
Subsystems (3)
PATCH 1/5 drivers: serial: jsm: Add Classic board UART structure
In reply to Konrad ZapalowiczThis commit adds the UART structure for the Digi Classic cards. This code comes from the staging/dgnc driver.
--- drivers/tty/serial/jsm/jsm.h | 59 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-)
drivers/tty/serial/jsm/jsm.h +58 -1
@@ -222,7 +222,10 @@ struct jsm_channel {u8 ch_mostat;/* FEP output modem status */ u8 ch_mistat;/* FEP input modem status */ -struct neo_uart_struct __iomem *ch_neo_uart;/* Pointer to the "mapped" UART struct */ +/* Pointers to the "mapped" UART structs */ +struct neo_uart_struct __iomem *ch_neo_uart;/* NEO card */ +struct cls_uart_struct __iomem *ch_cls_uart;/* Classic card */ +u8 ch_cached_lsr;/* Cached value of the LSR register */ u8 *ch_rqueue;/* Our read queue buffer - malloc'ed */
@@ -254,6 +257,60 @@ struct jsm_channel {u64 ch_xoff_sends;/* Count of xoffs transmitted */ }; +/************************************************************************ +* Per channel/port Classic UART structures * +************************************************************************ +* Base Structure Entries Usage Meanings to Host * +* * +* W = read write R = read only * +* U = Unused. * +************************************************************************/ + +struct cls_uart_struct { +u8 txrx;/* WR RHR/THR - Holding Reg */ +u8 ier;/* WR IER - Interrupt Enable Reg */ +u8 isr_fcr;/* WR ISR/FCR - Interrupt Status Reg/Fifo Control Reg*/ +u8 lcr;/* WR LCR - Line Control Reg */ +u8 mcr;/* WR MCR - Modem Control Reg */ +u8 lsr;/* WR LSR - Line Status Reg */ +u8 msr;/* WR MSR - Modem Status Reg */ +u8 spr;/* WR SPR - Scratch Pad Reg */ +}; + +/* Where to read the interrupt register (8bits) */ +#define UART_CLASSIC_POLL_ADDR_OFFSET 0x40 + +#define UART_EXAR654_ENHANCED_REGISTER_SET 0xBF + +#define UART_16654_FCR_TXTRIGGER_8 0x0 +#define UART_16654_FCR_TXTRIGGER_16 0x10 +#define UART_16654_FCR_TXTRIGGER_32 0x20 +#define UART_16654_FCR_TXTRIGGER_56 0x30 + +#define UART_16654_FCR_RXTRIGGER_8 0x0 +#define UART_16654_FCR_RXTRIGGER_16 0x40 +#define UART_16654_FCR_RXTRIGGER_56 0x80 +#define UART_16654_FCR_RXTRIGGER_60 0xC0 + +#define UART_IIR_CTSRTS 0x20/* Received CTS/RTS change of state */ +#define UART_IIR_RDI_TIMEOUT 0x0C/* Receiver data TIMEOUT */ + +/* +* These are the EXTENDED definitions for the Exar 654's Interrupt +* Enable Register. +*/ +#define UART_EXAR654_EFR_ECB 0x10/* Enhanced control bit */ +#define UART_EXAR654_EFR_IXON 0x2/* Receiver compares Xon1/Xoff1 */ +#define UART_EXAR654_EFR_IXOFF 0x8/* Transmit Xon1/Xoff1 */ +#define UART_EXAR654_EFR_RTSDTR 0x40/* Auto RTS/DTR Flow Control Enable */ +#define UART_EXAR654_EFR_CTSDSR 0x80/* Auto CTS/DSR Flow COntrol Enable */ + +#define UART_EXAR654_XOFF_DETECT 0x1/* Indicates whether chip saw an incoming XOFF char */ +#define UART_EXAR654_XON_DETECT 0x2/* Indicates whether chip saw an incoming XON char */ + +#define UART_EXAR654_IER_XOFF 0x20/* Xoff Interrupt Enable */ +#define UART_EXAR654_IER_RTSDTR 0x40/* Output Interrupt Enable */ +#define UART_EXAR654_IER_CTSDSR 0x80/* Input Interrupt Enable */ /************************************************************************ * Per channel/port NEO UART structure *
Signature · 1 line
1.9.1
PATCH 2/5 drivers: serial: jsm: Add the Classic board implementation
This commit adds the Digi Classic board implementation to the staging/jsm driver.
The code here is taken from the staging/dgnc driver and modified to match the serial/jsm state. This work is mostly based on the changes that has been done to the code handling the Digi Neo cards with the inspiration coming from the diff between staging/dgnc and serial/jsm as well as the LKML history for the jsm_neo.c
The code compiles now and has no sparse and checkpatch errors or warnings.
--- drivers/tty/serial/jsm/Makefile | 2 +- drivers/tty/serial/jsm/jsm.h | 3 +- drivers/tty/serial/jsm/jsm_cls.c | 990 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 993 insertions(+), 2 deletions(-) create mode 100644 drivers/tty/serial/jsm/jsm_cls.c
drivers/tty/serial/jsm/Makefile +1 -1
@@ -4,5 +4,5 @@ obj-$(CONFIG_SERIAL_JSM) += jsm.o -jsm-objs := jsm_driver.o jsm_neo.o jsm_tty.o +jsm-objs := jsm_driver.o jsm_neo.o jsm_tty.o jsm_cls.o
drivers/tty/serial/jsm/jsm.h +2 -1
@@ -189,7 +189,7 @@ struct jsm_board#define CH_LOOPBACK 0x2000/* Channel is in lookback mode */ #define CH_BAUD0 0x08000/* Used for checking B0 transitions */ -/* Our Read/Error/Write queue sizes */ +/* Our Read/Error queue sizes */ #define RQUEUEMASK 0x1FFF/* 8 K - 1 */ #define EQUEUEMASK 0x1FFF/* 8 K - 1 */ #define RQUEUESIZE (RQUEUEMASK + 1)
@@ -431,6 +431,7 @@ struct neo_uart_struct {*/ extern struct uart_driver jsm_uart_driver;extern struct board_ops jsm_neo_ops; +extern struct board_ops jsm_cls_ops;extern int jsm_debug;/*************************************************************************
drivers/tty/serial/jsm/jsm_cls.c new file +990 -0
990 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 3/5 drivers: serial: jsm: Enable support for Digi Classic adapters
This commit enables support for the Digi Classic adapters line in the jsm driver. This means changes in:
- device probing code
- device cleanup code
- driver description (Kconfig)
The init/cleanup code is based on the staging/dgnc driver.
--- drivers/tty/serial/Kconfig | 4 +- drivers/tty/serial/jsm/jsm.h | 4 + drivers/tty/serial/jsm/jsm_driver.c | 151 ++++++++++++++++++++++++++++-------- drivers/tty/serial/jsm/jsm_tty.c | 2 + 4 files changed, 128 insertions(+), 33 deletions(-)
drivers/tty/serial/Kconfig +2 -2
@@ -1029,11 +1029,11 @@ config SERIAL_VR41XX_CONSOLE a console on a serial port, say Y. Otherwise, say N. config SERIAL_JSM - tristate "Digi International NEO PCI Support" + tristate "Digi International NEO and Classic PCI Support" depends on PCI select SERIAL_CORE help - This is a driver for Digi International's Neo series + This is a driver for Digi International's Neo and Classic series of cards which provide multiple serial ports. You would need something like this to connect more than two modems to your Linux box, for instance in order to become a dial-in server. This driver
drivers/tty/serial/jsm/jsm.h +4 -0
@@ -68,6 +68,10 @@ do { \#define MAX_STOPS_SENT 5/* Board ids */ +#define PCI_DEVICE_ID_CLASSIC_4 0x0028 +#define PCI_DEVICE_ID_CLASSIC_8 0x0029 +#define PCI_DEVICE_ID_CLASSIC_4_422 0x00D0 +#define PCI_DEVICE_ID_CLASSIC_8_422 0x00D1#define PCI_DEVICE_ID_NEO_4 0x00B0#define PCI_DEVICE_ID_NEO_1_422 0x00CC#define PCI_DEVICE_ID_NEO_1_422_485 0x00CD
drivers/tty/serial/jsm/jsm_driver.c +120 -31
226 lines not on this page · raw message
drivers/tty/serial/jsm/jsm_tty.c +2 -0
@@ -415,6 +415,8 @@ int jsm_tty_init(struct jsm_board *brd)if (brd->bd_uart_offset ==0x200 ) ch->ch_neo_uart = vaddr + (brd->bd_uart_offset * i); +else + ch->ch_cls_uart = vaddr + (brd->bd_uart_offset * i); ch->ch_bd = brd; ch->ch_portnum = i;
Signature · 1 line
1.9.1
PATCH 4/5 staging: dgnc: Remove driver in favor of serial/jsm driver
This commit removes the staging/dgnc driver in favor of the serial/jsm driver.
This is because the serial/jsm driver now supports all of the hardware that has been supported by the staging/dgnc plus it offers better overall quality.
Given above the staging/dgnc is obsolete now.
--- MAINTAINERS | 7 - drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/dgnc/Kconfig | 6 - drivers/staging/dgnc/Makefile | 8 - drivers/staging/dgnc/TODO | 10 - drivers/staging/dgnc/dgnc_cls.c | 1389 --------------- drivers/staging/dgnc/dgnc_cls.h | 89 - drivers/staging/dgnc/dgnc_driver.c | 757 --------- drivers/staging/dgnc/dgnc_driver.h | 465 ----- drivers/staging/dgnc/dgnc_kcompat.h | 64 - drivers/staging/dgnc/dgnc_mgmt.c | 281 --- drivers/staging/dgnc/dgnc_mgmt.h | 31 - drivers/staging/dgnc/dgnc_neo.c | 1878 -------------------- drivers/staging/dgnc/dgnc_neo.h | 157 -- drivers/staging/dgnc/dgnc_pci.h | 75 - drivers/staging/dgnc/dgnc_sysfs.c | 750 -------- drivers/staging/dgnc/dgnc_sysfs.h | 49 - drivers/staging/dgnc/dgnc_tty.c | 3201 ----------------------------------- drivers/staging/dgnc/dgnc_tty.h | 42 - drivers/staging/dgnc/dgnc_types.h | 33 - drivers/staging/dgnc/dgnc_utils.c | 70 - drivers/staging/dgnc/dgnc_utils.h | 7 - drivers/staging/dgnc/digi.h | 415 ----- drivers/staging/dgnc/dpacompat.h | 115 -- 25 files changed, 9902 deletions(-) delete mode 100644 drivers/staging/dgnc/Kconfig delete mode 100644 drivers/staging/dgnc/Makefile delete mode 100644 drivers/staging/dgnc/TODO delete mode 100644 drivers/staging/dgnc/dgnc_cls.c delete mode 100644 drivers/staging/dgnc/dgnc_cls.h delete mode 100644 drivers/staging/dgnc/dgnc_driver.c delete mode 100644 drivers/staging/dgnc/dgnc_driver.h delete mode 100644 drivers/staging/dgnc/dgnc_kcompat.h delete mode 100644 drivers/staging/dgnc/dgnc_mgmt.c delete mode 100644 drivers/staging/dgnc/dgnc_mgmt.h delete mode 100644 drivers/staging/dgnc/dgnc_neo.c delete mode 100644 drivers/staging/dgnc/dgnc_neo.h delete mode 100644 drivers/staging/dgnc/dgnc_pci.h delete mode 100644 drivers/staging/dgnc/dgnc_sysfs.c delete mode 100644 drivers/staging/dgnc/dgnc_sysfs.h delete mode 100644 drivers/staging/dgnc/dgnc_tty.c delete mode 100644 drivers/staging/dgnc/dgnc_tty.h delete mode 100644 drivers/staging/dgnc/dgnc_types.h delete mode 100644 drivers/staging/dgnc/dgnc_utils.c delete mode 100644 drivers/staging/dgnc/dgnc_utils.h delete mode 100644 drivers/staging/dgnc/digi.h delete mode 100644 drivers/staging/dgnc/dpacompat.h
MAINTAINERS +0 -7
@@ -2992,13 +2992,6 @@ F: include/linux/mfd/da9063/ F: include/sound/da[79]*.h F: sound/soc/codecs/da[79]*.[ch] -DIGI NEO AND CLASSIC PCI PRODUCTS -M: Lidza Louina <[email protected]> -M: Mark Hounschell <[email protected]> -L: [email protected] -S: Maintained -F: drivers/staging/dgnc/ - DIGI EPCA PCI PRODUCTS M: Lidza Louina <[email protected]> M: Mark Hounschell <[email protected]>
drivers/staging/Kconfig +0 -2
@@ -98,8 +98,6 @@ source "drivers/staging/mt29f_spinand/Kconfig" source "drivers/staging/lustre/Kconfig" -source "drivers/staging/dgnc/Kconfig" - source "drivers/staging/dgap/Kconfig" source "drivers/staging/gs_fpgaboot/Kconfig"
drivers/staging/Makefile +0 -1
@@ -40,7 +40,6 @@ obj-$(CONFIG_DRM_IMX) += imx-drm/ obj-$(CONFIG_FIREWIRE_SERIAL) += fwserial/ obj-$(CONFIG_GOLDFISH) += goldfish/ obj-$(CONFIG_LUSTRE_FS) += lustre/ -obj-$(CONFIG_DGNC) += dgnc/ obj-$(CONFIG_DGAP) += dgap/ obj-$(CONFIG_MTD_SPINAND_MT29F) += mt29f_spinand/ obj-$(CONFIG_GS_FPGABOOT) += gs_fpgaboot/
drivers/staging/dgnc/Kconfig deleted +0 -6
@@ -1,6 +0,0 @@ -config DGNC - tristate "Digi Neo and Classic PCI Products" - default n - depends on TTY && PCI - ---help--- - Driver for the Digi International Neo and Classic PCI based product line.
drivers/staging/dgnc/Makefile deleted +0 -8
@@ -1,8 +0,0 @@ -EXTRA_CFLAGS += -DDG_NAME=\"dgnc-1.3-16\" -DDG_PART=\"40002369_F\" - -obj-$(CONFIG_DGNC) += dgnc.o - -dgnc-objs := dgnc_cls.o dgnc_driver.o\ - dgnc_mgmt.o dgnc_neo.o\ - dgnc_tty.o dgnc_sysfs.o\ - dgnc_utils.o
drivers/staging/dgnc/TODO deleted +0 -10
@@ -1,10 +0,0 @@ -* checkpatch fixes -* remove unecessary comments -* remove unecessary error messages. Example kzalloc() has its - own error message. Adding an extra one is useless. -* use goto statements for error handling when appropriate -* there is a lot of unecessary code in the driver. It was - originally a standalone driver. Remove uneeded code. - -Please send patches to Greg Kroah-Hartman <[email protected]> and -Cc: Lidza Louina <[email protected]>
drivers/staging/dgnc/dgnc_cls.c deleted +0 -1389
1,389 lines not on this page · raw message
drivers/staging/dgnc/dgnc_cls.h deleted +0 -89
89 lines not on this page · raw message
drivers/staging/dgnc/dgnc_driver.c deleted +0 -757
757 lines not on this page · raw message
drivers/staging/dgnc/dgnc_driver.h deleted +0 -465
465 lines not on this page · raw message
drivers/staging/dgnc/dgnc_kcompat.h deleted +0 -64
64 lines not on this page · raw message
drivers/staging/dgnc/dgnc_mgmt.c deleted +0 -281
184 lines not on this page · raw message
drivers/staging/dgnc/dgnc_mgmt.h deleted +0 -31
Lines of this file are not shown. View the raw message.
drivers/staging/dgnc/dgnc_neo.c deleted +0 -1878
1,878 lines not on this page · raw message
drivers/staging/dgnc/dgnc_neo.h deleted +0 -157
157 lines not on this page · raw message
drivers/staging/dgnc/dgnc_pci.h deleted +0 -75
75 lines not on this page · raw message
drivers/staging/dgnc/dgnc_sysfs.c deleted +0 -750
750 lines not on this page · raw message
drivers/staging/dgnc/dgnc_sysfs.h deleted +0 -49
49 lines not on this page · raw message
drivers/staging/dgnc/dgnc_tty.c deleted +0 -3201
3,201 lines not on this page · raw message
drivers/staging/dgnc/dgnc_tty.h deleted +0 -42
42 lines not on this page · raw message
drivers/staging/dgnc/dgnc_types.h deleted +0 -33
Lines of this file are not shown. View the raw message.
drivers/staging/dgnc/dgnc_utils.c deleted +0 -70
70 lines not on this page · raw message
drivers/staging/dgnc/dgnc_utils.h deleted +0 -7
Lines of this file are not shown. View the raw message.
drivers/staging/dgnc/digi.h deleted +0 -415
415 lines not on this page · raw message
drivers/staging/dgnc/dpacompat.h deleted +0 -115
115 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.9.1
Part of the diff is not shown here. View the raw message.
PATCH 5/5 drivers: serial: jsm: Remove FSF address from the file documentation/header
This commit removes the address of Free Software Foundation from each of the mentioned file in order to suppress the checkpatch warning.
--- drivers/tty/serial/jsm/jsm.h | 5 ----- drivers/tty/serial/jsm/jsm_cls.c | 5 ----- drivers/tty/serial/jsm/jsm_driver.c | 5 ----- drivers/tty/serial/jsm/jsm_neo.c | 5 ----- drivers/tty/serial/jsm/jsm_tty.c | 5 ----- 5 files changed, 25 deletions(-)
drivers/tty/serial/jsm/jsm.h +0 -5
@@ -13,11 +13,6 @@* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 * Temple Place - Suite 330, Boston, -* MA 02111-1307, USA. -* * Contact Information: * Scott H Kilau <[email protected]> * Wendy Xiong <[email protected]>
drivers/tty/serial/jsm/jsm_cls.c +0 -5
@@ -12,11 +12,6 @@* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -* -* * NOTE TO LINUX KERNEL HACKERS: DO NOT REFORMAT THIS CODE! * * This is shared code between Digi's CVS archive and the
drivers/tty/serial/jsm/jsm_driver.c +0 -5
@@ -13,11 +13,6 @@* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 * Temple Place - Suite 330, Boston, -* MA 02111-1307, USA. -* * Contact Information: * Scott H Kilau <[email protected]> * Wendy Xiong <[email protected]>
drivers/tty/serial/jsm/jsm_neo.c +0 -5
@@ -13,11 +13,6 @@* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 * Temple Place - Suite 330, Boston, -* MA 02111-1307, USA. -* * Contact Information: * Scott H Kilau <[email protected]> * Wendy Xiong <[email protected]>
drivers/tty/serial/jsm/jsm_tty.c +0 -5
@@ -13,11 +13,6 @@* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 * Temple Place - Suite 330, Boston, -* MA 02111-1307, USA. -* * Contact Information: * Scott H Kilau <[email protected]> * Ananda Venkatarman <[email protected]>
Signature · 1 line
1.9.1
cover serial: jsm: Add support for the Digi Classic adapters
The staging/dgnc and the serial/jsm drivers have the same origin. They come from the same codebase however the jsm is the community adopted version where the dgnc is kind of a direct submission from the Digi company.
The recent commits to the jsm driver moved in the support for some of the Neo cards from the dgnc driver. This series of patches continues this trend by moving the support for the remaining Digi adapters (the Classic line) from dgnc to the jsm driver.
This code is heavily based on the changes that were applied to the jsm/dgnc code when the support for the Neo adapters was moved to the mainline (git diff and LKML archives).
Since after this change is applied the staging/dgnc driver is obsolete (no devices supported) it has been removed.
I do not own the Classic card therefore I was unable to test it. I did my best being super-carefull during the implementation however it is highly recommended that someone tests it.
Konrad Zapalowicz (5):
drivers: serial: jsm: Add Classic board UART structure
drivers: serial: jsm: Add the Classic board implementation
drivers: serial: jsm: Enable support for Digi Classic adapters
staging: dgnc: Remove driver in favor of serial/jsm driver
drivers: serial: jsm: Remove FSF address from the file
documentation/header
MAINTAINERS | 7 - drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/dgnc/Kconfig | 6 - drivers/staging/dgnc/Makefile | 8 - drivers/staging/dgnc/TODO | 10 - drivers/staging/dgnc/dgnc_cls.c | 1389 --------------- drivers/staging/dgnc/dgnc_cls.h | 89 - drivers/staging/dgnc/dgnc_driver.c | 757 --------- drivers/staging/dgnc/dgnc_driver.h | 465 ----- drivers/staging/dgnc/dgnc_kcompat.h | 64 - drivers/staging/dgnc/dgnc_mgmt.c | 281 --- drivers/staging/dgnc/dgnc_mgmt.h | 31 - drivers/staging/dgnc/dgnc_neo.c | 1878 -------------------- drivers/staging/dgnc/dgnc_neo.h | 157 -- drivers/staging/dgnc/dgnc_pci.h | 75 - drivers/staging/dgnc/dgnc_sysfs.c | 750 -------- drivers/staging/dgnc/dgnc_sysfs.h | 49 - drivers/staging/dgnc/dgnc_tty.c | 3201 ----------------------------------- drivers/staging/dgnc/dgnc_tty.h | 42 - drivers/staging/dgnc/dgnc_types.h | 33 - drivers/staging/dgnc/dgnc_utils.c | 70 - drivers/staging/dgnc/dgnc_utils.h | 7 - drivers/staging/dgnc/digi.h | 415 ----- drivers/staging/dgnc/dpacompat.h | 115 -- drivers/tty/serial/Kconfig | 4 +- drivers/tty/serial/jsm/Makefile | 2 +- drivers/tty/serial/jsm/jsm.h | 71 +- drivers/tty/serial/jsm/jsm_cls.c | 985 +++++++++++ drivers/tty/serial/jsm/jsm_driver.c | 156 +- drivers/tty/serial/jsm/jsm_neo.c | 5 - drivers/tty/serial/jsm/jsm_tty.c | 7 +- 32 files changed, 1174 insertions(+), 9958 deletions(-) delete mode 100644 drivers/staging/dgnc/Kconfig delete mode 100644 drivers/staging/dgnc/Makefile delete mode 100644 drivers/staging/dgnc/TODO delete mode 100644 drivers/staging/dgnc/dgnc_cls.c delete mode 100644 drivers/staging/dgnc/dgnc_cls.h delete mode 100644 drivers/staging/dgnc/dgnc_driver.c delete mode 100644 drivers/staging/dgnc/dgnc_driver.h delete mode 100644 drivers/staging/dgnc/dgnc_kcompat.h delete mode 100644 drivers/staging/dgnc/dgnc_mgmt.c delete mode 100644 drivers/staging/dgnc/dgnc_mgmt.h delete mode 100644 drivers/staging/dgnc/dgnc_neo.c delete mode 100644 drivers/staging/dgnc/dgnc_neo.h delete mode 100644 drivers/staging/dgnc/dgnc_pci.h delete mode 100644 drivers/staging/dgnc/dgnc_sysfs.c delete mode 100644 drivers/staging/dgnc/dgnc_sysfs.h delete mode 100644 drivers/staging/dgnc/dgnc_tty.c delete mode 100644 drivers/staging/dgnc/dgnc_tty.h delete mode 100644 drivers/staging/dgnc/dgnc_types.h delete mode 100644 drivers/staging/dgnc/dgnc_utils.c delete mode 100644 drivers/staging/dgnc/dgnc_utils.h delete mode 100644 drivers/staging/dgnc/digi.h delete mode 100644 drivers/staging/dgnc/dpacompat.h create mode 100644 drivers/tty/serial/jsm/jsm_cls.c
Signature · 1 line
1.9.1
Adding Mark to the CC list. He might be able to test this, and also he is the dgnc maintainer. Could you resend him the patches privately so he doesn't have to download corrupted versions from the list archive?
regards,
dan carpenter
Quoted 93 lines · Konrad Zapalowicz
The staging/dgnc and the serial/jsm drivers have the same origin. They come from the same codebase however the jsm is the community adopted version where the dgnc is kind of a direct submission from the Digi company.
The recent commits to the jsm driver moved in the support for some of the Neo cards from the dgnc driver. This series of patches continues this trend by moving the support for the remaining Digi adapters (the Classic line) from dgnc to the jsm driver.
This code is heavily based on the changes that were applied to the jsm/dgnc code when the support for the Neo adapters was moved to the mainline (git diff and LKML archives).
Since after this change is applied the staging/dgnc driver is obsolete (no devices supported) it has been removed.
I do not own the Classic card therefore I was unable to test it. I did my best being super-carefull during the implementation however it is highly recommended that someone tests it.
Konrad Zapalowicz (5):
drivers: serial: jsm: Add Classic board UART structure
drivers: serial: jsm: Add the Classic board implementation
drivers: serial: jsm: Enable support for Digi Classic adapters
staging: dgnc: Remove driver in favor of serial/jsm driver
drivers: serial: jsm: Remove FSF address from the file
documentation/headerMAINTAINERS | 7 - drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/dgnc/Kconfig | 6 - drivers/staging/dgnc/Makefile | 8 - drivers/staging/dgnc/TODO | 10 - drivers/staging/dgnc/dgnc_cls.c | 1389 --------------- drivers/staging/dgnc/dgnc_cls.h | 89 - drivers/staging/dgnc/dgnc_driver.c | 757 --------- drivers/staging/dgnc/dgnc_driver.h | 465 ----- drivers/staging/dgnc/dgnc_kcompat.h | 64 - drivers/staging/dgnc/dgnc_mgmt.c | 281 --- drivers/staging/dgnc/dgnc_mgmt.h | 31 - drivers/staging/dgnc/dgnc_neo.c | 1878 -------------------- drivers/staging/dgnc/dgnc_neo.h | 157 -- drivers/staging/dgnc/dgnc_pci.h | 75 - drivers/staging/dgnc/dgnc_sysfs.c | 750 -------- drivers/staging/dgnc/dgnc_sysfs.h | 49 - drivers/staging/dgnc/dgnc_tty.c | 3201 ----------------------------------- drivers/staging/dgnc/dgnc_tty.h | 42 - drivers/staging/dgnc/dgnc_types.h | 33 - drivers/staging/dgnc/dgnc_utils.c | 70 - drivers/staging/dgnc/dgnc_utils.h | 7 - drivers/staging/dgnc/digi.h | 415 ----- drivers/staging/dgnc/dpacompat.h | 115 -- drivers/tty/serial/Kconfig | 4 +- drivers/tty/serial/jsm/Makefile | 2 +- drivers/tty/serial/jsm/jsm.h | 71 +- drivers/tty/serial/jsm/jsm_cls.c | 985 +++++++++++ drivers/tty/serial/jsm/jsm_driver.c | 156 +- drivers/tty/serial/jsm/jsm_neo.c | 5 - drivers/tty/serial/jsm/jsm_tty.c | 7 +- 32 files changed, 1174 insertions(+), 9958 deletions(-) delete mode 100644 drivers/staging/dgnc/Kconfig delete mode 100644 drivers/staging/dgnc/Makefile delete mode 100644 drivers/staging/dgnc/TODO delete mode 100644 drivers/staging/dgnc/dgnc_cls.c delete mode 100644 drivers/staging/dgnc/dgnc_cls.h delete mode 100644 drivers/staging/dgnc/dgnc_driver.c delete mode 100644 drivers/staging/dgnc/dgnc_driver.h delete mode 100644 drivers/staging/dgnc/dgnc_kcompat.h delete mode 100644 drivers/staging/dgnc/dgnc_mgmt.c delete mode 100644 drivers/staging/dgnc/dgnc_mgmt.h delete mode 100644 drivers/staging/dgnc/dgnc_neo.c delete mode 100644 drivers/staging/dgnc/dgnc_neo.h delete mode 100644 drivers/staging/dgnc/dgnc_pci.h delete mode 100644 drivers/staging/dgnc/dgnc_sysfs.c delete mode 100644 drivers/staging/dgnc/dgnc_sysfs.h delete mode 100644 drivers/staging/dgnc/dgnc_tty.c delete mode 100644 drivers/staging/dgnc/dgnc_tty.h delete mode 100644 drivers/staging/dgnc/dgnc_types.h delete mode 100644 drivers/staging/dgnc/dgnc_utils.c delete mode 100644 drivers/staging/dgnc/dgnc_utils.h delete mode 100644 drivers/staging/dgnc/digi.h delete mode 100644 drivers/staging/dgnc/dpacompat.h create mode 100644 drivers/tty/serial/jsm/jsm_cls.cSignature · 6 lines
1.9.1 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 2/5 drivers: serial: jsm: Add the Classic board implementation
In reply to Konrad ZapalowiczThis commit adds the Digi Classic board implementation to the staging/jsm driver.
The code here is taken from the staging/dgnc driver and modified to match the serial/jsm state. This work is mostly based on the changes that has been done to the code handling the Digi Neo cards with the inspiration coming from the diff between staging/dgnc and serial/jsm as well as the LKML history for the jsm_neo.c
The code compiles now and has no sparse and checkpatch errors or warnings.
--- drivers/tty/serial/jsm/Makefile | 2 +- drivers/tty/serial/jsm/jsm.h | 3 +- drivers/tty/serial/jsm/jsm_cls.c | 990 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 993 insertions(+), 2 deletions(-) create mode 100644 drivers/tty/serial/jsm/jsm_cls.c
drivers/tty/serial/jsm/Makefile +1 -1
@@ -4,5 +4,5 @@ obj-$(CONFIG_SERIAL_JSM) += jsm.o -jsm-objs := jsm_driver.o jsm_neo.o jsm_tty.o +jsm-objs := jsm_driver.o jsm_neo.o jsm_tty.o jsm_cls.o
drivers/tty/serial/jsm/jsm.h +2 -1
@@ -189,7 +189,7 @@ struct jsm_board#define CH_LOOPBACK 0x2000/* Channel is in lookback mode */ #define CH_BAUD0 0x08000/* Used for checking B0 transitions */ -/* Our Read/Error/Write queue sizes */ +/* Our Read/Error queue sizes */ #define RQUEUEMASK 0x1FFF/* 8 K - 1 */ #define EQUEUEMASK 0x1FFF/* 8 K - 1 */ #define RQUEUESIZE (RQUEUEMASK + 1)
@@ -431,6 +431,7 @@ struct neo_uart_struct {*/ extern struct uart_driver jsm_uart_driver;extern struct board_ops jsm_neo_ops; +extern struct board_ops jsm_cls_ops;extern int jsm_debug;/*************************************************************************
drivers/tty/serial/jsm/jsm_cls.c new file +990 -0
990 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 3/5 drivers: serial: jsm: Enable support for Digi Classic adapters
This commit enables support for the Digi Classic adapters line in the jsm driver. This means changes in:
- device probing code
- device cleanup code
- driver description (Kconfig)
The init/cleanup code is based on the staging/dgnc driver.
--- drivers/tty/serial/Kconfig | 4 +- drivers/tty/serial/jsm/jsm.h | 4 + drivers/tty/serial/jsm/jsm_driver.c | 151 ++++++++++++++++++++++++++++-------- drivers/tty/serial/jsm/jsm_tty.c | 2 + 4 files changed, 128 insertions(+), 33 deletions(-)
drivers/tty/serial/Kconfig +2 -2
@@ -1029,11 +1029,11 @@ config SERIAL_VR41XX_CONSOLE a console on a serial port, say Y. Otherwise, say N. config SERIAL_JSM - tristate "Digi International NEO PCI Support" + tristate "Digi International NEO and Classic PCI Support" depends on PCI select SERIAL_CORE help - This is a driver for Digi International's Neo series + This is a driver for Digi International's Neo and Classic series of cards which provide multiple serial ports. You would need something like this to connect more than two modems to your Linux box, for instance in order to become a dial-in server. This driver
drivers/tty/serial/jsm/jsm.h +4 -0
@@ -68,6 +68,10 @@ do { \#define MAX_STOPS_SENT 5/* Board ids */ +#define PCI_DEVICE_ID_CLASSIC_4 0x0028 +#define PCI_DEVICE_ID_CLASSIC_8 0x0029 +#define PCI_DEVICE_ID_CLASSIC_4_422 0x00D0 +#define PCI_DEVICE_ID_CLASSIC_8_422 0x00D1#define PCI_DEVICE_ID_NEO_4 0x00B0#define PCI_DEVICE_ID_NEO_1_422 0x00CC#define PCI_DEVICE_ID_NEO_1_422_485 0x00CD
drivers/tty/serial/jsm/jsm_driver.c +120 -31
226 lines not on this page · raw message
drivers/tty/serial/jsm/jsm_tty.c +2 -0
@@ -415,6 +415,8 @@ int jsm_tty_init(struct jsm_board *brd)if (brd->bd_uart_offset ==0x200 ) ch->ch_neo_uart = vaddr + (brd->bd_uart_offset * i); +else + ch->ch_cls_uart = vaddr + (brd->bd_uart_offset * i); ch->ch_bd = brd; ch->ch_portnum = i;
Signature · 1 line
1.9.1
PATCH 4/5 staging: dgnc: Remove driver in favor of serial/jsm driver
This commit removes the staging/dgnc driver in favor of the serial/jsm driver.
This is because the serial/jsm driver now supports all of the hardware that has been supported by the staging/dgnc plus it offers better overall quality.
Given above the staging/dgnc is obsolete now.
--- MAINTAINERS | 7 - drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/dgnc/Kconfig | 6 - drivers/staging/dgnc/Makefile | 8 - drivers/staging/dgnc/TODO | 10 - drivers/staging/dgnc/dgnc_cls.c | 1389 --------------- drivers/staging/dgnc/dgnc_cls.h | 89 - drivers/staging/dgnc/dgnc_driver.c | 757 --------- drivers/staging/dgnc/dgnc_driver.h | 465 ----- drivers/staging/dgnc/dgnc_kcompat.h | 64 - drivers/staging/dgnc/dgnc_mgmt.c | 281 --- drivers/staging/dgnc/dgnc_mgmt.h | 31 - drivers/staging/dgnc/dgnc_neo.c | 1878 -------------------- drivers/staging/dgnc/dgnc_neo.h | 157 -- drivers/staging/dgnc/dgnc_pci.h | 75 - drivers/staging/dgnc/dgnc_sysfs.c | 750 -------- drivers/staging/dgnc/dgnc_sysfs.h | 49 - drivers/staging/dgnc/dgnc_tty.c | 3201 ----------------------------------- drivers/staging/dgnc/dgnc_tty.h | 42 - drivers/staging/dgnc/dgnc_types.h | 33 - drivers/staging/dgnc/dgnc_utils.c | 70 - drivers/staging/dgnc/dgnc_utils.h | 7 - drivers/staging/dgnc/digi.h | 415 ----- drivers/staging/dgnc/dpacompat.h | 115 -- 25 files changed, 9902 deletions(-) delete mode 100644 drivers/staging/dgnc/Kconfig delete mode 100644 drivers/staging/dgnc/Makefile delete mode 100644 drivers/staging/dgnc/TODO delete mode 100644 drivers/staging/dgnc/dgnc_cls.c delete mode 100644 drivers/staging/dgnc/dgnc_cls.h delete mode 100644 drivers/staging/dgnc/dgnc_driver.c delete mode 100644 drivers/staging/dgnc/dgnc_driver.h delete mode 100644 drivers/staging/dgnc/dgnc_kcompat.h delete mode 100644 drivers/staging/dgnc/dgnc_mgmt.c delete mode 100644 drivers/staging/dgnc/dgnc_mgmt.h delete mode 100644 drivers/staging/dgnc/dgnc_neo.c delete mode 100644 drivers/staging/dgnc/dgnc_neo.h delete mode 100644 drivers/staging/dgnc/dgnc_pci.h delete mode 100644 drivers/staging/dgnc/dgnc_sysfs.c delete mode 100644 drivers/staging/dgnc/dgnc_sysfs.h delete mode 100644 drivers/staging/dgnc/dgnc_tty.c delete mode 100644 drivers/staging/dgnc/dgnc_tty.h delete mode 100644 drivers/staging/dgnc/dgnc_types.h delete mode 100644 drivers/staging/dgnc/dgnc_utils.c delete mode 100644 drivers/staging/dgnc/dgnc_utils.h delete mode 100644 drivers/staging/dgnc/digi.h delete mode 100644 drivers/staging/dgnc/dpacompat.h
MAINTAINERS +0 -7
@@ -2992,13 +2992,6 @@ F: include/linux/mfd/da9063/ F: include/sound/da[79]*.h F: sound/soc/codecs/da[79]*.[ch] -DIGI NEO AND CLASSIC PCI PRODUCTS -M: Lidza Louina <[email protected]> -M: Mark Hounschell <[email protected]> -L: [email protected] -S: Maintained -F: drivers/staging/dgnc/ - DIGI EPCA PCI PRODUCTS M: Lidza Louina <[email protected]> M: Mark Hounschell <[email protected]>
drivers/staging/Kconfig +0 -2
@@ -98,8 +98,6 @@ source "drivers/staging/mt29f_spinand/Kconfig" source "drivers/staging/lustre/Kconfig" -source "drivers/staging/dgnc/Kconfig" - source "drivers/staging/dgap/Kconfig" source "drivers/staging/gs_fpgaboot/Kconfig"
drivers/staging/Makefile +0 -1
@@ -40,7 +40,6 @@ obj-$(CONFIG_DRM_IMX) += imx-drm/ obj-$(CONFIG_FIREWIRE_SERIAL) += fwserial/ obj-$(CONFIG_GOLDFISH) += goldfish/ obj-$(CONFIG_LUSTRE_FS) += lustre/ -obj-$(CONFIG_DGNC) += dgnc/ obj-$(CONFIG_DGAP) += dgap/ obj-$(CONFIG_MTD_SPINAND_MT29F) += mt29f_spinand/ obj-$(CONFIG_GS_FPGABOOT) += gs_fpgaboot/
drivers/staging/dgnc/Kconfig deleted +0 -6
@@ -1,6 +0,0 @@ -config DGNC - tristate "Digi Neo and Classic PCI Products" - default n - depends on TTY && PCI - ---help--- - Driver for the Digi International Neo and Classic PCI based product line.
drivers/staging/dgnc/Makefile deleted +0 -8
@@ -1,8 +0,0 @@ -EXTRA_CFLAGS += -DDG_NAME=\"dgnc-1.3-16\" -DDG_PART=\"40002369_F\" - -obj-$(CONFIG_DGNC) += dgnc.o - -dgnc-objs := dgnc_cls.o dgnc_driver.o\ - dgnc_mgmt.o dgnc_neo.o\ - dgnc_tty.o dgnc_sysfs.o\ - dgnc_utils.o
drivers/staging/dgnc/TODO deleted +0 -10
@@ -1,10 +0,0 @@ -* checkpatch fixes -* remove unecessary comments -* remove unecessary error messages. Example kzalloc() has its - own error message. Adding an extra one is useless. -* use goto statements for error handling when appropriate -* there is a lot of unecessary code in the driver. It was - originally a standalone driver. Remove uneeded code. - -Please send patches to Greg Kroah-Hartman <[email protected]> and -Cc: Lidza Louina <[email protected]>
drivers/staging/dgnc/dgnc_cls.c deleted +0 -1389
1,389 lines not on this page · raw message
drivers/staging/dgnc/dgnc_cls.h deleted +0 -89
89 lines not on this page · raw message
drivers/staging/dgnc/dgnc_driver.c deleted +0 -757
757 lines not on this page · raw message
drivers/staging/dgnc/dgnc_driver.h deleted +0 -465
465 lines not on this page · raw message
drivers/staging/dgnc/dgnc_kcompat.h deleted +0 -64
64 lines not on this page · raw message
drivers/staging/dgnc/dgnc_mgmt.c deleted +0 -281
184 lines not on this page · raw message
drivers/staging/dgnc/dgnc_mgmt.h deleted +0 -31
Lines of this file are not shown. View the raw message.
drivers/staging/dgnc/dgnc_neo.c deleted +0 -1878
1,878 lines not on this page · raw message
drivers/staging/dgnc/dgnc_neo.h deleted +0 -157
157 lines not on this page · raw message
drivers/staging/dgnc/dgnc_pci.h deleted +0 -75
75 lines not on this page · raw message
drivers/staging/dgnc/dgnc_sysfs.c deleted +0 -750
750 lines not on this page · raw message
drivers/staging/dgnc/dgnc_sysfs.h deleted +0 -49
49 lines not on this page · raw message
drivers/staging/dgnc/dgnc_tty.c deleted +0 -3201
3,201 lines not on this page · raw message
drivers/staging/dgnc/dgnc_tty.h deleted +0 -42
42 lines not on this page · raw message
drivers/staging/dgnc/dgnc_types.h deleted +0 -33
Lines of this file are not shown. View the raw message.
drivers/staging/dgnc/dgnc_utils.c deleted +0 -70
70 lines not on this page · raw message
drivers/staging/dgnc/dgnc_utils.h deleted +0 -7
Lines of this file are not shown. View the raw message.
drivers/staging/dgnc/digi.h deleted +0 -415
415 lines not on this page · raw message
drivers/staging/dgnc/dpacompat.h deleted +0 -115
115 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.9.1
Part of the diff is not shown here. View the raw message.
PATCH 1/5 drivers: serial: jsm: Add Classic board UART structure
In reply to Dan CarpenterThis commit adds the UART structure for the Digi Classic cards. This code comes from the staging/dgnc driver.
--- drivers/tty/serial/jsm/jsm.h | 59 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-)
drivers/tty/serial/jsm/jsm.h +58 -1
@@ -222,7 +222,10 @@ struct jsm_channel {u8 ch_mostat;/* FEP output modem status */ u8 ch_mistat;/* FEP input modem status */ -struct neo_uart_struct __iomem *ch_neo_uart;/* Pointer to the "mapped" UART struct */ +/* Pointers to the "mapped" UART structs */ +struct neo_uart_struct __iomem *ch_neo_uart;/* NEO card */ +struct cls_uart_struct __iomem *ch_cls_uart;/* Classic card */ +u8 ch_cached_lsr;/* Cached value of the LSR register */ u8 *ch_rqueue;/* Our read queue buffer - malloc'ed */
@@ -254,6 +257,60 @@ struct jsm_channel {u64 ch_xoff_sends;/* Count of xoffs transmitted */ }; +/************************************************************************ +* Per channel/port Classic UART structures * +************************************************************************ +* Base Structure Entries Usage Meanings to Host * +* * +* W = read write R = read only * +* U = Unused. * +************************************************************************/ + +struct cls_uart_struct { +u8 txrx;/* WR RHR/THR - Holding Reg */ +u8 ier;/* WR IER - Interrupt Enable Reg */ +u8 isr_fcr;/* WR ISR/FCR - Interrupt Status Reg/Fifo Control Reg*/ +u8 lcr;/* WR LCR - Line Control Reg */ +u8 mcr;/* WR MCR - Modem Control Reg */ +u8 lsr;/* WR LSR - Line Status Reg */ +u8 msr;/* WR MSR - Modem Status Reg */ +u8 spr;/* WR SPR - Scratch Pad Reg */ +}; + +/* Where to read the interrupt register (8bits) */ +#define UART_CLASSIC_POLL_ADDR_OFFSET 0x40 + +#define UART_EXAR654_ENHANCED_REGISTER_SET 0xBF + +#define UART_16654_FCR_TXTRIGGER_8 0x0 +#define UART_16654_FCR_TXTRIGGER_16 0x10 +#define UART_16654_FCR_TXTRIGGER_32 0x20 +#define UART_16654_FCR_TXTRIGGER_56 0x30 + +#define UART_16654_FCR_RXTRIGGER_8 0x0 +#define UART_16654_FCR_RXTRIGGER_16 0x40 +#define UART_16654_FCR_RXTRIGGER_56 0x80 +#define UART_16654_FCR_RXTRIGGER_60 0xC0 + +#define UART_IIR_CTSRTS 0x20/* Received CTS/RTS change of state */ +#define UART_IIR_RDI_TIMEOUT 0x0C/* Receiver data TIMEOUT */ + +/* +* These are the EXTENDED definitions for the Exar 654's Interrupt +* Enable Register. +*/ +#define UART_EXAR654_EFR_ECB 0x10/* Enhanced control bit */ +#define UART_EXAR654_EFR_IXON 0x2/* Receiver compares Xon1/Xoff1 */ +#define UART_EXAR654_EFR_IXOFF 0x8/* Transmit Xon1/Xoff1 */ +#define UART_EXAR654_EFR_RTSDTR 0x40/* Auto RTS/DTR Flow Control Enable */ +#define UART_EXAR654_EFR_CTSDSR 0x80/* Auto CTS/DSR Flow COntrol Enable */ + +#define UART_EXAR654_XOFF_DETECT 0x1/* Indicates whether chip saw an incoming XOFF char */ +#define UART_EXAR654_XON_DETECT 0x2/* Indicates whether chip saw an incoming XON char */ + +#define UART_EXAR654_IER_XOFF 0x20/* Xoff Interrupt Enable */ +#define UART_EXAR654_IER_RTSDTR 0x40/* Output Interrupt Enable */ +#define UART_EXAR654_IER_CTSDSR 0x80/* Input Interrupt Enable */ /************************************************************************ * Per channel/port NEO UART structure *
Signature · 1 line
1.9.1
Greg KH
maintainerRe: [PATCH 2/5] drivers: serial: jsm: Add the Classic board implementation
In reply to Konrad ZapalowiczQuoted 11 lines · Konrad Zapalowicz
This commit adds the Digi Classic board implementation to the staging/jsm driver.
The code here is taken from the staging/dgnc driver and modified to match the serial/jsm state. This work is mostly based on the changes that has been done to the code handling the Digi Neo cards with the inspiration coming from the diff between staging/dgnc and serial/jsm as well as the LKML history for the
jsm_neo.cThe code compiles now and has no sparse and checkpatch errors or warnings.
The compiler does give me one warning for this file:
Quoted 52 lines
drivers/tty/serial/jsm/jsm_cls.c new file +52
-0+/* +* cls_param() +* Send any/all changes to the line to the UART. +*/ +static void cls_param (struct jsm_channel *ch) +{ +u8 lcr =0 ; +u8 uart_lcr =0 ; +u8 ier =0 ; +u32 baud =9600 ; +int quot =0 ; +struct jsm_board *bd; +int i; +unsigned int cflag; + + bd = ch->ch_bd; +if (!bd) +return ; + +/* +* If baud rate is zero, flush queues, and set mval to drop DTR. +*/ +if ((ch->ch_c_cflag & (CBAUD )) ==0 ) { + ch->ch_r_head =0 ; + ch->ch_r_tail =0 ; + ch->ch_e_head =0 ; + ch->ch_e_tail =0 ; + +cls_flush_uart_write (ch); +cls_flush_uart_read (ch); + +/* The baudrate is B0 so all modem lines are to be dropped. */ + ch->ch_flags |= (CH_BAUD0 ); + ch->ch_mostat &= ~(UART_MCR_RTS |UART_MCR_DTR ); +cls_assert_modem_signals (ch); +return ; + } + +static struct { +unsigned int rate; +unsigned int cflag; + } baud_rates[] = { + {921600 ,B921600 }, + {460800 ,B460800 }, + {230400 ,B230400 }, + {115200 ,B115200 }, + {57600 ,B57600 }, + {38400 ,B38400 }, + {19200 ,B19200 }, + {9600 ,B9600 }, + {4800 ,B4800 }, + {2400 ,B2400 },
drivers/tty/serial/jsm/jsm_cls.c line 724
Quoted 10 lines
drivers/tty/serial/jsm/jsm_cls.c new file +10
-0+ { 1200, B1200 }, + { 600, B600 }, + { 300, B300 }, + { 200, B200 }, + { 150, B150 }, + { 134, B134 }, + { 110, B110 }, + { 75, B75 }, + { 50, B50 }, + };
baud_rates needs to be up above the code, as gcc tells me:
drivers/tty/serial/jsm/jsm_cls.c: In function ‘cls_param’:drivers/tty/serial/jsm/jsm_cls.c:701:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
static struct {
^
Can you fix that up and resend the series? I've taken the first patch in this series, as that is an easy one to accept, so no need to resend that one.
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
v2 cover serial: jsm: Add support for the Digi Classic adapters
The staging/dgnc and the serial/jsm drivers have the same origin. They come from the same codebase however the jsm is the community adopted version where the dgnc is kind of a direct submission from the Digi company.
The recent commits to the jsm driver moved in the support for some of the Neo cards from the dgnc driver. This series of patches continues this trend by moving the support for the remaining Digi adapters (the Classic line) from dgnc to the jsm driver.
This code is heavily based on the changes that were applied to the jsm/dgnc code when the support for the Neo adapters was moved to the mainline (git diff and LKML archives).
Since after this change is applied the staging/dgnc driver is obsolete (no devices supported) it has been removed.
I do not own the Classic card therefore I was unable to test it. I did my best being super-carefull during the implementation however it is highly recommended that someone tests it.
Changelog:
v2:
move the declaration static structure describing baud_rates from the function to the top of the file. this removes the one compilation warning. this change is in the 2nd patch of the series.
since Greg has already merged the patch 01 from the first series this time it is not attached therefore this series has only 4 patches in it (previously was 5).
Konrad Zapalowicz (4):
drivers: serial: jsm: Add the Classic board implementation
drivers: serial: jsm: Enable support for Digi Classic adapters
staging: dgnc: Remove driver in favor of serial/jsm driver
drivers: serial: jsm: Remove FSF address from the file
documentation/header
MAINTAINERS | 7 - drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/dgnc/Kconfig | 6 - drivers/staging/dgnc/Makefile | 8 - drivers/staging/dgnc/TODO | 10 - drivers/staging/dgnc/dgnc_cls.c | 1389 --------------- drivers/staging/dgnc/dgnc_cls.h | 89 - drivers/staging/dgnc/dgnc_driver.c | 757 --------- drivers/staging/dgnc/dgnc_driver.h | 465 ----- drivers/staging/dgnc/dgnc_kcompat.h | 64 - drivers/staging/dgnc/dgnc_mgmt.c | 281 --- drivers/staging/dgnc/dgnc_mgmt.h | 31 - drivers/staging/dgnc/dgnc_neo.c | 1878 -------------------- drivers/staging/dgnc/dgnc_neo.h | 157 -- drivers/staging/dgnc/dgnc_pci.h | 75 - drivers/staging/dgnc/dgnc_sysfs.c | 750 -------- drivers/staging/dgnc/dgnc_sysfs.h | 49 - drivers/staging/dgnc/dgnc_tty.c | 3201 ----------------------------------- drivers/staging/dgnc/dgnc_tty.h | 42 - drivers/staging/dgnc/dgnc_types.h | 33 - drivers/staging/dgnc/dgnc_utils.c | 70 - drivers/staging/dgnc/dgnc_utils.h | 7 - drivers/staging/dgnc/digi.h | 415 ----- drivers/staging/dgnc/dpacompat.h | 115 -- drivers/tty/serial/Kconfig | 4 +- drivers/tty/serial/jsm/Makefile | 2 +- drivers/tty/serial/jsm/jsm.h | 12 +- drivers/tty/serial/jsm/jsm_cls.c | 985 +++++++++++ drivers/tty/serial/jsm/jsm_driver.c | 156 +- drivers/tty/serial/jsm/jsm_neo.c | 5 - drivers/tty/serial/jsm/jsm_tty.c | 7 +- 32 files changed, 1116 insertions(+), 9957 deletions(-) delete mode 100644 drivers/staging/dgnc/Kconfig delete mode 100644 drivers/staging/dgnc/Makefile delete mode 100644 drivers/staging/dgnc/TODO delete mode 100644 drivers/staging/dgnc/dgnc_cls.c delete mode 100644 drivers/staging/dgnc/dgnc_cls.h delete mode 100644 drivers/staging/dgnc/dgnc_driver.c delete mode 100644 drivers/staging/dgnc/dgnc_driver.h delete mode 100644 drivers/staging/dgnc/dgnc_kcompat.h delete mode 100644 drivers/staging/dgnc/dgnc_mgmt.c delete mode 100644 drivers/staging/dgnc/dgnc_mgmt.h delete mode 100644 drivers/staging/dgnc/dgnc_neo.c delete mode 100644 drivers/staging/dgnc/dgnc_neo.h delete mode 100644 drivers/staging/dgnc/dgnc_pci.h delete mode 100644 drivers/staging/dgnc/dgnc_sysfs.c delete mode 100644 drivers/staging/dgnc/dgnc_sysfs.h delete mode 100644 drivers/staging/dgnc/dgnc_tty.c delete mode 100644 drivers/staging/dgnc/dgnc_tty.h delete mode 100644 drivers/staging/dgnc/dgnc_types.h delete mode 100644 drivers/staging/dgnc/dgnc_utils.c delete mode 100644 drivers/staging/dgnc/dgnc_utils.h delete mode 100644 drivers/staging/dgnc/digi.h delete mode 100644 drivers/staging/dgnc/dpacompat.h create mode 100644 drivers/tty/serial/jsm/jsm_cls.c
Signature · 1 line
1.9.1
PATCH v2 1/4 drivers: serial: jsm: Add the Classic board implementation
This commit adds the Digi Classic board implementation to the staging/jsm driver.
The code here is taken from the staging/dgnc driver and modified to match the serial/jsm state. This work is mostly based on the changes that has been done to the code handling the Digi Neo cards with the inspiration coming from the diff between staging/dgnc and serial/jsm as well as the LKML history for the jsm_neo.c
The code compiles now and has no sparse and checkpatch errors or warnings.
--- drivers/tty/serial/jsm/Makefile | 2 +- drivers/tty/serial/jsm/jsm.h | 3 +- drivers/tty/serial/jsm/jsm_cls.c | 990 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 993 insertions(+), 2 deletions(-) create mode 100644 drivers/tty/serial/jsm/jsm_cls.c
drivers/tty/serial/jsm/Makefile +1 -1
@@ -4,5 +4,5 @@ obj-$(CONFIG_SERIAL_JSM) += jsm.o -jsm-objs := jsm_driver.o jsm_neo.o jsm_tty.o +jsm-objs := jsm_driver.o jsm_neo.o jsm_tty.o jsm_cls.o
drivers/tty/serial/jsm/jsm.h +2 -1
@@ -189,7 +189,7 @@ struct jsm_board#define CH_LOOPBACK 0x2000/* Channel is in lookback mode */ #define CH_BAUD0 0x08000/* Used for checking B0 transitions */ -/* Our Read/Error/Write queue sizes */ +/* Our Read/Error queue sizes */ #define RQUEUEMASK 0x1FFF/* 8 K - 1 */ #define EQUEUEMASK 0x1FFF/* 8 K - 1 */ #define RQUEUESIZE (RQUEUEMASK + 1)
@@ -431,6 +431,7 @@ struct neo_uart_struct {*/ extern struct uart_driver jsm_uart_driver;extern struct board_ops jsm_neo_ops; +extern struct board_ops jsm_cls_ops;extern int jsm_debug;/*************************************************************************
drivers/tty/serial/jsm/jsm_cls.c new file +990 -0
990 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v2 2/4 drivers: serial: jsm: Enable support for Digi Classic adapters
This commit enables support for the Digi Classic adapters line in the jsm driver. This means changes in:
- device probing code
- device cleanup code
- driver description (Kconfig)
The init/cleanup code is based on the staging/dgnc driver.
--- drivers/tty/serial/Kconfig | 4 +- drivers/tty/serial/jsm/jsm.h | 4 + drivers/tty/serial/jsm/jsm_driver.c | 151 ++++++++++++++++++++++++++++-------- drivers/tty/serial/jsm/jsm_tty.c | 2 + 4 files changed, 128 insertions(+), 33 deletions(-)
drivers/tty/serial/Kconfig +2 -2
@@ -1029,11 +1029,11 @@ config SERIAL_VR41XX_CONSOLE a console on a serial port, say Y. Otherwise, say N. config SERIAL_JSM - tristate "Digi International NEO PCI Support" + tristate "Digi International NEO and Classic PCI Support" depends on PCI select SERIAL_CORE help - This is a driver for Digi International's Neo series + This is a driver for Digi International's Neo and Classic series of cards which provide multiple serial ports. You would need something like this to connect more than two modems to your Linux box, for instance in order to become a dial-in server. This driver
drivers/tty/serial/jsm/jsm.h +4 -0
@@ -68,6 +68,10 @@ do { \#define MAX_STOPS_SENT 5/* Board ids */ +#define PCI_DEVICE_ID_CLASSIC_4 0x0028 +#define PCI_DEVICE_ID_CLASSIC_8 0x0029 +#define PCI_DEVICE_ID_CLASSIC_4_422 0x00D0 +#define PCI_DEVICE_ID_CLASSIC_8_422 0x00D1#define PCI_DEVICE_ID_NEO_4 0x00B0#define PCI_DEVICE_ID_NEO_1_422 0x00CC#define PCI_DEVICE_ID_NEO_1_422_485 0x00CD
drivers/tty/serial/jsm/jsm_driver.c +120 -31
226 lines not on this page · raw message
drivers/tty/serial/jsm/jsm_tty.c +2 -0
@@ -415,6 +415,8 @@ int jsm_tty_init(struct jsm_board *brd)if (brd->bd_uart_offset ==0x200 ) ch->ch_neo_uart = vaddr + (brd->bd_uart_offset * i); +else + ch->ch_cls_uart = vaddr + (brd->bd_uart_offset * i); ch->ch_bd = brd; ch->ch_portnum = i;
Signature · 1 line
1.9.1
PATCH v2 3/4 staging: dgnc: Remove driver in favor of serial/jsm driver
This commit removes the staging/dgnc driver in favor of the serial/jsm driver.
This is because the serial/jsm driver now supports all of the hardware that has been supported by the staging/dgnc plus it offers better overall quality.
Given above the staging/dgnc is obsolete now.
--- MAINTAINERS | 7 - drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/dgnc/Kconfig | 6 - drivers/staging/dgnc/Makefile | 8 - drivers/staging/dgnc/TODO | 10 - drivers/staging/dgnc/dgnc_cls.c | 1389 --------------- drivers/staging/dgnc/dgnc_cls.h | 89 - drivers/staging/dgnc/dgnc_driver.c | 757 --------- drivers/staging/dgnc/dgnc_driver.h | 465 ----- drivers/staging/dgnc/dgnc_kcompat.h | 64 - drivers/staging/dgnc/dgnc_mgmt.c | 281 --- drivers/staging/dgnc/dgnc_mgmt.h | 31 - drivers/staging/dgnc/dgnc_neo.c | 1878 -------------------- drivers/staging/dgnc/dgnc_neo.h | 157 -- drivers/staging/dgnc/dgnc_pci.h | 75 - drivers/staging/dgnc/dgnc_sysfs.c | 750 -------- drivers/staging/dgnc/dgnc_sysfs.h | 49 - drivers/staging/dgnc/dgnc_tty.c | 3201 ----------------------------------- drivers/staging/dgnc/dgnc_tty.h | 42 - drivers/staging/dgnc/dgnc_types.h | 33 - drivers/staging/dgnc/dgnc_utils.c | 70 - drivers/staging/dgnc/dgnc_utils.h | 7 - drivers/staging/dgnc/digi.h | 415 ----- drivers/staging/dgnc/dpacompat.h | 115 -- 25 files changed, 9902 deletions(-) delete mode 100644 drivers/staging/dgnc/Kconfig delete mode 100644 drivers/staging/dgnc/Makefile delete mode 100644 drivers/staging/dgnc/TODO delete mode 100644 drivers/staging/dgnc/dgnc_cls.c delete mode 100644 drivers/staging/dgnc/dgnc_cls.h delete mode 100644 drivers/staging/dgnc/dgnc_driver.c delete mode 100644 drivers/staging/dgnc/dgnc_driver.h delete mode 100644 drivers/staging/dgnc/dgnc_kcompat.h delete mode 100644 drivers/staging/dgnc/dgnc_mgmt.c delete mode 100644 drivers/staging/dgnc/dgnc_mgmt.h delete mode 100644 drivers/staging/dgnc/dgnc_neo.c delete mode 100644 drivers/staging/dgnc/dgnc_neo.h delete mode 100644 drivers/staging/dgnc/dgnc_pci.h delete mode 100644 drivers/staging/dgnc/dgnc_sysfs.c delete mode 100644 drivers/staging/dgnc/dgnc_sysfs.h delete mode 100644 drivers/staging/dgnc/dgnc_tty.c delete mode 100644 drivers/staging/dgnc/dgnc_tty.h delete mode 100644 drivers/staging/dgnc/dgnc_types.h delete mode 100644 drivers/staging/dgnc/dgnc_utils.c delete mode 100644 drivers/staging/dgnc/dgnc_utils.h delete mode 100644 drivers/staging/dgnc/digi.h delete mode 100644 drivers/staging/dgnc/dpacompat.h
MAINTAINERS +0 -7
@@ -2992,13 +2992,6 @@ F: include/linux/mfd/da9063/ F: include/sound/da[79]*.h F: sound/soc/codecs/da[79]*.[ch] -DIGI NEO AND CLASSIC PCI PRODUCTS -M: Lidza Louina <[email protected]> -M: Mark Hounschell <[email protected]> -L: [email protected] -S: Maintained -F: drivers/staging/dgnc/ - DIGI EPCA PCI PRODUCTS M: Lidza Louina <[email protected]> M: Mark Hounschell <[email protected]>
drivers/staging/Kconfig +0 -2
@@ -98,8 +98,6 @@ source "drivers/staging/mt29f_spinand/Kconfig" source "drivers/staging/lustre/Kconfig" -source "drivers/staging/dgnc/Kconfig" - source "drivers/staging/dgap/Kconfig" source "drivers/staging/gs_fpgaboot/Kconfig"
drivers/staging/Makefile +0 -1
@@ -40,7 +40,6 @@ obj-$(CONFIG_DRM_IMX) += imx-drm/ obj-$(CONFIG_FIREWIRE_SERIAL) += fwserial/ obj-$(CONFIG_GOLDFISH) += goldfish/ obj-$(CONFIG_LUSTRE_FS) += lustre/ -obj-$(CONFIG_DGNC) += dgnc/ obj-$(CONFIG_DGAP) += dgap/ obj-$(CONFIG_MTD_SPINAND_MT29F) += mt29f_spinand/ obj-$(CONFIG_GS_FPGABOOT) += gs_fpgaboot/
drivers/staging/dgnc/Kconfig deleted +0 -6
@@ -1,6 +0,0 @@ -config DGNC - tristate "Digi Neo and Classic PCI Products" - default n - depends on TTY && PCI - ---help--- - Driver for the Digi International Neo and Classic PCI based product line.
drivers/staging/dgnc/Makefile deleted +0 -8
@@ -1,8 +0,0 @@ -EXTRA_CFLAGS += -DDG_NAME=\"dgnc-1.3-16\" -DDG_PART=\"40002369_F\" - -obj-$(CONFIG_DGNC) += dgnc.o - -dgnc-objs := dgnc_cls.o dgnc_driver.o\ - dgnc_mgmt.o dgnc_neo.o\ - dgnc_tty.o dgnc_sysfs.o\ - dgnc_utils.o
drivers/staging/dgnc/TODO deleted +0 -10
@@ -1,10 +0,0 @@ -* checkpatch fixes -* remove unecessary comments -* remove unecessary error messages. Example kzalloc() has its - own error message. Adding an extra one is useless. -* use goto statements for error handling when appropriate -* there is a lot of unecessary code in the driver. It was - originally a standalone driver. Remove uneeded code. - -Please send patches to Greg Kroah-Hartman <[email protected]> and -Cc: Lidza Louina <[email protected]>
drivers/staging/dgnc/dgnc_cls.c deleted +0 -1389
1,389 lines not on this page · raw message
drivers/staging/dgnc/dgnc_cls.h deleted +0 -89
89 lines not on this page · raw message
drivers/staging/dgnc/dgnc_driver.c deleted +0 -757
757 lines not on this page · raw message
drivers/staging/dgnc/dgnc_driver.h deleted +0 -465
465 lines not on this page · raw message
drivers/staging/dgnc/dgnc_kcompat.h deleted +0 -64
64 lines not on this page · raw message
drivers/staging/dgnc/dgnc_mgmt.c deleted +0 -281
184 lines not on this page · raw message
drivers/staging/dgnc/dgnc_mgmt.h deleted +0 -31
Lines of this file are not shown. View the raw message.
drivers/staging/dgnc/dgnc_neo.c deleted +0 -1878
1,878 lines not on this page · raw message
drivers/staging/dgnc/dgnc_neo.h deleted +0 -157
157 lines not on this page · raw message
drivers/staging/dgnc/dgnc_pci.h deleted +0 -75
75 lines not on this page · raw message
drivers/staging/dgnc/dgnc_sysfs.c deleted +0 -750
750 lines not on this page · raw message
drivers/staging/dgnc/dgnc_sysfs.h deleted +0 -49
49 lines not on this page · raw message
drivers/staging/dgnc/dgnc_tty.c deleted +0 -3201
3,201 lines not on this page · raw message
drivers/staging/dgnc/dgnc_tty.h deleted +0 -42
42 lines not on this page · raw message
drivers/staging/dgnc/dgnc_types.h deleted +0 -33
Lines of this file are not shown. View the raw message.
drivers/staging/dgnc/dgnc_utils.c deleted +0 -70
70 lines not on this page · raw message
drivers/staging/dgnc/dgnc_utils.h deleted +0 -7
Lines of this file are not shown. View the raw message.
drivers/staging/dgnc/digi.h deleted +0 -415
415 lines not on this page · raw message
drivers/staging/dgnc/dpacompat.h deleted +0 -115
115 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.9.1
Part of the diff is not shown here. View the raw message.
PATCH v2 4/4 drivers: serial: jsm: Remove FSF address from the file documentation/header
This commit removes the address of Free Software Foundation from each of the mentioned file in order to suppress the checkpatch warning.
--- drivers/tty/serial/jsm/jsm.h | 5 ----- drivers/tty/serial/jsm/jsm_cls.c | 5 ----- drivers/tty/serial/jsm/jsm_driver.c | 5 ----- drivers/tty/serial/jsm/jsm_neo.c | 5 ----- drivers/tty/serial/jsm/jsm_tty.c | 5 ----- 5 files changed, 25 deletions(-)
drivers/tty/serial/jsm/jsm.h +0 -5
@@ -13,11 +13,6 @@* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 * Temple Place - Suite 330, Boston, -* MA 02111-1307, USA. -* * Contact Information: * Scott H Kilau <[email protected]> * Wendy Xiong <[email protected]>
drivers/tty/serial/jsm/jsm_cls.c +0 -5
@@ -12,11 +12,6 @@* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -* -* * NOTE TO LINUX KERNEL HACKERS: DO NOT REFORMAT THIS CODE! * * This is shared code between Digi's CVS archive and the
drivers/tty/serial/jsm/jsm_driver.c +0 -5
@@ -13,11 +13,6 @@* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 * Temple Place - Suite 330, Boston, -* MA 02111-1307, USA. -* * Contact Information: * Scott H Kilau <[email protected]> * Wendy Xiong <[email protected]>
drivers/tty/serial/jsm/jsm_neo.c +0 -5
@@ -13,11 +13,6 @@* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 * Temple Place - Suite 330, Boston, -* MA 02111-1307, USA. -* * Contact Information: * Scott H Kilau <[email protected]> * Wendy Xiong <[email protected]>
drivers/tty/serial/jsm/jsm_tty.c +0 -5
@@ -13,11 +13,6 @@* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 * Temple Place - Suite 330, Boston, -* MA 02111-1307, USA. -* * Contact Information: * Scott H Kilau <[email protected]> * Ananda Venkatarman <[email protected]>
Signature · 1 line
1.9.1
Re: [PATCH 2/5] drivers: serial: jsm: Add the Classic board implementation
In reply to Greg KHQuoted 80 lines · Greg KH
Quoted 11 lines · Konrad Zapalowicz
This commit adds the Digi Classic board implementation to the staging/jsm driver.
The code here is taken from the staging/dgnc driver and modified to match the serial/jsm state. This work is mostly based on the changes that has been done to the code handling the Digi Neo cards with the inspiration coming from the diff between staging/dgnc and serial/jsm as well as the LKML history for the
jsm_neo.cThe code compiles now and has no sparse and checkpatch errors or warnings.
The compiler does give me one warning for this file:
Quoted 52 lines
drivers/tty/serial/jsm/jsm_cls.c new file +52
-0+/* +* cls_param() +* Send any/all changes to the line to the UART. +*/ +static void cls_param (struct jsm_channel *ch) +{ +u8 lcr =0 ; +u8 uart_lcr =0 ; +u8 ier =0 ; +u32 baud =9600 ; +int quot =0 ; +struct jsm_board *bd; +int i; +unsigned int cflag; + + bd = ch->ch_bd; +if (!bd) +return ; + +/* +* If baud rate is zero, flush queues, and set mval to drop DTR. +*/ +if ((ch->ch_c_cflag & (CBAUD )) ==0 ) { + ch->ch_r_head =0 ; + ch->ch_r_tail =0 ; + ch->ch_e_head =0 ; + ch->ch_e_tail =0 ; + +cls_flush_uart_write (ch); +cls_flush_uart_read (ch); + +/* The baudrate is B0 so all modem lines are to be dropped. */ + ch->ch_flags |= (CH_BAUD0 ); + ch->ch_mostat &= ~(UART_MCR_RTS |UART_MCR_DTR ); +cls_assert_modem_signals (ch); +return ; + } + +static struct { +unsigned int rate; +unsigned int cflag; + } baud_rates[] = { + {921600 ,B921600 }, + {460800 ,B460800 }, + {230400 ,B230400 }, + {115200 ,B115200 }, + {57600 ,B57600 }, + {38400 ,B38400 }, + {19200 ,B19200 }, + {9600 ,B9600 }, + {4800 ,B4800 }, + {2400 ,B2400 },drivers/tty/serial/jsm/jsm_cls.c line 724
Quoted 10 lines
drivers/tty/serial/jsm/jsm_cls.c new file +10
-0+ { 1200, B1200 }, + { 600, B600 }, + { 300, B300 }, + { 200, B200 }, + { 150, B150 }, + { 134, B134 }, + { 110, B110 }, + { 75, B75 }, + { 50, B50 }, + };
baud_ratesneeds to be up above the code, as gcc tells me:
Quoted 7 lines
drivers/tty/serial/jsm/jsm_cls.c: In function ‘cls_param’:drivers/tty/serial/jsm/jsm_cls.c:701:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
static struct {
^Can you fix that up and resend the series? I've taken the first patch in this series, as that is an easy one to accept, so no need to resend that one.
Fixed and delivered. You may notice that the jsm_neo.c code is using the same structure to store the baud rates. If feels natural to change it there too however since the subject of this series is the support for Classic boards I decided not to refactor this now. I'll do it properly later plus I will fix some other things that I have spotted so far in this code.
cheers,
konrad
Quoted 3 lines
thanks,
greg k-h
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Greg KH
maintainerRe: [PATCH v2 3/4] staging: dgnc: Remove driver in favor of serial/jsm driver
In reply to Konrad ZapalowiczQuoted 10 lines · Konrad Zapalowicz
This commit removes the staging/dgnc driver in favor of the serial/jsm driver.
This is because the serial/jsm driver now supports all of the hardware that has been supported by the staging/dgnc plus it offers better overall quality.
Given above the staging/dgnc is obsolete now.
Signed-off-by Konrad Zapalowicz <[email protected]>
I've applied the other patches in this series, but am going to skip this one at the moment until I get some "it works for me" verification from someone who has this hardware.
So you will have to resend this later on when that happens.
thanks,
greg k-h
Re: [PATCH v2 3/4] staging: dgnc: Remove driver in favor of serial/jsm driver
Quoted 8 lines · Greg KH
Quoted 7 lines · Konrad Zapalowicz
This commit removes the staging/dgnc driver in favor of the serial/jsm driver.
This is because the serial/jsm driver now supports all of the hardware that has been supported by the staging/dgnc plus it offers better overall quality.
Quoted 7 lines
Quoted 3 lines
Given above the staging/dgnc is obsolete now.
Signed-off-by Konrad Zapalowicz <[email protected]>I've applied the other patches in this series, but am going to skip this one at the moment until I get some "it works for me" verification from someone who has this hardware.
I will have some patches following-up this series, mostly fixing some minor stuff that I found going through the current jsm code plus the stuff that can now be shared between neo and cls code. So should I send it and it will end up in the tty testing tree or wait till my patches will make it to the next/mainline.
In case you want the patches should I mark them somehow so that you know it is something that should go to the tty testing tree?
Quoted 1 line
So you will have to resend this later on when that happens.
Perfect
cheers,
konrad
Quoted 3 lines
thanks,
greg k-h
Greg KH
maintainerRe: [PATCH v2 3/4] staging: dgnc: Remove driver in favor of serial/jsm driver
Quoted 17 lines · Konrad Zapalowicz
Quoted 8 lines · Greg KH
Quoted 7 lines · Konrad Zapalowicz
This commit removes the staging/dgnc driver in favor of the serial/jsm driver.
This is because the serial/jsm driver now supports all of the hardware that has been supported by the staging/dgnc plus it offers better overall quality.
Quoted 7 lines
Quoted 3 lines
Given above the staging/dgnc is obsolete now.
Signed-off-by Konrad Zapalowicz <[email protected]>I've applied the other patches in this series, but am going to skip this one at the moment until I get some "it works for me" verification from someone who has this hardware.
Quoted 5 lines
I will have some patches following-up this series, mostly fixing some minor stuff that I found going through the current jsm code plus the stuff that can now be shared between neo and cls code. So should I send it and it will end up in the tty testing tree or wait till my patches will make it to the next/mainline.
Please send them whenever you have them done and you feel they are correct.
Quoted 2 lines
In case you want the patches should I mark them somehow so that you know it is something that should go to the tty testing tree?
If you just send them saying it is against my tty-testing (or tty-next, as your patches are now merged into that), it's fine.
thanks,
greg k-h