diff options
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/Config.in | 1 | ||||
-rw-r--r-- | target/linux/config/Config.in.gpio | 10 | ||||
-rw-r--r-- | target/linux/config/Config.in.serial | 11 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/bsd-compatibility.patch (renamed from target/linux/patches/3.14.40/bsd-compatibility.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/cleankernel.patch (renamed from target/linux/patches/3.14.40/cleankernel.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/defaults.patch (renamed from target/linux/patches/3.14.40/defaults.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/disable-netfilter.patch (renamed from target/linux/patches/3.14.40/disable-netfilter.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/export-symbol-for-exmap.patch (renamed from target/linux/patches/3.14.40/export-symbol-for-exmap.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/fblogo.patch (renamed from target/linux/patches/3.14.40/fblogo.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/gemalto.patch (renamed from target/linux/patches/3.14.40/gemalto.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/initramfs-nosizelimit.patch (renamed from target/linux/patches/3.14.40/initramfs-nosizelimit.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/lemote-rfkill.patch (renamed from target/linux/patches/3.14.40/lemote-rfkill.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/microblaze-axi.patch (renamed from target/linux/patches/3.14.40/microblaze-axi.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/microblaze-ethernet.patch (renamed from target/linux/patches/3.14.40/microblaze-ethernet.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/mkpiggy.patch (renamed from target/linux/patches/3.14.40/mkpiggy.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/mptcp.patch (renamed from target/linux/patches/3.14.40/mptcp.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/mtd-rootfs.patch (renamed from target/linux/patches/3.14.40/mtd-rootfs.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/nfsv3-tcp.patch (renamed from target/linux/patches/3.14.40/nfsv3-tcp.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/non-static.patch (renamed from target/linux/patches/3.14.40/non-static.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/ppc64-missing-zlib.patch (renamed from target/linux/patches/3.14.40/ppc64-missing-zlib.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/regmap-boolean.patch (renamed from target/linux/patches/3.14.40/regmap-boolean.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/relocs.patch (renamed from target/linux/patches/3.14.40/relocs.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/sgidefs.patch (renamed from target/linux/patches/3.14.40/sgidefs.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/sortext.patch (renamed from target/linux/patches/3.14.40/sortext.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/startup.patch (renamed from target/linux/patches/3.14.40/startup.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/wlan-cf.patch (renamed from target/linux/patches/3.14.40/wlan-cf.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/xargs.patch (renamed from target/linux/patches/3.14.40/xargs.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/yaffs2.patch (renamed from target/linux/patches/3.14.40/yaffs2.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/3.14.43/zlib-inflate.patch (renamed from target/linux/patches/3.14.40/zlib-inflate.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/4.0.3/cris32-serial.patch | 2886 |
30 files changed, 2908 insertions, 0 deletions
diff --git a/target/linux/Config.in b/target/linux/Config.in index 4595a730b..80cc14627 100644 --- a/target/linux/Config.in +++ b/target/linux/Config.in @@ -8,6 +8,7 @@ source target/linux/config/Config.in.flash source target/linux/config/Config.in.fs source target/linux/config/Config.in.netdevice source target/linux/config/Config.in.usb +source target/linux/config/Config.in.serial source target/linux/config/Config.in.graphics source target/linux/config/Config.in.input source target/linux/config/Config.in.pcmcia diff --git a/target/linux/config/Config.in.gpio b/target/linux/config/Config.in.gpio index 03f7ea5b0..535f9c668 100644 --- a/target/linux/config/Config.in.gpio +++ b/target/linux/config/Config.in.gpio @@ -10,6 +10,9 @@ config ADK_KERNEL_GPIO_SYSFS config ADK_KERNEL_GPIO_GENERIC bool +config ADK_KERNEL_GPIO_DEVRES + bool + config ADK_KERNEL_BCM2708_GPIO bool select ADK_KERNEL_GPIOLIB @@ -30,3 +33,10 @@ config ADK_KERNEL_GPIO_MXC depends on ADK_TARGET_SYSTEM_SOLIDRUN_IMX6 default y if ADK_TARGET_SYSTEM_SOLIDRUN_IMX6 default n + +config ADK_KERNEL_ETRAX_GPIO + bool + select ADK_KERNEL_GPIO_DEVRES + depends on ADK_TARGET_SYSTEM_QEMU_CRIS + default y if ADK_TARGET_SYSTEM_QEMU_CRIS + default n diff --git a/target/linux/config/Config.in.serial b/target/linux/config/Config.in.serial new file mode 100644 index 000000000..79daca3ef --- /dev/null +++ b/target/linux/config/Config.in.serial @@ -0,0 +1,11 @@ +menu "Serial devices support" +depends on ADK_TARGET_WITH_SERIAL || ADK_TARGET_QEMU || ADK_TARGET_VBOX + +config ADK_KERNEL_ETRAXFS_SERIAL + bool "ETRAXFS serial driver" + default y if ADK_TARGET_SYSTEM_QEMU_CRIS + default n + help + Serial driver for ETRAXFS CRISv32 Qemu Emulation. + +endmenu diff --git a/target/linux/patches/3.14.40/bsd-compatibility.patch b/target/linux/patches/3.14.43/bsd-compatibility.patch index b954b658f..b954b658f 100644 --- a/target/linux/patches/3.14.40/bsd-compatibility.patch +++ b/target/linux/patches/3.14.43/bsd-compatibility.patch diff --git a/target/linux/patches/3.14.40/cleankernel.patch b/target/linux/patches/3.14.43/cleankernel.patch index d8c055dc3..d8c055dc3 100644 --- a/target/linux/patches/3.14.40/cleankernel.patch +++ b/target/linux/patches/3.14.43/cleankernel.patch diff --git a/target/linux/patches/3.14.40/defaults.patch b/target/linux/patches/3.14.43/defaults.patch index f071fd1dd..f071fd1dd 100644 --- a/target/linux/patches/3.14.40/defaults.patch +++ b/target/linux/patches/3.14.43/defaults.patch diff --git a/target/linux/patches/3.14.40/disable-netfilter.patch b/target/linux/patches/3.14.43/disable-netfilter.patch index 7b1ca013a..7b1ca013a 100644 --- a/target/linux/patches/3.14.40/disable-netfilter.patch +++ b/target/linux/patches/3.14.43/disable-netfilter.patch diff --git a/target/linux/patches/3.14.40/export-symbol-for-exmap.patch b/target/linux/patches/3.14.43/export-symbol-for-exmap.patch index 4f0fc8449..4f0fc8449 100644 --- a/target/linux/patches/3.14.40/export-symbol-for-exmap.patch +++ b/target/linux/patches/3.14.43/export-symbol-for-exmap.patch diff --git a/target/linux/patches/3.14.40/fblogo.patch b/target/linux/patches/3.14.43/fblogo.patch index cbbb4216f..cbbb4216f 100644 --- a/target/linux/patches/3.14.40/fblogo.patch +++ b/target/linux/patches/3.14.43/fblogo.patch diff --git a/target/linux/patches/3.14.40/gemalto.patch b/target/linux/patches/3.14.43/gemalto.patch index 65f7af1d7..65f7af1d7 100644 --- a/target/linux/patches/3.14.40/gemalto.patch +++ b/target/linux/patches/3.14.43/gemalto.patch diff --git a/target/linux/patches/3.14.40/initramfs-nosizelimit.patch b/target/linux/patches/3.14.43/initramfs-nosizelimit.patch index 40d2f6bd8..40d2f6bd8 100644 --- a/target/linux/patches/3.14.40/initramfs-nosizelimit.patch +++ b/target/linux/patches/3.14.43/initramfs-nosizelimit.patch diff --git a/target/linux/patches/3.14.40/lemote-rfkill.patch b/target/linux/patches/3.14.43/lemote-rfkill.patch index a61488434..a61488434 100644 --- a/target/linux/patches/3.14.40/lemote-rfkill.patch +++ b/target/linux/patches/3.14.43/lemote-rfkill.patch diff --git a/target/linux/patches/3.14.40/microblaze-axi.patch b/target/linux/patches/3.14.43/microblaze-axi.patch index 1a4b17d8c..1a4b17d8c 100644 --- a/target/linux/patches/3.14.40/microblaze-axi.patch +++ b/target/linux/patches/3.14.43/microblaze-axi.patch diff --git a/target/linux/patches/3.14.40/microblaze-ethernet.patch b/target/linux/patches/3.14.43/microblaze-ethernet.patch index 742ab477e..742ab477e 100644 --- a/target/linux/patches/3.14.40/microblaze-ethernet.patch +++ b/target/linux/patches/3.14.43/microblaze-ethernet.patch diff --git a/target/linux/patches/3.14.40/mkpiggy.patch b/target/linux/patches/3.14.43/mkpiggy.patch index 751678b74..751678b74 100644 --- a/target/linux/patches/3.14.40/mkpiggy.patch +++ b/target/linux/patches/3.14.43/mkpiggy.patch diff --git a/target/linux/patches/3.14.40/mptcp.patch b/target/linux/patches/3.14.43/mptcp.patch index 9784e0577..9784e0577 100644 --- a/target/linux/patches/3.14.40/mptcp.patch +++ b/target/linux/patches/3.14.43/mptcp.patch diff --git a/target/linux/patches/3.14.40/mtd-rootfs.patch b/target/linux/patches/3.14.43/mtd-rootfs.patch index 775d5fc80..775d5fc80 100644 --- a/target/linux/patches/3.14.40/mtd-rootfs.patch +++ b/target/linux/patches/3.14.43/mtd-rootfs.patch diff --git a/target/linux/patches/3.14.40/nfsv3-tcp.patch b/target/linux/patches/3.14.43/nfsv3-tcp.patch index 68ed95b08..68ed95b08 100644 --- a/target/linux/patches/3.14.40/nfsv3-tcp.patch +++ b/target/linux/patches/3.14.43/nfsv3-tcp.patch diff --git a/target/linux/patches/3.14.40/non-static.patch b/target/linux/patches/3.14.43/non-static.patch index a967703d0..a967703d0 100644 --- a/target/linux/patches/3.14.40/non-static.patch +++ b/target/linux/patches/3.14.43/non-static.patch diff --git a/target/linux/patches/3.14.40/ppc64-missing-zlib.patch b/target/linux/patches/3.14.43/ppc64-missing-zlib.patch index c6e0616be..c6e0616be 100644 --- a/target/linux/patches/3.14.40/ppc64-missing-zlib.patch +++ b/target/linux/patches/3.14.43/ppc64-missing-zlib.patch diff --git a/target/linux/patches/3.14.40/regmap-boolean.patch b/target/linux/patches/3.14.43/regmap-boolean.patch index d73620e4d..d73620e4d 100644 --- a/target/linux/patches/3.14.40/regmap-boolean.patch +++ b/target/linux/patches/3.14.43/regmap-boolean.patch diff --git a/target/linux/patches/3.14.40/relocs.patch b/target/linux/patches/3.14.43/relocs.patch index 69a7c88a9..69a7c88a9 100644 --- a/target/linux/patches/3.14.40/relocs.patch +++ b/target/linux/patches/3.14.43/relocs.patch diff --git a/target/linux/patches/3.14.40/sgidefs.patch b/target/linux/patches/3.14.43/sgidefs.patch index f00a284d9..f00a284d9 100644 --- a/target/linux/patches/3.14.40/sgidefs.patch +++ b/target/linux/patches/3.14.43/sgidefs.patch diff --git a/target/linux/patches/3.14.40/sortext.patch b/target/linux/patches/3.14.43/sortext.patch index 8fd4e1d6b..8fd4e1d6b 100644 --- a/target/linux/patches/3.14.40/sortext.patch +++ b/target/linux/patches/3.14.43/sortext.patch diff --git a/target/linux/patches/3.14.40/startup.patch b/target/linux/patches/3.14.43/startup.patch index d396b75e4..d396b75e4 100644 --- a/target/linux/patches/3.14.40/startup.patch +++ b/target/linux/patches/3.14.43/startup.patch diff --git a/target/linux/patches/3.14.40/wlan-cf.patch b/target/linux/patches/3.14.43/wlan-cf.patch index fc20759e2..fc20759e2 100644 --- a/target/linux/patches/3.14.40/wlan-cf.patch +++ b/target/linux/patches/3.14.43/wlan-cf.patch diff --git a/target/linux/patches/3.14.40/xargs.patch b/target/linux/patches/3.14.43/xargs.patch index 2c7b3df59..2c7b3df59 100644 --- a/target/linux/patches/3.14.40/xargs.patch +++ b/target/linux/patches/3.14.43/xargs.patch diff --git a/target/linux/patches/3.14.40/yaffs2.patch b/target/linux/patches/3.14.43/yaffs2.patch index f075aa658..f075aa658 100644 --- a/target/linux/patches/3.14.40/yaffs2.patch +++ b/target/linux/patches/3.14.43/yaffs2.patch diff --git a/target/linux/patches/3.14.40/zlib-inflate.patch b/target/linux/patches/3.14.43/zlib-inflate.patch index 58e1f6d21..58e1f6d21 100644 --- a/target/linux/patches/3.14.40/zlib-inflate.patch +++ b/target/linux/patches/3.14.43/zlib-inflate.patch diff --git a/target/linux/patches/4.0.3/cris32-serial.patch b/target/linux/patches/4.0.3/cris32-serial.patch new file mode 100644 index 000000000..0f071cffb --- /dev/null +++ b/target/linux/patches/4.0.3/cris32-serial.patch @@ -0,0 +1,2886 @@ +diff -Nur linux-4.0.3.orig/arch/cris/arch-v32/drivers/Kconfig linux-4.0.3/arch/cris/arch-v32/drivers/Kconfig +--- linux-4.0.3.orig/arch/cris/arch-v32/drivers/Kconfig 2015-05-13 14:14:53.000000000 +0200 ++++ linux-4.0.3/arch/cris/arch-v32/drivers/Kconfig 2015-05-25 17:20:55.000000000 +0200 +@@ -49,24 +49,261 @@ + if you do not need DMA to something else. + ser0 can use dma4 or dma6 for output and dma5 or dma7 for input. + ++choice ++ prompt "Ser0 default port type " ++ depends on ETRAX_SERIAL_PORT0 ++ default ETRAX_SERIAL_PORT0_TYPE_232 ++ help ++ Type of serial port. ++ ++config ETRAX_SERIAL_PORT0_TYPE_232 ++ bool "Ser0 is a RS-232 port" ++ help ++ Configure serial port 0 to be a RS-232 port. ++ ++config ETRAX_SERIAL_PORT0_TYPE_485HD ++ bool "Ser0 is a half duplex RS-485 port" ++ depends on ETRAX_RS485 ++ help ++ Configure serial port 0 to be a half duplex (two wires) RS-485 port. ++ ++config ETRAX_SERIAL_PORT0_TYPE_485FD ++ bool "Ser0 is a full duplex RS-485 port" ++ depends on ETRAX_RS485 ++ help ++ Configure serial port 0 to be a full duplex (four wires) RS-485 port. ++endchoice ++ ++config ETRAX_SER0_DTR_BIT ++ string "Ser 0 DTR bit (empty = not used)" ++ depends on ETRAX_SERIAL_PORT0 ++ ++config ETRAX_SER0_RI_BIT ++ string "Ser 0 RI bit (empty = not used)" ++ depends on ETRAX_SERIAL_PORT0 ++ ++config ETRAX_SER0_DSR_BIT ++ string "Ser 0 DSR bit (empty = not used)" ++ depends on ETRAX_SERIAL_PORT0 ++ ++config ETRAX_SER0_CD_BIT ++ string "Ser 0 CD bit (empty = not used)" ++ depends on ETRAX_SERIAL_PORT0 ++ + config ETRAX_SERIAL_PORT1 + bool "Serial port 1 enabled" + depends on ETRAXFS_SERIAL + help + Enables the ETRAX FS serial driver for ser1 (ttyS1). + ++choice ++ prompt "Ser1 default port type" ++ depends on ETRAX_SERIAL_PORT1 ++ default ETRAX_SERIAL_PORT1_TYPE_232 ++ help ++ Type of serial port. ++ ++config ETRAX_SERIAL_PORT1_TYPE_232 ++ bool "Ser1 is a RS-232 port" ++ help ++ Configure serial port 1 to be a RS-232 port. ++ ++config ETRAX_SERIAL_PORT1_TYPE_485HD ++ bool "Ser1 is a half duplex RS-485 port" ++ depends on ETRAX_RS485 ++ help ++ Configure serial port 1 to be a half duplex (two wires) RS-485 port. ++ ++config ETRAX_SERIAL_PORT1_TYPE_485FD ++ bool "Ser1 is a full duplex RS-485 port" ++ depends on ETRAX_RS485 ++ help ++ Configure serial port 1 to be a full duplex (four wires) RS-485 port. ++endchoice ++ ++config ETRAX_SER1_DTR_BIT ++ string "Ser 1 DTR bit (empty = not used)" ++ depends on ETRAX_SERIAL_PORT1 ++ ++config ETRAX_SER1_RI_BIT ++ string "Ser 1 RI bit (empty = not used)" ++ depends on ETRAX_SERIAL_PORT1 ++ ++config ETRAX_SER1_DSR_BIT ++ string "Ser 1 DSR bit (empty = not used)" ++ depends on ETRAX_SERIAL_PORT1 ++ ++config ETRAX_SER1_CD_BIT ++ string "Ser 1 CD bit (empty = not used)" ++ depends on ETRAX_SERIAL_PORT1 ++ + config ETRAX_SERIAL_PORT2 + bool "Serial port 2 enabled" + depends on ETRAXFS_SERIAL + help + Enables the ETRAX FS serial driver for ser2 (ttyS2). + ++choice ++ prompt "Ser2 default port type" ++ depends on ETRAX_SERIAL_PORT2 ++ default ETRAX_SERIAL_PORT2_TYPE_232 ++ help ++ What DMA channel to use for ser2 ++ ++config ETRAX_SERIAL_PORT2_TYPE_232 ++ bool "Ser2 is a RS-232 port" ++ help ++ Configure serial port 2 to be a RS-232 port. ++ ++config ETRAX_SERIAL_PORT2_TYPE_485HD ++ bool "Ser2 is a half duplex RS-485 port" ++ depends on ETRAX_RS485 ++ help ++ Configure serial port 2 to be a half duplex (two wires) RS-485 port. ++ ++config ETRAX_SERIAL_PORT2_TYPE_485FD ++ bool "Ser2 is a full duplex RS-485 port" ++ depends on ETRAX_RS485 ++ help ++ Configure serial port 2 to be a full duplex (four wires) RS-485 port. ++endchoice ++ ++ ++config ETRAX_SER2_DTR_BIT ++ string "Ser 2 DTR bit (empty = not used)" ++ depends on ETRAX_SERIAL_PORT2 ++ ++config ETRAX_SER2_RI_BIT ++ string "Ser 2 RI bit (empty = not used)" ++ depends on ETRAX_SERIAL_PORT2 ++ ++config ETRAX_SER2_DSR_BIT ++ string "Ser 2 DSR bit (empty = not used)" ++ depends on ETRAX_SERIAL_PORT2 ++ ++config ETRAX_SER2_CD_BIT ++ string "Ser 2 CD bit (empty = not used)" ++ depends on ETRAX_SERIAL_PORT2 ++ + config ETRAX_SERIAL_PORT3 + bool "Serial port 3 enabled" + depends on ETRAXFS_SERIAL + help + Enables the ETRAX FS serial driver for ser3 (ttyS3). + ++choice ++ prompt "Ser3 default port type" ++ depends on ETRAX_SERIAL_PORT3 ++ default ETRAX_SERIAL_PORT3_TYPE_232 ++ help ++ What DMA channel to use for ser3. ++ ++config ETRAX_SERIAL_PORT3_TYPE_232 ++ bool "Ser3 is a RS-232 port" ++ help ++ Configure serial port 3 to be a RS-232 port. ++ ++config ETRAX_SERIAL_PORT3_TYPE_485HD ++ bool "Ser3 is a half duplex RS-485 port" ++ depends on ETRAX_RS485 ++ help ++ Configure serial port 3 to be a half duplex (two wires) RS-485 port. ++ ++config ETRAX_SERIAL_PORT3_TYPE_485FD ++ bool "Ser3 is a full duplex RS-485 port" ++ depends on ETRAX_RS485 ++ help ++ Configure serial port 3 to be a full duplex (four wires) RS-485 port. ++endchoice ++ ++config ETRAX_SER3_DTR_BIT ++ string "Ser 3 DTR bit (empty = not used)" ++ depends on ETRAX_SERIAL_PORT3 ++ ++config ETRAX_SER3_RI_BIT ++ string "Ser 3 RI bit (empty = not used)" ++ depends on ETRAX_SERIAL_PORT3 ++ ++config ETRAX_SER3_DSR_BIT ++ string "Ser 3 DSR bit (empty = not used)" ++ depends on ETRAX_SERIAL_PORT3 ++ ++config ETRAX_SER3_CD_BIT ++ string "Ser 3 CD bit (empty = not used)" ++ depends on ETRAX_SERIAL_PORT3 ++ ++config ETRAX_SERIAL_PORT4 ++ bool "Serial port 4 enabled" ++ depends on ETRAXFS_SERIAL && CRIS_MACH_ARTPEC3 ++ help ++ Enables the ETRAX FS serial driver for ser4 (ttyS4). ++ ++choice ++ prompt "Ser4 default port type" ++ depends on ETRAX_SERIAL_PORT4 ++ default ETRAX_SERIAL_PORT4_TYPE_232 ++ help ++ What DMA channel to use for ser4. ++ ++config ETRAX_SERIAL_PORT4_TYPE_232 ++ bool "Ser4 is a RS-232 port" ++ help ++ Configure serial port 4 to be a RS-232 port. ++ ++config ETRAX_SERIAL_PORT4_TYPE_485HD ++ bool "Ser4 is a half duplex RS-485 port" ++ depends on ETRAX_RS485 ++ help ++ Configure serial port 4 to be a half duplex (two wires) RS-485 port. ++ ++config ETRAX_SERIAL_PORT4_TYPE_485FD ++ bool "Ser4 is a full duplex RS-485 port" ++ depends on ETRAX_RS485 ++ help ++ Configure serial port 4 to be a full duplex (four wires) RS-485 port. ++endchoice ++ ++choice ++ prompt "Ser4 DMA in channel " ++ depends on ETRAX_SERIAL_PORT4 ++ default ETRAX_SERIAL_PORT4_NO_DMA_IN ++ help ++ What DMA channel to use for ser4. ++ ++ ++config ETRAX_SERIAL_PORT4_NO_DMA_IN ++ bool "Ser4 uses no DMA for input" ++ help ++ Do not use DMA for ser4 input. ++ ++config ETRAX_SERIAL_PORT4_DMA9_IN ++ bool "Ser4 uses DMA9 for input" ++ depends on ETRAX_SERIAL_PORT4 ++ help ++ Enables the DMA9 input channel for ser4 (ttyS4). ++ If you do not enable DMA, an interrupt for each character will be ++ used when receiving data. ++ Normally you want to use DMA, unless you use the DMA channel for ++ something else. ++ ++endchoice ++ ++config ETRAX_SER4_DTR_BIT ++ string "Ser 4 DTR bit (empty = not used)" ++ depends on ETRAX_SERIAL_PORT4 ++ ++config ETRAX_SER4_RI_BIT ++ string "Ser 4 RI bit (empty = not used)" ++ depends on ETRAX_SERIAL_PORT4 ++ ++config ETRAX_SER4_DSR_BIT ++ string "Ser 4 DSR bit (empty = not used)" ++ depends on ETRAX_SERIAL_PORT4 ++ ++config ETRAX_SER4_CD_BIT ++ string "Ser 4 CD bit (empty = not used)" ++ depends on ETRAX_SERIAL_PORT4 ++ + config ETRAX_SYNCHRONOUS_SERIAL + bool "Synchronous serial-port support" + depends on ETRAX_ARCH_V32 +diff -Nur linux-4.0.3.orig/arch/cris/include/uapi/asm/ioctls.h linux-4.0.3/arch/cris/include/uapi/asm/ioctls.h +--- linux-4.0.3.orig/arch/cris/include/uapi/asm/ioctls.h 2015-05-13 14:14:53.000000000 +0200 ++++ linux-4.0.3/arch/cris/include/uapi/asm/ioctls.h 2015-05-25 17:20:56.000000000 +0200 +@@ -5,6 +5,10 @@ + #define TIOCSERSETRS485 0x5461 /* enable rs-485 (deprecated) */ + #define TIOCSERWRRS485 0x5462 /* write rs-485 */ + #define TIOCSRS485 0x5463 /* enable rs-485 */ ++#define TIOCSERSETRS485FD 0x5464 /* set rs-485 full/half duplex mode */ ++ ++ ++#define TIOCSERSETDIVISOR 0x5465 /* set the divisor for non standard bauds */ + + #include <asm-generic/ioctls.h> + +diff -Nur linux-4.0.3.orig/drivers/tty/serial/crisv32.c linux-4.0.3/drivers/tty/serial/crisv32.c +--- linux-4.0.3.orig/drivers/tty/serial/crisv32.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.0.3/drivers/tty/serial/crisv32.c 2015-05-25 17:20:56.000000000 +0200 +@@ -0,0 +1,2581 @@ ++/* $Id: crisv32.c,v 1.109 2010-07-09 15:00:44 jespern Exp $ ++ * ++ * Serial port driver for the ETRAX FS chip ++ * ++ * Copyright (C) 1998-2006 Axis Communications AB ++ * ++ * Many, many authors. Based once upon a time on serial.c for 16x50. ++ * ++ * Johan Adolfsson - port to ETRAX FS ++ * Mikael Starvik - port to serial_core framework ++ * ++ */ ++ ++#include <linux/module.h> ++#include <linux/init.h> ++#include <linux/console.h> ++#include <linux/types.h> ++#include <linux/errno.h> ++#include <linux/serial_core.h> ++#include <linux/delay.h> ++#include <linux/slab.h> ++#include <linux/tty_flip.h> ++ ++#include <asm/io.h> ++#include <asm/irq.h> ++#include <asm/uaccess.h> ++ ++#include <dma.h> ++#include <arch/system.h> ++#include <mach/pinmux.h> ++#include <hwregs/dma.h> ++#include <hwregs/reg_rdwr.h> ++#include <hwregs/ser_defs.h> ++#include <hwregs/dma_defs.h> ++#include <hwregs/gio_defs.h> ++#include <hwregs/intr_vect_defs.h> ++#include <hwregs/reg_map.h> ++ ++#define UART_NR CONFIG_ETRAX_SERIAL_PORTS + 1 /* Ports + dummy port */ ++#define SERIAL_RECV_DESCRIPTORS 8 ++ ++/* We only buffer 255 characters here, no need for more tx descriptors. */ ++#define SERIAL_TX_DESCRIPTORS 4 ++ ++/* Kept for experimental purposes. */ ++#define SERIAL_DESCR_BUF_SIZE 256 ++#define regi_NULL 0 ++#define DMA_WAIT_UNTIL_RESET(inst) \ ++ do { \ ++ reg_dma_rw_stat r; \ ++ do { \ ++ r = REG_RD(dma, (inst), rw_stat); \ ++ } while (r.mode != regk_dma_rst); \ ++ } while (0) ++ ++#define __DMA(ch) regi_dma##ch ++#define DMA(ch) __DMA(ch) ++#define DMA_IRQ(ch) (DMA0_INTR_VECT + (ch)) ++ ++/* Macro to set up control lines for a port. */ ++#define SETUP_PINS(port) \ ++ if (serial_cris_ports[port].used) { \ ++ if (strcmp(CONFIG_ETRAX_SER##port##_DTR_BIT, "")) \ ++ crisv32_io_get_name(&serial_cris_ports[port].dtr_pin, \ ++ CONFIG_ETRAX_SER##port##_DTR_BIT); \ ++ else \ ++ serial_cris_ports[port].dtr_pin = dummy_pin; \ ++ if (strcmp(CONFIG_ETRAX_SER##port##_DSR_BIT, "")) \ ++ crisv32_io_get_name(&serial_cris_ports[port].dsr_pin, \ ++ CONFIG_ETRAX_SER##port##_DSR_BIT); \ ++ else \ ++ serial_cris_ports[port].dsr_pin = dummy_pin; \ ++ if (strcmp(CONFIG_ETRAX_SER##port##_RI_BIT, "")) \ ++ crisv32_io_get_name(&serial_cris_ports[port].ri_pin, \ ++ CONFIG_ETRAX_SER##port##_RI_BIT); \ ++ else \ ++ serial_cris_ports[port].ri_pin = dummy_pin; \ ++ if (strcmp(CONFIG_ETRAX_SER##port##_CD_BIT, "")) \ ++ crisv32_io_get_name(&serial_cris_ports[port].cd_pin, \ ++ CONFIG_ETRAX_SER##port##_CD_BIT); \ ++ else \ ++ serial_cris_ports[port].cd_pin = dummy_pin; \ ++ } ++ ++/* Set a serial port register if anything has changed. */ ++#define MODIFY_REG(instance, reg, var) \ ++ if (REG_RD_INT(ser, instance, reg) \ ++ != REG_TYPE_CONV(int, reg_ser_##reg, var)) \ ++ REG_WR(ser, instance, reg, var); ++ ++/* ++ * Regarding RS485 operation in crisv32 serial driver. ++ * --------------------------------------------------- ++ * RS485 can be run in two modes, full duplex using four wires (485FD) and ++ * half duplex using two wires (485HD). The default mode of each serial port ++ * is configured in the kernel configuration. The available modes are: ++ * RS-232, RS-485 half duplex, and RS-485 full duplex. ++ * ++ * In the 485HD mode the direction of the data bus must be able to switch. ++ * The direction of the transceiver is controlled by the RTS signal. Hence ++ * the auto_rts function in the ETRAX FS chip is enabled in this mode, which ++ * automatically toggle RTS when transmitting. The initial direction of the ++ * port is receiving. ++ * ++ * In the 485FD mode two transceivers will be used, one in each direction. ++ * Usually the hardware can handle both 485HD and 485FD, which implies that ++ * one of the transceivers can change direction. Consequently that transceiver ++ * must be tied to operate in the opposite direction of the other one, setting ++ * and keeping RTS to a fixed value do this. ++ * ++ * There are two special "ioctl" that can configure the ports. These two are ++ * left for backward compatible with older applications. The effects of using ++ * them are described below: ++ * The TIOCSERSETRS485: ++ * This ioctl sets a serial port in 232 mode to 485HD mode or vise versa. The ++ * state of the port is kept when closing the port. Note that this ioctl has no ++ * effect on a serial port in the 485FD mode. ++ * The TIOCSERWRRS485: ++ * This ioctl set a serial port in 232 mode to 485HD mode and writes the data ++ * "included" in the ioctl to the port. The port will then stay in 485HD mode. ++ * Using this ioctl on a serial port in the 485HD mode will transmit the data ++ * without changing the mode. Using this ioctl on a serial port in 485FD mode ++ * will not change the mode and simply send the data using the 485FD mode. ++ */ ++ ++#define TYPE_232 0 ++#define TYPE_485HD 1 ++#define TYPE_485FD 2 ++ ++struct etrax_recv_buffer { ++ struct etrax_recv_buffer *next; ++ unsigned short length; ++ unsigned char error; ++ unsigned char pad; ++ ++ unsigned char buffer[0]; ++}; ++ ++struct uart_cris_port { ++ struct uart_port port; ++ ++ int initialized; ++ int used; ++ int irq; ++ ++ /* Used to check if port enabled as well by testing for zero. */ ++ reg_scope_instances regi_ser; ++ reg_scope_instances regi_dmain; ++ reg_scope_instances regi_dmaout; ++ ++ struct crisv32_iopin dtr_pin; ++ struct crisv32_iopin dsr_pin; ++ struct crisv32_iopin ri_pin; ++ struct crisv32_iopin cd_pin; ++ ++ struct dma_descr_context tr_context_descr ++ __attribute__ ((__aligned__(32))); ++ struct dma_descr_data tr_descr[SERIAL_TX_DESCRIPTORS] ++ __attribute__ ((__aligned__(32))); ++ struct dma_descr_context rec_context_descr ++ __attribute__ ((__aligned__(32))); ++ struct dma_descr_data rec_descr[SERIAL_RECV_DESCRIPTORS] ++ __attribute__ ((__aligned__(32))); ++ ++ /* This is the first one in the list the HW is working on now. */ ++ struct dma_descr_data* first_tx_descr; ++ ++ /* This is the last one in the list the HW is working on now. */ ++ struct dma_descr_data* last_tx_descr; ++ ++ /* This is how many characters the HW is working on now. */ ++ unsigned int tx_pending_chars; ++ ++ int tx_started; ++ unsigned int cur_rec_descr; ++ struct etrax_recv_buffer *first_recv_buffer; ++ struct etrax_recv_buffer *last_recv_buffer; ++ ++ unsigned int recv_cnt; ++ unsigned int max_recv_cnt; ++ ++ /* The time for 1 char, in usecs. */ ++ unsigned long char_time_usec; ++ ++ /* Last tx usec in the jiffies. */ ++ unsigned long last_tx_active_usec; ++ ++ /* Last tx time in jiffies. */ ++ unsigned long last_tx_active; ++ ++ /* Last rx usec in the jiffies. */ ++ unsigned long last_rx_active_usec; ++ ++ /* Last rx time in jiffies. */ ++ unsigned long last_rx_active; ++ ++#ifdef CONFIG_ETRAX_RS485 ++ /* RS-485 support, duh. */ ++ struct rs485_control rs485; ++#endif ++ int port_type; ++ int write_ongoing; ++}; ++ ++extern struct uart_driver serial_cris_driver; ++static struct uart_port *console_port; ++static int console_baud = 115200; ++static struct uart_cris_port serial_cris_ports[UART_NR] = { ++{ ++#ifdef CONFIG_ETRAX_SERIAL_PORT0 ++ .used = 1, ++ .irq = SER0_INTR_VECT, ++ .regi_ser = regi_ser0, ++ /* ++ * We initialize the dma stuff like this to get a compiler error ++ * if a CONFIG is missing ++ */ ++ .regi_dmain = ++# ifdef CONFIG_ETRAX_SERIAL_PORT0_DMA7_IN ++ regi_dma7, ++# elif defined(CONFIG_ETRAX_SERIAL_PORT0_DMA1_IN) ++ regi_dma1, ++# elif defined CONFIG_ETRAX_SERIAL_PORT0_NO_DMA_IN ++ regi_NULL, ++# endif ++ ++ .regi_dmaout = |