aboutsummaryrefslogtreecommitdiff
path: root/drivers/spi/atmel_spi.c
diff options
context:
space:
mode:
authorSimon Glass2020-12-03 16:55:23 -0700
committerSimon Glass2020-12-13 16:51:09 -0700
commit8a8d24bdf174851ebb8607f359d54b72e3283b97 (patch)
tree89fe2b9fd0c33209ce154170f9bda61f624dd9cd /drivers/spi/atmel_spi.c
parentb012ff1f1b0d662587dcf8707fe7cbf1c1f35d2f (diff)
dm: treewide: Rename ..._platdata variables to just ..._plat
Try to maintain some consistency between these variables by using _plat as a suffix for them. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/spi/atmel_spi.c')
-rw-r--r--drivers/spi/atmel_spi.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index 9795972993a..702e2253581 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -105,7 +105,7 @@
#define spi_writel(as, reg, value) \
writel(value, as->regs + ATMEL_SPI_##reg)
-struct atmel_spi_platdata {
+struct atmel_spi_plat {
struct at91_spi *regs;
};
@@ -121,9 +121,9 @@ struct atmel_spi_priv {
static int atmel_spi_claim_bus(struct udevice *dev)
{
struct udevice *bus = dev_get_parent(dev);
- struct atmel_spi_platdata *bus_plat = dev_get_plat(bus);
+ struct atmel_spi_plat *bus_plat = dev_get_plat(bus);
struct atmel_spi_priv *priv = dev_get_priv(bus);
- struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev);
+ struct dm_spi_slave_plat *slave_plat = dev_get_parent_plat(dev);
struct at91_spi *reg_base = bus_plat->regs;
u32 cs = slave_plat->cs;
u32 freq = priv->freq;
@@ -161,7 +161,7 @@ static int atmel_spi_claim_bus(struct udevice *dev)
static int atmel_spi_release_bus(struct udevice *dev)
{
struct udevice *bus = dev_get_parent(dev);
- struct atmel_spi_platdata *bus_plat = dev_get_plat(bus);
+ struct atmel_spi_plat *bus_plat = dev_get_plat(bus);
writel(ATMEL_SPI_CR_SPIDIS, &bus_plat->regs->cr);
@@ -173,7 +173,7 @@ static void atmel_spi_cs_activate(struct udevice *dev)
#if CONFIG_IS_ENABLED(DM_GPIO)
struct udevice *bus = dev_get_parent(dev);
struct atmel_spi_priv *priv = dev_get_priv(bus);
- struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev);
+ struct dm_spi_slave_plat *slave_plat = dev_get_parent_plat(dev);
u32 cs = slave_plat->cs;
if (!dm_gpio_is_valid(&priv->cs_gpios[cs]))
@@ -188,7 +188,7 @@ static void atmel_spi_cs_deactivate(struct udevice *dev)
#if CONFIG_IS_ENABLED(DM_GPIO)
struct udevice *bus = dev_get_parent(dev);
struct atmel_spi_priv *priv = dev_get_priv(bus);
- struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev);
+ struct dm_spi_slave_plat *slave_plat = dev_get_parent_plat(dev);
u32 cs = slave_plat->cs;
if (!dm_gpio_is_valid(&priv->cs_gpios[cs]))
@@ -202,7 +202,7 @@ static int atmel_spi_xfer(struct udevice *dev, unsigned int bitlen,
const void *dout, void *din, unsigned long flags)
{
struct udevice *bus = dev_get_parent(dev);
- struct atmel_spi_platdata *bus_plat = dev_get_plat(bus);
+ struct atmel_spi_plat *bus_plat = dev_get_plat(bus);
struct at91_spi *reg_base = bus_plat->regs;
u32 len_tx, len_rx, len;
@@ -344,7 +344,7 @@ static int atmel_spi_enable_clk(struct udevice *bus)
static int atmel_spi_probe(struct udevice *bus)
{
- struct atmel_spi_platdata *bus_plat = dev_get_plat(bus);
+ struct atmel_spi_plat *bus_plat = dev_get_plat(bus);
int ret;
ret = atmel_spi_enable_clk(bus);
@@ -388,7 +388,7 @@ U_BOOT_DRIVER(atmel_spi) = {
.id = UCLASS_SPI,
.of_match = atmel_spi_ids,
.ops = &atmel_spi_ops,
- .plat_auto = sizeof(struct atmel_spi_platdata),
+ .plat_auto = sizeof(struct atmel_spi_plat),
.priv_auto = sizeof(struct atmel_spi_priv),
.probe = atmel_spi_probe,
};