Re: [PATCH v6 19/23] drivers/fsi: Add GPIO based FSI master

2017-05-11 Thread Christopher Bostic
On 5/10/17 8:58 PM, Jeremy Kerr wrote: Hi Chris, I don't think we'd want this per master. The lock is for the 'top' master issuing commands. Only the top master can initiate any transactions on the bus to any devices connected downstream. Downstream masters such as hub masters, etc... cann

[PATCH v7 01/23] drivers/fsi: Add fsi master definition

2017-05-11 Thread Christopher Bostic
From: Jeremy Kerr Add a `struct fsi_master` to represent a FSI master controller. FSI master drivers register one of these structs to provide device-specific of the standard operations: read/write/term/break and link control. Includes changes from Edward A. James & Jeremy Kerr . Signed-off-by

[PATCH v7 00/23] FSI device driver implementation

2017-05-11 Thread Christopher Bostic
n request. - Assign value of master->master.dev at probe time. - Use get_optional interface for all optional GPIO pins. Christopher Bostic (9): drivers/fsi: Document FSI master sysfs files in ABI drivers/fsi: Set up links for slave communication drivers/fsi: Set slave SMODE to in

[PATCH v7 08/23] drivers/fsi: Set slave SMODE to init communication

2017-05-11 Thread Christopher Bostic
Set CFAM to appropriate ID so that the controlling master can manage link memory ranges. Add slave engine register definitions. Includes changes from Jeremy Kerr . Signed-off-by: Jeremy Kerr Signed-off-by: Christopher Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 75

[PATCH v7 03/23] drivers/fsi: Add empty master scan

2017-05-11 Thread Christopher Bostic
From: Jeremy Kerr When a new fsi master is added, we will need to scan its links, and slaves attached to those links. This change introduces a little shell to iterate the links, which we will populate with the actual slave scan in a later change. Signed-off-by: Jeremy Kerr Signed-off-by: Chris

[PATCH v7 06/23] drivers/fsi: Set up links for slave communication

2017-05-11 Thread Christopher Bostic
Enable each link and send a break command, and try to detect a slave by reading from the SMODE register. Signed-off-by: Christopher Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 37 +++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff

[PATCH v7 05/23] drivers/fsi: Add slave & master read/write APIs

2017-05-11 Thread Christopher Bostic
From: Jeremy Kerr Introduce functions to perform reads/writes on the slave address space; these simply pass the request on the slave's master with the correct link and slave ID. We implement these on top of similar helpers for the master. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley

[PATCH v7 19/23] drivers/fsi: Add GPIO based FSI master

2017-05-11 Thread Christopher Bostic
Kerr Signed-off-by: Christopher Bostic Signed-off-by: Joel Stanley --- v7 - Move global spinlock to struct fsi_master_gpio - Remove redundant checks for valid gpio descriptors - Clarify 'active low' comments - More descriptive comments for build_abs_ar_command() - Test MTOE

[PATCH v7 15/23] drivers/fsi: expose direct-access slave API

2017-05-11 Thread Christopher Bostic
From: Jeremy Kerr Allow drivers to access the slave address ranges. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Christopher Bostic --- drivers/fsi/fsi-core.c | 26 -- include/linux/fsi.h| 12 2 files changed, 32 insertions

[PATCH v7 22/23] drivers/fsi: Add hub master support

2017-05-11 Thread Christopher Bostic
Add an engine driver to expose a "hub" FSI master - which has a set of control registers in the engine address space, and uses a chunk of the slave address space for actual FSI communication. Additional changes from Jeremy Kerr . Signed-off-by: Christopher Bostic Signed-off-by: J

[PATCH v7 23/23] drivers/fsi: Use asynchronous slave mode

2017-05-11 Thread Christopher Bostic
From: Jeremy Kerr For slaves that are behind a software-clocked master, we want FSI CFAMs to run asynchronously to the FSI clock, so set up our slaves to be in async mode. Signed-off-by: Jeremy Kerr Signed-off-by: Christopher Bostic --- drivers/fsi/fsi-core.c| 22

[PATCH v7 20/23] drivers/fsi/gpio: Add tracepoints for GPIO master

2017-05-11 Thread Christopher Bostic
From: Jeremy Kerr Trace low level input/output GPIO operations. Signed-off-by: Jeremy Kerr Signed-off-by: Christopher Bostic --- drivers/fsi/fsi-master-gpio.c | 9 + include/trace/events/fsi_master_gpio.h | 68 ++ 2 files changed, 77 insertions

[PATCH v7 17/23] drivers/fsi: Add error handling for slave

2017-05-11 Thread Christopher Bostic
From: Jeremy Kerr This change implements error handling in the FSI core, by cleaning up and retrying failed operations, using the SISC, TERM and BREAK facilities. Signed-off-by: Jeremy Kerr Signed-off-by: Christopher Bostic --- drivers/fsi/fsi-core.c | 121

[PATCH v7 21/23] drivers/fsi: Add SCOM FSI client device driver

2017-05-11 Thread Christopher Bostic
Create a simple SCOM engine device driver that reads and writes its control registers via an FSI bus. Includes changes from Edward A. James . Signed-off-by: Christopher Bostic Signed-off-by: Joel Stanley Signed-off-by: Edward A. James Signed-off-by: Jeremy Kerr --- drivers/fsi/Kconfig

[PATCH v7 18/23] drivers/fsi: Document FSI master sysfs files in ABI

2017-05-11 Thread Christopher Bostic
From: Chris Bostic Add info for sysfs scan file in Documentaiton ABI/testing Signed-off-by: Christopher Bostic --- v7 - Rename scan file to 'rescan' - Add 'raw' file details - Add 'term' file details - Add 'break' file details - Upd

[PATCH v7 12/23] drivers/fsi: Add documentation for GPIO bindings

2017-05-11 Thread Christopher Bostic
Add fsi master gpio device tree binding documentation. Includes changes from Jeremy Kerr . Signed-off-by: Christopher Bostic Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Acked-by: Rob Herring --- .../devicetree/bindings/fsi/fsi-master-gpio.txt| 24 ++ 1

[PATCH v7 16/23] drivers/fsi: Add tracepoints for low-level operations

2017-05-11 Thread Christopher Bostic
From: Jeremy Kerr Trace low level read and write FSI bus operations. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Christopher Bostic --- drivers/fsi/fsi-core.c | 27 +++--- include/trace/events/fsi.h | 127 + 2

[PATCH v7 07/23] drivers/fsi: Implement slave initialisation

2017-05-11 Thread Christopher Bostic
From: Jeremy Kerr Implement fsi_slave_init: if we can read a chip ID, create fsi_slave devices and register with the driver core. Includes changes from Christopher Bostic . Signed-off-by: Jeremy Kerr Signed-off-by: Christopher Bostic Signed-off-by: Joel Stanley --- v7 - Change warning

[PATCH v7 13/23] drivers/fsi: Add client driver register utilities

2017-05-11 Thread Christopher Bostic
Add driver_register and driver_unregister wrappers for FSI. Signed-off-by: Christopher Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 17 + include/linux/fsi.h| 12 2 files changed, 29 insertions(+) diff --git a/drivers/fsi/fsi-core.c b

[PATCH v7 14/23] drivers/fsi: Add sysfs files for FSI master & slave accesses

2017-05-11 Thread Christopher Bostic
From: Jeremy Kerr This change adds a 'raw' file for reads & writes, and a 'term' file for the TERM command, and a 'break' file for issuing a BREAK. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Christopher Bostic

[PATCH v7 11/23] drivers/fsi: Add master unscan

2017-05-11 Thread Christopher Bostic
Allow a master to undo a previous scan. Should a master scan a bus twice it will need to ensure it doesn't double register any previously detected device. Signed-off-by: Christopher Bostic Signed-off-by: Joel Stanley v7 - Unscan when unregistering master - Remove leading '

[PATCH v7 10/23] drivers/fsi: Add device read/write/peek API

2017-05-11 Thread Christopher Bostic
From: Jeremy Kerr This change introduces the fsi device API: simple read, write and peek accessors for the devices' address spaces. Includes contributions from Christopher Bostic and Edward A. James . Signed-off-by: Edward A. James Signed-off-by: Jeremy Kerr Signed-off-by: Christ

[PATCH v7 09/23] drivers/fsi: scan slaves & register devices

2017-05-11 Thread Christopher Bostic
From: Jeremy Kerr Now that we have fsi_slave devices, scan each for endpoints, and register them on the fsi bus. Includes contributions from Christopher Bostic . Signed-off-by: Jeremy Kerr Signed-off-by: Christopher Bostic Signed-off-by: Joel Stanley --- v7 - Use GEN_MASK for bitmask

[PATCH v7 04/23] lib: Add crc4 module

2017-05-11 Thread Christopher Bostic
From: Jeremy Kerr Add a little helper for crc4 calculations. This works 4-bits-at-a-time, using a simple table approach. We will need this in the FSI core code, as well as any master implementations that need to calculate CRCs in software. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic

[PATCH v7 02/23] drivers/fsi: Add slave definition

2017-05-11 Thread Christopher Bostic
From: Jeremy Kerr Add the initial fsi slave device, which is private to the core code. This will be a child of the master, and parent to endpoint devices. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 10 ++ 1 file cha

Re: [PATCH v3 00/18] FSI device driver introduction

2017-01-17 Thread Christopher Bostic
On Tue, Jan 17, 2017 at 1:42 AM, Greg KH wrote: > On Mon, Jan 16, 2017 at 03:22:48PM -0600, christopher.lee.bos...@gmail.com > wrote: >> From: Chris Bostic > > > > Only this, and patch 02/18 came through, did something get stuck on your > end? > Hi Greg, Yes had an issue with the server block

Re: [PATCH v2 18/18] insert build break

2017-01-13 Thread Christopher Bostic
On Fri, Jan 13, 2017 at 1:15 AM, Greg KH wrote: > On Thu, Jan 12, 2017 at 04:37:35PM -0600, christopher.lee.bos...@gmail.com > wrote: >> From: Chris Bostic >> >> Signed-off-by: Chris Bostic > > I can not accept patches that have no changelog text, and this one is > very odd: > >> --- >> driver

[PATCH v3 01/18] drivers/fsi: Add empty fsi bus definitions

2017-02-01 Thread Christopher Bostic
From: Jeremy Kerr This change adds the initial (empty) fsi bus definition, and introduces drivers/fsi/. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic --- drivers/Kconfig| 2 ++ drivers/Makefile | 1 + drivers/fsi/Kconfig| 12 drivers/fsi/Makefile |

[PATCH v3 07/18] drivers/fsi: Add FSI crc calculators to library

2017-02-01 Thread Christopher Bostic
From: Jeremy Kerr Add some helpers for the crc checks for the slave configuration table. This works 4-bits-at-a-time, using a simple table approach. We will need this in the FSI core code, as well as any master implementations that need to calculate CRCs in software. Signed-off-by: Jeremy Kerr

[PATCH v3 04/18] drivers/fsi: Add fsi master definition

2017-02-01 Thread Christopher Bostic
From: Jeremy Kerr Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 28 drivers/fsi/fsi-master.h | 37 + 2 files changed, 65 insertions(+) create mode 100644 drivers/fsi/fsi-master.h diff --g

[PATCH v3 06/18] drivers/fsi: Add empty master scan

2017-02-01 Thread Christopher Bostic
From: Jeremy Kerr When a new fsi master is added, we will need to scan its links, and slaves attached to those links. This change introduces a little shell to iterate the links, which we will populate with the actual slave scan in a later change. Signed-off-by: Jeremy Kerr Signed-off-by: Chris

[PATCH v3 03/18] drivers/fsi: add driver to device matches

2017-02-01 Thread Christopher Bostic
From: Jeremy Kerr Driver bind to devices based on the engine types & (optional) versions. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 21 + include/linux/fsi.h| 21 +++-- 2 files changed, 40 insertions(+), 2 delet

[PATCH v3 05/18] drivers/fsi: Add slave definition

2017-02-01 Thread Christopher Bostic
From: Jeremy Kerr Add the initial fsi slave device, which is private to the core code. This will be a child of the master, and parent to endpoint devices. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 9 + 1 file changed, 9 insertions(+) diff --g

[PATCH v3 09/18] drivers/fsi: Implement slave initialisation

2017-02-01 Thread Christopher Bostic
From: Jeremy Kerr Create fsi_slave devices during the master scan. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 56 -- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/drivers/fsi/fsi-core.c b

[PATCH v3 11/18] drivers/fsi: Add device read/write/peek functions

2017-02-01 Thread Christopher Bostic
From: Jeremy Kerr This change introduces the fsi device API: simple read, write and peek accessors for the devices' address spaces. Includes contributions from Chris Bostic Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 47 +++

[PATCH v3 08/18] drivers/fsi: Kick off master scan via sysfs

2017-02-01 Thread Christopher Bostic
From: Chris Bostic Move master scan from automatic kick off early in kernel power up to a scan file that can be invoked at any particular time based on needs of a given platform. Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 15 +-- 1 file changed, 13 insertions(+), 2 de

[PATCH v3 13/18] drivers/fsi: Set slave SMODE to init communication

2017-02-01 Thread Christopher Bostic
From: Chris Bostic Set CFAM to appropriate ID so that the controlling master can manage link memory ranges. Add slave engine register definitions. Signed-off-by: Chris Bostic Signed-off-by: Jeremy Kerr --- drivers/fsi/fsi-core.c | 90 +- 1 file

[PATCH v3 00/18] FSI device driver introduction

2017-02-01 Thread Christopher Bostic
Introduction of the IBM 'Flexible Support Interface' (FSI) bus device driver. FSI is a high fan out serial bus consisting of a clock and a serial data line capable of running at speeds up to 166 MHz. This set provides the basic framework to add FSI extensions to the Linux bus and device models. Ma

[PATCH v3 12/18] drivers/fsi: Set up links for slave communication

2017-02-01 Thread Christopher Bostic
From: Chris Bostic Enable each link and send a break command in preparation for scanning each link for slaves. Signed-off-by: Chris Bostic Signed-off-by: Jeremy Kerr --- drivers/fsi/fsi-core.c | 38 -- drivers/fsi/fsi-master.h | 2 ++ 2 files changed, 38

[PATCH v3 17/18] drivers/fsi: Document FSI master sysfs files in ABI

2017-02-01 Thread Christopher Bostic
From: Chris Bostic Add info for sysfs scan file in Documentaiton ABI/testing Signed-off-by: Chris Bostic --- Documentation/ABI/testing/sysfs-bus-fsi | 6 ++ 1 file changed, 6 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-fsi diff --git a/Documentation/ABI/testing/s

[PATCH v3 16/18] drivers/fsi: Add documentation for GPIO based FSI master

2017-02-01 Thread Christopher Bostic
From: Chris Bostic Define the device tree bindings for the GPIO master type. Signed-off-by: Chris Bostic --- .../devicetree/bindings/fsi/fsi-master-gpio.txt| 71 ++ 1 file changed, 71 insertions(+) create mode 100644 Documentation/devicetree/bindings/fsi/fsi-master-gpi

[PATCH v3 14/18] drivers/fsi: Remove all scanned devices during master unregister

2017-02-01 Thread Christopher Bostic
From: Chris Bostic Master will remove all previously scanned devices during an unregister operation. This will be necessary should any master attempt to register more than once. Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 14 ++ 1 file changed, 14 insertions(+) diff -

[PATCH v3 18/18] drivers/fsi: Add GPIO based FSI master

2017-02-01 Thread Christopher Bostic
From: Chris Bostic Implement a FSI master using GPIO. Will generate FSI protocol for read and write commands to particular addresses. Sends master command and waits for and decodes a slave response. Includes Jeremy Kerr's original GPIO master base commit. Signed-off-by: Jeremy Kerr Signed-of

[PATCH v3 15/18] drivers/fsi: Add FSI bus documentation

2017-02-01 Thread Christopher Bostic
From: Chris Bostic Add details on the basic functions of the FSI serial bus. Signed-off-by: Chris Bostic --- Documentation/devicetree/bindings/fsi/fsi.txt | 54 +++ 1 file changed, 54 insertions(+) create mode 100644 Documentation/devicetree/bindings/fsi/fsi.txt diff

[PATCH v3 02/18] drivers/fsi: Add device & driver definitions

2017-02-01 Thread Christopher Bostic
From: Jeremy Kerr Add structs for fsi devices & drivers, and struct device conversion functions. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic --- include/linux/fsi.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/fsi.h b/include/linux/fsi.h index 47aa

[PATCH v3 10/18] drivers/fsi: scan slaves & register devices

2017-02-01 Thread Christopher Bostic
From: Jeremy Kerr Now that we have fsi_slave devices, scan each for endpoints, and register them on the fsi bus. Includes contributions from Chris Bostic Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 136 +++--

[PATCH v3 00/18] FSI device driver introduction

2017-02-01 Thread Christopher Bostic
Introduction of the IBM 'Flexible Support Interface' (FSI) bus device driver. FSI is a high fan out serial bus consisting of a clock and a serial data line capable of running at speeds up to 166 MHz. This set provides the basic framework to add FSI extensions to the Linux bus and device models. Ma

Re: [PATCH v2 15/18] drivers/fsi: Add documentation for GPIO based FSI master

2017-02-01 Thread Christopher Bostic
On Wed, Jan 18, 2017 at 8:11 PM, Jeremy Kerr wrote: > Hi Chris, > > From this: > >>> + >>> +The standard FSI master node >>> + >>> +This node describes a FSI master implmemented fully in hardware >>> +with dedicated input/output pins required for its function (i.e. >>>

Re: [PATCH v2 15/18] drivers/fsi: Add documentation for GPIO based FSI master

2017-02-01 Thread Christopher Bostic
On Wed, Jan 18, 2017 at 3:57 PM, Rob Herring wrote: > On Thu, Jan 12, 2017 at 04:35:43PM -0600, christopher.lee.bos...@gmail.com > wrote: >> From: Chris Bostic >> >> Define the device tree bindings for the GPIO master type. >> >> Signed-off-by: Chris Bostic >> >> --- >> >> V2 - Break out this d

Re: [PATCH 16/16] drivers/fsi: Add GPIO based FSI master

2016-12-12 Thread Christopher Bostic
On Thu, Dec 8, 2016 at 10:12 PM, Jeremy Kerr wrote: > Hi Chris, > >> +static ssize_t store_scan(struct device *dev, >> + struct device_attribute *attr, >> + const char *buf, >> + size_t count) >> +{ >> + struct

Re: [PATCH 08/16] drivers/fsi: Add crc4 helpers

2016-12-08 Thread Christopher Bostic
On Wed, Dec 7, 2016 at 5:33 PM, Jeremy Kerr wrote: > Hi Greg, > >> Why not just create lib/crc4.c with these functions, like the other crc >> functions in the kernel? > > Two (bad) reasons: > > - The crc4 implementation here is pretty specific to the FSI >usage (only supporting 4-bit-sized ch

Re: [PATCH 04/16] drivers/fsi: Add fsi master definition

2016-12-08 Thread Christopher Bostic
On Wed, Dec 7, 2016 at 3:06 AM, Greg KH wrote: > On Tue, Dec 06, 2016 at 08:09:30PM -0600, Chris Bostic wrote: >> From: Jeremy Kerr >> >> Signed-off-by: Jeremy Kerr >> Signed-off-by: Chris Bostic >> --- >> drivers/fsi/fsi-core.c | 20 >> drivers/fsi/fsi-master.h | 37 +++

[PATCH v4 13/23] drivers/fsi: Add client driver register utilities

2017-03-29 Thread Christopher Bostic
From: Chris Bostic Add driver_register and driver_unregister wrappers for FSI. Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 17 + include/linux/fsi.h| 12 2 files changed, 29 insertions(+) diff --git a/drivers/fsi/fsi-c

[PATCH v4 15/23] drivers/fsi: expose direct-access slave API

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr Allow drivers to access the slave address ranges. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 26 -- include/linux/fsi.h| 12 2 files changed, 32 insertions(+), 6 de

[PATCH v4 00/23] FSI device driver implementation

2017-03-29 Thread Christopher Bostic
Implementation of the IBM 'Flexible Support Interface' (FSI) bus device driver. FSI is a high fan out serial bus consisting of a clock and a serial data line capable of running at speeds up to 166 MHz. This set provides the basic framework to add FSI extensions to the Linux bus and device models.

[PATCH v4 05/23] drivers/fsi: Add slave & master read/write APIs

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr Introduce functions to perform reads/writes on the slave address space; these simply pass the request on the slave's master with the correct link and slave ID. We implement these on top of similar helpers for the master. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley

[PATCH v4 20/23] drivers/fsi/gpio: Add tracepoints for GPIO master

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr Add trace points for key GPIO operations of the GPIO based FSI master. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic --- drivers/fsi/fsi-master-gpio.c | 9 + include/trace/events/fsi_master_gpio.h | 68 ++ 2 files change

[PATCH v4 23/23] drivers/fsi: Use asynchronous slave mode

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr For slaves that are behind a software-clocked master, we want FSI CFAMs to run asynchronously to the FSI clock, so set up our slaves to be in async mode. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c| 22 +- dri

[PATCH v4 22/23] drivers/fsi: Add hub master support

2017-03-29 Thread Christopher Bostic
From: Chris Bostic Add an engine driver to expose a "hub" FSI master - which has a set of control registers in the engine address space, and uses a chunk of the slave address space for actual FSI communication. Additional changes from Jeremy Kerr . Signed-off-by: Chris Bostic Signed-off-by: Je

[PATCH v4 21/23] drivers/fsi: Add SCOM FSI client device driver

2017-03-29 Thread Christopher Bostic
From: Chris Bostic Create a simple SCOM engine device driver that reads and writes its control registers via an FSI bus. Includes changes from Edward A. James . Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley Signed-off-by: Edward A. James Signed-off-by: Jeremy Kerr --- drivers/fsi

[PATCH v4 18/23] drivers/fsi: Document FSI master sysfs files in ABI

2017-03-29 Thread Christopher Bostic
From: Chris Bostic Add info for sysfs scan file in Documentaiton ABI/testing Signed-off-by: Chris Bostic --- Documentation/ABI/testing/sysfs-bus-fsi | 6 ++ 1 file changed, 6 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-fsi diff --git a/Documentation/ABI/testing/s

[PATCH v4 19/23] drivers/fsi: Add GPIO based FSI master

2017-03-29 Thread Christopher Bostic
From: Chris Bostic Implement a FSI master using GPIO. Will generate FSI protocol for read and write commands to particular addresses. Sends master command and waits for and decodes a slave response. Includes changes from Edward A. James and Jeremy Kerr . Signed-off-by: Edward A. James Signe

[PATCH v4 17/23] drivers/fsi: Add error handling for slave communication errors

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr This change implements error handling in the FSI core, by cleaning up and retrying failed operations, using the SISC, TERM and BREAK facilities. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 121 ++

[PATCH v4 14/23] drivers/fsi: Add sysfs files for FSI master & slave accesses

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr This change adds a 'raw' file for reads & writes, and a 'term' file for the TERM command, and a 'break' file for issuing a BREAK. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 116

[PATCH v4 12/23] drivers/fsi: Add documentation for GPIO bindings

2017-03-29 Thread Christopher Bostic
From: Chris Bostic Add fsi master gpio device tree binding documentation Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- .../devicetree/bindings/fsi/fsi-master-gpio.txt| 24 ++ 1 file changed, 24 insertions(+) create mode 100644 Documentation/devicetree/bi

[PATCH v4 16/23] drivers/fsi: Add tracepoints for low-level operations

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 27 +++--- include/trace/events/fsi.h | 127 + 2 files changed, 148 insertions(+), 6 deletions(-) create mode

[PATCH v4 11/23] drivers/fsi: Add master unscan

2017-03-29 Thread Christopher Bostic
From: Chris Bostic Allow a master to undo a previous scan. Should a master scan a bus twice it will need to ensure it doesn't double register any previously detected device. Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 40 ++

[PATCH v4 09/23] drivers/fsi: scan slaves & register devices

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr Now that we have fsi_slave devices, scan each for endpoints, and register them on the fsi bus. Includes contributions from Chris Bostic Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 127

[PATCH v4 07/23] drivers/fsi: Implement slave initialisation

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr Implement fsi_slave_init: if we can read a chip ID, create fsi_slave devices and register with the driver core. Includes changes from Chris Bostic . Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 66 +

[PATCH v4 06/23] drivers/fsi: Set up links for slave communication

2017-03-29 Thread Christopher Bostic
From: Chris Bostic Enable each link and send a break command, and try to detect a slave by reading from the SMODE register. Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 37 +++-- 1 file changed, 35 insertions(+), 2 deleti

[PATCH v4 10/23] drivers/fsi: Add device read/write/peek API

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr This change introduces the fsi device API: simple read, write and peek accessors for the devices' address spaces. Includes contributions from Chris Bostic and Edward A. James . Signed-off-by: Edward A. James Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off

[PATCH v4 08/23] drivers/fsi: Set slave SMODE to init communication

2017-03-29 Thread Christopher Bostic
From: Chris Bostic Set CFAM to appropriate ID so that the controlling master can manage link memory ranges. Add slave engine register definitions. Includes changes from Jeremy Kerr . Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core

[PATCH v4 14/23] drivers/fsi: Add sysfs files for FSI master & slave accesses

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr This change adds a 'raw' file for reads & writes, and a 'term' file for the TERM command, and a 'break' file for issuing a BREAK. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 116

[PATCH v4 04/23] drivers/fsi: Add crc4 helpers

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr Add some helpers for the crc checks for the slave configuration table. This works 4-bits-at-a-time, using a simple table approach. We will need this in the FSI core code, as well as any master implementations that need to calculate CRCs in software. We add this to the fsi code

[PATCH v4 01/23] drivers/fsi: Add fsi master definition

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr Add a `struct fsi_master` to represent a FSI master controller. FSI master drivers register one of these structs to provide device-specific of the standard operations: read/write/term/break and link control. Includes changes from Edward A. James & Jeremy Kerr . Signed-off-by

[PATCH v4 03/23] drivers/fsi: Add empty master scan

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr When a new fsi master is added, we will need to scan its links, and slaves attached to those links. This change introduces a little shell to iterate the links, which we will populate with the actual slave scan in a later change. Signed-off-by: Jeremy Kerr Signed-off-by: Chris

[PATCH v4 02/23] drivers/fsi: Add slave definition

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr Add the initial fsi slave device, which is private to the core code. This will be a child of the master, and parent to endpoint devices. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 10 ++ 1 file cha

Re: [PATCH v4 19/23] drivers/fsi: Add GPIO based FSI master

2017-04-04 Thread Christopher Bostic
On 3/30/17 3:50 PM, Benjamin Herrenschmidt wrote: On Thu, 2017-03-30 at 13:15 -0500, Christopher Bostic wrote: +static void serial_in(struct fsi_master_gpio *master, struct fsi_gpio_msg *msg, + uint8_t num_bits) +{ + uint8_t bit, in_bit; + + set_sda_input

Re: [PATCH v4 19/23] drivers/fsi: Add GPIO based FSI master (fwd)

2017-04-04 Thread Christopher Bostic
v4.11-rc4 next-20170330] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Christopher-Bostic/FSI-device-driver-implementation/20170330-184914 :: branch date: 5 hours ago :: commit date: 5 hour

Re: [PATCH v4 19/23] drivers/fsi: Add GPIO based FSI master

2017-04-04 Thread Christopher Bostic
On 4/4/17 5:19 PM, Benjamin Herrenschmidt wrote: On Tue, 2017-04-04 at 12:32 -0500, Christopher Bostic wrote: Agreed that there is room for improvement. I intend to look further into your suggestions from here and our private conversation on the matter and make changes as appropriate. I

[PATCH v5 01/23] drivers/fsi: Add fsi master definition

2017-04-04 Thread Christopher Bostic
From: Jeremy Kerr Add a `struct fsi_master` to represent a FSI master controller. FSI master drivers register one of these structs to provide device-specific of the standard operations: read/write/term/break and link control. Includes changes from Edward A. James & Jeremy Kerr . Signed-off-by

[PATCH v5 00/23] FSI device driver implementation

2017-04-04 Thread Christopher Bostic
Implementation of the IBM 'Flexible Support Interface' (FSI) bus device driver. FSI is a high fan out serial bus consisting of a clock and a serial data line capable of running at speeds up to 166 MHz. This set provides the basic framework to add FSI extensions to the Linux bus and device models.

[PATCH v5 03/23] drivers/fsi: Add empty master scan

2017-04-04 Thread Christopher Bostic
From: Jeremy Kerr When a new fsi master is added, we will need to scan its links, and slaves attached to those links. This change introduces a little shell to iterate the links, which we will populate with the actual slave scan in a later change. Signed-off-by: Jeremy Kerr Signed-off-by: Chris

[PATCH v5 05/23] drivers/fsi: Add slave & master read/write APIs

2017-04-04 Thread Christopher Bostic
From: Jeremy Kerr Introduce functions to perform reads/writes on the slave address space; these simply pass the request on the slave's master with the correct link and slave ID. We implement these on top of similar helpers for the master. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley

[PATCH v5 04/23] drivers/fsi: Add crc4 helpers

2017-04-04 Thread Christopher Bostic
From: Jeremy Kerr Add some helpers for the crc checks for the slave configuration table. This works 4-bits-at-a-time, using a simple table approach. We will need this in the FSI core code, as well as any master implementations that need to calculate CRCs in software. We add this to the fsi code

[PATCH v5 02/23] drivers/fsi: Add slave definition

2017-04-04 Thread Christopher Bostic
From: Jeremy Kerr Add the initial fsi slave device, which is private to the core code. This will be a child of the master, and parent to endpoint devices. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 10 ++ 1 file cha

[PATCH v5 09/23] drivers/fsi: scan slaves & register devices

2017-04-04 Thread Christopher Bostic
From: Jeremy Kerr Now that we have fsi_slave devices, scan each for endpoints, and register them on the fsi bus. Includes contributions from Chris Bostic Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 127

[PATCH v5 07/23] drivers/fsi: Implement slave initialisation

2017-04-04 Thread Christopher Bostic
From: Jeremy Kerr Implement fsi_slave_init: if we can read a chip ID, create fsi_slave devices and register with the driver core. Includes changes from Chris Bostic . Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 66 +

[PATCH v5 06/23] drivers/fsi: Set up links for slave communication

2017-04-04 Thread Christopher Bostic
From: Chris Bostic Enable each link and send a break command, and try to detect a slave by reading from the SMODE register. Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 37 +++-- 1 file changed, 35 insertions(+), 2 deleti

[PATCH v5 08/23] drivers/fsi: Set slave SMODE to init communication

2017-04-04 Thread Christopher Bostic
From: Chris Bostic Set CFAM to appropriate ID so that the controlling master can manage link memory ranges. Add slave engine register definitions. Includes changes from Jeremy Kerr . Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core

[PATCH v5 10/23] drivers/fsi: Add device read/write/peek API

2017-04-04 Thread Christopher Bostic
From: Jeremy Kerr This change introduces the fsi device API: simple read, write and peek accessors for the devices' address spaces. Includes contributions from Chris Bostic and Edward A. James . Signed-off-by: Edward A. James Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off

[PATCH v5 12/23] drivers/fsi: Add documentation for GPIO bindings

2017-04-04 Thread Christopher Bostic
From: Chris Bostic Add fsi master gpio device tree binding documentation Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley Acked-by: Rob Herring --- .../devicetree/bindings/fsi/fsi-master-gpio.txt| 24 ++ 1 file changed, 24 insertions(+) create mode 100644 Docu

[PATCH v5 13/23] drivers/fsi: Add client driver register utilities

2017-04-04 Thread Christopher Bostic
From: Chris Bostic Add driver_register and driver_unregister wrappers for FSI. Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 17 + include/linux/fsi.h| 12 2 files changed, 29 insertions(+) diff --git a/drivers/fsi/fsi-c

[PATCH v5 14/23] drivers/fsi: Add sysfs files for FSI master & slave accesses

2017-04-04 Thread Christopher Bostic
From: Jeremy Kerr This change adds a 'raw' file for reads & writes, and a 'term' file for the TERM command, and a 'break' file for issuing a BREAK. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 116

[PATCH v5 15/23] drivers/fsi: expose direct-access slave API

2017-04-04 Thread Christopher Bostic
From: Jeremy Kerr Allow drivers to access the slave address ranges. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 26 -- include/linux/fsi.h| 12 2 files changed, 32 insertions(+), 6 de

[PATCH v5 16/23] drivers/fsi: Add tracepoints for low-level operations

2017-04-04 Thread Christopher Bostic
From: Jeremy Kerr Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 27 +++--- include/trace/events/fsi.h | 127 + 2 files changed, 148 insertions(+), 6 deletions(-) create mode

[PATCH v5 17/23] drivers/fsi: Add error handling for slave communication errors

2017-04-04 Thread Christopher Bostic
From: Jeremy Kerr This change implements error handling in the FSI core, by cleaning up and retrying failed operations, using the SISC, TERM and BREAK facilities. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 121 ++

[PATCH v5 18/23] drivers/fsi: Document FSI master sysfs files in ABI

2017-04-04 Thread Christopher Bostic
From: Chris Bostic Add info for sysfs scan file in Documentaiton ABI/testing Signed-off-by: Chris Bostic --- Documentation/ABI/testing/sysfs-bus-fsi | 6 ++ 1 file changed, 6 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-fsi diff --git a/Documentation/ABI/testing/s

[PATCH v5 21/23] drivers/fsi: Add SCOM FSI client device driver

2017-04-04 Thread Christopher Bostic
From: Chris Bostic Create a simple SCOM engine device driver that reads and writes its control registers via an FSI bus. Includes changes from Edward A. James . Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley Signed-off-by: Edward A. James Signed-off-by: Jeremy Kerr --- drivers/fsi

[PATCH v5 19/23] drivers/fsi: Add GPIO based FSI master

2017-04-04 Thread Christopher Bostic
From: Chris Bostic Implement a FSI master using GPIO. Will generate FSI protocol for read and write commands to particular addresses. Sends master command and waits for and decodes a slave response. Includes changes from Edward A. James and Jeremy Kerr . Signed-off-by: Edward A. James Signe

  1   2   3   >