gpio: mxc_gpio: enable DM gpio before relocation
Subsystems (2)
PATCH 1/1 gpio: mxc_gpio: enable DM gpio before relocation
From: Markus Niebel <[email protected]>
gpio often are needed to detect revision and variants. Therefore gpio should be available ASAP.
--- drivers/gpio/mxc_gpio.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpio/mxc_gpio.c +1 -0
@@ -330,6 +330,7 @@ U_BOOT_DRIVER(gpio_mxc) = { .priv_auto_alloc_size = sizeof(struct mxc_bank_info), .of_match = mxc_gpio_ids, .bind = mxc_gpio_bind, + .flags = DM_FLAG_PRE_RELOC, };#ifndef CONFIG_OF_CONTROL
Signature · 1 line
2.3.0
PATCH 1/1 gpio: mxc_gpio: enable DM gpio before relocation
Hi Markus,
Quoted 23 lines · Markus Niebel
From: Markus Niebel <[email protected]>
gpio often are needed to detect revision and variants. Therefore gpio should be available ASAP.
Signed-off-by Markus Niebel <[email protected]>--- drivers/gpio/mxc_gpio.c | 1 + 1 file changed, 1 insertion(+)drivers/gpio/mxc_gpio.c +1
-1@@ -330,6 +330,7 @@ U_BOOT_DRIVER(gpio_mxc) = { .priv_auto_alloc_size = sizeof(struct mxc_bank_info), .of_match = mxc_gpio_ids, .bind = mxc_gpio_bind, + .flags = DM_FLAG_PRE_RELOC, };#ifndef CONFIG_OF_CONTROL --
Quoted 2 lines
2.3.0
This should really be done in the device tree with the u-boot,dm-pre-reloc property for the particular GPIO banks you need. I don't think this should be a global setting.
Regards,
Simon
PATCH 1/1 gpio: mxc_gpio: enable DM gpio before relocation
Hello Simon,
Am 16.06.2015 um 23:44 schrieb Simon Glass:
Quoted 24 lines
Hi Markus,
Quoted 21 lines · Markus Niebel
From: Markus Niebel <[email protected]>
gpio often are needed to detect revision and variants. Therefore gpio should be available ASAP.
Signed-off-by Markus Niebel <[email protected]>--- drivers/gpio/mxc_gpio.c | 1 + 1 file changed, 1 insertion(+)drivers/gpio/mxc_gpio.c +1
-0@@ -330,6 +330,7 @@ U_BOOT_DRIVER(gpio_mxc) = { .priv_auto_alloc_size = sizeof(struct mxc_bank_info), .of_match = mxc_gpio_ids, .bind = mxc_gpio_bind, + .flags = DM_FLAG_PRE_RELOC, };
Quoted 9 lines
Quoted 4 lines
drivers/gpio/mxc_gpio.c +0
-1#ifndef CONFIG_OF_CONTROL --2.3.0
This should really be done in the device tree with the u-boot,dm-pre-reloc property for the particular GPIO banks you need. I don't think this should be a global setting.
I totally agree for the longer run - but tegra gpio does it the same way.
Regards,
Markus
PATCH 1/1 gpio: mxc_gpio: enable DM gpio before relocation
Hi Markus,
Quoted 38 lines · Markus Niebel
Hello Simon,
Am 16.06.2015 um 23:44 schrieb Simon Glass:
Quoted 24 lines
Hi Markus,
Quoted 21 lines · Markus Niebel
From: Markus Niebel <[email protected]>
gpio often are needed to detect revision and variants. Therefore gpio should be available ASAP.
Signed-off-by Markus Niebel <[email protected]>--- drivers/gpio/mxc_gpio.c | 1 + 1 file changed, 1 insertion(+)drivers/gpio/mxc_gpio.c +1
-0@@ -330,6 +330,7 @@ U_BOOT_DRIVER(gpio_mxc) = { .priv_auto_alloc_size = sizeof(struct mxc_bank_info), .of_match = mxc_gpio_ids, .bind = mxc_gpio_bind, + .flags = DM_FLAG_PRE_RELOC, };Quoted 9 lines
Quoted 4 lines
drivers/gpio/mxc_gpio.c +0
-1#ifndef CONFIG_OF_CONTROL --2.3.0
This should really be done in the device tree with the u-boot,dm-pre-reloc property for the particular GPIO banks you need. I don't think this should be a global setting.
Quoted 1 line
I totally agree for the longer run - but tegra gpio does it the same way.
That's because it currently doesn't use device tree in SPL. I'll take a look at converting it over.
Is your GPIO driver used in SPL?
Regards,
Simon
PATCH 1/1 gpio: mxc_gpio: enable DM gpio before relocation
Am 17.06.2015 um 17:04 schrieb Simon Glass:
Quoted 41 lines
Hi Markus,
Quoted 38 lines · Markus Niebel
Hello Simon,
Am 16.06.2015 um 23:44 schrieb Simon Glass:
Quoted 33 lines
Hi Markus,
Quoted 23 lines · Markus Niebel
From: Markus Niebel <[email protected]>
gpio often are needed to detect revision and variants. Therefore gpio should be available ASAP.
Signed-off-by Markus Niebel <[email protected]>--- drivers/gpio/mxc_gpio.c | 1 + 1 file changed, 1 insertion(+)drivers/gpio/mxc_gpio.c +1
-1@@ -330,6 +330,7 @@ U_BOOT_DRIVER(gpio_mxc) = { .priv_auto_alloc_size = sizeof(struct mxc_bank_info), .of_match = mxc_gpio_ids, .bind = mxc_gpio_bind, + .flags = DM_FLAG_PRE_RELOC, };#ifndef CONFIG_OF_CONTROL --Quoted 2 lines
2.3.0
This should really be done in the device tree with the u-boot,dm-pre-reloc property for the particular GPIO banks you need. I don't think this should be a global setting.
Quoted 7 lines
Quoted 1 line
I totally agree for the longer run - but tegra gpio does it the same way.
That's because it currently doesn't use device tree in SPL. I'll take a look at converting it over.
Is your GPIO driver used in SPL?
As far as I understand: include/configs/imx6_spl.h defines CONFIG_SPL_GPIO_SUPPORT. So every mx6 board using SPL includes GPIO. I2C driver for different imx SOC also uses GPIO for the bus reset logic. But I'm not too deep in the SPL stuff. BTW there is also no device tree support for mx6 in the moment in U-Boot.
Regards,
Markus
PATCH 1/1 gpio: mxc_gpio: enable DM gpio before relocation
Hi Markus,
Quoted 47 lines · Markus Niebel
Am 17.06.2015 um 17:04 schrieb Simon Glass:
Quoted 46 lines
Hi Markus,
Quoted 38 lines · Markus Niebel
Hello Simon,
Am 16.06.2015 um 23:44 schrieb Simon Glass:
Quoted 24 lines
Hi Markus,
Quoted 21 lines · Markus Niebel
From: Markus Niebel <[email protected]>
gpio often are needed to detect revision and variants. Therefore gpio should be available ASAP.
Signed-off-by Markus Niebel <[email protected]>--- drivers/gpio/mxc_gpio.c | 1 + 1 file changed, 1 insertion(+)drivers/gpio/mxc_gpio.c +1
-0@@ -330,6 +330,7 @@ U_BOOT_DRIVER(gpio_mxc) = { .priv_auto_alloc_size = sizeof(struct mxc_bank_info), .of_match = mxc_gpio_ids, .bind = mxc_gpio_bind, + .flags = DM_FLAG_PRE_RELOC, };Quoted 9 lines
Quoted 4 lines
drivers/gpio/mxc_gpio.c +0
-1#ifndef CONFIG_OF_CONTROL --2.3.0
This should really be done in the device tree with the u-boot,dm-pre-reloc property for the particular GPIO banks you need. I don't think this should be a global setting.
Quoted 1 line
I totally agree for the longer run - but tegra gpio does it the same way.
That's because it currently doesn't use device tree in SPL. I'll take a look at converting it over.
Quoted 7 lines
Quoted 2 lines
Is your GPIO driver used in SPL?
As far as I understand:
include/configs/imx6_spl.hdefinesCONFIG_SPL_GPIO_SUPPORT. So every mx6 board using SPL includes GPIO. I2C driver for different imx SOC also uses GPIO for the bus reset logic. But I'm not too deep in the SPL stuff. BTW there is also no device tree support for mx6 in the moment in U-Boot.
OK, so how about adding a TODO on that line to consider remove it once device tree support is added?
But in any case it seems like you do need this line. It looks like MXC does not have many GPIO banks so the impact should be fairly small.
Regards,
Simon