mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
66 lines
2.2 KiB
Diff
66 lines
2.2 KiB
Diff
diff --git a/drivers/clk/rockchip/clk_rk3328.c b/drivers/clk/rockchip/clk_rk3328.c
|
|
index a89e2ecc4a..e86c17e6d6 100644
|
|
--- a/drivers/clk/rockchip/clk_rk3328.c
|
|
+++ b/drivers/clk/rockchip/clk_rk3328.c
|
|
@@ -672,6 +672,10 @@ static int rk3328_gmac2io_set_parent(struct clk *clk, struct clk *parent)
|
|
return 0;
|
|
}
|
|
|
|
+ /* FIXME: Device tree should be read in ofdata_to_platdata() */
|
|
+ if (CONFIG_IS_ENABLED(OF_PLATDATA))
|
|
+ return -EDEADLK;
|
|
+
|
|
/*
|
|
* Otherwise, we need to check the clock-output-names of the
|
|
* requested parent to see if the requested id is "gmac_clkin".
|
|
@@ -709,6 +713,10 @@ static int rk3328_gmac2io_ext_set_parent(struct clk *clk, struct clk *parent)
|
|
return 0;
|
|
}
|
|
|
|
+ /* FIXME: Device tree should be read in ofdata_to_platdata() */
|
|
+ if (CONFIG_IS_ENABLED(OF_PLATDATA))
|
|
+ return -EDEADLK;
|
|
+
|
|
/*
|
|
* Otherwise, we need to check the clock-output-names of the
|
|
* requested parent to see if the requested id is "gmac_clkin".
|
|
@@ -765,9 +773,11 @@ static int rk3328_clk_probe(struct udevice *dev)
|
|
|
|
static int rk3328_clk_ofdata_to_platdata(struct udevice *dev)
|
|
{
|
|
- struct rk3328_clk_priv *priv = dev_get_priv(dev);
|
|
+ if (!CONFIG_IS_ENABLED(OF_PLATDATA)) {
|
|
+ struct rk3328_clk_priv *priv = dev_get_priv(dev);
|
|
|
|
- priv->cru = dev_read_addr_ptr(dev);
|
|
+ priv->cru = dev_read_addr_ptr(dev);
|
|
+ }
|
|
|
|
return 0;
|
|
}
|
|
diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
|
|
index 80dc431d20..dccc54e95f 100644
|
|
--- a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
|
|
+++ b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
|
|
@@ -383,8 +383,8 @@ static int rockchip_pinconf_prop_name_to_param(const char *property,
|
|
return -EPERM;
|
|
}
|
|
|
|
-static int rockchip_pinctrl_set_state(struct udevice *dev,
|
|
- struct udevice *config)
|
|
+static int __maybe_unused rockchip_pinctrl_set_state(struct udevice *dev,
|
|
+ struct udevice *config)
|
|
{
|
|
struct rockchip_pinctrl_priv *priv = dev_get_priv(dev);
|
|
struct rockchip_pin_ctrl *ctrl = priv->ctrl;
|
|
@@ -474,7 +474,9 @@ static int rockchip_pinctrl_set_state(struct udevice *dev,
|
|
}
|
|
|
|
const struct pinctrl_ops rockchip_pinctrl_ops = {
|
|
+#if !CONFIG_IS_ENABLED(PLATDATA)
|
|
.set_state = rockchip_pinctrl_set_state,
|
|
+#endif
|
|
.get_gpio_mux = rockchip_pinctrl_get_gpio_mux,
|
|
};
|
|
|