@@ -72,7 +72,7 @@ static void fsl_imx6ul_init(Object *obj)
* GPIOs 1 to 5
*/
for (i = 0; i < FSL_IMX6UL_NUM_GPIOS; i++) {
- snprintf(name, NAME_SIZE, "gpio%d", i);
+ snprintf(name, NAME_SIZE, "gpio%d", i + 1);
object_initialize_child(obj, name, &s->gpio[i], TYPE_IMX_GPIO);
}
@@ -80,7 +80,7 @@ static void fsl_imx6ul_init(Object *obj)
* GPT 1, 2
*/
for (i = 0; i < FSL_IMX6UL_NUM_GPTS; i++) {
- snprintf(name, NAME_SIZE, "gpt%d", i);
+ snprintf(name, NAME_SIZE, "gpt%d", i + 1);
object_initialize_child(obj, name, &s->gpt[i], TYPE_IMX6UL_GPT);
}
@@ -52,7 +52,7 @@ static void fsl_imx7_init(Object *obj)
* GPIOs 1 to 7
*/
for (i = 0; i < FSL_IMX7_NUM_GPIOS; i++) {
- snprintf(name, NAME_SIZE, "gpio%d", i);
+ snprintf(name, NAME_SIZE, "gpio%d", i + 1);
object_initialize_child(obj, name, &s->gpio[i], TYPE_IMX_GPIO);
}
@@ -60,7 +60,7 @@ static void fsl_imx7_init(Object *obj)
* GPT1, 2, 3, 4
*/
for (i = 0; i < FSL_IMX7_NUM_GPTS; i++) {
- snprintf(name, NAME_SIZE, "gpt%d", i);
+ snprintf(name, NAME_SIZE, "gpt%d", i + 1);
object_initialize_child(obj, name, &s->gpt[i], TYPE_IMX7_GPT);
}
GPT and GPIO are numbered from #1. Fixes: 757282ada8 ("i.MX: Add i.MX7 SOC.") Fixes: 31cbf933f0 ("i.MX: Add i.MX6UL SOC") Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/arm/fsl-imx6ul.c | 4 ++-- hw/arm/fsl-imx7.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)