aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-03 16:55:20 -0700
committerSimon Glass <sjg@chromium.org>2020-12-13 16:51:09 -0700
commitc69cda25c9b59e53a6bc8969ada58942549f5b5d (patch)
tree8c84d1773465eb8e06cbbaeb710daa6217f5618d /drivers/mtd
parent4f50086ad6d69c355a07389fb436c64c92ec614a (diff)
downloadu-boot-c69cda25c9b59e53a6bc8969ada58942549f5b5d.zip
u-boot-c69cda25c9b59e53a6bc8969ada58942549f5b5d.tar.gz
u-boot-c69cda25c9b59e53a6bc8969ada58942549f5b5d.tar.bz2
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/mtd')
-rw-r--r--drivers/mtd/altera_qspi.c18
-rw-r--r--drivers/mtd/spi/sandbox.c4
2 files changed, 11 insertions, 11 deletions
diff --git a/drivers/mtd/altera_qspi.c b/drivers/mtd/altera_qspi.c
index 82d4117..9a3a21f 100644
--- a/drivers/mtd/altera_qspi.c
+++ b/drivers/mtd/altera_qspi.c
@@ -106,7 +106,7 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
{
struct mtd_info *mtd = info->mtd;
struct udevice *dev = mtd->dev;
- struct altera_qspi_platdata *pdata = dev_get_platdata(dev);
+ struct altera_qspi_platdata *pdata = dev_get_plat(dev);
ulong base = (ulong)pdata->base;
loff_t to = addr - base;
size_t retlen;
@@ -135,7 +135,7 @@ unsigned long flash_init(void)
static int altera_qspi_erase(struct mtd_info *mtd, struct erase_info *instr)
{
struct udevice *dev = mtd->dev;
- struct altera_qspi_platdata *pdata = dev_get_platdata(dev);
+ struct altera_qspi_platdata *pdata = dev_get_plat(dev);
struct altera_qspi_regs *regs = pdata->regs;
size_t addr = instr->addr;
size_t len = instr->len;
@@ -197,7 +197,7 @@ static int altera_qspi_read(struct mtd_info *mtd, loff_t from, size_t len,
size_t *retlen, u_char *buf)
{
struct udevice *dev = mtd->dev;
- struct altera_qspi_platdata *pdata = dev_get_platdata(dev);
+ struct altera_qspi_platdata *pdata = dev_get_plat(dev);
memcpy_fromio(buf, pdata->base + from, len);
*retlen = len;
@@ -209,7 +209,7 @@ static int altera_qspi_write(struct mtd_info *mtd, loff_t to, size_t len,
size_t *retlen, const u_char *buf)
{
struct udevice *dev = mtd->dev;
- struct altera_qspi_platdata *pdata = dev_get_platdata(dev);
+ struct altera_qspi_platdata *pdata = dev_get_plat(dev);
struct altera_qspi_regs *regs = pdata->regs;
u32 stat;
@@ -235,7 +235,7 @@ static void altera_qspi_get_locked_range(struct mtd_info *mtd, loff_t *ofs,
uint64_t *len)
{
struct udevice *dev = mtd->dev;
- struct altera_qspi_platdata *pdata = dev_get_platdata(dev);
+ struct altera_qspi_platdata *pdata = dev_get_plat(dev);
struct altera_qspi_regs *regs = pdata->regs;
int shift0 = ffs(QUADSPI_SR_BP2_0) - 1;
int shift3 = ffs(QUADSPI_SR_BP3) - 1 - 3;
@@ -257,7 +257,7 @@ static void altera_qspi_get_locked_range(struct mtd_info *mtd, loff_t *ofs,
static int altera_qspi_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
{
struct udevice *dev = mtd->dev;
- struct altera_qspi_platdata *pdata = dev_get_platdata(dev);
+ struct altera_qspi_platdata *pdata = dev_get_plat(dev);
struct altera_qspi_regs *regs = pdata->regs;
u32 sector_start, sector_end;
u32 num_sectors;
@@ -291,7 +291,7 @@ static int altera_qspi_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
static int altera_qspi_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
{
struct udevice *dev = mtd->dev;
- struct altera_qspi_platdata *pdata = dev_get_platdata(dev);
+ struct altera_qspi_platdata *pdata = dev_get_plat(dev);
struct altera_qspi_regs *regs = pdata->regs;
u32 mem_op;
@@ -304,7 +304,7 @@ static int altera_qspi_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
static int altera_qspi_probe(struct udevice *dev)
{
- struct altera_qspi_platdata *pdata = dev_get_platdata(dev);
+ struct altera_qspi_platdata *pdata = dev_get_plat(dev);
struct altera_qspi_regs *regs = pdata->regs;
unsigned long base = (unsigned long)pdata->base;
struct mtd_info *mtd;
@@ -348,7 +348,7 @@ static int altera_qspi_probe(struct udevice *dev)
static int altera_qspi_ofdata_to_platdata(struct udevice *dev)
{
- struct altera_qspi_platdata *pdata = dev_get_platdata(dev);
+ struct altera_qspi_platdata *pdata = dev_get_plat(dev);
void *blob = (void *)gd->fdt_blob;
int node = dev_of_offset(dev);
const char *list, *end;
diff --git a/drivers/mtd/spi/sandbox.c b/drivers/mtd/spi/sandbox.c
index 26d0dbc..b3a0de6 100644
--- a/drivers/mtd/spi/sandbox.c
+++ b/drivers/mtd/spi/sandbox.c
@@ -122,7 +122,7 @@ static int sandbox_sf_probe(struct udevice *dev)
struct sandbox_spi_flash *sbsf = dev_get_priv(dev);
size_t len, idname_len;
const struct flash_info *data;
- struct sandbox_spi_flash_plat_data *pdata = dev_get_platdata(dev);
+ struct sandbox_spi_flash_plat_data *pdata = dev_get_plat(dev);
struct sandbox_state *state = state_get_current();
struct dm_spi_slave_platdata *slave_plat;
struct udevice *bus = dev->parent;
@@ -500,7 +500,7 @@ static int sandbox_sf_xfer(struct udevice *dev, unsigned int bitlen,
int sandbox_sf_ofdata_to_platdata(struct udevice *dev)
{
- struct sandbox_spi_flash_plat_data *pdata = dev_get_platdata(dev);
+ struct sandbox_spi_flash_plat_data *pdata = dev_get_plat(dev);
pdata->filename = dev_read_string(dev, "sandbox,filename");
pdata->device_name = dev_read_string(dev, "compatible");