diff options
author | Anurag Dutta <a-dutta@ti.com> | 2024-11-29 17:01:30 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-12-14 09:34:16 -0600 |
commit | a42b8b0b3fe0ffe69ffb932bf3e709a62ff34a23 (patch) | |
tree | 1d5dc2942c32ecce47259f8213ede02e63b26de3 /drivers | |
parent | f0558f3a89fe0fa900b162ae2758772e37f72739 (diff) |
mtd: HBMC-AM654: Changed syscon API to mux APIs
The syscon APIs were used for selecting the state of the mux
device because the mmio-mux driver in u-boot did not support
the mux functionality when the parent device is not a syscon.
Change to mux APIs which utilizes the reg-mux driver to select the
state of the multiplexer.
Signed-off-by: Anurag Dutta <a-dutta@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/hbmc-am654.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/mtd/hbmc-am654.c b/drivers/mtd/hbmc-am654.c index 599beda30d5..98988a8e24d 100644 --- a/drivers/mtd/hbmc-am654.c +++ b/drivers/mtd/hbmc-am654.c @@ -5,8 +5,8 @@ #include <asm/io.h> #include <dm.h> +#include <mux.h> #include <regmap.h> -#include <syscon.h> #include <dm/device_compat.h> #define FSS_SYSC_REG 0x4 @@ -52,9 +52,13 @@ static int am654_hyperbus_calibrate(struct udevice *dev) static int am654_select_hbmc(struct udevice *dev) { - struct regmap *regmap = syscon_get_regmap(dev_get_parent(dev)); + struct mux_control *mux_ctl; + int ret; - return regmap_update_bits(regmap, FSS_SYSC_REG, 0x2, 0x2); + ret = mux_get_by_index(dev, 0, &mux_ctl); + if (!ret) + ret = mux_control_select(mux_ctl, 1); + return ret; } static int am654_hbmc_bind(struct udevice *dev) |