28 Aug, 2017

2 commits


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

    Arnd Bergmann
     
  • 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

    Joel Stanley
     

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

    Christopher Bostic
     
  • 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

    Jeremy Kerr
     
  • 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

    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
    Signed-off-by: Greg Kroah-Hartman

    Christopher Bostic
     
  • Trace low level input/output GPIO operations.

    Signed-off-by: Jeremy Kerr
    Signed-off-by: Christopher Bostic
    Signed-off-by: Greg Kroah-Hartman

    Jeremy Kerr
     
  • 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

    Christopher Bostic
     
  • 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

    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
    Signed-off-by: Greg Kroah-Hartman

    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
    Signed-off-by: Greg Kroah-Hartman

    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
    Signed-off-by: Greg Kroah-Hartman

    Jeremy Kerr
     
  • 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

    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 '__'s from function names
    - Return fail state for sysfs rescan file
    Signed-off-by: Greg Kroah-Hartman

    Christopher Bostic
     
  • 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

    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
    Signed-off-by: Greg Kroah-Hartman

    Jeremy Kerr
     
  • 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

    Christopher Bostic
     
  • 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

    Jeremy Kerr
     
  • 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

    Christopher Bostic
     
  • 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

    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 Bostic
    Signed-off-by: Joel Stanley
    Signed-off-by: Greg Kroah-Hartman

    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
    Signed-off-by: Greg Kroah-Hartman

    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: Jeremy Kerr
    Signed-off-by: Chris Bostic
    Signed-off-by: Joel Stanley
    Signed-off-by: Greg Kroah-Hartman

    Jeremy Kerr
     

10 Feb, 2017

2 commits