Re: [PATCH] clk: aspeed: Prevent reset if clock is enabled

2018-03-07 Thread Joel Stanley
On Thu, Mar 8, 2018 at 4:08 PM, Lei YU wrote: > On Thu, Mar 8, 2018 at 11:42 AM, Joel Stanley wrote: >>> + /* Only reset/enable/unreset if clock is stopped */ >>> + regmap_read(gate->map, ASPEED_CLK_STOP_CTRL, ®); >>> + if (!(reg & clk)) >>> + return 0; >> >> This

Re: [PATCH] clk: aspeed: Prevent reset if clock is enabled

2018-03-07 Thread Lei YU
On Thu, Mar 8, 2018 at 11:42 AM, Joel Stanley wrote: >> + /* Only reset/enable/unreset if clock is stopped */ >> + regmap_read(gate->map, ASPEED_CLK_STOP_CTRL, ®); >> + if (!(reg & clk)) >> + return 0; > > This doesn't generalise to all of the clocks, as some clocks

Re: [PATCH] clk: aspeed: Prevent reset if clock is enabled

2018-03-07 Thread Joel Stanley
On Thu, Mar 8, 2018 at 2:12 PM, Joel Stanley wrote: > Hi Eddie, > > On Thu, Mar 8, 2018 at 3:06 AM, Eddie James > wrote: >> According to the Aspeed specification, the reset and enable sequence >> should be done when the clock is stopped. The specification doesn't >> define behavior if the reset

Re: [PATCH] clk: aspeed: Prevent reset if clock is enabled

2018-03-07 Thread Joel Stanley
Hi Eddie, On Thu, Mar 8, 2018 at 3:06 AM, Eddie James wrote: > According to the Aspeed specification, the reset and enable sequence > should be done when the clock is stopped. The specification doesn't > define behavior if the reset is done while the clock is enabled. > > From testing on the AST2

[PATCH] clk: aspeed: Prevent reset if clock is enabled

2018-03-07 Thread Eddie James
According to the Aspeed specification, the reset and enable sequence should be done when the clock is stopped. The specification doesn't define behavior if the reset is done while the clock is enabled. >From testing on the AST2500, the LPC Controller has problems if the clock is reset while enable