diff options
author | Simon Glass | 2020-12-22 19:30:28 -0700 |
---|---|---|
committer | Simon Glass | 2021-01-05 12:24:40 -0700 |
commit | 0fd3d91152df5bb6c5f7b9ee68f01a9a1c9a875d (patch) | |
tree | 1dbc5b936b98393e343cc99a40382b2734ac778e /drivers/ddr | |
parent | 12559f5bab3e43b603dccfa6c354ffd7da03249c (diff) |
dm: Use access methods for dev/uclass private data
Most drivers use these access methods but a few do not. Update them.
In some cases the access is not permitted, so mark those with a FIXME tag
for the maintainer to check.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Pratyush Yadav <p.yadav@ti.com>
Diffstat (limited to 'drivers/ddr')
-rw-r--r-- | drivers/ddr/altera/sdram_agilex.c | 2 | ||||
-rw-r--r-- | drivers/ddr/altera/sdram_gen5.c | 4 | ||||
-rw-r--r-- | drivers/ddr/altera/sdram_s10.c | 2 | ||||
-rw-r--r-- | drivers/ddr/altera/sdram_soc64.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/drivers/ddr/altera/sdram_agilex.c b/drivers/ddr/altera/sdram_agilex.c index 868bf142b4d..a4ceb36461d 100644 --- a/drivers/ddr/altera/sdram_agilex.c +++ b/drivers/ddr/altera/sdram_agilex.c @@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR; int sdram_mmr_init_full(struct udevice *dev) { - struct altera_sdram_plat *plat = dev->plat; + struct altera_sdram_plat *plat = dev_get_plat(dev); struct altera_sdram_priv *priv = dev_get_priv(dev); u32 i; int ret; diff --git a/drivers/ddr/altera/sdram_gen5.c b/drivers/ddr/altera/sdram_gen5.c index 3ffe057543f..8d3ce495dea 100644 --- a/drivers/ddr/altera/sdram_gen5.c +++ b/drivers/ddr/altera/sdram_gen5.c @@ -565,7 +565,7 @@ static unsigned long sdram_calculate_size(struct socfpga_sdr_ctrl *sdr_ctrl) static int altera_gen5_sdram_of_to_plat(struct udevice *dev) { - struct altera_gen5_sdram_plat *plat = dev->plat; + struct altera_gen5_sdram_plat *plat = dev_get_plat(dev); plat->sdr = (struct socfpga_sdr *)devfdt_get_addr_index(dev, 0); if (!plat->sdr) @@ -578,7 +578,7 @@ static int altera_gen5_sdram_probe(struct udevice *dev) { int ret; unsigned long sdram_size; - struct altera_gen5_sdram_plat *plat = dev->plat; + struct altera_gen5_sdram_plat *plat = dev_get_plat(dev); struct altera_gen5_sdram_priv *priv = dev_get_priv(dev); struct socfpga_sdr_ctrl *sdr_ctrl = &plat->sdr->sdr_ctrl; struct reset_ctl_bulk resets; diff --git a/drivers/ddr/altera/sdram_s10.c b/drivers/ddr/altera/sdram_s10.c index 984dc32442d..03a270f2639 100644 --- a/drivers/ddr/altera/sdram_s10.c +++ b/drivers/ddr/altera/sdram_s10.c @@ -70,7 +70,7 @@ int match_ddr_conf(u32 ddr_conf) */ int sdram_mmr_init_full(struct udevice *dev) { - struct altera_sdram_plat *plat = dev->plat; + struct altera_sdram_plat *plat = dev_get_plat(dev); struct altera_sdram_priv *priv = dev_get_priv(dev); u32 update_value, io48_value, ddrioctl; u32 i; diff --git a/drivers/ddr/altera/sdram_soc64.c b/drivers/ddr/altera/sdram_soc64.c index 7e77c7b0733..5aba655e5f1 100644 --- a/drivers/ddr/altera/sdram_soc64.c +++ b/drivers/ddr/altera/sdram_soc64.c @@ -232,7 +232,7 @@ phys_size_t sdram_calculate_size(struct altera_sdram_plat *plat) static int altera_sdram_of_to_plat(struct udevice *dev) { - struct altera_sdram_plat *plat = dev->plat; + struct altera_sdram_plat *plat = dev_get_plat(dev); fdt_addr_t addr; addr = dev_read_addr_index(dev, 0); |