summaryrefslogtreecommitdiff
path: root/drivers/spi/zynq_qspi.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-12-14 18:57:57 -0500
committerTom Rini <trini@konsulko.com>2020-12-14 18:57:57 -0500
commit8351a29d2df18c92d8e365cfa848218c3859f3d2 (patch)
tree5d29001be9accfb8029df9d9ed78fba196ee07b9 /drivers/spi/zynq_qspi.c
parentddaa94978583d07ec515e7226e397221d8cc44c8 (diff)
parentb7bbd553de0d9752f919dfc616f560f6f2504c14 (diff)
Merge tag 'dm-pull-14dec20' of git://git.denx.de/u-boot-dm into next
Driver model tidy-up for livetree Driver model big rename for consistency Python 3 clean-ups for patman Update sandbox serial driver to use membuff
Diffstat (limited to 'drivers/spi/zynq_qspi.c')
-rw-r--r--drivers/spi/zynq_qspi.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c
index f2eddec950a..c2ae4e935e8 100644
--- a/drivers/spi/zynq_qspi.c
+++ b/drivers/spi/zynq_qspi.c
@@ -76,7 +76,7 @@ struct zynq_qspi_regs {
};
/* zynq qspi platform data */
-struct zynq_qspi_platdata {
+struct zynq_qspi_plat {
struct zynq_qspi_regs *regs;
u32 frequency; /* input frequency */
u32 speed_hz;
@@ -98,9 +98,9 @@ struct zynq_qspi_priv {
unsigned cs_change:1;
};
-static int zynq_qspi_ofdata_to_platdata(struct udevice *bus)
+static int zynq_qspi_of_to_plat(struct udevice *bus)
{
- struct zynq_qspi_platdata *plat = bus->platdata;
+ struct zynq_qspi_plat *plat = bus->plat;
const void *blob = gd->fdt_blob;
int node = dev_of_offset(bus);
@@ -171,7 +171,7 @@ static void zynq_qspi_init_hw(struct zynq_qspi_priv *priv)
static int zynq_qspi_probe(struct udevice *bus)
{
- struct zynq_qspi_platdata *plat = dev_get_platdata(bus);
+ struct zynq_qspi_plat *plat = dev_get_plat(bus);
struct zynq_qspi_priv *priv = dev_get_priv(bus);
struct clk clk;
unsigned long clock;
@@ -560,7 +560,7 @@ static int zynq_qspi_xfer(struct udevice *dev, unsigned int bitlen,
{
struct udevice *bus = dev->parent;
struct zynq_qspi_priv *priv = dev_get_priv(bus);
- struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
+ struct dm_spi_slave_plat *slave_plat = dev_get_parent_plat(dev);
priv->cs = slave_plat->cs;
priv->tx_buf = dout;
@@ -592,7 +592,7 @@ static int zynq_qspi_xfer(struct udevice *dev, unsigned int bitlen,
static int zynq_qspi_set_speed(struct udevice *bus, uint speed)
{
- struct zynq_qspi_platdata *plat = bus->platdata;
+ struct zynq_qspi_plat *plat = bus->plat;
struct zynq_qspi_priv *priv = dev_get_priv(bus);
struct zynq_qspi_regs *regs = priv->regs;
uint32_t confr;
@@ -666,8 +666,8 @@ U_BOOT_DRIVER(zynq_qspi) = {
.id = UCLASS_SPI,
.of_match = zynq_qspi_ids,
.ops = &zynq_qspi_ops,
- .ofdata_to_platdata = zynq_qspi_ofdata_to_platdata,
- .platdata_auto_alloc_size = sizeof(struct zynq_qspi_platdata),
- .priv_auto_alloc_size = sizeof(struct zynq_qspi_priv),
+ .of_to_plat = zynq_qspi_of_to_plat,
+ .plat_auto = sizeof(struct zynq_qspi_plat),
+ .priv_auto = sizeof(struct zynq_qspi_priv),
.probe = zynq_qspi_probe,
};