Hi ! I have been working on a new proposal to support HSI/SSI drivers in the kernel. I would be very glad to get your feedback about this proposal. This patch series introduces the HSI framework, an SSI driver for OMAP and a generic character device for HSI/SSI devices. SSI, which is a legacy version of HSI, is used to connect the application engine with the cellular modem on the Nokia N900. This patch set is based on 2.6.34-rc3 Br, Carlos Chinea Andras Domokos (2): HSI CHAR: Add HSI char device driver HSI CHAR: Add HSI char device kernel configuration Carlos Chinea (3): HSI: Introducing HSI framework OMAP SSI: Introducing OMAP SSI driver OMAP SSI: Add OMAP SSI to the kernel configuration arch/arm/mach-omap2/Makefile | 3 + arch/arm/mach-omap2/ssi.c | 139 +++ arch/arm/plat-omap/include/plat/ssi.h | 196 ++++ drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/hsi/Kconfig | 16 + drivers/hsi/Makefile | 5 + drivers/hsi/clients/Kconfig | 11 + drivers/hsi/clients/Makefile | 5 + drivers/hsi/clients/hsi_char.c | 1078 +++++++++++++++++++++ drivers/hsi/controllers/Kconfig | 11 + drivers/hsi/controllers/Makefile | 5 + drivers/hsi/controllers/omap_ssi.c | 1691 +++++++++++++++++++++++++++++++++ drivers/hsi/hsi.c | 487 ++++++++++ include/linux/hsi/hsi.h | 365 +++++++ include/linux/hsi/hsi_char.h | 79 ++ 16 files changed, 4094 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-omap2/ssi.c create mode 100644 arch/arm/plat-omap/include/plat/ssi.h create mode 100644 drivers/hsi/Kconfig create mode 100644 drivers/hsi/Makefile create mode 100644 drivers/hsi/clients/Kconfig create mode 100644 drivers/hsi/clients/Makefile create mode 100644 drivers/hsi/clients/hsi_char.c create mode 100644 ...
Add OMAP SSI driver to the kernel configuration Add OMAP SSI device to the kernel configuration Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com> --- arch/arm/mach-omap2/Makefile | 3 +++ drivers/hsi/Kconfig | 2 ++ drivers/hsi/Makefile | 1 + drivers/hsi/controllers/Kconfig | 11 +++++++++++ drivers/hsi/controllers/Makefile | 5 +++++ 5 files changed, 22 insertions(+), 0 deletions(-) create mode 100644 drivers/hsi/controllers/Kconfig create mode 100644 drivers/hsi/controllers/Makefile diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 4b9fc57..106f0d5 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -97,6 +97,9 @@ obj-$(CONFIG_OMAP_IOMMU) += $(iommu-y) i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o obj-y += $(i2c-omap-m) $(i2c-omap-y) +omap-ssi-$(CONFIG_OMAP_SSI) := ssi.o +obj-y += $(omap-ssi-m) $(omap-ssi-y) + # Specific board support obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o diff --git a/drivers/hsi/Kconfig b/drivers/hsi/Kconfig index e122584..0398e23 100644 --- a/drivers/hsi/Kconfig +++ b/drivers/hsi/Kconfig @@ -10,4 +10,6 @@ menuconfig HSI if HSI +source "drivers/hsi/controllers/Kconfig" + endif # HSI diff --git a/drivers/hsi/Makefile b/drivers/hsi/Makefile index b42b6cf..d020ae1 100644 --- a/drivers/hsi/Makefile +++ b/drivers/hsi/Makefile @@ -2,3 +2,4 @@ # Makefile for HSI # obj-$(CONFIG_HSI) += hsi.o +obj-y += controllers/ diff --git a/drivers/hsi/controllers/Kconfig b/drivers/hsi/controllers/Kconfig new file mode 100644 index 0000000..0bae0c6 --- /dev/null +++ b/drivers/hsi/controllers/Kconfig @@ -0,0 +1,11 @@ +# +# HSI controllers configuration +# +config OMAP_SSI + tristate "OMAP SSI hardware driver" + depends on ARCH_OMAP && HSI + default n + ---help--- + If you say Y here, you will enable the OMAP SSI hardware driver. + + If unsure, say N. diff ...
From: Andras Domokos <andras.domokos@nokia.com> Add HSI character device kernel configuration Signed-off-by: Andras Domokos <andras.domokos@nokia.com> --- drivers/hsi/Kconfig | 1 + drivers/hsi/Makefile | 2 +- drivers/hsi/clients/Kconfig | 11 +++++++++++ drivers/hsi/clients/Makefile | 5 +++++ 4 files changed, 18 insertions(+), 1 deletions(-) create mode 100644 drivers/hsi/clients/Kconfig create mode 100644 drivers/hsi/clients/Makefile diff --git a/drivers/hsi/Kconfig b/drivers/hsi/Kconfig index 0398e23..87d87a1 100644 --- a/drivers/hsi/Kconfig +++ b/drivers/hsi/Kconfig @@ -11,5 +11,6 @@ menuconfig HSI if HSI source "drivers/hsi/controllers/Kconfig" +source "drivers/hsi/clients/Kconfig" endif # HSI diff --git a/drivers/hsi/Makefile b/drivers/hsi/Makefile index d020ae1..ebc91b3 100644 --- a/drivers/hsi/Makefile +++ b/drivers/hsi/Makefile @@ -2,4 +2,4 @@ # Makefile for HSI # obj-$(CONFIG_HSI) += hsi.o -obj-y += controllers/ +obj-y += controllers/ clients/ diff --git a/drivers/hsi/clients/Kconfig b/drivers/hsi/clients/Kconfig new file mode 100644 index 0000000..2145591 --- /dev/null +++ b/drivers/hsi/clients/Kconfig @@ -0,0 +1,11 @@ +# +# HSI clients configuration +# + +config HSI_CHAR + tristate "HSI/SSI character driver" + depends on HSI && OMAP_SSI + ---help--- + If you say Y here, you will enable the HSI/SSI character driver. + This driver provides a simple character device interface for + serial communication with the cellular modem over HSI/SSI bus. diff --git a/drivers/hsi/clients/Makefile b/drivers/hsi/clients/Makefile new file mode 100644 index 0000000..327c0e2 --- /dev/null +++ b/drivers/hsi/clients/Makefile @@ -0,0 +1,5 @@ +# +# Makefile for HSI clients +# + +obj-$(CONFIG_HSI_CHAR) += hsi_char.o -- 1.5.6.5 --
From: Andras Domokos <andras.domokos@nokia.com> Add HSI char device driver to the kernel. Signed-off-by: Andras Domokos <andras.domokos@nokia.com> --- drivers/hsi/clients/hsi_char.c | 1078 ++++++++++++++++++++++++++++++++++++++++ include/linux/hsi/hsi_char.h | 79 +++ 2 files changed, 1157 insertions(+), 0 deletions(-) create mode 100644 drivers/hsi/clients/hsi_char.c create mode 100644 include/linux/hsi/hsi_char.h diff --git a/drivers/hsi/clients/hsi_char.c b/drivers/hsi/clients/hsi_char.c new file mode 100644 index 0000000..b30d912 --- /dev/null +++ b/drivers/hsi/clients/hsi_char.c @@ -0,0 +1,1078 @@ +/* + * hsi-char.c + * + * HSI character device driver, implements the character device + * interface. + * + * Copyright (C) 2010 Nokia Corporation. All rights reserved. + * + * Contact: Andras Domokos <andras.domokos@nokia.com> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the 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., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + +#include <linux/errno.h> +#include <linux/module.h> +#include <linux/types.h> +#include <asm/atomic.h> +#include <linux/init.h> +#include <linux/device.h> +#include <linux/err.h> +#include <linux/file.h> +#include <linux/mm.h> +#include <linux/fs.h> +#include <linux/cdev.h> +#include <linux/poll.h> +#include <asm/mach-types.h> +#include <linux/ioctl.h> +#include <linux/uaccess.h> +#include <linux/sched.h> + +#include <linux/hsi/hsi.h> +#include ...
Adds HSI framework in to the linux kernel. High Speed Synchronous Serial Interface (HSI) is a serial interface mainly used for connecting application engines (APE) with cellular modem engines (CMT) in cellular handsets. HSI provides multiplexing for up to 16 logical channels, low-latency and full duplex communication. Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com> --- drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/hsi/Kconfig | 13 ++ drivers/hsi/Makefile | 4 + drivers/hsi/hsi.c | 487 +++++++++++++++++++++++++++++++++++++++++++++++ include/linux/hsi/hsi.h | 365 +++++++++++++++++++++++++++++++++++ 6 files changed, 872 insertions(+), 0 deletions(-) create mode 100644 drivers/hsi/Kconfig create mode 100644 drivers/hsi/Makefile create mode 100644 drivers/hsi/hsi.c create mode 100644 include/linux/hsi/hsi.h diff --git a/drivers/Kconfig b/drivers/Kconfig index a2b902f..4fe39f9 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -50,6 +50,8 @@ source "drivers/i2c/Kconfig" source "drivers/spi/Kconfig" +source "drivers/hsi/Kconfig" + source "drivers/pps/Kconfig" source "drivers/gpio/Kconfig" diff --git a/drivers/Makefile b/drivers/Makefile index 2c4f277..24ca5bd 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -45,6 +45,7 @@ obj-$(CONFIG_SCSI) += scsi/ obj-$(CONFIG_ATA) += ata/ obj-$(CONFIG_MTD) += mtd/ obj-$(CONFIG_SPI) += spi/ +obj-$(CONFIG_HSI) += hsi/ obj-y += net/ obj-$(CONFIG_ATM) += atm/ obj-$(CONFIG_FUSION) += message/ diff --git a/drivers/hsi/Kconfig b/drivers/hsi/Kconfig new file mode 100644 index 0000000..e122584 --- /dev/null +++ b/drivers/hsi/Kconfig @@ -0,0 +1,13 @@ +# +# HSI driver configuration +# +menuconfig HSI + bool "HSI support" + ---help--- + The "High speed syncrhonous Serial Interface" is + synchrnous serial interface used mainly to connect + application engines and celluar modems. + +if HSI + +endif # HSI diff --git ...
^^^^^^^^^^^ ~~~~~~~~~~ Need #include <linux/list.h> You can put: /* private: */ --- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code *** --
Introduces the OMAP SSI driver in the kernel. The Syncronous Serial Interface (SSI) is a legacy version of HSI. As in the case of HSI, it is mainly used to connect Application engines (APE) with cellular modem engines (CMT) in cellular handsets. It provides a multichannel, full-duplex, multicore communication with no reference clock. The OMAP SSI block is capable of reaching speeds of 110 Mbit/s. Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com> --- arch/arm/mach-omap2/ssi.c | 139 +++ arch/arm/plat-omap/include/plat/ssi.h | 196 ++++ drivers/hsi/controllers/omap_ssi.c | 1691 +++++++++++++++++++++++++++++++++ 3 files changed, 2026 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-omap2/ssi.c create mode 100644 arch/arm/plat-omap/include/plat/ssi.h create mode 100644 drivers/hsi/controllers/omap_ssi.c diff --git a/arch/arm/mach-omap2/ssi.c b/arch/arm/mach-omap2/ssi.c new file mode 100644 index 0000000..b46aea8 --- /dev/null +++ b/arch/arm/mach-omap2/ssi.c @@ -0,0 +1,139 @@ +/* + * linux/arch/arm/mach-omap2/ssi.c + * + * Copyright (C) 2010 Nokia Corporation. All rights reserved. + * + * Contact: Carlos Chinea <carlos.chinea@nokia.com> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the 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., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/err.h> +#include <linux/gpio.h> +#include ...
(cc Sébastien JAN) Hello Carlos, Have you looked at Sébastien's HSI driver code: http://www.mail-archive.com/linux-omap@vger.kernel.org/msg18506.html Is there some way that you can combine efforts with him? - Paul
Hi Paul and others, I think the history of the patches is already shared. I've been looking at this from the sidelines and I think the story so far is: 2008: Carlos sent the original SSI patchset (and got comments) -> http://lkml.org/lkml/2008/10/3/116 2009: Sébastien sent an updated patchset (and got comments) -> http://www.mail-archive.com/linux-omap@vger.kernel.org/msg18506.html .. and now this latest one from Carlos is a completely new design that attempts to address the design comments that have been raised, hopefully pushing HSI/SSI a step closer to getting accepted. I'll leave it to Carlos and Sébastien to correct me if I got the above wrong... Br, -- Kai Vehmanen --
Yep you got it right. Sébastien and I have been also in contact about the new API and he has already given some feedback on an initial version of the framework. Br, Carlos --
