]> Git Repo - J-u-boot.git/blobdiff - drivers/spi/renesas_rpc_spi.c
soc: xilinx: zynqmp: Add soc_xilinx_zynqmp driver
[J-u-boot.git] / drivers / spi / renesas_rpc_spi.c
index d0ff918af88ca3a34c73f37e05410b3105cbb84f..26b6aa85c92bb711f1e25d3bf6ac0449505678d2 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <clk.h>
 #include <dm.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
-struct rpc_spi_platdata {
+struct rpc_spi_plat {
        fdt_addr_t      regs;
        fdt_addr_t      extr;
        s32             freq;   /* Default clock freq, -1 for none */
@@ -406,7 +407,7 @@ static int rpc_spi_bind(struct udevice *parent)
 
 static int rpc_spi_probe(struct udevice *dev)
 {
-       struct rpc_spi_platdata *plat = dev_get_platdata(dev);
+       struct rpc_spi_plat *plat = dev_get_plat(dev);
        struct rpc_spi_priv *priv = dev_get_priv(dev);
 
        priv->regs = plat->regs;
@@ -417,9 +418,9 @@ static int rpc_spi_probe(struct udevice *dev)
        return 0;
 }
 
-static int rpc_spi_ofdata_to_platdata(struct udevice *bus)
+static int rpc_spi_of_to_plat(struct udevice *bus)
 {
-       struct rpc_spi_platdata *plat = dev_get_platdata(bus);
+       struct rpc_spi_plat *plat = dev_get_plat(bus);
 
        plat->regs = dev_read_addr_index(bus, 0);
        plat->extr = dev_read_addr_index(bus, 1);
@@ -463,9 +464,9 @@ U_BOOT_DRIVER(rpc_spi) = {
        .id             = UCLASS_SPI,
        .of_match       = rpc_spi_ids,
        .ops            = &rpc_spi_ops,
-       .ofdata_to_platdata = rpc_spi_ofdata_to_platdata,
-       .platdata_auto_alloc_size = sizeof(struct rpc_spi_platdata),
-       .priv_auto_alloc_size = sizeof(struct rpc_spi_priv),
+       .of_to_plat = rpc_spi_of_to_plat,
+       .plat_auto      = sizeof(struct rpc_spi_plat),
+       .priv_auto      = sizeof(struct rpc_spi_priv),
        .bind           = rpc_spi_bind,
        .probe          = rpc_spi_probe,
 };
This page took 0.028965 seconds and 4 git commands to generate.