diff options
author | Kever Yang <kever.yang@rock-chips.com> | 2016-08-12 12:58:02 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-09-22 16:32:22 +0300 |
commit | e2e4e1453680a0a5e87f3976bf48ebfe02c9e192 (patch) | |
tree | 9c0a55bc955bd3c0e5cdf219b2bb88d6750e8fec /drivers/pwm | |
parent | 12406ae247736bb6dfd4a92431caec33ab2a54d7 (diff) | |
download | u-boot-e2e4e1453680a0a5e87f3976bf48ebfe02c9e192.tar.xz |
rk_pwm: remove grf setting code from driver
We consider the grf setting for pwm controller select as the system
operation instead of driver operation, move it to soc init, let's
remove it from pwm driver first.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/pwm')
-rw-r--r-- | drivers/pwm/rk_pwm.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/pwm/rk_pwm.c b/drivers/pwm/rk_pwm.c index d60d55d71f..9254f5bc39 100644 --- a/drivers/pwm/rk_pwm.c +++ b/drivers/pwm/rk_pwm.c @@ -13,17 +13,13 @@ #include <regmap.h> #include <syscon.h> #include <asm/io.h> -#include <asm/arch/clock.h> -#include <asm/arch/grf_rk3288.h> #include <asm/arch/pwm.h> -#include <asm/arch/hardware.h> #include <power/regulator.h> DECLARE_GLOBAL_DATA_PTR; struct rk_pwm_priv { struct rk3288_pwm *regs; - struct rk3288_grf *grf; ulong freq; }; @@ -64,13 +60,8 @@ static int rk_pwm_set_enable(struct udevice *dev, uint channel, bool enable) static int rk_pwm_ofdata_to_platdata(struct udevice *dev) { struct rk_pwm_priv *priv = dev_get_priv(dev); - struct regmap *map; priv->regs = (struct rk3288_pwm *)dev_get_addr(dev); - map = syscon_get_regmap_by_driver_data(ROCKCHIP_SYSCON_GRF); - if (IS_ERR(map)) - return PTR_ERR(map); - priv->grf = regmap_get_range(map, 0); return 0; } @@ -81,8 +72,6 @@ static int rk_pwm_probe(struct udevice *dev) struct clk clk; int ret = 0; - rk_setreg(&priv->grf->soc_con2, 1 << 0); - ret = clk_get_by_index(dev, 0, &clk); if (ret < 0) { debug("%s get clock fail!\n", __func__); |