summaryrefslogtreecommitdiffstats
path: root/drivers/fsi/fsi-scom.c
Commit message (Collapse)AuthorAgeFilesLines
* fsi: fsi-scom.c: Remove duplicate headerBrajeswar Ghosh2018-11-261-1/+0
| | | | | | | Remove linux/cdev.h which is included more than once Signed-off-by: Brajeswar Ghosh <brajeswar.linux@gmail.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* fsi: scom: Fix NULL dereferenceBenjamin Herrenschmidt2018-08-061-0/+1
| | | | | | | | | | The chardev conversion forgot to copy the fsi_dev, silly mistake, compounded by a testing mistake on my side, this specific driver wasn't being tested properly. Fixes: d8f4587655f9 "fsi: scom: Convert to use the new chardev" Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* fsi: scom: Convert to use the new chardevBenjamin Herrenschmidt2018-07-271-50/+80
| | | | | | | This converts FSI scom to use the new fsi-core controlled chardev allocator and use a real cdev instead of a miscdev. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* fsi: scom: Major overhaulBenjamin Herrenschmidt2018-06-181-30/+394
| | | | | | | | | | | | | | | This was too hard to split ... this adds a number of features to the SCOM user interface: - Support for indirect SCOMs - read()/write() interface now handle errors and retries - New ioctl() "raw" interface for use by debuggers Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Eddie James <eajames@linux.vnet.ibm.com> Reviewed-by: Alistair Popple <alistair@popple.id.au>
* fsi: scom: Add register definitionsBenjamin Herrenschmidt2018-06-181-1/+18
| | | | | | | | Add a few more register and bit definitions, also define and use SCOM_READ_CMD (which is 0 but it makes the code clearer) Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Eddie James <eajames@linux.vnet.ibm.com>
* fsi: scom: Fixup endian annotationsBenjamin Herrenschmidt2018-06-181-5/+4
| | | | | | | | Use the proper annotated type __be32 and fixup the accessor used for get_scom() Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Eddie James <eajames@linux.vnet.ibm.com>
* fsi: scom: Whitespace fixesBenjamin Herrenschmidt2018-06-181-4/+4
| | | | | | | No functional changes Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Eddie James <eajames@linux.vnet.ibm.com>
* fsi: scom: Add mutex around FSI2PIB accessesBenjamin Herrenschmidt2018-06-181-7/+18
| | | | | | | | | Otherwise, multiple clients can open the driver and attempt to access the PIB at the same time, thus clobbering each other in the process. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Eddie James <eajames@linux.vnet.ibm.com>
* fsi: scom: Remove PIB reset during probeEddie James2018-06-121-8/+0
| | | | | | | | | | The PIB reset causes problems for the running P9 chip. The reset shouldn't be performed by this driver. Signed-off-by: Eddie James <eajames@linux.vnet.ibm.com> Reviewed-by: Christopher Bostic <cbostic@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Tested-by: Joel Stanley <joel@jms.id.au>
* drivers/fsi/scom: Remove reset before every putscomEdward A. James2017-08-281-6/+4
| | | | | | | | Reset causes problems for operations requiring multiple scoms (e.g. i2c over scom). Instead, reset scom engine during probe. Signed-off-by: Edward A. James <eajames@us.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers/fsi: Add SCOM FSI client device driverChristopher Bostic2017-06-091-0/+263
Create a simple SCOM engine device driver that reads and writes its control registers via an FSI bus. Includes changes from Edward A. James <eajames@us.ibm.com>. Signed-off-by: Christopher Bostic <cbostic@linux.vnet.ibm.com> Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Edward A. James <eajames@us.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>