[U-Boot] [PATCH v5 06/34] musb: sunxi: Add OTG device clkgate and reset for H3/H5
Maxime Ripard
maxime.ripard at bootlin.com
Mon Apr 23 07:55:05 UTC 2018
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 <jagan at amarulasolutions.com>
> ---
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180423/82065c92/attachment.sig>
More information about the U-Boot
mailing list