28 Aug, 2017
2 commits
-
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
Signed-off-by: Greg Kroah-Hartman -
Declare bin_attribute structures as const as they are only passed as an
argument to the function device_create_bin_file. This argument is of
type const, so declare the structure as const.Signed-off-by: Bhumika Goyal
Signed-off-by: Greg Kroah-Hartman
17 Jul, 2017
2 commits
-
gcc warns about the return type of this function:
drivers/fsi/fsi-core.c:535:8: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
This removes the 'const' attribute, as suggested by the warning.
Fixes: 2b37c3e285f9 ("drivers/fsi: Set slave SMODE to init communication")
Signed-off-by: Arnd Bergmann
Acked-by: Geert Uytterhoeven
Acked-by: Jeremy Kerr
Signed-off-by: Greg Kroah-Hartman -
When testing an i2c driver that is a fsi bus driver, I saw the following
oops:kernel BUG at drivers/base/driver.c:153!
Internal error: Oops - BUG: 0 [#1] ARM[] (driver_register) from [] (fsi_driver_register+0x2c/0x38)
[] (fsi_driver_register) from [] (fsi_i2c_driver_init+0x1c/0x24)
[] (fsi_i2c_driver_init) from [] (do_one_initcall+0xb4/0x170)
[] (do_one_initcall) from [] (kernel_init_freeable+0x120/0x1dc)
[] (kernel_init_freeable) from [] (kernel_init+0x18/0x104)
[] (kernel_init) from [] (ret_from_fork+0x14/0x2c)This is because the fsi bus had not been registered. This fix registers the bus
with postcore_initcall instead, to ensure it is registered earlier on.When the fsi core is used as a module this should not be a problem as the fsi
driver will depend on the fsi bus type symbol, and will therefore load the core
before the driver.Fixes: 0508ad1fff11 ("drivers/fsi: Add empty fsi bus definitions")
Signed-off-by: Joel Stanley
Acked-by: Jeremy Kerr
Signed-off-by: Greg Kroah-Hartman
09 Jun, 2017
21 commits
-
Add missing MODULE_LICENSE("GPL") to the core FSI driver.
Signed-off-by: Christopher Bostic
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Greg Kroah-Hartman -
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: Jeremy Kerr
Signed-off-by: Joel Stanley
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Greg Kroah-Hartman -
Trace low level input/output GPIO operations.
Signed-off-by: Jeremy Kerr
Signed-off-by: Christopher Bostic
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Jeremy Kerr
Signed-off-by: Christopher Bostic
Signed-off-by: Joel Stanley
Signed-off-by: Greg Kroah-Hartman -
This change implements error handling in the FSI core, by cleaining up
and retrying failed operations, using the SISC, TERM and BREAK
facilities.Signed-off-by: Jeremy Kerr
Signed-off-by: Christopher Bostic
Signed-off-by: Greg Kroah-Hartman -
Trace low level read and write FSI bus operations.
Signed-off-by: Jeremy Kerr
Signed-off-by: Joel Stanley
Signed-off-by: Christopher Bostic
Signed-off-by: Greg Kroah-Hartman -
Allow drivers to access the slave address ranges.
Signed-off-by: Jeremy Kerr
Signed-off-by: Joel Stanley
Signed-off-by: Christopher Bostic
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Greg Kroah-Hartman -
Add driver_register and driver_unregister wrappers for FSI.
Signed-off-by: Christopher Bostic
Signed-off-by: Joel Stanley
Signed-off-by: Greg Kroah-Hartman -
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 '__'s from function names
- Return fail state for sysfs rescan file
Signed-off-by: Greg Kroah-Hartman -
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: Christopher Bostic
Signed-off-by: Joel Stanley
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Chris Bostic
Signed-off-by: Greg Kroah-Hartman -
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 Bostic
Signed-off-by: Joel Stanley
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Greg Kroah-Hartman -
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: Jeremy Kerr
Signed-off-by: Chris Bostic
Signed-off-by: Joel Stanley
Signed-off-by: Greg Kroah-Hartman
10 Feb, 2017
2 commits
-
Driver bind to devices based on the engine types & (optional) versions.
Signed-off-by: Jeremy Kerr
Signed-off-by: Chris Bostic
Signed-off-by: Greg Kroah-Hartman -
This change adds the initial (empty) fsi bus definition, and introduces
drivers/fsi/.Signed-off-by: Jeremy Kerr
Signed-off-by: Chris Bostic
Signed-off-by: Greg Kroah-Hartman