diff options
author | Ahmad Fatoum <ahmad@a3f.at> | 2021-06-22 20:23:32 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-06-24 10:53:27 +0200 |
commit | cac4e5d7f1c18999794e2a3971dd5301f93466a3 (patch) | |
tree | c4b40594b363b0efc117558b32f74ca5d5cf8a9f /drivers/reset | |
parent | ed7e05a06b95212f39bfb2742e11dd9e9caac23d (diff) | |
download | barebox-cac4e5d7f1c18999794e2a3971dd5301f93466a3.tar.gz barebox-cac4e5d7f1c18999794e2a3971dd5301f93466a3.tar.xz |
reset: stm32: remove implicit sizeof(long) == 4 expectation
There is no relation between sizeof(long) and the size of the register
of the reset controller on STM32 CPUs. They just happen to be both 32-bit
in the current configuration. U-Boot already removed the BITS_PER_LONG,
so do likewise.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Link: https://lore.barebox.org/20210622182332.1089832-1-ahmad@a3f.at
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/reset')
-rw-r--r-- | drivers/reset/reset-stm32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/reset/reset-stm32.c b/drivers/reset/reset-stm32.c index a4498f573b..2ef00859c4 100644 --- a/drivers/reset/reset-stm32.c +++ b/drivers/reset/reset-stm32.c @@ -81,8 +81,8 @@ static u32 stm32_reset_status(struct stm32_reset *priv, unsigned long bank) static void stm32_reset(struct stm32_reset *priv, unsigned long id, bool assert) { - int bank = (id / BITS_PER_LONG) * 4; - int offset = id % BITS_PER_LONG; + int bank = (id / 32) * 4; + int offset = id % 32; priv->ops->reset(priv->base + bank, offset, assert); } |