From: Marek Vasut Date: Mon, 16 Jun 2014 02:49:31 +0200 Subject: [U-Boot] [PATCH 1/6] usb: ehci: mx6: Add support for i.MX6SL In-Reply-To: <1402879613-21362-1-git-send-email-otavio@ossystems.com.br> References: <1402879613-21362-1-git-send-email-otavio@ossystems.com.br> Message-ID: <201406160249.31935.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Monday, June 16, 2014 at 02:46:48 AM, Otavio Salvador wrote: > The i.MX6SL has a different base address for the controller. This > patch adapts the driver to support the different base address for this > case. > > Signed-off-by: Otavio Salvador > --- > > drivers/usb/host/ehci-mx6.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c > index c0a557b..5ba1c5e 100644 > --- a/drivers/usb/host/ehci-mx6.c > +++ b/drivers/usb/host/ehci-mx6.c > @@ -53,6 +53,12 @@ > #define UCMD_RUN_STOP (1 << 0) /* controller run/stop */ > #define UCMD_RESET (1 << 1) /* controller reset */ > > +#ifdef CONFIG_MX6SL > +#define USB_BASE_ADDR USBO2H_USB_BASE_ADDR > +#else > +#define USB_BASE_ADDR USBOH3_USB_BASE_ADDR > +#endif Can the CPU type be detected at runtime so we don't need this ugly ifdef ? Best regards, Marek Vasut