[U-Boot] [PATCH 03/10] timer: altera: Remove the codes to get clock frequency

Thomas Chou thomas at wytron.com.tw
Fri Nov 6 08:01:13 CET 2015


Hi Bin,

On 2015年11月05日 22:02, Bin Meng wrote:
> Since we have timer uclass to get clock frequency for us, remove
> the custom version in the altera timer driver.
>
> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
> ---
>
>   drivers/timer/altera_timer.c | 6 ------
>   1 file changed, 6 deletions(-)
>
> diff --git a/drivers/timer/altera_timer.c b/drivers/timer/altera_timer.c
> index 2ef9ad6..e4d0301 100644
> --- a/drivers/timer/altera_timer.c
> +++ b/drivers/timer/altera_timer.c
> @@ -27,7 +27,6 @@ struct altera_timer_regs {
>
>   struct altera_timer_platdata {
>   	struct altera_timer_regs *regs;
> -	unsigned long clock_rate;
>   };
>
>   /* control register */
> @@ -54,12 +53,9 @@ static int altera_timer_get_count(struct udevice *dev, unsigned long *count)
>
>   static int altera_timer_probe(struct udevice *dev)
>   {
> -	struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev);
>   	struct altera_timer_platdata *plat = dev->platdata;
>   	struct altera_timer_regs *const regs = plat->regs;
>
> -	uc_priv->clock_rate = plat->clock_rate;
> -
>   	writel(0, &regs->status);
>   	writel(0, &regs->control);
>   	writel(ALTERA_TIMER_STOP, &regs->control);
> @@ -77,8 +73,6 @@ static int altera_timer_ofdata_to_platdata(struct udevice *dev)
>
>   	plat->regs = ioremap(dev_get_addr(dev),
>   		sizeof(struct altera_timer_regs));
> -	plat->clock_rate = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
> -		"clock-frequency", 0);
>
>   	return 0;
>   }
>

Acked-by: Thomas Chou <thomas at wytron.com.tw>


More information about the U-Boot mailing list