28 Jun, 2016

19 commits


15 Jun, 2016

1 commit


10 Jun, 2016

1 commit

  • Release &hi->lock before calling `cs_hsi_control_read_error' to avoid deadlock.

    The bug was found using EBA (https://github.com/models-team/eba), which reported
    the following:

    Double lock
    first at drivers/hsi/clients/cmt_speech.c:443
    second at drivers/hsi/clients/cmt_speech.c:447
    In cs_hsi_read_on_control_complete defined at drivers/hsi/clients/cmt_speech.c:438:
    (!) drivers/hsi/clients/cmt_speech.c:443: spin_lock(& hi->lock);
    (?) drivers/hsi/clients/cmt_speech.c:445: msg->status == 4 -> true
    (!) drivers/hsi/clients/cmt_speech.c:447: cs_hsi_control_read_error(hi, msg);
    (!) drivers/hsi/clients/cmt_speech.c:407: __cs_hsi_error_pre(hi, msg, "control read",
    & hi->control_state);
    (!) drivers/hsi/clients/cmt_speech.c:382: spin_lock(& hi->lock);

    Signed-off-by: Iago Abal
    Signed-off-by: Sebastian Reichel

    Iago Abal
     

30 May, 2016

2 commits


10 May, 2016

3 commits

  • After the clk change support, the ssi omap ssi core driver
    now calls into the port driver to change fclk. This function
    was previously inside of an #ifdef, because it was only used
    when CONFIG_PM is enabled. Now it also gets used without
    power management support:

    drivers/hsi/built-in.o: In function `ssi_clk_event':
    omap_ssi_port.c:(.text+0x1bf8): undefined reference to `omap_ssi_port_update_fclk'

    This moves the function outside of the CONFIG_PM guard.

    Signed-off-by: Arnd Bergmann
    Fixes: 4bcf7414528a ("HSI: omap-ssi: add clk change support")
    Signed-off-by: Sebastian Reichel

    Arnd Bergmann
     
  • The driver now uses some pinctrl functions, but fails
    to build if PINCTRL is disabled because the respective
    header files are only included indirectly:

    drivers/hsi/controllers/omap_ssi_core.c: In function 'ssi_clk_event':
    drivers/hsi/controllers/omap_ssi_core.c:317:4: error: implicit declaration of function 'pinctrl_pm_select_idle_state' [-Werror=implicit-function-declaration]
    drivers/hsi/controllers/omap_ssi_core.c:339:4: error: implicit declaration of function 'pinctrl_pm_select_default_state' [-Werror=implicit-function-declaration]
    drivers/hsi/controllers/omap_ssi_port.c: In function 'ssi_flush':
    drivers/hsi/controllers/omap_ssi_port.c:520:2: error: implicit declaration of function 'pinctrl_pm_select_idle_state' [-Werror=implicit-function-declaration]

    This includes the headers from the files that call the functions,
    which works even if pinctrl is turned off.

    Signed-off-by: Arnd Bergmann
    Fixes: 4bcf7414528a ("HSI: omap-ssi: add clk change support")
    Signed-off-by: Sebastian Reichel

    Arnd Bergmann
     
  • Enabling the omap ssi driver without COMMON_CLK results in a build failure:

    drivers/hsi/controllers/omap_ssi_core.c: In function 'ssi_clk_event':
    drivers/hsi/controllers/omap_ssi_core.c:304:7: error: 'PRE_RATE_CHANGE' undeclared (first use in this function)

    This adds a Kconfig dependency to avoid the invalid configuration.

    Signed-off-by: Arnd Bergmann
    Fixes: 4bcf7414528a ("HSI: omap-ssi: add clk change support")
    Signed-off-by: Sebastian Reichel

    Arnd Bergmann
     

03 May, 2016

6 commits


29 Jan, 2016

2 commits

  • When using the ssi-protocol driver with the Nokia N950, the
    following error is thrown during modem powered up sequence.

    [13852.274993] port0: SSI error: 0x01
    [13852.279205] ssi-protocol ssi-protocol: RX error detected
    [13852.284820] ssi-protocol ssi-protocol: Main state: 1
    [13852.290069] ssi-protocol ssi-protocol: Recv state: 0
    [13852.295288] ssi-protocol ssi-protocol: Send state: 0
    [13852.300537] ssi-protocol ssi-protocol: CMT Offline
    [13852.305603] ssi-protocol ssi-protocol: Wake test 1
    [13852.310638] ssi-protocol ssi-protocol: Data RX id: 0
    [13852.315887] ssi-protocol ssi-protocol: Data TX id: 0
    [13856.001464] ssi-protocol ssi-protocol: Watchdog trigerred
    [13856.007293] ssi-protocol ssi-protocol: Main state: 1
    [13856.012542] ssi-protocol ssi-protocol: Recv state: 0
    [13856.017761] ssi-protocol ssi-protocol: Send state: 0
    [13856.023010] ssi-protocol ssi-protocol: CMT Offline
    [13856.028045] ssi-protocol ssi-protocol: Wake test 0
    [13856.033111] ssi-protocol ssi-protocol: Data RX id: 0
    [13856.038330] ssi-protocol ssi-protocol: Data TX id: 0

    This patch fixes the issue by using the handshake setup from
    the Nokia N950 kernel. The new handshake sequence also works
    with the N900, so there is no need to differentiate between
    both modems.

    Tested-by: Aaro Koskinen
    Signed-off-by: Sebastian Reichel

    Sebastian Reichel
     
  • The Nokia N950 and Nokia N9 also have a SSI connected
    modem, which use the same protocols as the Nokia N900,
    but with increased link speed (96000 kbps instead of
    55000 kbps) and with less GPIOs.

    Since it's unclear, if the N950 and the N9 use exactly
    the same modem, each of them gets their own compatible
    string.

    Acked-by: Rob Herring
    Tested-by: Aaro Koskinen
    Signed-off-by: Sebastian Reichel

    Sebastian Reichel
     

07 Jan, 2016

2 commits


30 Oct, 2015

1 commit

  • Use devm_ioremap_resource() in order to make the code simpler,
    and remove redundant return value check of platform_get_resource()
    because this value is alreadytaken care by devm_ioremap_resource()

    Signed-off-by: Sanjeev Sharma
    Signed-off-by: Sebastian Reichel

    Sanjeev Sharma
     

19 Oct, 2015

1 commit


14 Oct, 2015

2 commits

  • The error handling path is broken as cawake_gpio was defined as
    unsigned integer causing the following warnings on boards that don't
    use SSI port and so don't have cawake_gpio defined. e.g. beagleboard C4.

    [ 30.094635] WARNING: CPU: 0 PID: 322 at drivers/gpio/gpiolib.c:86 gpio_to_desc+0xa4/0xb8()
    [ 30.103363] invalid GPIO -2
    [ 30.106292] Modules linked in: omap_ssi_port(+) cpufreq_dt cfbfillrect cfbimgblt leds_gpio cfbcopyarea thermal_sys led_class hwmon gpio_keys encoder_tfp410 connector_analog_tv connector_dvi omap_hdq snd phy_i
    [ 30.145477] CPU: 0 PID: 322 Comm: modprobe Not tainted 4.3.0-rc4-00030-gca978c0-dirty #335
    [ 30.154174] Hardware name: Generic OMAP3-GP (Flattened Device Tree)
    [ 30.160827] [] (unwind_backtrace) from [] (show_stack+0x10/0x14)
    [ 30.168975] [] (show_stack) from [] (dump_stack+0x80/0x9c)
    [ 30.176635] [] (dump_stack) from [] (warn_slowpath_common+0x7c/0xb8)
    [ 30.185180] [] (warn_slowpath_common) from [] (warn_slowpath_fmt+0x30/0x40)
    [ 30.194366] [] (warn_slowpath_fmt) from [] (gpio_to_desc+0xa4/0xb8)
    [ 30.202819] [] (gpio_to_desc) from [] (gpio_request_one+0x14/0x11c)
    [ 30.211273] [] (gpio_request_one) from [] (devm_gpio_request_one+0x3c/0x78)
    [ 30.220458] [] (devm_gpio_request_one) from [] (ssi_port_probe+0x118/0x504 [omap_ssi_port])
    [ 30.231170] [] (ssi_port_probe [omap_ssi_port]) from [] (platform_drv_probe+0x48/0xa4)
    [ 30.241424] [] (platform_drv_probe) from [] (driver_probe_device+0x1dc/0x2a0)
    [ 30.250793] [] (driver_probe_device) from [] (__driver_attach+0x94/0x98)
    [ 30.259643] [] (__driver_attach) from [] (bus_for_each_dev+0x54/0x88)
    [ 30.268249] [] (bus_for_each_dev) from [] (bus_add_driver+0xe8/0x1f8)
    [ 30.276916] [] (bus_add_driver) from [] (driver_register+0x78/0xf4)
    [ 30.285369] [] (driver_register) from [] (__platform_driver_probe+0x34/0xd8)
    [ 30.294647] [] (__platform_driver_probe) from [] (do_one_initcall+0x80/0x1d8)
    [ 30.303985] [] (do_one_initcall) from [] (do_init_module+0x5c/0x1cc)
    [ 30.312561] [] (do_init_module) from [] (load_module+0x18c8/0x1f0c)
    [ 30.320983] [] (load_module) from [] (SyS_init_module+0xdc/0x150)
    [ 30.329223] [] (SyS_init_module) from [] (ret_fast_syscall+0x0/0x1c)

    Fixes: b209e047bc743 ("HSI: Introduce OMAP SSI driver")
    Signed-off-by: Roger Quadros
    Signed-off-by: Sebastian Reichel

    Roger Quadros
     
  • When device_register() fails, kfree() is called in hsi_client_release(),
    hence there is no need to call kfree in err3 again.

    Fixes: a2aa24734d9db ("HSI: Add common DT binding for HSI client devices")
    Signed-off-by: Geliang Tang
    Signed-off-by: Sebastian Reichel

    Geliang Tang