Commit b1a808ff authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-next' of git://gitorious.org/kernel-hsi/kernel-hsi

Pull HSI (High Speed Synchronous Serial Interface) framework from Carlos Chinea:
 "The 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.

  The framework is currently being used for some people and we would
  like to see it integrated into the kernel for 3.3.  There is no HW
  controller drivers in this pull, but some people have already some of
  them pending which they would like to push as soon as this integrated.
  I am also working on the acceptance for an TI OMAP one, based on a
  compatible legacy version of the interface called SSI."

Ok, so it didn't get into 3.3, but here it is pulled into 3.4.

Several people piped up to say "yeah, we want this".

* 'for-next' of git://gitorious.org/kernel-hsi/kernel-hsi:
  HSI: hsi_char: Update ioctl-number.txt
  HSI: Add HSI API documentation
  HSI: hsi_char: Add HSI char device kernel configuration
  HSI: hsi_char: Add HSI char device driver
  HSI: hsi: Introducing HSI framework
parents 97754175 43139a61
...@@ -446,4 +446,21 @@ X!Idrivers/video/console/fonts.c ...@@ -446,4 +446,21 @@ X!Idrivers/video/console/fonts.c
!Edrivers/i2c/i2c-core.c !Edrivers/i2c/i2c-core.c
</chapter> </chapter>
<chapter id="hsi">
<title>High Speed Synchronous Serial Interface (HSI)</title>
<para>
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.
</para>
!Iinclude/linux/hsi/hsi.h
!Edrivers/hsi/hsi.c
</chapter>
</book> </book>
...@@ -225,6 +225,7 @@ Code Seq#(hex) Include File Comments ...@@ -225,6 +225,7 @@ Code Seq#(hex) Include File Comments
'j' 00-3F linux/joystick.h 'j' 00-3F linux/joystick.h
'k' 00-0F linux/spi/spidev.h conflict! 'k' 00-0F linux/spi/spidev.h conflict!
'k' 00-05 video/kyro.h conflict! 'k' 00-05 video/kyro.h conflict!
'k' 10-17 linux/hsi/hsi_char.h HSI character device
'l' 00-3F linux/tcfs_fs.h transparent cryptographic file system 'l' 00-3F linux/tcfs_fs.h transparent cryptographic file system
<http://web.archive.org/web/*/http://mikonos.dia.unisa.it/tcfs> <http://web.archive.org/web/*/http://mikonos.dia.unisa.it/tcfs>
'l' 40-7F linux/udf_fs_i.h in development: 'l' 40-7F linux/udf_fs_i.h in development:
......
...@@ -50,6 +50,8 @@ source "drivers/i2c/Kconfig" ...@@ -50,6 +50,8 @@ source "drivers/i2c/Kconfig"
source "drivers/spi/Kconfig" source "drivers/spi/Kconfig"
source "drivers/hsi/Kconfig"
source "drivers/pps/Kconfig" source "drivers/pps/Kconfig"
source "drivers/ptp/Kconfig" source "drivers/ptp/Kconfig"
......
...@@ -53,6 +53,7 @@ obj-$(CONFIG_ATA) += ata/ ...@@ -53,6 +53,7 @@ obj-$(CONFIG_ATA) += ata/
obj-$(CONFIG_TARGET_CORE) += target/ obj-$(CONFIG_TARGET_CORE) += target/
obj-$(CONFIG_MTD) += mtd/ obj-$(CONFIG_MTD) += mtd/
obj-$(CONFIG_SPI) += spi/ obj-$(CONFIG_SPI) += spi/
obj-y += hsi/
obj-y += net/ obj-y += net/
obj-$(CONFIG_ATM) += atm/ obj-$(CONFIG_ATM) += atm/
obj-$(CONFIG_FUSION) += message/ obj-$(CONFIG_FUSION) += message/
......
#
# HSI driver configuration
#
menuconfig HSI
tristate "HSI support"
---help---
The "High speed synchronous Serial Interface" is
synchronous serial interface used mainly to connect
application engines and cellular modems.
if HSI
config HSI_BOARDINFO
bool
default y
source "drivers/hsi/clients/Kconfig"
endif # HSI
#
# Makefile for HSI
#
obj-$(CONFIG_HSI_BOARDINFO) += hsi_boardinfo.o
obj-$(CONFIG_HSI) += hsi.o
obj-y += clients/
#
# HSI clients configuration
#
comment "HSI clients"
config HSI_CHAR
tristate "HSI/SSI character driver"
depends on HSI
---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.
#
# Makefile for HSI clients
#
obj-$(CONFIG_HSI_CHAR) += hsi_char.o
This diff is collapsed.
This diff is collapsed.
/*
* HSI clients registration interface
*
* 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/hsi/hsi.h>
#include <linux/list.h>
#include <linux/slab.h>
#include "hsi_core.h"
/*
* hsi_board_list is only used internally by the HSI framework.
* No one else is allowed to make use of it.
*/
LIST_HEAD(hsi_board_list);
EXPORT_SYMBOL_GPL(hsi_board_list);
/**
* hsi_register_board_info - Register HSI clients information
* @info: Array of HSI clients on the board
* @len: Length of the array
*
* HSI clients are statically declared and registered on board files.
*
* HSI clients will be automatically registered to the HSI bus once the
* controller and the port where the clients wishes to attach are registered
* to it.
*
* Return -errno on failure, 0 on success.
*/
int __init hsi_register_board_info(struct hsi_board_info const *info,
unsigned int len)
{
struct hsi_cl_info *cl_info;
cl_info = kzalloc(sizeof(*cl_info) * len, GFP_KERNEL);
if (!cl_info)
return -ENOMEM;
for (; len; len--, info++, cl_info++) {
cl_info->info = *info;
list_add_tail(&cl_info->list, &hsi_board_list);
}
return 0;
}
/*
* HSI framework internal interfaces,
*
* 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
*/
#ifndef __LINUX_HSI_CORE_H__
#define __LINUX_HSI_CORE_H__
#include <linux/hsi/hsi.h>
struct hsi_cl_info {
struct list_head list;
struct hsi_board_info info;
};
extern struct list_head hsi_board_list;
#endif /* __LINUX_HSI_CORE_H__ */
...@@ -3,6 +3,7 @@ header-y += can/ ...@@ -3,6 +3,7 @@ header-y += can/
header-y += caif/ header-y += caif/
header-y += dvb/ header-y += dvb/
header-y += hdlc/ header-y += hdlc/
header-y += hsi/
header-y += isdn/ header-y += isdn/
header-y += mmc/ header-y += mmc/
header-y += nfsd/ header-y += nfsd/
......
header-y += hsi_char.h
This diff is collapsed.
/*
* Part of the HSI character device driver.
*
* Copyright (C) 2010 Nokia Corporation. All rights reserved.
*
* Contact: Andras Domokos <andras.domokos at 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
*/
#ifndef __HSI_CHAR_H
#define __HSI_CHAR_H
#define HSI_CHAR_MAGIC 'k'
#define HSC_IOW(num, dtype) _IOW(HSI_CHAR_MAGIC, num, dtype)
#define HSC_IOR(num, dtype) _IOR(HSI_CHAR_MAGIC, num, dtype)
#define HSC_IOWR(num, dtype) _IOWR(HSI_CHAR_MAGIC, num, dtype)
#define HSC_IO(num) _IO(HSI_CHAR_MAGIC, num)
#define HSC_RESET HSC_IO(16)
#define HSC_SET_PM HSC_IO(17)
#define HSC_SEND_BREAK HSC_IO(18)
#define HSC_SET_RX HSC_IOW(19, struct hsc_rx_config)
#define HSC_GET_RX HSC_IOW(20, struct hsc_rx_config)
#define HSC_SET_TX HSC_IOW(21, struct hsc_tx_config)
#define HSC_GET_TX HSC_IOW(22, struct hsc_tx_config)
#define HSC_PM_DISABLE 0
#define HSC_PM_ENABLE 1
#define HSC_MODE_STREAM 1
#define HSC_MODE_FRAME 2
#define HSC_FLOW_SYNC 0
#define HSC_ARB_RR 0
#define HSC_ARB_PRIO 1
struct hsc_rx_config {
uint32_t mode;
uint32_t flow;
uint32_t channels;
};
struct hsc_tx_config {
uint32_t mode;
uint32_t channels;
uint32_t speed;
uint32_t arb_mode;
};
#endif /* __HSI_CHAR_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment