On 25.11.2016 14:59, Stefan Herbrechtsmeier wrote:
> The index of the zynq serial driver is always zero and could be removed.
> 
> Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsme...@weidmueller.de>
> 
> ---
> 
> Changes in v2:
> - Remove unused index from get uart clock function
> 
>  arch/arm/mach-zynq/clk.c              | 3 +--
>  arch/arm/mach-zynq/include/mach/clk.h | 2 +-
>  drivers/serial/serial_zynq.c          | 2 +-
>  3 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-zynq/clk.c b/arch/arm/mach-zynq/clk.c
> index 40383c1..e256b58 100644
> --- a/arch/arm/mach-zynq/clk.c
> +++ b/arch/arm/mach-zynq/clk.c
> @@ -551,13 +551,12 @@ void zynq_clk_early_init(void)
>  
>  /**
>   * get_uart_clk() - Get UART input frequency
> - * @dev_index:       UART ID
>   * Returns UART input clock frequency in Hz.
>   *
>   * Compared to zynq_clk_get_rate() this function is designed to work before
>   * relocation and can be called when the serial UART is set up.
>   */
> -unsigned long get_uart_clk(int dev_index)
> +unsigned long get_uart_clk(void)
>  {
>       u32 reg = readl(&slcr_base->uart_clk_ctrl);
>       u32 div = (reg & CLK_CTRL_DIV0_MASK) >> CLK_CTRL_DIV0_SHIFT;
> diff --git a/arch/arm/mach-zynq/include/mach/clk.h 
> b/arch/arm/mach-zynq/include/mach/clk.h
> index 250c5bc..ba2210d 100644
> --- a/arch/arm/mach-zynq/include/mach/clk.h
> +++ b/arch/arm/mach-zynq/include/mach/clk.h
> @@ -24,6 +24,6 @@ void zynq_clk_early_init(void);
>  int zynq_clk_set_rate(enum zynq_clk clk, unsigned long rate);
>  unsigned long zynq_clk_get_rate(enum zynq_clk clk);
>  const char *zynq_clk_get_name(enum zynq_clk clk);
> -unsigned long get_uart_clk(int dev_id);
> +unsigned long get_uart_clk(void);
>  
>  #endif
> diff --git a/drivers/serial/serial_zynq.c b/drivers/serial/serial_zynq.c
> index 4f6e7e4..461ba86 100644
> --- a/drivers/serial/serial_zynq.c
> +++ b/drivers/serial/serial_zynq.c
> @@ -134,7 +134,7 @@ int zynq_serial_setbrg(struct udevice *dev, int baudrate)
>               return ret;
>       }
>  #else
> -     clock = get_uart_clk(0);
> +     clock = get_uart_clk();
>  #endif
>       _uart_zynq_serial_setbrg(priv->regs, clock, baudrate);
>  
> 

Not a problem with this patch but real solution for this is code above.
When we move zynq clk driver to DM then we should remove these functions
entirely.

Anyway
Acked-by: Michal Simek <michal.si...@xilinx.com>

Thanks,
Michal

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to