hw/ssi/aspeed_smc: Fix incorrect FMC_WDT2 register read on AST1030
PATCH 1/1 hw/ssi/aspeed_smc: Fix incorrect FMC_WDT2 register read on AST1030
On AST1030, reading the FMC_WDT2 register always returns 0xFFFFFFFF. This issue is due to the aspeed_smc_read function, which checks for the ASPEED_SMC_FEATURE_WDT_CONTROL feature. Since AST1030 was missing this feature flag, the read operation fails and returns -1.
To resolve this, add the WDT_CONTROL feature to AST1030's feature set so that FMC_WDT2 can be correctly accessed by firmware.
--- hw/ssi/aspeed_smc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
hw/ssi/aspeed_smc.c +2 -1
@@ -1857,7 +1857,8 @@ static void aspeed_1030_fmc_class_init(ObjectClass *klass, const void *data) asc->resets = aspeed_1030_fmc_resets; asc->flash_window_base =0x80000000 ; asc->flash_window_size =0x10000000 ; - asc->features =ASPEED_SMC_FEATURE_DMA ; + asc->features =ASPEED_SMC_FEATURE_DMA | +ASPEED_SMC_FEATURE_WDT_CONTROL ; asc->dma_flash_mask =0x0FFFFFFC ; asc->dma_dram_mask =0x000BFFFC ; asc->dma_start_length =1 ;
Signature · 1 line
2.43.0
Hello Jamin,
Quoted 18 lines · Jamin Lin
On AST1030, reading the
FMC_WDT2register always returns0xFFFFFFFF. This issue is due to theaspeed_smc_readfunction, which checks for theASPEED_SMC_FEATURE_WDT_CONTROLfeature. Since AST1030 was missing this feature flag, the read operation fails and returns -1.To resolve this, add the
WDT_CONTROLfeature to AST1030's feature set so thatFMC_WDT2can be correctly accessed by firmware.Signed-off-by Jamin Lin <[email protected]>--- hw/ssi/aspeed_smc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)hw/ssi/aspeed_smc.c +0
-0
hw/ssi/aspeed_smc.c static void aspeed_1030_fmc_class_init(ObjectClass *klass, const void *data) · line 1864
Quoted 9 lines
hw/ssi/aspeed_smc.c +2
-1@@ -1857,7 +1857,8 @@ static void aspeed_1030_fmc_class_init(ObjectClass *klass, const void *data) asc->resets = aspeed_1030_fmc_resets; asc->flash_window_base =0x80000000 ; asc->flash_window_size =0x10000000 ; - asc->features =ASPEED_SMC_FEATURE_DMA ; + asc->features =ASPEED_SMC_FEATURE_DMA | +ASPEED_SMC_FEATURE_WDT_CONTROL ; asc->dma_flash_mask =0x0FFFFFFC ; asc->dma_dram_mask =0x000BFFFC ; asc->dma_start_length =1 ;
Could you add a Fixes tag please ?
I plan to send a PR before -rc2 (Tuesday) with the vbootrom update.
Thanks,
C.
Hi Cédric,
Quoted 41 lines
From: Cédric Le Goater <[email protected]>
Sent: Monday, August 4, 2025 2:33 PM
To: Jamin Lin <[email protected]>; Alistair Francis <[email protected]>; Peter Maydell <[email protected]>; Steven Lee <[email protected]>; Troy Lee <[email protected]>; Andrew Jeffery <[email protected]>; Joel Stanley <[email protected]>; open list:ASPEED BMCs <[email protected]>; open list:All patches CC here <[email protected]>
Cc: Troy Lee <[email protected]>
Subject: Re: [PATCH v1] hw/ssi/aspeed_smc: Fix incorrectFMC_WDT2register read on AST1030Hello Jamin,
Quoted 3 lines · Jamin Lin
On AST1030, reading the
FMC_WDT2register always returns0xFFFFFFFF. This issue is due to theaspeed_smc_readfunction, which checks for theASPEED_SMC_FEATURE_WDT_CONTROLfeature. Since AST1030 wasmissing
hw/ssi/aspeed_smc.c static void
Quoted 15 lines
this feature flag, the read operation fails and returns -1.
To resolve this, add the
WDT_CONTROLfeature to AST1030's feature set so thatFMC_WDT2can be correctly accessed by firmware.Signed-off-by Jamin Lin <[email protected]>--- hw/ssi/aspeed_smc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)hw/ssi/aspeed_smc.c index renamed from hw/ssi/aspeed_smc.c +0
-0
614528b8ef..e33496f502100644hw/ssi/aspeed_smc.c +0
-0@@ -1857,7 +1857,8 @@ static void
aspeed_1030_fmc_class_init(ObjectClass *klass, const void *data)hw/ssi/aspeed_smc.c static void aspeed_1030_fmc_class_init(ObjectClass *klass, const void *data)
Quoted 6 lines
hw/ssi/aspeed_smc.c +2
-1asc->resets = aspeed_1030_fmc_resets; asc->flash_window_base =0x80000000 ; asc->flash_window_size =0x10000000 ; - asc->features =ASPEED_SMC_FEATURE_DMA ; + asc->features = ASPEED_SMC_FEATURE_DMA | +
Quoted 7 lines
ASPEED_SMC_FEATURE_WDT_CONTROL;hw/ssi/aspeed_smc.c static void aspeed_1030_fmc_class_init(ObjectClass *klass, const void *data) · line 1864
Quoted 3 lines
hw/ssi/aspeed_smc.c +0
-0asc->dma_flash_mask =0x0FFFFFFC ; asc->dma_dram_mask =0x000BFFFC ; asc->dma_start_length =1 ;Could you add a Fixes tag please ?
Quoted 2 lines
I plan to send a PR before -rc2 (Tuesday) with the vbootrom update.
Okay. Thanks for review and help.
Jamin
Quoted 6 lines
Reviewed-by Cédric Le Goater <[email protected]>Thanks,
C.
Quoted 43 lines · Jamin Lin
Hi Cédric,
Quoted 41 lines
From: Cédric Le Goater <[email protected]>
Sent: Monday, August 4, 2025 2:33 PM
To: Jamin Lin <[email protected]>; Alistair Francis <[email protected]>; Peter Maydell <[email protected]>; Steven Lee <[email protected]>; Troy Lee <[email protected]>; Andrew Jeffery <[email protected]>; Joel Stanley <[email protected]>; open list:ASPEED BMCs <[email protected]>; open list:All patches CC here <[email protected]>
Cc: Troy Lee <[email protected]>
Subject: Re: [PATCH v1] hw/ssi/aspeed_smc: Fix incorrectFMC_WDT2register read on AST1030Hello Jamin,
Quoted 3 lines · Jamin Lin
On AST1030, reading the
FMC_WDT2register always returns0xFFFFFFFF. This issue is due to theaspeed_smc_readfunction, which checks for theASPEED_SMC_FEATURE_WDT_CONTROLfeature. Since AST1030 wasmissing
hw/ssi/aspeed_smc.c static void
Quoted 15 lines
this feature flag, the read operation fails and returns -1.
To resolve this, add the
WDT_CONTROLfeature to AST1030's feature set so thatFMC_WDT2can be correctly accessed by firmware.Signed-off-by Jamin Lin <[email protected]>--- hw/ssi/aspeed_smc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)hw/ssi/aspeed_smc.c index renamed from hw/ssi/aspeed_smc.c +0
-0
614528b8ef..e33496f502100644hw/ssi/aspeed_smc.c +0
-0@@ -1857,7 +1857,8 @@ static void
aspeed_1030_fmc_class_init(ObjectClass *klass, const void *data)Quoted 6 lines
hw/ssi/aspeed_smc.c +2
-1asc->resets = aspeed_1030_fmc_resets; asc->flash_window_base =0x80000000 ; asc->flash_window_size =0x10000000 ; - asc->features =ASPEED_SMC_FEATURE_DMA ; + asc->features = ASPEED_SMC_FEATURE_DMA | +
Quoted 8 lines
Quoted 7 lines
ASPEED_SMC_FEATURE_WDT_CONTROL;hw/ssi/aspeed_smc.c static void aspeed_1030_fmc_class_init(ObjectClass *klass, const void *data) · line 1864
Quoted 3 lines
hw/ssi/aspeed_smc.c +0
-0asc->dma_flash_mask =0x0FFFFFFC ; asc->dma_dram_mask =0x000BFFFC ; asc->dma_start_length =1 ;Could you add a Fixes tag please ?
Fixes 2850df6 ("aspeed/smc: Add AST1030 support ")
The commit SHA id is a bit short. 12 is a minimum now.
Thanks,
C.
Hi Cédric,
Quoted 62 lines
From: Cédric Le Goater <[email protected]>
Sent: Monday, August 4, 2025 2:52 PM
To: Jamin Lin <[email protected]>; Alistair Francis <[email protected]>; Peter Maydell <[email protected]>; Steven Lee <[email protected]>; Troy Lee <[email protected]>; Andrew Jeffery <[email protected]>; Joel Stanley <[email protected]>; open list:ASPEED BMCs <[email protected]>; open list:All patches CC here <[email protected]>
Cc: Troy Lee <[email protected]>
Subject: Re: [PATCH v1] hw/ssi/aspeed_smc: Fix incorrectFMC_WDT2register read on AST1030Quoted 7 lines · Jamin Lin
Hi Cédric,
Quoted 5 lines
From: Cédric Le Goater <[email protected]>
Sent: Monday, August 4, 2025 2:33 PM
To: Jamin Lin <[email protected]>; Alistair Francis <[email protected]>; Peter Maydell <[email protected]>; Steven Lee <[email protected]>; Troy LeeQuoted 41 lines
Quoted 41 lines
Andrew Jeffery <[email protected]>; Joel Stanley <[email protected]>; open list:ASPEED BMCs <[email protected]>; open list:All patches CC here <[email protected]>
Cc: Troy Lee <[email protected]>
Subject: Re: [PATCH v1] hw/ssi/aspeed_smc: Fix incorrectFMC_WDT2register read on AST1030Hello Jamin,
Quoted 3 lines · Jamin Lin
On AST1030, reading the
FMC_WDT2register always returns0xFFFFFFFF. This issue is due to theaspeed_smc_readfunction, which checks for theASPEED_SMC_FEATURE_WDT_CONTROLfeature. Since AST1030 wasmissing
hw/ssi/aspeed_smc.c static void
Quoted 15 lines
this feature flag, the read operation fails and returns -1.
To resolve this, add the
WDT_CONTROLfeature to AST1030's feature set so thatFMC_WDT2can be correctly accessed by firmware.Signed-off-by Jamin Lin <[email protected]>--- hw/ssi/aspeed_smc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)hw/ssi/aspeed_smc.c index renamed from hw/ssi/aspeed_smc.c +0
-0
614528b8ef..e33496f502100644hw/ssi/aspeed_smc.c +0
-0@@ -1857,7 +1857,8 @@ static void
aspeed_1030_fmc_class_init(ObjectClass *klass, const void *data)hw/ssi/aspeed_smc.c static void aspeed_1030_fmc_class_init(ObjectClass *klass, const void *data)
Quoted 6 lines
hw/ssi/aspeed_smc.c +2
-1asc->resets = aspeed_1030_fmc_resets; asc->flash_window_base =0x80000000 ; asc->flash_window_size =0x10000000 ; - asc->features =ASPEED_SMC_FEATURE_DMA ; + asc->features = ASPEED_SMC_FEATURE_DMA | +
ASPEED_SMC_FEATURE_WDT_CONTROL;Quoted 3 lines
hw/ssi/aspeed_smc.c +0
-0asc->dma_flash_mask =0x0FFFFFFC ; asc->dma_dram_mask =0x000BFFFC ; asc->dma_start_length =1 ;
Quoted 6 lines
Quoted 3 lines
Quoted 2 lines
Could you add a Fixes tag please ?
Fixes 2850df6 ("aspeed/smc: Add AST1030 support ")The commit SHA id is a bit short. 12 is a minimum now.
Update SHA id
Thanks-Jamin
Quoted 4 lines
Thanks,
C.