[PATCH v2 1/2] ram: stm32mp1: Unconditionally enable ASR
Marek Vasut
marex at denx.de
Fri Feb 25 00:14:53 CET 2022
On 2/23/22 09:35, Patrice CHOTARD wrote:
Hi,
> On 2/21/22 21:55, Marek Vasut wrote:
>> Enable DRAM ASR, auto self-refresh, unconditionally. This saves non-trivial
>> amount of power both at runtime and in suspend (on 2x W632GU6NB-15 ~150mW).
>>
>> Signed-off-by: Marek Vasut <marex at denx.de>
>> Cc: Patrick Delaunay <patrick.delaunay at foss.st.com>
>> Cc: Patrice Chotard <patrice.chotard at foss.st.com>
>> ---
>> V2: Rebase on latest changes in this driver past v2022.01
>> ---
>> drivers/ram/stm32mp1/stm32mp1_ddr.c | 25 ++++++++++++++++++++++++
>> drivers/ram/stm32mp1/stm32mp1_ddr_regs.h | 6 ++++++
>> 2 files changed, 31 insertions(+)
>>
>> diff --git a/drivers/ram/stm32mp1/stm32mp1_ddr.c b/drivers/ram/stm32mp1/stm32mp1_ddr.c
>> index 4d78aa5cb13..04fc8eab909 100644
>> --- a/drivers/ram/stm32mp1/stm32mp1_ddr.c
>> +++ b/drivers/ram/stm32mp1/stm32mp1_ddr.c
>> @@ -27,6 +27,8 @@
>> #define RCC_DDRITFCR_DPHYAPBRST (BIT(17))
>> #define RCC_DDRITFCR_DPHYRST (BIT(18))
>> #define RCC_DDRITFCR_DPHYCTLRST (BIT(19))
>> +#define RCC_DDRITFCR_DDRCKMOD_MASK (0x7 << 20)
>> +#define RCC_DDRITFCR_DDRCKMOD_ASR (0x1 << 20)
>
> #define RCC_DDRITFCR_DDRCKMOD_MASK GENMASK(22, 20)
> #define RCC_DDRITFCR_DDRCKMOD_ASR BIT(20)
btw. I dislike that GENMASK macro, I think it obfuscates the readability
and makes it harder to figure out the bitmask at first glance, but that
might just be me.
[...]
More information about the U-Boot
mailing list