Skip to contentSkip to conversation

clk:aspeed: Fix reset assert logic

PATCH Applied Jae Hyun Yoo 2 participants 3 messages Apr 25, 2018 – Apr 26, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk:aspeed: Fix reset assert logic

This commit fixes a bug in aspeed_reset_assert() which determines the second reset register using condition.

---
 drivers/clk/clk-aspeed.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-aspeed.c +1 -1
index de8e1dba6eec..c5d2af2ace2e 100644
@@ -349,7 +349,7 @@ static int aspeed_reset_assert(struct reset_controller_dev *rcdev,
 	u32 reg = ASPEED_RESET_CTRL;
 	u32 bit = aspeed_resets[id];
 
-	if (bit >= ASPEED_RESET_CTRL2) {
+	if (bit >= ASPEED_RESET2_OFFSET) {
 		bit -= ASPEED_RESET2_OFFSET;
 		reg = ASPEED_RESET_CTRL2;
 	}
Signature · 1 line
2.17.0
maintainer Applied
#1 lore raw
Quoted 4 lines · Jae Hyun Yoo

This commit fixes a bug in aspeed_reset_assert() which determines the second reset register using condition.

Thanks. This patch has not been applied upstream, so I will send a V2 that incorporates your fix.

I've applied this patch to dev-4.13.

Cheers,

Joel

Quoted 20 lines
---
 drivers/clk/clk-aspeed.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-aspeed.c +1 -2
index de8e1dba6eec..c5d2af2ace2e 100644
@@ -349,7 +349,7 @@ static int aspeed_reset_assert(struct reset_controller_dev *rcdev,
        u32 reg = ASPEED_RESET_CTRL;
        u32 bit = aspeed_resets[id];
 
-       if (bit >= ASPEED_RESET_CTRL2) {
+       if (bit >= ASPEED_RESET2_OFFSET) {
                bit -= ASPEED_RESET2_OFFSET;
                reg = ASPEED_RESET_CTRL2;
        }
--

2.17.0

#2 lore raw
Quoted 6 lines · Joel Stanley
Quoted 4 lines · Jae Hyun Yoo

This commit fixes a bug in aspeed_reset_assert() which determines the second reset register using condition.

Quoted 9 lines

Thanks. This patch has not been applied upstream, so I will send a V2 that incorporates your fix.

I've applied this patch to dev-4.13.

Cheers,

Joel

Thanks a lot for your review.

Jae

Quoted 20 lines
Quoted 20 lines
---
  drivers/clk/clk-aspeed.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-aspeed.c +1 -2
index de8e1dba6eec..c5d2af2ace2e 100644
@@ -349,7 +349,7 @@ static int aspeed_reset_assert(struct reset_controller_dev *rcdev,
         u32 reg = ASPEED_RESET_CTRL;
         u32 bit = aspeed_resets[id];
 
-       if (bit >= ASPEED_RESET_CTRL2) {
+       if (bit >= ASPEED_RESET2_OFFSET) {
                 bit -= ASPEED_RESET2_OFFSET;
                 reg = ASPEED_RESET_CTRL2;
         }
--

2.17.0