diff options
Diffstat (limited to 'drivers/mtd/spi')
-rw-r--r-- | drivers/mtd/spi/Kconfig | 4 | ||||
-rw-r--r-- | drivers/mtd/spi/sandbox.c | 22 | ||||
-rw-r--r-- | drivers/mtd/spi/sf-uclass.c | 2 | ||||
-rw-r--r-- | drivers/mtd/spi/sf_dataflash.c | 2 | ||||
-rw-r--r-- | drivers/mtd/spi/sf_probe.c | 4 |
5 files changed, 17 insertions, 17 deletions
diff --git a/drivers/mtd/spi/Kconfig b/drivers/mtd/spi/Kconfig index 018e8c597e..ea444436ad 100644 --- a/drivers/mtd/spi/Kconfig +++ b/drivers/mtd/spi/Kconfig @@ -63,7 +63,7 @@ config SF_DEFAULT_MODE to handle the common case when only a single serial flash is present on the system. Not used for boot with device tree; the SPI driver reads - speed and mode from platdata values computed from + speed and mode from plat values computed from available node. config SF_DEFAULT_SPEED @@ -75,7 +75,7 @@ config SF_DEFAULT_SPEED to handle the common case when only a single serial flash is present on the system. Not used for boot with device tree; the SPI driver reads - speed and mode from platdata values computed from + speed and mode from plat values computed from available node. if SPI_FLASH diff --git a/drivers/mtd/spi/sandbox.c b/drivers/mtd/spi/sandbox.c index 0b602dc914..3c01e3b41c 100644 --- a/drivers/mtd/spi/sandbox.c +++ b/drivers/mtd/spi/sandbox.c @@ -122,23 +122,23 @@ 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 dm_spi_slave_plat *slave_plat; struct udevice *bus = dev->parent; const char *spec = NULL; struct udevice *emul; int ret = 0; int cs = -1; - debug("%s: bus %d, looking for emul=%p: ", __func__, bus->seq, dev); + debug("%s: bus %d, looking for emul=%p: ", __func__, dev_seq(bus), dev); ret = sandbox_spi_get_emul(state, bus, dev, &emul); if (ret) { printf("Error: Unknown chip select for device '%s'\n", dev->name); return ret; } - slave_plat = dev_get_parent_platdata(dev); + slave_plat = dev_get_parent_plat(dev); cs = slave_plat->cs; debug("found at cs %d\n", cs); @@ -498,9 +498,9 @@ static int sandbox_sf_xfer(struct udevice *dev, unsigned int bitlen, return pos == bytes ? 0 : -EIO; } -int sandbox_sf_ofdata_to_platdata(struct udevice *dev) +int sandbox_sf_of_to_plat(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"); @@ -538,7 +538,7 @@ int sandbox_sf_bind_emul(struct sandbox_state *state, int busnum, int cs, str = strdup(name); if (!str) return -ENOMEM; - ret = device_bind_ofnode(bus, drv, str, NULL, node, &emul); + ret = device_bind(bus, drv, str, NULL, node, &emul); if (ret) { free(str); printf("Cannot create emul device for spec '%s' (err=%d)\n", @@ -565,7 +565,7 @@ int sandbox_spi_get_emul(struct sandbox_state *state, struct udevice **emulp) { struct sandbox_spi_info *info; - int busnum = bus->seq; + int busnum = dev_seq(bus); int cs = spi_chip_select(slave); int ret; @@ -597,10 +597,10 @@ U_BOOT_DRIVER(sandbox_sf_emul) = { .name = "sandbox_sf_emul", .id = UCLASS_SPI_EMUL, .of_match = sandbox_sf_ids, - .ofdata_to_platdata = sandbox_sf_ofdata_to_platdata, + .of_to_plat = sandbox_sf_of_to_plat, .probe = sandbox_sf_probe, .remove = sandbox_sf_remove, - .priv_auto_alloc_size = sizeof(struct sandbox_spi_flash), - .platdata_auto_alloc_size = sizeof(struct sandbox_spi_flash_plat_data), + .priv_auto = sizeof(struct sandbox_spi_flash), + .plat_auto = sizeof(struct sandbox_spi_flash_plat_data), .ops = &sandbox_sf_emul_ops, }; diff --git a/drivers/mtd/spi/sf-uclass.c b/drivers/mtd/spi/sf-uclass.c index 09c11439b0..3017022abb 100644 --- a/drivers/mtd/spi/sf-uclass.c +++ b/drivers/mtd/spi/sf-uclass.c @@ -100,5 +100,5 @@ UCLASS_DRIVER(spi_flash) = { .id = UCLASS_SPI_FLASH, .name = "spi_flash", .post_bind = spi_flash_post_bind, - .per_device_auto_alloc_size = sizeof(struct spi_flash), + .per_device_auto = sizeof(struct spi_nor), }; diff --git a/drivers/mtd/spi/sf_dataflash.c b/drivers/mtd/spi/sf_dataflash.c index 27d847d421..b59edd152c 100644 --- a/drivers/mtd/spi/sf_dataflash.c +++ b/drivers/mtd/spi/sf_dataflash.c @@ -693,6 +693,6 @@ U_BOOT_DRIVER(spi_dataflash) = { .id = UCLASS_SPI_FLASH, .of_match = spi_dataflash_ids, .probe = spi_dataflash_probe, - .priv_auto_alloc_size = sizeof(struct dataflash), + .priv_auto = sizeof(struct dataflash), .ops = &spi_dataflash_ops, }; diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c index b959e3453a..6c87434867 100644 --- a/drivers/mtd/spi/sf_probe.c +++ b/drivers/mtd/spi/sf_probe.c @@ -166,10 +166,10 @@ U_BOOT_DRIVER(jedec_spi_nor) = { .of_match = spi_flash_std_ids, .probe = spi_flash_std_probe, .remove = spi_flash_std_remove, - .priv_auto_alloc_size = sizeof(struct spi_flash), + .priv_auto = sizeof(struct spi_nor), .ops = &spi_flash_std_ops, }; -U_BOOT_DRIVER_ALIAS(jedec_spi_nor, spansion_m25p16) +DM_DRIVER_ALIAS(jedec_spi_nor, spansion_m25p16) #endif /* CONFIG_DM_SPI_FLASH */ |