lkml.org 
[lkml]   [2020]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.4 10/33] bus: ti-sysc: Handle mstandby quirk and use it for musb
    Date
    From: Tony Lindgren <tony@atomide.com>

    [ Upstream commit 03856e928b0e1a1c274eece1dfe4330a362c37f3 ]

    We need swsup quirks for sidle and mstandby for musb to work
    properly.

    Signed-off-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/bus/ti-sysc.c | 10 ++++++++--
    1 file changed, 8 insertions(+), 2 deletions(-)

    diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
    index 34bd9bf4e68ab..087684e5e0941 100644
    --- a/drivers/bus/ti-sysc.c
    +++ b/drivers/bus/ti-sysc.c
    @@ -917,6 +917,9 @@ set_midle:
    return -EINVAL;
    }

    + if (ddata->cfg.quirks & SYSC_QUIRK_SWSUP_MSTANDBY)
    + best_mode = SYSC_IDLE_NO;
    +
    reg &= ~(SYSC_IDLE_MASK << regbits->midle_shift);
    reg |= best_mode << regbits->midle_shift;
    sysc_write(ddata, ddata->offsets[SYSC_SYSCONFIG], reg);
    @@ -978,6 +981,9 @@ static int sysc_disable_module(struct device *dev)
    return ret;
    }

    + if (ddata->cfg.quirks & SYSC_QUIRK_SWSUP_MSTANDBY)
    + best_mode = SYSC_IDLE_FORCE;
    +
    reg &= ~(SYSC_IDLE_MASK << regbits->midle_shift);
    reg |= best_mode << regbits->midle_shift;
    sysc_write(ddata, ddata->offsets[SYSC_SYSCONFIG], reg);
    @@ -1251,6 +1257,8 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
    SYSC_QUIRK("gpu", 0x50000000, 0x14, -1, -1, 0x00010201, 0xffffffff, 0),
    SYSC_QUIRK("gpu", 0x50000000, 0xfe00, 0xfe10, -1, 0x40000000 , 0xffffffff,
    SYSC_MODULE_QUIRK_SGX),
    + SYSC_QUIRK("usb_otg_hs", 0, 0x400, 0x404, 0x408, 0x00000050,
    + 0xffffffff, SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_SWSUP_MSTANDBY),
    SYSC_QUIRK("wdt", 0, 0, 0x10, 0x14, 0x502a0500, 0xfffff0f0,
    SYSC_MODULE_QUIRK_WDT),
    /* Watchdog on am3 and am4 */
    @@ -1309,8 +1317,6 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
    SYSC_QUIRK("usbhstll", 0, 0, 0x10, 0x14, 0x00000008, 0xffffffff, 0),
    SYSC_QUIRK("usb_host_hs", 0, 0, 0x10, 0x14, 0x50700100, 0xffffffff, 0),
    SYSC_QUIRK("usb_host_hs", 0, 0, 0x10, -1, 0x50700101, 0xffffffff, 0),
    - SYSC_QUIRK("usb_otg_hs", 0, 0x400, 0x404, 0x408, 0x00000050,
    - 0xffffffff, 0),
    SYSC_QUIRK("vfpe", 0, 0, 0x104, -1, 0x4d001200, 0xffffffff, 0),
    #endif
    };
    --
    2.20.1
    \
     
     \ /
      Last update: 2020-01-24 02:20    [W:7.886 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site