diff options
author | Tom Rini <trini@konsulko.com> | 2019-01-10 09:28:16 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-01-10 09:28:16 -0500 |
commit | e5aa3f4d97b11271c3a2407e272a131b7e975c61 (patch) | |
tree | 55d66c2e34af73a4721df02368e6348e89708499 /drivers | |
parent | 43a6a1ec9055a53a11d6d735f11cceea13912bbe (diff) | |
parent | d4a0c098925d4594355506a12ae0dbbe6eed00f2 (diff) | |
download | u-boot-e5aa3f4d97b11271c3a2407e272a131b7e975c61.tar.gz |
Merge tag 'u-boot-imx-20190110' of git://git.denx.de/u-boot-imx
Fixes for 2019.01
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/clk/imx/clk-imx8.c | 2 | ||||
-rw-r--r-- | drivers/misc/imx8/scu.c | 26 | ||||
-rw-r--r-- | drivers/misc/imx8/scu_api.c | 4 |
3 files changed, 17 insertions, 15 deletions
diff --git a/drivers/clk/imx/clk-imx8.c b/drivers/clk/imx/clk-imx8.c index fcb8090d35..d03fcc2fdd 100644 --- a/drivers/clk/imx/clk-imx8.c +++ b/drivers/clk/imx/clk-imx8.c @@ -18,6 +18,7 @@ struct imx8_clks { const char *name; }; +#if CONFIG_IS_ENABLED(CMD_CLK) static struct imx8_clks imx8_clk_names[] = { { IMX8QXP_A35_DIV, "A35_DIV" }, { IMX8QXP_I2C0_CLK, "I2C0" }, @@ -39,6 +40,7 @@ static struct imx8_clks imx8_clk_names[] = { { IMX8QXP_ENET1_REF_DIV, "ENET1_REF" }, { IMX8QXP_ENET1_PTP_CLK, "ENET1_PTP" }, }; +#endif static ulong imx8_clk_get_rate(struct clk *clk) { diff --git a/drivers/misc/imx8/scu.c b/drivers/misc/imx8/scu.c index b824ac79e6..15101b3e5f 100644 --- a/drivers/misc/imx8/scu.c +++ b/drivers/misc/imx8/scu.c @@ -158,7 +158,7 @@ static int sc_ipc_write(struct mu_type *base, void *data) static int imx8_scu_call(struct udevice *dev, int no_resp, void *tx_msg, int tx_size, void *rx_msg, int rx_size) { - struct imx8_scu *priv = dev_get_priv(dev); + struct imx8_scu *plat = dev_get_platdata(dev); sc_err_t result; int ret; @@ -166,11 +166,11 @@ static int imx8_scu_call(struct udevice *dev, int no_resp, void *tx_msg, if (rx_msg && tx_msg != rx_msg) printf("tx_msg %p, rx_msg %p\n", tx_msg, rx_msg); - ret = sc_ipc_write(priv->base, tx_msg); + ret = sc_ipc_write(plat->base, tx_msg); if (ret) return ret; if (!no_resp) { - ret = sc_ipc_read(priv->base, rx_msg); + ret = sc_ipc_read(plat->base, rx_msg); if (ret) return ret; } @@ -182,24 +182,24 @@ static int imx8_scu_call(struct udevice *dev, int no_resp, void *tx_msg, static int imx8_scu_probe(struct udevice *dev) { - struct imx8_scu *priv = dev_get_priv(dev); + struct imx8_scu *plat = dev_get_platdata(dev); fdt_addr_t addr; - debug("%s(dev=%p) (priv=%p)\n", __func__, dev, priv); + debug("%s(dev=%p) (plat=%p)\n", __func__, dev, plat); addr = devfdt_get_addr(dev); if (addr == FDT_ADDR_T_NONE) return -EINVAL; - priv->base = (struct mu_type *)addr; + plat->base = (struct mu_type *)addr; /* U-Boot not enable interrupts, so need to enable RX interrupts */ - mu_hal_init(priv->base); + mu_hal_init(plat->base); gd->arch.scu_dev = dev; - device_probe(priv->clk); - device_probe(priv->pinclk); + device_probe(plat->clk); + device_probe(plat->pinclk); return 0; } @@ -211,7 +211,7 @@ static int imx8_scu_remove(struct udevice *dev) static int imx8_scu_bind(struct udevice *dev) { - struct imx8_scu *priv = dev_get_priv(dev); + struct imx8_scu *plat = dev_get_platdata(dev); int ret; struct udevice *child; int node; @@ -227,7 +227,7 @@ static int imx8_scu_bind(struct udevice *dev) if (ret) return ret; - priv->clk = child; + plat->clk = child; node = fdt_node_offset_by_compatible(gd->fdt_blob, -1, "fsl,imx8qxp-iomuxc"); @@ -238,7 +238,7 @@ static int imx8_scu_bind(struct udevice *dev) if (ret) return ret; - priv->pinclk = child; + plat->pinclk = child; return 0; } @@ -261,6 +261,6 @@ U_BOOT_DRIVER(imx8_scu) = { .bind = imx8_scu_bind, .remove = imx8_scu_remove, .ops = &imx8_scu_ops, - .priv_auto_alloc_size = sizeof(struct imx8_scu), + .platdata_auto_alloc_size = sizeof(struct imx8_scu), .flags = DM_FLAG_PRE_RELOC, }; diff --git a/drivers/misc/imx8/scu_api.c b/drivers/misc/imx8/scu_api.c index 65080d7544..d9c4d5d784 100644 --- a/drivers/misc/imx8/scu_api.c +++ b/drivers/misc/imx8/scu_api.c @@ -169,7 +169,7 @@ int sc_misc_get_control(sc_ipc_t ipc, sc_rsrc_t resource, sc_ctrl_t ctrl, printf("%s: ctrl:%d resource:%d: res:%d\n", __func__, ctrl, resource, RPC_R8(&msg)); - if (!val) + if (val) *val = RPC_U32(&msg, 0U); return ret; @@ -194,7 +194,7 @@ void sc_misc_get_boot_dev(sc_ipc_t ipc, sc_rsrc_t *boot_dev) if (ret) printf("%s: res:%d\n", __func__, RPC_R8(&msg)); - if (!boot_dev) + if (boot_dev) *boot_dev = RPC_U16(&msg, 0U); } |