All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5 4/9] board: ti: dra7xx-evm: turn on USB clocks in late init stage
Date: Fri, 4 May 2018 16:38:43 +0200	[thread overview]
Message-ID: <cabcd60c-8b2c-ccf6-9f4b-031d120603fa@denx.de> (raw)
In-Reply-To: <1525444491-24324-5-git-send-email-jjhiblot@ti.com>

On 05/04/2018 04:34 PM, Jean-Jacques Hiblot wrote:
> For USB ports that use the Driver Model, turn on the clocks during the
> late init stage.
> 
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> ---
> 
> Changes in v5: None
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
> 
>  board/ti/dra7xx/evm.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
> index 06f061c..c1e1b8e 100644
> --- a/board/ti/dra7xx/evm.c
> +++ b/board/ti/dra7xx/evm.c
> @@ -647,6 +647,19 @@ int dram_init_banksize(void)
>  	return 0;
>  }
>  
> +#if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL)
> +static int device_okay(const char *path)
> +{
> +	int node;
> +
> +	node = fdt_path_offset(gd->fdt_blob, path);
> +	if (node < 0)
> +		return 0;
> +
> +	return fdtdec_get_is_enabled(gd->fdt_blob, node);
> +}
> +#endif
> +
>  int board_late_init(void)
>  {
>  #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
> @@ -686,6 +699,12 @@ int board_late_init(void)
>  	if (board_is_dra71x_evm())
>  		palmas_i2c_write_u8(LP873X_I2C_SLAVE_ADDR, 0x9, 0x7);
>  #endif
> +#if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL)
> +	if (device_okay("/ocp/omap_dwc3_1 at 48880000"))
> +		enable_usb_clocks(0);
> +	if (device_okay("/ocp/omap_dwc3_2 at 488c0000"))
> +		enable_usb_clocks(1);
> +#endif

Shouldnt the driver turn this on?

-- 
Best regards,
Marek Vasut

  reply	other threads:[~2018-05-04 14:38 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-04 14:34 [U-Boot] [PATCH v5 0/9] Add support for DM_USB for TI's DRA7 EVMs and AM57 EVMs platforms Jean-Jacques Hiblot
2018-05-04 14:34 ` [U-Boot] [PATCH v5 1/9] syscon: dm: Add a new method to get a regmap from DTS Jean-Jacques Hiblot
2018-05-04 21:38   ` Simon Glass
2018-05-04 14:34 ` [U-Boot] [PATCH v5 2/9] phy: ti-pip3-phy: Add support for USB3 PHY Jean-Jacques Hiblot
2018-05-04 14:34 ` [U-Boot] [PATCH v5 3/9] phy: Add a new driver for OMAP's USB2 PHYs Jean-Jacques Hiblot
2018-05-04 14:38   ` Marek Vasut
2018-05-04 14:34 ` [U-Boot] [PATCH v5 4/9] board: ti: dra7xx-evm: turn on USB clocks in late init stage Jean-Jacques Hiblot
2018-05-04 14:38   ` Marek Vasut [this message]
2018-05-04 14:42     ` Jean-Jacques Hiblot
2018-05-04 15:43       ` Marek Vasut
2018-05-04 17:58         ` Jean-Jacques Hiblot
2018-05-04 19:06           ` Marek Vasut
2018-05-15 16:10             ` Jean-Jacques Hiblot
2018-05-15 18:05               ` Jean-Jacques Hiblot
2018-05-15 22:13               ` Marek Vasut
2018-05-16  9:00                 ` Jean-Jacques Hiblot
2018-05-16  9:04                   ` Marek Vasut
2018-05-16 13:53                     ` Jean-Jacques Hiblot
2018-05-16 15:21                     ` Tom Rini
2018-05-17  9:27                       ` Jean-Jacques Hiblot
2018-05-16 12:46                   ` Tom Rini
2018-05-04 14:34 ` [U-Boot] [PATCH v5 5/9] board; ti: am57xx: turn on USB clocks Jean-Jacques Hiblot
2018-05-04 14:34 ` [U-Boot] [PATCH v5 6/9] dts: dra7x: make ocp2scp@4a080000 compatible with simple-bus Jean-Jacques Hiblot
2018-05-04 14:34 ` [U-Boot] [PATCH v5 7/9] dts: dra7x: Disable USB1 on all evms Jean-Jacques Hiblot
2018-05-04 14:34 ` [U-Boot] [PATCH v5 8/9] configs: enable OMAP_USB2_PHY for all DRA7 platforms Jean-Jacques Hiblot
2018-05-04 14:34 ` [U-Boot] [PATCH v5 9/9] configs: am57xx_evm: Enable DM_USB and dependencies Jean-Jacques Hiblot

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=cabcd60c-8b2c-ccf6-9f4b-031d120603fa@denx.de \
    --to=marex@denx.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.