Patchwork [U-Boot,4/8] tegra: usb: remove unneeded function parameter

login
register
mail settings
Submitter Lucas Stach
Date Oct. 30, 2012, 9:22 a.m.
Message ID <1351588973-20699-4-git-send-email-dev@lynxeye.de>
Download mbox | patch
Permalink /patch/195340/
State Superseded
Delegated to: Marek Vasut
Headers show

Comments

Lucas Stach - Oct. 30, 2012, 9:22 a.m.
Just a dead parameter, never actually used.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 arch/arm/cpu/armv7/tegra20/usb.c | 6 ++----
 1 Datei geändert, 2 Zeilen hinzugefügt(+), 4 Zeilen entfernt(-)
Simon Glass - Oct. 30, 2012, 1:18 p.m.
Hi Lucas,

On Tue, Oct 30, 2012 at 2:22 AM, Lucas Stach <dev@lynxeye.de> wrote:
> Just a dead parameter, never actually used.
>
> Signed-off-by: Lucas Stach <dev@lynxeye.de>

Acked-by: Simon Glass <sjg@chromium.org>

> ---
>  arch/arm/cpu/armv7/tegra20/usb.c | 6 ++----
>  1 Datei geändert, 2 Zeilen hinzugefügt(+), 4 Zeilen entfernt(-)
>
> diff --git a/arch/arm/cpu/armv7/tegra20/usb.c b/arch/arm/cpu/armv7/tegra20/usb.c
> index e61bd69..cf800b1 100644
> --- a/arch/arm/cpu/armv7/tegra20/usb.c
> +++ b/arch/arm/cpu/armv7/tegra20/usb.c
> @@ -477,8 +477,7 @@ int tegrausb_stop_port(int portnum)
>         return 0;
>  }
>
> -int fdt_decode_usb(const void *blob, int node, unsigned osc_frequency_mhz,
> -                  struct fdt_usb *config)
> +int fdt_decode_usb(const void *blob, int node, struct fdt_usb *config)
>  {
>         const char *phy, *mode;
>
> @@ -526,7 +525,6 @@ int fdt_decode_usb(const void *blob, int node, unsigned osc_frequency_mhz,
>  int board_usb_init(const void *blob)
>  {
>         struct fdt_usb config;
> -       unsigned osc_freq = clock_get_rate(CLOCK_ID_OSC);
>         int node_list[USB_PORTS_MAX];
>         int node, count, i;
>         u32 *timing;
> @@ -545,7 +543,7 @@ int board_usb_init(const void *blob)
>                 node = node_list[i];
>                 if (!node)
>                         continue;
> -               if (fdt_decode_usb(blob, node, osc_freq, &config)) {
> +               if (fdt_decode_usb(blob, node, &config)) {

I believe there was originally some intent to put the timing data in
the fdt, so that this could be different for each board. Then the fdt
(most likely some common include file) might want to specify different
options for the different oscillator frequencies. However we have
never had to use such a construct. Even if we did then I suspect that
just adding a single timing set to each port would be good enough.

>                         debug("Cannot decode USB node %s\n",
>                               fdt_get_name(blob, node, NULL));
>                         return -1;
> --
> 1.7.11.7
>

Regards,
Simon

Patch

diff --git a/arch/arm/cpu/armv7/tegra20/usb.c b/arch/arm/cpu/armv7/tegra20/usb.c
index e61bd69..cf800b1 100644
--- a/arch/arm/cpu/armv7/tegra20/usb.c
+++ b/arch/arm/cpu/armv7/tegra20/usb.c
@@ -477,8 +477,7 @@  int tegrausb_stop_port(int portnum)
 	return 0;
 }
 
-int fdt_decode_usb(const void *blob, int node, unsigned osc_frequency_mhz,
-		   struct fdt_usb *config)
+int fdt_decode_usb(const void *blob, int node, struct fdt_usb *config)
 {
 	const char *phy, *mode;
 
@@ -526,7 +525,6 @@  int fdt_decode_usb(const void *blob, int node, unsigned osc_frequency_mhz,
 int board_usb_init(const void *blob)
 {
 	struct fdt_usb config;
-	unsigned osc_freq = clock_get_rate(CLOCK_ID_OSC);
 	int node_list[USB_PORTS_MAX];
 	int node, count, i;
 	u32 *timing;
@@ -545,7 +543,7 @@  int board_usb_init(const void *blob)
 		node = node_list[i];
 		if (!node)
 			continue;
-		if (fdt_decode_usb(blob, node, osc_freq, &config)) {
+		if (fdt_decode_usb(blob, node, &config)) {
 			debug("Cannot decode USB node %s\n",
 			      fdt_get_name(blob, node, NULL));
 			return -1;