[U-Boot] [PATCH v3 2/4] serial: zynq: Remove unused index from get uart clock function

Jaehoon Chung jh80.chung at samsung.com
Mon Dec 5 23:22:01 CET 2016


On 12/02/2016 10:24 PM, stefan.herbrechtsmeier at weidmueller.de wrote:
> From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier at weidmueller.de>
> 
> The index of the zynq serial driver is always zero and could be removed.
> 
> Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier at weidmueller.de>
> Acked-by: Michal Simek <michal.simek at xilinx.com>


Even if this patch is delegated to Michal, i picked to this.
Applied on u-boot-mmc. 

Best Regards,
Jaehoon Chung
> 
> ---
> 
> Changes in v3: None
> 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);
>  
> 



More information about the U-Boot mailing list