From: Igor Grinberg <grinberg@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 5/7] OMAP3+: ehci-omap: enable usb host ports for beagle/panda
Date: Mon, 06 Feb 2012 14:03:41 +0200 [thread overview]
Message-ID: <4F2FC19D.1020100@compulab.co.il> (raw)
In-Reply-To: <1328276312-30153-6-git-send-email-govindraj.raja@ti.com>
On 02/03/12 15:38, Govindraj.R wrote:
> From: "Govindraj.R" <govindraj.raja@ti.com>
>
> For beagle and panda enable and use the ehci-omap.c generic
> api's added to configure usb host ports based on data passed
> from board file to configure in modes as specified from board data.
> For panda initialise the mux pins for ehci usage.
>
> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
Last neats and
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
> ---
> board/ti/beagle/beagle.c | 28 ++++++++++++++++++++++++++
> board/ti/panda/panda.c | 41 +++++++++++++++++++++++++++++++++++++++
> board/ti/panda/panda_mux_data.h | 16 +++++++-------
> include/configs/omap4_panda.h | 23 ++++++++++++++++++++-
> 4 files changed, 99 insertions(+), 9 deletions(-)
>
> diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
> index 98548ab..5031cf2 100644
> --- a/board/ti/beagle/beagle.c
> +++ b/board/ti/beagle/beagle.c
> @@ -45,6 +45,11 @@
> #include "beagle.h"
> #include <command.h>
>
> +#ifdef CONFIG_USB_EHCI
> +#include <usb.h>
> +#include <asm/ehci-omap.h>
> +#endif
> +
> #define pr_debug(fmt, args...) debug(fmt, ##args)
>
> #define TWL4030_I2C_BUS 0
> @@ -442,6 +447,29 @@ void show_boot_progress(int val)
> if(val == 15)
> usb_stop();
> }
> +
> +static struct omap_usbhs_board_data usbhs_bdata = {
> + .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
> + .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
> + .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED
> +};
> +
> +int ehci_hcd_init(void)
> +{
> + int ret = 0;
> +
> + ret = omap_ehci_hcd_init(&usbhs_bdata);
> + return ret;
> +}
just:
return omap_ehci_hcd_init(&usbhs_bdata);
> +
> +int ehci_hcd_stop(void)
> +{
> + int ret;
> +
> + ret = omap_ehci_hcd_stop();
> + return ret;
> +}
same here:
return omap_ehci_hcd_stop();
> +
> #endif /* CONFIG_USB_EHCI */
>
> #ifndef CONFIG_SPL_BUILD
> diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c
> index fc8c0b4..1f8509b 100644
> --- a/board/ti/panda/panda.c
> +++ b/board/ti/panda/panda.c
> @@ -26,9 +26,16 @@
> #include <asm/arch/mmc_host_def.h>
> #include <asm/arch/clocks.h>
> #include <asm/arch/gpio.h>
> +#include <asm/gpio.h>
>
> #include "panda_mux_data.h"
>
> +#ifdef CONFIG_USB_EHCI
> +#include <usb.h>
> +#include <asm/arch/ehci.h>
> +#include <asm/ehci-omap.h>
> +#endif
> +
> #define PANDA_ULPI_PHY_TYPE_GPIO 182
>
> DECLARE_GLOBAL_DATA_PTR;
> @@ -177,6 +184,40 @@ int board_mmc_init(bd_t *bis)
> }
> #endif
>
> +#ifdef CONFIG_USB_EHCI
> +
> +static struct omap_usbhs_board_data usbhs_bdata = {
> + .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
> + .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
> + .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
> +};
> +
> +int ehci_hcd_init(void)
> +{
> + int ret;
> + unsigned int utmi_clk;
> +
> + /* Now we can enable our port clocks */
> + utmi_clk = readl((void *)CM_L3INIT_HSUSBHOST_CLKCTRL);
> + utmi_clk |= HSUSBHOST_CLKCTRL_CLKSEL_UTMI_P1_MASK;
> + sr32((void *)CM_L3INIT_HSUSBHOST_CLKCTRL, 0, 32, utmi_clk);
> +
> + ret = omap_ehci_hcd_init(&usbhs_bdata);
> + if (ret < 0)
> + return ret;
> +
> + return 0;
return omap_ehci_hcd_init(&usbhs_bdata);
?
> +}
> +
> +int ehci_hcd_stop(void)
> +{
> + int ret;
> +
> + ret = omap_ehci_hcd_stop();
> + return ret;
return omap_ehci_hcd_stop();
> +}
> +#endif
[...]
--
Regards,
Igor.
next prev parent reply other threads:[~2012-02-06 12:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-03 13:38 [U-Boot] [PATCH v3 0/7] Clean up ehci-omap and extend support for omap3/4 socs Govindraj.R
2012-02-03 13:38 ` [U-Boot] [PATCH v3 1/7] ehci-omap: driver for EHCI host on OMAP3 Govindraj.R
2012-02-03 13:38 ` [U-Boot] [PATCH v3 2/7] ehci-omap: Clean up added ehci-omap.c Govindraj.R
2012-02-06 11:26 ` Igor Grinberg
2012-02-03 13:38 ` [U-Boot] [PATCH v3 3/7] OMAP3+: Clock: Adding ehci clock enabling Govindraj.R
2012-02-06 11:42 ` Igor Grinberg
2012-02-06 11:57 ` Govindraj
2012-02-06 12:17 ` Igor Grinberg
2012-02-03 13:38 ` [U-Boot] [PATCH v3 4/7] OMAP4: clock-common: Move the usb dppl configuration to new func Govindraj.R
2012-02-03 13:38 ` [U-Boot] [PATCH v3 5/7] OMAP3+: ehci-omap: enable usb host ports for beagle/panda Govindraj.R
2012-02-06 12:03 ` Igor Grinberg [this message]
2012-02-03 13:38 ` [U-Boot] [PATCH v3 6/7] usb: ulpi: Extend the existing ulpi framework Govindraj.R
2012-02-06 8:55 ` Igor Grinberg
2012-02-06 9:38 ` Govindraj
2012-02-06 10:03 ` Igor Grinberg
2012-02-08 17:42 ` SUBHASHINI MANNE
2012-02-09 6:32 ` Govindraj
2012-02-03 13:38 ` [U-Boot] [PATCH v3 7/7] usb: ulpi: Add omap-ulpi-view port support Govindraj.R
2012-02-06 9:10 ` Igor Grinberg
2012-02-03 15:25 ` [U-Boot] [PATCH v3 0/7] Clean up ehci-omap and extend support for omap3/4 socs Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F2FC19D.1020100@compulab.co.il \
--to=grinberg@compulab.co.il \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox