Message ID | 20200123132014.6091-1-jardim.c.pedro@gmail.com |
---|---|
State | Accepted |
Commit | fb3c4d926fa52b4a4f5b887eb29d64c24eb93d40 |
Headers | show |
Series | [v2,1/4] clock_imx8mq: Delete not used init_usb_clk() | expand |
On Thu, 23 Jan 2020 10:20:14 -0300 Pedro Jardim jardim.c.pedro at gmail.com wrote: > Function init_usb_clk() is not used anywhere, so it can simply be deleted. > This was detected by the following sparse warning: > > arch/arm/mach-imx/imx8m/clock_imx8mq.c:377:6: warning: no previous prototype > for ‘init_usb_clk’ [-Wmissing-prototypes] > void init_usb_clk(void) Cc'ing Peng. Maybe this was in preparation for adding USB support ? -- Anatolij
Hi Anatolij, On Thu, Jan 23, 2020 at 11:43 AM Anatolij Gustschin <agust at denx.de> wrote: > > On Thu, 23 Jan 2020 10:20:14 -0300 > Pedro Jardim jardim.c.pedro at gmail.com wrote: > > > Function init_usb_clk() is not used anywhere, so it can simply be deleted. > > This was detected by the following sparse warning: > > > > arch/arm/mach-imx/imx8m/clock_imx8mq.c:377:6: warning: no previous prototype > > for ‘init_usb_clk’ [-Wmissing-prototypes] > > void init_usb_clk(void) > > Cc'ing Peng. Maybe this was in preparation for adding USB support ? Unfortunately i.MX8M USB support has been pending for a long time. I prefer if we could get rid of this unused code and then bring this back when USB support comes in.
> Subject: Re: [PATCH v2 1/4] clock_imx8mq: Delete not used init_usb_clk() > > Hi Anatolij, > > On Thu, Jan 23, 2020 at 11:43 AM Anatolij Gustschin <agust at denx.de> wrote: > > > > On Thu, 23 Jan 2020 10:20:14 -0300 > > Pedro Jardim jardim.c.pedro at gmail.com wrote: > > > > > Function init_usb_clk() is not used anywhere, so it can simply be deleted. > > > This was detected by the following sparse warning: > > > > > > arch/arm/mach-imx/imx8m/clock_imx8mq.c:377:6: warning: no previous > > > prototype for ‘init_usb_clk’ [-Wmissing-prototypes] void > > > init_usb_clk(void) > > > > Cc'ing Peng. Maybe this was in preparation for adding USB support ? > > Unfortunately i.MX8M USB support has been pending for a long time. > > I prefer if we could get rid of this unused code and then bring this back when > USB support comes in. Not sure whether TI guys have done the cadence USB support. Previously Sherry did some usb work, but TI guys take over that. After the usb IP support ready, I or someone could start support usb for i.MX8MQ. For now, the function could be dropped. Thanks, Peng.
diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mq.c b/arch/arm/mach-imx/imx8m/clock_imx8mq.c index 878f2be166..663fe4d3ca 100644 --- a/arch/arm/mach-imx/imx8m/clock_imx8mq.c +++ b/arch/arm/mach-imx/imx8m/clock_imx8mq.c @@ -374,28 +374,6 @@ void init_wdog_clk(void) clock_enable(CCGR_WDOG3, 1); } -void init_usb_clk(void) -{ - if (!is_usb_boot()) { - clock_enable(CCGR_USB_CTRL1, 0); - clock_enable(CCGR_USB_CTRL2, 0); - clock_enable(CCGR_USB_PHY1, 0); - clock_enable(CCGR_USB_PHY2, 0); - /* 500MHz */ - clock_set_target_val(USB_BUS_CLK_ROOT, CLK_ROOT_ON | - CLK_ROOT_SOURCE_SEL(1)); - /* 100MHz */ - clock_set_target_val(USB_CORE_REF_CLK_ROOT, CLK_ROOT_ON | - CLK_ROOT_SOURCE_SEL(1)); - /* 100MHz */ - clock_set_target_val(USB_PHY_REF_CLK_ROOT, CLK_ROOT_ON | - CLK_ROOT_SOURCE_SEL(1)); - clock_enable(CCGR_USB_CTRL1, 1); - clock_enable(CCGR_USB_CTRL2, 1); - clock_enable(CCGR_USB_PHY1, 1); - clock_enable(CCGR_USB_PHY2, 1); - } -} void init_nand_clk(void) {
Function init_usb_clk() is not used anywhere, so it can simply be deleted. This was detected by the following sparse warning: arch/arm/mach-imx/imx8m/clock_imx8mq.c:377:6: warning: no previous prototype for ‘init_usb_clk’ [-Wmissing-prototypes] void init_usb_clk(void) ^~~~~~~~~~~~ Signed-off-by: Pedro Jardim <jardim.c.pedro at gmail.com> --- Chages since v1: - Fixed patch corruption arch/arm/mach-imx/imx8m/clock_imx8mq.c | 22 ---------------------- 1 file changed, 22 deletions(-)