rockchip: dwmmc: add rk2928-dw-mshc compatible
[oweals/u-boot.git] / drivers / mmc / rockchip_dw_mmc.c
index e7fcf89f7342e649fe2996860e3c5112edc9f89b..bf2d83a52c5c69428b86f8388dc9228f868525d5 100644 (file)
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (c) 2013 Google, Inc
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -18,8 +17,6 @@
 #include <asm/arch/periph.h>
 #include <linux/err.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct rockchip_mmc_plat {
 #if CONFIG_IS_ENABLED(OF_PLATDATA)
        struct dtd_rockchip_rk3288_dw_mshc dtplat;
@@ -58,7 +55,7 @@ static int rockchip_dwmmc_ofdata_to_platdata(struct udevice *dev)
        struct dwmci_host *host = &priv->host;
 
        host->name = dev->name;
-       host->ioaddr = (void *)devfdt_get_addr(dev);
+       host->ioaddr = dev_read_addr_ptr(dev);
        host->buswidth = dev_read_u32_default(dev, "bus-width", 4);
        host->get_mmc_clk = rockchip_dwmmc_get_mmc_clk;
        host->priv = dev;
@@ -159,6 +156,7 @@ static int rockchip_dwmmc_bind(struct udevice *dev)
 }
 
 static const struct udevice_id rockchip_dwmmc_ids[] = {
+       { .compatible = "rockchip,rk2928-dw-mshc" },
        { .compatible = "rockchip,rk3288-dw-mshc" },
        { }
 };