On 06/20/2017 01:29 AM, Andy Shevchenko wrote: > On Tue, Jun 20, 2017 at 1:26 AM, Hauke Mehrtens <hauke@xxxxxxxxxx> wrote: >> From: Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx> >> >> The reset controllers (on xRX200 and newer SoCs have two of them) are >> provided by the RCU module. This was initially implemented as a simple >> reset controller. However, the RCU module provides more functionality >> (ethernet GPHYs, USB PHY, etc.), which makes it a MFD device. >> The old reset controller driver implementation from >> arch/mips/lantiq/xway/reset.c did not honor this fact. >> >> For some devices the request and the status bits are different. >> > > FWIW, > Reviewed-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx> > > One nit below. > >> Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx> >> Cc: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx> >> --- >> .../devicetree/bindings/reset/lantiq,reset.txt | 29 +++ >> drivers/reset/Kconfig | 6 + >> drivers/reset/Makefile | 1 + >> drivers/reset/reset-lantiq.c | 215 +++++++++++++++++++++ >> 4 files changed, 251 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/reset/lantiq,reset.txt >> create mode 100644 drivers/reset/reset-lantiq.c ...... >> +static int lantiq_rcu_reset_status_timeout(struct reset_controller_dev *rcdev, >> + unsigned long id, bool assert) >> +{ >> + int ret; >> + int retry = LANTIQ_RCU_RESET_TIMEOUT; >> + >> + do { >> + ret = lantiq_rcu_reset_status(rcdev, id); >> + if (ret < 0) >> + return ret; > >> + if (ret == assert) >> + break; > > return 0; > >> + usleep_range(20, 40); >> + } while (--retry); >> + > >> + return retry ? 0 : -ETIMEDOUT; > > return -ETIMEDOUT; > Changed ... Hauke -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html