Hi,

On Sat, Apr 21, 2018 at 05:49:17PM +0530, Jagan Teki wrote:
> Add OTG device clkgate and reset for H3/H5 through driver_data
> since the driver is already supporting dt.

You're not just doing that in your patch...

> Signed-off-by: Jagan Teki <[email protected]>
> ---
>  drivers/usb/musb-new/sunxi.c | 56 
> +++++++++++++++++++++++++++++++++++++-------
>  1 file changed, 47 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
> index ce40fda64e..e834db1e6a 100644
> --- a/drivers/usb/musb-new/sunxi.c
> +++ b/drivers/usb/musb-new/sunxi.c
> @@ -76,9 +76,16 @@
>   * From usbc/usbc.c
>   
> ******************************************************************************/
>  
> +struct sunxi_musb_config {
> +     struct musb_hdrc_config *config;
> +     u8 rst_bit;
> +     u8 clkgate_bit;
> +};
> +
>  struct sunxi_glue {
>       struct musb_host_data mdata;
>       struct sunxi_ccm_reg *ccm;
> +     struct sunxi_musb_config *cfg;

But you're also creating a new structure, used by everyone. This
should be split into a separate, preliminary patch.

>       struct device dev;
>  };
>  #define to_sunxi_glue(d)     container_of(d, struct sunxi_glue, dev)
> @@ -269,10 +276,13 @@ static int sunxi_musb_init(struct musb *musb)
>  
>       musb->isr = sunxi_musb_interrupt;
>  
> -     setbits_le32(&glue->ccm->ahb_gate0, 1 << AHB_GATE_OFFSET_USB0);
> +     setbits_le32(&glue->ccm->ahb_gate0,
> +                  BIT(AHB_GATE_OFFSET_USB0) | BIT(glue->cfg->clkgate_bit));

I'm pretty sure this was done before already. Shouldn't we remove the
code that does this?

Thanks!
Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

Attachment: signature.asc
Description: PGP signature

_______________________________________________
U-Boot mailing list
[email protected]
https://lists.denx.de/listinfo/u-boot

Reply via email to