driver: net: ti: cpsw-mdio: use phys_addr_t for mdio_base addr
authorKeerthy <j-keerthy@ti.com>
Tue, 9 Jul 2019 05:00:33 +0000 (10:30 +0530)
committerJoe Hershberger <joe.hershberger@ni.com>
Mon, 15 Jul 2019 18:32:25 +0000 (13:32 -0500)
Use phys_addr_t for mdio_base address to avoid build
warnings on arm64 and dra7. Cast it to uintprt_t before
assigning to regs.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/ti/cpsw_mdio.c
drivers/net/ti/cpsw_mdio.h

index 70f547e6d72e1c8e43e78da5e9d970de9e503446..6e8f6520118f65c3c7d0e7d42fb5183ce8ae18da 100644 (file)
@@ -125,7 +125,7 @@ u32 cpsw_mdio_get_alive(struct mii_dev *bus)
        return val & GENMASK(15, 0);
 }
 
-struct mii_dev *cpsw_mdio_init(const char *name, u32 mdio_base,
+struct mii_dev *cpsw_mdio_init(const char *name, phys_addr_t mdio_base,
                               u32 bus_freq, int fck_freq)
 {
        struct cpsw_mdio *cpsw_mdio;
@@ -144,7 +144,7 @@ struct mii_dev *cpsw_mdio_init(const char *name, u32 mdio_base,
                return NULL;
        }
 
-       cpsw_mdio->regs = (struct cpsw_mdio_regs *)mdio_base;
+       cpsw_mdio->regs = (struct cpsw_mdio_regs *)(uintptr_t)mdio_base;
 
        if (!bus_freq || !fck_freq)
                cpsw_mdio->div = CPSW_MDIO_DIV_DEF;
index 4a76d4e5c5155308ea1040512066840ea8a6c0c9..dbf4a2dcacb0aa7cec167f1982d70805f20e4dba 100644 (file)
@@ -10,7 +10,7 @@
 
 struct cpsw_mdio;
 
-struct mii_dev *cpsw_mdio_init(const char *name, u32 mdio_base,
+struct mii_dev *cpsw_mdio_init(const char *name, phys_addr_t mdio_base,
                               u32 bus_freq, int fck_freq);
 void cpsw_mdio_free(struct mii_dev *bus);
 u32 cpsw_mdio_get_alive(struct mii_dev *bus);