From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Date: Fri, 8 Jun 2018 16:24:38 +0200 Subject: [U-Boot] [PATCH v3 2/4] usb: sunxi: ehci: get rid of ifdefs In-Reply-To: <20180608022341.27225-2-anarsoul@gmail.com> References: <20180608022341.27225-1-anarsoul@gmail.com> <20180608022341.27225-2-anarsoul@gmail.com> Message-ID: <20180608142438.fk4wixlypb6lccbi@flea> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Jun 07, 2018 at 07:23:39PM -0700, Vasily Khoruzhick wrote: > We can use compatibles instead. > > Signed-off-by: Vasily Khoruzhick > --- > v3: use ehci_sunxi_cfg instead of id > > drivers/usb/host/ehci-sunxi.c | 83 ++++++++++++++++++++++++++--------- > 1 file changed, 63 insertions(+), 20 deletions(-) > > diff --git a/drivers/usb/host/ehci-sunxi.c b/drivers/usb/host/ehci-sunxi.c > index 360efc9116..35fbe03331 100644 > --- a/drivers/usb/host/ehci-sunxi.c > +++ b/drivers/usb/host/ehci-sunxi.c > @@ -22,11 +22,17 @@ > #define AHB_CLK_DIST 1 > #endif > > +struct ehci_sunxi_cfg { > + bool has_reset; > + u32 extra_ahb_gate_mask; > +}; > + > struct ehci_sunxi_priv { > struct ehci_ctrl ehci; > struct sunxi_ccm_reg *ccm; > int ahb_gate_mask; /* Mask of ahb_gate0 clk gate bits for this hcd */ Ideally this should be moved to the ehci_sunxi_cfg (and this is true for OHCI as well) function for consistency, but that can be done in a subsequent patch. It looks good otherwise, thanks! Maxime -- Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com