Re: [PATCH 1/1] hw: aspeed_gpio: Fix GPIO array indexing

2021-10-07 Thread Peter Delevoryas
> On Oct 4, 2021, at 4:43 AM, Cédric Le Goater wrote: > > On 10/4/21 11:07, Cédric Le Goater wrote: >> On 9/28/21 05:43, p...@fb.com wrote: >>> From: Peter Delevoryas >>> >>> The gpio array is declared as a dense array: >>> >>>qemu_irq gpios[ASPEED_GPIO_NR_PINS]; >>> >>> (AST2500 has

Re: [PATCH 1/1] hw: aspeed_gpio: Fix GPIO array indexing

2021-10-04 Thread Cédric Le Goater
On 10/4/21 11:07, Cédric Le Goater wrote: On 9/28/21 05:43, p...@fb.com wrote: From: Peter Delevoryas The gpio array is declared as a dense array:    qemu_irq gpios[ASPEED_GPIO_NR_PINS]; (AST2500 has 228, AST2400 has 216, AST2600 has 208) However, this array is used like a matrix of GPIO

Re: [PATCH 1/1] hw: aspeed_gpio: Fix GPIO array indexing

2021-10-04 Thread Cédric Le Goater
On 9/28/21 05:43, p...@fb.com wrote: From: Peter Delevoryas The gpio array is declared as a dense array: qemu_irq gpios[ASPEED_GPIO_NR_PINS]; (AST2500 has 228, AST2400 has 216, AST2600 has 208) However, this array is used like a matrix of GPIO sets (e.g. gpio[NR_SETS][NR_PINS_PER_SET] =

[PATCH 1/1] hw: aspeed_gpio: Fix GPIO array indexing

2021-09-27 Thread pdel
From: Peter Delevoryas The gpio array is declared as a dense array: qemu_irq gpios[ASPEED_GPIO_NR_PINS]; (AST2500 has 228, AST2400 has 216, AST2600 has 208) However, this array is used like a matrix of GPIO sets (e.g. gpio[NR_SETS][NR_PINS_PER_SET] = gpio[8][32]) size_t offset = set *

Re: [PATCH 1/1] hw: aspeed_gpio: Fix GPIO array indexing

2021-09-27 Thread Cédric Le Goater
On 9/25/21 16:28, Peter Delevoryas wrote: On Sep 25, 2021, at 4:03 AM, Philippe Mathieu-Daudé wrote: Hi Peter, On 9/24/21 08:19, p...@fb.com wrote: From: Peter Delevoryas The gpio array is declared as a dense array: ... qemu_irq gpios[ASPEED_GPIO_NR_PINS]; (AST2500 has 228, AST2400 has

Re: [PATCH 1/1] hw: aspeed_gpio: Fix GPIO array indexing

2021-09-25 Thread Peter Delevoryas
> On Sep 25, 2021, at 4:03 AM, Philippe Mathieu-Daudé wrote: > > Hi Peter, > >> On 9/24/21 08:19, p...@fb.com wrote: >> From: Peter Delevoryas >> The gpio array is declared as a dense array: >> ... >> qemu_irq gpios[ASPEED_GPIO_NR_PINS]; >> (AST2500 has 228, AST2400 has 216, AST2600 has 208)

Re: [PATCH 1/1] hw: aspeed_gpio: Fix GPIO array indexing

2021-09-25 Thread Philippe Mathieu-Daudé
Hi Peter, On 9/24/21 08:19, p...@fb.com wrote: From: Peter Delevoryas The gpio array is declared as a dense array: ... qemu_irq gpios[ASPEED_GPIO_NR_PINS]; (AST2500 has 228, AST2400 has 216, AST2600 has 208) However, this array is used like a matrix of GPIO sets (e.g.

[PATCH 1/1] hw: aspeed_gpio: Fix GPIO array indexing

2021-09-24 Thread pdel
From: Peter Delevoryas The gpio array is declared as a dense array: ... qemu_irq gpios[ASPEED_GPIO_NR_PINS]; (AST2500 has 228, AST2400 has 216, AST2600 has 208) However, this array is used like a matrix of GPIO sets (e.g. gpio[NR_SETS][NR_PINS_PER_SET] = gpio[8][32]) size_t offset = set *