Skip to contentSkip to conversation

gpio: aspeed: fix ast2600 bank properties

PATCH Applied [email protected] 3 participants 4 messages Sep 16, 2020 – Sep 24, 2020

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

PATCH 1/1 gpio: aspeed: fix ast2600 bank properties

From: Tao Ren <[email protected]>

GPIO_U is mapped to the least significant byte of input/output mask, and the byte in "output" mask should be 0 because GPIO_U is input only. All the other bits need to be 1 because GPIO_V/W/X support both input and output modes.

Similarly, GPIO_Y/Z are mapped to the 2 least significant bytes, and the according bits need to be 1 because GPIO_Y/Z support both input and output modes.

Fixes ab4a85534c3e ("gpio: aspeed: Add in ast2600 details to Aspeed driver")
---
 drivers/gpio/gpio-aspeed.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpio/gpio-aspeed.c +2 -2
index 879db23d8454..d07bf2c3f136 100644
@@ -1114,8 +1114,8 @@ static const struct aspeed_gpio_config ast2500_config =
 
 static const struct aspeed_bank_props ast2600_bank_props[] = {
 	/*     input	  output   */
-	{5, 0xffffffff,  0x0000ffff}, /* U/V/W/X */
-	{6, 0xffff0000,  0x0fff0000}, /* Y/Z */
+	{5, 0xffffffff,  0xffffff00}, /* U/V/W/X */
+	{6, 0x0000ffff,  0x0000ffff}, /* Y/Z */
 	{ },
 };
 
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · rentao.bupt at gmail.com

From: Tao Ren <[email protected]>

GPIO_U is mapped to the least significant byte of input/output mask, and the byte in "output" mask should be 0 because GPIO_U is input only. All the other bits need to be 1 because GPIO_V/W/X support both input and output modes.

Quoted 6 lines

Similarly, GPIO_Y/Z are mapped to the 2 least significant bytes, and the according bits need to be 1 because GPIO_Y/Z support both input and output modes.

Fixes ab4a85534c3e ("gpio: aspeed: Add in ast2600 details to Aspeed driver")

Thanks Tao,

author
#2 lore raw
Quoted 14 lines · Andrew Jeffery
Quoted 11 lines · rentao.bupt at gmail.com

From: Tao Ren <[email protected]>

GPIO_U is mapped to the least significant byte of input/output mask, and the byte in "output" mask should be 0 because GPIO_U is input only. All the other bits need to be 1 because GPIO_V/W/X support both input and output modes.

Similarly, GPIO_Y/Z are mapped to the 2 least significant bytes, and the according bits need to be 1 because GPIO_Y/Z support both input and output modes.

Quoted 6 lines
Quoted 2 lines
Fixes ab4a85534c3e ("gpio: aspeed: Add in ast2600 details to Aspeed driver")

Thanks Tao,

Thanks Andrew for the quick review.

Cheers,

Tao

#3 lore raw
In reply to [email protected]
Quoted 34 lines · On Wed, Sep 16, 2020 at 10:42 PM <[email protected]> wrote:

From: Tao Ren <[email protected]>

GPIO_U is mapped to the least significant byte of input/output mask, and the byte in "output" mask should be 0 because GPIO_U is input only. All the other bits need to be 1 because GPIO_V/W/X support both input and output modes.

Similarly, GPIO_Y/Z are mapped to the 2 least significant bytes, and the according bits need to be 1 because GPIO_Y/Z support both input and output modes.

Fixes ab4a85534c3e ("gpio: aspeed: Add in ast2600 details to Aspeed driver")
---
 drivers/gpio/gpio-aspeed.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpio/gpio-aspeed.c +2 -3
index 879db23d8454..d07bf2c3f136 100644
@@ -1114,8 +1114,8 @@ static const struct aspeed_gpio_config ast2500_config =
 
 static const struct aspeed_bank_props ast2600_bank_props[] = {
        /*     input      output   */
-       {5, 0xffffffff,  0x0000ffff}, /* U/V/W/X */
-       {6, 0xffff0000,  0x0fff0000}, /* Y/Z */
+       {5, 0xffffffff,  0xffffff00}, /* U/V/W/X */
+       {6, 0x0000ffff,  0x0000ffff}, /* Y/Z */
        { },
 };
 
--
Quoted 2 lines

2.17.1

Queued for fixes, thanks!

Bartosz