Patchwork [U-Boot,2/2] SMDK5250: Enable VBus for USB

login
register
mail settings
Submitter Rajeshwari Birje
Date Dec. 3, 2012, 1:18 p.m.
Message ID <1354540697-4007-3-git-send-email-rajeshwari.s@samsung.com>
Download mbox | patch
Permalink /patch/203347/
State Superseded
Delegated to: Marek Vasut
Headers show

Comments

Rajeshwari Birje - Dec. 3, 2012, 1:18 p.m.
This patch enables Vbus required for USB.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
---
 board/samsung/smdk5250/smdk5250.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
Simon Glass - Dec. 4, 2012, 1:24 a.m.
Hi Rajeshwari,

On Mon, Dec 3, 2012 at 5:18 AM, Rajeshwari Shinde
<rajeshwari.s@samsung.com> wrote:
> This patch enables Vbus required for USB.
>
> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
> ---
>  board/samsung/smdk5250/smdk5250.c |   17 +++++++++++++++++
>  1 files changed, 17 insertions(+), 0 deletions(-)
>
> diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c
> index 5ebc665..fb4c70e 100644
> --- a/board/samsung/smdk5250/smdk5250.c
> +++ b/board/samsung/smdk5250/smdk5250.c
> @@ -63,6 +63,19 @@ void board_poll_devices(void)
>  #endif
>  }
>
> +int board_usb_vbus_init(void)
> +{
> +       int err;

blank line here

> +       err = exynos_pinmux_config(PERIPH_ID_USB20, PINMUX_FLAG_NONE);
> +       if (err) {
> +               debug("VBUS not configured\n");
> +               return err;
> +       }
> +       /* VBUS turn ON time */
> +       mdelay(3);

and here

> +        return 0;
> +}
> +
>  int board_init(void)
>  {
>         gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL);
> @@ -80,6 +93,10 @@ int board_init(void)
>  #ifdef CONFIG_EXYNOS_SPI
>         spi_init();
>  #endif
> +

Perhaps could omit this blank line.

> +#ifdef CONFIG_USB_EHCI_EXYNOS
> +       board_usb_vbus_init();
> +#endif
>         return 0;
>  }
>
> --
> 1.7.4.4
>

Regards
Simon

Patch

diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c
index 5ebc665..fb4c70e 100644
--- a/board/samsung/smdk5250/smdk5250.c
+++ b/board/samsung/smdk5250/smdk5250.c
@@ -63,6 +63,19 @@  void board_poll_devices(void)
 #endif
 }
 
+int board_usb_vbus_init(void)
+{
+	int err;
+	err = exynos_pinmux_config(PERIPH_ID_USB20, PINMUX_FLAG_NONE);
+	if (err) {
+		debug("VBUS not configured\n");
+		return err;
+	}
+	/* VBUS turn ON time */
+	mdelay(3);
+        return 0;
+}
+
 int board_init(void)
 {
 	gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL);
@@ -80,6 +93,10 @@  int board_init(void)
 #ifdef CONFIG_EXYNOS_SPI
 	spi_init();
 #endif
+
+#ifdef CONFIG_USB_EHCI_EXYNOS
+	board_usb_vbus_init();
+#endif
 	return 0;
 }