Skip to content

Commit 9fffe14

Browse files
peterdelevoryaslegoater
authored andcommitted
hw: aspeed_gpio: Fix pin I/O type declarations
Some of the pin declarations in the Aspeed GPIO module were incorrect, probably because of confusion over which bits in the input and output uint32_t's correspond to which groups in the label array. Since the uint32_t literals are in big endian, it's sort of the opposite of what would be intuitive. The least significant bit in ast2500_set_props[6] corresponds to GPIOY0, not GPIOAB7. GPIOxx indicates input and output capabilities, GPIxx indicates only input, GPOxx indicates only output. AST2500: - Previously had GPIW0..GPIW7 and GPIX0..GPIX7, that's correct. - Previously had GPIOY0..GPIOY3, should have been GPIOY0..GPIOY7. - Previously had GPIOAB0..GPIOAB3 and GPIAB4..GPIAB7, should only have been GPIOAB0..GPIOAB3. AST2600: - GPIOT0..GPIOT7 should have been GPIT0..GPIT7. - GPIOU0..GPIOU7 should have been GPIU0..GPIU7. - GPIW0..GPIW7 should have been GPIOW0..GPIOW7. - GPIOY0..GPIOY7 and GPIOZ0...GPIOZ7 were disabled. Fixes: 4b7f956 ("hw/gpio: Add basic Aspeed GPIO model for AST2400 and AST2500") Fixes: 36d737e ("hw/gpio: Add in AST2600 specific implementation") Signed-off-by: Peter Delevoryas <[email protected]> Reviewed-by: Damien Hedde <[email protected]> Reviewed-by: Rashmica Gupta <[email protected]> Message-Id: <[email protected]> Signed-off-by: Cédric Le Goater <[email protected]>
1 parent 6026103 commit 9fffe14

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

hw/gpio/aspeed_gpio.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ static const GPIOSetProperties ast2500_set_props[] = {
796796
[3] = {0xffffffff, 0xffffffff, {"M", "N", "O", "P"} },
797797
[4] = {0xffffffff, 0xffffffff, {"Q", "R", "S", "T"} },
798798
[5] = {0xffffffff, 0x0000ffff, {"U", "V", "W", "X"} },
799-
[6] = {0xffffff0f, 0x0fffff0f, {"Y", "Z", "AA", "AB"} },
799+
[6] = {0x0fffffff, 0x0fffffff, {"Y", "Z", "AA", "AB"} },
800800
[7] = {0x000000ff, 0x000000ff, {"AC"} },
801801
};
802802

@@ -805,9 +805,9 @@ static GPIOSetProperties ast2600_3_3v_set_props[] = {
805805
[1] = {0xffffffff, 0xffffffff, {"E", "F", "G", "H"} },
806806
[2] = {0xffffffff, 0xffffffff, {"I", "J", "K", "L"} },
807807
[3] = {0xffffffff, 0xffffffff, {"M", "N", "O", "P"} },
808-
[4] = {0xffffffff, 0xffffffff, {"Q", "R", "S", "T"} },
809-
[5] = {0xffffffff, 0x0000ffff, {"U", "V", "W", "X"} },
810-
[6] = {0xffff0000, 0x0fff0000, {"Y", "Z", "", ""} },
808+
[4] = {0xffffffff, 0x00ffffff, {"Q", "R", "S", "T"} },
809+
[5] = {0xffffffff, 0xffffff00, {"U", "V", "W", "X"} },
810+
[6] = {0x0000ffff, 0x0000ffff, {"Y", "Z"} },
811811
};
812812

813813
static GPIOSetProperties ast2600_1_8v_set_props[] = {

0 commit comments

Comments
 (0)