diff options
author | Rick Chen <rickchen36@gmail.com> | 2017-11-28 09:14:20 +0800 |
---|---|---|
committer | Rick Chen <rickchen36@gmail.com> | 2017-11-30 09:39:07 +0800 |
commit | c6c85dc87d2ca044458429cb2b61c0dcaea9b7d6 (patch) | |
tree | 99ed37f2a97fb59d340e5b99607ac9f992ebb57b /drivers/timer | |
parent | 033d408102d68950aaba0011d9e9a07d9fbcf955 (diff) | |
download | u-boot-c6c85dc87d2ca044458429cb2b61c0dcaea9b7d6.zip u-boot-c6c85dc87d2ca044458429cb2b61c0dcaea9b7d6.tar.gz u-boot-c6c85dc87d2ca044458429cb2b61c0dcaea9b7d6.tar.bz2 |
cosmetic: atcpit100_timer: Use device api to get platdata
Use dev_get_platdata to get private platdata.
Signed-off-by: rick <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/timer')
-rw-r--r-- | drivers/timer/atcpit100_timer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/timer/atcpit100_timer.c b/drivers/timer/atcpit100_timer.c index d5146dd..963f978 100644 --- a/drivers/timer/atcpit100_timer.c +++ b/drivers/timer/atcpit100_timer.c @@ -73,7 +73,7 @@ struct atcpit_timer_platdata { static int atcpit_timer_get_count(struct udevice *dev, u64 *count) { - struct atcpit_timer_platdata *plat = dev->platdata; + struct atcpit_timer_platdata *plat = dev_get_platdata(dev); u32 val; val = ~(REG32_TMR(CH_CNT(1))+0xffffffff); *count = timer_conv_64(val); @@ -82,7 +82,7 @@ static int atcpit_timer_get_count(struct udevice *dev, u64 *count) static int atcpit_timer_probe(struct udevice *dev) { - struct atcpit_timer_platdata *plat = dev->platdata; + struct atcpit_timer_platdata *plat = dev_get_platdata(dev); REG32_TMR(CH_REL(1)) = 0xffffffff; REG32_TMR(CH_CTL(1)) = APB_CLK|TMR_32; REG32_TMR(CH_EN) |= CH_TMR_EN(1 , 0); |