Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-08-20 Thread Felipe Balbi
On Wed, Jul 23, 2014 at 03:33:23PM +0100, Peter Griffin wrote: > > > > > + reset_control_assert(dwc3_data->rstc_pwrdn); > > > > > + > > > > > + pinctrl_pm_select_sleep_state(dev); > > > > pinctrl will select sleep and default states automatically for you. > > I've left this in v3, as

Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-08-20 Thread Felipe Balbi
On Wed, Jul 23, 2014 at 03:33:23PM +0100, Peter Griffin wrote: + reset_control_assert(dwc3_data-rstc_pwrdn); + + pinctrl_pm_select_sleep_state(dev); pinctrl will select sleep and default states automatically for you. I've left this in v3, as greping around I couldn't

Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-23 Thread Peter Griffin
Hi Felipe, Thanks for reviewing, see my comments inline: - > > > Just use {read,write}l_relaxed() directly. > > > > Ok, unabstracted in v3 > > no, no... all other glues add their own local helpers for register > access. This is good for tracing, it's very easy to add a tracepoint to > this

Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-23 Thread Peter Griffin
Hi Felipe, Thanks for reviewing, see my comments inline: - Just use {read,write}l_relaxed() directly. Ok, unabstracted in v3 no, no... all other glues add their own local helpers for register access. This is good for tracing, it's very easy to add a tracepoint to this sort of

Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-22 Thread Lee Jones
On Tue, 22 Jul 2014, Felipe Balbi wrote: > On Tue, Jul 22, 2014 at 04:45:03PM +0100, Lee Jones wrote: > > > > > > +static void st_dwc3_init(struct st_dwc3 *dwc3_data) > > > > > > +{ > > > > > > + u32 reg = st_dwc3_readl(dwc3_data->glue_base, USB2_CLKRST_CTRL); > > > > > > + > > > > > > + reg

Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-22 Thread Felipe Balbi
On Tue, Jul 22, 2014 at 04:45:03PM +0100, Lee Jones wrote: > > > > > +static void st_dwc3_init(struct st_dwc3 *dwc3_data) > > > > > +{ > > > > > + u32 reg = st_dwc3_readl(dwc3_data->glue_base, USB2_CLKRST_CTRL); > > > > > + > > > > > + reg |= aux_clk_en(1) | ext_cfg_reset_n(1) |

Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-22 Thread Lee Jones
> > > > +static void st_dwc3_init(struct st_dwc3 *dwc3_data) > > > > +{ > > > > + u32 reg = st_dwc3_readl(dwc3_data->glue_base, USB2_CLKRST_CTRL); > > > > + > > > > + reg |= aux_clk_en(1) | ext_cfg_reset_n(1) | xhci_revision(1); > > > > + reg &= ~sw_pipew_reset_n(1); > > > > > >

Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-22 Thread Felipe Balbi
Hi, On Tue, Jul 22, 2014 at 10:18:00AM +0100, Peter Griffin wrote: > > > +static inline u32 st_dwc3_readl(void __iomem *base, u32 offset) > > > +{ > > > + return readl_relaxed(base + offset); > > > +} > > > + > > > +static inline void st_dwc3_writel(void __iomem *base, u32 offset, u32 > > >

Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-22 Thread Lee Jones
> Thanks for reviewing, see my comments inline below: - In future, it's best to only reply to questions, or review comments that you disagree with. Anything that you will action or agree with can be snipped along with any irrelevant code from your reply and replaced with "" or "[...]". If you

Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-22 Thread Peter Griffin
Hi Jingoo, Sorry for the delay in replying. Thanks for reviewing, see my comments inline below: - > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include >

Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-22 Thread Peter Griffin
Hi Lee, Thanks for reviewing, see my comments inline below: - On Mon, 07 Jul 2014, Lee Jones wrote: > On Sat, 05 Jul 2014, Peter Griffin wrote: > > > This patch adds the ST glue logic to manage the DWC3 HC > > on STiH407 SoC family. It manages the powerdown signal, > > and configures the

Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-22 Thread Peter Griffin
Hi Lee, Thanks for reviewing, see my comments inline below: - On Mon, 07 Jul 2014, Lee Jones wrote: On Sat, 05 Jul 2014, Peter Griffin wrote: This patch adds the ST glue logic to manage the DWC3 HC on STiH407 SoC family. It manages the powerdown signal, and configures the internal glue

Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-22 Thread Peter Griffin
Hi Jingoo, Sorry for the delay in replying. Thanks for reviewing, see my comments inline below: - snip +#include linux/module.h +#include linux/kernel.h +#include linux/slab.h +#include linux/interrupt.h +#include linux/platform_device.h +#include linux/ioport.h +#include

Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-22 Thread Lee Jones
Thanks for reviewing, see my comments inline below: - In future, it's best to only reply to questions, or review comments that you disagree with. Anything that you will action or agree with can be snipped along with any irrelevant code from your reply and replaced with snip or [...]. If you

Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-22 Thread Felipe Balbi
Hi, On Tue, Jul 22, 2014 at 10:18:00AM +0100, Peter Griffin wrote: +static inline u32 st_dwc3_readl(void __iomem *base, u32 offset) +{ + return readl_relaxed(base + offset); +} + +static inline void st_dwc3_writel(void __iomem *base, u32 offset, u32 value) +{ +

Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-22 Thread Lee Jones
+static void st_dwc3_init(struct st_dwc3 *dwc3_data) +{ + u32 reg = st_dwc3_readl(dwc3_data-glue_base, USB2_CLKRST_CTRL); + + reg |= aux_clk_en(1) | ext_cfg_reset_n(1) | xhci_revision(1); + reg = ~sw_pipew_reset_n(1); 1? Better to add defines for

Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-22 Thread Felipe Balbi
On Tue, Jul 22, 2014 at 04:45:03PM +0100, Lee Jones wrote: +static void st_dwc3_init(struct st_dwc3 *dwc3_data) +{ + u32 reg = st_dwc3_readl(dwc3_data-glue_base, USB2_CLKRST_CTRL); + + reg |= aux_clk_en(1) | ext_cfg_reset_n(1) | xhci_revision(1); + reg =

Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-22 Thread Lee Jones
On Tue, 22 Jul 2014, Felipe Balbi wrote: On Tue, Jul 22, 2014 at 04:45:03PM +0100, Lee Jones wrote: +static void st_dwc3_init(struct st_dwc3 *dwc3_data) +{ + u32 reg = st_dwc3_readl(dwc3_data-glue_base, USB2_CLKRST_CTRL); + + reg |= aux_clk_en(1) |

Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-07 Thread Jingoo Han
On Saturday, July 05, 2014 3:25 PM, Peter Griffin wrote: > > This patch adds the ST glue logic to manage the DWC3 HC > on STiH407 SoC family. It manages the powerdown signal, > and configures the internal glue logic and syscfg registers. > > Signed-off-by: Giuseppe Cavallaro > Signed-off-by:

Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-07 Thread Lee Jones
On Sat, 05 Jul 2014, Peter Griffin wrote: > This patch adds the ST glue logic to manage the DWC3 HC > on STiH407 SoC family. It manages the powerdown signal, > and configures the internal glue logic and syscfg registers. > > Signed-off-by: Giuseppe Cavallaro > Signed-off-by: Peter Griffin >

Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-07 Thread Lee Jones
On Sat, 05 Jul 2014, Peter Griffin wrote: This patch adds the ST glue logic to manage the DWC3 HC on STiH407 SoC family. It manages the powerdown signal, and configures the internal glue logic and syscfg registers. Signed-off-by: Giuseppe Cavallaro peppe.cavall...@st.com Signed-off-by:

Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-07 Thread Jingoo Han
On Saturday, July 05, 2014 3:25 PM, Peter Griffin wrote: This patch adds the ST glue logic to manage the DWC3 HC on STiH407 SoC family. It manages the powerdown signal, and configures the internal glue logic and syscfg registers. Signed-off-by: Giuseppe Cavallaro peppe.cavall...@st.com

[PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-05 Thread Peter Griffin
This patch adds the ST glue logic to manage the DWC3 HC on STiH407 SoC family. It manages the powerdown signal, and configures the internal glue logic and syscfg registers. Signed-off-by: Giuseppe Cavallaro Signed-off-by: Peter Griffin --- drivers/usb/dwc3/Kconfig | 9 ++

[PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC

2014-07-05 Thread Peter Griffin
This patch adds the ST glue logic to manage the DWC3 HC on STiH407 SoC family. It manages the powerdown signal, and configures the internal glue logic and syscfg registers. Signed-off-by: Giuseppe Cavallaro peppe.cavall...@st.com Signed-off-by: Peter Griffin peter.grif...@linaro.org ---