I am working with a vf61 and wanted to set the GPIO at boot time by uboot.
What I can do is setting, clearing, toogling of the gpios in uboot. However, saving Information to Flash does not work as expected. I used the example shown here:
How can I save the gpio startup setting to the Environment?
The article you are refering is for E-Boot bootloader and is not applicable for U-Boot bootloader.
To handle GPIOs in U-Boot one need to use ‘gpio’ command, for more information refer this article.
To set the GPIO during startup in U-Boot one could add a script to set the IO.
e.g
# setenv set-io 'gpio set <gpio-number>'
# setenv bootcmd 'run set-io; run ubiboot; run sdboot'
# saveenv
Looks good to me. May be also you could add a debug printf along with the gpio code you added. To eable the debug messages define ‘DEBUG’ on top of the board file.
Yes it’s a #define, instead you can use printf directly. Check/compare the ver output from U-Boot
prompt. The binary one need to update is u-boot-nand.imx