- pinctrl: Correct the driver GPIO declaration

- meson64_android: handle errors on boot and run fastboot on boot failure
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmGX4fgACgkQd9zb2sjI
 SdFoHxAAmdSz0fAO6NNY9i6Ee8J5iinDfun6j/aUJprjxK5CeMaeHvyAA3L+quQl
 zMaLKrx8d9l6VSKAL1fdV8ob1w8FFCC6uYiLp32HZ2CzZskyLDa4GXipzQB0O6LS
 VvfUjhOEMi/OpUzCM/OtWSi54fajntYIWdxZH24fD+HCwlercpyuUG/nelEqLYFd
 REgWPV/XUkH6Odfr/sYSEioSzYGYgtCSBjEBrS4PgAUiH/GONFuU+UpNfLjKzJoB
 Da4JAue4dT9CYRNiqu2yqRdbe22fsp922bWRv1gytxcxE4jMGOCJ7HonpLAXJxuB
 w6BHItj0KHhwhxHQ1mhm5mx/ZmN3c50qYWT8W9pIFreU0Iuq8/Zw7pazCb1IaH62
 ri0Mthf50baRIqpAMdpbcRsSh5B6fsxURB+O1+TpPtw66QK1gouQyPDKDX2yaFAD
 gDkDToPk8jaWcxJ4eUyyaLkH8JZe98JXSSLMjJUsnTPLs7lCnjGuOH1fVvUyT75M
 VBaDi2FOAArplYJ8X/sJbBquEx819u8vPLkkPAD8sD/49xpnzsgnnWHJRJ3D3j0V
 bT0GCRCSl9nSrXa1rpB8zeA0YsSLDQ7b1Hy++H5MOJ4fZAOXzcGbR+zTlXnVhoFZ
 7wqWMhMJc70V1VHjEULk/Eqb3qh89RwCgCtSmNBniR1xi2796tU=
 =i2VH
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-amlogic-20211119' of https://source.denx.de/u-boot/custodians/u-boot-amlogic

- pinctrl: Correct the driver GPIO declaration
- meson64_android: handle errors on boot and run fastboot on boot failure
This commit is contained in:
Tom Rini 2021-11-19 16:33:33 -05:00
commit 454a97485a
5 changed files with 35 additions and 24 deletions

View file

@ -145,7 +145,7 @@ static const struct dm_gpio_ops meson_gx_gpio_ops = {
.direction_output = meson_gpio_direction_output, .direction_output = meson_gpio_direction_output,
}; };
const struct driver meson_gx_gpio_driver = { U_BOOT_DRIVER(meson_gx_gpio_driver) = {
.name = "meson-gx-gpio", .name = "meson-gx-gpio",
.id = UCLASS_GPIO, .id = UCLASS_GPIO,
.probe = meson_gpio_probe, .probe = meson_gpio_probe,

View file

@ -43,6 +43,6 @@ struct meson_gx_pmx_data {
} }
extern const struct pinctrl_ops meson_gx_pinctrl_ops; extern const struct pinctrl_ops meson_gx_pinctrl_ops;
extern const struct driver meson_gx_gpio_driver; extern U_BOOT_DRIVER(meson_gx_gpio_driver);
#endif /* __PINCTRL_MESON_GX_H__ */ #endif /* __PINCTRL_MESON_GX_H__ */

View file

@ -439,7 +439,7 @@ struct meson_pinctrl_data meson_gxbb_periphs_pinctrl_data = {
.num_groups = ARRAY_SIZE(meson_gxbb_periphs_groups), .num_groups = ARRAY_SIZE(meson_gxbb_periphs_groups),
.num_funcs = ARRAY_SIZE(meson_gxbb_periphs_functions), .num_funcs = ARRAY_SIZE(meson_gxbb_periphs_functions),
.num_banks = ARRAY_SIZE(meson_gxbb_periphs_banks), .num_banks = ARRAY_SIZE(meson_gxbb_periphs_banks),
.gpio_driver = &meson_gx_gpio_driver, .gpio_driver = DM_DRIVER_REF(meson_gx_gpio_driver),
}; };
struct meson_pinctrl_data meson_gxbb_aobus_pinctrl_data = { struct meson_pinctrl_data meson_gxbb_aobus_pinctrl_data = {
@ -452,7 +452,7 @@ struct meson_pinctrl_data meson_gxbb_aobus_pinctrl_data = {
.num_groups = ARRAY_SIZE(meson_gxbb_aobus_groups), .num_groups = ARRAY_SIZE(meson_gxbb_aobus_groups),
.num_funcs = ARRAY_SIZE(meson_gxbb_aobus_functions), .num_funcs = ARRAY_SIZE(meson_gxbb_aobus_functions),
.num_banks = ARRAY_SIZE(meson_gxbb_aobus_banks), .num_banks = ARRAY_SIZE(meson_gxbb_aobus_banks),
.gpio_driver = &meson_gx_gpio_driver, .gpio_driver = DM_DRIVER_REF(meson_gx_gpio_driver),
}; };
static const struct udevice_id meson_gxbb_pinctrl_match[] = { static const struct udevice_id meson_gxbb_pinctrl_match[] = {

View file

@ -701,7 +701,7 @@ struct meson_pinctrl_data meson_gxl_periphs_pinctrl_data = {
.num_groups = ARRAY_SIZE(meson_gxl_periphs_groups), .num_groups = ARRAY_SIZE(meson_gxl_periphs_groups),
.num_funcs = ARRAY_SIZE(meson_gxl_periphs_functions), .num_funcs = ARRAY_SIZE(meson_gxl_periphs_functions),
.num_banks = ARRAY_SIZE(meson_gxl_periphs_banks), .num_banks = ARRAY_SIZE(meson_gxl_periphs_banks),
.gpio_driver = &meson_gx_gpio_driver, .gpio_driver = DM_DRIVER_REF(meson_gx_gpio_driver),
}; };
struct meson_pinctrl_data meson_gxl_aobus_pinctrl_data = { struct meson_pinctrl_data meson_gxl_aobus_pinctrl_data = {
@ -714,7 +714,7 @@ struct meson_pinctrl_data meson_gxl_aobus_pinctrl_data = {
.num_groups = ARRAY_SIZE(meson_gxl_aobus_groups), .num_groups = ARRAY_SIZE(meson_gxl_aobus_groups),
.num_funcs = ARRAY_SIZE(meson_gxl_aobus_functions), .num_funcs = ARRAY_SIZE(meson_gxl_aobus_functions),
.num_banks = ARRAY_SIZE(meson_gxl_aobus_banks), .num_banks = ARRAY_SIZE(meson_gxl_aobus_banks),
.gpio_driver = &meson_gx_gpio_driver, .gpio_driver = DM_DRIVER_REF(meson_gx_gpio_driver),
}; };
static const struct udevice_id meson_gxl_pinctrl_match[] = { static const struct udevice_id meson_gxl_pinctrl_match[] = {

View file

@ -140,25 +140,28 @@
"echo Fastboot forced by usb rom boot;" \ "echo Fastboot forced by usb rom boot;" \
"setenv run_fastboot 1;" \ "setenv run_fastboot 1;" \
"fi;" \ "fi;" \
"if test \"${run_fastboot}\" -eq 0; then " \
"if gpt verify mmc ${mmcdev} ${partitions}; then; " \ "if gpt verify mmc ${mmcdev} ${partitions}; then; " \
"else " \ "else " \
"echo Broken MMC partition scheme;" \ "echo Broken MMC partition scheme;" \
"setenv run_fastboot 1;" \ "setenv run_fastboot 1;" \
"fi; " \ "fi; " \
"fi;" \
"if test \"${run_fastboot}\" -eq 0; then " \
"if bcb load " __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) " " \ "if bcb load " __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) " " \
CONTROL_PARTITION "; then " \ CONTROL_PARTITION "; then " \
"if bcb test command = bootonce-bootloader; then " \ "if bcb test command = bootonce-bootloader; then " \
"echo BCB: Bootloader boot...; " \ "echo BCB: Bootloader boot...; " \
"bcb clear command; bcb store; " \ "bcb clear command; bcb store; " \
"setenv run_fastboot 1;" \ "setenv run_fastboot 1;" \
"fi; " \ "elif bcb test command = boot-fastboot; then " \
"if bcb test command = boot-fastboot; then " \
"echo BCB: fastboot userspace boot...; " \ "echo BCB: fastboot userspace boot...; " \
"setenv force_recovery 1;" \ "setenv force_recovery 1;" \
"fi; " \ "fi; " \
"else " \ "else " \
"echo Warning: BCB is corrupted or does not exist; " \ "echo Warning: BCB is corrupted or does not exist; " \
"fi;" \ "fi;" \
"fi;" \
"if test \"${run_fastboot}\" -eq 1; then " \ "if test \"${run_fastboot}\" -eq 1; then " \
"echo Running Fastboot...;" \ "echo Running Fastboot...;" \
"fastboot " __stringify(CONFIG_FASTBOOT_USB_DEV) "; " \ "fastboot " __stringify(CONFIG_FASTBOOT_USB_DEV) "; " \
@ -230,16 +233,24 @@
"echo Running Android...;" \ "echo Running Android...;" \
BOOT_CMD \ BOOT_CMD \
"fi;" \ "fi;" \
"echo Failed to boot Android...;" \ "echo Failed to boot Android...;\0"
"reset\0"
#define BOOTENV_DEV_NAME_SYSTEM(devtypeu, devtypel, instance) \ #define BOOTENV_DEV_NAME_SYSTEM(devtypeu, devtypel, instance) \
"system " "system "
#define BOOTENV_DEV_PANIC(devtypeu, devtypel, instance) \
"bootcmd_panic=" \
"fastboot " __stringify(CONFIG_FASTBOOT_USB_DEV) "; " \
"reset\0"
#define BOOTENV_DEV_NAME_PANIC(devtypeu, devtypel, instance) \
"panic "
#define BOOT_TARGET_DEVICES(func) \ #define BOOT_TARGET_DEVICES(func) \
func(FASTBOOT, fastboot, na) \ func(FASTBOOT, fastboot, na) \
func(RECOVERY, recovery, na) \ func(RECOVERY, recovery, na) \
func(SYSTEM, system, na) \ func(SYSTEM, system, na) \
func(PANIC, panic, na) \
#define PREBOOT_LOAD_LOGO \ #define PREBOOT_LOAD_LOGO \
"if test \"${boot_source}\" != \"usb\" && " \ "if test \"${boot_source}\" != \"usb\" && " \