diff options
author | Simon Glass | 2020-12-03 16:55:20 -0700 |
---|---|---|
committer | Simon Glass | 2020-12-13 16:51:09 -0700 |
commit | c69cda25c9b59e53a6bc8969ada58942549f5b5d (patch) | |
tree | 8c84d1773465eb8e06cbbaeb710daa6217f5618d /drivers/rtc | |
parent | 4f50086ad6d69c355a07389fb436c64c92ec614a (diff) |
dm: treewide: Rename dev_get_platdata() to dev_get_plat()
Rename this to be consistent with the change from 'platdata'.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/i2c_rtc_emul.c | 16 | ||||
-rw-r--r-- | drivers/rtc/mvrtc.c | 8 | ||||
-rw-r--r-- | drivers/rtc/pl031.c | 6 |
3 files changed, 15 insertions, 15 deletions
diff --git a/drivers/rtc/i2c_rtc_emul.c b/drivers/rtc/i2c_rtc_emul.c index 59043a72309..5a2a154e653 100644 --- a/drivers/rtc/i2c_rtc_emul.c +++ b/drivers/rtc/i2c_rtc_emul.c @@ -50,7 +50,7 @@ struct sandbox_i2c_rtc { long sandbox_i2c_rtc_set_offset(struct udevice *dev, bool use_system_time, int offset) { - struct sandbox_i2c_rtc_plat_data *plat = dev_get_platdata(dev); + struct sandbox_i2c_rtc_plat_data *plat = dev_get_plat(dev); long old_offset; old_offset = plat->offset; @@ -63,7 +63,7 @@ long sandbox_i2c_rtc_set_offset(struct udevice *dev, bool use_system_time, long sandbox_i2c_rtc_get_set_base_time(struct udevice *dev, long base_time) { - struct sandbox_i2c_rtc_plat_data *plat = dev_get_platdata(dev); + struct sandbox_i2c_rtc_plat_data *plat = dev_get_plat(dev); long old_base_time; old_base_time = plat->base_time; @@ -75,7 +75,7 @@ long sandbox_i2c_rtc_get_set_base_time(struct udevice *dev, long base_time) static void reset_time(struct udevice *dev) { - struct sandbox_i2c_rtc_plat_data *plat = dev_get_platdata(dev); + struct sandbox_i2c_rtc_plat_data *plat = dev_get_plat(dev); struct rtc_time now; os_localtime(&now); @@ -86,7 +86,7 @@ static void reset_time(struct udevice *dev) static int sandbox_i2c_rtc_get(struct udevice *dev, struct rtc_time *time) { - struct sandbox_i2c_rtc_plat_data *plat = dev_get_platdata(dev); + struct sandbox_i2c_rtc_plat_data *plat = dev_get_plat(dev); struct rtc_time tm_now; long now; @@ -104,7 +104,7 @@ static int sandbox_i2c_rtc_get(struct udevice *dev, struct rtc_time *time) static int sandbox_i2c_rtc_set(struct udevice *dev, const struct rtc_time *time) { - struct sandbox_i2c_rtc_plat_data *plat = dev_get_platdata(dev); + struct sandbox_i2c_rtc_plat_data *plat = dev_get_plat(dev); struct rtc_time tm_now; long now; @@ -122,7 +122,7 @@ static int sandbox_i2c_rtc_set(struct udevice *dev, const struct rtc_time *time) /* Update the current time in the registers */ static int sandbox_i2c_rtc_prepare_read(struct udevice *emul) { - struct sandbox_i2c_rtc_plat_data *plat = dev_get_platdata(emul); + struct sandbox_i2c_rtc_plat_data *plat = dev_get_plat(emul); struct rtc_time time; int ret; @@ -143,7 +143,7 @@ static int sandbox_i2c_rtc_prepare_read(struct udevice *emul) static int sandbox_i2c_rtc_complete_write(struct udevice *emul) { - struct sandbox_i2c_rtc_plat_data *plat = dev_get_platdata(emul); + struct sandbox_i2c_rtc_plat_data *plat = dev_get_plat(emul); struct rtc_time time; int ret; @@ -165,7 +165,7 @@ static int sandbox_i2c_rtc_complete_write(struct udevice *emul) static int sandbox_i2c_rtc_xfer(struct udevice *emul, struct i2c_msg *msg, int nmsgs) { - struct sandbox_i2c_rtc_plat_data *plat = dev_get_platdata(emul); + struct sandbox_i2c_rtc_plat_data *plat = dev_get_plat(emul); uint offset = 0; int ret; diff --git a/drivers/rtc/mvrtc.c b/drivers/rtc/mvrtc.c index ed057f7bc4e..731ce8d0592 100644 --- a/drivers/rtc/mvrtc.c +++ b/drivers/rtc/mvrtc.c @@ -133,7 +133,7 @@ void rtc_reset(void) #ifdef CONFIG_DM_RTC static int mv_rtc_get(struct udevice *dev, struct rtc_time *tm) { - struct mvrtc_pdata *pdata = dev_get_platdata(dev); + struct mvrtc_pdata *pdata = dev_get_plat(dev); struct mvrtc_registers *regs = (struct mvrtc_registers *)pdata->iobase; return __mv_rtc_get(regs, tm); @@ -141,7 +141,7 @@ static int mv_rtc_get(struct udevice *dev, struct rtc_time *tm) static int mv_rtc_set(struct udevice *dev, const struct rtc_time *tm) { - struct mvrtc_pdata *pdata = dev_get_platdata(dev); + struct mvrtc_pdata *pdata = dev_get_plat(dev); struct mvrtc_registers *regs = (struct mvrtc_registers *)pdata->iobase; return __mv_rtc_set(regs, tm); @@ -149,7 +149,7 @@ static int mv_rtc_set(struct udevice *dev, const struct rtc_time *tm) static int mv_rtc_reset(struct udevice *dev) { - struct mvrtc_pdata *pdata = dev_get_platdata(dev); + struct mvrtc_pdata *pdata = dev_get_plat(dev); struct mvrtc_registers *regs = (struct mvrtc_registers *)pdata->iobase; __mv_rtc_reset(regs); @@ -170,7 +170,7 @@ static const struct udevice_id mv_rtc_ids[] = { static int mv_rtc_ofdata_to_platdata(struct udevice *dev) { - struct mvrtc_pdata *pdata = dev_get_platdata(dev); + struct mvrtc_pdata *pdata = dev_get_plat(dev); pdata->iobase = dev_read_addr(dev); return 0; diff --git a/drivers/rtc/pl031.c b/drivers/rtc/pl031.c index 93d5a6a3857..df79c1fb88f 100644 --- a/drivers/rtc/pl031.c +++ b/drivers/rtc/pl031.c @@ -35,14 +35,14 @@ struct pl031_platdata { static inline u32 pl031_read_reg(struct udevice *dev, int reg) { - struct pl031_platdata *pdata = dev_get_platdata(dev); + struct pl031_platdata *pdata = dev_get_plat(dev); return readl(pdata->base + reg); } static inline u32 pl031_write_reg(struct udevice *dev, int reg, u32 value) { - struct pl031_platdata *pdata = dev_get_platdata(dev); + struct pl031_platdata *pdata = dev_get_plat(dev); return writel(value, pdata->base + reg); } @@ -124,7 +124,7 @@ static const struct udevice_id pl031_ids[] = { static int pl031_ofdata_to_platdata(struct udevice *dev) { - struct pl031_platdata *pdata = dev_get_platdata(dev); + struct pl031_platdata *pdata = dev_get_plat(dev); pdata->base = dev_read_addr(dev); |