diff mbox

[U-Boot,4/5] sun6i: Drop some "unknown magic" from dram init

Message ID 1416154613-8506-4-git-send-email-hdegoede@redhat.com
State Superseded
Delegated to: Ian Campbell
Headers show

Commit Message

Hans de Goede Nov. 16, 2014, 4:16 p.m. UTC
This bit of code is the rtc ram being used to detect coming out of
"super-standby" mode, and if that is the case, going out of self-refresh mode.

Since we do not support "super-standby" mode, this can be dropped.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/cpu/armv7/sunxi/dram_sun6i.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Ian Campbell Nov. 17, 2014, 7:01 p.m. UTC | #1
On Sun, 2014-11-16 at 17:16 +0100, Hans de Goede wrote:
> This bit of code is the rtc ram being used to detect coming out of
> "super-standby" mode, and if that is the case, going out of self-refresh mode.
> 
> Since we do not support "super-standby" mode, this can be dropped.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Acked-by: Ian Campbell <ijc@hellion.org.uk>

(perhaps start the commit log with "Allwinner tells us that..."? Ack
either way)

> ---
>  arch/arm/cpu/armv7/sunxi/dram_sun6i.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/sunxi/dram_sun6i.c b/arch/arm/cpu/armv7/sunxi/dram_sun6i.c
> index 2ac0b58..5e163cb 100644
> --- a/arch/arm/cpu/armv7/sunxi/dram_sun6i.c
> +++ b/arch/arm/cpu/armv7/sunxi/dram_sun6i.c
> @@ -140,9 +140,6 @@ static void mctl_channel_init(int ch_index, struct dram_sun6i_para *para)
>  
>  	writel((MCTL_TITMSRST << 18) | (MCTL_TDLLLOCK << 6) | MCTL_TDLLSRST,
>  	       &mctl_phy->ptr0);
> -	/* Unknown magic performed by boot0 */
> -	if ((readl(SUNXI_RTC_BASE + 0x20c) & 3) == 2)
> -		setbits_le32(&mctl_phy->ptr0, 1 << 18);
>  
>  	writel((MCTL_TDINIT1 << 19) | MCTL_TDINIT0, &mctl_phy->ptr1);
>  	writel((MCTL_TDINIT3 << 17) | MCTL_TDINIT2, &mctl_phy->ptr2);
Hans de Goede Nov. 18, 2014, 12:47 p.m. UTC | #2
Hi,

On 11/17/2014 08:01 PM, Ian Campbell wrote:
> On Sun, 2014-11-16 at 17:16 +0100, Hans de Goede wrote:
>> This bit of code is the rtc ram being used to detect coming out of
>> "super-standby" mode, and if that is the case, going out of self-refresh mode.
>>
>> Since we do not support "super-standby" mode, this can be dropped.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> 
> Acked-by: Ian Campbell <ijc@hellion.org.uk>
> 
> (perhaps start the commit log with "Allwinner tells us that..."? Ack
> either way)

Fixed in my local tree.

Regards,

Hans

> 
>> ---
>>  arch/arm/cpu/armv7/sunxi/dram_sun6i.c | 3 ---
>>  1 file changed, 3 deletions(-)
>>
>> diff --git a/arch/arm/cpu/armv7/sunxi/dram_sun6i.c b/arch/arm/cpu/armv7/sunxi/dram_sun6i.c
>> index 2ac0b58..5e163cb 100644
>> --- a/arch/arm/cpu/armv7/sunxi/dram_sun6i.c
>> +++ b/arch/arm/cpu/armv7/sunxi/dram_sun6i.c
>> @@ -140,9 +140,6 @@ static void mctl_channel_init(int ch_index, struct dram_sun6i_para *para)
>>  
>>  	writel((MCTL_TITMSRST << 18) | (MCTL_TDLLLOCK << 6) | MCTL_TDLLSRST,
>>  	       &mctl_phy->ptr0);
>> -	/* Unknown magic performed by boot0 */
>> -	if ((readl(SUNXI_RTC_BASE + 0x20c) & 3) == 2)
>> -		setbits_le32(&mctl_phy->ptr0, 1 << 18);
>>  
>>  	writel((MCTL_TDINIT1 << 19) | MCTL_TDINIT0, &mctl_phy->ptr1);
>>  	writel((MCTL_TDINIT3 << 17) | MCTL_TDINIT2, &mctl_phy->ptr2);
> 
>
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/sunxi/dram_sun6i.c b/arch/arm/cpu/armv7/sunxi/dram_sun6i.c
index 2ac0b58..5e163cb 100644
--- a/arch/arm/cpu/armv7/sunxi/dram_sun6i.c
+++ b/arch/arm/cpu/armv7/sunxi/dram_sun6i.c
@@ -140,9 +140,6 @@  static void mctl_channel_init(int ch_index, struct dram_sun6i_para *para)
 
 	writel((MCTL_TITMSRST << 18) | (MCTL_TDLLLOCK << 6) | MCTL_TDLLSRST,
 	       &mctl_phy->ptr0);
-	/* Unknown magic performed by boot0 */
-	if ((readl(SUNXI_RTC_BASE + 0x20c) & 3) == 2)
-		setbits_le32(&mctl_phy->ptr0, 1 << 18);
 
 	writel((MCTL_TDINIT1 << 19) | MCTL_TDINIT0, &mctl_phy->ptr1);
 	writel((MCTL_TDINIT3 << 17) | MCTL_TDINIT2, &mctl_phy->ptr2);