lkml.org 
[lkml]   [2018]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 4/6] bus: ti-sysc: Add support for software reset
* Faiz Abbas <faiz_abbas@ti.com> [180705 14:24]:
> +static int sysc_reset(struct sysc *ddata)
> +{
> + int offset = ddata->offsets[SYSC_SYSCONFIG];
> + int val = sysc_read(ddata, offset);

Can you please just warn and return early for now if no
syss_mask is specified? Otherwise we'll have mysterious
errors if somebody leaves out "ti,hwmods" for module types
we do not yet support reset for.

> + val |= (0x1 << ddata->cap->regbits->srst_shift);
> + sysc_write(ddata, offset, val);
> +
> + /* Poll on reset status */
> + if (ddata->cfg.syss_mask) {
> + offset = ddata->offsets[SYSC_SYSSTATUS];
> +
> + return readl_poll_timeout(ddata->module_va + offset, val,
> + (val & ddata->cfg.syss_mask) == 0x0,
> + 100, MAX_MODULE_SOFTRESET_WAIT);
> + }
> +
> + return 0;
> +}
> +

Otherwise looks good to me.

Thanks,

Tony

\
 
 \ /
  Last update: 2018-07-05 17:48    [W:0.070 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site