]> 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 3ea59b8fb82a4d961032dec9cb4d928d1a9fa7bf..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);
@@ -448,12 +449,13 @@ static const struct dm_spi_ops rpc_spi_ops = {
 };
 
 static const struct udevice_id rpc_spi_ids[] = {
+       { .compatible = "renesas,rpc-r7s72100" },
        { .compatible = "renesas,rpc-r8a7795" },
        { .compatible = "renesas,rpc-r8a7796" },
        { .compatible = "renesas,rpc-r8a77965" },
        { .compatible = "renesas,rpc-r8a77970" },
        { .compatible = "renesas,rpc-r8a77995" },
-       { .compatible = "renesas,rpc-r7s72100" },
+       { .compatible = "renesas,rcar-gen3-rpc" },
        { }
 };
 
@@ -462,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.027886 seconds and 4 git commands to generate.