summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--arch/arc/dts/Makefile1
-rw-r--r--arch/arc/dts/axs10x.dts45
-rw-r--r--arch/arc/include/asm/io.h24
-rw-r--r--arch/arc/include/asm/processor.h12
-rw-r--r--arch/arm/cpu/armv7/omap5/Kconfig2
-rw-r--r--arch/arm/cpu/armv7/sunxi/board.c14
-rw-r--r--arch/arm/cpu/armv8/zynqmp/mp.c38
-rw-r--r--arch/arm/include/asm/spl.h10
-rw-r--r--arch/arm/mach-mvebu/serdes/a38x/Makefile1
-rw-r--r--arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c13
-rw-r--r--arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h2
-rw-r--r--arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec-38x.c1
-rw-r--r--arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c103
-rw-r--r--arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.h8
-rw-r--r--arch/arm/mach-mvebu/serdes/a38x/high_speed_topology_spec-38x.c1009
-rw-r--r--arch/arm/mach-mvebu/serdes/a38x/high_speed_topology_spec.h124
-rw-r--r--arch/arm/mach-mvebu/serdes/a38x/seq_exec.c1
-rw-r--r--arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c151
-rw-r--r--arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.h2
-rw-r--r--arch/microblaze/include/asm/bitops.h63
-rw-r--r--arch/microblaze/include/asm/system.h2
-rw-r--r--arch/nios2/include/asm/dma-mapping.h2
-rw-r--r--arch/nios2/include/asm/io.h6
-rw-r--r--board/Marvell/db-88f6820-gp/db-88f6820-gp.c17
-rw-r--r--board/compulab/cm_fx6/spl.c19
-rw-r--r--board/compulab/cm_t3517/cm_t3517.c9
-rw-r--r--board/keymile/common/common.c5
-rw-r--r--board/keymile/common/common.h2
-rw-r--r--board/keymile/km82xx/km82xx.c57
-rw-r--r--board/keymile/km83xx/MAINTAINERS2
-rw-r--r--board/keymile/km83xx/km83xx.c2
-rw-r--r--board/keymile/km_arm/km_arm.c66
-rw-r--r--board/keymile/scripts/develop-common.txt6
-rw-r--r--board/synopsys/axs101/axs101.c12
-rw-r--r--board/ti/am335x/board.c12
-rw-r--r--board/ti/am57xx/Kconfig (renamed from board/ti/beagle_x15/Kconfig)4
-rw-r--r--board/ti/am57xx/MAINTAINERS7
-rw-r--r--board/ti/am57xx/Makefile (renamed from board/ti/beagle_x15/Makefile)0
-rw-r--r--board/ti/am57xx/board.c (renamed from board/ti/beagle_x15/board.c)0
-rw-r--r--board/ti/am57xx/mux_data.h (renamed from board/ti/beagle_x15/mux_data.h)0
-rw-r--r--board/ti/beagle_x15/MAINTAINERS6
-rw-r--r--common/Kconfig6
-rw-r--r--common/cmd_itest.c12
-rw-r--r--common/cmd_mii.c5
-rw-r--r--common/env_ubi.c3
-rw-r--r--common/image.c1
-rw-r--r--common/spl/spl.c194
-rw-r--r--common/spl/spl_ext.c6
-rw-r--r--common/spl/spl_fat.c6
-rw-r--r--common/spl/spl_mmc.c290
-rw-r--r--common/spl/spl_nand.c47
-rw-r--r--common/spl/spl_net.c9
-rw-r--r--common/spl/spl_nor.c6
-rw-r--r--common/spl/spl_onenand.c4
-rw-r--r--common/spl/spl_sata.c11
-rw-r--r--common/spl/spl_usb.c17
-rw-r--r--common/spl/spl_ymodem.c5
-rw-r--r--configs/10m50_defconfig1
-rw-r--r--configs/3c120_defconfig1
-rw-r--r--configs/A10-OLinuXino-Lime_defconfig1
-rw-r--r--configs/A10s-OLinuXino-M_defconfig3
-rw-r--r--configs/A13-OLinuXinoM_defconfig3
-rw-r--r--configs/A13-OLinuXino_defconfig1
-rw-r--r--configs/A20-OLinuXino-Lime2_defconfig1
-rw-r--r--configs/A20-OLinuXino-Lime_defconfig1
-rw-r--r--configs/A20-OLinuXino_MICRO_defconfig1
-rw-r--r--configs/A20-Olimex-SOM-EVB_defconfig1
-rw-r--r--configs/Ainol_AW1_defconfig1
-rw-r--r--configs/Ampe_A76_defconfig1
-rw-r--r--configs/Auxtek-T003_defconfig3
-rw-r--r--configs/Auxtek-T004_defconfig3
-rw-r--r--configs/Bananapi_defconfig1
-rw-r--r--configs/Bananapro_defconfig1
-rw-r--r--configs/CHIP_defconfig1
-rw-r--r--configs/CSQ_CS908_defconfig3
-rw-r--r--configs/Chuwi_V7_CW0825_defconfig1
-rw-r--r--configs/Colombus_defconfig1
-rw-r--r--configs/Cubieboard2_defconfig1
-rw-r--r--configs/Cubieboard_defconfig1
-rw-r--r--configs/Cubietruck_defconfig1
-rw-r--r--configs/Cyrus_P5020_defconfig2
-rw-r--r--configs/Cyrus_P5040_defconfig2
-rw-r--r--configs/Hummingbird_A31_defconfig1
-rw-r--r--configs/Hyundai_A7HD_defconfig1
-rw-r--r--configs/Linksprite_pcDuino3_Nano_defconfig1
-rw-r--r--configs/Linksprite_pcDuino3_defconfig1
-rw-r--r--configs/Linksprite_pcDuino_defconfig1
-rw-r--r--configs/MK808C_defconfig1
-rw-r--r--configs/MPC8313ERDB_33_defconfig1
-rw-r--r--configs/MPC8313ERDB_66_defconfig1
-rw-r--r--configs/MPC8313ERDB_NAND_33_defconfig1
-rw-r--r--configs/MPC8313ERDB_NAND_66_defconfig1
-rw-r--r--configs/MSI_Primo73_defconfig1
-rw-r--r--configs/MSI_Primo81_defconfig1
-rw-r--r--configs/Marsboard_A10_defconfig1
-rw-r--r--configs/Mele_A1000G_quad_defconfig3
-rw-r--r--configs/Mele_A1000_defconfig1
-rw-r--r--configs/Mele_I7_defconfig3
-rw-r--r--configs/Mele_M3_defconfig1
-rw-r--r--configs/Mele_M5_defconfig1
-rw-r--r--configs/Mele_M9_defconfig3
-rw-r--r--configs/Merrii_A80_Optimus_defconfig1
-rw-r--r--configs/Mini-X_defconfig1
-rw-r--r--configs/Orangepi_defconfig1
-rw-r--r--configs/Orangepi_mini_defconfig1
-rw-r--r--configs/Sinlinx_SinA33_defconfig1
-rw-r--r--configs/Sinovoip_BPI_M2_defconfig3
-rw-r--r--configs/UCP1020_SPIFLASH_defconfig1
-rw-r--r--configs/UCP1020_defconfig1
-rw-r--r--configs/UTOO_P66_defconfig1
-rw-r--r--configs/Wexler_TAB7200_defconfig1
-rw-r--r--configs/Wits_Pro_A20_DKT_defconfig1
-rw-r--r--configs/Wobo_i5_defconfig1
-rw-r--r--configs/Yones_Toptech_BD1078_defconfig1
-rw-r--r--configs/am335x_baltos_defconfig3
-rw-r--r--configs/am335x_boneblack_defconfig3
-rw-r--r--configs/am335x_boneblack_vboot_defconfig5
-rw-r--r--configs/am335x_evm_defconfig3
-rw-r--r--configs/am335x_evm_nor_defconfig3
-rw-r--r--configs/am335x_evm_norboot_defconfig1
-rw-r--r--configs/am335x_evm_spiboot_defconfig3
-rw-r--r--configs/am335x_evm_usbspl_defconfig3
-rw-r--r--configs/am335x_gp_evm_defconfig7
-rw-r--r--configs/am335x_igep0033_defconfig3
-rw-r--r--configs/am335x_sl50_defconfig3
-rw-r--r--configs/am437x_gp_evm_defconfig10
-rw-r--r--configs/am437x_sk_evm_defconfig10
-rw-r--r--configs/am43xx_evm_defconfig1
-rw-r--r--configs/am43xx_evm_ethboot_defconfig1
-rw-r--r--configs/am43xx_evm_qspiboot_defconfig1
-rw-r--r--configs/am43xx_evm_usbhost_boot_defconfig1
-rw-r--r--configs/am57xx_evm_defconfig9
-rw-r--r--configs/am57xx_evm_nodt_defconfig (renamed from configs/beagle_x15_defconfig)1
-rw-r--r--configs/apalis_t30_defconfig1
-rw-r--r--configs/aristainetos2_defconfig1
-rw-r--r--configs/aristainetos2b_defconfig1
-rw-r--r--configs/aristainetos_defconfig1
-rw-r--r--configs/arndale_defconfig1
-rw-r--r--configs/axs101_defconfig11
-rw-r--r--configs/axs103_defconfig11
-rw-r--r--configs/ba10_tv_box_defconfig1
-rw-r--r--configs/bayleybay_defconfig1
-rw-r--r--configs/bcm11130_defconfig1
-rw-r--r--configs/bcm11130_nand_defconfig1
-rw-r--r--configs/bcm28155_ap_defconfig1
-rw-r--r--configs/bcm28155_w1d_defconfig1
-rw-r--r--configs/bct-brettl2_defconfig1
-rw-r--r--configs/beaver_defconfig1
-rw-r--r--configs/bf518f-ezbrd_defconfig1
-rw-r--r--configs/bf526-ezbrd_defconfig1
-rw-r--r--configs/bf527-ad7160-eval_defconfig1
-rw-r--r--configs/bf527-ezkit-v2_defconfig1
-rw-r--r--configs/bf527-sdp_defconfig1
-rw-r--r--configs/bf533-ezkit_defconfig1
-rw-r--r--configs/bf533-stamp_defconfig1
-rw-r--r--configs/bf537-pnav_defconfig1
-rw-r--r--configs/bf537-stamp_defconfig1
-rw-r--r--configs/bf538f-ezkit_defconfig1
-rw-r--r--configs/bf548-ezkit_defconfig1
-rw-r--r--configs/bf561-acvilon_defconfig1
-rw-r--r--configs/bf561-ezkit_defconfig1
-rw-r--r--configs/bf609-ezkit_defconfig1
-rw-r--r--configs/bg0900_defconfig1
-rw-r--r--configs/birdland_bav335a_defconfig1
-rw-r--r--configs/birdland_bav335b_defconfig1
-rw-r--r--configs/br4_defconfig1
-rw-r--r--configs/cairo_defconfig1
-rw-r--r--configs/calimain_defconfig1
-rw-r--r--configs/cardhu_defconfig1
-rw-r--r--configs/cgtqmx6qeval_defconfig1
-rw-r--r--configs/chromebook_jerry_defconfig2
-rw-r--r--configs/chromebook_link_defconfig2
-rw-r--r--configs/chromebox_panther_defconfig2
-rw-r--r--configs/cm-bf527_defconfig1
-rw-r--r--configs/cm-bf533_defconfig1
-rw-r--r--configs/cm-bf537e_defconfig1
-rw-r--r--configs/cm-bf537u_defconfig1
-rw-r--r--configs/cm-bf548_defconfig1
-rw-r--r--configs/cm-bf561_defconfig1
-rw-r--r--configs/cm_fx6_defconfig1
-rw-r--r--configs/cm_t335_defconfig1
-rw-r--r--configs/cm_t3517_defconfig1
-rw-r--r--configs/cm_t35_defconfig1
-rw-r--r--configs/cm_t43_defconfig1
-rw-r--r--configs/cm_t54_defconfig1
-rw-r--r--configs/colibri_t20_defconfig1
-rw-r--r--configs/colibri_t30_defconfig1
-rw-r--r--configs/colibri_vf_defconfig1
-rw-r--r--configs/colibri_vf_dtb_defconfig1
-rw-r--r--configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig4
-rw-r--r--configs/controlcenterd_36BIT_SDCARD_defconfig4
-rw-r--r--configs/controlcenterd_TRAILBLAZER_DEVELOP_defconfig2
-rw-r--r--configs/controlcenterd_TRAILBLAZER_defconfig2
-rw-r--r--configs/coreboot-x86_defconfig1
-rw-r--r--configs/crownbay_defconfig1
-rw-r--r--configs/dalmore_defconfig1
-rw-r--r--configs/devkit3250_defconfig1
-rw-r--r--configs/dnp5370_defconfig1
-rw-r--r--configs/dra72_evm_defconfig1
-rw-r--r--configs/dra74_evm_defconfig6
-rw-r--r--configs/dra7xx_evm_defconfig3
-rw-r--r--configs/dra7xx_evm_qspiboot_defconfig3
-rw-r--r--configs/dra7xx_evm_uart3_defconfig3
-rw-r--r--configs/draco_defconfig1
-rw-r--r--configs/dreamplug_defconfig5
-rw-r--r--configs/duovero_defconfig1
-rw-r--r--configs/e2220-1170_defconfig1
-rw-r--r--configs/ea20_defconfig1
-rw-r--r--configs/eco5pk_defconfig1
-rw-r--r--configs/efi-x86_defconfig1
-rw-r--r--configs/firefly-rk3288_defconfig2
-rw-r--r--configs/ga10h_v1_1_defconfig1
-rw-r--r--configs/galileo_defconfig1
-rw-r--r--configs/gr_xc3s_1500_defconfig2
-rw-r--r--configs/gt90h_v4_defconfig1
-rw-r--r--configs/guruplug_defconfig5
-rw-r--r--configs/gwventana_defconfig3
-rw-r--r--configs/harmony_defconfig1
-rw-r--r--configs/hikey_defconfig1
-rw-r--r--configs/i12-tvbox_defconfig1
-rw-r--r--configs/iNet_3F_defconfig1
-rw-r--r--configs/iNet_3W_defconfig1
-rw-r--r--configs/iNet_86VS_defconfig1
-rw-r--r--configs/ib62x0_defconfig5
-rw-r--r--configs/ibf-dsp561_defconfig1
-rw-r--r--configs/igep0020_defconfig1
-rw-r--r--configs/igep0020_nand_defconfig1
-rw-r--r--configs/igep0030_defconfig1
-rw-r--r--configs/igep0030_nand_defconfig1
-rw-r--r--configs/igep0032_defconfig1
-rw-r--r--configs/inet1_defconfig1
-rw-r--r--configs/inet97fv2_defconfig1
-rw-r--r--configs/inet98v_rev2_defconfig1
-rw-r--r--configs/inet9f_rev03_defconfig1
-rw-r--r--configs/ip04_defconfig1
-rw-r--r--configs/jesurun_q5_defconfig1
-rw-r--r--configs/jetson-tk1_defconfig1
-rw-r--r--configs/k2g_evm_defconfig6
-rw-r--r--configs/kmtegr1_defconfig4
-rw-r--r--configs/kmtepr2_defconfig4
-rw-r--r--configs/kwb_defconfig1
-rw-r--r--configs/ls1021atwr_sdcard_qspi_defconfig4
-rw-r--r--configs/ls1043ardb_defconfig3
-rw-r--r--configs/ls1043ardb_nand_defconfig4
-rw-r--r--configs/ls1043ardb_sdcard_defconfig4
-rw-r--r--configs/m28evk_defconfig1
-rw-r--r--configs/marsboard_defconfig1
-rw-r--r--configs/mcx_defconfig1
-rw-r--r--configs/medcom-wide_defconfig1
-rw-r--r--configs/microblaze-generic_defconfig1
-rw-r--r--configs/minnowmax_defconfig1
-rw-r--r--configs/mixtile_loftq_defconfig1
-rw-r--r--configs/mk802_a10s_defconfig3
-rw-r--r--configs/mk802_defconfig3
-rw-r--r--configs/mk802ii_defconfig1
-rw-r--r--configs/mt_ventoux_defconfig1
-rw-r--r--configs/mx23_olinuxino_defconfig1
-rw-r--r--configs/mx23evk_defconfig1
-rw-r--r--configs/mx28evk_auart_console_defconfig1
-rw-r--r--configs/mx28evk_defconfig1
-rw-r--r--configs/mx28evk_nand_defconfig1
-rw-r--r--configs/mx28evk_spi_defconfig1
-rw-r--r--configs/mx6cuboxi_defconfig1
-rw-r--r--configs/mx6dlarm2_defconfig1
-rw-r--r--configs/mx6dlarm2_lpddr2_defconfig1
-rw-r--r--configs/mx6dlsabreauto_defconfig1
-rw-r--r--configs/mx6dlsabresd_defconfig1
-rw-r--r--configs/mx6qarm2_defconfig1
-rw-r--r--configs/mx6qarm2_lpddr2_defconfig1
-rw-r--r--configs/mx6qpsabreauto_defconfig1
-rw-r--r--configs/mx6qsabreauto_defconfig1
-rw-r--r--configs/mx6qsabrelite_defconfig1
-rw-r--r--configs/mx6qsabresd_defconfig1
-rw-r--r--configs/mx6sabresd_spl_defconfig1
-rw-r--r--configs/mx6slevk_defconfig1
-rw-r--r--configs/mx6slevk_spinor_defconfig1
-rw-r--r--configs/mx6slevk_spl_defconfig1
-rw-r--r--configs/mx6sxsabresd_defconfig1
-rw-r--r--configs/mx6sxsabresd_spl_defconfig1
-rw-r--r--configs/mx6ul_14x14_evk_defconfig1
-rw-r--r--configs/mx6ul_9x9_evk_defconfig1
-rw-r--r--configs/mx7dsabresd_defconfig1
-rw-r--r--configs/nitrogen6dl2g_defconfig1
-rw-r--r--configs/nitrogen6dl_defconfig1
-rw-r--r--configs/nitrogen6q2g_defconfig1
-rw-r--r--configs/nitrogen6q_defconfig1
-rw-r--r--configs/nitrogen6s1g_defconfig1
-rw-r--r--configs/nitrogen6s_defconfig1
-rw-r--r--configs/nokia_rx51_defconfig1
-rw-r--r--configs/novena_defconfig1
-rw-r--r--configs/nyan-big_defconfig2
-rw-r--r--configs/odroid-xu3_defconfig11
-rw-r--r--configs/odroid_defconfig1
-rw-r--r--configs/omap3_beagle_defconfig1
-rw-r--r--configs/omap3_logic_defconfig1
-rw-r--r--configs/omap3_overo_defconfig1
-rw-r--r--configs/omap3_pandora_defconfig1
-rw-r--r--configs/omap3_zoom1_defconfig1
-rw-r--r--configs/omap4_panda_defconfig1
-rw-r--r--configs/omap4_sdp4430_defconfig1
-rw-r--r--configs/omap5_uevm_defconfig1
-rw-r--r--configs/ot1200_defconfig1
-rw-r--r--configs/ot1200_spl_defconfig1
-rw-r--r--configs/p2371-0000_defconfig1
-rw-r--r--configs/p2371-2180_defconfig1
-rw-r--r--configs/p2571_defconfig1
-rw-r--r--configs/paz00_defconfig1
-rw-r--r--configs/pcm051_rev1_defconfig1
-rw-r--r--configs/pcm051_rev3_defconfig1
-rw-r--r--configs/pcm052_defconfig1
-rw-r--r--configs/peach-pi_defconfig2
-rw-r--r--configs/peach-pit_defconfig2
-rw-r--r--configs/pengwyn_defconfig1
-rw-r--r--configs/pepper_defconfig1
-rw-r--r--configs/platinum_picon_defconfig1
-rw-r--r--configs/platinum_titanium_defconfig1
-rw-r--r--configs/plutux_defconfig1
-rw-r--r--configs/pov_protab2_ips9_defconfig1
-rw-r--r--configs/pr1_defconfig1
-rw-r--r--configs/pxm2_defconfig1
-rw-r--r--configs/q8_a13_tablet_defconfig1
-rw-r--r--configs/q8_a23_tablet_800x480_defconfig1
-rw-r--r--configs/q8_a33_tablet_1024x600_defconfig1
-rw-r--r--configs/q8_a33_tablet_800x480_defconfig1
-rw-r--r--configs/r7-tv-dongle_defconfig3
-rw-r--r--configs/rastaban_defconfig1
-rw-r--r--configs/riotboard_defconfig1
-rw-r--r--configs/rpi_2_defconfig1
-rw-r--r--configs/rpi_defconfig1
-rw-r--r--configs/rut_defconfig1
-rw-r--r--configs/sandbox_defconfig10
-rw-r--r--configs/sansa_fuze_plus_defconfig1
-rw-r--r--configs/sc_sps_1_defconfig1
-rw-r--r--configs/seaboard_defconfig1
-rw-r--r--configs/secomx6quq7_defconfig1
-rw-r--r--configs/sheevaplug_defconfig5
-rw-r--r--configs/smdk5250_defconfig1
-rw-r--r--configs/smdk5420_defconfig1
-rw-r--r--configs/snapper9260_defconfig1
-rw-r--r--configs/snapper9g20_defconfig1
-rw-r--r--configs/snow_defconfig2
-rw-r--r--configs/socfpga_arria5_defconfig3
-rw-r--r--configs/socfpga_cyclone5_defconfig3
-rw-r--r--configs/socfpga_de0_nano_soc_defconfig3
-rw-r--r--configs/socfpga_mcvevk_defconfig3
-rw-r--r--configs/socfpga_sockit_defconfig3
-rw-r--r--configs/socfpga_socrates_defconfig3
-rw-r--r--configs/spring_defconfig2
-rw-r--r--configs/sunxi_Gemei_G9_defconfig1
-rw-r--r--configs/tbs2910_defconfig1
-rw-r--r--configs/tcm-bf518_defconfig1
-rw-r--r--configs/tcm-bf537_defconfig1
-rw-r--r--configs/tec-ng_defconfig1
-rw-r--r--configs/tec_defconfig1
-rw-r--r--configs/thuban_defconfig1
-rw-r--r--configs/titanium_defconfig1
-rw-r--r--configs/tqma6q_mba6_mmc_defconfig1
-rw-r--r--configs/tqma6q_mba6_spi_defconfig1
-rw-r--r--configs/tqma6s_mba6_mmc_defconfig1
-rw-r--r--configs/tqma6s_mba6_spi_defconfig1
-rw-r--r--configs/tqma6s_wru4_mmc_defconfig1
-rw-r--r--configs/trimslice_defconfig1
-rw-r--r--configs/tseries_mmc_defconfig1
-rw-r--r--configs/tseries_nand_defconfig1
-rw-r--r--configs/tseries_spi_defconfig1
-rw-r--r--configs/twister_defconfig1
-rw-r--r--configs/udoo_defconfig1
-rw-r--r--configs/venice2_defconfig1
-rw-r--r--configs/ventana_defconfig1
-rw-r--r--configs/vexpress_aemv8a_dram_defconfig4
-rw-r--r--configs/wandboard_defconfig1
-rw-r--r--configs/warp_defconfig1
-rw-r--r--configs/whistler_defconfig1
-rw-r--r--configs/woodburn_defconfig1
-rw-r--r--configs/woodburn_sd_defconfig1
-rw-r--r--configs/work_92105_defconfig1
-rw-r--r--configs/x600_defconfig1
-rw-r--r--configs/xfi3_defconfig1
-rw-r--r--configs/zynq_microzed_defconfig2
-rw-r--r--configs/zynq_picozed_defconfig2
-rw-r--r--configs/zynq_zc702_defconfig2
-rw-r--r--configs/zynq_zc706_defconfig2
-rw-r--r--configs/zynq_zc770_xm010_defconfig2
-rw-r--r--configs/zynq_zc770_xm011_defconfig2
-rw-r--r--configs/zynq_zc770_xm012_defconfig2
-rw-r--r--configs/zynq_zc770_xm013_defconfig2
-rw-r--r--configs/zynq_zed_defconfig2
-rw-r--r--configs/zynq_zybo_defconfig2
-rw-r--r--doc/git-mailrc3
-rw-r--r--drivers/core/root.c8
-rw-r--r--drivers/ddr/marvell/a38x/ddr3_a38x.h5
-rw-r--r--drivers/ddr/marvell/a38x/ddr3_hws_hw_training_def.h7
-rw-r--r--drivers/ddr/marvell/a38x/ddr3_init.c72
-rw-r--r--drivers/gpio/altera_pio.c5
-rw-r--r--drivers/misc/altera_sysid.c5
-rw-r--r--drivers/mmc/zynq_sdhci.c2
-rw-r--r--drivers/mtd/altera_qspi.c2
-rw-r--r--drivers/mtd/spi/sf-uclass.c23
-rw-r--r--drivers/mtd/spi/spi_spl_load.c17
-rw-r--r--drivers/net/altera_tse.c2
-rw-r--r--drivers/net/phy/Makefile1
-rw-r--r--drivers/net/phy/phy.c3
-rw-r--r--drivers/net/phy/ti.c200
-rw-r--r--drivers/net/zynq_gem.c143
-rw-r--r--drivers/serial/altera_jtag_uart.c5
-rw-r--r--drivers/serial/altera_uart.c5
-rw-r--r--drivers/spi/altera_spi.c5
-rw-r--r--drivers/spi/spi-uclass.c20
-rw-r--r--drivers/timer/altera_timer.c5
-rw-r--r--include/configs/10m50_devboard.h1
-rw-r--r--include/configs/3c120_devboard.h1
-rw-r--r--include/configs/MPC8313ERDB.h1
-rw-r--r--include/configs/UCP1020.h1
-rw-r--r--include/configs/am335x_evm.h7
-rw-r--r--include/configs/am57xx_evm.h (renamed from include/configs/beagle_x15.h)6
-rw-r--r--include/configs/axs101.h31
-rw-r--r--include/configs/bcm28155_ap.h1
-rw-r--r--include/configs/bfin_adi_common.h1
-rw-r--r--include/configs/bg0900.h1
-rw-r--r--include/configs/bur_am335x_common.h1
-rw-r--r--include/configs/calimain.h1
-rw-r--r--include/configs/cm_fx6.h1
-rw-r--r--include/configs/cm_t35.h1
-rw-r--r--include/configs/cm_t3517.h1
-rw-r--r--include/configs/colibri_vf.h1
-rw-r--r--include/configs/devkit3250.h1
-rw-r--r--include/configs/devkit8000.h1
-rw-r--r--include/configs/dnp5370.h1
-rw-r--r--include/configs/dreamplug.h34
-rw-r--r--include/configs/duovero.h1
-rw-r--r--include/configs/ea20.h1
-rw-r--r--include/configs/exynos5-common.h1
-rw-r--r--include/configs/guruplug.h52
-rw-r--r--include/configs/gw_ventana.h1
-rw-r--r--include/configs/hikey.h1
-rw-r--r--include/configs/ib62x0.h30
-rw-r--r--include/configs/km/keymile-common.h9
-rw-r--r--include/configs/km/km-powerpc.h11
-rw-r--r--include/configs/km/km8309-common.h12
-rw-r--r--include/configs/km/km8321-common.h6
-rw-r--r--include/configs/km/km83xx-common.h11
-rw-r--r--include/configs/km/km_arm.h8
-rw-r--r--include/configs/km/kmp204x-common.h1
-rw-r--r--include/configs/km82xx.h3
-rw-r--r--include/configs/km8360.h4
-rw-r--r--include/configs/km_kirkwood.h4
-rw-r--r--include/configs/m28evk.h1
-rw-r--r--include/configs/mcx.h1
-rw-r--r--include/configs/microblaze-generic.h1
-rw-r--r--include/configs/mv-plug-common.h64
-rw-r--r--include/configs/mx23_olinuxino.h1
-rw-r--r--include/configs/mx23evk.h1
-rw-r--r--include/configs/mx28evk.h1
-rw-r--r--include/configs/mx6_common.h1
-rw-r--r--include/configs/mx7_common.h1
-rw-r--r--include/configs/nokia_rx51.h1
-rw-r--r--include/configs/odroid.h1
-rw-r--r--include/configs/omap3_beagle.h1
-rw-r--r--include/configs/omap4_panda.h1
-rw-r--r--include/configs/qemu-x86.h1
-rw-r--r--include/configs/rpi-common.h1
-rw-r--r--include/configs/sandbox.h1
-rw-r--r--include/configs/sansa_fuze_plus.h1
-rw-r--r--include/configs/sc_sps_1.h1
-rw-r--r--include/configs/sheevaplug.h49
-rw-r--r--include/configs/siemens-am33x-common.h1
-rw-r--r--include/configs/snapper9260.h1
-rw-r--r--include/configs/socfpga_arria5_socdk.h1
-rw-r--r--include/configs/socfpga_cyclone5_socdk.h1
-rw-r--r--include/configs/socfpga_de0_nano_soc.h1
-rw-r--r--include/configs/socfpga_mcvevk.h1
-rw-r--r--include/configs/socfpga_sockit.h1
-rw-r--r--include/configs/sunxi-common.h1
-rw-r--r--include/configs/suvd3.h65
-rw-r--r--include/configs/tam3517-common.h1
-rw-r--r--include/configs/tegra-common.h1
-rw-r--r--include/configs/ti_armv7_common.h1
-rw-r--r--include/configs/ti_armv7_keystone2.h1
-rw-r--r--include/configs/tqma6_wru4.h1
-rw-r--r--include/configs/tuxx1.h43
-rw-r--r--include/configs/woodburn_common.h1
-rw-r--r--include/configs/work_92105.h1
-rw-r--r--include/configs/x600.h1
-rw-r--r--include/configs/x86-common.h1
-rw-r--r--include/configs/xfi3.h1
-rw-r--r--include/configs/xilinx_zynqmp.h4
-rw-r--r--include/configs/xilinx_zynqmp_ep.h1
-rw-r--r--include/configs/zynq-common.h4
-rw-r--r--include/image.h3
-rw-r--r--include/phy.h1
-rw-r--r--include/spl.h18
-rw-r--r--lib/lz4_wrapper.c4
-rw-r--r--scripts/Makefile.spl11
-rwxr-xr-xtest/fs/fat-noncontig-test.sh32
-rw-r--r--tools/Makefile1
-rw-r--r--tools/env/Makefile4
-rw-r--r--tools/env/fw_env.c31
-rw-r--r--tools/env/fw_env_main.c10
-rw-r--r--tools/kwbimage.c12
-rw-r--r--tools/zynqimage.c257
501 files changed, 2222 insertions, 2242 deletions
diff --git a/Makefile b/Makefile
index 5d824ae..9447aa7 100644
--- a/Makefile
+++ b/Makefile
@@ -1335,6 +1335,9 @@ spl/sunxi-spl.bin: spl/u-boot-spl
spl/u-boot-spl-dtb.sfp: spl/u-boot-spl
@:
+spl/boot.bin: spl/u-boot-spl
+ @:
+
tpl/u-boot-tpl.bin: tools prepare
$(Q)$(MAKE) obj=tpl -f $(srctree)/scripts/Makefile.spl all
diff --git a/arch/arc/dts/Makefile b/arch/arc/dts/Makefile
index d481fcd..d4772ec 100644
--- a/arch/arc/dts/Makefile
+++ b/arch/arc/dts/Makefile
@@ -2,6 +2,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
+dtb-$(CONFIG_TARGET_AXS101) += axs10x.dtb
dtb-$(CONFIG_TARGET_ARCANGEL4) += arcangel4.dtb
dtb-$(CONFIG_TARGET_TB100) += abilis_tb100.dtb
diff --git a/arch/arc/dts/axs10x.dts b/arch/arc/dts/axs10x.dts
new file mode 100644
index 0000000..8fe1837
--- /dev/null
+++ b/arch/arc/dts/axs10x.dts
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2015 Synopsys, Inc. All rights reserved.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+/dts-v1/;
+
+#include "skeleton.dtsi"
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ aliases {
+ console = &uart0;
+ };
+
+ clocks {
+ apbclk: apbclk {
+ compatible = "fixed-clock";
+ clock-frequency = <50000000>;
+ #clock-cells = <0>;
+ };
+ };
+
+ uart0: serial0@e0022000 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0xe0022000 0x1000>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ };
+
+ ethernet@e0018000 {
+ #interrupt-cells = <1>;
+ compatible = "altr,socfpga-stmmac";
+ reg = < 0xe0018000 0x2000 >;
+ interrupts = < 25 >;
+ interrupt-names = "macirq";
+ phy-mode = "gmii";
+ snps,pbl = < 32 >;
+ clocks = <&apbclk>;
+ clock-names = "stmmaceth";
+ max-speed = <100>;
+ };
+};
diff --git a/arch/arc/include/asm/io.h b/arch/arc/include/asm/io.h
index 24b7337..281682c 100644
--- a/arch/arc/include/asm/io.h
+++ b/arch/arc/include/asm/io.h
@@ -10,6 +10,30 @@
#include <linux/types.h>
#include <asm/byteorder.h>
+/*
+ * Given a physical address and a length, return a virtual address
+ * that can be used to access the memory range with the caching
+ * properties specified by "flags".
+ */
+#define MAP_NOCACHE (0)
+#define MAP_WRCOMBINE (0)
+#define MAP_WRBACK (0)
+#define MAP_WRTHROUGH (0)
+
+static inline void *
+map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags)
+{
+ return (void *)((unsigned long)paddr);
+}
+
+/*
+ * Take down a mapping set up by map_physmem().
+ */
+static inline void unmap_physmem(void *vaddr, unsigned long flags)
+{
+
+}
+
static inline void sync(void)
{
/* Not yet implemented */
diff --git a/arch/arc/include/asm/processor.h b/arch/arc/include/asm/processor.h
new file mode 100644
index 0000000..6355423
--- /dev/null
+++ b/arch/arc/include/asm/processor.h
@@ -0,0 +1,12 @@
+/*
+ * Copyright (C) 2015 Synopsys, Inc. All rights reserved.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef _ASM_ARC_PROCESSOR_H
+#define _ASM_ARC_PROCESSOR_H
+
+/* This file is required by some generic code like USB etc */
+
+#endif /* _ASM_ARC_PROCESSOR_H */
diff --git a/arch/arm/cpu/armv7/omap5/Kconfig b/arch/arm/cpu/armv7/omap5/Kconfig
index 20c3bd9..bfa264e 100644
--- a/arch/arm/cpu/armv7/omap5/Kconfig
+++ b/arch/arm/cpu/armv7/omap5/Kconfig
@@ -24,6 +24,6 @@ config SYS_SOC
source "board/compulab/cm_t54/Kconfig"
source "board/ti/omap5_uevm/Kconfig"
source "board/ti/dra7xx/Kconfig"
-source "board/ti/beagle_x15/Kconfig"
+source "board/ti/am57xx/Kconfig"
endif
diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c
index 4785ac6..794b829 100644
--- a/arch/arm/cpu/armv7/sunxi/board.c
+++ b/arch/arm/cpu/armv7/sunxi/board.c
@@ -95,10 +95,12 @@ static int gpio_init(void)
return 0;
}
-void spl_board_load_image(void)
+int spl_board_load_image(void)
{
debug("Returning to FEL sp=%x, lr=%x\n", fel_stash.sp, fel_stash.lr);
return_to_fel(fel_stash.sp, fel_stash.lr);
+
+ return 0;
}
void s_init(void)
@@ -171,16 +173,8 @@ u32 spl_boot_device(void)
#ifdef CONFIG_MMC
if (CONFIG_MMC_SUNXI_SLOT_EXTRA == 2) {
mmc1 = find_mmc_device(1);
- if (sunxi_mmc_has_egon_boot_signature(mmc1)) {
- /*
- * spl_mmc.c: spl_mmc_load_image() is hard-coded to
- * use find_mmc_device(0), no matter what we
- * return. Swap mmc0 and mmc2 to make this work.
- */
- mmc0->block_dev.dev = 1;
- mmc1->block_dev.dev = 0;
+ if (sunxi_mmc_has_egon_boot_signature(mmc1))
return BOOT_DEVICE_MMC2;
- }
}
#endif
diff --git a/arch/arm/cpu/armv8/zynqmp/mp.c b/arch/arm/cpu/armv8/zynqmp/mp.c
index dcb80b5..58312a7 100644
--- a/arch/arm/cpu/armv8/zynqmp/mp.c
+++ b/arch/arm/cpu/armv8/zynqmp/mp.c
@@ -183,6 +183,29 @@ static void set_r5_start(u8 high)
writel(tmp, &rpu_base->rpu1_cfg);
}
+static void write_tcm_boot_trampoline(u32 boot_addr)
+{
+ if (boot_addr) {
+ /*
+ * Boot trampoline is simple ASM code below.
+ *
+ * b over;
+ * label:
+ * .word 0
+ * over: ldr r0, =label
+ * ldr r1, [r0]
+ * bx r1
+ */
+ debug("Write boot trampoline for %x\n", boot_addr);
+ writel(0xea000000, ZYNQMP_TCM_START_ADDRESS);
+ writel(boot_addr, ZYNQMP_TCM_START_ADDRESS + 0x4);
+ writel(0xe59f0004, ZYNQMP_TCM_START_ADDRESS + 0x8);
+ writel(0xe5901000, ZYNQMP_TCM_START_ADDRESS + 0xc);
+ writel(0xe12fff11, ZYNQMP_TCM_START_ADDRESS + 0x10);
+ writel(0x00000004, ZYNQMP_TCM_START_ADDRESS + 0x14); // address for
+ }
+}
+
int cpu_release(int nr, int argc, char * const argv[])
{
if (nr >= ZYNQMP_CORE_APU0 && nr <= ZYNQMP_CORE_APU3) {
@@ -205,11 +228,18 @@ int cpu_release(int nr, int argc, char * const argv[])
}
u32 boot_addr = simple_strtoul(argv[0], NULL, 16);
+ u32 boot_addr_uniq = 0;
if (!(boot_addr == ZYNQMP_R5_LOVEC_ADDR ||
boot_addr == ZYNQMP_R5_HIVEC_ADDR)) {
- printf("Invalid starting address 0x%x\n", boot_addr);
- printf("0 or 0xffff0000 are permitted\n");
- return 1;
+ printf("Using TCM jump trampoline for address 0x%x\n",
+ boot_addr);
+ /* Save boot address for later usage */
+ boot_addr_uniq = boot_addr;
+ /*
+ * R5 needs to start from LOVEC at TCM
+ * OCM will be probably occupied by ATF
+ */
+ boot_addr = ZYNQMP_R5_LOVEC_ADDR;
}
if (!strncmp(argv[1], "lockstep", 8)) {
@@ -219,6 +249,7 @@ int cpu_release(int nr, int argc, char * const argv[])
set_r5_start(boot_addr);
enable_clock_r5();
release_r5_reset(LOCK);
+ write_tcm_boot_trampoline(boot_addr_uniq);
set_r5_halt_mode(RELEASE, LOCK);
} else if (!strncmp(argv[1], "split", 5)) {
printf("R5 split mode\n");
@@ -226,6 +257,7 @@ int cpu_release(int nr, int argc, char * const argv[])
set_r5_halt_mode(HALT, SPLIT);
enable_clock_r5();
release_r5_reset(SPLIT);
+ write_tcm_boot_trampoline(boot_addr_uniq);
set_r5_halt_mode(RELEASE, SPLIT);
} else {
printf("Unsupported mode\n");
diff --git a/arch/arm/include/asm/spl.h b/arch/arm/include/asm/spl.h
index 6db405d..5c5d33f 100644
--- a/arch/arm/include/asm/spl.h
+++ b/arch/arm/include/asm/spl.h
@@ -31,8 +31,14 @@ enum {
};
#endif
-/* Board-specific load method */
-void spl_board_load_image(void);
+/**
+ * Board specific load method for boards that have a special way of loading
+ * U-Boot, which does not fit with the existing SPL code.
+ *
+ * @return 0 on success, negative errno value on failure.
+ */
+
+int spl_board_load_image(void);
/* Linker symbols. */
extern char __bss_start[], __bss_end[];
diff --git a/arch/arm/mach-mvebu/serdes/a38x/Makefile b/arch/arm/mach-mvebu/serdes/a38x/Makefile
index 1503da8..83b3c0f 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/Makefile
+++ b/arch/arm/mach-mvebu/serdes/a38x/Makefile
@@ -5,6 +5,5 @@
obj-$(CONFIG_SPL_BUILD) = ctrl_pex.o
obj-$(CONFIG_SPL_BUILD) += high_speed_env_spec.o
obj-$(CONFIG_SPL_BUILD) += high_speed_env_spec-38x.o
-obj-$(CONFIG_SPL_BUILD) += high_speed_topology_spec-38x.o
obj-$(CONFIG_SPL_BUILD) += seq_exec.o
obj-$(CONFIG_SPL_BUILD) += sys_env_lib.o
diff --git a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
index 5f223f9..06a7715 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c
@@ -13,17 +13,16 @@
#include "ctrl_pex.h"
#include "sys_env_lib.h"
-int hws_pex_config(struct serdes_map *serdes_map)
+int hws_pex_config(const struct serdes_map *serdes_map, u8 count)
{
u32 pex_idx, tmp, next_busno, first_busno, temp_pex_reg,
temp_reg, addr, dev_id, ctrl_mode;
enum serdes_type serdes_type;
- u32 idx, max_lane_num;
+ u32 idx;
DEBUG_INIT_FULL_S("\n### hws_pex_config ###\n");
- max_lane_num = hws_serdes_get_max_lane();
- for (idx = 0; idx < max_lane_num; idx++) {
+ for (idx = 0; idx < count; idx++) {
serdes_type = serdes_map[idx].serdes_type;
/* configuration for PEX only */
if ((serdes_type != PEX0) && (serdes_type != PEX1) &&
@@ -47,7 +46,7 @@ int hws_pex_config(struct serdes_map *serdes_map)
tmp = reg_read(SOC_CTRL_REG);
tmp &= ~0x03;
- for (idx = 0; idx < max_lane_num; idx++) {
+ for (idx = 0; idx < count; idx++) {
serdes_type = serdes_map[idx].serdes_type;
if ((serdes_type != PEX0) &&
((serdes_map[idx].serdes_mode == PEX_ROOT_COMPLEX_X4) ||
@@ -81,7 +80,7 @@ int hws_pex_config(struct serdes_map *serdes_map)
next_busno = 0;
mdelay(150);
- for (idx = 0; idx < max_lane_num; idx++) {
+ for (idx = 0; idx < count; idx++) {
serdes_type = serdes_map[idx].serdes_type;
DEBUG_INIT_FULL_S(" serdes_type=0x");
DEBUG_INIT_FULL_D(serdes_type, 8);
@@ -191,7 +190,7 @@ int hws_pex_config(struct serdes_map *serdes_map)
/* Update pex DEVICE ID */
ctrl_mode = sys_env_model_get();
- for (idx = 0; idx < max_lane_num; idx++) {
+ for (idx = 0; idx < count; idx++) {
serdes_type = serdes_map[idx].serdes_type;
/* configuration for PEX only */
if ((serdes_type != PEX0) && (serdes_type != PEX1) &&
diff --git a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h
index df395bf..5f7e2c7 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h
+++ b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h
@@ -78,7 +78,7 @@
#define PEX_STATUS_AND_COMMAND 0x004
#define PXSAC_MABORT BIT(29) /* Recieved Master Abort */
-int hws_pex_config(struct serdes_map *serdes_map);
+int hws_pex_config(const struct serdes_map *serdes_map, u8 count);
int pex_local_bus_num_set(u32 pex_if, u32 bus_num);
int pex_local_dev_num_set(u32 pex_if, u32 dev_num);
u32 pex_config_read(u32 pex_if, u32 bus, u32 dev, u32 func, u32 reg_off);
diff --git a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec-38x.c b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec-38x.c
index 5ff8567..104e7e8 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec-38x.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec-38x.c
@@ -5,7 +5,6 @@
*/
#include <common.h>
-#include <i2c.h>
#include <spl.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
diff --git a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c
index 23af769..7d67199 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.c
@@ -5,14 +5,12 @@
*/
#include <common.h>
-#include <i2c.h>
#include <spl.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
#include "high_speed_env_spec.h"
-#include "high_speed_topology_spec.h"
#include "sys_env_lib.h"
#include "ctrl_pex.h"
@@ -22,11 +20,6 @@
#error "No device is defined"
#endif
-/*
- * The board topology map, initialized in the beginning of
- * ctrl_high_speed_serdes_phy_config
- */
-struct serdes_map serdes_configuration_map[MAX_SERDES_LANES];
/*
* serdes_seq_db - holds all serdes sequences, their size and the
@@ -1364,28 +1357,8 @@ enum serdes_seq serdes_type_and_speed_to_speed_seq(enum serdes_type serdes_type,
return seq_id;
}
-/*
- * This is the weak default function for the Marvell evaluation or
- * development boarrds. Like the DB-88F6820-GP and others.
- * Custom boards should define this function in their board
- * code (board directory). And overwrite this default function
- * with this custom specific code.
- */
-__weak int hws_board_topology_load(struct serdes_map *serdes_map_array)
-{
- u32 board_id = mv_board_id_get();
- u32 board_id_index = mv_board_id_index_get(board_id);
-
- DEBUG_INIT_FULL_S("\n### hws_board_topology_load ###\n");
- /* getting board topology according to the board id */
- DEBUG_INIT_FULL_S("Getting board topology according to the board id\n");
-
- CHECK_STATUS(load_topology_func_arr[board_id_index] (serdes_map_array));
-
- return MV_OK;
-}
-
-void print_topology_details(struct serdes_map *serdes_map_array)
+static void print_topology_details(const struct serdes_map *serdes_map,
+ u8 count)
{
u32 lane_num;
@@ -1393,16 +1366,16 @@ void print_topology_details(struct serdes_map *serdes_map_array)
DEBUG_INIT_S(" | Lane # | Speed | Type |\n");
DEBUG_INIT_S(" --------------------------------\n");
- for (lane_num = 0; lane_num < hws_serdes_get_max_lane(); lane_num++) {
- if (serdes_map_array[lane_num].serdes_type == DEFAULT_SERDES)
+ for (lane_num = 0; lane_num < count; lane_num++) {
+ if (serdes_map[lane_num].serdes_type == DEFAULT_SERDES)
continue;
DEBUG_INIT_S(" | ");
DEBUG_INIT_D(hws_get_physical_serdes_num(lane_num), 1);
DEBUG_INIT_S(" | ");
- DEBUG_INIT_D(serdes_map_array[lane_num].serdes_speed, 2);
+ DEBUG_INIT_D(serdes_map[lane_num].serdes_speed, 2);
DEBUG_INIT_S(" | ");
DEBUG_INIT_S((char *)
- serdes_type_to_string[serdes_map_array[lane_num].
+ serdes_type_to_string[serdes_map[lane_num].
serdes_type]);
DEBUG_INIT_S("\t|\n");
}
@@ -1436,6 +1409,9 @@ int hws_pre_serdes_init_config(void)
int serdes_phy_config(void)
{
+ struct serdes_map *serdes_map;
+ u8 serdes_count;
+
DEBUG_INIT_FULL_S("\n### ctrl_high_speed_serdes_phy_config ###\n");
DEBUG_INIT_S("High speed PHY - Version: ");
@@ -1448,23 +1424,24 @@ int serdes_phy_config(void)
return MV_FAIL;
}
- /* I2C init */
- i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-
/* Board topology load */
DEBUG_INIT_FULL_S
("ctrl_high_speed_serdes_phy_config: Loading board topology..\n");
- CHECK_STATUS(hws_board_topology_load(serdes_configuration_map));
+ CHECK_STATUS(hws_board_topology_load(&serdes_map, &serdes_count));
+ if (serdes_count > hws_serdes_get_max_lane()) {
+ printf("Error: too many serdes lanes specified by board\n");
+ return MV_FAIL;
+ }
/* print topology */
- print_topology_details(serdes_configuration_map);
+ print_topology_details(serdes_map, serdes_count);
CHECK_STATUS(hws_pre_serdes_init_config());
/* Power-Up sequence */
DEBUG_INIT_FULL_S
("ctrl_high_speed_serdes_phy_config: Starting serdes power up sequence\n");
- CHECK_STATUS(hws_power_up_serdes_lanes(serdes_configuration_map));
+ CHECK_STATUS(hws_power_up_serdes_lanes(serdes_map, serdes_count));
DEBUG_INIT_FULL_S
("\n### ctrl_high_speed_serdes_phy_config ended successfully ###\n");
@@ -1488,7 +1465,7 @@ int serdes_polarity_config(u32 serdes_num, int is_rx)
return MV_OK;
}
-int hws_power_up_serdes_lanes(struct serdes_map *serdes_config_map)
+int hws_power_up_serdes_lanes(struct serdes_map *serdes_map, u8 count)
{
u32 serdes_id, serdes_lane_num;
enum ref_clock ref_clock;
@@ -1510,22 +1487,21 @@ int hws_power_up_serdes_lanes(struct serdes_map *serdes_config_map)
/* COMMON PHYS SELECTORS register configuration */
DEBUG_INIT_FULL_S
("hws_power_up_serdes_lanes: Updating COMMON PHYS SELECTORS reg\n");
- CHECK_STATUS(hws_update_serdes_phy_selectors(serdes_configuration_map));
+ CHECK_STATUS(hws_update_serdes_phy_selectors(serdes_map, count));
/* per Serdes Power Up */
- for (serdes_id = 0; serdes_id < hws_serdes_get_max_lane();
- serdes_id++) {
+ for (serdes_id = 0; serdes_id < count; serdes_id++) {
DEBUG_INIT_FULL_S
("calling serdes_power_up_ctrl: serdes lane number ");
DEBUG_INIT_FULL_D_10(serdes_lane_num, 1);
DEBUG_INIT_FULL_S("\n");
serdes_lane_num = hws_get_physical_serdes_num(serdes_id);
- serdes_type = serdes_config_map[serdes_id].serdes_type;
- serdes_speed = serdes_config_map[serdes_id].serdes_speed;
- serdes_mode = serdes_config_map[serdes_id].serdes_mode;
- serdes_rx_polarity_swap = serdes_config_map[serdes_id].swap_rx;
- serdes_tx_polarity_swap = serdes_config_map[serdes_id].swap_tx;
+ serdes_type = serdes_map[serdes_id].serdes_type;
+ serdes_speed = serdes_map[serdes_id].serdes_speed;
+ serdes_mode = serdes_map[serdes_id].serdes_mode;
+ serdes_rx_polarity_swap = serdes_map[serdes_id].swap_rx;
+ serdes_tx_polarity_swap = serdes_map[serdes_id].swap_tx;
/* serdes lane is not in use */
if (serdes_type == DEFAULT_SERDES)
@@ -1560,10 +1536,10 @@ int hws_power_up_serdes_lanes(struct serdes_map *serdes_config_map)
/* Set PEX_TX_CONFIG_SEQ sequence for PEXx4 mode.
After finish the Power_up sequence for all lanes,
the lanes should be released from reset state. */
- CHECK_STATUS(hws_pex_tx_config_seq(serdes_config_map));
+ CHECK_STATUS(hws_pex_tx_config_seq(serdes_map, count));
/* PEX configuration */
- CHECK_STATUS(hws_pex_config(serdes_config_map));
+ CHECK_STATUS(hws_pex_config(serdes_map, count));
}
/* USB2 configuration */
@@ -1931,7 +1907,7 @@ int serdes_power_up_ctrl(u32 serdes_num, int serdes_power_up,
return MV_OK;
}
-int hws_update_serdes_phy_selectors(struct serdes_map *serdes_config_map)
+int hws_update_serdes_phy_selectors(struct serdes_map *serdes_map, u8 count)
{
u32 lane_data, idx, serdes_lane_hw_num, reg_data = 0;
enum serdes_type serdes_type;
@@ -1953,10 +1929,9 @@ int hws_update_serdes_phy_selectors(struct serdes_map *serdes_config_map)
* Updating bits 0-17 in the COMMON PHYS SELECTORS register
* according to the serdes types
*/
- for (idx = 0; idx < hws_serdes_get_max_lane();
- idx++) {
- serdes_type = serdes_config_map[idx].serdes_type;
- serdes_mode = serdes_config_map[idx].serdes_mode;
+ for (idx = 0; idx < count; idx++) {
+ serdes_type = serdes_map[idx].serdes_type;
+ serdes_mode = serdes_map[idx].serdes_mode;
serdes_lane_hw_num = hws_get_physical_serdes_num(idx);
lane_data =
@@ -1968,7 +1943,7 @@ int hws_update_serdes_phy_selectors(struct serdes_map *serdes_config_map)
if (hws_serdes_topology_verify
(serdes_type, idx, serdes_mode) != MV_OK) {
- serdes_config_map[idx].serdes_type =
+ serdes_map[idx].serdes_type =
DEFAULT_SERDES;
printf("%s: SerDes lane #%d is disabled\n", __func__,
serdes_lane_hw_num);
@@ -1994,8 +1969,7 @@ int hws_update_serdes_phy_selectors(struct serdes_map *serdes_config_map)
printf
("%s: Warning: SerDes lane #%d and type %d are not supported together\n",
__func__, serdes_lane_hw_num, serdes_mode);
- serdes_config_map[idx].serdes_type =
- DEFAULT_SERDES;
+ serdes_map[idx].serdes_type = DEFAULT_SERDES;
printf("%s: SerDes lane #%d is disabled\n", __func__,
serdes_lane_hw_num);
continue;
@@ -2017,7 +1991,7 @@ int hws_update_serdes_phy_selectors(struct serdes_map *serdes_config_map)
/* Print topology */
if (updated_topology_print)
- print_topology_details(serdes_config_map);
+ print_topology_details(serdes_map, count);
/*
* Updating the PEXx4 Enable bit in the COMMON PHYS SELECTORS
@@ -2171,7 +2145,7 @@ int hws_ref_clock_set(u32 serdes_num, enum serdes_type serdes_type,
* RETURNS: MV_OK - for success
* MV_BAD_PARAM - for fail
*/
-int hws_pex_tx_config_seq(struct serdes_map *serdes_map)
+int hws_pex_tx_config_seq(const struct serdes_map *serdes_map, u8 count)
{
enum serdes_mode serdes_mode;
u32 serdes_lane_id, serdes_lane_hw_num;
@@ -2185,8 +2159,7 @@ int hws_pex_tx_config_seq(struct serdes_map *serdes_map)
*/
/* relese pipe soft reset for all lanes */
- for (serdes_lane_id = 0; serdes_lane_id < hws_serdes_get_max_lane();
- serdes_lane_id++) {
+ for (serdes_lane_id = 0; serdes_lane_id < count; serdes_lane_id++) {
serdes_mode = serdes_map[serdes_lane_id].serdes_mode;
serdes_lane_hw_num =
hws_get_physical_serdes_num(serdes_lane_id);
@@ -2199,8 +2172,7 @@ int hws_pex_tx_config_seq(struct serdes_map *serdes_map)
}
/* set phy soft reset for all lanes */
- for (serdes_lane_id = 0; serdes_lane_id < hws_serdes_get_max_lane();
- serdes_lane_id++) {
+ for (serdes_lane_id = 0; serdes_lane_id < count; serdes_lane_id++) {
serdes_mode = serdes_map[serdes_lane_id].serdes_mode;
serdes_lane_hw_num =
hws_get_physical_serdes_num(serdes_lane_id);
@@ -2212,8 +2184,7 @@ int hws_pex_tx_config_seq(struct serdes_map *serdes_map)
}
/* set phy soft reset for all lanes */
- for (serdes_lane_id = 0; serdes_lane_id < hws_serdes_get_max_lane();
- serdes_lane_id++) {
+ for (serdes_lane_id = 0; serdes_lane_id < count; serdes_lane_id++) {
serdes_mode = serdes_map[serdes_lane_id].serdes_mode;
serdes_lane_hw_num =
hws_get_physical_serdes_num(serdes_lane_id);
diff --git a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.h b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.h
index 2508721..3513770 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.h
+++ b/arch/arm/mach-mvebu/serdes/a38x/high_speed_env_spec.h
@@ -215,12 +215,12 @@ extern u8 selectors_serdes_rev2_map[LAST_SERDES_TYPE][MAX_SERDES_LANES];
u8 hws_ctrl_serdes_rev_get(void);
int mv_update_serdes_select_phy_mode_seq(void);
-int hws_board_topology_load(struct serdes_map *serdes_map_array);
+int hws_board_topology_load(struct serdes_map **serdes_map, u8 *count);
enum serdes_seq serdes_type_and_speed_to_speed_seq(enum serdes_type serdes_type,
enum serdes_speed baud_rate);
int hws_serdes_seq_init(void);
int hws_serdes_seq_db_init(void);
-int hws_power_up_serdes_lanes(struct serdes_map *serdes_config_map);
+int hws_power_up_serdes_lanes(struct serdes_map *serdes_map, u8 count);
int hws_ctrl_high_speed_serdes_phy_config(void);
int serdes_power_up_ctrl(u32 serdes_num, int serdes_power_up,
enum serdes_type serdes_type,
@@ -237,14 +237,14 @@ int hws_serdes_pex_ref_clock_get(enum serdes_type serdes_type,
enum ref_clock *ref_clock);
int hws_ref_clock_set(u32 serdes_num, enum serdes_type serdes_type,
enum ref_clock ref_clock);
-int hws_update_serdes_phy_selectors(struct serdes_map *serdes_config_map);
+int hws_update_serdes_phy_selectors(struct serdes_map *serdes_map, u8 count);
u32 hws_serdes_get_phy_selector_val(int serdes_num,
enum serdes_type serdes_type);
u32 hws_serdes_get_ref_clock_val(enum serdes_type serdes_type);
u32 hws_serdes_get_max_lane(void);
int hws_get_ext_base_addr(u32 serdes_num, u32 base_addr, u32 unit_base_offset,
u32 *unit_base_reg, u32 *unit_offset);
-int hws_pex_tx_config_seq(struct serdes_map *serdes_map);
+int hws_pex_tx_config_seq(const struct serdes_map *serdes_map, u8 count);
u32 hws_get_physical_serdes_num(u32 serdes_num);
int hws_is_serdes_active(u8 lane_num);
diff --git a/arch/arm/mach-mvebu/serdes/a38x/high_speed_topology_spec-38x.c b/arch/arm/mach-mvebu/serdes/a38x/high_speed_topology_spec-38x.c
deleted file mode 100644
index 5f2c3eb..0000000
--- a/arch/arm/mach-mvebu/serdes/a38x/high_speed_topology_spec-38x.c
+++ /dev/null
@@ -1,1009 +0,0 @@
-/*
- * Copyright (C) Marvell International Ltd. and its affiliates
- *
- * SPDX-License-Identifier: GPL-2.0
- */
-
-#include <common.h>
-#include <i2c.h>
-#include <spl.h>
-#include <asm/io.h>
-#include <asm/arch/cpu.h>
-#include <asm/arch/soc.h>
-
-#include "high_speed_topology_spec.h"
-#include "sys_env_lib.h"
-
-#ifdef CONFIG_CUSTOMER_BOARD_SUPPORT
-/*
- * This is an example implementation for this custom board
- * specific function
- */
-static struct serdes_map custom_board_topology_config[] = {
- /* Customer Board Topology - reference from Marvell DB-GP board */
- {PEX0, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
- {SATA0, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- {SATA1, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- {SATA3, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- {SATA2, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- {USB3_HOST1, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 0, 0}
-};
-
-int hws_board_topology_load(struct serdes_map *serdes_map_array)
-{
- serdes_map_array = custom_board_topology_config;
-}
-#endif
-
-load_topology_func_ptr load_topology_func_arr[] = {
- load_topology_rd, /* RD NAS */
- load_topology_db, /* 6820 DB-BP (A38x) */
- load_topology_rd, /* RD AP */
- load_topology_db_ap, /* DB AP */
- load_topology_db_gp, /* DB GP */
- load_topology_db_381, /* 6821 DB-BP (A381) */
- load_topology_db_amc, /* DB-AMC */
-};
-
-/*****************************************/
-/** Load topology - Marvell 380 DB - BP **/
-/*****************************************/
-/* Configuration options */
-struct serdes_map db_config_default[MAX_SERDES_LANES] = {
- {SATA0, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- {PEX0, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
- {PEX1, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
- {SATA3, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- {USB3_HOST0, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- {USB3_HOST1, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 0, 0}
-};
-
-struct serdes_map db_config_slm1363_c[MAX_SERDES_LANES] = {
- {PEX0, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
- {DEFAULT_SERDES, LAST_SERDES_SPEED, SERDES_DEFAULT_MODE, 0, 0},
- {PEX1, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
- {PEX3, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
- {SATA2, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- {DEFAULT_SERDES, LAST_SERDES_SPEED, SERDES_DEFAULT_MODE, 0, 0},
-};
-
-struct serdes_map db_config_slm1363_d[MAX_SERDES_LANES] = {
- {PEX0, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X4, 0, 0},
- {PEX1, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X4, 0, 0},
- {PEX2, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X4, 0, 0},
- {PEX3, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X4, 0, 0},
- {USB3_HOST0, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- {USB3_HOST1, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 0, 0}
-};
-
-struct serdes_map db_config_slm1363_e[MAX_SERDES_LANES] = {
- {PEX0, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
- {USB3_HOST0, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- {SATA1, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- {USB3_HOST1, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- {DEFAULT_SERDES, LAST_SERDES_SPEED, SERDES_DEFAULT_MODE, 0, 0},
- {SATA2, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0}
-};
-
-struct serdes_map db_config_slm1363_f[MAX_SERDES_LANES] = {
- {PEX0, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
- {DEFAULT_SERDES, LAST_SERDES_SPEED, SERDES_DEFAULT_MODE, 0, 0},
- {PEX1, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
- {PEX3, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
- {SATA2, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- {USB3_HOST1, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 0, 0}
-};
-
-struct serdes_map db_config_slm1364_d[MAX_SERDES_LANES] = {
- {DEFAULT_SERDES, LAST_SERDES_SPEED, SERDES_DEFAULT_MODE, 0, 0},
- {SGMII0, SERDES_SPEED_3_125_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- {DEFAULT_SERDES, LAST_SERDES_SPEED, SERDES_DEFAULT_MODE, 0, 0},
- {DEFAULT_SERDES, LAST_SERDES_SPEED, SERDES_DEFAULT_MODE, 0, 0},
- {SGMII1, SERDES_SPEED_3_125_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- {SGMII2, SERDES_SPEED_3_125_GBPS, SERDES_DEFAULT_MODE, 0, 0}
-};
-
-struct serdes_map db_config_slm1364_e[MAX_SERDES_LANES] = {
- {SGMII0, SERDES_SPEED_3_125_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- {SGMII1, SERDES_SPEED_3_125_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- {DEFAULT_SERDES, LAST_SERDES_SPEED, SERDES_DEFAULT_MODE, 0, 0},
- {SGMII2, SERDES_SPEED_3_125_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- {DEFAULT_SERDES, LAST_SERDES_SPEED, SERDES_DEFAULT_MODE, 0, 0},
- {PEX2, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0}
-};
-
-struct serdes_map db_config_slm1364_f[MAX_SERDES_LANES] = {
- {SGMII0, SERDES_SPEED_3_125_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- {DEFAULT_SERDES, LAST_SERDES_SPEED, SERDES_DEFAULT_MODE, 0, 0},
- {SGMII1, SERDES_SPEED_3_125_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- {SGMII2, SERDES_SPEED_3_125_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- {DEFAULT_SERDES, LAST_SERDES_SPEED, SERDES_DEFAULT_MODE, 0, 0},
- {PEX2, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0}
-};
-
-/*************************************************************************/
-/** The following structs are mapping for DB board 'SatR' configuration **/
-/*************************************************************************/
-struct serdes_map db_satr_config_lane1[SATR_DB_LANE1_MAX_OPTIONS] = {
- /* 0 */ {DEFAULT_SERDES, LAST_SERDES_SPEED, SERDES_DEFAULT_MODE, 0,
- 0},
- /* 1 */ {PEX0, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
- /* 2 */ {SATA0, SERDES_SPEED_3_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
- /* 3 */ {SGMII0, SERDES_SPEED_3_125_GBPS, SERDES_DEFAULT_MODE, 0,
- 0},
- /* 4 */ {SGMII1, SERDES_SPEED_3_125_GBPS, SERDES_DEFAULT_MODE, 0,
- 0},
- /* 5 */ {USB3_HOST0, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 0,
- 0},
- /* 6 */ {QSGMII, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 0, 0}
-};
-
-struct serdes_map db_satr_config_lane2[SATR_DB_LANE2_MAX_OPTIONS] = {
- /* 0 */ {DEFAULT_SERDES, LAST_SERDES_SPEED, SERDES_DEFAULT_MODE, 0,
- 0},
- /* 1 */ {PEX1, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
- /* 2 */ {SATA1, SERDES_SPEED_3_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
- /* 3 */ {SGMII1, SERDES_SPEED_3_125_GBPS, SERDES_DEFAULT_MODE, 0,
- 0}
-};
-
-/*******************************************************/
-/* Configuration options DB ****************************/
-/* mapping from TWSI address data to configuration map */
-/*******************************************************/
-struct serdes_map *topology_config_db[] = {
- db_config_slm1363_c,
- db_config_slm1363_d,
- db_config_slm1363_e,
- db_config_slm1363_f,
- db_config_slm1364_d,
- db_config_slm1364_e,
- db_config_slm1364_f,
- db_config_default
-};
-
-/*************************************/
-/** Load topology - Marvell DB - AP **/
-/*************************************/
-struct serdes_map db_ap_config_default[MAX_SERDES_LANES] = {
- /* 0 */ {PEX0, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
- /* 1 */ {SGMII1, SERDES_SPEED_3_125_GBPS, SERDES_DEFAULT_MODE, 0,
- 0},
- /* 2 */ {PEX1, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
- /* 3 */ {SGMII2, SERDES_SPEED_3_125_GBPS, SERDES_DEFAULT_MODE, 0,
- 0},
- /* 4 */ {USB3_HOST0, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 0,
- 0},
- /* 5 */ {PEX2, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0}
-};
-
-/*************************************/
-/** Load topology - Marvell DB - GP **/
-/*************************************/
-struct serdes_map db_gp_config_default[MAX_SERDES_LANES] = {
- /* 0 */ {PEX0, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
- /* 1 */ {SATA0, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- /* 2 */ {SATA1, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- /* 3 */ {SATA3, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- /* 4 */ {SATA2, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0},
- /* 5 */ {USB3_HOST1, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 0,
- 0}
-};
-
-struct serdes_map db_amc_config_default[MAX_SERDES_LANES] = {
- /* 0 */ {PEX0, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X4, 0, 0},
- /* 1 */ {PEX1, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X4, 0, 0},
- /* 2 */ {PEX2, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X4, 0, 0},
- /* 3 */ {PEX3, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X4, 0, 0},
- /* 4 */ {SGMII1, SERDES_SPEED_3_125_GBPS, SERDES_DEFAULT_MODE, 0,
- 0},
- /* 5 */ {SGMII2, SERDES_SPEED_3_125_GBPS, SERDES_DEFAULT_MODE, 0,
- 0},
-};
-
-/*****************************************/
-/** Load topology - Marvell 381 DB - BP **/
-/*****************************************/
-/* Configuration options */
-struct serdes_map db381_config_default[MAX_SERDES_LANES] = {
- {SATA0, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 1, 1},
- {PEX0, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
- {PEX1, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
- {USB3_HOST1, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 0, 0}
-};
-
-struct serdes_map db_config_slm1427[MAX_SERDES_LANES] = {
- {SATA0, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 1, 1},
- {PEX0, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 1, 1},
- {SATA1, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 1, 1},
- {USB3_HOST1, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 1, 1}
-};
-
-struct serdes_map db_config_slm1426[MAX_SERDES_LANES] = {
- {SATA0, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 1, 1},
- {USB3_HOST0, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 1, 1},
- {SATA1, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 1, 1},
- {SGMII2, SERDES_SPEED_3_125_GBPS, SERDES_DEFAULT_MODE, 1, 1}
-};
-
-/*
- * this array must be aligned with enum topology_config_db381 enum,
- * every update to this array requires update to enum topology_config_db381
- * enum
- */
-struct serdes_map *topology_config_db_381[] = {
- db_config_slm1427,
- db_config_slm1426,
- db381_config_default,
-};
-
-u8 topology_config_db_mode_get(void)
-{
- u8 mode;
-
- DEBUG_INIT_FULL_S("\n### topology_config_db_mode_get ###\n");
-
- /* Default - return DB_CONFIG_DEFAULT */
-
- if (!i2c_read(DB_GET_MODE_SLM1363_ADDR, 0, 1, &mode, 1)) {
- switch (mode & 0xf) {
- case 0xc:
- DEBUG_INIT_S("\nInit DB board SLM 1363 C topology\n");
- return DB_CONFIG_SLM1363_C;
- case 0xd:
- DEBUG_INIT_S("\nInit DB board SLM 1363 D topology\n");
- return DB_CONFIG_SLM1363_D;
- case 0xe:
- DEBUG_INIT_S("\nInit DB board SLM 1363 E topology\n");
- return DB_CONFIG_SLM1363_E;
- case 0xf:
- DEBUG_INIT_S("\nInit DB board SLM 1363 F topology\n");
- return DB_CONFIG_SLM1363_F;
- default: /* not the right module */
- break;
- }
- }
-
- /* SLM1364 Module */
- if (i2c_read(DB_GET_MODE_SLM1364_ADDR, 0, 1, &mode, 1)) {
- DEBUG_INIT_S("\nInit DB board default topology\n");
- return DB_CONFIG_DEFAULT;
- }
-
- switch (mode & 0xf) {
- case 0xd:
- DEBUG_INIT_S("\nInit DB board SLM 1364 D topology\n");
- return DB_CONFIG_SLM1364_D;
- case 0xe:
- DEBUG_INIT_S("\nInit DB board SLM 1364 E topology\n");
- return DB_CONFIG_SLM1364_E;
- case 0xf:
- DEBUG_INIT_S("\nInit DB board SLM 1364 F topology\n");
- return DB_CONFIG_SLM1364_F;
- default: /* Default configuration */
- DEBUG_INIT_S("\nInit DB board default topology\n");
- return DB_CONFIG_DEFAULT;
- }
-}
-
-u8 topology_config_db_381_mode_get(void)
-{
- u8 mode;
-
- DEBUG_INIT_FULL_S("\n### topology_config_db_381_mode_get ###\n");
-
- if (!i2c_read(DB381_GET_MODE_SLM1426_1427_ADDR, 0, 2, &mode, 1)) {
- switch (mode & 0xf) {
- case 0x1:
- DEBUG_INIT_S("\nInit DB-381 board SLM 1427 topology\n");
- return DB_CONFIG_SLM1427;
- case 0x2:
- DEBUG_INIT_S("\nInit DB-381 board SLM 1426 topology\n");
- return DB_CONFIG_SLM1426;
- default: /* not the right module */
- break;
- }
- }
-
- /* in case not detected any supported module, use default topology */
- DEBUG_INIT_S("\nInit DB-381 board default topology\n");
- return DB_381_CONFIG_DEFAULT;
-}
-
-/*
- * Read SatR field 'sgmiispeed' and update lane topology SGMII entries
- * speed setup
- */
-int update_topology_sgmii_speed(struct serdes_map *serdes_map_array)
-{
- u32 serdes_type, lane_num;
- u8 config_val;
-
- /* Update SGMII speed settings by 'sgmiispeed' SatR value */
- for (lane_num = 0; lane_num < hws_serdes_get_max_lane(); lane_num++) {
- serdes_type = serdes_map_array[lane_num].serdes_type;
- /*Read SatR configuration for SGMII speed */
- if ((serdes_type == SGMII0) || (serdes_type == SGMII1) ||
- (serdes_type == SGMII2)) {
- /* Read SatR 'sgmiispeed' value */
- if (i2c_read(EEPROM_I2C_ADDR, 0, 2, &config_val, 1)) {
- printf("%s: TWSI Read of 'sgmiispeed' failed\n",
- __func__);
- return MV_FAIL;
- }
-
- if (0 == (config_val & 0x40)) {
- serdes_map_array[lane_num].serdes_speed =
- SERDES_SPEED_1_25_GBPS;
- } else {
- serdes_map_array[lane_num].serdes_speed =
- SERDES_SPEED_3_125_GBPS;
- }
- }
- }
- return MV_OK;
-}
-
-struct serdes_map default_lane = {
- DEFAULT_SERDES, LAST_SERDES_SPEED, SERDES_DEFAULT_MODE
-};
-int is_custom_topology = 0; /* indicate user of non-default topology */
-
-/*
- * Read SatR fields (dbserdes1/2 , gpserdes1/2/5) and update lane
- * topology accordingly
- */
-int update_topology_satr(struct serdes_map *serdes_map_array)
-{
- u8 config_val, lane_select, i;
- u32 board_id = mv_board_id_get();
-
- switch (board_id) {
- case DB_68XX_ID: /* read 'dbserdes1' & 'dbserdes2' */
- case DB_BP_6821_ID:
- if (i2c_read(EEPROM_I2C_ADDR, 1, 2, &config_val, 1)) {
- printf("%s: TWSI Read of 'dbserdes1/2' failed\n",
- __func__);
- return MV_FAIL;
- }
-
- /* Lane #1 */
- lane_select = (config_val & SATR_DB_LANE1_CFG_MASK) >>
- SATR_DB_LANE1_CFG_OFFSET;
- if (lane_select >= SATR_DB_LANE1_MAX_OPTIONS) {
- printf("\n\%s: Error: invalid value for SatR field 'dbserdes1' (%x)\n",
- __func__, lane_select);
- printf("\t_skipping Topology update (run 'SatR write default')\n");
- return MV_FAIL;
- }
-
- /*
- * If modified default serdes_type for lane#1, update
- * topology and mark it as custom
- */
- if (serdes_map_array[1].serdes_type !=
- db_satr_config_lane1[lane_select].serdes_type) {
- serdes_map_array[1] = db_satr_config_lane1[lane_select];
- is_custom_topology = 1;
- /* DB 381/2 board has inverted SerDes polarity */
- if (board_id == DB_BP_6821_ID)
- serdes_map_array[1].swap_rx =
- serdes_map_array[1].swap_tx = 1;
- }
-
- /* Lane #2 */
- lane_select = (config_val & SATR_DB_LANE2_CFG_MASK) >>
- SATR_DB_LANE2_CFG_OFFSET;
- if (lane_select >= SATR_DB_LANE2_MAX_OPTIONS) {
- printf("\n\%s: Error: invalid value for SatR field 'dbserdes2' (%x)\n",
- __func__, lane_select);
- printf("\t_skipping Topology update (run 'SatR write default')\n");
- return MV_FAIL;
- }
-
- /*
- * If modified default serdes_type for lane@2, update
- * topology and mark it as custom
- */
- if (serdes_map_array[2].serdes_type !=
- db_satr_config_lane2[lane_select].serdes_type) {
- serdes_map_array[2] = db_satr_config_lane2[lane_select];
- is_custom_topology = 1;
- /* DB 381/2 board has inverted SerDes polarity */
- if (board_id == DB_BP_6821_ID)
- serdes_map_array[2].swap_rx =
- serdes_map_array[2].swap_tx = 1;
- }
-
- if (is_custom_topology == 1) {
- /*
- * Check for conflicts with detected lane #1 and
- * lane #2 (Disable conflicted lanes)
- */
- for (i = 0; i < hws_serdes_get_max_lane(); i++) {
- if (i != 1 && serdes_map_array[1].serdes_type ==
- serdes_map_array[i].serdes_type) {
- printf("\t_lane #%d Type conflicts with Lane #1 (Lane #%d disabled)\n",
- i, i);
- serdes_map_array[i] =
- db_satr_config_lane1[0];
- }
-
- if (i != 2 &&
- serdes_map_array[2].serdes_type ==
- serdes_map_array[i].serdes_type) {
- printf("\t_lane #%d Type conflicts with Lane #2 (Lane #%d disabled)\n",
- i, i);
- serdes_map_array[i] =
- db_satr_config_lane1[0];
- }
- }
- }
-
- break; /* case DB_68XX_ID */
- case DB_GP_68XX_ID: /* read 'gpserdes1' & 'gpserdes2' */
- if (i2c_read(EEPROM_I2C_ADDR, 2, 2, &config_val, 1)) {
- printf("%s: TWSI Read of 'gpserdes1/2' failed\n",
- __func__);
- return MV_FAIL;
- }
-
- /*
- * Lane #1:
- * lane_select = 0 --> SATA0,
- * lane_select = 1 --> PCIe0 (mini PCIe)
- */
- lane_select = (config_val & SATR_GP_LANE1_CFG_MASK) >>
- SATR_GP_LANE1_CFG_OFFSET;
- if (lane_select == 1) {
- serdes_map_array[1].serdes_mode = PEX0;
- serdes_map_array[1].serdes_speed = SERDES_SPEED_5_GBPS;
- serdes_map_array[1].serdes_type = PEX_ROOT_COMPLEX_X1;
- /*
- * If lane 1 is set to PCIe0 --> disable PCIe0
- * on lane 0
- */
- serdes_map_array[0] = default_lane;
- /* indicate user of non-default topology */
- is_custom_topology = 1;
- }
- printf("Lane 1 detection: %s\n",
- lane_select ? "PCIe0 (mini PCIe)" : "SATA0");
-
- /*
- * Lane #2:
- * lane_select = 0 --> SATA1,
- * lane_select = 1 --> PCIe1 (mini PCIe)
- */
- lane_select = (config_val & SATR_GP_LANE2_CFG_MASK) >>
- SATR_GP_LANE2_CFG_OFFSET;
- if (lane_select == 1) {
- serdes_map_array[2].serdes_type = PEX1;
- serdes_map_array[2].serdes_speed = SERDES_SPEED_5_GBPS;
- serdes_map_array[2].serdes_mode = PEX_ROOT_COMPLEX_X1;
- /* indicate user of non-default topology */
- is_custom_topology = 1;
- }
- printf("Lane 2 detection: %s\n",
- lane_select ? "PCIe1 (mini PCIe)" : "SATA1");
- break; /* case DB_GP_68XX_ID */
- }
-
- if (is_custom_topology)
- printf("\nDetected custom SerDes topology (to restore default run 'SatR write default')\n\n");
-
- return MV_OK;
-}
-
-/*
- * hws_update_device_toplogy
- * DESCRIPTION: Update the default board topology for specific device Id
- * INPUT:
- * topology_config_ptr - pointer to the Serdes mapping
- * topology_mode - topology mode (index)
- * OUTPUT: None
- * RRETURNS:
- * MV_OK - if updating the board topology success
- * MV_BAD_PARAM - if the input parameter is wrong
- */
-int hws_update_device_toplogy(struct serdes_map *topology_config_ptr,
- enum topology_config_db topology_mode)
-{
- u32 dev_id = sys_env_device_id_get();
- u32 board_id = mv_board_id_get();
-
- switch (topology_mode) {
- case DB_CONFIG_DEFAULT:
- switch (dev_id) {
- case MV_6810:
- /*
- * DB-AP : default for Lane3=SGMII2 -->
- * 6810 supports only 2 SGMII interfaces:
- * lane 3 disabled
- */
- if (board_id == DB_AP_68XX_ID) {
- printf("Device 6810 supports only 2 SGMII interfaces: SGMII-2 @ lane3 disabled\n");
- topology_config_ptr[3] = default_lane;
- }
-
- /*
- * 6810 has only 4 SerDes and the forth one is
- * Serdes number 5 (i.e. Serdes 4 is not connected),
- * therefore we need to copy SerDes 5 configuration
- * to SerDes 4
- */
- printf("Device 6810 does not supports SerDes Lane #4: replaced topology entry with lane #5\n");
- topology_config_ptr[4] = topology_config_ptr[5];
-
- /*
- * No break between cases since the 1st
- * 6820 limitation apply on 6810
- */
- case MV_6820:
- /*
- * DB-GP & DB-BP: default for Lane3=SATA3 -->
- * 6810/20 supports only 2 SATA interfaces:
- * lane 3 disabled
- */
- if ((board_id == DB_68XX_ID) ||
- (board_id == DB_GP_68XX_ID)) {
- printf("Device 6810/20 supports only 2 SATA interfaces: SATA Port 3 @ lane3 disabled\n");
- topology_config_ptr[3] = default_lane;
- }
- /*
- * DB-GP on 6820 only: default for Lane4=SATA2
- * --> 6820 supports only 2 SATA interfaces:
- * lane 3 disabled
- */
- if (board_id == DB_GP_68XX_ID && dev_id == MV_6820) {
- printf("Device 6820 supports only 2 SATA interfaces: SATA Port 2 @ lane4 disabled\n");
- topology_config_ptr[4] = default_lane;
- }
- break;
- default:
- break;
- }
- break;
-
- default:
- printf("sys_env_update_device_toplogy: selected topology is not supported by this routine\n");
- break;
- }
-
- return MV_OK;
-}
-
-int load_topology_db_381(struct serdes_map *serdes_map_array)
-{
- u32 lane_num;
- u8 topology_mode;
- struct serdes_map *topology_config_ptr;
- u8 twsi_data;
- u8 usb3_host0_or_device = 0, usb3_host1_or_device = 0;
-
- printf("\nInitialize DB-88F6821-BP board topology\n");
-
- /* Getting the relevant topology mode (index) */
- topology_mode = topology_config_db_381_mode_get();
- topology_config_ptr = topology_config_db_381[topology_mode];
-
- /* Read USB3.0 mode: HOST/DEVICE */
- if (load_topology_usb_mode_get(&twsi_data) == MV_OK) {
- usb3_host0_or_device = (twsi_data & 0x1);
- /* Only one USB3 device is enabled */
- if (usb3_host0_or_device == 0)
- usb3_host1_or_device = ((twsi_data >> 1) & 0x1);
- }
-
- /* Updating the topology map */
- for (lane_num = 0; lane_num < hws_serdes_get_max_lane(); lane_num++) {
- serdes_map_array[lane_num].serdes_mode =
- topology_config_ptr[lane_num].serdes_mode;
- serdes_map_array[lane_num].serdes_speed =
- topology_config_ptr[lane_num].serdes_speed;
- serdes_map_array[lane_num].serdes_type =
- topology_config_ptr[lane_num].serdes_type;
- serdes_map_array[lane_num].swap_rx =
- topology_config_ptr[lane_num].swap_rx;
- serdes_map_array[lane_num].swap_tx =
- topology_config_ptr[lane_num].swap_tx;
-
- /* Update USB3 device if needed */
- if (usb3_host0_or_device == 1 &&
- serdes_map_array[lane_num].serdes_type == USB3_HOST0)
- serdes_map_array[lane_num].serdes_type = USB3_DEVICE;
-
- if (usb3_host1_or_device == 1 &&
- serdes_map_array[lane_num].serdes_type == USB3_HOST1)
- serdes_map_array[lane_num].serdes_type = USB3_DEVICE;
- }
-
- /* If not detected any SerDes Site module, read 'SatR' lane setup */
- if (topology_mode == DB_381_CONFIG_DEFAULT)
- update_topology_satr(serdes_map_array);
-
- /* update 'sgmiispeed' settings */
- update_topology_sgmii_speed(serdes_map_array);
-
- return MV_OK;
-}
-
-int load_topology_db(struct serdes_map *serdes_map_array)
-{
- u32 lane_num;
- u8 topology_mode;
- struct serdes_map *topology_config_ptr;
- u8 twsi_data;
- u8 usb3_host0_or_device = 0, usb3_host1_or_device = 0;
-
- printf("\nInitialize DB-88F6820-BP board topology\n");
-
- /* Getting the relevant topology mode (index) */
- topology_mode = topology_config_db_mode_get();
-
- if (topology_mode == DB_NO_TOPOLOGY)
- topology_mode = DB_CONFIG_DEFAULT;
-
- topology_config_ptr = topology_config_db[topology_mode];
-
- /* Update the default board topology device flavours */
- CHECK_STATUS(hws_update_device_toplogy
- (topology_config_ptr, topology_mode));
-
- /* Read USB3.0 mode: HOST/DEVICE */
- if (load_topology_usb_mode_get(&twsi_data) == MV_OK) {
- usb3_host0_or_device = (twsi_data & 0x1);
- /* Only one USB3 device is enabled */
- if (usb3_host0_or_device == 0)
- usb3_host1_or_device = ((twsi_data >> 1) & 0x1);
- }
-
- /* Updating the topology map */
- for (lane_num = 0; lane_num < hws_serdes_get_max_lane(); lane_num++) {
- serdes_map_array[lane_num].serdes_mode =
- topology_config_ptr[lane_num].serdes_mode;
- serdes_map_array[lane_num].serdes_speed =
- topology_config_ptr[lane_num].serdes_speed;
- serdes_map_array[lane_num].serdes_type =
- topology_config_ptr[lane_num].serdes_type;
- serdes_map_array[lane_num].swap_rx =
- topology_config_ptr[lane_num].swap_rx;
- serdes_map_array[lane_num].swap_tx =
- topology_config_ptr[lane_num].swap_tx;
-
- /*
- * Update USB3 device if needed - relevant for
- * lane 3,4,5 only
- */
- if (lane_num >= 3) {
- if ((serdes_map_array[lane_num].serdes_type ==
- USB3_HOST0) && (usb3_host0_or_device == 1))
- serdes_map_array[lane_num].serdes_type =
- USB3_DEVICE;
-
- if ((serdes_map_array[lane_num].serdes_type ==
- USB3_HOST1) && (usb3_host1_or_device == 1))
- serdes_map_array[lane_num].serdes_type =
- USB3_DEVICE;
- }
- }
-
- /* If not detected any SerDes Site module, read 'SatR' lane setup */
- if (topology_mode == DB_CONFIG_DEFAULT)
- update_topology_satr(serdes_map_array);
-
- /* update 'sgmiispeed' settings */
- update_topology_sgmii_speed(serdes_map_array);
-
- return MV_OK;
-}
-
-int load_topology_db_ap(struct serdes_map *serdes_map_array)
-{
- u32 lane_num;
- struct serdes_map *topology_config_ptr;
-
- DEBUG_INIT_FULL_S("\n### load_topology_db_ap ###\n");
-
- printf("\nInitialize DB-AP board topology\n");
- topology_config_ptr = db_ap_config_default;
-
- /* Update the default board topology device flavours */
- CHECK_STATUS(hws_update_device_toplogy
- (topology_config_ptr, DB_CONFIG_DEFAULT));
-
- /* Updating the topology map */
- for (lane_num = 0; lane_num < hws_serdes_get_max_lane(); lane_num++) {
- serdes_map_array[lane_num].serdes_mode =
- topology_config_ptr[lane_num].serdes_mode;
- serdes_map_array[lane_num].serdes_speed =
- topology_config_ptr[lane_num].serdes_speed;
- serdes_map_array[lane_num].serdes_type =
- topology_config_ptr[lane_num].serdes_type;
- serdes_map_array[lane_num].swap_rx =
- topology_config_ptr[lane_num].swap_rx;
- serdes_map_array[lane_num].swap_tx =
- topology_config_ptr[lane_num].swap_tx;
- }
-
- update_topology_sgmii_speed(serdes_map_array);
-
- return MV_OK;
-}
-
-int load_topology_db_gp(struct serdes_map *serdes_map_array)
-{
- u32 lane_num;
- struct serdes_map *topology_config_ptr;
- int is_sgmii = 0;
-
- DEBUG_INIT_FULL_S("\n### load_topology_db_gp ###\n");
-
- topology_config_ptr = db_gp_config_default;
-
- printf("\nInitialize DB-GP board topology\n");
-
- /* check S@R: if lane 5 is USB3 or SGMII */
- if (load_topology_rd_sgmii_usb(&is_sgmii) != MV_OK)
- printf("%s: TWSI Read failed - Loading Default Topology\n",
- __func__);
- else {
- topology_config_ptr[5].serdes_type =
- is_sgmii ? SGMII2 : USB3_HOST1;
- topology_config_ptr[5].serdes_speed = is_sgmii ?
- SERDES_SPEED_3_125_GBPS : SERDES_SPEED_5_GBPS;
- topology_config_ptr[5].serdes_mode = SERDES_DEFAULT_MODE;
- }
-
- /* Update the default board topology device flavours */
- CHECK_STATUS(hws_update_device_toplogy
- (topology_config_ptr, DB_CONFIG_DEFAULT));
-
- /* Updating the topology map */
- for (lane_num = 0; lane_num < hws_serdes_get_max_lane(); lane_num++) {
- serdes_map_array[lane_num].serdes_mode =
- topology_config_ptr[lane_num].serdes_mode;
- serdes_map_array[lane_num].serdes_speed =
- topology_config_ptr[lane_num].serdes_speed;
- serdes_map_array[lane_num].serdes_type =
- topology_config_ptr[lane_num].serdes_type;
- serdes_map_array[lane_num].swap_rx =
- topology_config_ptr[lane_num].swap_rx;
- serdes_map_array[lane_num].swap_tx =
- topology_config_ptr[lane_num].swap_tx;
- }
-
- /*
- * Update 'gpserdes1/2/3' lane configuration , and 'sgmiispeed'
- * for SGMII lanes
- */
- update_topology_satr(serdes_map_array);
- update_topology_sgmii_speed(serdes_map_array);
-
- return MV_OK;
-}
-
-int load_topology_db_amc(struct serdes_map *serdes_map_array)
-{
- u32 lane_num;
- struct serdes_map *topology_config_ptr;
-
- DEBUG_INIT_FULL_S("\n### load_topology_db_amc ###\n");
-
- printf("\nInitialize DB-AMC board topology\n");
- topology_config_ptr = db_amc_config_default;
-
- /* Update the default board topology device flavours */
- CHECK_STATUS(hws_update_device_toplogy
- (topology_config_ptr, DB_CONFIG_DEFAULT));
-
- /* Updating the topology map */
- for (lane_num = 0; lane_num < hws_serdes_get_max_lane(); lane_num++) {
- serdes_map_array[lane_num].serdes_mode =
- topology_config_ptr[lane_num].serdes_mode;
- serdes_map_array[lane_num].serdes_speed =
- topology_config_ptr[lane_num].serdes_speed;
- serdes_map_array[lane_num].serdes_type =
- topology_config_ptr[lane_num].serdes_type;
- serdes_map_array[lane_num].swap_rx =
- topology_config_ptr[lane_num].swap_rx;
- serdes_map_array[lane_num].swap_tx =
- topology_config_ptr[lane_num].swap_tx;
- }
-
- update_topology_sgmii_speed(serdes_map_array);
-
- return MV_OK;
-}
-
-int load_topology_rd(struct serdes_map *serdes_map_array)
-{
- u8 mode;
-
- DEBUG_INIT_FULL_S("\n### load_topology_rd ###\n");
-
- DEBUG_INIT_S("\nInit RD board ");
-
- /* Reading mode */
- DEBUG_INIT_FULL_S("load_topology_rd: getting mode\n");
- if (i2c_read(EEPROM_I2C_ADDR, 0, 2, &mode, 1)) {
- DEBUG_INIT_S("load_topology_rd: TWSI Read failed\n");
- return MV_FAIL;
- }
-
- /* Updating the topology map */
- DEBUG_INIT_FULL_S("load_topology_rd: Loading board topology details\n");
-
- /* RD mode: 0 = NAS, 1 = AP */
- if (((mode >> 1) & 0x1) == 0) {
- CHECK_STATUS(load_topology_rd_nas(serdes_map_array));
- } else {
- CHECK_STATUS(load_topology_rd_ap(serdes_map_array));
- }
-
- update_topology_sgmii_speed(serdes_map_array);
-
- return MV_OK;
-}
-
-int load_topology_rd_nas(struct serdes_map *serdes_map_array)
-{
- int is_sgmii = 0;
- u32 i;
-
- DEBUG_INIT_S("\nInit RD NAS topology ");
-
- /* check if lane 4 is USB3 or SGMII */
- if (load_topology_rd_sgmii_usb(&is_sgmii) != MV_OK) {
- DEBUG_INIT_S("load_topology_rd NAS: TWSI Read failed\n");
- return MV_FAIL;
- }
-
- /* Lane 0 */
- serdes_map_array[0].serdes_type = PEX0;
- serdes_map_array[0].serdes_speed = SERDES_SPEED_5_GBPS;
- serdes_map_array[0].serdes_mode = PEX_ROOT_COMPLEX_X1;
-
- /* Lane 1 */
- serdes_map_array[1].serdes_type = SATA0;
- serdes_map_array[1].serdes_speed = SERDES_SPEED_3_GBPS;
- serdes_map_array[1].serdes_mode = SERDES_DEFAULT_MODE;
-
- /* Lane 2 */
- serdes_map_array[2].serdes_type = SATA1;
- serdes_map_array[2].serdes_speed = SERDES_SPEED_3_GBPS;
- serdes_map_array[2].serdes_mode = SERDES_DEFAULT_MODE;
-
- /* Lane 3 */
- serdes_map_array[3].serdes_type = SATA3;
- serdes_map_array[3].serdes_speed = SERDES_SPEED_3_GBPS;
- serdes_map_array[3].serdes_mode = SERDES_DEFAULT_MODE;
-
- /* Lane 4 */
- if (is_sgmii == 1) {
- DEBUG_INIT_S("Serdes Lane 4 is SGMII\n");
- serdes_map_array[4].serdes_type = SGMII1;
- serdes_map_array[4].serdes_speed = SERDES_SPEED_3_125_GBPS;
- serdes_map_array[4].serdes_mode = SERDES_DEFAULT_MODE;
- } else {
- DEBUG_INIT_S("Serdes Lane 4 is USB3\n");
- serdes_map_array[4].serdes_type = USB3_HOST0;
- serdes_map_array[4].serdes_speed = SERDES_SPEED_5_GBPS;
- serdes_map_array[4].serdes_mode = SERDES_DEFAULT_MODE;
- }
-
- /* Lane 5 */
- serdes_map_array[5].serdes_type = SATA2;
- serdes_map_array[5].serdes_speed = SERDES_SPEED_3_GBPS;
- serdes_map_array[5].serdes_mode = SERDES_DEFAULT_MODE;
-
- /* init swap configuration */
- for (i = 0; i <= 5; i++) {
- serdes_map_array[i].swap_rx = 0;
- serdes_map_array[i].swap_tx = 0;
- }
-
- return MV_OK;
-}
-
-int load_topology_rd_ap(struct serdes_map *serdes_map_array)
-{
- int is_sgmii = 0;
- u32 i;
-
- DEBUG_INIT_S("\nInit RD AP topology ");
-
- /* check if lane 4 is USB3 or SGMII */
- if (load_topology_rd_sgmii_usb(&is_sgmii) != MV_OK) {
- DEBUG_INIT_S("load_topology_rd AP: TWSI Read failed\n");
- return MV_FAIL;
- }
-
- /* Lane 0 */
- serdes_map_array[0].serdes_type = DEFAULT_SERDES;
- serdes_map_array[0].serdes_speed = LAST_SERDES_SPEED;
- serdes_map_array[0].serdes_mode = SERDES_DEFAULT_MODE;
-
- /* Lane 1 */
- serdes_map_array[1].serdes_type = PEX0;
- serdes_map_array[1].serdes_speed = SERDES_SPEED_5_GBPS;
- serdes_map_array[1].serdes_mode = PEX_ROOT_COMPLEX_X1;
-
- /* Lane 2 */
- serdes_map_array[2].serdes_type = PEX1;
- serdes_map_array[2].serdes_speed = SERDES_SPEED_5_GBPS;
- serdes_map_array[2].serdes_mode = PEX_ROOT_COMPLEX_X1;
-
- /* Lane 3 */
- serdes_map_array[3].serdes_type = SATA3;
- serdes_map_array[3].serdes_speed = SERDES_SPEED_3_GBPS;
- serdes_map_array[3].serdes_mode = SERDES_DEFAULT_MODE;
-
- /* Lane 4 */
- if (is_sgmii == 1) {
- DEBUG_INIT_S("Serdes Lane 4 is SGMII\n");
- serdes_map_array[4].serdes_type = SGMII1;
- serdes_map_array[4].serdes_speed = SERDES_SPEED_3_125_GBPS;
- serdes_map_array[4].serdes_mode = SERDES_DEFAULT_MODE;
- } else {
- DEBUG_INIT_S("Serdes Lane 4 is USB3\n");
- serdes_map_array[4].serdes_type = USB3_HOST0;
- serdes_map_array[4].serdes_speed = SERDES_SPEED_5_GBPS;
- serdes_map_array[4].serdes_mode = SERDES_DEFAULT_MODE;
- }
-
- /* Lane 5 */
- serdes_map_array[5].serdes_type = SATA2;
- serdes_map_array[5].serdes_speed = SERDES_SPEED_3_GBPS;
- serdes_map_array[5].serdes_mode = SERDES_DEFAULT_MODE;
-
- /* init swap configuration */
- for (i = 0; i <= 5; i++) {
- serdes_map_array[i].swap_rx = 0;
- serdes_map_array[i].swap_tx = 0;
- }
-
- return MV_OK;
-}
-
-int load_topology_rd_sgmii_usb(int *is_sgmii)
-{
- u8 mode;
-
- /*
- * DB-GP board: Device 6810 supports only 2 GbE ports:
- * SGMII2 not supported (USE USB3 Host instead)
- */
- if (sys_env_device_id_get() == MV_6810) {
- printf("Device 6810 supports only 2 GbE ports: SGMII-2 @ lane5 disabled (setting USB3.0 H1 instead)\n");
- *is_sgmii = 0;
- return MV_OK;
- }
-
- if (!i2c_read(RD_GET_MODE_ADDR, 1, 2, &mode, 1)) {
- *is_sgmii = ((mode >> 2) & 0x1);
- } else {
- /* else use the default - USB3 */
- *is_sgmii = 0;
- }
-
- if (*is_sgmii)
- is_custom_topology = 1;
-
- printf("Lane 5 detection: %s\n",
- *is_sgmii ? "SGMII2" : "USB3.0 Host Port 1");
-
- return MV_OK;
-}
-
-/*
- * 'usb3port0'/'usb3port1' fields are located in EEPROM,
- * at 3rd byte(offset=2), bit 0:1 (respectively)
- */
-int load_topology_usb_mode_get(u8 *twsi_data)
-{
- if (!i2c_read(EEPROM_I2C_ADDR, 2, 2, twsi_data, 1))
- return MV_OK;
-
- return MV_ERROR;
-}
diff --git a/arch/arm/mach-mvebu/serdes/a38x/high_speed_topology_spec.h b/arch/arm/mach-mvebu/serdes/a38x/high_speed_topology_spec.h
deleted file mode 100644
index 3cfb1c7..0000000
--- a/arch/arm/mach-mvebu/serdes/a38x/high_speed_topology_spec.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (C) Marvell International Ltd. and its affiliates
- *
- * SPDX-License-Identifier: GPL-2.0
- */
-
-#ifndef _HIGHSPEED_TOPOLOGY_SPEC_H
-#define _HIGHSPEED_TOPOLOGY_SPEC_H
-
-#include "high_speed_env_spec.h"
-
-/* Topology map options for the DB_A38X_BP board */
-enum topology_config_db {
- DB_CONFIG_SLM1363_C,
- DB_CONFIG_SLM1363_D,
- DB_CONFIG_SLM1363_E,
- DB_CONFIG_SLM1363_F,
- DB_CONFIG_SLM1364_D,
- DB_CONFIG_SLM1364_E,
- DB_CONFIG_SLM1364_F,
- DB_CONFIG_DEFAULT,
- DB_NO_TOPOLOGY
-};
-
-/*
- * this enum must be aligned with topology_config_db_381 array,
- * every update to this enum requires update to topology_config_db_381
- * array
- */
-enum topology_config_db381 {
- DB_CONFIG_SLM1427, /* enum for db_config_slm1427 */
- DB_CONFIG_SLM1426, /* enum for db_config_slm1426 */
- DB_381_CONFIG_DEFAULT,
- DB_381_NO_TOPOLOGY
-};
-
-/* A generic function pointer for loading the board topology map */
-typedef int (*load_topology_func_ptr)(struct serdes_map *serdes_map_array);
-
-extern load_topology_func_ptr load_topology_func_arr[];
-
-/*
- * topology_config_db_mode_get -
- *
- * DESCRIPTION: Gets the relevant topology mode (index).
- * for load_topology_db use only.
- * INPUT: None.
- * OUTPUT: None.
- * RETURNS: the topology mode
- */
-u8 topology_config_db_mode_get(void);
-
-/*
- * load_topology_xxx -
- *
- * DESCRIPTION: Loads the board topology for the XXX board
- * INPUT: serdes_map_array - The struct that will contain
- * the board topology map
- * OUTPUT: The board topology map.
- * RETURNS: MV_OK for success
- * MV_FAIL for failure (a wrong topology mode was read
- * from the board)
- */
-
-/* load_topology_db - Loads the board topology for DB Board */
-int load_topology_db(struct serdes_map *serdes_map_array);
-
-/* load_topology_rd - Loads the board topology for RD Board */
-int load_topology_rd(struct serdes_map *serdes_map_array);
-
-/* load_topology_rd_nas - Loads the board topology for RD NAS Board */
-int load_topology_rd_nas(struct serdes_map *serdes_map_array);
-
-/* load_topology_rd_ap - Loads the board topology for RD Ap Board */
-int load_topology_rd_ap(struct serdes_map *serdes_map_array);
-
-/* load_topology_db_ap - Loads the board topology for DB-AP Board */
-int load_topology_db_ap(struct serdes_map *serdes_map_array);
-
-/* load_topology_db_gp - Loads the board topology for DB GP Board */
-int load_topology_db_gp(struct serdes_map *serdes_map_array);
-
-/* load_topology_db_381 - Loads the board topology for 381 DB-BP Board */
-int load_topology_db_381(struct serdes_map *serdes_map_array);
-
-/* load_topology_db_amc - Loads the board topology for DB-AMC Board */
-int load_topology_db_amc(struct serdes_map *serdes_map_array);
-
-/*
- * hws_update_device_toplogy
- * DESCRIPTION: Update the default board topology for specific device Id
- * INPUT:
- * topology_config_ptr - pointer to the Serdes mapping
- * topology_mode - topology mode (index)
- * OUTPUT: None
- * RRETURNS:
- * MV_OK - if updating the board topology success
- * MV_BAD_PARAM - if the input parameter is wrong
- */
-int hws_update_device_toplogy(struct serdes_map *topology_config_ptr,
- enum topology_config_db topology_mode);
-
-/*
- * load_topology_rd_sgmii_usb -
- *
- * DESCRIPTION: For RD board check if lane 4 is USB3 or SGMII
- * INPUT: None
- * OUTPUT: is_sgmii - return 1 if lane 4 is SGMII
- * return 0 if lane 4 is USB.
- * RETURNS: MV_OK for success
- */
-int load_topology_rd_sgmii_usb(int *is_sgmii);
-
-/*
- * load_topology_usb_mode_get -
- *
- * DESCRIPTION: For DB board check if USB3.0 mode
- * INPUT: None
- * OUTPUT: twsi_data - return data read from S@R via I2C
- * RETURNS: MV_OK for success
- */
-int load_topology_usb_mode_get(u8 *twsi_data);
-
-#endif /* _HIGHSPEED_TOPOLOGY_SPEC_H */
diff --git a/arch/arm/mach-mvebu/serdes/a38x/seq_exec.c b/arch/arm/mach-mvebu/serdes/a38x/seq_exec.c
index ee2305b..905b907 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/seq_exec.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/seq_exec.c
@@ -5,7 +5,6 @@
*/
#include <common.h>
-#include <i2c.h>
#include <spl.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
diff --git a/arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c b/arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c
index efd3873..49d704a 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c
@@ -5,7 +5,6 @@
*/
#include <common.h>
-#include <i2c.h>
#include <spl.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
@@ -236,153 +235,3 @@ u32 sys_env_device_id_get(void)
return g_dev_id;
}
-
-#ifdef MV_DDR_TOPOLOGY_UPDATE_FROM_TWSI
-/*
-* sys_env_get_topology_update_info
-* DESCRIPTION: Read TWSI fields to update DDR topology structure
-* INPUT: None
-* OUTPUT: None, 0 means no topology update
-* RETURN:
-* Bit mask of changes topology features
-*/
-#ifdef CONFIG_ARMADA_39X
-u32 sys_env_get_topology_update_info(
- struct topology_update_info *tui)
-{
- /* Set 16/32 bit configuration*/
- tui->update_width = 1;
- tui->width = TOPOLOGY_UPDATE_WIDTH_32BIT;
-
-#ifdef CONFIG_DDR3
- if (1 == sys_env_config_get(MV_CONFIG_DDR_BUSWIDTH)) {
- /* 16bit */
- tui->width = TOPOLOGY_UPDATE_WIDTH_16BIT;
- } else {
- /* 32bit */
- tui->width = TOPOLOGY_UPDATE_WIDTH_32BIT;
- }
-#endif
-
- /* Set ECC/no ECC bit configuration */
- tui->update_ecc = 1;
- if (0 == sys_env_config_get(MV_CONFIG_DDR_ECC_EN)) {
- /* NO ECC */
- tui->ecc = TOPOLOGY_UPDATE_ECC_OFF;
- } else {
- /* ECC */
- tui->ecc = TOPOLOGY_UPDATE_ECC_ON;
- }
-
- tui->update_ecc_pup3_mode = 1;
- tui->ecc_pup_mode_offset = TOPOLOGY_UPDATE_ECC_OFFSET_PUP4;
-
- return MV_OK;
-}
-#else /*CONFIG_ARMADA_38X*/
-u32 sys_env_get_topology_update_info(
- struct topology_update_info *tui)
-{
- u8 config_val;
- u8 ecc_mode[A38X_MV_MAX_MARVELL_BOARD_ID -
- A38X_MARVELL_BOARD_ID_BASE][5] = TOPOLOGY_UPDATE;
- u8 board_id = mv_board_id_get();
- int ret;
-
- board_id = mv_board_id_index_get(board_id);
- ret = i2c_read(EEPROM_I2C_ADDR, 0, 2, &config_val, 1);
- if (ret) {
- DEBUG_INIT_S("sys_env_get_topology_update_info: TWSI Read failed\n");
- return 0;
- }
-
- /* Set 16/32 bit configuration */
- if ((0 == (config_val & DDR_SATR_CONFIG_MASK_WIDTH)) ||
- (ecc_mode[board_id][TOPOLOGY_UPDATE_32BIT] == 0)) {
- /* 16bit by SatR of 32bit mode not supported for the board */
- if ((ecc_mode[board_id][TOPOLOGY_UPDATE_16BIT] != 0)) {
- tui->update_width = 1;
- tui->width = TOPOLOGY_UPDATE_WIDTH_16BIT;
- }
- } else {
- /* 32bit */
- if ((ecc_mode[board_id][TOPOLOGY_UPDATE_32BIT] != 0)) {
- tui->update_width = 1;
- tui->width = TOPOLOGY_UPDATE_WIDTH_32BIT;
- }
- }
-
- /* Set ECC/no ECC bit configuration */
- if (0 == (config_val & DDR_SATR_CONFIG_MASK_ECC)) {
- /* NO ECC */
- tui->update_ecc = 1;
- tui->ecc = TOPOLOGY_UPDATE_ECC_OFF;
- } else {
- /* ECC */
- if ((ecc_mode[board_id][TOPOLOGY_UPDATE_32BIT_ECC] != 0) ||
- (ecc_mode[board_id][TOPOLOGY_UPDATE_16BIT_ECC] != 0) ||
- (ecc_mode[board_id][TOPOLOGY_UPDATE_16BIT_ECC_PUP3] != 0)) {
- tui->update_ecc = 1;
- tui->ecc = TOPOLOGY_UPDATE_ECC_ON;
- }
- }
-
- /* Set ECC pup bit configuration */
- if (0 == (config_val & DDR_SATR_CONFIG_MASK_ECC_PUP)) {
- /* PUP3 */
- /*
- * Check if PUP3 configuration allowed, if not -
- * force Pup4 with warning message
- */
- if ((ecc_mode[board_id][TOPOLOGY_UPDATE_16BIT_ECC_PUP3] != 0)) {
- if (tui->width == TOPOLOGY_UPDATE_WIDTH_16BIT) {
- tui->update_ecc_pup3_mode = 1;
- tui->ecc_pup_mode_offset =
- TOPOLOGY_UPDATE_ECC_OFFSET_PUP3;
- } else {
- if ((ecc_mode[board_id][TOPOLOGY_UPDATE_32BIT_ECC] != 0)) {
- printf("DDR Topology Update: ECC PUP3 not valid for 32bit mode, force ECC in PUP4\n");
- tui->update_ecc_pup3_mode = 1;
- tui->ecc_pup_mode_offset =
- TOPOLOGY_UPDATE_ECC_OFFSET_PUP4;
- }
- }
- } else {
- if (ecc_mode[board_id][TOPOLOGY_UPDATE_16BIT_ECC] !=
- 0) {
- printf("DDR Topology Update: ECC on PUP3 not supported, force ECC on PUP4\n");
- tui->update_ecc_pup3_mode = 1;
- tui->ecc_pup_mode_offset =
- TOPOLOGY_UPDATE_ECC_OFFSET_PUP4;
- }
- }
- } else {
- /* PUP4 */
- if ((ecc_mode[board_id][TOPOLOGY_UPDATE_32BIT_ECC] != 0) ||
- (ecc_mode[board_id][TOPOLOGY_UPDATE_16BIT_ECC] != 0)) {
- tui->update_ecc_pup3_mode = 1;
- tui->ecc_pup_mode_offset =
- TOPOLOGY_UPDATE_ECC_OFFSET_PUP4;
- }
- }
-
- /*
- * Check for forbidden ECC mode,
- * if by default width and pup selection set 32bit ECC mode and this
- * mode not supported for the board - config 16bit with ECC on PUP3
- */
- if ((tui->ecc == TOPOLOGY_UPDATE_ECC_ON) &&
- (tui->width == TOPOLOGY_UPDATE_WIDTH_32BIT)) {
- if (ecc_mode[board_id][TOPOLOGY_UPDATE_32BIT_ECC] == 0) {
- printf("DDR Topology Update: 32bit mode with ECC not allowed on this board, forced 16bit with ECC on PUP3\n");
- tui->width = TOPOLOGY_UPDATE_WIDTH_16BIT;
- tui->update_ecc_pup3_mode = 1;
- tui->ecc_pup_mode_offset =
- TOPOLOGY_UPDATE_ECC_OFFSET_PUP3;
- }
- }
-
- return MV_OK;
-}
-#endif /* CONFIG_ARMADA_38X */
-#endif /* MV_DDR_TOPOLOGY_UPDATE_FROM_TWSI */
diff --git a/arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.h b/arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.h
index 3e5373c..a413c51 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.h
+++ b/arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.h
@@ -364,8 +364,6 @@ u8 sys_env_device_rev_get(void);
u32 sys_env_device_id_get(void);
u16 sys_env_model_get(void);
struct dlb_config *sys_env_dlb_config_ptr_get(void);
-u32 sys_env_get_topology_update_info(
- struct topology_update_info *topology_update_info);
u32 sys_env_get_cs_ena_from_reg(void);
#endif /* _SYS_ENV_LIB_H */
diff --git a/arch/microblaze/include/asm/bitops.h b/arch/microblaze/include/asm/bitops.h
index d24f2cf..2cab2ac 100644
--- a/arch/microblaze/include/asm/bitops.h
+++ b/arch/microblaze/include/asm/bitops.h
@@ -14,38 +14,14 @@
#ifdef __KERNEL__
/*
- * Function prototypes to keep gcc -Wall happy
- */
-
-/*
* The __ functions are not atomic
*/
-extern void set_bit(int nr, volatile void * addr);
-extern void __set_bit(int nr, volatile void * addr);
-
-extern void clear_bit(int nr, volatile void * addr);
-#define __clear_bit(nr, addr) clear_bit(nr, addr)
-#define PLATFORM__CLEAR_BIT
-
-extern void change_bit(int nr, volatile void * addr);
-extern void __change_bit(int nr, volatile void * addr);
-extern int test_and_set_bit(int nr, volatile void * addr);
-extern int __test_and_set_bit(int nr, volatile void * addr);
-extern int test_and_clear_bit(int nr, volatile void * addr);
-extern int __test_and_clear_bit(int nr, volatile void * addr);
-extern int test_and_change_bit(int nr, volatile void * addr);
-extern int __test_and_change_bit(int nr, volatile void * addr);
-extern int __constant_test_bit(int nr, const volatile void * addr);
-extern int __test_bit(int nr, volatile void * addr);
-extern int find_first_zero_bit(void * addr, unsigned size);
-extern int find_next_zero_bit (void * addr, int size, int offset);
-
/*
* ffz = Find First Zero in word. Undefined if no zero exists,
* so code should check against ~0UL first..
*/
-extern __inline__ unsigned long ffz(unsigned long word)
+static inline unsigned long ffz(unsigned long word)
{
unsigned long result = 0;
@@ -57,7 +33,7 @@ extern __inline__ unsigned long ffz(unsigned long word)
}
-extern __inline__ void set_bit(int nr, volatile void * addr)
+static inline void set_bit(int nr, volatile void *addr)
{
int * a = (int *) addr;
int mask;
@@ -70,7 +46,7 @@ extern __inline__ void set_bit(int nr, volatile void * addr)
restore_flags(flags);
}
-extern __inline__ void __set_bit(int nr, volatile void * addr)
+static inline void __set_bit(int nr, volatile void *addr)
{
int * a = (int *) addr;
int mask;
@@ -87,7 +63,7 @@ extern __inline__ void __set_bit(int nr, volatile void * addr)
#define smp_mb__before_clear_bit() barrier()
#define smp_mb__after_clear_bit() barrier()
-extern __inline__ void clear_bit(int nr, volatile void * addr)
+static inline void clear_bit(int nr, volatile void *addr)
{
int * a = (int *) addr;
int mask;
@@ -100,7 +76,10 @@ extern __inline__ void clear_bit(int nr, volatile void * addr)
restore_flags(flags);
}
-extern __inline__ void change_bit(int nr, volatile void * addr)
+#define __clear_bit(nr, addr) clear_bit(nr, addr)
+#define PLATFORM__CLEAR_BIT
+
+static inline void change_bit(int nr, volatile void *addr)
{
int mask;
unsigned long flags;
@@ -113,7 +92,7 @@ extern __inline__ void change_bit(int nr, volatile void * addr)
restore_flags(flags);
}
-extern __inline__ void __change_bit(int nr, volatile void * addr)
+static inline void __change_bit(int nr, volatile void *addr)
{
int mask;
unsigned long *ADDR = (unsigned long *) addr;
@@ -123,7 +102,7 @@ extern __inline__ void __change_bit(int nr, volatile void * addr)
*ADDR ^= mask;
}
-extern __inline__ int test_and_set_bit(int nr, volatile void * addr)
+static inline int test_and_set_bit(int nr, volatile void *addr)
{
int mask, retval;
volatile unsigned int *a = (volatile unsigned int *) addr;
@@ -139,7 +118,7 @@ extern __inline__ int test_and_set_bit(int nr, volatile void * addr)
return retval;
}
-extern __inline__ int __test_and_set_bit(int nr, volatile void * addr)
+static inline int __test_and_set_bit(int nr, volatile void *addr)
{
int mask, retval;
volatile unsigned int *a = (volatile unsigned int *) addr;
@@ -151,7 +130,7 @@ extern __inline__ int __test_and_set_bit(int nr, volatile void * addr)
return retval;
}
-extern __inline__ int test_and_clear_bit(int nr, volatile void * addr)
+static inline int test_and_clear_bit(int nr, volatile void *addr)
{
int mask, retval;
volatile unsigned int *a = (volatile unsigned int *) addr;
@@ -167,7 +146,7 @@ extern __inline__ int test_and_clear_bit(int nr, volatile void * addr)
return retval;
}
-extern __inline__ int __test_and_clear_bit(int nr, volatile void * addr)
+static inline int __test_and_clear_bit(int nr, volatile void *addr)
{
int mask, retval;
volatile unsigned int *a = (volatile unsigned int *) addr;
@@ -179,7 +158,7 @@ extern __inline__ int __test_and_clear_bit(int nr, volatile void * addr)
return retval;
}
-extern __inline__ int test_and_change_bit(int nr, volatile void * addr)
+static inline int test_and_change_bit(int nr, volatile void *addr)
{
int mask, retval;
volatile unsigned int *a = (volatile unsigned int *) addr;
@@ -195,7 +174,7 @@ extern __inline__ int test_and_change_bit(int nr, volatile void * addr)
return retval;
}
-extern __inline__ int __test_and_change_bit(int nr, volatile void * addr)
+static inline int __test_and_change_bit(int nr, volatile void *addr)
{
int mask, retval;
volatile unsigned int *a = (volatile unsigned int *) addr;
@@ -210,12 +189,12 @@ extern __inline__ int __test_and_change_bit(int nr, volatile void * addr)
/*
* This routine doesn't need to be atomic.
*/
-extern __inline__ int __constant_test_bit(int nr, const volatile void * addr)
+static inline int __constant_test_bit(int nr, const volatile void *addr)
{
return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0;
}
-extern __inline__ int __test_bit(int nr, volatile void * addr)
+static inline int __test_bit(int nr, volatile void *addr)
{
int * a = (int *) addr;
int mask;
@@ -233,7 +212,7 @@ extern __inline__ int __test_bit(int nr, volatile void * addr)
#define find_first_zero_bit(addr, size) \
find_next_zero_bit((addr), (size), 0)
-extern __inline__ int find_next_zero_bit (void * addr, int size, int offset)
+static inline int find_next_zero_bit(void *addr, int size, int offset)
{
unsigned long *p = ((unsigned long *) addr) + (offset >> 5);
unsigned long result = offset & ~31UL;
@@ -279,7 +258,7 @@ found_middle:
#define hweight8(x) generic_hweight8(x)
-extern __inline__ int ext2_set_bit(int nr, volatile void * addr)
+static inline int ext2_set_bit(int nr, volatile void *addr)
{
int mask, retval;
unsigned long flags;
@@ -294,7 +273,7 @@ extern __inline__ int ext2_set_bit(int nr, volatile void * addr)
return retval;
}
-extern __inline__ int ext2_clear_bit(int nr, volatile void * addr)
+static inline int ext2_clear_bit(int nr, volatile void *addr)
{
int mask, retval;
unsigned long flags;
@@ -309,7 +288,7 @@ extern __inline__ int ext2_clear_bit(int nr, volatile void * addr)
return retval;
}
-extern __inline__ int ext2_test_bit(int nr, const volatile void * addr)
+static inline int ext2_test_bit(int nr, const volatile void *addr)
{
int mask;
const volatile unsigned char *ADDR = (const unsigned char *) addr;
diff --git a/arch/microblaze/include/asm/system.h b/arch/microblaze/include/asm/system.h
index 0297a11..3107748 100644
--- a/arch/microblaze/include/asm/system.h
+++ b/arch/microblaze/include/asm/system.h
@@ -131,7 +131,7 @@ extern void *switch_thread (struct thread_struct *last,
((__typeof__ (*(ptr)))__xchg ((unsigned long)(with), (ptr), sizeof (*(ptr))))
#define tas(ptr) (xchg ((ptr), 1))
-extern inline unsigned long __xchg (unsigned long with,
+static inline unsigned long __xchg(unsigned long with,
__volatile__ void *ptr, int size)
{
unsigned long tmp, flags;
diff --git a/arch/nios2/include/asm/dma-mapping.h b/arch/nios2/include/asm/dma-mapping.h
index 1562d35..65f67bc 100644
--- a/arch/nios2/include/asm/dma-mapping.h
+++ b/arch/nios2/include/asm/dma-mapping.h
@@ -19,6 +19,6 @@ static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)
if (handle)
*handle = addr;
- return ioremap(addr, len);
+ return map_physmem(addr, len, MAP_NOCACHE);
}
#endif /* __ASM_NIOS2_DMA_MAPPING_H */
diff --git a/arch/nios2/include/asm/io.h b/arch/nios2/include/asm/io.h
index 95d8801..e951500 100644
--- a/arch/nios2/include/asm/io.h
+++ b/arch/nios2/include/asm/io.h
@@ -47,12 +47,6 @@ static inline phys_addr_t virt_to_phys(void * vaddr)
return (phys_addr_t)vaddr & gd->arch.physaddr_mask;
}
-static inline void *ioremap(unsigned long physaddr, unsigned long size)
-{
- DECLARE_GLOBAL_DATA_PTR;
- return (void *)(gd->arch.io_region_base | physaddr);
-}
-
#define __raw_writeb(v,a) (*(volatile unsigned char *)(a) = (v))
#define __raw_writew(v,a) (*(volatile unsigned short *)(a) = (v))
#define __raw_writel(v,a) (*(volatile unsigned int *)(a) = (v))
diff --git a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
index 84ca55c..e700781 100644
--- a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
+++ b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c
@@ -13,6 +13,7 @@
#include <asm/arch/soc.h>
#include "../drivers/ddr/marvell/a38x/ddr3_a38x_topology.h"
+#include <../serdes/a38x/high_speed_env_spec.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -55,6 +56,22 @@ static struct marvell_io_exp io_exp[] = {
{ 0x21, 3, 0xC0 } /* Output Data, register#1 */
};
+static struct serdes_map board_serdes_map[] = {
+ {PEX0, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
+ {SATA0, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0},
+ {SATA1, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0},
+ {SATA3, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0},
+ {SATA2, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0},
+ {USB3_HOST1, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 0, 0}
+};
+
+int hws_board_topology_load(struct serdes_map **serdes_map_array, u8 *count)
+{
+ *serdes_map_array = board_serdes_map;
+ *count = ARRAY_SIZE(board_serdes_map);
+ return 0;
+}
+
/*
* Define the DDR layout / topology here in the board file. This will
* be used by the DDR3 init code in the SPL U-Boot version to configure
diff --git a/board/compulab/cm_fx6/spl.c b/board/compulab/cm_fx6/spl.c
index d94ced9..d8328fd 100644
--- a/board/compulab/cm_fx6/spl.c
+++ b/board/compulab/cm_fx6/spl.c
@@ -337,16 +337,17 @@ void board_init_f(ulong dummy)
board_init_r(NULL, 0);
}
-void spl_board_init(void)
+void board_boot_order(u32 *spl_boot_list)
{
- u32 boot_device = spl_boot_device();
-
- if (boot_device == BOOT_DEVICE_SPI)
- puts("Booting from SPI flash\n");
- else if (boot_device == BOOT_DEVICE_MMC1)
- puts("Booting from MMC\n");
- else
- puts("Unknown boot device\n");
+ spl_boot_list[0] = spl_boot_device();
+ switch (spl_boot_list[0]) {
+ case BOOT_DEVICE_SPI:
+ spl_boot_list[1] = BOOT_DEVICE_MMC1;
+ break;
+ case BOOT_DEVICE_MMC1:
+ spl_boot_list[1] = BOOT_DEVICE_SPI;
+ break;
+ }
}
#ifdef CONFIG_SPL_MMC_SUPPORT
diff --git a/board/compulab/cm_t3517/cm_t3517.c b/board/compulab/cm_t3517/cm_t3517.c
index d1c74db..8aae248 100644
--- a/board/compulab/cm_t3517/cm_t3517.c
+++ b/board/compulab/cm_t3517/cm_t3517.c
@@ -98,6 +98,15 @@ int board_init(void)
return 0;
}
+/*
+ * Routine: get_board_rev
+ * Description: read system revision
+ */
+u32 get_board_rev(void)
+{
+ return cl_eeprom_get_board_rev(CONFIG_SYS_I2C_EEPROM_BUS);
+};
+
int misc_init_r(void)
{
cl_print_pcb_info();
diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c
index b9aff1a..8de129d 100644
--- a/board/keymile/common/common.c
+++ b/board/keymile/common/common.c
@@ -354,8 +354,11 @@ static int do_checktestboot(cmd_tbl_t *cmdtp, int flag, int argc,
#if defined(CONFIG_POST)
testpin = post_hotkeys_pressed();
- s = getenv("test_bank");
#endif
+#if defined(CONFIG_MGCOGE3NE)
+ testpin = get_testpin();
+#endif
+ s = getenv("test_bank");
/* when test_bank is not set, act as if testpin is not asserted */
testboot = (testpin != 0) && (s);
if (verbose) {
diff --git a/board/keymile/common/common.h b/board/keymile/common/common.h
index dcfefc4..c74f569 100644
--- a/board/keymile/common/common.h
+++ b/board/keymile/common/common.h
@@ -134,6 +134,8 @@ int wait_for_fpga_config(void);
int fpga_reset(void);
int toggle_eeprom_spi_bus(void);
+int get_testpin(void);
+
int set_km_env(void);
int fdt_set_node_and_value(void *blob,
char *nodename,
diff --git a/board/keymile/km82xx/km82xx.c b/board/keymile/km82xx/km82xx.c
index c599b40..c2a7a5f 100644
--- a/board/keymile/km82xx/km82xx.c
+++ b/board/keymile/km82xx/km82xx.c
@@ -11,10 +11,7 @@
#include <malloc.h>
#include <asm/io.h>
-#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
#include <libfdt.h>
-#endif
-
#include <i2c.h>
#include "../common/common.h"
@@ -332,8 +329,8 @@ int last_stage_init(void)
dip_switch = in_8(&base->mswitch);
dip_switch &= BFTICU_DIPSWITCH_MASK;
- /* dip switch 'full reset' or 'db erase' */
- if (dip_switch & 0x1 || dip_switch & 0x2) {
+ /* dip switch 'full reset' or 'db erase' or 'Local mgmt IP' or any */
+ if (dip_switch != 0) {
/* start bootloader */
puts("DIP: Enabled\n");
setenv("actual_bank", "0");
@@ -343,7 +340,7 @@ int last_stage_init(void)
}
#ifdef CONFIG_MGCOGE3NE
-static void set_pin(int state, unsigned long mask);
+static void set_pin(int state, unsigned long mask, int port);
/*
* For mgcoge3ne boards, the mgcoge3un control is controlled from
@@ -357,11 +354,11 @@ static void handle_mgcoge3un_reset(void)
if (bobcatreset) {
if (strcmp(bobcatreset, "true") == 0) {
puts("Forcing bobcat reset\n");
- set_pin(0, 0x00000004); /* clear PD29 to reset arm */
+ set_pin(0, 0x00000004, 3); /* clear PD29 (reset arm) */
udelay(1000);
- set_pin(1, 0x00000004);
+ set_pin(1, 0x00000004, 3);
} else
- set_pin(1, 0x00000004); /* set PD29 to not reset arm */
+ set_pin(1, 0x00000004, 3); /* don't reset arm */
}
}
#endif
@@ -410,9 +407,9 @@ int hush_init_var(void)
#define SDA_MASK 0x00010000
#define SCL_MASK 0x00020000
-static void set_pin(int state, unsigned long mask)
+static void set_pin(int state, unsigned long mask, int port)
{
- ioport_t *iop = ioport_addr((immap_t *)CONFIG_SYS_IMMR, 3);
+ ioport_t *iop = ioport_addr((immap_t *)CONFIG_SYS_IMMR, port);
if (state)
setbits_be32(&iop->pdat, mask);
@@ -422,9 +419,9 @@ static void set_pin(int state, unsigned long mask)
setbits_be32(&iop->pdir, mask);
}
-static int get_pin(unsigned long mask)
+static int get_pin(unsigned long mask, int port)
{
- ioport_t *iop = ioport_addr((immap_t *)CONFIG_SYS_IMMR, 3);
+ ioport_t *iop = ioport_addr((immap_t *)CONFIG_SYS_IMMR, port);
clrbits_be32(&iop->pdir, mask);
return 0 != (in_be32(&iop->pdat) & mask);
@@ -432,44 +429,36 @@ static int get_pin(unsigned long mask)
void set_sda(int state)
{
- set_pin(state, SDA_MASK);
+ set_pin(state, SDA_MASK, 3);
}
void set_scl(int state)
{
- set_pin(state, SCL_MASK);
+ set_pin(state, SCL_MASK, 3);
}
int get_sda(void)
{
- return get_pin(SDA_MASK);
+ return get_pin(SDA_MASK, 3);
}
int get_scl(void)
{
- return get_pin(SCL_MASK);
+ return get_pin(SCL_MASK, 3);
}
-#if defined(CONFIG_HARD_I2C)
-static void setports(int gpio)
-{
- ioport_t *iop = ioport_addr((immap_t *)CONFIG_SYS_IMMR, 3);
-
- if (gpio) {
- clrbits_be32(&iop->ppar, (SDA_MASK | SCL_MASK));
- clrbits_be32(&iop->podr, (SDA_MASK | SCL_MASK));
- } else {
- setbits_be32(&iop->ppar, (SDA_MASK | SCL_MASK));
- clrbits_be32(&iop->pdir, (SDA_MASK | SCL_MASK));
- setbits_be32(&iop->podr, (SDA_MASK | SCL_MASK));
- }
-}
-#endif
-#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
-#endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */
+
+#if defined(CONFIG_MGCOGE3NE)
+int get_testpin(void)
+{
+ /* Testpin is Port C pin 29 - enable = low */
+ int testpin = !get_pin(0x00000004, 2);
+ return testpin;
+}
+#endif
diff --git a/board/keymile/km83xx/MAINTAINERS b/board/keymile/km83xx/MAINTAINERS
index cee7e08..63b0651 100644
--- a/board/keymile/km83xx/MAINTAINERS
+++ b/board/keymile/km83xx/MAINTAINERS
@@ -7,7 +7,9 @@ F: configs/kmcoge5ne_defconfig
F: configs/kmeter1_defconfig
F: include/configs/tuxx1.h
F: configs/kmopti2_defconfig
+F: configs/kmtepr2_defconfig
F: include/configs/suvd3.h
+F: configs/kmtegr1_defconfig
F: configs/kmvect1_defconfig
F: configs/suvd3_defconfig
F: configs/tuge1_defconfig
diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c
index 89e9e1e..154f974 100644
--- a/board/keymile/km83xx/km83xx.c
+++ b/board/keymile/km83xx/km83xx.c
@@ -361,14 +361,12 @@ int checkboard(void)
return 0;
}
-#if defined(CONFIG_OF_BOARD_SETUP)
int ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
return 0;
}
-#endif
#if defined(CONFIG_HUSH_INIT_VAR)
int hush_init_var(void)
diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c
index 2938861..079509c 100644
--- a/board/keymile/km_arm/km_arm.c
+++ b/board/keymile/km_arm/km_arm.c
@@ -37,6 +37,27 @@ DECLARE_GLOBAL_DATA_PTR;
#define REG_IRQ_CIRQ2 0x2d
#define MASK_RBI_DEFECT_16 0x01
+/*
+ * PHY registers definitions
+ */
+#define PHY_MARVELL_OUI 0x5043
+#define PHY_MARVELL_88E1118_MODEL 0x0022
+#define PHY_MARVELL_88E1118R_MODEL 0x0024
+
+#define PHY_MARVELL_PAGE_REG 0x0016
+#define PHY_MARVELL_DEFAULT_PAGE 0x0000
+
+#define PHY_MARVELL_88E1118R_LED_CTRL_PAGE 0x0003
+#define PHY_MARVELL_88E1118R_LED_CTRL_REG 0x0010
+
+#define PHY_MARVELL_88E1118R_LED_CTRL_RESERVED 0x1000
+#define PHY_MARVELL_88E1118R_LED_CTRL_LED0_1000MB (0x7<<0)
+#define PHY_MARVELL_88E1118R_LED_CTRL_LED1_ACT (0x3<<4)
+#define PHY_MARVELL_88E1118R_LED_CTRL_LED2_LINK (0x0<<8)
+
+/* I/O pin to erase flash RGPP09 = MPP43 */
+#define KM_FLASH_ERASE_ENABLE 43
+
/* Multi-Purpose Pins Functionality configuration */
static const u32 kwmpp_config[] = {
MPP0_NF_IO2,
@@ -183,8 +204,10 @@ int misc_init_r(void)
{
#if defined(CONFIG_KM_MGCOGE3UN)
char *wait_for_ne;
+ u8 dip_switch = kw_gpio_get_value(KM_FLASH_ERASE_ENABLE);
wait_for_ne = getenv("waitforne");
- if (wait_for_ne != NULL) {
+
+ if ((wait_for_ne != NULL) && (dip_switch == 0)) {
if (strcmp(wait_for_ne, "true") == 0) {
int cnt = 0;
int abort = 0;
@@ -273,9 +296,7 @@ int board_init(void)
int board_late_init(void)
{
-#if defined(CONFIG_KMCOGE5UN)
-/* I/O pin to erase flash RGPP09 = MPP43 */
-#define KM_FLASH_ERASE_ENABLE 43
+#if (defined(CONFIG_KM_COGE5UN) | defined(CONFIG_KM_MGCOGE3UN))
u8 dip_switch = kw_gpio_get_value(KM_FLASH_ERASE_ENABLE);
/* if pin 1 do full erase */
@@ -409,6 +430,9 @@ void reset_phy(void)
/* Configure and enable MV88E1118 PHY on the piggy*/
void reset_phy(void)
{
+ unsigned int oui;
+ unsigned char model, rev;
+
char *name = "egiga0";
if (miiphy_set_current_dev(name))
@@ -416,6 +440,40 @@ void reset_phy(void)
/* reset the phy */
miiphy_reset(name, CONFIG_PHY_BASE_ADR);
+
+ /* get PHY model */
+ if (miiphy_info(name, CONFIG_PHY_BASE_ADR, &oui, &model, &rev))
+ return;
+
+ /* check for Marvell 88E1118R Gigabit PHY (PIGGY3) */
+ if ((oui == PHY_MARVELL_OUI) &&
+ (model == PHY_MARVELL_88E1118R_MODEL)) {
+ /* set page register to 3 */
+ if (miiphy_write(name, CONFIG_PHY_BASE_ADR,
+ PHY_MARVELL_PAGE_REG,
+ PHY_MARVELL_88E1118R_LED_CTRL_PAGE))
+ printf("Error writing PHY page reg\n");
+
+ /*
+ * leds setup as printed on PCB:
+ * LED2 (Link): 0x0 (On Link, Off No Link)
+ * LED1 (Activity): 0x3 (On Activity, Off No Activity)
+ * LED0 (Speed): 0x7 (On 1000 MBits, Off Else)
+ */
+ if (miiphy_write(name, CONFIG_PHY_BASE_ADR,
+ PHY_MARVELL_88E1118R_LED_CTRL_REG,
+ PHY_MARVELL_88E1118R_LED_CTRL_RESERVED |
+ PHY_MARVELL_88E1118R_LED_CTRL_LED0_1000MB |
+ PHY_MARVELL_88E1118R_LED_CTRL_LED1_ACT |
+ PHY_MARVELL_88E1118R_LED_CTRL_LED2_LINK))
+ printf("Error writing PHY LED reg\n");
+
+ /* set page register back to 0 */
+ if (miiphy_write(name, CONFIG_PHY_BASE_ADR,
+ PHY_MARVELL_PAGE_REG,
+ PHY_MARVELL_DEFAULT_PAGE))
+ printf("Error writing PHY page reg\n");
+ }
}
#endif
diff --git a/board/keymile/scripts/develop-common.txt b/board/keymile/scripts/develop-common.txt
index a80812a..265f02f 100644
--- a/board/keymile/scripts/develop-common.txt
+++ b/board/keymile/scripts/develop-common.txt
@@ -1,10 +1,10 @@
altbootcmd=run ${subbootcmds}
bootcmd=run ${subbootcmds}
-configure=run set_uimage; km_setboardid && saveenv && reset
+configure=run set_uimage; setenv tftppath ${IVM_Symbol} ; km_setboardid && saveenv && reset
subbootcmds=tftpfdt tftpkernel nfsargs add_default boot
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${toolchain}/${arch}
-tftpfdt=if run set_fdthigh || test ${arch} != arm; then tftpboot ${fdt_addr_r} ${hostname}/${hostname}.dtb; else true; fi
-tftpkernel=tftpboot ${load_addr_r} ${hostname}/${uimage}
+tftpfdt=if run set_fdthigh || test ${arch} != arm; then if tftpboot ${fdt_addr_r} ${tftppath}/fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb; then; else tftpboot ${fdt_addr_r} ${tftppath}/${hostname}.dtb; fi; else true; fi
+tftpkernel=tftpboot ${load_addr_r} ${tftppath}/${uimage}
toolchain=/opt/eldk
rootfssize=0
set_uimage=printenv uimage || setenv uimage uImage
diff --git a/board/synopsys/axs101/axs101.c b/board/synopsys/axs101/axs101.c
index aa446b9..84ee2bf 100644
--- a/board/synopsys/axs101/axs101.c
+++ b/board/synopsys/axs101/axs101.c
@@ -7,8 +7,6 @@
#include <common.h>
#include <dwmmc.h>
#include <malloc.h>
-#include <netdev.h>
-#include <phy.h>
#include "axs10x.h"
DECLARE_GLOBAL_DATA_PTR;
@@ -35,16 +33,6 @@ int board_mmc_init(bd_t *bis)
return 0;
}
-int board_eth_init(bd_t *bis)
-{
- if (designware_initialize(ARC_DWGMAC_BASE,
- PHY_INTERFACE_MODE_RGMII) >= 0)
- return 1;
-
- return 0;
-}
-
-
#define AXS_MB_CREG 0xE0011000
int board_early_init_f(void)
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index f0cb1e2..f56d17e 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -507,9 +507,15 @@ int board_late_init(void)
safe_string[sizeof(header.name)] = 0;
setenv("board_name", safe_string);
- strncpy(safe_string, (char *)header.version, sizeof(header.version));
- safe_string[sizeof(header.version)] = 0;
- setenv("board_rev", safe_string);
+ /* BeagleBone Green eeprom, board_rev: 0x1a 0x00 0x00 0x00 */
+ if ( (header.version[0] == 0x1a) && (header.version[1] == 0x00) &&
+ (header.version[2] == 0x00) && (header.version[3] == 0x00) ) {
+ setenv("board_rev", "BBG1");
+ } else {
+ strncpy(safe_string, (char *)header.version, sizeof(header.version));
+ safe_string[sizeof(header.version)] = 0;
+ setenv("board_rev", safe_string);
+ }
#endif
return 0;
diff --git a/board/ti/beagle_x15/Kconfig b/board/ti/am57xx/Kconfig
index a305ff1..bdb7795 100644
--- a/board/ti/beagle_x15/Kconfig
+++ b/board/ti/am57xx/Kconfig
@@ -1,12 +1,12 @@
if TARGET_BEAGLE_X15
config SYS_BOARD
- default "beagle_x15"
+ default "am57xx"
config SYS_VENDOR
default "ti"
config SYS_CONFIG_NAME
- default "beagle_x15"
+ default "am57xx_evm"
endif
diff --git a/board/ti/am57xx/MAINTAINERS b/board/ti/am57xx/MAINTAINERS
new file mode 100644
index 0000000..b8ae019
--- /dev/null
+++ b/board/ti/am57xx/MAINTAINERS
@@ -0,0 +1,7 @@
+AM57XX EVM
+M: Felipe Balbi <balbi@ti.com>
+S: Maintained
+F: board/ti/am57xx/
+F: include/configs/am57xx_evm.h
+F: configs/am57xx_evm_defconfig
+F: configs/am57xx_evm_nodt_defconfig
diff --git a/board/ti/beagle_x15/Makefile b/board/ti/am57xx/Makefile
index 5cd6873..5cd6873 100644
--- a/board/ti/beagle_x15/Makefile
+++ b/board/ti/am57xx/Makefile
diff --git a/board/ti/beagle_x15/board.c b/board/ti/am57xx/board.c
index 042f9ab..042f9ab 100644
--- a/board/ti/beagle_x15/board.c
+++ b/board/ti/am57xx/board.c
diff --git a/board/ti/beagle_x15/mux_data.h b/board/ti/am57xx/mux_data.h
index 23f22a0..23f22a0 100644
--- a/board/ti/beagle_x15/mux_data.h
+++ b/board/ti/am57xx/mux_data.h
diff --git a/board/ti/beagle_x15/MAINTAINERS b/board/ti/beagle_x15/MAINTAINERS
deleted file mode 100644
index 3f84def..0000000
--- a/board/ti/beagle_x15/MAINTAINERS
+++ /dev/null
@@ -1,6 +0,0 @@
-BEAGLE X15
-M: Felipe Balbi <balbi@ti.com>
-S: Maintained
-F: board/ti/beagle_x15/
-F: include/configs/beagle_x15.h
-F: configs/beagle_x15_defconfig
diff --git a/common/Kconfig b/common/Kconfig
index 440cb37..620d41f 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -355,6 +355,12 @@ config CMD_REMOTEPROC
depends on REMOTEPROC
help
Support for Remote Processor control
+
+config CMD_GPIO
+ bool "gpio"
+ help
+ GPIO support.
+
endmenu
diff --git a/common/cmd_itest.c b/common/cmd_itest.c
index 596341c..91ae5c2 100644
--- a/common/cmd_itest.c
+++ b/common/cmd_itest.c
@@ -64,9 +64,15 @@ static long evalexp(char *s, int w)
return 0;
}
switch (w) {
- case 1: l = (long)(*(unsigned char *)buf);
- case 2: l = (long)(*(unsigned short *)buf);
- case 4: l = (long)(*(unsigned long *)buf);
+ case 1:
+ l = (long)(*(unsigned char *)buf);
+ break;
+ case 2:
+ l = (long)(*(unsigned short *)buf);
+ break;
+ case 4:
+ l = (long)(*(unsigned long *)buf);
+ break;
}
unmap_physmem(buf, w);
return l;
diff --git a/common/cmd_mii.c b/common/cmd_mii.c
index 5e9079d..7ef7532 100644
--- a/common/cmd_mii.c
+++ b/common/cmd_mii.c
@@ -314,6 +314,11 @@ static int do_mii(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
mask = simple_strtoul(argv[5], NULL, 16);
}
+ if (addrhi > 31) {
+ printf("Incorrect PHY address. Range should be 0-31\n");
+ return CMD_RET_USAGE;
+ }
+
/* use current device */
devname = miiphy_get_current_dev();
diff --git a/common/env_ubi.c b/common/env_ubi.c
index e0dc5af..e611199 100644
--- a/common/env_ubi.c
+++ b/common/env_ubi.c
@@ -181,8 +181,7 @@ void env_relocate_spec(void)
return;
}
- if (ubi_volume_read(CONFIG_ENV_UBI_VOLUME, (void *)&buf,
- CONFIG_ENV_SIZE)) {
+ if (ubi_volume_read(CONFIG_ENV_UBI_VOLUME, buf, CONFIG_ENV_SIZE)) {
printf("\n** Unable to read env from %s:%s **\n",
CONFIG_ENV_UBI_PART, CONFIG_ENV_UBI_VOLUME);
set_default_env(NULL);
diff --git a/common/image.c b/common/image.c
index 85c4f39..c36927f 100644
--- a/common/image.c
+++ b/common/image.c
@@ -158,6 +158,7 @@ static const table_entry_t uimage_type[] = {
{ IH_TYPE_RKIMAGE, "rkimage", "Rockchip Boot Image" },
{ IH_TYPE_RKSD, "rksd", "Rockchip SD Boot Image" },
{ IH_TYPE_RKSPI, "rkspi", "Rockchip SPI Boot Image" },
+ { IH_TYPE_ZYNQIMAGE, "zynqimage", "Xilinx Zynq Boot Image" },
{ -1, "", "", },
};
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 4b319d6..7a393dc 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -132,7 +132,7 @@ __weak void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
}
#ifdef CONFIG_SPL_RAM_DEVICE
-static void spl_ram_load_image(void)
+static int spl_ram_load_image(void)
{
const struct image_header *header;
@@ -145,6 +145,8 @@ static void spl_ram_load_image(void)
(CONFIG_SYS_TEXT_BASE - sizeof(struct image_header));
spl_parse_image_header(header);
+
+ return 0;
}
#endif
@@ -176,106 +178,206 @@ int spl_init(void)
return 0;
}
-void board_init_r(gd_t *dummy1, ulong dummy2)
+#ifndef BOOT_DEVICE_NONE
+#define BOOT_DEVICE_NONE 0xdeadbeef
+#endif
+
+static u32 spl_boot_list[] = {
+ BOOT_DEVICE_NONE,
+ BOOT_DEVICE_NONE,
+ BOOT_DEVICE_NONE,
+ BOOT_DEVICE_NONE,
+ BOOT_DEVICE_NONE,
+};
+
+__weak void board_boot_order(u32 *spl_boot_list)
{
- u32 boot_device;
+ spl_boot_list[0] = spl_boot_device();
+}
- debug(">>spl:board_init_r()\n");
+#ifdef CONFIG_SPL_BOARD_LOAD_IMAGE
+__weak void spl_board_announce_boot_device(void) { }
+#endif
-#if defined(CONFIG_SYS_SPL_MALLOC_START)
- mem_malloc_init(CONFIG_SYS_SPL_MALLOC_START,
- CONFIG_SYS_SPL_MALLOC_SIZE);
- gd->flags |= GD_FLG_FULL_MALLOC_INIT;
+#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
+struct boot_device_name {
+ u32 boot_dev;
+ const char *name;
+};
+
+struct boot_device_name boot_name_table[] = {
+#ifdef CONFIG_SPL_RAM_DEVICE
+ { BOOT_DEVICE_RAM, "RAM" },
#endif
- if (!(gd->flags & GD_FLG_SPL_INIT)) {
- if (spl_init())
- hang();
+#ifdef CONFIG_SPL_MMC_SUPPORT
+ { BOOT_DEVICE_MMC1, "MMC" },
+ { BOOT_DEVICE_MMC2, "MMC" },
+ { BOOT_DEVICE_MMC2_2, "MMC" },
+#endif
+#ifdef CONFIG_SPL_NAND_SUPPORT
+ { BOOT_DEVICE_NAND, "NAND" },
+#endif
+#ifdef CONFIG_SPL_ONENAND_SUPPORT
+ { BOOT_DEVICE_ONENAND, "OneNAND" },
+#endif
+#ifdef CONFIG_SPL_NOR_SUPPORT
+ { BOOT_DEVICE_NOR, "NOR" },
+#endif
+#ifdef CONFIG_SPL_YMODEM_SUPPORT
+ { BOOT_DEVICE_UART, "UART" },
+#endif
+#ifdef CONFIG_SPL_SPI_SUPPORT
+ { BOOT_DEVICE_SPI, "SPI" },
+#endif
+#ifdef CONFIG_SPL_ETH_SUPPORT
+#ifdef CONFIG_SPL_ETH_DEVICE
+ { BOOT_DEVICE_CPGMAC, "eth device" },
+#else
+ { BOOT_DEVICE_CPGMAC, "net" },
+#endif
+#endif
+#ifdef CONFIG_SPL_USBETH_SUPPORT
+ { BOOT_DEVICE_USBETH, "USB eth" },
+#endif
+#ifdef CONFIG_SPL_USB_SUPPORT
+ { BOOT_DEVICE_USB, "USB" },
+#endif
+#ifdef CONFIG_SPL_SATA_SUPPORT
+ { BOOT_DEVICE_SATA, "SATA" },
+#endif
+ /* Keep this entry last */
+ { BOOT_DEVICE_NONE, "unknown boot device" },
+};
+
+static void announce_boot_device(u32 boot_device)
+{
+ int i;
+
+ puts("Trying to boot from ");
+
+#ifdef CONFIG_SPL_BOARD_LOAD_IMAGE
+ if (boot_device == BOOT_DEVICE_BOARD) {
+ spl_board_announce_boot_device();
+ puts("\n");
+ return;
}
-#ifndef CONFIG_PPC
- /*
- * timer_init() does not exist on PPC systems. The timer is initialized
- * and enabled (decrementer) in interrupt_init() here.
- */
- timer_init();
#endif
+ for (i = 0; i < ARRAY_SIZE(boot_name_table) - 1; i++) {
+ if (boot_name_table[i].boot_dev == boot_device)
+ break;
+ }
-#ifdef CONFIG_SPL_BOARD_INIT
- spl_board_init();
+ printf("%s\n", boot_name_table[i].name);
+}
+#else
+static inline void announce_boot_device(u32 boot_device) { }
#endif
- boot_device = spl_boot_device();
- debug("boot device - %d\n", boot_device);
+static int spl_load_image(u32 boot_device)
+{
switch (boot_device) {
#ifdef CONFIG_SPL_RAM_DEVICE
case BOOT_DEVICE_RAM:
- spl_ram_load_image();
- break;
+ return spl_ram_load_image();
#endif
#ifdef CONFIG_SPL_MMC_SUPPORT
case BOOT_DEVICE_MMC1:
case BOOT_DEVICE_MMC2:
case BOOT_DEVICE_MMC2_2:
- spl_mmc_load_image();
- break;
+ return spl_mmc_load_image(boot_device);
#endif
#ifdef CONFIG_SPL_NAND_SUPPORT
case BOOT_DEVICE_NAND:
- spl_nand_load_image();
- break;
+ return spl_nand_load_image();
#endif
#ifdef CONFIG_SPL_ONENAND_SUPPORT
case BOOT_DEVICE_ONENAND:
- spl_onenand_load_image();
- break;
+ return spl_onenand_load_image();
#endif
#ifdef CONFIG_SPL_NOR_SUPPORT
case BOOT_DEVICE_NOR:
- spl_nor_load_image();
- break;
+ return spl_nor_load_image();
#endif
#ifdef CONFIG_SPL_YMODEM_SUPPORT
case BOOT_DEVICE_UART:
- spl_ymodem_load_image();
- break;
+ return spl_ymodem_load_image();
#endif
#ifdef CONFIG_SPL_SPI_SUPPORT
case BOOT_DEVICE_SPI:
- spl_spi_load_image();
- break;
+ return spl_spi_load_image();
#endif
#ifdef CONFIG_SPL_ETH_SUPPORT
case BOOT_DEVICE_CPGMAC:
#ifdef CONFIG_SPL_ETH_DEVICE
- spl_net_load_image(CONFIG_SPL_ETH_DEVICE);
+ return spl_net_load_image(CONFIG_SPL_ETH_DEVICE);
#else
- spl_net_load_image(NULL);
+ return spl_net_load_image(NULL);
#endif
- break;
#endif
#ifdef CONFIG_SPL_USBETH_SUPPORT
case BOOT_DEVICE_USBETH:
- spl_net_load_image("usb_ether");
- break;
+ return spl_net_load_image("usb_ether");
#endif
#ifdef CONFIG_SPL_USB_SUPPORT
case BOOT_DEVICE_USB:
- spl_usb_load_image();
- break;
+ return spl_usb_load_image();
#endif
#ifdef CONFIG_SPL_SATA_SUPPORT
case BOOT_DEVICE_SATA:
- spl_sata_load_image();
- break;
+ return spl_sata_load_image();
#endif
#ifdef CONFIG_SPL_BOARD_LOAD_IMAGE
case BOOT_DEVICE_BOARD:
- spl_board_load_image();
- break;
+ return spl_board_load_image();
#endif
default:
#if defined(CONFIG_SPL_SERIAL_SUPPORT) && defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
puts("SPL: Unsupported Boot Device!\n");
#endif
+ return -ENODEV;
+ }
+
+ return -EINVAL;
+}
+
+void board_init_r(gd_t *dummy1, ulong dummy2)
+{
+ int i;
+
+ debug(">>spl:board_init_r()\n");
+
+#if defined(CONFIG_SYS_SPL_MALLOC_START)
+ mem_malloc_init(CONFIG_SYS_SPL_MALLOC_START,
+ CONFIG_SYS_SPL_MALLOC_SIZE);
+ gd->flags |= GD_FLG_FULL_MALLOC_INIT;
+#endif
+ if (!(gd->flags & GD_FLG_SPL_INIT)) {
+ if (spl_init())
+ hang();
+ }
+#ifndef CONFIG_PPC
+ /*
+ * timer_init() does not exist on PPC systems. The timer is initialized
+ * and enabled (decrementer) in interrupt_init() here.
+ */
+ timer_init();
+#endif
+
+#ifdef CONFIG_SPL_BOARD_INIT
+ spl_board_init();
+#endif
+
+ board_boot_order(spl_boot_list);
+ for (i = 0; i < ARRAY_SIZE(spl_boot_list) &&
+ spl_boot_list[i] != BOOT_DEVICE_NONE; i++) {
+ announce_boot_device(spl_boot_list[i]);
+ if (!spl_load_image(spl_boot_list[i]))
+ break;
+ }
+
+ if (i == ARRAY_SIZE(spl_boot_list) ||
+ spl_boot_list[i] == BOOT_DEVICE_NONE) {
+ puts("SPL: failed to boot from all boot devices\n");
hang();
}
diff --git a/common/spl/spl_ext.c b/common/spl/spl_ext.c
index 9d37fd3..a42fbd0 100644
--- a/common/spl/spl_ext.c
+++ b/common/spl/spl_ext.c
@@ -6,6 +6,7 @@
#include <spl.h>
#include <asm/u-boot.h>
#include <ext4fs.h>
+#include <errno.h>
#include <image.h>
#ifdef CONFIG_SPL_EXT_SUPPORT
@@ -135,5 +136,10 @@ defaults:
return spl_load_image_ext(block_dev, partition,
CONFIG_SPL_FS_LOAD_KERNEL_NAME);
}
+#else
+int spl_load_image_ext_os(block_dev_desc_t *block_dev, int partition)
+{
+ return -ENOSYS;
+}
#endif
#endif
diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c
index 350f7d9..0daadbe 100644
--- a/common/spl/spl_fat.c
+++ b/common/spl/spl_fat.c
@@ -13,6 +13,7 @@
#include <spl.h>
#include <asm/u-boot.h>
#include <fat.h>
+#include <errno.h>
#include <image.h>
static int fat_registered;
@@ -119,5 +120,10 @@ defaults:
return spl_load_image_fat(block_dev, partition,
CONFIG_SPL_FS_LOAD_KERNEL_NAME);
}
+#else
+int spl_load_image_fat_os(block_dev_desc_t *block_dev, int partition)
+{
+ return -ENOSYS;
+}
#endif
#endif
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index ce58c58..b3c2c64 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -10,7 +10,9 @@
#include <dm.h>
#include <spl.h>
#include <linux/compiler.h>
+#include <errno.h>
#include <asm/u-boot.h>
+#include <errno.h>
#include <mmc.h>
#include <image.h>
@@ -59,6 +61,83 @@ end:
return 0;
}
+int spl_mmc_get_device_index(u32 boot_device)
+{
+ switch (boot_device) {
+ case BOOT_DEVICE_MMC1:
+ return 0;
+ case BOOT_DEVICE_MMC2:
+ case BOOT_DEVICE_MMC2_2:
+ return 1;
+ }
+
+#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
+ printf("spl: unsupported mmc boot device.\n");
+#endif
+
+ return -ENODEV;
+}
+
+#ifdef CONFIG_DM_MMC
+static int spl_mmc_find_device(struct mmc **mmc, u32 boot_device)
+{
+ struct udevice *dev;
+ int err, mmc_dev;
+
+ mmc_dev = spl_mmc_get_device_index(boot_device);
+ if (mmc_dev < 0)
+ return mmc_dev;
+
+ err = mmc_initialize(NULL);
+ if (err) {
+#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
+ printf("spl: could not initialize mmc. error: %d\n", err);
+#endif
+ return err;
+ }
+
+ err = uclass_get_device(UCLASS_MMC, mmc_dev, &dev);
+ if (err) {
+#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
+ printf("spl: could not find mmc device. error: %d\n", err);
+#endif
+ return err;
+ }
+
+ *mmc = NULL;
+ *mmc = mmc_get_mmc_dev(dev);
+ return *mmc != NULL ? 0 : -ENODEV;
+}
+#else
+static int spl_mmc_find_device(struct mmc **mmc, u32 boot_device)
+{
+ int err, mmc_dev;
+
+ mmc_dev = spl_mmc_get_device_index(boot_device);
+ if (mmc_dev < 0)
+ return mmc_dev;
+
+ err = mmc_initialize(gd->bd);
+ if (err) {
+#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
+ printf("spl: could not initialize mmc. error: %d\n", err);
+#endif
+ return err;
+ }
+
+ /* We register only one device. So, the dev id is always 0 */
+ *mmc = find_mmc_device(mmc_dev);
+ if (!*mmc) {
+#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
+ puts("spl: mmc device not found\n");
+#endif
+ return -ENODEV;
+ }
+
+ return 0;
+}
+#endif
+
#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
static int mmc_load_image_raw_partition(struct mmc *mmc, int partition)
{
@@ -80,6 +159,12 @@ static int mmc_load_image_raw_partition(struct mmc *mmc, int partition)
return mmc_load_image_raw_sector(mmc, info.start);
#endif
}
+#else
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION -1
+static int mmc_load_image_raw_partition(struct mmc *mmc, int partition)
+{
+ return -ENOSYS;
+}
#endif
#ifdef CONFIG_SPL_OS_BOOT
@@ -101,154 +186,141 @@ static int mmc_load_image_raw_os(struct mmc *mmc)
return mmc_load_image_raw_sector(mmc,
CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR);
}
+#else
+int spl_start_uboot(void)
+{
+ return 1;
+}
+static int mmc_load_image_raw_os(struct mmc *mmc)
+{
+ return -ENOSYS;
+}
#endif
-void spl_mmc_load_image(void)
+#ifdef CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
+int spl_mmc_do_fs_boot(struct mmc *mmc)
{
- struct mmc *mmc;
- u32 boot_mode;
- int err = 0;
- __maybe_unused int part;
+ int err = -ENOSYS;
-#ifdef CONFIG_DM_MMC
- struct udevice *dev;
-
- mmc_initialize(NULL);
- err = uclass_get_device(UCLASS_MMC, 0, &dev);
- mmc = NULL;
+#ifdef CONFIG_SPL_FAT_SUPPORT
+ if (!spl_start_uboot()) {
+ err = spl_load_image_fat_os(&mmc->block_dev,
+ CONFIG_SYS_MMCSD_FS_BOOT_PARTITION);
+ if (!err)
+ return err;
+ }
+#ifdef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
+ err = spl_load_image_fat(&mmc->block_dev,
+ CONFIG_SYS_MMCSD_FS_BOOT_PARTITION,
+ CONFIG_SPL_FS_LOAD_PAYLOAD_NAME);
if (!err)
- mmc = mmc_get_mmc_dev(dev);
-#else
- mmc_initialize(gd->bd);
-
- /* We register only one device. So, the dev id is always 0 */
- mmc = find_mmc_device(0);
- if (!mmc) {
-#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
- puts("spl: mmc device not found\n");
+ return err;
#endif
- hang();
+#endif
+#ifdef CONFIG_SPL_EXT_SUPPORT
+ if (!spl_start_uboot()) {
+ err = spl_load_image_ext_os(&mmc->block_dev,
+ CONFIG_SYS_MMCSD_FS_BOOT_PARTITION);
+ if (!err)
+ return err;
}
+#ifdef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
+ err = spl_load_image_ext(&mmc->block_dev,
+ CONFIG_SYS_MMCSD_FS_BOOT_PARTITION,
+ CONFIG_SPL_FS_LOAD_PAYLOAD_NAME);
+ if (!err)
+ return err;
+#endif
#endif
- if (!err)
- err = mmc_init(mmc);
+#if defined(CONFIG_SPL_FAT_SUPPORT) || defined(CONFIG_SPL_EXT_SUPPORT)
+ err = -ENOENT;
+#endif
+
+ return err;
+}
+#else
+int spl_mmc_do_fs_boot(struct mmc *mmc)
+{
+ return -ENOSYS;
+}
+#endif
+
+int spl_mmc_load_image(u32 boot_device)
+{
+ struct mmc *mmc;
+ u32 boot_mode;
+ int err = 0;
+ __maybe_unused int part;
+ err = spl_mmc_find_device(&mmc, boot_device);
+ if (err)
+ return err;
+
+ err = mmc_init(mmc);
if (err) {
#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
printf("spl: mmc init failed with error: %d\n", err);
#endif
- hang();
+ return err;
}
boot_mode = spl_boot_mode();
+ err = -EINVAL;
switch (boot_mode) {
+ case MMCSD_MODE_EMMCBOOT:
+ /*
+ * We need to check what the partition is configured to.
+ * 1 and 2 match up to boot0 / boot1 and 7 is user data
+ * which is the first physical partition (0).
+ */
+ part = (mmc->part_config >> 3) & PART_ACCESS_MASK;
+
+ if (part == 7)
+ part = 0;
+
+ err = mmc_switch_part(0, part);
+ if (err) {
+#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
+ puts("spl: mmc partition switch failed\n");
+#endif
+ return err;
+ }
+ /* Fall through */
case MMCSD_MODE_RAW:
debug("spl: mmc boot mode: raw\n");
-#ifdef CONFIG_SPL_OS_BOOT
if (!spl_start_uboot()) {
err = mmc_load_image_raw_os(mmc);
if (!err)
- return;
+ return err;
}
-#endif
-#if defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION)
+
err = mmc_load_image_raw_partition(mmc,
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION);
if (!err)
- return;
-#elif defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR)
+ return err;
+#if defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR)
err = mmc_load_image_raw_sector(mmc,
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR);
if (!err)
- return;
+ return err;
#endif
+ break;
case MMCSD_MODE_FS:
debug("spl: mmc boot mode: fs\n");
-#ifdef CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
-#ifdef CONFIG_SPL_FAT_SUPPORT
-#ifdef CONFIG_SPL_OS_BOOT
- if (!spl_start_uboot()) {
- err = spl_load_image_fat_os(&mmc->block_dev,
- CONFIG_SYS_MMCSD_FS_BOOT_PARTITION);
- if (!err)
- return;
- }
-#endif
-#ifdef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
- err = spl_load_image_fat(&mmc->block_dev,
- CONFIG_SYS_MMCSD_FS_BOOT_PARTITION,
- CONFIG_SPL_FS_LOAD_PAYLOAD_NAME);
+ err = spl_mmc_do_fs_boot(mmc);
if (!err)
- return;
-#endif
-#endif
-#ifdef CONFIG_SPL_EXT_SUPPORT
-#ifdef CONFIG_SPL_OS_BOOT
- if (!spl_start_uboot()) {
- err = spl_load_image_ext_os(&mmc->block_dev,
- CONFIG_SYS_MMCSD_FS_BOOT_PARTITION);
- if (!err)
- return;
- }
-#endif
-#ifdef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
- err = spl_load_image_ext(&mmc->block_dev,
- CONFIG_SYS_MMCSD_FS_BOOT_PARTITION,
- CONFIG_SPL_FS_LOAD_PAYLOAD_NAME);
- if (!err)
- return;
-#endif
-#endif
-#endif
-#ifdef CONFIG_SUPPORT_EMMC_BOOT
- case MMCSD_MODE_EMMCBOOT:
- /*
- * We need to check what the partition is configured to.
- * 1 and 2 match up to boot0 / boot1 and 7 is user data
- * which is the first physical partition (0).
- */
- part = (mmc->part_config >> 3) & PART_ACCESS_MASK;
-
- if (part == 7)
- part = 0;
-
- if (mmc_switch_part(0, part)) {
-#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
- puts("spl: mmc partition switch failed\n");
-#endif
- hang();
- }
+ return err;
-#ifdef CONFIG_SPL_OS_BOOT
- if (!spl_start_uboot()) {
- err = mmc_load_image_raw_os(mmc);
- if (!err)
- return;
- }
-#endif
-#if defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION)
- err = mmc_load_image_raw_partition(mmc,
- CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION);
- if (!err)
- return;
-#elif defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR)
- err = mmc_load_image_raw_sector(mmc,
- CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR);
- if (!err)
- return;
-#endif
-#endif
+ break;
case MMCSD_MODE_UNDEFINED:
- default:
#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
- if (err)
- puts("spl: mmc: no boot mode left to try\n");
- else
- puts("spl: mmc: wrong boot mode\n");
+ default:
+ puts("spl: mmc: wrong boot mode\n");
#endif
- hang();
}
+
+ return err;
}
diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
index b8c369d..3e2c074 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
@@ -11,7 +11,7 @@
#include <nand.h>
#if defined(CONFIG_SPL_NAND_RAW_ONLY)
-void spl_nand_load_image(void)
+int spl_nand_load_image(void)
{
nand_init();
@@ -20,10 +20,26 @@ void spl_nand_load_image(void)
(void *)CONFIG_SYS_NAND_U_BOOT_DST);
spl_set_header_raw_uboot();
nand_deselect();
+
+ return 0;
}
#else
-void spl_nand_load_image(void)
+static int spl_nand_load_element(int offset, struct image_header *header)
+{
+ int err;
+
+ err = nand_spl_load_image(offset, sizeof(*header), (void *)header);
+ if (err)
+ return err;
+
+ spl_parse_image_header(header);
+ return nand_spl_load_image(offset, spl_image.size,
+ (void *)(unsigned long)spl_image.load_addr);
+}
+
+int spl_nand_load_image(void)
{
+ int err;
struct image_header *header;
int *src __attribute__((unused));
int *dst __attribute__((unused));
@@ -60,10 +76,12 @@ void spl_nand_load_image(void)
spl_parse_image_header(header);
if (header->ih_os == IH_OS_LINUX) {
/* happy - was a linux */
- nand_spl_load_image(CONFIG_SYS_NAND_SPL_KERNEL_OFFS,
- spl_image.size, (void *)spl_image.load_addr);
+ err = nand_spl_load_image(
+ CONFIG_SYS_NAND_SPL_KERNEL_OFFS,
+ spl_image.size,
+ (void *)spl_image.load_addr);
nand_deselect();
- return;
+ return err;
} else {
puts("The Expected Linux image was not "
"found. Please check your NAND "
@@ -73,25 +91,14 @@ void spl_nand_load_image(void)
}
#endif
#ifdef CONFIG_NAND_ENV_DST
- nand_spl_load_image(CONFIG_ENV_OFFSET,
- sizeof(*header), (void *)header);
- spl_parse_image_header(header);
- nand_spl_load_image(CONFIG_ENV_OFFSET, spl_image.size,
- (void *)spl_image.load_addr);
+ spl_nand_load_element(CONFIG_ENV_OFFSET, header);
#ifdef CONFIG_ENV_OFFSET_REDUND
- nand_spl_load_image(CONFIG_ENV_OFFSET_REDUND,
- sizeof(*header), (void *)header);
- spl_parse_image_header(header);
- nand_spl_load_image(CONFIG_ENV_OFFSET_REDUND, spl_image.size,
- (void *)spl_image.load_addr);
+ spl_nand_load_element(CONFIG_ENV_OFFSET_REDUND, header);
#endif
#endif
/* Load u-boot */
- nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS,
- sizeof(*header), (void *)header);
- spl_parse_image_header(header);
- nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS,
- spl_image.size, (void *)(unsigned long)spl_image.load_addr);
+ err = spl_nand_load_element(CONFIG_SYS_NAND_U_BOOT_OFFS, header);
nand_deselect();
+ return err;
}
#endif
diff --git a/common/spl/spl_net.c b/common/spl/spl_net.c
index 217a435..63b20d8 100644
--- a/common/spl/spl_net.c
+++ b/common/spl/spl_net.c
@@ -8,12 +8,13 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
+#include <errno.h>
#include <spl.h>
#include <net.h>
DECLARE_GLOBAL_DATA_PTR;
-void spl_net_load_image(const char *device)
+int spl_net_load_image(const char *device)
{
int rv;
@@ -24,14 +25,16 @@ void spl_net_load_image(const char *device)
rv = eth_initialize();
if (rv == 0) {
printf("No Ethernet devices found\n");
- hang();
+ return -ENODEV;
}
if (device)
setenv("ethact", device);
rv = net_loop(BOOTP);
if (rv < 0) {
printf("Problem booting with BOOTP\n");
- hang();
+ return rv;
}
spl_parse_image_header((struct image_header *)load_addr);
+
+ return 0;
}
diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c
index c2fee01..e08afe2 100644
--- a/common/spl/spl_nor.c
+++ b/common/spl/spl_nor.c
@@ -7,7 +7,7 @@
#include <common.h>
#include <spl.h>
-void spl_nor_load_image(void)
+int spl_nor_load_image(void)
{
/*
* Loading of the payload to SDRAM is done with skipping of
@@ -43,7 +43,7 @@ void spl_nor_load_image(void)
(void *)(CONFIG_SYS_FDT_BASE),
(16 << 10));
- return;
+ return 0;
} else {
puts("The Expected Linux image was not found.\n"
"Please check your NOR configuration.\n"
@@ -62,4 +62,6 @@ void spl_nor_load_image(void)
memcpy((void *)spl_image.load_addr,
(void *)(CONFIG_SYS_UBOOT_BASE + sizeof(struct image_header)),
spl_image.size);
+
+ return 0;
}
diff --git a/common/spl/spl_onenand.c b/common/spl/spl_onenand.c
index d8d8097..af7d82e 100644
--- a/common/spl/spl_onenand.c
+++ b/common/spl/spl_onenand.c
@@ -14,7 +14,7 @@
#include <asm/io.h>
#include <onenand_uboot.h>
-void spl_onenand_load_image(void)
+int spl_onenand_load_image(void)
{
struct image_header *header;
@@ -28,4 +28,6 @@ void spl_onenand_load_image(void)
spl_parse_image_header(header);
onenand_spl_load_image(CONFIG_SYS_ONENAND_U_BOOT_OFFS,
spl_image.size, (void *)spl_image.load_addr);
+
+ return 0;
}
diff --git a/common/spl/spl_sata.c b/common/spl/spl_sata.c
index 2a5eb29..3ba4c24 100644
--- a/common/spl/spl_sata.c
+++ b/common/spl/spl_sata.c
@@ -14,12 +14,13 @@
#include <asm/u-boot.h>
#include <sata.h>
#include <scsi.h>
+#include <errno.h>
#include <fat.h>
#include <image.h>
DECLARE_GLOBAL_DATA_PTR;
-void spl_sata_load_image(void)
+int spl_sata_load_image(void)
{
int err;
block_dev_desc_t *stor_dev;
@@ -29,11 +30,13 @@ void spl_sata_load_image(void)
#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
printf("spl: sata init failed: err - %d\n", err);
#endif
- hang();
+ return err;
} else {
/* try to recognize storage devices immediately */
scsi_scan(0);
stor_dev = scsi_get_dev(0);
+ if (!stor_dev)
+ return -ENODEV;
}
#ifdef CONFIG_SPL_OS_BOOT
@@ -45,6 +48,8 @@ void spl_sata_load_image(void)
CONFIG_SPL_FS_LOAD_PAYLOAD_NAME);
if (err) {
puts("Error loading sata device\n");
- hang();
+ return err;
}
+
+ return 0;
}
diff --git a/common/spl/spl_usb.c b/common/spl/spl_usb.c
index c81672b..588b85c 100644
--- a/common/spl/spl_usb.c
+++ b/common/spl/spl_usb.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <spl.h>
#include <asm/u-boot.h>
+#include <errno.h>
#include <usb.h>
#include <fat.h>
@@ -21,7 +22,7 @@ DECLARE_GLOBAL_DATA_PTR;
static int usb_stor_curr_dev = -1; /* current device */
#endif
-void spl_usb_load_image(void)
+int spl_usb_load_image(void)
{
int err;
block_dev_desc_t *stor_dev;
@@ -32,13 +33,15 @@ void spl_usb_load_image(void)
#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
printf("%s: usb init failed: err - %d\n", __func__, err);
#endif
- hang();
+ return err;
}
#ifdef CONFIG_USB_STORAGE
/* try to recognize storage devices immediately */
usb_stor_curr_dev = usb_stor_scan(1);
stor_dev = usb_stor_get_dev(usb_stor_curr_dev);
+ if (!stor_dev)
+ return -ENODEV;
#endif
debug("boot mode - FAT\n");
@@ -51,8 +54,10 @@ void spl_usb_load_image(void)
CONFIG_SYS_USB_FAT_BOOT_PARTITION,
CONFIG_SPL_FS_LOAD_PAYLOAD_NAME);
- if (err) {
- puts("Error loading USB device\n");
- hang();
- }
+ if (err) {
+ puts("Error loading from USB device\n");
+ return err;
+ }
+
+ return 0;
}
diff --git a/common/spl/spl_ymodem.c b/common/spl/spl_ymodem.c
index 0f1e9970..380d8dd 100644
--- a/common/spl/spl_ymodem.c
+++ b/common/spl/spl_ymodem.c
@@ -23,7 +23,7 @@ static int getcymodem(void) {
return -1;
}
-void spl_ymodem_load_image(void)
+int spl_ymodem_load_image(void)
{
int size = 0;
int err;
@@ -49,11 +49,12 @@ void spl_ymodem_load_image(void)
}
} else {
printf("spl: ymodem err - %s\n", xyzModem_error(err));
- hang();
+ return ret;
}
xyzModem_stream_close(&err);
xyzModem_stream_terminate(false, &getcymodem);
printf("Loaded %d bytes\n", size);
+ return 0;
}
diff --git a/configs/10m50_defconfig b/configs/10m50_defconfig
index af2cef7..1919502 100644
--- a/configs/10m50_defconfig
+++ b/configs/10m50_defconfig
@@ -9,6 +9,7 @@ CONFIG_CMD_CPU=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_XIMG is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_ITEST is not set
CONFIG_CMD_DHCP=y
# CONFIG_CMD_NFS is not set
diff --git a/configs/3c120_defconfig b/configs/3c120_defconfig
index 736119e..8bc13f3 100644
--- a/configs/3c120_defconfig
+++ b/configs/3c120_defconfig
@@ -9,6 +9,7 @@ CONFIG_CMD_CPU=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_XIMG is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_ITEST is not set
CONFIG_CMD_DHCP=y
# CONFIG_CMD_NFS is not set
diff --git a/configs/A10-OLinuXino-Lime_defconfig b/configs/A10-OLinuXino-Lime_defconfig
index b22fdb3..af96f5b 100644
--- a/configs/A10-OLinuXino-Lime_defconfig
+++ b/configs/A10-OLinuXino-Lime_defconfig
@@ -12,4 +12,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,AHCI,SATAPWR=SUNXI_GPC(3)"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/A10s-OLinuXino-M_defconfig b/configs/A10s-OLinuXino-M_defconfig
index d9add78..cba2cfd 100644
--- a/configs/A10s-OLinuXino-M_defconfig
+++ b/configs/A10s-OLinuXino-M_defconfig
@@ -13,5 +13,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
-CONFIG_USB_EHCI_HCD=y
+CONFIG_CMD_GPIO=y
CONFIG_AXP152_POWER=y
+CONFIG_USB_EHCI_HCD=y
diff --git a/configs/A13-OLinuXinoM_defconfig b/configs/A13-OLinuXinoM_defconfig
index f438e50..45cc5ab 100644
--- a/configs/A13-OLinuXinoM_defconfig
+++ b/configs/A13-OLinuXinoM_defconfig
@@ -17,5 +17,6 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
-CONFIG_USB_EHCI_HCD=y
+CONFIG_CMD_GPIO=y
CONFIG_SUNXI_NO_PMIC=y
+CONFIG_USB_EHCI_HCD=y
diff --git a/configs/A13-OLinuXino_defconfig b/configs/A13-OLinuXino_defconfig
index 390803a..0357803 100644
--- a/configs/A13-OLinuXino_defconfig
+++ b/configs/A13-OLinuXino_defconfig
@@ -21,4 +21,5 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/A20-OLinuXino-Lime2_defconfig b/configs/A20-OLinuXino-Lime2_defconfig
index 678132c..b5181c6 100644
--- a/configs/A20-OLinuXino-Lime2_defconfig
+++ b/configs/A20-OLinuXino-Lime2_defconfig
@@ -12,5 +12,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPC(3)"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/A20-OLinuXino-Lime_defconfig b/configs/A20-OLinuXino-Lime_defconfig
index ffcdf29..e27698d 100644
--- a/configs/A20-OLinuXino-Lime_defconfig
+++ b/configs/A20-OLinuXino-Lime_defconfig
@@ -10,5 +10,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPC(3)"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/A20-OLinuXino_MICRO_defconfig b/configs/A20-OLinuXino_MICRO_defconfig
index 9507b87..03481f6 100644
--- a/configs/A20-OLinuXino_MICRO_defconfig
+++ b/configs/A20-OLinuXino_MICRO_defconfig
@@ -13,5 +13,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8)"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/A20-Olimex-SOM-EVB_defconfig b/configs/A20-Olimex-SOM-EVB_defconfig
index 0b7ab62..f616388 100644
--- a/configs/A20-Olimex-SOM-EVB_defconfig
+++ b/configs/A20-Olimex-SOM-EVB_defconfig
@@ -12,5 +12,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPC(3)"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Ainol_AW1_defconfig b/configs/Ainol_AW1_defconfig
index fc1be7d..67bea5a 100644
--- a/configs/Ainol_AW1_defconfig
+++ b/configs/Ainol_AW1_defconfig
@@ -17,4 +17,5 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/Ampe_A76_defconfig b/configs/Ampe_A76_defconfig
index 8262be5..82e01ba 100644
--- a/configs/Ampe_A76_defconfig
+++ b/configs/Ampe_A76_defconfig
@@ -19,4 +19,5 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/Auxtek-T003_defconfig b/configs/Auxtek-T003_defconfig
index 5dd9a16..8f1be3e 100644
--- a/configs/Auxtek-T003_defconfig
+++ b/configs/Auxtek-T003_defconfig
@@ -11,5 +11,6 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
-CONFIG_USB_EHCI_HCD=y
+CONFIG_CMD_GPIO=y
CONFIG_AXP152_POWER=y
+CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Auxtek-T004_defconfig b/configs/Auxtek-T004_defconfig
index c1a58d8..434b007 100644
--- a/configs/Auxtek-T004_defconfig
+++ b/configs/Auxtek-T004_defconfig
@@ -9,5 +9,6 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
-CONFIG_USB_EHCI_HCD=y
+CONFIG_CMD_GPIO=y
CONFIG_AXP152_POWER=y
+CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Bananapi_defconfig b/configs/Bananapi_defconfig
index d9b1bd6..6cbb76c 100644
--- a/configs/Bananapi_defconfig
+++ b/configs/Bananapi_defconfig
@@ -11,6 +11,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_NETCONSOLE=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Bananapro_defconfig b/configs/Bananapro_defconfig
index 9226df5..40588b9 100644
--- a/configs/Bananapro_defconfig
+++ b/configs/Bananapro_defconfig
@@ -13,6 +13,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_NETCONSOLE=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/CHIP_defconfig b/configs/CHIP_defconfig
index c4e8079..78b2c51 100644
--- a/configs/CHIP_defconfig
+++ b/configs/CHIP_defconfig
@@ -8,6 +8,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sun5i-r8-chip"
CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_GPIO=y
CONFIG_AXP_DCDC2_VOLT=1300
CONFIG_AXP_ALDO3_VOLT=3300
CONFIG_AXP_ALDO4_VOLT=3300
diff --git a/configs/CSQ_CS908_defconfig b/configs/CSQ_CS908_defconfig
index 3ffd34e..e027a47 100644
--- a/configs/CSQ_CS908_defconfig
+++ b/configs/CSQ_CS908_defconfig
@@ -11,8 +11,9 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
-CONFIG_AXP_DLDO1_VOLT=3300
CONFIG_AXP_ALDO1_VOLT=3300
+CONFIG_AXP_DLDO1_VOLT=3300
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/Chuwi_V7_CW0825_defconfig b/configs/Chuwi_V7_CW0825_defconfig
index 3257aae..dedf772 100644
--- a/configs/Chuwi_V7_CW0825_defconfig
+++ b/configs/Chuwi_V7_CW0825_defconfig
@@ -17,6 +17,7 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_MUSB_HOST=y
CONFIG_VIDEO_LCD_SPI_CS="PA0"
CONFIG_VIDEO_LCD_SPI_SCLK="PA1"
diff --git a/configs/Colombus_defconfig b/configs/Colombus_defconfig
index 2ce8cb1..feaeb98 100644
--- a/configs/Colombus_defconfig
+++ b/configs/Colombus_defconfig
@@ -21,6 +21,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_AXP_ALDO1_VOLT=3300
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Cubieboard2_defconfig b/configs/Cubieboard2_defconfig
index 4b9d722..2f5e75d 100644
--- a/configs/Cubieboard2_defconfig
+++ b/configs/Cubieboard2_defconfig
@@ -10,5 +10,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8)"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Cubieboard_defconfig b/configs/Cubieboard_defconfig
index c884115..a45fbb0 100644
--- a/configs/Cubieboard_defconfig
+++ b/configs/Cubieboard_defconfig
@@ -10,4 +10,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,AHCI,SATAPWR=SUNXI_GPB(8)"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Cubietruck_defconfig b/configs/Cubietruck_defconfig
index bb9c42a..4f4f6d4 100644
--- a/configs/Cubietruck_defconfig
+++ b/configs/Cubietruck_defconfig
@@ -12,6 +12,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPH(12)"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB0_ID_DET="PH19"
diff --git a/configs/Cyrus_P5020_defconfig b/configs/Cyrus_P5020_defconfig
index d9bee34..280e417 100644
--- a/configs/Cyrus_P5020_defconfig
+++ b/configs/Cyrus_P5020_defconfig
@@ -1,9 +1,9 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_CYRUS=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SYS_TEXT_BASE=0xFFF40000,PPC_P5020"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_NETDEVICES=y
CONFIG_E1000=y
diff --git a/configs/Cyrus_P5040_defconfig b/configs/Cyrus_P5040_defconfig
index c66238a..d34c05b 100644
--- a/configs/Cyrus_P5040_defconfig
+++ b/configs/Cyrus_P5040_defconfig
@@ -1,9 +1,9 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_CYRUS=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SYS_TEXT_BASE=0xFFF40000,PPC_P5040"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_NETDEVICES=y
CONFIG_E1000=y
diff --git a/configs/Hummingbird_A31_defconfig b/configs/Hummingbird_A31_defconfig
index 02bcdbf..83f2004 100644
--- a/configs/Hummingbird_A31_defconfig
+++ b/configs/Hummingbird_A31_defconfig
@@ -13,6 +13,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPA(21)"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_AXP_ALDO1_VOLT=3300
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Hyundai_A7HD_defconfig b/configs/Hyundai_A7HD_defconfig
index fef3685..45739cd 100644
--- a/configs/Hyundai_A7HD_defconfig
+++ b/configs/Hyundai_A7HD_defconfig
@@ -18,4 +18,5 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/Linksprite_pcDuino3_Nano_defconfig b/configs/Linksprite_pcDuino3_Nano_defconfig
index 378abce..ca3b1dd 100644
--- a/configs/Linksprite_pcDuino3_Nano_defconfig
+++ b/configs/Linksprite_pcDuino3_Nano_defconfig
@@ -12,5 +12,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPH(2)"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Linksprite_pcDuino3_defconfig b/configs/Linksprite_pcDuino3_defconfig
index c3f0421..1f245e7 100644
--- a/configs/Linksprite_pcDuino3_defconfig
+++ b/configs/Linksprite_pcDuino3_defconfig
@@ -10,5 +10,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPH(2)"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Linksprite_pcDuino_defconfig b/configs/Linksprite_pcDuino_defconfig
index 9d8d325..7e2f942 100644
--- a/configs/Linksprite_pcDuino_defconfig
+++ b/configs/Linksprite_pcDuino_defconfig
@@ -10,4 +10,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/MK808C_defconfig b/configs/MK808C_defconfig
index 49bb26a..32c65fb 100644
--- a/configs/MK808C_defconfig
+++ b/configs/MK808C_defconfig
@@ -8,4 +8,5 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/MPC8313ERDB_33_defconfig b/configs/MPC8313ERDB_33_defconfig
index a984c48..ec8d7b6 100644
--- a/configs/MPC8313ERDB_33_defconfig
+++ b/configs/MPC8313ERDB_33_defconfig
@@ -2,4 +2,5 @@ CONFIG_PPC=y
CONFIG_MPC83xx=y
CONFIG_TARGET_MPC8313ERDB=y
CONFIG_SYS_EXTRA_OPTIONS="SYS_33MHZ"
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/MPC8313ERDB_66_defconfig b/configs/MPC8313ERDB_66_defconfig
index 5b1ee7c..ed498de 100644
--- a/configs/MPC8313ERDB_66_defconfig
+++ b/configs/MPC8313ERDB_66_defconfig
@@ -2,4 +2,5 @@ CONFIG_PPC=y
CONFIG_MPC83xx=y
CONFIG_TARGET_MPC8313ERDB=y
CONFIG_SYS_EXTRA_OPTIONS="SYS_66MHZ"
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/MPC8313ERDB_NAND_33_defconfig b/configs/MPC8313ERDB_NAND_33_defconfig
index b1052ef..ed0b105 100644
--- a/configs/MPC8313ERDB_NAND_33_defconfig
+++ b/configs/MPC8313ERDB_NAND_33_defconfig
@@ -3,4 +3,5 @@ CONFIG_MPC83xx=y
CONFIG_TARGET_MPC8313ERDB=y
CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="SYS_33MHZ,NAND"
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/MPC8313ERDB_NAND_66_defconfig b/configs/MPC8313ERDB_NAND_66_defconfig
index fe59fe8..4dfb715 100644
--- a/configs/MPC8313ERDB_NAND_66_defconfig
+++ b/configs/MPC8313ERDB_NAND_66_defconfig
@@ -3,4 +3,5 @@ CONFIG_MPC83xx=y
CONFIG_TARGET_MPC8313ERDB=y
CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="SYS_66MHZ,NAND"
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/MSI_Primo73_defconfig b/configs/MSI_Primo73_defconfig
index 5559444..73fd4e8 100644
--- a/configs/MSI_Primo73_defconfig
+++ b/configs/MSI_Primo73_defconfig
@@ -13,3 +13,4 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
diff --git a/configs/MSI_Primo81_defconfig b/configs/MSI_Primo81_defconfig
index 3d71bf5..11f3203 100644
--- a/configs/MSI_Primo81_defconfig
+++ b/configs/MSI_Primo81_defconfig
@@ -16,6 +16,7 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_AXP_DLDO1_VOLT=3300
CONFIG_USB_MUSB_HOST=y
CONFIG_VIDEO_LCD_SSD2828_TX_CLK=27
diff --git a/configs/Marsboard_A10_defconfig b/configs/Marsboard_A10_defconfig
index 4933659..5689cff 100644
--- a/configs/Marsboard_A10_defconfig
+++ b/configs/Marsboard_A10_defconfig
@@ -8,4 +8,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,AHCI"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Mele_A1000G_quad_defconfig b/configs/Mele_A1000G_quad_defconfig
index e81e6b6..6127098 100644
--- a/configs/Mele_A1000G_quad_defconfig
+++ b/configs/Mele_A1000G_quad_defconfig
@@ -11,10 +11,11 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_AXP_DCDC1_VOLT=3300
+CONFIG_AXP_ALDO1_VOLT=3300
CONFIG_AXP_DLDO1_VOLT=3300
CONFIG_AXP_DLDO4_VOLT=3300
-CONFIG_AXP_ALDO1_VOLT=3300
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/Mele_A1000_defconfig b/configs/Mele_A1000_defconfig
index f076e30..93707e4 100644
--- a/configs/Mele_A1000_defconfig
+++ b/configs/Mele_A1000_defconfig
@@ -10,4 +10,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,MACPWR=SUNXI_GPH(15),AHCI"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Mele_I7_defconfig b/configs/Mele_I7_defconfig
index 38cd845..bfe2a29 100644
--- a/configs/Mele_I7_defconfig
+++ b/configs/Mele_I7_defconfig
@@ -11,9 +11,10 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_AXP_DCDC1_VOLT=3300
+CONFIG_AXP_ALDO1_VOLT=3300
CONFIG_AXP_DLDO1_VOLT=3300
CONFIG_AXP_DLDO4_VOLT=3300
-CONFIG_AXP_ALDO1_VOLT=3300
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Mele_M3_defconfig b/configs/Mele_M3_defconfig
index d72dcc0..0ed5da1 100644
--- a/configs/Mele_M3_defconfig
+++ b/configs/Mele_M3_defconfig
@@ -13,5 +13,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Mele_M5_defconfig b/configs/Mele_M5_defconfig
index 0d1ba15..fdb5ba4 100644
--- a/configs/Mele_M5_defconfig
+++ b/configs/Mele_M5_defconfig
@@ -12,5 +12,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,AHCI,STATUSLED=234"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Mele_M9_defconfig b/configs/Mele_M9_defconfig
index 93a28a6..da76226 100644
--- a/configs/Mele_M9_defconfig
+++ b/configs/Mele_M9_defconfig
@@ -11,9 +11,10 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_AXP_DCDC1_VOLT=3300
+CONFIG_AXP_ALDO1_VOLT=3300
CONFIG_AXP_DLDO1_VOLT=3300
CONFIG_AXP_DLDO4_VOLT=3300
-CONFIG_AXP_ALDO1_VOLT=3300
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Merrii_A80_Optimus_defconfig b/configs/Merrii_A80_Optimus_defconfig
index 53e023a..1eb8094 100644
--- a/configs/Merrii_A80_Optimus_defconfig
+++ b/configs/Merrii_A80_Optimus_defconfig
@@ -11,3 +11,4 @@ CONFIG_DEFAULT_DEVICE_TREE="sun9i-a80-optimus"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
diff --git a/configs/Mini-X_defconfig b/configs/Mini-X_defconfig
index 53f9bfe..8013359 100644
--- a/configs/Mini-X_defconfig
+++ b/configs/Mini-X_defconfig
@@ -9,5 +9,6 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/Orangepi_defconfig b/configs/Orangepi_defconfig
index 00c671b..330ee47 100644
--- a/configs/Orangepi_defconfig
+++ b/configs/Orangepi_defconfig
@@ -14,5 +14,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Orangepi_mini_defconfig b/configs/Orangepi_mini_defconfig
index a865255..4156c35 100644
--- a/configs/Orangepi_mini_defconfig
+++ b/configs/Orangepi_mini_defconfig
@@ -16,5 +16,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Sinlinx_SinA33_defconfig b/configs/Sinlinx_SinA33_defconfig
index 013c35e..20d3f93 100644
--- a/configs/Sinlinx_SinA33_defconfig
+++ b/configs/Sinlinx_SinA33_defconfig
@@ -9,3 +9,4 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
diff --git a/configs/Sinovoip_BPI_M2_defconfig b/configs/Sinovoip_BPI_M2_defconfig
index 17c30a8..a5f8e6a 100644
--- a/configs/Sinovoip_BPI_M2_defconfig
+++ b/configs/Sinovoip_BPI_M2_defconfig
@@ -11,8 +11,9 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
-CONFIG_AXP_DLDO1_VOLT=3000
CONFIG_AXP_ALDO1_VOLT=3300
CONFIG_AXP_ALDO2_VOLT=1800
+CONFIG_AXP_DLDO1_VOLT=3000
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/UCP1020_SPIFLASH_defconfig b/configs/UCP1020_SPIFLASH_defconfig
index 267dc0f..d06e5fa 100644
--- a/configs/UCP1020_SPIFLASH_defconfig
+++ b/configs/UCP1020_SPIFLASH_defconfig
@@ -5,6 +5,7 @@ CONFIG_TARGET_UCP1020_SPIFLASH=y
CONFIG_AUTOBOOT_KEYED=y
CONFIG_AUTOBOOT_PROMPT="Autobooting in %d seconds, press \"<Esc>\" to stop\n"
CONFIG_AUTOBOOT_STOP_STR="\x1b"
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
CONFIG_NETDEVICES=y
CONFIG_E1000=y
diff --git a/configs/UCP1020_defconfig b/configs/UCP1020_defconfig
index fa54286..043e617 100644
--- a/configs/UCP1020_defconfig
+++ b/configs/UCP1020_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_PROMPT="B$ "
CONFIG_AUTOBOOT_KEYED=y
CONFIG_AUTOBOOT_PROMPT="Autobooting in %d seconds, press \"<Esc>\" to stop\n"
CONFIG_AUTOBOOT_STOP_STR="\x1b"
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
CONFIG_NETDEVICES=y
CONFIG_E1000=y
diff --git a/configs/UTOO_P66_defconfig b/configs/UTOO_P66_defconfig
index d36a5dc..dc71dde 100644
--- a/configs/UTOO_P66_defconfig
+++ b/configs/UTOO_P66_defconfig
@@ -23,5 +23,6 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_REQUIRE_SERIAL_CONSOLE is not set
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/Wexler_TAB7200_defconfig b/configs/Wexler_TAB7200_defconfig
index 5f3d624..a01b4c1 100644
--- a/configs/Wexler_TAB7200_defconfig
+++ b/configs/Wexler_TAB7200_defconfig
@@ -16,5 +16,6 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/Wits_Pro_A20_DKT_defconfig b/configs/Wits_Pro_A20_DKT_defconfig
index bfc8cba..c3ceedb 100644
--- a/configs/Wits_Pro_A20_DKT_defconfig
+++ b/configs/Wits_Pro_A20_DKT_defconfig
@@ -15,5 +15,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,AHCI"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Wobo_i5_defconfig b/configs/Wobo_i5_defconfig
index fc43cc5..eb1b531 100644
--- a/configs/Wobo_i5_defconfig
+++ b/configs/Wobo_i5_defconfig
@@ -10,4 +10,5 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Yones_Toptech_BD1078_defconfig b/configs/Yones_Toptech_BD1078_defconfig
index 65c1d8e..cdde2bc 100644
--- a/configs/Yones_Toptech_BD1078_defconfig
+++ b/configs/Yones_Toptech_BD1078_defconfig
@@ -22,4 +22,5 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/am335x_baltos_defconfig b/configs/am335x_baltos_defconfig
index 8e8a897..a0d4328 100644
--- a/configs/am335x_baltos_defconfig
+++ b/configs/am335x_baltos_defconfig
@@ -1,11 +1,12 @@
CONFIG_ARM=y
CONFIG_TARGET_AM335X_BALTOS=y
+CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_SYS_EXTRA_OPTIONS="NAND"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/am335x_boneblack_defconfig b/configs/am335x_boneblack_defconfig
index 6b1a554..c5c7b5d 100644
--- a/configs/am335x_boneblack_defconfig
+++ b/configs/am335x_boneblack_defconfig
@@ -1,11 +1,12 @@
CONFIG_ARM=y
CONFIG_TARGET_AM335X_EVM=y
+CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SYS_EXTRA_OPTIONS="EMMC_BOOT"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_DFU_TFTP=y
CONFIG_SPI_FLASH=y
diff --git a/configs/am335x_boneblack_vboot_defconfig b/configs/am335x_boneblack_vboot_defconfig
index 011239b..e93f6ac 100644
--- a/configs/am335x_boneblack_vboot_defconfig
+++ b/configs/am335x_boneblack_vboot_defconfig
@@ -1,17 +1,18 @@
CONFIG_ARM=y
CONFIG_TARGET_AM335X_EVM=y
+CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_DEFAULT_DEVICE_TREE="am335x-boneblack"
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_FIT_SIGNATURE=y
CONFIG_SYS_EXTRA_OPTIONS="EMMC_BOOT,ENABLE_VBOOT"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_OF_CONTROL=y
+CONFIG_DM_MMC=y
CONFIG_SPI_FLASH=y
CONFIG_DM_ETH=y
-CONFIG_DM_MMC=y
diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig
index 96599c6..0fa3720 100644
--- a/configs/am335x_evm_defconfig
+++ b/configs/am335x_evm_defconfig
@@ -1,10 +1,11 @@
CONFIG_ARM=y
CONFIG_TARGET_AM335X_EVM=y
+CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SYS_EXTRA_OPTIONS="NAND"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/am335x_evm_nor_defconfig b/configs/am335x_evm_nor_defconfig
index 6a39041..5d89104 100644
--- a/configs/am335x_evm_nor_defconfig
+++ b/configs/am335x_evm_nor_defconfig
@@ -1,10 +1,11 @@
CONFIG_ARM=y
CONFIG_TARGET_AM335X_EVM=y
+CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_NOR=y
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SYS_EXTRA_OPTIONS="NAND"
# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/am335x_evm_norboot_defconfig b/configs/am335x_evm_norboot_defconfig
index 9fdffca..ffc0b09 100644
--- a/configs/am335x_evm_norboot_defconfig
+++ b/configs/am335x_evm_norboot_defconfig
@@ -3,5 +3,6 @@ CONFIG_TARGET_AM335X_EVM=y
CONFIG_NOR=y
CONFIG_NOR_BOOT=y
# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/am335x_evm_spiboot_defconfig b/configs/am335x_evm_spiboot_defconfig
index bbeb3c9..de4f586 100644
--- a/configs/am335x_evm_spiboot_defconfig
+++ b/configs/am335x_evm_spiboot_defconfig
@@ -1,10 +1,11 @@
CONFIG_ARM=y
CONFIG_TARGET_AM335X_EVM=y
+CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SYS_EXTRA_OPTIONS="SPI_BOOT"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/am335x_evm_usbspl_defconfig b/configs/am335x_evm_usbspl_defconfig
index c6109f1..496b709 100644
--- a/configs/am335x_evm_usbspl_defconfig
+++ b/configs/am335x_evm_usbspl_defconfig
@@ -1,10 +1,11 @@
CONFIG_ARM=y
CONFIG_TARGET_AM335X_EVM=y
+CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SYS_EXTRA_OPTIONS="NAND,SPL_USBETH_SUPPORT"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/am335x_gp_evm_defconfig b/configs/am335x_gp_evm_defconfig
index 03c558c..f5cd48c 100644
--- a/configs/am335x_gp_evm_defconfig
+++ b/configs/am335x_gp_evm_defconfig
@@ -1,15 +1,16 @@
CONFIG_ARM=y
CONFIG_TARGET_AM335X_EVM=y
+CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_DEFAULT_DEVICE_TREE="am335x-evm"
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SYS_EXTRA_OPTIONS="NAND"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_OF_CONTROL=y
+CONFIG_DM_MMC=y
CONFIG_SPI_FLASH=y
-CONFIG_RSA=y
CONFIG_DM_ETH=y
-CONFIG_DM_MMC=y
+CONFIG_RSA=y
diff --git a/configs/am335x_igep0033_defconfig b/configs/am335x_igep0033_defconfig
index a31982a..6175aba 100644
--- a/configs/am335x_igep0033_defconfig
+++ b/configs/am335x_igep0033_defconfig
@@ -1,8 +1,9 @@
CONFIG_ARM=y
CONFIG_TARGET_AM335X_IGEP0033=y
+CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x82000000
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/am335x_sl50_defconfig b/configs/am335x_sl50_defconfig
index 608804c..e810fdc 100644
--- a/configs/am335x_sl50_defconfig
+++ b/configs/am335x_sl50_defconfig
@@ -1,9 +1,10 @@
CONFIG_ARM=y
CONFIG_TARGET_AM335X_SL50=y
+CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SYS_EXTRA_OPTIONS="EMMC_BOOT"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/am437x_gp_evm_defconfig b/configs/am437x_gp_evm_defconfig
index 53fb0bf..f69e97e 100644
--- a/configs/am437x_gp_evm_defconfig
+++ b/configs/am437x_gp_evm_defconfig
@@ -1,17 +1,17 @@
CONFIG_ARM=y
CONFIG_TARGET_AM43XX_EVM=y
+CONFIG_DM_SERIAL=y
+CONFIG_DM_GPIO=y
+CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_DEFAULT_DEVICE_TREE="am437x-gp-evm"
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=1"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_OF_CONTROL=y
-CONFIG_SPL_DISABLE_OF_CONTROL=y
CONFIG_DM=y
-CONFIG_SPI_FLASH=y
-CONFIG_DM_GPIO=y
-CONFIG_DM_SERIAL=y
CONFIG_DM_MMC=y
+CONFIG_SPI_FLASH=y
diff --git a/configs/am437x_sk_evm_defconfig b/configs/am437x_sk_evm_defconfig
index 02485f8..1a0b518 100644
--- a/configs/am437x_sk_evm_defconfig
+++ b/configs/am437x_sk_evm_defconfig
@@ -1,17 +1,17 @@
CONFIG_ARM=y
CONFIG_TARGET_AM43XX_EVM=y
+CONFIG_DM_SERIAL=y
+CONFIG_DM_GPIO=y
+CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_DEFAULT_DEVICE_TREE="am437x-sk-evm"
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=1"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_OF_CONTROL=y
-CONFIG_SPL_DISABLE_OF_CONTROL=y
CONFIG_DM=y
-CONFIG_SPI_FLASH=y
-CONFIG_DM_GPIO=y
-CONFIG_DM_SERIAL=y
CONFIG_DM_MMC=y
+CONFIG_SPI_FLASH=y
diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig
index f84f57d..49a617f 100644
--- a/configs/am43xx_evm_defconfig
+++ b/configs/am43xx_evm_defconfig
@@ -4,6 +4,7 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NAND"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
diff --git a/configs/am43xx_evm_ethboot_defconfig b/configs/am43xx_evm_ethboot_defconfig
index 2d1a301..9eb9972 100644
--- a/configs/am43xx_evm_ethboot_defconfig
+++ b/configs/am43xx_evm_ethboot_defconfig
@@ -4,5 +4,6 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NAND,SPL_ETH_SUPPORT"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/am43xx_evm_qspiboot_defconfig b/configs/am43xx_evm_qspiboot_defconfig
index ff0109f..f6a24cc 100644
--- a/configs/am43xx_evm_qspiboot_defconfig
+++ b/configs/am43xx_evm_qspiboot_defconfig
@@ -3,5 +3,6 @@ CONFIG_TARGET_AM43XX_EVM=y
CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,QSPI,QSPI_BOOT"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig
index 2a6c3dc..a5f2b9f 100644
--- a/configs/am43xx_evm_usbhost_boot_defconfig
+++ b/configs/am43xx_evm_usbhost_boot_defconfig
@@ -4,5 +4,6 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NAND,SPL_USB_HOST_SUPPORT"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/am57xx_evm_defconfig b/configs/am57xx_evm_defconfig
index f6566bf..8d6fd1e 100644
--- a/configs/am57xx_evm_defconfig
+++ b/configs/am57xx_evm_defconfig
@@ -1,19 +1,20 @@
CONFIG_ARM=y
CONFIG_OMAP54XX=y
CONFIG_TARGET_BEAGLE_X15=y
+CONFIG_DM_SERIAL=y
+CONFIG_DM_GPIO=y
+CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_DEFAULT_DEVICE_TREE="am57xx-beagle-x15"
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=3"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_OF_CONTROL=y
CONFIG_DM=y
+CONFIG_DM_MMC=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
-CONFIG_DM_GPIO=y
-CONFIG_DM_SERIAL=y
-CONFIG_DM_MMC=y
diff --git a/configs/beagle_x15_defconfig b/configs/am57xx_evm_nodt_defconfig
index 3b3c027..eb402b8 100644
--- a/configs/beagle_x15_defconfig
+++ b/configs/am57xx_evm_nodt_defconfig
@@ -5,4 +5,5 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=3"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/apalis_t30_defconfig b/configs/apalis_t30_defconfig
index 8971d29..e882883 100644
--- a/configs/apalis_t30_defconfig
+++ b/configs/apalis_t30_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="Apalis T30 # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_NFS is not set
CONFIG_NETDEVICES=y
CONFIG_E1000=y
diff --git a/configs/aristainetos2_defconfig b/configs/aristainetos2_defconfig
index e43f6eb..acce983 100644
--- a/configs/aristainetos2_defconfig
+++ b/configs/aristainetos2_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_ARISTAINETOS2=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/aristainetos/aristainetos2.cfg,MX6DL"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/aristainetos2b_defconfig b/configs/aristainetos2b_defconfig
index af2dbc6..45e63ed 100644
--- a/configs/aristainetos2b_defconfig
+++ b/configs/aristainetos2b_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_ARISTAINETOS2B=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/aristainetos/aristainetos2.cfg,MX6DL"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/aristainetos_defconfig b/configs/aristainetos_defconfig
index e6affed..5e9f220 100644
--- a/configs/aristainetos_defconfig
+++ b/configs/aristainetos_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_ARISTAINETOS=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/aristainetos/aristainetos.cfg,MX6DL"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/arndale_defconfig b/configs/arndale_defconfig
index 6cc6642..ee47a3d 100644
--- a/configs/arndale_defconfig
+++ b/configs/arndale_defconfig
@@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="exynos5250-arndale"
CONFIG_SPL=y
CONFIG_SYS_PROMPT="ARNDALE # "
# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_SOUND=y
CONFIG_DM_I2C_COMPAT=y
diff --git a/configs/axs101_defconfig b/configs/axs101_defconfig
index fdb3149..8e5d2e5 100644
--- a/configs/axs101_defconfig
+++ b/configs/axs101_defconfig
@@ -1,12 +1,21 @@
CONFIG_ARC=y
CONFIG_SYS_DCACHE_OFF=y
CONFIG_ARC_CACHE_LINE_SHIFT=5
+CONFIG_DM_SERIAL=y
CONFIG_SYS_CLK_FREQ=750000000
CONFIG_SYS_TEXT_BASE=0x81000000
+CONFIG_DEFAULT_DEVICE_TREE="axs10x"
CONFIG_SYS_PROMPT="AXS# "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_SETEXPR is not set
-CONFIG_NETDEVICES=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_PING=y
+CONFIG_OF_CONTROL=y
+CONFIG_OF_EMBED=y
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_USE_PRIVATE_LIBGCC=y
diff --git a/configs/axs103_defconfig b/configs/axs103_defconfig
index b3dbb8d..cbd63fe 100644
--- a/configs/axs103_defconfig
+++ b/configs/axs103_defconfig
@@ -1,11 +1,20 @@
CONFIG_ARC=y
CONFIG_ISA_ARCV2=y
+CONFIG_DM_SERIAL=y
CONFIG_SYS_CLK_FREQ=50000000
CONFIG_SYS_TEXT_BASE=0x81000000
+CONFIG_DEFAULT_DEVICE_TREE="axs10x"
CONFIG_SYS_PROMPT="AXS# "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_SETEXPR is not set
-CONFIG_NETDEVICES=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_PING=y
+CONFIG_OF_CONTROL=y
+CONFIG_OF_EMBED=y
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_USE_PRIVATE_LIBGCC=y
diff --git a/configs/ba10_tv_box_defconfig b/configs/ba10_tv_box_defconfig
index 1cfb380..ce4a584 100644
--- a/configs/ba10_tv_box_defconfig
+++ b/configs/ba10_tv_box_defconfig
@@ -13,5 +13,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/bayleybay_defconfig b/configs/bayleybay_defconfig
index fc40da8..a36a501 100644
--- a/configs/bayleybay_defconfig
+++ b/configs/bayleybay_defconfig
@@ -12,6 +12,7 @@ CONFIG_GENERATE_MP_TABLE=y
CONFIG_CMD_CPU=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_BOOTSTAGE=y
diff --git a/configs/bcm11130_defconfig b/configs/bcm11130_defconfig
index e7a9aa6..ce1e805 100644
--- a/configs/bcm11130_defconfig
+++ b/configs/bcm11130_defconfig
@@ -3,6 +3,7 @@ CONFIG_TARGET_BCM28155_AP=y
CONFIG_SYS_EXTRA_OPTIONS="SYS_MMC_ENV_DEV=0"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NET is not set
# CONFIG_CMD_NFS is not set
diff --git a/configs/bcm11130_nand_defconfig b/configs/bcm11130_nand_defconfig
index f50ffea..a0b5b01 100644
--- a/configs/bcm11130_nand_defconfig
+++ b/configs/bcm11130_nand_defconfig
@@ -3,6 +3,7 @@ CONFIG_TARGET_BCM28155_AP=y
CONFIG_SYS_EXTRA_OPTIONS="NAND"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NET is not set
# CONFIG_CMD_NFS is not set
diff --git a/configs/bcm28155_ap_defconfig b/configs/bcm28155_ap_defconfig
index c82383e..38ed8da 100644
--- a/configs/bcm28155_ap_defconfig
+++ b/configs/bcm28155_ap_defconfig
@@ -2,6 +2,7 @@ CONFIG_ARM=y
CONFIG_TARGET_BCM28155_AP=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NET is not set
# CONFIG_CMD_NFS is not set
diff --git a/configs/bcm28155_w1d_defconfig b/configs/bcm28155_w1d_defconfig
index bc0d8d2..d7e27ea 100644
--- a/configs/bcm28155_w1d_defconfig
+++ b/configs/bcm28155_w1d_defconfig
@@ -3,6 +3,7 @@ CONFIG_TARGET_BCM28155_AP=y
CONFIG_SYS_EXTRA_OPTIONS="BCM_SF2_ETH,BCM_SF2_ETH_GMAC"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NET is not set
# CONFIG_CMD_NFS is not set
diff --git a/configs/bct-brettl2_defconfig b/configs/bct-brettl2_defconfig
index efcfe4d..7cc0e4e 100644
--- a/configs/bct-brettl2_defconfig
+++ b/configs/bct-brettl2_defconfig
@@ -1,4 +1,5 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_BCT_BRETTL2=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_NET_RANDOM_ETHADDR=y
diff --git a/configs/beaver_defconfig b/configs/beaver_defconfig
index 4a6f6e4..45c0c29 100644
--- a/configs/beaver_defconfig
+++ b/configs/beaver_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="Tegra30 (Beaver) # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/bf518f-ezbrd_defconfig b/configs/bf518f-ezbrd_defconfig
index c316914..430fc7c 100644
--- a/configs/bf518f-ezbrd_defconfig
+++ b/configs/bf518f-ezbrd_defconfig
@@ -1,5 +1,6 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_BF518F_EZBRD=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPI_FLASH=y
diff --git a/configs/bf526-ezbrd_defconfig b/configs/bf526-ezbrd_defconfig
index 624484c..6a652a0 100644
--- a/configs/bf526-ezbrd_defconfig
+++ b/configs/bf526-ezbrd_defconfig
@@ -1,5 +1,6 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_BF526_EZBRD=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPI_FLASH=y
diff --git a/configs/bf527-ad7160-eval_defconfig b/configs/bf527-ad7160-eval_defconfig
index b03a2ac..3b9e374 100644
--- a/configs/bf527-ad7160-eval_defconfig
+++ b/configs/bf527-ad7160-eval_defconfig
@@ -1,6 +1,7 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_BF527_AD7160_EVAL=y
# CONFIG_CMD_BOOTD is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NET is not set
# CONFIG_CMD_NFS is not set
diff --git a/configs/bf527-ezkit-v2_defconfig b/configs/bf527-ezkit-v2_defconfig
index ad29088..53679ca 100644
--- a/configs/bf527-ezkit-v2_defconfig
+++ b/configs/bf527-ezkit-v2_defconfig
@@ -1,6 +1,7 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_BF527_EZKIT=y
CONFIG_SYS_EXTRA_OPTIONS="BF527_EZKIT_REV_2_1"
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
CONFIG_LIB_RAND=y
diff --git a/configs/bf527-sdp_defconfig b/configs/bf527-sdp_defconfig
index cb43de1..f422f42 100644
--- a/configs/bf527-sdp_defconfig
+++ b/configs/bf527-sdp_defconfig
@@ -1,6 +1,7 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_BF527_SDP=y
# CONFIG_CMD_BOOTD is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NET is not set
# CONFIG_CMD_NFS is not set
diff --git a/configs/bf533-ezkit_defconfig b/configs/bf533-ezkit_defconfig
index 54a09aa..6a39874 100644
--- a/configs/bf533-ezkit_defconfig
+++ b/configs/bf533-ezkit_defconfig
@@ -1,5 +1,6 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_BF533_EZKIT=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
CONFIG_LIB_RAND=y
diff --git a/configs/bf533-stamp_defconfig b/configs/bf533-stamp_defconfig
index 4956078..e52587f 100644
--- a/configs/bf533-stamp_defconfig
+++ b/configs/bf533-stamp_defconfig
@@ -1,5 +1,6 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_BF533_STAMP=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
# CONFIG_REGEX is not set
diff --git a/configs/bf537-pnav_defconfig b/configs/bf537-pnav_defconfig
index 3fa1758..88a3ef1 100644
--- a/configs/bf537-pnav_defconfig
+++ b/configs/bf537-pnav_defconfig
@@ -1,5 +1,6 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_BF537_PNAV=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPI_FLASH=y
diff --git a/configs/bf537-stamp_defconfig b/configs/bf537-stamp_defconfig
index a60c1b7..1b3d313 100644
--- a/configs/bf537-stamp_defconfig
+++ b/configs/bf537-stamp_defconfig
@@ -1,5 +1,6 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_BF537_STAMP=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPI_FLASH=y
diff --git a/configs/bf538f-ezkit_defconfig b/configs/bf538f-ezkit_defconfig
index 0edaae5..48ad582 100644
--- a/configs/bf538f-ezkit_defconfig
+++ b/configs/bf538f-ezkit_defconfig
@@ -1,5 +1,6 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_BF538F_EZKIT=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_REGEX is not set
CONFIG_LIB_RAND=y
diff --git a/configs/bf548-ezkit_defconfig b/configs/bf548-ezkit_defconfig
index 1ded34d..2825754 100644
--- a/configs/bf548-ezkit_defconfig
+++ b/configs/bf548-ezkit_defconfig
@@ -1,5 +1,6 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_BF548_EZKIT=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
diff --git a/configs/bf561-acvilon_defconfig b/configs/bf561-acvilon_defconfig
index c546421..cb813ea 100644
--- a/configs/bf561-acvilon_defconfig
+++ b/configs/bf561-acvilon_defconfig
@@ -3,6 +3,7 @@ CONFIG_TARGET_BF561_ACVILON=y
CONFIG_SYS_PROMPT="Acvilon> "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
diff --git a/configs/bf561-ezkit_defconfig b/configs/bf561-ezkit_defconfig
index fa4b611..8a24403 100644
--- a/configs/bf561-ezkit_defconfig
+++ b/configs/bf561-ezkit_defconfig
@@ -1,5 +1,6 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_BF561_EZKIT=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
CONFIG_LIB_RAND=y
diff --git a/configs/bf609-ezkit_defconfig b/configs/bf609-ezkit_defconfig
index bb5efa9..4f9b272 100644
--- a/configs/bf609-ezkit_defconfig
+++ b/configs/bf609-ezkit_defconfig
@@ -1,5 +1,6 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_BF609_EZKIT=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
CONFIG_NETDEVICES=y
diff --git a/configs/bg0900_defconfig b/configs/bg0900_defconfig
index a29ad01..2cb8831 100644
--- a/configs/bg0900_defconfig
+++ b/configs/bg0900_defconfig
@@ -3,5 +3,6 @@ CONFIG_TARGET_BG0900=y
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
diff --git a/configs/birdland_bav335a_defconfig b/configs/birdland_bav335a_defconfig
index 244c770..75549d3 100644
--- a/configs/birdland_bav335a_defconfig
+++ b/configs/birdland_bav335a_defconfig
@@ -5,5 +5,6 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/birdland_bav335b_defconfig b/configs/birdland_bav335b_defconfig
index a86b203..11ee51a 100644
--- a/configs/birdland_bav335b_defconfig
+++ b/configs/birdland_bav335b_defconfig
@@ -5,5 +5,6 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/br4_defconfig b/configs/br4_defconfig
index 5a680a0..272b96e 100644
--- a/configs/br4_defconfig
+++ b/configs/br4_defconfig
@@ -3,6 +3,7 @@ CONFIG_TARGET_BR4=y
CONFIG_SYS_PROMPT="br4>"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
diff --git a/configs/cairo_defconfig b/configs/cairo_defconfig
index b1df103..356f549 100644
--- a/configs/cairo_defconfig
+++ b/configs/cairo_defconfig
@@ -7,4 +7,5 @@ CONFIG_SYS_PROMPT="Cairo # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_NET is not set
diff --git a/configs/calimain_defconfig b/configs/calimain_defconfig
index 271b556..6dd5b52 100644
--- a/configs/calimain_defconfig
+++ b/configs/calimain_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_CALIMAIN=y
CONFIG_SYS_PROMPT="Calimain > "
CONFIG_AUTOBOOT_KEYED=y
CONFIG_AUTOBOOT_STOP_STR="\x0b"
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/cardhu_defconfig b/configs/cardhu_defconfig
index 722bbeb..c454ffe 100644
--- a/configs/cardhu_defconfig
+++ b/configs/cardhu_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="Tegra30 (Cardhu) # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/cgtqmx6qeval_defconfig b/configs/cgtqmx6qeval_defconfig
index fdbcc22..497d833 100644
--- a/configs/cgtqmx6qeval_defconfig
+++ b/configs/cgtqmx6qeval_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/congatec/cgtqmx6eval/imximage.cfg,MX6
CONFIG_SYS_PROMPT="CGT-QMX6-Quad U-Boot > "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_DM=y
CONFIG_DM_THERMAL=y
diff --git a/configs/chromebook_jerry_defconfig b/configs/chromebook_jerry_defconfig
index 3ded392..f3f5b21 100644
--- a/configs/chromebook_jerry_defconfig
+++ b/configs/chromebook_jerry_defconfig
@@ -3,9 +3,9 @@ CONFIG_ARCH_ROCKCHIP=y
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_ROCKCHIP_RK3288=y
CONFIG_TARGET_CHROMEBOOK_JERRY=y
+CONFIG_SPL_STACK_R_ADDR=0x80000
CONFIG_DEFAULT_DEVICE_TREE="rk3288-jerry"
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x80000
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_PMIC=y
diff --git a/configs/chromebook_link_defconfig b/configs/chromebook_link_defconfig
index 0b75781..d68fa41 100644
--- a/configs/chromebook_link_defconfig
+++ b/configs/chromebook_link_defconfig
@@ -8,6 +8,7 @@ CONFIG_ENABLE_MRC_CACHE=y
CONFIG_HAVE_VGA_BIOS=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_BOOTSTAGE=y
@@ -27,7 +28,6 @@ CONFIG_DEBUG_UART_NS16550=y
CONFIG_DEBUG_UART_BASE=0x3f8
CONFIG_DEBUG_UART_CLOCK=1843200
CONFIG_DEBUG_UART_BOARD_INIT=y
-CONFIG_DM_TPM=y
CONFIG_TPM_TIS_LPC=y
CONFIG_VIDEO_VESA=y
CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
diff --git a/configs/chromebox_panther_defconfig b/configs/chromebox_panther_defconfig
index 663aab0..52336d5 100644
--- a/configs/chromebox_panther_defconfig
+++ b/configs/chromebox_panther_defconfig
@@ -7,6 +7,7 @@ CONFIG_ENABLE_MRC_CACHE=y
CONFIG_HAVE_VGA_BIOS=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_BOOTSTAGE=y
@@ -21,7 +22,6 @@ CONFIG_CROS_EC_LPC=y
CONFIG_SPI_FLASH=y
CONFIG_DM_PCI=y
CONFIG_DM_RTC=y
-CONFIG_DM_TPM=y
CONFIG_TPM_TIS_LPC=y
CONFIG_VIDEO_VESA=y
CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
diff --git a/configs/cm-bf527_defconfig b/configs/cm-bf527_defconfig
index 88d7f08..058e371 100644
--- a/configs/cm-bf527_defconfig
+++ b/configs/cm-bf527_defconfig
@@ -1,5 +1,6 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_CM_BF527=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
diff --git a/configs/cm-bf533_defconfig b/configs/cm-bf533_defconfig
index 753ffe1..a14c343 100644
--- a/configs/cm-bf533_defconfig
+++ b/configs/cm-bf533_defconfig
@@ -1,5 +1,6 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_CM_BF533=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
CONFIG_LIB_RAND=y
diff --git a/configs/cm-bf537e_defconfig b/configs/cm-bf537e_defconfig
index 137f19a..8cfb2b4 100644
--- a/configs/cm-bf537e_defconfig
+++ b/configs/cm-bf537e_defconfig
@@ -1,5 +1,6 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_CM_BF537E=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
diff --git a/configs/cm-bf537u_defconfig b/configs/cm-bf537u_defconfig
index 143b583..0dd30a8 100644
--- a/configs/cm-bf537u_defconfig
+++ b/configs/cm-bf537u_defconfig
@@ -1,5 +1,6 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_CM_BF537U=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
diff --git a/configs/cm-bf548_defconfig b/configs/cm-bf548_defconfig
index 49d59dd..30abb47 100644
--- a/configs/cm-bf548_defconfig
+++ b/configs/cm-bf548_defconfig
@@ -1,5 +1,6 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_CM_BF548=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
# CONFIG_REGEX is not set
diff --git a/configs/cm-bf561_defconfig b/configs/cm-bf561_defconfig
index 68d4bb9..1adbfc3 100644
--- a/configs/cm-bf561_defconfig
+++ b/configs/cm-bf561_defconfig
@@ -1,5 +1,6 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_CM_BF561=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
CONFIG_LIB_RAND=y
diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig
index bcd1820..528251c 100644
--- a/configs/cm_fx6_defconfig
+++ b/configs/cm_fx6_defconfig
@@ -13,6 +13,7 @@ CONFIG_CMD_SF=y
CONFIG_CMD_I2C=y
CONFIG_CMD_USB=y
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_DHCP=y
CONFIG_CMD_PING=y
diff --git a/configs/cm_t335_defconfig b/configs/cm_t335_defconfig
index 7288484..f0bfd6f 100644
--- a/configs/cm_t335_defconfig
+++ b/configs/cm_t335_defconfig
@@ -4,4 +4,5 @@ CONFIG_SPL=y
CONFIG_SYS_PROMPT="CM-T335 # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/cm_t3517_defconfig b/configs/cm_t3517_defconfig
index d224b20..a0cf5d8 100644
--- a/configs/cm_t3517_defconfig
+++ b/configs/cm_t3517_defconfig
@@ -5,4 +5,5 @@ CONFIG_SYS_PROMPT="CM-T3517 # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/cm_t35_defconfig b/configs/cm_t35_defconfig
index 57ab275..1df085d 100644
--- a/configs/cm_t35_defconfig
+++ b/configs/cm_t35_defconfig
@@ -6,4 +6,5 @@ CONFIG_SYS_PROMPT="CM-T3x # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/cm_t43_defconfig b/configs/cm_t43_defconfig
index c0cdb48..2432049 100644
--- a/configs/cm_t43_defconfig
+++ b/configs/cm_t43_defconfig
@@ -6,5 +6,6 @@ CONFIG_SPL=y
CONFIG_CMD_SF=y
CONFIG_CMD_USB=y
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_NFS is not set
CONFIG_DM=y
diff --git a/configs/cm_t54_defconfig b/configs/cm_t54_defconfig
index f81aac4..aa5c755 100644
--- a/configs/cm_t54_defconfig
+++ b/configs/cm_t54_defconfig
@@ -5,5 +5,6 @@ CONFIG_SPL=y
CONFIG_SYS_PROMPT="CM-T54 # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
diff --git a/configs/colibri_t20_defconfig b/configs/colibri_t20_defconfig
index 5104e95..5ef21eb 100644
--- a/configs/colibri_t20_defconfig
+++ b/configs/colibri_t20_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="Colibri T20 # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_NFS is not set
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/colibri_t30_defconfig b/configs/colibri_t30_defconfig
index 738b041..0338363 100644
--- a/configs/colibri_t30_defconfig
+++ b/configs/colibri_t30_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="Colibri T30 # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_NFS is not set
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/colibri_vf_defconfig b/configs/colibri_vf_defconfig
index 9bc7e92..f8441e3 100644
--- a/configs/colibri_vf_defconfig
+++ b/configs/colibri_vf_defconfig
@@ -3,6 +3,7 @@ CONFIG_TARGET_COLIBRI_VF=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri_vf/imximage.cfg,ENV_IS_IN_NAND,IMX_NAND"
CONFIG_SYS_PROMPT="Colibri VFxx # "
# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_DM=y
CONFIG_NAND_VF610_NFC=y
diff --git a/configs/colibri_vf_dtb_defconfig b/configs/colibri_vf_dtb_defconfig
index 8658258..3596cec 100644
--- a/configs/colibri_vf_dtb_defconfig
+++ b/configs/colibri_vf_dtb_defconfig
@@ -4,6 +4,7 @@ CONFIG_DEFAULT_DEVICE_TREE="vf610-colibri"
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri_vf/imximage.cfg,ENV_IS_IN_NAND,IMX_NAND"
CONFIG_SYS_PROMPT="Colibri VFxx # "
# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NET is not set
CONFIG_OF_CONTROL=y
diff --git a/configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig b/configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig
index 58566c1..ae72e33 100644
--- a/configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig
+++ b/configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig
@@ -5,9 +5,7 @@ CONFIG_SYS_EXTRA_OPTIONS="36BIT,SDCARD,DEVELOP"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_TPM=y
-CONFIG_SPI_FLASH=y
CONFIG_DM=y
-CONFIG_DM_TPM=y
-CONFIG_TPM_ATMEL_TWI=y
+CONFIG_SPI_FLASH=y
CONFIG_TPM_AUTH_SESSIONS=y
CONFIG_TPM=y
diff --git a/configs/controlcenterd_36BIT_SDCARD_defconfig b/configs/controlcenterd_36BIT_SDCARD_defconfig
index 56a4910..67a185e 100644
--- a/configs/controlcenterd_36BIT_SDCARD_defconfig
+++ b/configs/controlcenterd_36BIT_SDCARD_defconfig
@@ -5,9 +5,7 @@ CONFIG_SYS_EXTRA_OPTIONS="36BIT,SDCARD"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_TPM=y
-CONFIG_SPI_FLASH=y
CONFIG_DM=y
-CONFIG_DM_TPM=y
-CONFIG_TPM_ATMEL_TWI=y
+CONFIG_SPI_FLASH=y
CONFIG_TPM_AUTH_SESSIONS=y
CONFIG_TPM=y
diff --git a/configs/controlcenterd_TRAILBLAZER_DEVELOP_defconfig b/configs/controlcenterd_TRAILBLAZER_DEVELOP_defconfig
index cbf43ef..14c012e 100644
--- a/configs/controlcenterd_TRAILBLAZER_DEVELOP_defconfig
+++ b/configs/controlcenterd_TRAILBLAZER_DEVELOP_defconfig
@@ -8,7 +8,5 @@ CONFIG_SYS_EXTRA_OPTIONS="TRAILBLAZER,SPIFLASH,DEVELOP"
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TPM=y
CONFIG_DM=y
-CONFIG_DM_TPM=y
-CONFIG_TPM_ATMEL_TWI=y
CONFIG_TPM_AUTH_SESSIONS=y
CONFIG_TPM=y
diff --git a/configs/controlcenterd_TRAILBLAZER_defconfig b/configs/controlcenterd_TRAILBLAZER_defconfig
index e897422..de3b3dd 100644
--- a/configs/controlcenterd_TRAILBLAZER_defconfig
+++ b/configs/controlcenterd_TRAILBLAZER_defconfig
@@ -8,7 +8,5 @@ CONFIG_SYS_EXTRA_OPTIONS="TRAILBLAZER,SPIFLASH"
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TPM=y
CONFIG_DM=y
-CONFIG_DM_TPM=y
-CONFIG_TPM_ATMEL_TWI=y
CONFIG_TPM_AUTH_SESSIONS=y
CONFIG_TPM=y
diff --git a/configs/coreboot-x86_defconfig b/configs/coreboot-x86_defconfig
index 438e43b..5c4260f 100644
--- a/configs/coreboot-x86_defconfig
+++ b/configs/coreboot-x86_defconfig
@@ -17,7 +17,6 @@ CONFIG_DM_ETH=y
CONFIG_E1000=y
CONFIG_DM_PCI=y
CONFIG_DM_RTC=y
-CONFIG_DM_TPM=y
CONFIG_TPM_TIS_LPC=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/crownbay_defconfig b/configs/crownbay_defconfig
index d036c05..3f9b20a 100644
--- a/configs/crownbay_defconfig
+++ b/configs/crownbay_defconfig
@@ -10,6 +10,7 @@ CONFIG_GENERATE_MP_TABLE=y
CONFIG_CMD_CPU=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_BOOTSTAGE=y
diff --git a/configs/dalmore_defconfig b/configs/dalmore_defconfig
index e63a5c1..f0b3193 100644
--- a/configs/dalmore_defconfig
+++ b/configs/dalmore_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="Tegra114 (Dalmore) # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/devkit3250_defconfig b/configs/devkit3250_defconfig
index 6465299..88cf299 100644
--- a/configs/devkit3250_defconfig
+++ b/configs/devkit3250_defconfig
@@ -3,5 +3,6 @@ CONFIG_TARGET_DEVKIT3250=y
CONFIG_DM_GPIO=y
CONFIG_SPL=y
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_DM=y
diff --git a/configs/dnp5370_defconfig b/configs/dnp5370_defconfig
index b809dfa..3b323e9 100644
--- a/configs/dnp5370_defconfig
+++ b/configs/dnp5370_defconfig
@@ -1,4 +1,5 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_DNP5370=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_NET_RANDOM_ETHADDR=y
diff --git a/configs/dra72_evm_defconfig b/configs/dra72_evm_defconfig
index cce3255..34393c0 100644
--- a/configs/dra72_evm_defconfig
+++ b/configs/dra72_evm_defconfig
@@ -10,6 +10,7 @@ CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_OF_CONTROL=y
diff --git a/configs/dra74_evm_defconfig b/configs/dra74_evm_defconfig
index a57cd7f..e69ba1a 100644
--- a/configs/dra74_evm_defconfig
+++ b/configs/dra74_evm_defconfig
@@ -1,17 +1,17 @@
CONFIG_ARM=y
CONFIG_OMAP54XX=y
CONFIG_TARGET_DRA7XX_EVM=y
+CONFIG_DM_GPIO=y
+CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_DEFAULT_DEVICE_TREE="dra7-evm"
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x82000000
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_OF_CONTROL=y
-CONFIG_SPL_DISABLE_OF_CONTROL=y
CONFIG_DM=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
-CONFIG_DM_GPIO=y
diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
index f98e7b7..fa48505 100644
--- a/configs/dra7xx_evm_defconfig
+++ b/configs/dra7xx_evm_defconfig
@@ -1,11 +1,12 @@
CONFIG_ARM=y
CONFIG_OMAP54XX=y
CONFIG_TARGET_DRA7XX_EVM=y
+CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x82000000
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/dra7xx_evm_qspiboot_defconfig b/configs/dra7xx_evm_qspiboot_defconfig
index f14fa62..f9acfe5 100644
--- a/configs/dra7xx_evm_qspiboot_defconfig
+++ b/configs/dra7xx_evm_qspiboot_defconfig
@@ -1,12 +1,13 @@
CONFIG_ARM=y
CONFIG_OMAP54XX=y
CONFIG_TARGET_DRA7XX_EVM=y
+CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SYS_EXTRA_OPTIONS="QSPI_BOOT"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/dra7xx_evm_uart3_defconfig b/configs/dra7xx_evm_uart3_defconfig
index 8882260..3965660 100644
--- a/configs/dra7xx_evm_uart3_defconfig
+++ b/configs/dra7xx_evm_uart3_defconfig
@@ -2,12 +2,13 @@ CONFIG_ARM=y
CONFIG_OMAP54XX=y
CONFIG_TARGET_DRA7XX_EVM=y
CONFIG_CONS_INDEX=3
+CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SYS_EXTRA_OPTIONS="SPL_YMODEM_SUPPORT"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/draco_defconfig b/configs/draco_defconfig
index b5f0a50..3338f94 100644
--- a/configs/draco_defconfig
+++ b/configs/draco_defconfig
@@ -7,5 +7,6 @@ CONFIG_AUTOBOOT_PROMPT="Autobooting in %d seconds, press \"<Esc><Esc>\" to stop\
CONFIG_AUTOBOOT_STOP_STR="\x1b\x1b"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/dreamplug_defconfig b/configs/dreamplug_defconfig
index 501fbbf..ec2a749 100644
--- a/configs/dreamplug_defconfig
+++ b/configs/dreamplug_defconfig
@@ -5,3 +5,8 @@ CONFIG_TARGET_DREAMPLUG=y
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_USB=y
diff --git a/configs/duovero_defconfig b/configs/duovero_defconfig
index cc0e9a3..f833704 100644
--- a/configs/duovero_defconfig
+++ b/configs/duovero_defconfig
@@ -5,5 +5,6 @@ CONFIG_SPL=y
CONFIG_SYS_PROMPT="duovero # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
diff --git a/configs/e2220-1170_defconfig b/configs/e2220-1170_defconfig
index a60ba97..2d5c673 100644
--- a/configs/e2220-1170_defconfig
+++ b/configs/e2220-1170_defconfig
@@ -7,6 +7,7 @@ CONFIG_SYS_PROMPT="Tegra210 (E2220-1170) # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/ea20_defconfig b/configs/ea20_defconfig
index 3d5a1c4..f38d29c 100644
--- a/configs/ea20_defconfig
+++ b/configs/ea20_defconfig
@@ -4,5 +4,6 @@ CONFIG_TARGET_EA20=y
CONFIG_SYS_PROMPT="ea20 > "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/eco5pk_defconfig b/configs/eco5pk_defconfig
index 759e7e9..5b1c8dc 100644
--- a/configs/eco5pk_defconfig
+++ b/configs/eco5pk_defconfig
@@ -5,4 +5,5 @@ CONFIG_SPL=y
CONFIG_SYS_PROMPT="ECO5-PK # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/efi-x86_defconfig b/configs/efi-x86_defconfig
index 43fb0c4..fa53e4a 100644
--- a/configs/efi-x86_defconfig
+++ b/configs/efi-x86_defconfig
@@ -4,6 +4,7 @@ CONFIG_DEFAULT_DEVICE_TREE="efi"
CONFIG_TARGET_EFI=y
CONFIG_TSC_CALIBRATION_BYPASS=y
# CONFIG_CMD_BOOTM is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_NET is not set
CONFIG_OF_CONTROL=y
CONFIG_OF_EMBED=y
diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
index edb2db2..76932ea 100644
--- a/configs/firefly-rk3288_defconfig
+++ b/configs/firefly-rk3288_defconfig
@@ -3,9 +3,9 @@ CONFIG_ARCH_ROCKCHIP=y
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_ROCKCHIP_RK3288=y
CONFIG_TARGET_FIREFLY_RK3288=y
+CONFIG_SPL_STACK_R_ADDR=0x80000
CONFIG_DEFAULT_DEVICE_TREE="rk3288-firefly"
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x80000
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_PMIC=y
diff --git a/configs/ga10h_v1_1_defconfig b/configs/ga10h_v1_1_defconfig
index 34e74af..09ad330 100644
--- a/configs/ga10h_v1_1_defconfig
+++ b/configs/ga10h_v1_1_defconfig
@@ -21,6 +21,7 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_AXP_DLDO1_VOLT=3300
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/galileo_defconfig b/configs/galileo_defconfig
index 1e1ce95..725b37e 100644
--- a/configs/galileo_defconfig
+++ b/configs/galileo_defconfig
@@ -6,6 +6,7 @@ CONFIG_ENABLE_MRC_CACHE=y
CONFIG_GENERATE_PIRQ_TABLE=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_BOOTSTAGE=y
diff --git a/configs/gr_xc3s_1500_defconfig b/configs/gr_xc3s_1500_defconfig
index a05b709..543cba5 100644
--- a/configs/gr_xc3s_1500_defconfig
+++ b/configs/gr_xc3s_1500_defconfig
@@ -1,5 +1,5 @@
CONFIG_SPARC=y
CONFIG_TARGET_GR_XC3S_1500=y
CONFIG_SYS_TEXT_BASE=0x00000000
-# CONFIG_CMD_ELF is not sets
+# CONFIG_CMD_ELF is not set
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/gt90h_v4_defconfig b/configs/gt90h_v4_defconfig
index a14de0d..a8d339c 100644
--- a/configs/gt90h_v4_defconfig
+++ b/configs/gt90h_v4_defconfig
@@ -20,5 +20,6 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_AXP_DLDO1_VOLT=3300
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/guruplug_defconfig b/configs/guruplug_defconfig
index 20b83e3..b7f79a3 100644
--- a/configs/guruplug_defconfig
+++ b/configs/guruplug_defconfig
@@ -4,3 +4,8 @@ CONFIG_TARGET_GURUPLUG=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_SETEXPR is not set
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_NAND=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_USB=y
diff --git a/configs/gwventana_defconfig b/configs/gwventana_defconfig
index 5bb371c..547e7f6 100644
--- a/configs/gwventana_defconfig
+++ b/configs/gwventana_defconfig
@@ -2,13 +2,14 @@ CONFIG_ARM=y
CONFIG_ARCH_MX6=y
CONFIG_TARGET_GW_VENTANA=y
CONFIG_DM_SERIAL=y
+CONFIG_SPL_STACK_R_ADDR=0x18000000
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x18000000
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL"
CONFIG_SYS_PROMPT="Ventana > "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_DM=y
CONFIG_NETDEVICES=y
CONFIG_E1000=y
diff --git a/configs/harmony_defconfig b/configs/harmony_defconfig
index 79e91e0..87ddd84 100644
--- a/configs/harmony_defconfig
+++ b/configs/harmony_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="Tegra20 (Harmony) # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_USB=y
diff --git a/configs/hikey_defconfig b/configs/hikey_defconfig
index 70aa708..fd94bf5 100644
--- a/configs/hikey_defconfig
+++ b/configs/hikey_defconfig
@@ -1,3 +1,4 @@
CONFIG_ARM=y
CONFIG_SYS_MALLOC_F_LEN=0x2000
# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_GPIO=y
diff --git a/configs/i12-tvbox_defconfig b/configs/i12-tvbox_defconfig
index 54fa819..a15a15a 100644
--- a/configs/i12-tvbox_defconfig
+++ b/configs/i12-tvbox_defconfig
@@ -10,5 +10,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,MACPWR=SUNXI_GPH(21)"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/iNet_3F_defconfig b/configs/iNet_3F_defconfig
index 7ec54a7..3f1624c 100644
--- a/configs/iNet_3F_defconfig
+++ b/configs/iNet_3F_defconfig
@@ -17,4 +17,5 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/iNet_3W_defconfig b/configs/iNet_3W_defconfig
index 5e68769..6c4cd56 100644
--- a/configs/iNet_3W_defconfig
+++ b/configs/iNet_3W_defconfig
@@ -17,4 +17,5 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/iNet_86VS_defconfig b/configs/iNet_86VS_defconfig
index 3dea793..00e1458 100644
--- a/configs/iNet_86VS_defconfig
+++ b/configs/iNet_86VS_defconfig
@@ -16,4 +16,5 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/ib62x0_defconfig b/configs/ib62x0_defconfig
index 194ef02..19cbfd5 100644
--- a/configs/ib62x0_defconfig
+++ b/configs/ib62x0_defconfig
@@ -5,3 +5,8 @@ CONFIG_SYS_PROMPT="ib62x0 => "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_SETEXPR is not set
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_NAND=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_USB=y
diff --git a/configs/ibf-dsp561_defconfig b/configs/ibf-dsp561_defconfig
index e654a4b..9cf3652 100644
--- a/configs/ibf-dsp561_defconfig
+++ b/configs/ibf-dsp561_defconfig
@@ -1,4 +1,5 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_IBF_DSP561=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_LIB_RAND=y
diff --git a/configs/igep0020_defconfig b/configs/igep0020_defconfig
index e45e83c..b2ce2ad 100644
--- a/configs/igep0020_defconfig
+++ b/configs/igep0020_defconfig
@@ -5,4 +5,5 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="MACH_TYPE=MACH_TYPE_IGEP0020,BOOT_ONENAND"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/igep0020_nand_defconfig b/configs/igep0020_nand_defconfig
index 75fabef..6574c3f 100644
--- a/configs/igep0020_nand_defconfig
+++ b/configs/igep0020_nand_defconfig
@@ -5,4 +5,5 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="MACH_TYPE=MACH_TYPE_IGEP0020,BOOT_NAND"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/igep0030_defconfig b/configs/igep0030_defconfig
index 1bb7a6f..726ff12 100644
--- a/configs/igep0030_defconfig
+++ b/configs/igep0030_defconfig
@@ -5,4 +5,5 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="MACH_TYPE=MACH_TYPE_IGEP0030,BOOT_ONENAND"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/igep0030_nand_defconfig b/configs/igep0030_nand_defconfig
index ed01766..54f1ff8 100644
--- a/configs/igep0030_nand_defconfig
+++ b/configs/igep0030_nand_defconfig
@@ -5,4 +5,5 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="MACH_TYPE=MACH_TYPE_IGEP0030,BOOT_NAND"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/igep0032_defconfig b/configs/igep0032_defconfig
index bfa15d7..cebf1c6 100644
--- a/configs/igep0032_defconfig
+++ b/configs/igep0032_defconfig
@@ -5,4 +5,5 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="MACH_TYPE=MACH_TYPE_IGEP0032,BOOT_ONENAND"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/inet1_defconfig b/configs/inet1_defconfig
index a8b32cb..1c68293 100644
--- a/configs/inet1_defconfig
+++ b/configs/inet1_defconfig
@@ -17,5 +17,6 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/inet97fv2_defconfig b/configs/inet97fv2_defconfig
index 0b03e16..a7b3a9f 100644
--- a/configs/inet97fv2_defconfig
+++ b/configs/inet97fv2_defconfig
@@ -16,4 +16,5 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/inet98v_rev2_defconfig b/configs/inet98v_rev2_defconfig
index 27b5019..c0c6cb2 100644
--- a/configs/inet98v_rev2_defconfig
+++ b/configs/inet98v_rev2_defconfig
@@ -19,4 +19,5 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/inet9f_rev03_defconfig b/configs/inet9f_rev03_defconfig
index 153450f..0a17cf7 100644
--- a/configs/inet9f_rev03_defconfig
+++ b/configs/inet9f_rev03_defconfig
@@ -16,4 +16,5 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/ip04_defconfig b/configs/ip04_defconfig
index 0b6de77..847a25d 100644
--- a/configs/ip04_defconfig
+++ b/configs/ip04_defconfig
@@ -2,6 +2,7 @@ CONFIG_BLACKFIN=y
CONFIG_TARGET_IP04=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPI_FLASH=y
diff --git a/configs/jesurun_q5_defconfig b/configs/jesurun_q5_defconfig
index 9cb8b1d..443a1c7 100644
--- a/configs/jesurun_q5_defconfig
+++ b/configs/jesurun_q5_defconfig
@@ -11,5 +11,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,MACPWR=SUNXI_GPH(19)"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/jetson-tk1_defconfig b/configs/jetson-tk1_defconfig
index 6df5c7e..bd60d15 100644
--- a/configs/jetson-tk1_defconfig
+++ b/configs/jetson-tk1_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="Tegra124 (Jetson TK1) # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/k2g_evm_defconfig b/configs/k2g_evm_defconfig
index 59020af..4e747ae 100644
--- a/configs/k2g_evm_defconfig
+++ b/configs/k2g_evm_defconfig
@@ -1,14 +1,12 @@
CONFIG_ARM=y
CONFIG_ARCH_KEYSTONE=y
CONFIG_TARGET_K2G_EVM=y
+CONFIG_DM_SERIAL=y
CONFIG_DEFAULT_DEVICE_TREE="k2g-evm"
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_SETEXPR is not set
CONFIG_OF_CONTROL=y
-CONFIG_SPL_DISABLE_OF_CONTROL=y
-CONFIG_SPI_FLASH=y
CONFIG_DM=y
-CONFIG_DM_SERIAL=y
-CONFIG_KEYSTONE_SERIAL=y
+CONFIG_SPI_FLASH=y
diff --git a/configs/kmtegr1_defconfig b/configs/kmtegr1_defconfig
new file mode 100644
index 0000000..aee9886
--- /dev/null
+++ b/configs/kmtegr1_defconfig
@@ -0,0 +1,4 @@
+CONFIG_SYS_EXTRA_OPTIONS="KMTEGR1"
+CONFIG_PPC=y
+CONFIG_MPC83xx=y
+CONFIG_TARGET_SUVD3=y
diff --git a/configs/kmtepr2_defconfig b/configs/kmtepr2_defconfig
new file mode 100644
index 0000000..5cffd53
--- /dev/null
+++ b/configs/kmtepr2_defconfig
@@ -0,0 +1,4 @@
+CONFIG_SYS_EXTRA_OPTIONS="KMTEPR2"
+CONFIG_PPC=y
+CONFIG_MPC83xx=y
+CONFIG_TARGET_TUXX1=y
diff --git a/configs/kwb_defconfig b/configs/kwb_defconfig
index 0bbe0a7..0f56bfa 100644
--- a/configs/kwb_defconfig
+++ b/configs/kwb_defconfig
@@ -15,6 +15,7 @@ CONFIG_SYS_PROMPT="U-Boot (BuR V2.0)# "
# CONFIG_CMD_LOADS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_ITEST is not set
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
diff --git a/configs/ls1021atwr_sdcard_qspi_defconfig b/configs/ls1021atwr_sdcard_qspi_defconfig
index 458578b..9f2d27d 100644
--- a/configs/ls1021atwr_sdcard_qspi_defconfig
+++ b/configs/ls1021atwr_sdcard_qspi_defconfig
@@ -1,11 +1,11 @@
CONFIG_ARM=y
CONFIG_TARGET_LS1021ATWR=y
+CONFIG_DM_SPI=y
+CONFIG_DEFAULT_DEVICE_TREE="ls1021a-twr"
CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,SD_BOOT,SD_BOOT_QSPI"
-CONFIG_DEFAULT_DEVICE_TREE="ls1021a-twr"
CONFIG_OF_CONTROL=y
CONFIG_DM=y
CONFIG_SPI_FLASH=y
CONFIG_NETDEVICES=y
CONFIG_E1000=y
-CONFIG_DM_SPI=y
diff --git a/configs/ls1043ardb_defconfig b/configs/ls1043ardb_defconfig
index ae84d2e..a476360 100644
--- a/configs/ls1043ardb_defconfig
+++ b/configs/ls1043ardb_defconfig
@@ -1,4 +1,3 @@
-CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4"
CONFIG_ARM=y
CONFIG_TARGET_LS1043ARDB=y
-CONFIG_FSL_LAYERSCAPE=y
+CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4"
diff --git a/configs/ls1043ardb_nand_defconfig b/configs/ls1043ardb_nand_defconfig
index fffaca0..784ea20 100644
--- a/configs/ls1043ardb_nand_defconfig
+++ b/configs/ls1043ardb_nand_defconfig
@@ -1,4 +1,4 @@
-CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,NAND_BOOT,SYS_FSL_DDR4"
CONFIG_ARM=y
CONFIG_TARGET_LS1043ARDB=y
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,NAND_BOOT,SYS_FSL_DDR4"
diff --git a/configs/ls1043ardb_sdcard_defconfig b/configs/ls1043ardb_sdcard_defconfig
index 5fe0470..4b94e93 100644
--- a/configs/ls1043ardb_sdcard_defconfig
+++ b/configs/ls1043ardb_sdcard_defconfig
@@ -1,4 +1,4 @@
-CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,SD_BOOT,SYS_FSL_DDR4"
CONFIG_ARM=y
CONFIG_TARGET_LS1043ARDB=y
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,SD_BOOT,SYS_FSL_DDR4"
diff --git a/configs/m28evk_defconfig b/configs/m28evk_defconfig
index 03ced33..9e8508c 100644
--- a/configs/m28evk_defconfig
+++ b/configs/m28evk_defconfig
@@ -3,4 +3,5 @@ CONFIG_TARGET_M28EVK=y
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/marsboard_defconfig b/configs/marsboard_defconfig
index 0707f0d..a353e85 100644
--- a/configs/marsboard_defconfig
+++ b/configs/marsboard_defconfig
@@ -4,6 +4,7 @@ CONFIG_TARGET_EMBESTMX6BOARDS=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q.cfg,MX6Q,DDR_MB=1024,ENV_IS_IN_SPI_FLASH"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_DM=y
CONFIG_SPI_FLASH=y
CONFIG_DM_THERMAL=y
diff --git a/configs/mcx_defconfig b/configs/mcx_defconfig
index fe80d6c..1d82c40 100644
--- a/configs/mcx_defconfig
+++ b/configs/mcx_defconfig
@@ -7,4 +7,5 @@ CONFIG_SYS_PROMPT="mcx # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/medcom-wide_defconfig b/configs/medcom-wide_defconfig
index df9560e..631159a 100644
--- a/configs/medcom-wide_defconfig
+++ b/configs/medcom-wide_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="Tegra20 (Medcom-Wide) # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_USB=y
diff --git a/configs/microblaze-generic_defconfig b/configs/microblaze-generic_defconfig
index da589a0..1fe2e0f 100644
--- a/configs/microblaze-generic_defconfig
+++ b/configs/microblaze-generic_defconfig
@@ -3,6 +3,7 @@ CONFIG_TARGET_MICROBLAZE_GENERIC=y
CONFIG_DEFAULT_DEVICE_TREE="microblaze-generic"
CONFIG_SPL=y
CONFIG_SYS_PROMPT="U-Boot-mONStR> "
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_OF_CONTROL=y
CONFIG_OF_EMBED=y
diff --git a/configs/minnowmax_defconfig b/configs/minnowmax_defconfig
index 0f500e6..02d43a3 100644
--- a/configs/minnowmax_defconfig
+++ b/configs/minnowmax_defconfig
@@ -11,6 +11,7 @@ CONFIG_GENERATE_MP_TABLE=y
CONFIG_CMD_CPU=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_BOOTSTAGE=y
diff --git a/configs/mixtile_loftq_defconfig b/configs/mixtile_loftq_defconfig
index ce81309..07865d8 100644
--- a/configs/mixtile_loftq_defconfig
+++ b/configs/mixtile_loftq_defconfig
@@ -12,6 +12,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPA(21)"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_AXP_ALDO1_VOLT=3300
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/mk802_a10s_defconfig b/configs/mk802_a10s_defconfig
index aff8dfc..03e58cd 100644
--- a/configs/mk802_a10s_defconfig
+++ b/configs/mk802_a10s_defconfig
@@ -10,5 +10,6 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
-CONFIG_USB_EHCI_HCD=y
+CONFIG_CMD_GPIO=y
CONFIG_AXP152_POWER=y
+CONFIG_USB_EHCI_HCD=y
diff --git a/configs/mk802_defconfig b/configs/mk802_defconfig
index bed8f23..922f8c3 100644
--- a/configs/mk802_defconfig
+++ b/configs/mk802_defconfig
@@ -9,5 +9,6 @@ CONFIG_SYS_EXTRA_OPTIONS="USB_EHCI"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
-CONFIG_USB_EHCI_HCD=y
+CONFIG_CMD_GPIO=y
CONFIG_SUNXI_NO_PMIC=y
+CONFIG_USB_EHCI_HCD=y
diff --git a/configs/mk802ii_defconfig b/configs/mk802ii_defconfig
index de1b73f..2a359be 100644
--- a/configs/mk802ii_defconfig
+++ b/configs/mk802ii_defconfig
@@ -7,4 +7,5 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/mt_ventoux_defconfig b/configs/mt_ventoux_defconfig
index 27f2ecd..38fb331 100644
--- a/configs/mt_ventoux_defconfig
+++ b/configs/mt_ventoux_defconfig
@@ -5,4 +5,5 @@ CONFIG_SPL=y
CONFIG_SYS_PROMPT="mt_ventoux => "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/mx23_olinuxino_defconfig b/configs/mx23_olinuxino_defconfig
index 9e02334..22c46f8 100644
--- a/configs/mx23_olinuxino_defconfig
+++ b/configs/mx23_olinuxino_defconfig
@@ -3,4 +3,5 @@ CONFIG_TARGET_MX23_OLINUXINO=y
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/mx23evk_defconfig b/configs/mx23evk_defconfig
index 2f4b91b..55e8915 100644
--- a/configs/mx23evk_defconfig
+++ b/configs/mx23evk_defconfig
@@ -3,6 +3,7 @@ CONFIG_TARGET_MX23EVK=y
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NET is not set
# CONFIG_CMD_NFS is not set
diff --git a/configs/mx28evk_auart_console_defconfig b/configs/mx28evk_auart_console_defconfig
index 9000787..1cb26d7 100644
--- a/configs/mx28evk_auart_console_defconfig
+++ b/configs/mx28evk_auart_console_defconfig
@@ -4,4 +4,5 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="MXS_AUART,MXS_AUART_BASE=MXS_UARTAPP3_BASE,ENV_IS_IN_MMC"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/mx28evk_defconfig b/configs/mx28evk_defconfig
index 6d3cbb8..3c8ea76 100644
--- a/configs/mx28evk_defconfig
+++ b/configs/mx28evk_defconfig
@@ -4,4 +4,5 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_MMC"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/mx28evk_nand_defconfig b/configs/mx28evk_nand_defconfig
index ee4536d..bd86917 100644
--- a/configs/mx28evk_nand_defconfig
+++ b/configs/mx28evk_nand_defconfig
@@ -4,4 +4,5 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_NAND"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/mx28evk_spi_defconfig b/configs/mx28evk_spi_defconfig
index 88bfb43..d1d8ed7 100644
--- a/configs/mx28evk_spi_defconfig
+++ b/configs/mx28evk_spi_defconfig
@@ -4,4 +4,5 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_SPI_FLASH"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/mx6cuboxi_defconfig b/configs/mx6cuboxi_defconfig
index 59362c6..e8964d9 100644
--- a/configs/mx6cuboxi_defconfig
+++ b/configs/mx6cuboxi_defconfig
@@ -5,5 +5,6 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_DM=y
CONFIG_DM_THERMAL=y
diff --git a/configs/mx6dlarm2_defconfig b/configs/mx6dlarm2_defconfig
index e1bdaaf..de96d35 100644
--- a/configs/mx6dlarm2_defconfig
+++ b/configs/mx6dlarm2_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_MX6QARM2=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qarm2/imximage_mx6dl.cfg,MX6DL,DDR_MB=2048"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/mx6dlarm2_lpddr2_defconfig b/configs/mx6dlarm2_lpddr2_defconfig
index a37c254..9ee4ee7 100644
--- a/configs/mx6dlarm2_lpddr2_defconfig
+++ b/configs/mx6dlarm2_lpddr2_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_MX6QARM2=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qarm2/imximage_mx6dl.cfg,MX6DL,MX6DL_LPDDR2,DDR_MB=512"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/mx6dlsabreauto_defconfig b/configs/mx6dlsabreauto_defconfig
index 17d1b96..9dea2d2 100644
--- a/configs/mx6dlsabreauto_defconfig
+++ b/configs/mx6dlsabreauto_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_MX6QSABREAUTO=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qsabreauto/mx6dl.cfg,MX6DL"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/mx6dlsabresd_defconfig b/configs/mx6dlsabresd_defconfig
index 6610a0c..68f6676 100644
--- a/configs/mx6dlsabresd_defconfig
+++ b/configs/mx6dlsabresd_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_MX6SABRESD=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sabresd/mx6dlsabresd.cfg,MX6DL"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/mx6qarm2_defconfig b/configs/mx6qarm2_defconfig
index 5cd78cd..7f08d86 100644
--- a/configs/mx6qarm2_defconfig
+++ b/configs/mx6qarm2_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_MX6QARM2=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qarm2/imximage.cfg,MX6Q,DDR_MB=2048"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/mx6qarm2_lpddr2_defconfig b/configs/mx6qarm2_lpddr2_defconfig
index 89c42b8..7186799 100644
--- a/configs/mx6qarm2_lpddr2_defconfig
+++ b/configs/mx6qarm2_lpddr2_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_MX6QARM2=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qarm2/imximage.cfg,MX6Q,MX6DQ_LPDDR2,DDR_MB=512"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/mx6qpsabreauto_defconfig b/configs/mx6qpsabreauto_defconfig
index 2cbbc32..3e9506a 100644
--- a/configs/mx6qpsabreauto_defconfig
+++ b/configs/mx6qpsabreauto_defconfig
@@ -2,4 +2,5 @@ CONFIG_ARM=y
CONFIG_ARCH_MX6=y
CONFIG_TARGET_MX6QSABREAUTO=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qsabreauto/mx6qp.cfg,MX6Q"
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/mx6qsabreauto_defconfig b/configs/mx6qsabreauto_defconfig
index 11ded40..11d7670 100644
--- a/configs/mx6qsabreauto_defconfig
+++ b/configs/mx6qsabreauto_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_MX6QSABREAUTO=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qsabreauto/imximage.cfg,MX6Q"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/mx6qsabrelite_defconfig b/configs/mx6qsabrelite_defconfig
index 1a2bb22..119f63e 100644
--- a/configs/mx6qsabrelite_defconfig
+++ b/configs/mx6qsabrelite_defconfig
@@ -4,6 +4,7 @@ CONFIG_TARGET_NITROGEN6X=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q.cfg,MX6Q,DDR_MB=1024,SABRELITE"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_DM=y
CONFIG_SPI_FLASH=y
CONFIG_DM_THERMAL=y
diff --git a/configs/mx6qsabresd_defconfig b/configs/mx6qsabresd_defconfig
index 6cbe1cf..7d141d3 100644
--- a/configs/mx6qsabresd_defconfig
+++ b/configs/mx6qsabresd_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_MX6SABRESD=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sabresd/mx6q_4x_mt41j128.cfg,MX6Q"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/mx6sabresd_spl_defconfig b/configs/mx6sabresd_spl_defconfig
index bfd371a..7a48075 100644
--- a/configs/mx6sabresd_spl_defconfig
+++ b/configs/mx6sabresd_spl_defconfig
@@ -5,4 +5,5 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,SPL,MX6Q"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/mx6slevk_defconfig b/configs/mx6slevk_defconfig
index ae9912b..d7305b0 100644
--- a/configs/mx6slevk_defconfig
+++ b/configs/mx6slevk_defconfig
@@ -4,6 +4,7 @@ CONFIG_TARGET_MX6SLEVK=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_DM=y
CONFIG_SPI_FLASH=y
diff --git a/configs/mx6slevk_spinor_defconfig b/configs/mx6slevk_spinor_defconfig
index 3904616..60aa057 100644
--- a/configs/mx6slevk_spinor_defconfig
+++ b/configs/mx6slevk_spinor_defconfig
@@ -4,6 +4,7 @@ CONFIG_TARGET_MX6SLEVK=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL,SYS_BOOT_SPINOR"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_DM=y
CONFIG_SPI_FLASH=y
diff --git a/configs/mx6slevk_spl_defconfig b/configs/mx6slevk_spl_defconfig
index 1fbd0d1..b5b289a 100644
--- a/configs/mx6slevk_spl_defconfig
+++ b/configs/mx6slevk_spl_defconfig
@@ -3,6 +3,7 @@ CONFIG_ARCH_MX6=y
CONFIG_TARGET_MX6SLEVK=y
CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,SPL,MX6SL"
+CONFIG_CMD_GPIO=y
CONFIG_DM=y
CONFIG_SPI_FLASH=y
CONFIG_DM_THERMAL=y
diff --git a/configs/mx6sxsabresd_defconfig b/configs/mx6sxsabresd_defconfig
index a582905..953a246 100644
--- a/configs/mx6sxsabresd_defconfig
+++ b/configs/mx6sxsabresd_defconfig
@@ -4,6 +4,7 @@ CONFIG_TARGET_MX6SXSABRESD=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sxsabresd/imximage.cfg,MX6SX"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
diff --git a/configs/mx6sxsabresd_spl_defconfig b/configs/mx6sxsabresd_spl_defconfig
index 3f19659..3843f99 100644
--- a/configs/mx6sxsabresd_spl_defconfig
+++ b/configs/mx6sxsabresd_spl_defconfig
@@ -5,5 +5,6 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6SX"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/mx6ul_14x14_evk_defconfig b/configs/mx6ul_14x14_evk_defconfig
index 6787f00..835285f 100644
--- a/configs/mx6ul_14x14_evk_defconfig
+++ b/configs/mx6ul_14x14_evk_defconfig
@@ -3,5 +3,6 @@ CONFIG_ARCH_MX6=y
CONFIG_TARGET_MX6UL_14X14_EVK=y
CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg"
+CONFIG_CMD_GPIO=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_PING=y
diff --git a/configs/mx6ul_9x9_evk_defconfig b/configs/mx6ul_9x9_evk_defconfig
index 8b4c68c..efbffe3 100644
--- a/configs/mx6ul_9x9_evk_defconfig
+++ b/configs/mx6ul_9x9_evk_defconfig
@@ -3,5 +3,6 @@ CONFIG_ARCH_MX6=y
CONFIG_TARGET_MX6UL_9X9_EVK=y
CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg"
+CONFIG_CMD_GPIO=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_PING=y
diff --git a/configs/mx7dsabresd_defconfig b/configs/mx7dsabresd_defconfig
index 60aacb2..420d13e 100644
--- a/configs/mx7dsabresd_defconfig
+++ b/configs/mx7dsabresd_defconfig
@@ -6,6 +6,7 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx7dsabresd/imximage.cfg,MX
# CONFIG_CMD_IMI is not set
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_XIMG is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_DHCP=y
CONFIG_CMD_PING=y
diff --git a/configs/nitrogen6dl2g_defconfig b/configs/nitrogen6dl2g_defconfig
index 2044fc9..c9aca46 100644
--- a/configs/nitrogen6dl2g_defconfig
+++ b/configs/nitrogen6dl2g_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_NITROGEN6X=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6dl2g.cfg,MX6DL,DDR_MB=2048"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/nitrogen6dl_defconfig b/configs/nitrogen6dl_defconfig
index c90c8c9..5b1c06c 100644
--- a/configs/nitrogen6dl_defconfig
+++ b/configs/nitrogen6dl_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_NITROGEN6X=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6dl.cfg,MX6DL,DDR_MB=1024"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/nitrogen6q2g_defconfig b/configs/nitrogen6q2g_defconfig
index 90ef17e..9938328 100644
--- a/configs/nitrogen6q2g_defconfig
+++ b/configs/nitrogen6q2g_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_NITROGEN6X=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q2g.cfg,MX6Q,DDR_MB=2048"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/nitrogen6q_defconfig b/configs/nitrogen6q_defconfig
index 798467e..430b34d 100644
--- a/configs/nitrogen6q_defconfig
+++ b/configs/nitrogen6q_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_NITROGEN6X=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q.cfg,MX6Q,DDR_MB=1024"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/nitrogen6s1g_defconfig b/configs/nitrogen6s1g_defconfig
index e8eca1b..0f49397 100644
--- a/configs/nitrogen6s1g_defconfig
+++ b/configs/nitrogen6s1g_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_NITROGEN6X=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6s1g.cfg,MX6S,DDR_MB=1024"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/nitrogen6s_defconfig b/configs/nitrogen6s_defconfig
index d142ebc..c21ba2a 100644
--- a/configs/nitrogen6s_defconfig
+++ b/configs/nitrogen6s_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_NITROGEN6X=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6s.cfg,MX6S,DDR_MB=512"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/nokia_rx51_defconfig b/configs/nokia_rx51_defconfig
index b3d9682..21959a6 100644
--- a/configs/nokia_rx51_defconfig
+++ b/configs/nokia_rx51_defconfig
@@ -8,6 +8,7 @@ CONFIG_AUTOBOOT_KEYED=y
# CONFIG_CMD_SAVEENV is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NET is not set
# CONFIG_CMD_NFS is not set
diff --git a/configs/novena_defconfig b/configs/novena_defconfig
index 60d6658..889aac2 100644
--- a/configs/novena_defconfig
+++ b/configs/novena_defconfig
@@ -5,3 +5,4 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6Q"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
diff --git a/configs/nyan-big_defconfig b/configs/nyan-big_defconfig
index 4f31c1c..dac8d3a 100644
--- a/configs/nyan-big_defconfig
+++ b/configs/nyan-big_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="Tegra124 (Nyan-big) # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_CMD_TPM=y
@@ -19,7 +20,6 @@ CONFIG_CROS_EC=y
CONFIG_CROS_EC_SPI=y
CONFIG_SPI_FLASH=y
CONFIG_TEGRA114_SPI=y
-CONFIG_DM_TPM=y
CONFIG_TPM_TIS_INFINEON=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/odroid-xu3_defconfig b/configs/odroid-xu3_defconfig
index 4ab91fa..e563843 100644
--- a/configs/odroid-xu3_defconfig
+++ b/configs/odroid-xu3_defconfig
@@ -6,15 +6,16 @@ CONFIG_DEFAULT_DEVICE_TREE="exynos5422-odroidxu3"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SYS_PROMPT="ODROID-XU3 # "
# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_PMIC=y
+CONFIG_ADC=y
+CONFIG_ADC_EXYNOS=y
CONFIG_DM_I2C_COMPAT=y
CONFIG_DM_PMIC=y
-CONFIG_CMD_PMIC=y
-CONFIG_ERRNO_STR=y
-CONFIG_DM_REGULATOR=y
CONFIG_PMIC_S2MPS11=y
+CONFIG_DM_REGULATOR=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_VIDEO_BRIDGE=y
-CONFIG_ADC=y
-CONFIG_ADC_EXYNOS=y
+CONFIG_ERRNO_STR=y
diff --git a/configs/odroid_defconfig b/configs/odroid_defconfig
index 1e321d3..2c4959b 100644
--- a/configs/odroid_defconfig
+++ b/configs/odroid_defconfig
@@ -8,6 +8,7 @@ CONFIG_SYS_PROMPT="Odroid # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_XIMG is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_NFS is not set
# CONFIG_CMD_MISC is not set
CONFIG_CMD_PMIC=y
diff --git a/configs/omap3_beagle_defconfig b/configs/omap3_beagle_defconfig
index dde076a..7535a17 100644
--- a/configs/omap3_beagle_defconfig
+++ b/configs/omap3_beagle_defconfig
@@ -5,3 +5,4 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="NAND"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
diff --git a/configs/omap3_logic_defconfig b/configs/omap3_logic_defconfig
index 3f8a154..ab03285 100644
--- a/configs/omap3_logic_defconfig
+++ b/configs/omap3_logic_defconfig
@@ -6,3 +6,4 @@ CONFIG_SYS_PROMPT="OMAP Logic # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
diff --git a/configs/omap3_overo_defconfig b/configs/omap3_overo_defconfig
index 3350212..51304fd 100644
--- a/configs/omap3_overo_defconfig
+++ b/configs/omap3_overo_defconfig
@@ -7,5 +7,6 @@ CONFIG_SYS_PROMPT="Overo # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
diff --git a/configs/omap3_pandora_defconfig b/configs/omap3_pandora_defconfig
index e165145..9b24544 100644
--- a/configs/omap3_pandora_defconfig
+++ b/configs/omap3_pandora_defconfig
@@ -6,6 +6,7 @@ CONFIG_SYS_PROMPT="Pandora # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NET is not set
# CONFIG_CMD_NFS is not set
diff --git a/configs/omap3_zoom1_defconfig b/configs/omap3_zoom1_defconfig
index 9efd6de..ccc1170 100644
--- a/configs/omap3_zoom1_defconfig
+++ b/configs/omap3_zoom1_defconfig
@@ -5,4 +5,5 @@ CONFIG_TARGET_OMAP3_ZOOM1=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/omap4_panda_defconfig b/configs/omap4_panda_defconfig
index 1be285d..ce6e8d9 100644
--- a/configs/omap4_panda_defconfig
+++ b/configs/omap4_panda_defconfig
@@ -4,5 +4,6 @@ CONFIG_TARGET_OMAP4_PANDA=y
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
diff --git a/configs/omap4_sdp4430_defconfig b/configs/omap4_sdp4430_defconfig
index b369d1d..2947508 100644
--- a/configs/omap4_sdp4430_defconfig
+++ b/configs/omap4_sdp4430_defconfig
@@ -4,6 +4,7 @@ CONFIG_TARGET_OMAP4_SDP4430=y
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NET is not set
# CONFIG_CMD_NFS is not set
diff --git a/configs/omap5_uevm_defconfig b/configs/omap5_uevm_defconfig
index 15221ad..d136e2c 100644
--- a/configs/omap5_uevm_defconfig
+++ b/configs/omap5_uevm_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_OMAP5_UEVM=y
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/ot1200_defconfig b/configs/ot1200_defconfig
index 17022a4..6023fa7 100644
--- a/configs/ot1200_defconfig
+++ b/configs/ot1200_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_OT1200=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/bachmann/ot1200/mx6q_4x_mt41j128.cfg,MX6Q"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/ot1200_spl_defconfig b/configs/ot1200_spl_defconfig
index dbbea35..0c8b44a 100644
--- a/configs/ot1200_spl_defconfig
+++ b/configs/ot1200_spl_defconfig
@@ -5,4 +5,5 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6Q"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/p2371-0000_defconfig b/configs/p2371-0000_defconfig
index 136f6c5..07bc339 100644
--- a/configs/p2371-0000_defconfig
+++ b/configs/p2371-0000_defconfig
@@ -8,6 +8,7 @@ CONFIG_SYS_PROMPT="Tegra210 (P2371-0000) # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/p2371-2180_defconfig b/configs/p2371-2180_defconfig
index 8cd2fcc..b56181c 100644
--- a/configs/p2371-2180_defconfig
+++ b/configs/p2371-2180_defconfig
@@ -8,6 +8,7 @@ CONFIG_SYS_PROMPT="Tegra210 (P2371-2180) # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/p2571_defconfig b/configs/p2571_defconfig
index 5a592e9..eb38077 100644
--- a/configs/p2571_defconfig
+++ b/configs/p2571_defconfig
@@ -8,6 +8,7 @@ CONFIG_SYS_PROMPT="Tegra210 (P2571) # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/paz00_defconfig b/configs/paz00_defconfig
index 5d076f7..3d6840e 100644
--- a/configs/paz00_defconfig
+++ b/configs/paz00_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="Tegra20 (Paz00) MOD # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_USB=y
diff --git a/configs/pcm051_rev1_defconfig b/configs/pcm051_rev1_defconfig
index 2f1022c..b8739cd 100644
--- a/configs/pcm051_rev1_defconfig
+++ b/configs/pcm051_rev1_defconfig
@@ -4,5 +4,6 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="REV1"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/pcm051_rev3_defconfig b/configs/pcm051_rev3_defconfig
index 61d94b8..3a47313 100644
--- a/configs/pcm051_rev3_defconfig
+++ b/configs/pcm051_rev3_defconfig
@@ -4,5 +4,6 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="REV3"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/pcm052_defconfig b/configs/pcm052_defconfig
index e8dc402..9125645 100644
--- a/configs/pcm052_defconfig
+++ b/configs/pcm052_defconfig
@@ -3,4 +3,3 @@ CONFIG_TARGET_PCM052=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/phytec/pcm052/imximage.cfg,ENV_IS_IN_NAND"
CONFIG_NAND_VF610_NFC=y
CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
-CONFIG_SYS_NAND_VF610_NFC_45_ECC_BYTES=y
diff --git a/configs/peach-pi_defconfig b/configs/peach-pi_defconfig
index 6eff072..08ccfc3 100644
--- a/configs/peach-pi_defconfig
+++ b/configs/peach-pi_defconfig
@@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="exynos5800-peach-pi"
CONFIG_SPL=y
CONFIG_SYS_PROMPT="Peach-Pi # "
# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_PMIC=y
CONFIG_CMD_REGULATOR=y
@@ -29,7 +30,6 @@ CONFIG_I2S=y
CONFIG_I2S_SAMSUNG=y
CONFIG_SOUND_MAX98095=y
CONFIG_SOUND_WM8994=y
-CONFIG_DM_TPM=y
CONFIG_TPM_TIS_INFINEON=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/peach-pit_defconfig b/configs/peach-pit_defconfig
index 24bc161..938ee68 100644
--- a/configs/peach-pit_defconfig
+++ b/configs/peach-pit_defconfig
@@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="exynos5420-peach-pit"
CONFIG_SPL=y
CONFIG_SYS_PROMPT="Peach-Pit # "
# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_PMIC=y
CONFIG_CMD_REGULATOR=y
@@ -29,7 +30,6 @@ CONFIG_I2S=y
CONFIG_I2S_SAMSUNG=y
CONFIG_SOUND_MAX98095=y
CONFIG_SOUND_WM8994=y
-CONFIG_DM_TPM=y
CONFIG_TPM_TIS_INFINEON=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/pengwyn_defconfig b/configs/pengwyn_defconfig
index 38add54..3350b6f 100644
--- a/configs/pengwyn_defconfig
+++ b/configs/pengwyn_defconfig
@@ -3,4 +3,5 @@ CONFIG_TARGET_PENGWYN=y
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/pepper_defconfig b/configs/pepper_defconfig
index f86b1b7..a038020 100644
--- a/configs/pepper_defconfig
+++ b/configs/pepper_defconfig
@@ -4,4 +4,5 @@ CONFIG_SPL=y
CONFIG_SYS_PROMPT="pepper# "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/platinum_picon_defconfig b/configs/platinum_picon_defconfig
index 29ae5af..c4a82d7 100644
--- a/configs/platinum_picon_defconfig
+++ b/configs/platinum_picon_defconfig
@@ -6,4 +6,5 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6DL"
CONFIG_SYS_PROMPT="picon > "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/platinum_titanium_defconfig b/configs/platinum_titanium_defconfig
index 16d3184..f824bae 100644
--- a/configs/platinum_titanium_defconfig
+++ b/configs/platinum_titanium_defconfig
@@ -6,4 +6,5 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6Q"
CONFIG_SYS_PROMPT="titanium > "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/plutux_defconfig b/configs/plutux_defconfig
index b6b07d8..d19f14f 100644
--- a/configs/plutux_defconfig
+++ b/configs/plutux_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="Tegra20 (Plutux) # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_USB=y
diff --git a/configs/pov_protab2_ips9_defconfig b/configs/pov_protab2_ips9_defconfig
index 9aa5280..d9b3b45 100644
--- a/configs/pov_protab2_ips9_defconfig
+++ b/configs/pov_protab2_ips9_defconfig
@@ -17,4 +17,5 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/pr1_defconfig b/configs/pr1_defconfig
index 03a3286..f3029dc 100644
--- a/configs/pr1_defconfig
+++ b/configs/pr1_defconfig
@@ -3,6 +3,7 @@ CONFIG_TARGET_PR1=y
CONFIG_SYS_PROMPT="pr1>"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
diff --git a/configs/pxm2_defconfig b/configs/pxm2_defconfig
index b1b709f..75c6f64 100644
--- a/configs/pxm2_defconfig
+++ b/configs/pxm2_defconfig
@@ -7,5 +7,6 @@ CONFIG_AUTOBOOT_PROMPT="Autobooting in %d seconds, press \"<Esc><Esc>\" to stop\
CONFIG_AUTOBOOT_STOP_STR="\x1b\x1b"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/q8_a13_tablet_defconfig b/configs/q8_a13_tablet_defconfig
index b467b62..205359e 100644
--- a/configs/q8_a13_tablet_defconfig
+++ b/configs/q8_a13_tablet_defconfig
@@ -19,4 +19,5 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/q8_a23_tablet_800x480_defconfig b/configs/q8_a23_tablet_800x480_defconfig
index 7391464..927ab2a 100644
--- a/configs/q8_a23_tablet_800x480_defconfig
+++ b/configs/q8_a23_tablet_800x480_defconfig
@@ -20,5 +20,6 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_AXP_DLDO1_VOLT=3300
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/q8_a33_tablet_1024x600_defconfig b/configs/q8_a33_tablet_1024x600_defconfig
index 16f8600..755f4ee 100644
--- a/configs/q8_a33_tablet_1024x600_defconfig
+++ b/configs/q8_a33_tablet_1024x600_defconfig
@@ -20,5 +20,6 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_AXP_DLDO1_VOLT=3300
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/q8_a33_tablet_800x480_defconfig b/configs/q8_a33_tablet_800x480_defconfig
index 6378918..a8dfa0d 100644
--- a/configs/q8_a33_tablet_800x480_defconfig
+++ b/configs/q8_a33_tablet_800x480_defconfig
@@ -20,5 +20,6 @@ CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=5"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_AXP_DLDO1_VOLT=3300
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/r7-tv-dongle_defconfig b/configs/r7-tv-dongle_defconfig
index fcc681f..d6387fc 100644
--- a/configs/r7-tv-dongle_defconfig
+++ b/configs/r7-tv-dongle_defconfig
@@ -9,5 +9,6 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
-CONFIG_USB_EHCI_HCD=y
+CONFIG_CMD_GPIO=y
CONFIG_AXP152_POWER=y
+CONFIG_USB_EHCI_HCD=y
diff --git a/configs/rastaban_defconfig b/configs/rastaban_defconfig
index 1d8064a..f0e622d 100644
--- a/configs/rastaban_defconfig
+++ b/configs/rastaban_defconfig
@@ -7,5 +7,6 @@ CONFIG_AUTOBOOT_PROMPT="Autobooting in %d seconds, press \"<Esc><Esc>\" to stop\
CONFIG_AUTOBOOT_STOP_STR="\x1b\x1b"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/riotboard_defconfig b/configs/riotboard_defconfig
index 859b143..bdd9173 100644
--- a/configs/riotboard_defconfig
+++ b/configs/riotboard_defconfig
@@ -4,6 +4,7 @@ CONFIG_TARGET_EMBESTMX6BOARDS=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6s1g.cfg,MX6S,DDR_MB=1024,ENV_IS_IN_MMC"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_DM=y
CONFIG_SPI_FLASH=y
CONFIG_DM_THERMAL=y
diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig
index 334a1b7..5c9e69a 100644
--- a/configs/rpi_2_defconfig
+++ b/configs/rpi_2_defconfig
@@ -5,5 +5,6 @@ CONFIG_SYS_PROMPT="U-Boot> "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_PHYS_TO_BUS=y
diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig
index 8cce790..b8b267f 100644
--- a/configs/rpi_defconfig
+++ b/configs/rpi_defconfig
@@ -5,5 +5,6 @@ CONFIG_SYS_PROMPT="U-Boot> "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_PHYS_TO_BUS=y
diff --git a/configs/rut_defconfig b/configs/rut_defconfig
index 8bb8d88..ba73dc3 100644
--- a/configs/rut_defconfig
+++ b/configs/rut_defconfig
@@ -7,5 +7,6 @@ CONFIG_AUTOBOOT_PROMPT="Autobooting in %d seconds, press \"<Esc><Esc>\" to stop\
CONFIG_AUTOBOOT_STOP_STR="\x1b\x1b"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index 94c8e68..ae5b9d1 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -6,6 +6,8 @@ CONFIG_FIT_SIGNATURE=y
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_REMOTEPROC=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_SOUND=y
CONFIG_BOOTSTAGE=y
@@ -19,6 +21,8 @@ CONFIG_OF_HOSTFILE=y
CONFIG_REGMAP=y
CONFIG_SYSCON=y
CONFIG_DEVRES=y
+CONFIG_ADC=y
+CONFIG_ADC_SANDBOX=y
CONFIG_CLK=y
CONFIG_SANDBOX_GPIO=y
CONFIG_SYS_I2C_SANDBOX=y
@@ -43,12 +47,12 @@ CONFIG_DM_PMIC_SANDBOX=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_SANDBOX=y
CONFIG_RAM=y
+CONFIG_REMOTEPROC_SANDBOX=y
CONFIG_DM_RTC=y
CONFIG_SANDBOX_SERIAL=y
CONFIG_SOUND=y
CONFIG_SOUND_SANDBOX=y
CONFIG_SANDBOX_SPI=y
-CONFIG_DM_TPM=y
CONFIG_TPM_TIS_SANDBOX=y
CONFIG_USB=y
CONFIG_DM_USB=y
@@ -63,7 +67,3 @@ CONFIG_UNIT_TEST=y
CONFIG_UT_TIME=y
CONFIG_UT_DM=y
CONFIG_UT_ENV=y
-CONFIG_REMOTEPROC_SANDBOX=y
-CONFIG_CMD_REMOTEPROC=y
-CONFIG_ADC=y
-CONFIG_ADC_SANDBOX=y
diff --git a/configs/sansa_fuze_plus_defconfig b/configs/sansa_fuze_plus_defconfig
index 840f9d4..0d41602 100644
--- a/configs/sansa_fuze_plus_defconfig
+++ b/configs/sansa_fuze_plus_defconfig
@@ -3,4 +3,5 @@ CONFIG_TARGET_SANSA_FUZE_PLUS=y
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/sc_sps_1_defconfig b/configs/sc_sps_1_defconfig
index 468113d..a9aec82 100644
--- a/configs/sc_sps_1_defconfig
+++ b/configs/sc_sps_1_defconfig
@@ -3,3 +3,4 @@ CONFIG_TARGET_SC_SPS_1=y
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
diff --git a/configs/seaboard_defconfig b/configs/seaboard_defconfig
index a5023c9..bcce38c 100644
--- a/configs/seaboard_defconfig
+++ b/configs/seaboard_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="Tegra20 (SeaBoard) # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_USB=y
diff --git a/configs/secomx6quq7_defconfig b/configs/secomx6quq7_defconfig
index 57bad8b..5291881 100644
--- a/configs/secomx6quq7_defconfig
+++ b/configs/secomx6quq7_defconfig
@@ -8,3 +8,4 @@ CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_MMC"
CONFIG_SYS_PROMPT="SECO MX6Q uQ7 U-Boot > "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
diff --git a/configs/sheevaplug_defconfig b/configs/sheevaplug_defconfig
index 54e2ad7..5a37eea 100644
--- a/configs/sheevaplug_defconfig
+++ b/configs/sheevaplug_defconfig
@@ -4,3 +4,8 @@ CONFIG_TARGET_SHEEVAPLUG=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_SETEXPR is not set
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_NAND=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_USB=y
diff --git a/configs/smdk5250_defconfig b/configs/smdk5250_defconfig
index 0aca5b4..17b2a35 100644
--- a/configs/smdk5250_defconfig
+++ b/configs/smdk5250_defconfig
@@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="exynos5250-smdk5250"
CONFIG_SPL=y
CONFIG_SYS_PROMPT="SMDK5250 # "
# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_SOUND=y
CONFIG_CMD_PMIC=y
diff --git a/configs/smdk5420_defconfig b/configs/smdk5420_defconfig
index 60bcf0a..9d58ac1 100644
--- a/configs/smdk5420_defconfig
+++ b/configs/smdk5420_defconfig
@@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="exynos5420-smdk5420"
CONFIG_SPL=y
CONFIG_SYS_PROMPT="SMDK5420 # "
# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_DM_I2C_COMPAT=y
CONFIG_SPI_FLASH=y
diff --git a/configs/snapper9260_defconfig b/configs/snapper9260_defconfig
index 0635d6c..83b52cf 100644
--- a/configs/snapper9260_defconfig
+++ b/configs/snapper9260_defconfig
@@ -9,5 +9,6 @@ CONFIG_SYS_PROMPT="Snapper> "
# CONFIG_CMD_LOADS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SOURCE is not set
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/snapper9g20_defconfig b/configs/snapper9g20_defconfig
index def06f1..37a3e64 100644
--- a/configs/snapper9g20_defconfig
+++ b/configs/snapper9g20_defconfig
@@ -8,5 +8,6 @@ CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9G20"
# CONFIG_CMD_LOADS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SOURCE is not set
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/snow_defconfig b/configs/snow_defconfig
index 0c9ca8b..41441a8 100644
--- a/configs/snow_defconfig
+++ b/configs/snow_defconfig
@@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="exynos5250-snow"
CONFIG_SPL=y
CONFIG_SYS_PROMPT="snow # "
# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_SOUND=y
CONFIG_CMD_PMIC=y
@@ -38,7 +39,6 @@ CONFIG_I2S=y
CONFIG_I2S_SAMSUNG=y
CONFIG_SOUND_MAX98095=y
CONFIG_SOUND_WM8994=y
-CONFIG_DM_TPM=y
CONFIG_TPM_TIS_INFINEON=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/socfpga_arria5_defconfig b/configs/socfpga_arria5_defconfig
index afdf237..a1245e2 100644
--- a/configs/socfpga_arria5_defconfig
+++ b/configs/socfpga_arria5_defconfig
@@ -4,12 +4,13 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_SPL_DM=y
CONFIG_DM_GPIO=y
CONFIG_TARGET_SOCFPGA_ARRIA5_SOCDK=y
+CONFIG_SPL_STACK_R_ADDR=0x00800000
CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria5_socdk"
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x00800000
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_DWAPB_GPIO=y
CONFIG_SPI_FLASH=y
CONFIG_DM_ETH=y
diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig
index fcd12d9..74ce232 100644
--- a/configs/socfpga_cyclone5_defconfig
+++ b/configs/socfpga_cyclone5_defconfig
@@ -4,12 +4,13 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_SPL_DM=y
CONFIG_DM_GPIO=y
CONFIG_TARGET_SOCFPGA_CYCLONE5_SOCDK=y
+CONFIG_SPL_STACK_R_ADDR=0x00800000
CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socdk"
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x00800000
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_DWAPB_GPIO=y
CONFIG_SPI_FLASH=y
CONFIG_DM_ETH=y
diff --git a/configs/socfpga_de0_nano_soc_defconfig b/configs/socfpga_de0_nano_soc_defconfig
index 5dc74b7..5837e98 100644
--- a/configs/socfpga_de0_nano_soc_defconfig
+++ b/configs/socfpga_de0_nano_soc_defconfig
@@ -4,12 +4,13 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_SPL_DM=y
CONFIG_DM_GPIO=y
CONFIG_TARGET_SOCFPGA_TERASIC_DE0_NANO=y
+CONFIG_SPL_STACK_R_ADDR=0x00800000
CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de0_nano_soc"
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x00800000
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPL_SIMPLE_BUS=y
CONFIG_DWAPB_GPIO=y
CONFIG_DM_ETH=y
diff --git a/configs/socfpga_mcvevk_defconfig b/configs/socfpga_mcvevk_defconfig
index b90bce7..455ea95 100644
--- a/configs/socfpga_mcvevk_defconfig
+++ b/configs/socfpga_mcvevk_defconfig
@@ -4,12 +4,13 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_SPL_DM=y
CONFIG_DM_GPIO=y
CONFIG_TARGET_SOCFPGA_DENX_MCVEVK=y
+CONFIG_SPL_STACK_R_ADDR=0x00800000
CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_mcvevk"
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x00800000
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPL_SIMPLE_BUS=y
CONFIG_DWAPB_GPIO=y
CONFIG_DM_ETH=y
diff --git a/configs/socfpga_sockit_defconfig b/configs/socfpga_sockit_defconfig
index 11a4786..4ab373f 100644
--- a/configs/socfpga_sockit_defconfig
+++ b/configs/socfpga_sockit_defconfig
@@ -4,12 +4,13 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_SPL_DM=y
CONFIG_DM_GPIO=y
CONFIG_TARGET_SOCFPGA_TERASIC_SOCKIT=y
+CONFIG_SPL_STACK_R_ADDR=0x00800000
CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_sockit"
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x00800000
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPL_SIMPLE_BUS=y
CONFIG_DWAPB_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/socfpga_socrates_defconfig b/configs/socfpga_socrates_defconfig
index 04bacd0..07b8447 100644
--- a/configs/socfpga_socrates_defconfig
+++ b/configs/socfpga_socrates_defconfig
@@ -4,12 +4,13 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_SPL_DM=y
CONFIG_DM_GPIO=y
CONFIG_TARGET_SOCFPGA_CYCLONE5_SOCDK=y
+CONFIG_SPL_STACK_R_ADDR=0x00800000
CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socrates"
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_ADDR=0x00800000
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_DWAPB_GPIO=y
CONFIG_SPI_FLASH=y
CONFIG_DM_ETH=y
diff --git a/configs/spring_defconfig b/configs/spring_defconfig
index 47bc643..0f44ce8 100644
--- a/configs/spring_defconfig
+++ b/configs/spring_defconfig
@@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="exynos5250-spring"
CONFIG_SPL=y
CONFIG_SYS_PROMPT="spring # "
# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_SOUND=y
CONFIG_CMD_PMIC=y
@@ -38,7 +39,6 @@ CONFIG_I2S=y
CONFIG_I2S_SAMSUNG=y
CONFIG_SOUND_MAX98095=y
CONFIG_SOUND_WM8994=y
-CONFIG_DM_TPM=y
CONFIG_TPM_TIS_INFINEON=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/sunxi_Gemei_G9_defconfig b/configs/sunxi_Gemei_G9_defconfig
index 6d39dec..d3de194 100644
--- a/configs/sunxi_Gemei_G9_defconfig
+++ b/configs/sunxi_Gemei_G9_defconfig
@@ -14,4 +14,5 @@ CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig
index ffc419d..c56c412 100644
--- a/configs/tbs2910_defconfig
+++ b/configs/tbs2910_defconfig
@@ -4,5 +4,6 @@ CONFIG_TARGET_TBS2910=y
CONFIG_SYS_PROMPT="Matrix U-Boot> "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_DM=y
CONFIG_DM_THERMAL=y
diff --git a/configs/tcm-bf518_defconfig b/configs/tcm-bf518_defconfig
index 26da180..7a8700f 100644
--- a/configs/tcm-bf518_defconfig
+++ b/configs/tcm-bf518_defconfig
@@ -1,5 +1,6 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_TCM_BF518=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
diff --git a/configs/tcm-bf537_defconfig b/configs/tcm-bf537_defconfig
index 8933625..056b69f 100644
--- a/configs/tcm-bf537_defconfig
+++ b/configs/tcm-bf537_defconfig
@@ -1,5 +1,6 @@
CONFIG_BLACKFIN=y
CONFIG_TARGET_TCM_BF537=y
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
diff --git a/configs/tec-ng_defconfig b/configs/tec-ng_defconfig
index de74dc9..7a8d687 100644
--- a/configs/tec-ng_defconfig
+++ b/configs/tec-ng_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="Tegra30 (TEC-NG) # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/tec_defconfig b/configs/tec_defconfig
index 2163ec8..a4d5ac6 100644
--- a/configs/tec_defconfig
+++ b/configs/tec_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="Tegra20 (TEC) # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_USB=y
diff --git a/configs/thuban_defconfig b/configs/thuban_defconfig
index 6b8e6b1..70420f0 100644
--- a/configs/thuban_defconfig
+++ b/configs/thuban_defconfig
@@ -7,5 +7,6 @@ CONFIG_AUTOBOOT_PROMPT="Autobooting in %d seconds, press \"<Esc><Esc>\" to stop\
CONFIG_AUTOBOOT_STOP_STR="\x1b\x1b"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/titanium_defconfig b/configs/titanium_defconfig
index 45c49ce..e7f594c 100644
--- a/configs/titanium_defconfig
+++ b/configs/titanium_defconfig
@@ -5,4 +5,5 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/barco/titanium/imximage.cfg"
CONFIG_SYS_PROMPT="Titanium > "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/tqma6q_mba6_mmc_defconfig b/configs/tqma6q_mba6_mmc_defconfig
index c590354..827b5be 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -3,4 +3,5 @@ CONFIG_ARCH_MX6=y
CONFIG_TARGET_TQMA6=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/tqma6q_mba6_spi_defconfig b/configs/tqma6q_mba6_spi_defconfig
index 7de3f99..9bfb539 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_TQMA6=y
CONFIG_TQMA6X_SPI_BOOT=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/tqma6s_mba6_mmc_defconfig b/configs/tqma6s_mba6_mmc_defconfig
index 7bf15d1..9b8ae93 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -4,4 +4,5 @@ CONFIG_TARGET_TQMA6=y
CONFIG_TQMA6S=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/tqma6s_mba6_spi_defconfig b/configs/tqma6s_mba6_spi_defconfig
index ff38d0b..c1d06ec 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -5,4 +5,5 @@ CONFIG_TQMA6S=y
CONFIG_TQMA6X_SPI_BOOT=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_SPI_FLASH=y
diff --git a/configs/tqma6s_wru4_mmc_defconfig b/configs/tqma6s_wru4_mmc_defconfig
index e30b130..1d47006 100644
--- a/configs/tqma6s_wru4_mmc_defconfig
+++ b/configs/tqma6s_wru4_mmc_defconfig
@@ -7,4 +7,5 @@ CONFIG_AUTOBOOT_KEYED=y
CONFIG_AUTOBOOT_PROMPT="Enter password in %d seconds to stop autoboot\n"
CONFIG_AUTOBOOT_ENCRYPTION=y
CONFIG_AUTOBOOT_STOP_STR_SHA256="36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068"
+CONFIG_CMD_GPIO=y
CONFIG_PCA9551_LED=y
diff --git a/configs/trimslice_defconfig b/configs/trimslice_defconfig
index 18292e2..be65652 100644
--- a/configs/trimslice_defconfig
+++ b/configs/trimslice_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="Tegra20 (TrimSlice) # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/tseries_mmc_defconfig b/configs/tseries_mmc_defconfig
index b4a4873..9b096ed 100644
--- a/configs/tseries_mmc_defconfig
+++ b/configs/tseries_mmc_defconfig
@@ -12,6 +12,7 @@ CONFIG_SYS_PROMPT="U-Boot (BuR V2.0)# "
# CONFIG_CMD_LOADS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_ITEST is not set
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
diff --git a/configs/tseries_nand_defconfig b/configs/tseries_nand_defconfig
index 8177a51..ffce135 100644
--- a/configs/tseries_nand_defconfig
+++ b/configs/tseries_nand_defconfig
@@ -12,6 +12,7 @@ CONFIG_SYS_PROMPT="U-Boot (BuR V2.0)# "
# CONFIG_CMD_LOADS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_ITEST is not set
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
diff --git a/configs/tseries_spi_defconfig b/configs/tseries_spi_defconfig
index 1c2a0ba..6703b17 100644
--- a/configs/tseries_spi_defconfig
+++ b/configs/tseries_spi_defconfig
@@ -12,6 +12,7 @@ CONFIG_SYS_PROMPT="U-Boot (BuR V2.0)# "
# CONFIG_CMD_LOADS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_ITEST is not set
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
diff --git a/configs/twister_defconfig b/configs/twister_defconfig
index b817a55..ec85267 100644
--- a/configs/twister_defconfig
+++ b/configs/twister_defconfig
@@ -5,4 +5,5 @@ CONFIG_SPL=y
CONFIG_SYS_PROMPT="twister => "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/udoo_defconfig b/configs/udoo_defconfig
index 223917d..0a7f70a 100644
--- a/configs/udoo_defconfig
+++ b/configs/udoo_defconfig
@@ -3,5 +3,6 @@ CONFIG_ARCH_MX6=y
CONFIG_TARGET_UDOO=y
CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL"
+CONFIG_CMD_GPIO=y
CONFIG_DM=y
CONFIG_DM_THERMAL=y
diff --git a/configs/venice2_defconfig b/configs/venice2_defconfig
index 263ec63..a93c139 100644
--- a/configs/venice2_defconfig
+++ b/configs/venice2_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="Tegra124 (Venice2) # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_SPI_FLASH=y
diff --git a/configs/ventana_defconfig b/configs/ventana_defconfig
index 79c125e..01dad0e 100644
--- a/configs/ventana_defconfig
+++ b/configs/ventana_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="Tegra20 (Ventana) # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_USB=y
diff --git a/configs/vexpress_aemv8a_dram_defconfig b/configs/vexpress_aemv8a_dram_defconfig
index e9fc870..72d405f 100644
--- a/configs/vexpress_aemv8a_dram_defconfig
+++ b/configs/vexpress_aemv8a_dram_defconfig
@@ -1,7 +1,9 @@
CONFIG_ARM=y
CONFIG_TARGET_VEXPRESS64_BASE_FVP_DRAM=y
CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DM_SERIAL=y
CONFIG_DEFAULT_DEVICE_TREE="vexpress64"
+CONFIG_SYS_PROMPT="VExpress64# "
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_XIMG is not set
@@ -15,5 +17,3 @@ CONFIG_DEFAULT_DEVICE_TREE="vexpress64"
# CONFIG_CMD_NFS is not set
# CONFIG_CMD_MISC is not set
CONFIG_DM=y
-CONFIG_DM_SERIAL=y
-CONFIG_SYS_PROMPT="VExpress64# "
diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig
index 595e4be..f2c9cd2 100644
--- a/configs/wandboard_defconfig
+++ b/configs/wandboard_defconfig
@@ -5,5 +5,6 @@ CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
CONFIG_DM=y
CONFIG_DM_THERMAL=y
diff --git a/configs/warp_defconfig b/configs/warp_defconfig
index 423f820..f112d33 100644
--- a/configs/warp_defconfig
+++ b/configs/warp_defconfig
@@ -4,6 +4,7 @@ CONFIG_TARGET_WARP=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NET is not set
# CONFIG_CMD_NFS is not set
diff --git a/configs/whistler_defconfig b/configs/whistler_defconfig
index 969f73c..995cf36 100644
--- a/configs/whistler_defconfig
+++ b/configs/whistler_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="Tegra20 (Whistler) # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_USB=y
diff --git a/configs/woodburn_defconfig b/configs/woodburn_defconfig
index 233b650..6c60f5e 100644
--- a/configs/woodburn_defconfig
+++ b/configs/woodburn_defconfig
@@ -1,4 +1,5 @@
CONFIG_ARM=y
CONFIG_TARGET_WOODBURN=y
CONFIG_SYS_PROMPT="woodburn U-Boot > "
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/woodburn_sd_defconfig b/configs/woodburn_sd_defconfig
index aa831d9..2d2ee9e 100644
--- a/configs/woodburn_sd_defconfig
+++ b/configs/woodburn_sd_defconfig
@@ -3,4 +3,5 @@ CONFIG_TARGET_WOODBURN_SD=y
CONFIG_SPL=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/woodburn/imximage.cfg"
CONFIG_SYS_PROMPT="woodburn U-Boot > "
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/work_92105_defconfig b/configs/work_92105_defconfig
index 0169f30..1c22eaf 100644
--- a/configs/work_92105_defconfig
+++ b/configs/work_92105_defconfig
@@ -4,5 +4,6 @@ CONFIG_DM_GPIO=y
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_DM=y
diff --git a/configs/x600_defconfig b/configs/x600_defconfig
index 61d91d4..a1b2e33 100644
--- a/configs/x600_defconfig
+++ b/configs/x600_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_PROMPT="X600> "
CONFIG_AUTOBOOT_KEYED=y
CONFIG_AUTOBOOT_PROMPT="Hit SPACE in %d seconds to stop autoboot.\n"
CONFIG_AUTOBOOT_STOP_STR=" "
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_NETDEVICES=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/xfi3_defconfig b/configs/xfi3_defconfig
index 90927ed..3c7cb0d 100644
--- a/configs/xfi3_defconfig
+++ b/configs/xfi3_defconfig
@@ -3,4 +3,5 @@ CONFIG_TARGET_XFI3=y
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/zynq_microzed_defconfig b/configs/zynq_microzed_defconfig
index 74ca3a9..6cbf8ac 100644
--- a/configs/zynq_microzed_defconfig
+++ b/configs/zynq_microzed_defconfig
@@ -8,8 +8,8 @@ CONFIG_FIT_VERBOSE=y
CONFIG_FIT_SIGNATURE=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
-CONFIG_OF_SEPARATE=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPI_FLASH=y
CONFIG_ZYNQ_QSPI=y
diff --git a/configs/zynq_picozed_defconfig b/configs/zynq_picozed_defconfig
index 3a42efb..600ca8b 100644
--- a/configs/zynq_picozed_defconfig
+++ b/configs/zynq_picozed_defconfig
@@ -5,6 +5,6 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-picozed"
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
-CONFIG_OF_SEPARATE=y
CONFIG_NET_RANDOM_ETHADDR=y
diff --git a/configs/zynq_zc702_defconfig b/configs/zynq_zc702_defconfig
index 3e488be..2b51deb 100644
--- a/configs/zynq_zc702_defconfig
+++ b/configs/zynq_zc702_defconfig
@@ -7,8 +7,8 @@ CONFIG_FIT_VERBOSE=y
CONFIG_FIT_SIGNATURE=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
-CONFIG_OF_SEPARATE=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPI_FLASH=y
CONFIG_ZYNQ_QSPI=y
diff --git a/configs/zynq_zc706_defconfig b/configs/zynq_zc706_defconfig
index edd3635..0bc53a8 100644
--- a/configs/zynq_zc706_defconfig
+++ b/configs/zynq_zc706_defconfig
@@ -8,8 +8,8 @@ CONFIG_FIT_VERBOSE=y
CONFIG_FIT_SIGNATURE=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
-CONFIG_OF_SEPARATE=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPI_FLASH=y
CONFIG_ZYNQ_QSPI=y
diff --git a/configs/zynq_zc770_xm010_defconfig b/configs/zynq_zc770_xm010_defconfig
index 69a0a9c..17833e7 100644
--- a/configs/zynq_zc770_xm010_defconfig
+++ b/configs/zynq_zc770_xm010_defconfig
@@ -9,8 +9,8 @@ CONFIG_FIT_SIGNATURE=y
CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM010"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
-CONFIG_OF_SEPARATE=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPI_FLASH=y
CONFIG_ZYNQ_QSPI=y
diff --git a/configs/zynq_zc770_xm011_defconfig b/configs/zynq_zc770_xm011_defconfig
index 2a61fe3..49dd025 100644
--- a/configs/zynq_zc770_xm011_defconfig
+++ b/configs/zynq_zc770_xm011_defconfig
@@ -9,6 +9,6 @@ CONFIG_FIT_SIGNATURE=y
CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM011"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
-CONFIG_OF_SEPARATE=y
CONFIG_NET_RANDOM_ETHADDR=y
diff --git a/configs/zynq_zc770_xm012_defconfig b/configs/zynq_zc770_xm012_defconfig
index eb98a39..d505943 100644
--- a/configs/zynq_zc770_xm012_defconfig
+++ b/configs/zynq_zc770_xm012_defconfig
@@ -7,6 +7,6 @@ CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_FIT_SIGNATURE=y
CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM012"
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
-CONFIG_OF_SEPARATE=y
CONFIG_NET_RANDOM_ETHADDR=y
diff --git a/configs/zynq_zc770_xm013_defconfig b/configs/zynq_zc770_xm013_defconfig
index 8d65c05..c2ae2ab 100644
--- a/configs/zynq_zc770_xm013_defconfig
+++ b/configs/zynq_zc770_xm013_defconfig
@@ -9,6 +9,6 @@ CONFIG_FIT_SIGNATURE=y
CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM013"
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
-CONFIG_OF_SEPARATE=y
CONFIG_NET_RANDOM_ETHADDR=y
diff --git a/configs/zynq_zed_defconfig b/configs/zynq_zed_defconfig
index df5e25a..15efb19 100644
--- a/configs/zynq_zed_defconfig
+++ b/configs/zynq_zed_defconfig
@@ -8,8 +8,8 @@ CONFIG_FIT_VERBOSE=y
CONFIG_FIT_SIGNATURE=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
-CONFIG_OF_SEPARATE=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPI_FLASH=y
CONFIG_ZYNQ_QSPI=y
diff --git a/configs/zynq_zybo_defconfig b/configs/zynq_zybo_defconfig
index b7531d6..1227b7a 100644
--- a/configs/zynq_zybo_defconfig
+++ b/configs/zynq_zybo_defconfig
@@ -8,8 +8,8 @@ CONFIG_FIT_VERBOSE=y
CONFIG_FIT_SIGNATURE=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
-CONFIG_OF_SEPARATE=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DEBUG_UART=y
CONFIG_DEBUG_UART_ZYNQ=y
diff --git a/doc/git-mailrc b/doc/git-mailrc
index 1b26e23..85bac75 100644
--- a/doc/git-mailrc
+++ b/doc/git-mailrc
@@ -17,6 +17,7 @@ alias afleming Andy Fleming <afleming@gmail.com>
alias ag Anatolij Gustschin <agust@denx.de>
alias alisonwang Alison Wang <alison.wang@freescale.com>
alias angelo_ts Angelo Dureghello <angelo@sysam.it>
+alias bmeng Bin Meng <bmeng.cn@gmail.com>
alias danielschwierzeck Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
alias galak Kumar Gala <galak@kernel.crashing.org>
alias gruss Graeme Russ <graeme.russ@gmail.com>
@@ -111,7 +112,7 @@ alias sparc uboot, Francois Retief <fgretief@spaceteq.co.za>
alias superh uboot, iwamatsu
alias sh superh
-alias x86 uboot, sjg, gruss
+alias x86 uboot, sjg, gruss, bmeng
# Subsystem aliases
alias dm uboot, sjg
diff --git a/drivers/core/root.c b/drivers/core/root.c
index bdb394a..e7b1f24 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -59,6 +59,8 @@ void fix_drivers(void)
entry->unbind += gd->reloc_off;
if (entry->ofdata_to_platdata)
entry->ofdata_to_platdata += gd->reloc_off;
+ if (entry->child_post_bind)
+ entry->child_post_bind += gd->reloc_off;
if (entry->child_pre_probe)
entry->child_pre_probe += gd->reloc_off;
if (entry->child_post_remove)
@@ -81,10 +83,16 @@ void fix_uclass(void)
entry->post_bind += gd->reloc_off;
if (entry->pre_unbind)
entry->pre_unbind += gd->reloc_off;
+ if (entry->pre_probe)
+ entry->pre_probe += gd->reloc_off;
if (entry->post_probe)
entry->post_probe += gd->reloc_off;
if (entry->pre_remove)
entry->pre_remove += gd->reloc_off;
+ if (entry->child_post_bind)
+ entry->child_post_bind += gd->reloc_off;
+ if (entry->child_pre_probe)
+ entry->child_pre_probe += gd->reloc_off;
if (entry->init)
entry->init += gd->reloc_off;
if (entry->destroy)
diff --git a/drivers/ddr/marvell/a38x/ddr3_a38x.h b/drivers/ddr/marvell/a38x/ddr3_a38x.h
index 49621bc..1ed5174 100644
--- a/drivers/ddr/marvell/a38x/ddr3_a38x.h
+++ b/drivers/ddr/marvell/a38x/ddr3_a38x.h
@@ -12,11 +12,6 @@
#include "ddr3_hws_hw_training_def.h"
-/* Allow topolgy update from board TWSI device*/
-#if !defined(CONFIG_CUSTOMER_BOARD_SUPPORT)
-#define MV_DDR_TOPOLOGY_UPDATE_FROM_TWSI
-#endif
-
#define ECC_SUPPORT
/* right now, we're not supporting this in mainline */
diff --git a/drivers/ddr/marvell/a38x/ddr3_hws_hw_training_def.h b/drivers/ddr/marvell/a38x/ddr3_hws_hw_training_def.h
index 7500a72..06d0ab1 100644
--- a/drivers/ddr/marvell/a38x/ddr3_hws_hw_training_def.h
+++ b/drivers/ddr/marvell/a38x/ddr3_hws_hw_training_def.h
@@ -23,8 +23,8 @@
#define CPU_CONFIGURATION_REG(id) (0x21800 + (id * 0x100))
#define CPU_MRVL_ID_OFFSET 0x10
-#define SAR1_CPU_CORE_MASK 0x00000018
-#define SAR1_CPU_CORE_OFFSET 3
+#define SAR1_CPU_CORE_MASK 0x38000000
+#define SAR1_CPU_CORE_OFFSET 27
#define NEW_FABRIC_TWSI_ADDR 0x4e
#ifdef DB_784MP_GP
@@ -461,7 +461,4 @@
#define CLK_CPU_2200 13
#define CLK_CPU_2400 14
-#define SAR1_CPU_CORE_MASK 0x00000018
-#define SAR1_CPU_CORE_OFFSET 3
-
#endif /* _DDR3_HWS_HW_TRAINING_DEF_H */
diff --git a/drivers/ddr/marvell/a38x/ddr3_init.c b/drivers/ddr/marvell/a38x/ddr3_init.c
index d6ed8e0..556f877 100644
--- a/drivers/ddr/marvell/a38x/ddr3_init.c
+++ b/drivers/ddr/marvell/a38x/ddr3_init.c
@@ -96,7 +96,6 @@ u8 generic_init_controller = 1;
static u32 ddr3_get_static_ddr_mode(void);
#endif
static int ddr3_hws_tune_training_params(u8 dev_num);
-static int ddr3_update_topology_map(struct hws_topology_map *topology_map);
/* device revision */
#define DEV_VERSION_ID_REG 0x1823c
@@ -383,14 +382,6 @@ int ddr3_init(void)
}
#endif
- /* Load topology for New Training IP */
- status = ddr3_load_topology_map();
- if (MV_OK != status) {
- printf("%s Training Sequence topology load - FAILED\n",
- ddr_type);
- return status;
- }
-
/* Tune training algo paramteres */
status = ddr3_hws_tune_training_params(0);
if (MV_OK != status)
@@ -539,27 +530,6 @@ u32 ddr3_get_cs_num_from_reg(void)
return cs_count;
}
-/*
- * Name: ddr3_load_topology_map
- * Desc:
- * Args:
- * Notes:
- * Returns:
- */
-int ddr3_load_topology_map(void)
-{
- struct hws_topology_map *tm = ddr3_get_topology_map();
-
-#if defined(MV_DDR_TOPOLOGY_UPDATE_FROM_TWSI)
- /* Update topology data */
- if (MV_OK != ddr3_update_topology_map(tm)) {
- DEBUG_INIT_FULL_S("Failed update of DDR3 Topology map\n");
- }
-#endif
-
- return MV_OK;
-}
-
void get_target_freq(u32 freq_mode, u32 *ddr_freq, u32 *hclk_ps)
{
u32 tmp, hclk = 200;
@@ -781,48 +751,6 @@ int ddr3_calc_mem_cs_size(u32 cs, u32 *cs_size)
return MV_OK;
}
-#if defined(MV_DDR_TOPOLOGY_UPDATE_FROM_TWSI)
-/*
- * Name: ddr3_update_topology_map
- * Desc:
- * Args:
- * Notes: Update topology map by Sat_r values
- * Returns:
- */
-static int ddr3_update_topology_map(struct hws_topology_map *tm)
-{
- struct topology_update_info topology_update_info;
-
- topology_update_info.update_width = 0;
- topology_update_info.update_ecc = 0;
- topology_update_info.update_ecc_pup3_mode = 0;
- sys_env_get_topology_update_info(&topology_update_info);
- if (topology_update_info.update_width) {
- tm->bus_act_mask &=
- ~(TOPOLOGY_UPDATE_WIDTH_32BIT_MASK);
- if (topology_update_info.width == TOPOLOGY_UPDATE_WIDTH_16BIT)
- tm->bus_act_mask =
- TOPOLOGY_UPDATE_WIDTH_16BIT_MASK;
- else
- tm->bus_act_mask =
- TOPOLOGY_UPDATE_WIDTH_32BIT_MASK;
- }
-
- if (topology_update_info.update_ecc) {
- if (topology_update_info.ecc == TOPOLOGY_UPDATE_ECC_OFF) {
- tm->bus_act_mask &=
- ~(1 << topology_update_info.ecc_pup_mode_offset);
- } else {
- tm->bus_act_mask |=
- topology_update_info.
- ecc << topology_update_info.ecc_pup_mode_offset;
- }
- }
-
- return MV_OK;
-}
-#endif
-
/*
* Name: ddr3_hws_tune_training_params
* Desc:
diff --git a/drivers/gpio/altera_pio.c b/drivers/gpio/altera_pio.c
index 7ceb80e..6f42bf8 100644
--- a/drivers/gpio/altera_pio.c
+++ b/drivers/gpio/altera_pio.c
@@ -89,8 +89,9 @@ static int altera_pio_ofdata_to_platdata(struct udevice *dev)
{
struct altera_pio_platdata *plat = dev_get_platdata(dev);
- plat->regs = ioremap(dev_get_addr(dev),
- sizeof(struct altera_pio_regs));
+ plat->regs = map_physmem(dev_get_addr(dev),
+ sizeof(struct altera_pio_regs),
+ MAP_NOCACHE);
plat->gpio_count = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
"altr,gpio-bank-width", 32);
plat->bank_name = fdt_getprop(gd->fdt_blob, dev->of_offset,
diff --git a/drivers/misc/altera_sysid.c b/drivers/misc/altera_sysid.c
index 737520f..2d0fa2a 100644
--- a/drivers/misc/altera_sysid.c
+++ b/drivers/misc/altera_sysid.c
@@ -76,8 +76,9 @@ static int altera_sysid_ofdata_to_platdata(struct udevice *dev)
{
struct altera_sysid_platdata *plat = dev_get_platdata(dev);
- plat->regs = ioremap(dev_get_addr(dev),
- sizeof(struct altera_sysid_regs));
+ plat->regs = map_physmem(dev_get_addr(dev),
+ sizeof(struct altera_sysid_regs),
+ MAP_NOCACHE);
return 0;
}
diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
index c69f5d4..e169b77 100644
--- a/drivers/mmc/zynq_sdhci.c
+++ b/drivers/mmc/zynq_sdhci.c
@@ -29,7 +29,7 @@ int zynq_sdhci_init(phys_addr_t regbase)
SDHCI_QUIRK_BROKEN_R1B;
host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
- add_sdhci(host, 52000000, 52000000 >> 9);
+ add_sdhci(host, CONFIG_ZYNQ_SDHCI_MAX_FREQ, 52000000 >> 9);
return 0;
}
diff --git a/drivers/mtd/altera_qspi.c b/drivers/mtd/altera_qspi.c
index 1826dc8..50c6e0e 100644
--- a/drivers/mtd/altera_qspi.c
+++ b/drivers/mtd/altera_qspi.c
@@ -243,7 +243,7 @@ static int altera_qspi_ofdata_to_platdata(struct udevice *dev)
addr = fdt_translate_address((void *)blob,
node, cell + idx);
size = fdt_addr_to_cpu(cell[idx + addrc]);
- base = ioremap(addr, size);
+ base = map_physmem(addr, size, MAP_NOCACHE);
len = strlen(list);
if (strcmp(list, "avl_csr") == 0) {
pdata->regs = base;
diff --git a/drivers/mtd/spi/sf-uclass.c b/drivers/mtd/spi/sf-uclass.c
index 350e21a..72e0f6b 100644
--- a/drivers/mtd/spi/sf-uclass.c
+++ b/drivers/mtd/spi/sf-uclass.c
@@ -11,6 +11,8 @@
#include <dm/device-internal.h>
#include "sf_internal.h"
+DECLARE_GLOBAL_DATA_PTR;
+
int spi_flash_read_dm(struct udevice *dev, u32 offset, size_t len, void *buf)
{
return sf_get_ops(dev)->read(dev, offset, len, buf);
@@ -72,8 +74,29 @@ int spi_flash_remove(struct udevice *dev)
return device_remove(dev);
}
+static int spi_flash_post_bind(struct udevice *dev)
+{
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
+ struct dm_spi_flash_ops *ops = sf_get_ops(dev);
+ static int reloc_done;
+
+ if (!reloc_done) {
+ if (ops->read)
+ ops->read += gd->reloc_off;
+ if (ops->write)
+ ops->write += gd->reloc_off;
+ if (ops->erase)
+ ops->erase += gd->reloc_off;
+
+ reloc_done++;
+ }
+#endif
+ return 0;
+}
+
UCLASS_DRIVER(spi_flash) = {
.id = UCLASS_SPI_FLASH,
.name = "spi_flash",
+ .post_bind = spi_flash_post_bind,
.per_device_auto_alloc_size = sizeof(struct spi_flash),
};
diff --git a/drivers/mtd/spi/spi_spl_load.c b/drivers/mtd/spi/spi_spl_load.c
index 2e0c871..ca56fe9 100644
--- a/drivers/mtd/spi/spi_spl_load.c
+++ b/drivers/mtd/spi/spi_spl_load.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <spi.h>
#include <spi_flash.h>
+#include <errno.h>
#include <spl.h>
#ifdef CONFIG_SPL_OS_BOOT
@@ -48,8 +49,9 @@ static int spi_load_image_os(struct spi_flash *flash,
* configured and available since this code loads the main U-Boot image
* from SPI into SDRAM and starts it from there.
*/
-void spl_spi_load_image(void)
+int spl_spi_load_image(void)
{
+ int err = 0;
struct spi_flash *flash;
struct image_header *header;
@@ -63,7 +65,7 @@ void spl_spi_load_image(void)
CONFIG_SF_DEFAULT_MODE);
if (!flash) {
puts("SPI probe failed.\n");
- hang();
+ return -ENODEV;
}
/* use CONFIG_SYS_TEXT_BASE as temporary storage area */
@@ -74,10 +76,15 @@ void spl_spi_load_image(void)
#endif
{
/* Load u-boot, mkimage header is 64 bytes. */
- spi_flash_read(flash, CONFIG_SYS_SPI_U_BOOT_OFFS, 0x40,
- (void *)header);
+ err = spi_flash_read(flash, CONFIG_SYS_SPI_U_BOOT_OFFS, 0x40,
+ (void *)header);
+ if (err)
+ return err;
+
spl_parse_image_header(header);
- spi_flash_read(flash, CONFIG_SYS_SPI_U_BOOT_OFFS,
+ err = spi_flash_read(flash, CONFIG_SYS_SPI_U_BOOT_OFFS,
spl_image.size, (void *)spl_image.load_addr);
}
+
+ return err;
}
diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c
index 5692fe9..3eaa270 100644
--- a/drivers/net/altera_tse.c
+++ b/drivers/net/altera_tse.c
@@ -608,7 +608,7 @@ static int altera_tse_probe(struct udevice *dev)
addr = fdt_translate_address((void *)blob,
node, cell + idx);
size = fdt_addr_to_cpu(cell[idx + addrc]);
- base = ioremap(addr, size);
+ base = map_physmem(addr, size, MAP_NOCACHE);
len = strlen(list);
if (strcmp(list, "control_port") == 0)
priv->mac_dev = base;
diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile
index d096db8..9e4d492 100644
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -24,4 +24,5 @@ obj-$(CONFIG_PHY_NATSEMI) += natsemi.o
obj-$(CONFIG_PHY_REALTEK) += realtek.o
obj-$(CONFIG_PHY_SMSC) += smsc.o
obj-$(CONFIG_PHY_TERANETICS) += teranetics.o
+obj-$(CONFIG_PHY_TI) += ti.o
obj-$(CONFIG_PHY_VITESSE) += vitesse.o
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index d7364ff..5633ec2 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -484,6 +484,9 @@ int phy_init(void)
#ifdef CONFIG_PHY_TERANETICS
phy_teranetics_init();
#endif
+#ifdef CONFIG_PHY_TI
+ phy_ti_init();
+#endif
#ifdef CONFIG_PHY_VITESSE
phy_vitesse_init();
#endif
diff --git a/drivers/net/phy/ti.c b/drivers/net/phy/ti.c
new file mode 100644
index 0000000..541a57f
--- /dev/null
+++ b/drivers/net/phy/ti.c
@@ -0,0 +1,200 @@
+/*
+ * TI PHY drivers
+ *
+ * SPDX-License-Identifier: GPL-2.0
+ *
+ */
+#include <common.h>
+#include <phy.h>
+
+/* TI DP83867 */
+#define DP83867_DEVADDR 0x1f
+
+#define MII_DP83867_PHYCTRL 0x10
+#define MII_DP83867_MICR 0x12
+#define DP83867_CTRL 0x1f
+
+/* Extended Registers */
+#define DP83867_RGMIICTL 0x0032
+#define DP83867_RGMIIDCTL 0x0086
+
+#define DP83867_SW_RESET BIT(15)
+#define DP83867_SW_RESTART BIT(14)
+
+/* MICR Interrupt bits */
+#define MII_DP83867_MICR_AN_ERR_INT_EN BIT(15)
+#define MII_DP83867_MICR_SPEED_CHNG_INT_EN BIT(14)
+#define MII_DP83867_MICR_DUP_MODE_CHNG_INT_EN BIT(13)
+#define MII_DP83867_MICR_PAGE_RXD_INT_EN BIT(12)
+#define MII_DP83867_MICR_AUTONEG_COMP_INT_EN BIT(11)
+#define MII_DP83867_MICR_LINK_STS_CHNG_INT_EN BIT(10)
+#define MII_DP83867_MICR_FALSE_CARRIER_INT_EN BIT(8)
+#define MII_DP83867_MICR_SLEEP_MODE_CHNG_INT_EN BIT(4)
+#define MII_DP83867_MICR_WOL_INT_EN BIT(3)
+#define MII_DP83867_MICR_XGMII_ERR_INT_EN BIT(2)
+#define MII_DP83867_MICR_POL_CHNG_INT_EN BIT(1)
+#define MII_DP83867_MICR_JABBER_INT_EN BIT(0)
+
+/* RGMIICTL bits */
+#define DP83867_RGMII_TX_CLK_DELAY_EN BIT(1)
+#define DP83867_RGMII_RX_CLK_DELAY_EN BIT(0)
+
+/* PHY CTRL bits */
+#define DP83867_PHYCR_FIFO_DEPTH_SHIFT 14
+
+/* RGMIIDCTL bits */
+#define DP83867_RGMII_TX_CLK_DELAY_SHIFT 4
+
+#define MII_MMD_CTRL 0x0d /* MMD Access Control Register */
+#define MII_MMD_DATA 0x0e /* MMD Access Data Register */
+
+/* MMD Access Control register fields */
+#define MII_MMD_CTRL_DEVAD_MASK 0x1f /* Mask MMD DEVAD*/
+#define MII_MMD_CTRL_ADDR 0x0000 /* Address */
+#define MII_MMD_CTRL_NOINCR 0x4000 /* no post increment */
+#define MII_MMD_CTRL_INCR_RDWT 0x8000 /* post increment on reads & writes */
+#define MII_MMD_CTRL_INCR_ON_WT 0xC000 /* post increment on writes only */
+
+/**
+ * phy_read_mmd_indirect - reads data from the MMD registers
+ * @phydev: The PHY device bus
+ * @prtad: MMD Address
+ * @devad: MMD DEVAD
+ * @addr: PHY address on the MII bus
+ *
+ * Description: it reads data from the MMD registers (clause 22 to access to
+ * clause 45) of the specified phy address.
+ * To read these registers we have:
+ * 1) Write reg 13 // DEVAD
+ * 2) Write reg 14 // MMD Address
+ * 3) Write reg 13 // MMD Data Command for MMD DEVAD
+ * 3) Read reg 14 // Read MMD data
+ */
+int phy_read_mmd_indirect(struct phy_device *phydev, int prtad,
+ int devad, int addr)
+{
+ int value = -1;
+
+ /* Write the desired MMD Devad */
+ phy_write(phydev, addr, MII_MMD_CTRL, devad);
+
+ /* Write the desired MMD register address */
+ phy_write(phydev, addr, MII_MMD_DATA, prtad);
+
+ /* Select the Function : DATA with no post increment */
+ phy_write(phydev, addr, MII_MMD_CTRL, (devad | MII_MMD_CTRL_NOINCR));
+
+ /* Read the content of the MMD's selected register */
+ value = phy_read(phydev, addr, MII_MMD_DATA);
+ return value;
+}
+
+/**
+ * phy_write_mmd_indirect - writes data to the MMD registers
+ * @phydev: The PHY device
+ * @prtad: MMD Address
+ * @devad: MMD DEVAD
+ * @addr: PHY address on the MII bus
+ * @data: data to write in the MMD register
+ *
+ * Description: Write data from the MMD registers of the specified
+ * phy address.
+ * To write these registers we have:
+ * 1) Write reg 13 // DEVAD
+ * 2) Write reg 14 // MMD Address
+ * 3) Write reg 13 // MMD Data Command for MMD DEVAD
+ * 3) Write reg 14 // Write MMD data
+ */
+void phy_write_mmd_indirect(struct phy_device *phydev, int prtad,
+ int devad, int addr, u32 data)
+{
+ /* Write the desired MMD Devad */
+ phy_write(phydev, addr, MII_MMD_CTRL, devad);
+
+ /* Write the desired MMD register address */
+ phy_write(phydev, addr, MII_MMD_DATA, prtad);
+
+ /* Select the Function : DATA with no post increment */
+ phy_write(phydev, addr, MII_MMD_CTRL, (devad | MII_MMD_CTRL_NOINCR));
+
+ /* Write the data into MMD's selected register */
+ phy_write(phydev, addr, MII_MMD_DATA, data);
+}
+
+/**
+ * phy_interface_is_rgmii - Convenience function for testing if a PHY interface
+ * is RGMII (all variants)
+ * @phydev: the phy_device struct
+ */
+static inline bool phy_interface_is_rgmii(struct phy_device *phydev)
+{
+ return phydev->interface >= PHY_INTERFACE_MODE_RGMII &&
+ phydev->interface <= PHY_INTERFACE_MODE_RGMII_TXID;
+}
+
+/* User setting - can be taken from DTS */
+#define RX_ID_DELAY 8
+#define TX_ID_DELAY 0xa
+#define FIFO_DEPTH 1
+
+static int dp83867_config(struct phy_device *phydev)
+{
+ unsigned int val, delay;
+ int ret;
+
+ /* Restart the PHY. */
+ val = phy_read(phydev, MDIO_DEVAD_NONE, DP83867_CTRL);
+ phy_write(phydev, MDIO_DEVAD_NONE, DP83867_CTRL,
+ val | DP83867_SW_RESTART);
+
+ if (phy_interface_is_rgmii(phydev)) {
+ ret = phy_write(phydev, MDIO_DEVAD_NONE, MII_DP83867_PHYCTRL,
+ (FIFO_DEPTH << DP83867_PHYCR_FIFO_DEPTH_SHIFT));
+ if (ret)
+ return ret;
+ }
+
+ if ((phydev->interface >= PHY_INTERFACE_MODE_RGMII_ID) &&
+ (phydev->interface <= PHY_INTERFACE_MODE_RGMII_RXID)) {
+ val = phy_read_mmd_indirect(phydev, DP83867_RGMIICTL,
+ DP83867_DEVADDR, phydev->addr);
+
+ if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)
+ val |= (DP83867_RGMII_TX_CLK_DELAY_EN |
+ DP83867_RGMII_RX_CLK_DELAY_EN);
+
+ if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID)
+ val |= DP83867_RGMII_TX_CLK_DELAY_EN;
+
+ if (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID)
+ val |= DP83867_RGMII_RX_CLK_DELAY_EN;
+
+ phy_write_mmd_indirect(phydev, DP83867_RGMIICTL,
+ DP83867_DEVADDR, phydev->addr, val);
+
+ delay = (RX_ID_DELAY |
+ (TX_ID_DELAY << DP83867_RGMII_TX_CLK_DELAY_SHIFT));
+
+ phy_write_mmd_indirect(phydev, DP83867_RGMIIDCTL,
+ DP83867_DEVADDR, phydev->addr, delay);
+ }
+
+ genphy_config_aneg(phydev);
+ return 0;
+}
+
+static struct phy_driver DP83867_driver = {
+ .name = "TI DP83867",
+ .uid = 0x2000a231,
+ .mask = 0xfffffff0,
+ .features = PHY_GBIT_FEATURES,
+ .config = &dp83867_config,
+ .startup = &genphy_startup,
+ .shutdown = &genphy_shutdown,
+};
+
+int phy_ti_init(void)
+{
+ phy_register(&DP83867_driver);
+ return 0;
+}
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 5637a0d..858093f 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -23,6 +23,7 @@
#include <asm/system.h>
#include <asm/arch/hardware.h>
#include <asm/arch/sys_proto.h>
+#include <asm-generic/errno.h>
#if !defined(CONFIG_PHYLIB)
# error XILINX_GEM_ETHERNET requires PHYLIB
@@ -46,6 +47,7 @@
/* Wrap bit, last descriptor */
#define ZYNQ_GEM_TXBUF_WRAP_MASK 0x40000000
#define ZYNQ_GEM_TXBUF_LAST_MASK 0x00008000 /* Last buffer */
+#define ZYNQ_GEM_TXBUF_USED_MASK 0x80000000 /* Used by Hw */
#define ZYNQ_GEM_NWCTRL_TXEN_MASK 0x00000008 /* Enable transmit */
#define ZYNQ_GEM_NWCTRL_RXEN_MASK 0x00000004 /* Enable receive */
@@ -56,8 +58,7 @@
#define ZYNQ_GEM_NWCFG_SPEED1000 0x000000400 /* 1Gbps operation */
#define ZYNQ_GEM_NWCFG_FDEN 0x000000002 /* Full Duplex mode */
#define ZYNQ_GEM_NWCFG_FSREM 0x000020000 /* FCS removal */
-#define ZYNQ_GEM_NWCFG_MDCCLKDIV 0x000080000 /* Div pclk by 32, 80MHz */
-#define ZYNQ_GEM_NWCFG_MDCCLKDIV2 0x0000c0000 /* Div pclk by 48, 120MHz */
+#define ZYNQ_GEM_NWCFG_MDCCLKDIV 0x0000c0000 /* Div pclk by 48, max 120MHz */
#ifdef CONFIG_ARM64
# define ZYNQ_GEM_DBUS_WIDTH (1 << 21) /* 64 bit bus */
@@ -85,6 +86,8 @@
ZYNQ_GEM_DMACR_TXSIZE | \
ZYNQ_GEM_DMACR_RXBUF)
+#define ZYNQ_GEM_TSR_DONE 0x00000020 /* Tx done mask */
+
/* Use MII register 1 (MII status register) to detect PHY */
#define PHY_DETECT_REG 1
@@ -108,28 +111,33 @@
/* Device registers */
struct zynq_gem_regs {
- u32 nwctrl; /* Network Control reg */
- u32 nwcfg; /* Network Config reg */
- u32 nwsr; /* Network Status reg */
+ u32 nwctrl; /* 0x0 - Network Control reg */
+ u32 nwcfg; /* 0x4 - Network Config reg */
+ u32 nwsr; /* 0x8 - Network Status reg */
u32 reserved1;
- u32 dmacr; /* DMA Control reg */
- u32 txsr; /* TX Status reg */
- u32 rxqbase; /* RX Q Base address reg */
- u32 txqbase; /* TX Q Base address reg */
- u32 rxsr; /* RX Status reg */
+ u32 dmacr; /* 0x10 - DMA Control reg */
+ u32 txsr; /* 0x14 - TX Status reg */
+ u32 rxqbase; /* 0x18 - RX Q Base address reg */
+ u32 txqbase; /* 0x1c - TX Q Base address reg */
+ u32 rxsr; /* 0x20 - RX Status reg */
u32 reserved2[2];
- u32 idr; /* Interrupt Disable reg */
+ u32 idr; /* 0x2c - Interrupt Disable reg */
u32 reserved3;
- u32 phymntnc; /* Phy Maintaince reg */
+ u32 phymntnc; /* 0x34 - Phy Maintaince reg */
u32 reserved4[18];
- u32 hashl; /* Hash Low address reg */
- u32 hashh; /* Hash High address reg */
+ u32 hashl; /* 0x80 - Hash Low address reg */
+ u32 hashh; /* 0x84 - Hash High address reg */
#define LADDR_LOW 0
#define LADDR_HIGH 1
- u32 laddr[4][LADDR_HIGH + 1]; /* Specific1 addr low/high reg */
- u32 match[4]; /* Type ID1 Match reg */
+ u32 laddr[4][LADDR_HIGH + 1]; /* 0x8c - Specific1 addr low/high reg */
+ u32 match[4]; /* 0xa8 - Type ID1 Match reg */
u32 reserved6[18];
- u32 stat[44]; /* Octects transmitted Low reg - stat start */
+#define STAT_SIZE 44
+ u32 stat[STAT_SIZE]; /* 0x100 - Octects transmitted Low reg */
+ u32 reserved7[164];
+ u32 transmit_q1_ptr; /* 0x440 - Transmit priority queue 1 */
+ u32 reserved8[15];
+ u32 receive_q1_ptr; /* 0x480 - Receive priority queue 1 */
};
/* BD descriptors */
@@ -144,7 +152,10 @@ struct emac_bd {
*/
#define BD_SPACE 0x100000
/* BD separation space */
-#define BD_SEPRN_SPACE 64
+#define BD_SEPRN_SPACE (RX_BUF * sizeof(struct emac_bd))
+
+/* Setup the first free TX descriptor */
+#define TX_FREE_DESC 2
/* Initialized, rxbd_current, rx_first_buf must be 0 after init */
struct zynq_gem_priv {
@@ -156,6 +167,7 @@ struct zynq_gem_priv {
int phyaddr;
u32 emio;
int init;
+ phy_interface_t interface;
struct phy_device *phydev;
struct mii_dev *bus;
};
@@ -208,12 +220,23 @@ static u32 phy_setup_op(struct eth_device *dev, u32 phy_addr, u32 regnum,
static u32 phyread(struct eth_device *dev, u32 phy_addr, u32 regnum, u16 *val)
{
- return phy_setup_op(dev, phy_addr, regnum,
+ u32 ret;
+
+ ret = phy_setup_op(dev, phy_addr, regnum,
ZYNQ_GEM_PHYMNTNC_OP_R_MASK, val);
+
+ if (!ret)
+ debug("%s: phy_addr %d, regnum 0x%x, val 0x%x\n", __func__,
+ phy_addr, regnum, *val);
+
+ return ret;
}
static u32 phywrite(struct eth_device *dev, u32 phy_addr, u32 regnum, u16 data)
{
+ debug("%s: phy_addr %d, regnum 0x%x, data 0x%x\n", __func__, phy_addr,
+ regnum, data);
+
return phy_setup_op(dev, phy_addr, regnum,
ZYNQ_GEM_PHYMNTNC_OP_W_MASK, &data);
}
@@ -289,10 +312,10 @@ static int zynq_gem_init(struct eth_device *dev, bd_t * bis)
u32 i;
unsigned long clk_rate = 0;
struct phy_device *phydev;
- const u32 stat_size = (sizeof(struct zynq_gem_regs) -
- offsetof(struct zynq_gem_regs, stat)) / 4;
struct zynq_gem_regs *regs = (struct zynq_gem_regs *)dev->iobase;
struct zynq_gem_priv *priv = dev->priv;
+ struct emac_bd *dummy_tx_bd = &priv->tx_bd[TX_FREE_DESC];
+ struct emac_bd *dummy_rx_bd = &priv->tx_bd[TX_FREE_DESC + 2];
const u32 supported = SUPPORTED_10baseT_Half |
SUPPORTED_10baseT_Full |
SUPPORTED_100baseT_Half |
@@ -318,7 +341,7 @@ static int zynq_gem_init(struct eth_device *dev, bd_t * bis)
writel(0x0, &regs->hashh);
/* Clear all counters */
- for (i = 0; i <= stat_size; i++)
+ for (i = 0; i < STAT_SIZE; i++)
readl(&regs->stat[i]);
/* Setup RxBD space */
@@ -341,6 +364,23 @@ static int zynq_gem_init(struct eth_device *dev, bd_t * bis)
/* Setup for Network Control register, MDIO, Rx and Tx enable */
setbits_le32(&regs->nwctrl, ZYNQ_GEM_NWCTRL_MDEN_MASK);
+ /* Disable the second priority queue */
+ dummy_tx_bd->addr = 0;
+ dummy_tx_bd->status = ZYNQ_GEM_TXBUF_WRAP_MASK |
+ ZYNQ_GEM_TXBUF_LAST_MASK|
+ ZYNQ_GEM_TXBUF_USED_MASK;
+
+ dummy_rx_bd->addr = ZYNQ_GEM_RXBUF_WRAP_MASK |
+ ZYNQ_GEM_RXBUF_NEW_MASK;
+ dummy_rx_bd->status = 0;
+ flush_dcache_range((ulong)&dummy_tx_bd, (ulong)&dummy_tx_bd +
+ sizeof(dummy_tx_bd));
+ flush_dcache_range((ulong)&dummy_rx_bd, (ulong)&dummy_rx_bd +
+ sizeof(dummy_rx_bd));
+
+ writel((ulong)dummy_tx_bd, &regs->transmit_q1_ptr);
+ writel((ulong)dummy_rx_bd, &regs->receive_q1_ptr);
+
priv->init++;
}
@@ -348,7 +388,7 @@ static int zynq_gem_init(struct eth_device *dev, bd_t * bis)
/* interface - look at tsec */
phydev = phy_connect(priv->bus, priv->phyaddr, dev,
- PHY_INTERFACE_MODE_MII);
+ priv->interface);
phydev->supported = supported | ADVERTISED_Pause |
ADVERTISED_Asym_Pause;
@@ -369,8 +409,8 @@ static int zynq_gem_init(struct eth_device *dev, bd_t * bis)
clk_rate = ZYNQ_GEM_FREQUENCY_1000;
break;
case SPEED_100:
- clrsetbits_le32(&regs->nwcfg, ZYNQ_GEM_NWCFG_SPEED1000,
- ZYNQ_GEM_NWCFG_INIT | ZYNQ_GEM_NWCFG_SPEED100);
+ writel(ZYNQ_GEM_NWCFG_INIT | ZYNQ_GEM_NWCFG_SPEED100,
+ &regs->nwcfg);
clk_rate = ZYNQ_GEM_FREQUENCY_100;
break;
case SPEED_10:
@@ -389,22 +429,54 @@ static int zynq_gem_init(struct eth_device *dev, bd_t * bis)
return 0;
}
+static int wait_for_bit(const char *func, u32 *reg, const u32 mask,
+ bool set, unsigned int timeout)
+{
+ u32 val;
+ unsigned long start = get_timer(0);
+
+ while (1) {
+ val = readl(reg);
+
+ if (!set)
+ val = ~val;
+
+ if ((val & mask) == mask)
+ return 0;
+
+ if (get_timer(start) > timeout)
+ break;
+
+ udelay(1);
+ }
+
+ debug("%s: Timeout (reg=%p mask=%08x wait_set=%i)\n",
+ func, reg, mask, set);
+
+ return -ETIMEDOUT;
+}
+
static int zynq_gem_send(struct eth_device *dev, void *ptr, int len)
{
u32 addr, size;
struct zynq_gem_priv *priv = dev->priv;
struct zynq_gem_regs *regs = (struct zynq_gem_regs *)dev->iobase;
-
- /* setup BD */
- writel((ulong)priv->tx_bd, &regs->txqbase);
+ struct emac_bd *current_bd = &priv->tx_bd[1];
/* Setup Tx BD */
memset(priv->tx_bd, 0, sizeof(struct emac_bd));
priv->tx_bd->addr = (ulong)ptr;
priv->tx_bd->status = (len & ZYNQ_GEM_TXBUF_FRMLEN_MASK) |
- ZYNQ_GEM_TXBUF_LAST_MASK |
- ZYNQ_GEM_TXBUF_WRAP_MASK;
+ ZYNQ_GEM_TXBUF_LAST_MASK;
+ /* Dummy descriptor to mark it as the last in descriptor chain */
+ current_bd->addr = 0x0;
+ current_bd->status = ZYNQ_GEM_TXBUF_WRAP_MASK |
+ ZYNQ_GEM_TXBUF_LAST_MASK|
+ ZYNQ_GEM_TXBUF_USED_MASK;
+
+ /* setup BD */
+ writel((ulong)priv->tx_bd, &regs->txqbase);
addr = (ulong) ptr;
addr &= ~(ARCH_DMA_MINALIGN - 1);
@@ -421,12 +493,11 @@ static int zynq_gem_send(struct eth_device *dev, void *ptr, int len)
setbits_le32(&regs->nwctrl, ZYNQ_GEM_NWCTRL_STARTTX_MASK);
/* Read TX BD status */
- if (priv->tx_bd->status & ZYNQ_GEM_TXBUF_UNDERRUN)
- printf("TX underrun\n");
if (priv->tx_bd->status & ZYNQ_GEM_TXBUF_EXHAUSTED)
printf("TX buffers exhausted in mid frame\n");
- return 0;
+ return wait_for_bit(__func__, &regs->txsr, ZYNQ_GEM_TSR_DONE,
+ true, 20000);
}
/* Do not check frame_recd flag in rx_status register 0x20 - just poll BD */
@@ -535,6 +606,12 @@ int zynq_gem_initialize(bd_t *bis, phys_addr_t base_addr,
priv->phyaddr = phy_addr;
priv->emio = emio;
+#ifndef CONFIG_ZYNQ_GEM_INTERFACE
+ priv->interface = PHY_INTERFACE_MODE_MII;
+#else
+ priv->interface = CONFIG_ZYNQ_GEM_INTERFACE;
+#endif
+
sprintf(dev->name, "Gem.%lx", base_addr);
dev->iobase = base_addr;
diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c
index c77bea3..cb11b31 100644
--- a/drivers/serial/altera_jtag_uart.c
+++ b/drivers/serial/altera_jtag_uart.c
@@ -97,8 +97,9 @@ static int altera_jtaguart_ofdata_to_platdata(struct udevice *dev)
{
struct altera_jtaguart_platdata *plat = dev_get_platdata(dev);
- plat->regs = ioremap(dev_get_addr(dev),
- sizeof(struct altera_jtaguart_regs));
+ plat->regs = map_physmem(dev_get_addr(dev),
+ sizeof(struct altera_jtaguart_regs),
+ MAP_NOCACHE);
return 0;
}
diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c
index 5d76c33..eff9c59 100644
--- a/drivers/serial/altera_uart.c
+++ b/drivers/serial/altera_uart.c
@@ -89,8 +89,9 @@ static int altera_uart_ofdata_to_platdata(struct udevice *dev)
{
struct altera_uart_platdata *plat = dev_get_platdata(dev);
- plat->regs = ioremap(dev_get_addr(dev),
- sizeof(struct altera_uart_regs));
+ plat->regs = map_physmem(dev_get_addr(dev),
+ sizeof(struct altera_uart_regs),
+ MAP_NOCACHE);
plat->uartclk = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
"clock-frequency", 0);
diff --git a/drivers/spi/altera_spi.c b/drivers/spi/altera_spi.c
index 3e09592..eb1ba27 100644
--- a/drivers/spi/altera_spi.c
+++ b/drivers/spi/altera_spi.c
@@ -174,8 +174,9 @@ static int altera_spi_ofdata_to_platdata(struct udevice *bus)
{
struct altera_spi_platdata *plat = dev_get_platdata(bus);
- plat->regs = ioremap(dev_get_addr(bus),
- sizeof(struct altera_spi_regs));
+ plat->regs = map_physmem(dev_get_addr(bus),
+ sizeof(struct altera_spi_regs),
+ MAP_NOCACHE);
return 0;
}
diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
index 58388ef..3c7d64a 100644
--- a/drivers/spi/spi-uclass.c
+++ b/drivers/spi/spi-uclass.c
@@ -118,6 +118,26 @@ static int spi_post_probe(struct udevice *bus)
spi->max_hz = fdtdec_get_int(gd->fdt_blob, bus->of_offset,
"spi-max-frequency", 0);
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
+ struct dm_spi_ops *ops = spi_get_ops(bus);
+
+
+ if (ops->claim_bus)
+ ops->claim_bus += gd->reloc_off;
+ if (ops->release_bus)
+ ops->release_bus += gd->reloc_off;
+ if (ops->set_wordlen)
+ ops->set_wordlen += gd->reloc_off;
+ if (ops->xfer)
+ ops->xfer += gd->reloc_off;
+ if (ops->set_speed)
+ ops->set_speed += gd->reloc_off;
+ if (ops->set_mode)
+ ops->set_mode += gd->reloc_off;
+ if (ops->cs_info)
+ ops->cs_info += gd->reloc_off;
+#endif
+
return 0;
}
diff --git a/drivers/timer/altera_timer.c b/drivers/timer/altera_timer.c
index 46a598a..971ed38 100644
--- a/drivers/timer/altera_timer.c
+++ b/drivers/timer/altera_timer.c
@@ -75,8 +75,9 @@ static int altera_timer_ofdata_to_platdata(struct udevice *dev)
{
struct altera_timer_platdata *plat = dev_get_platdata(dev);
- plat->regs = ioremap(dev_get_addr(dev),
- sizeof(struct altera_timer_regs));
+ plat->regs = map_physmem(dev_get_addr(dev),
+ sizeof(struct altera_timer_regs),
+ MAP_NOCACHE);
plat->clock_rate = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
"clock-frequency", 0);
diff --git a/include/configs/10m50_devboard.h b/include/configs/10m50_devboard.h
index ab7dd08..48d5063 100644
--- a/include/configs/10m50_devboard.h
+++ b/include/configs/10m50_devboard.h
@@ -98,6 +98,5 @@
CONFIG_SYS_MALLOC_LEN - \
0x10000)
#define CONFIG_CMDLINE_EDITING
-#define CONFIG_CMD_GPIO
#endif /* __CONFIG_H */
diff --git a/include/configs/3c120_devboard.h b/include/configs/3c120_devboard.h
index 856c836..2ecdd5d 100644
--- a/include/configs/3c120_devboard.h
+++ b/include/configs/3c120_devboard.h
@@ -102,6 +102,5 @@
CONFIG_SYS_MALLOC_LEN - \
0x10000)
#define CONFIG_CMDLINE_EDITING
-#define CONFIG_CMD_GPIO
#endif /* __CONFIG_H */
diff --git a/include/configs/MPC8313ERDB.h b/include/configs/MPC8313ERDB.h
index 7db67c2..44c3175 100644
--- a/include/configs/MPC8313ERDB.h
+++ b/include/configs/MPC8313ERDB.h
@@ -365,7 +365,6 @@
#define CONFIG_OF_STDOUT_VIA_ALIAS 1
#define CONFIG_MPC83XX_GPIO 1
-#define CONFIG_CMD_GPIO 1
/*
* Serial Port
diff --git a/include/configs/UCP1020.h b/include/configs/UCP1020.h
index 8611473..ad2f115 100644
--- a/include/configs/UCP1020.h
+++ b/include/configs/UCP1020.h
@@ -538,7 +538,6 @@
#endif
/* Misc Extra Settings */
-#define CONFIG_CMD_GPIO 1
#undef CONFIG_WATCHDOG /* watchdog disabled */
/*
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index d58816d..ed3fd34 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -186,7 +186,12 @@
"if test $board_name = A335BONE; then " \
"setenv fdtfile am335x-bone.dtb; fi; " \
"if test $board_name = A335BNLT; then " \
- "setenv fdtfile am335x-boneblack.dtb; fi; " \
+ "if test $board_rev = BBG1; then " \
+ "setenv fdtfile am335x-bonegreen.dtb; " \
+ "else " \
+ "setenv fdtfile am335x-boneblack.dtb; " \
+ "fi; " \
+ "fi; " \
"if test $board_name = A33515BB; then " \
"setenv fdtfile am335x-evm.dtb; fi; " \
"if test $board_name = A335X_SK; then " \
diff --git a/include/configs/beagle_x15.h b/include/configs/am57xx_evm.h
index d38b7b5..6308cab 100644
--- a/include/configs/beagle_x15.h
+++ b/include/configs/am57xx_evm.h
@@ -9,8 +9,8 @@
* SPDX-License-Identifier: GPL-2.0+
*/
-#ifndef __CONFIG_BEAGLE_X15_H
-#define __CONFIG_BEAGLE_X15_H
+#ifndef __CONFIG_AM57XX_EVM_H
+#define __CONFIG_AM57XX_EVM_H
#define CONFIG_AM57XX
@@ -88,4 +88,4 @@
#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
CONFIG_SYS_SCSI_MAX_LUN)
-#endif /* __CONFIG_BEAGLE_X5_H */
+#endif /* __CONFIG_AM57XX_EVM_H */
diff --git a/include/configs/axs101.h b/include/configs/axs101.h
index 450291c..9a7e0dc 100644
--- a/include/configs/axs101.h
+++ b/include/configs/axs101.h
@@ -39,6 +39,8 @@
#define CONFIG_BOARD_TYPES
#define CONFIG_BOARD_EARLY_INIT_F
+#define CONFIG_OF_LIBFDT
+
/*
* NAND Flash configuration
*/
@@ -48,28 +50,14 @@
/*
* UART configuration
- *
- * CONFIG_CONS_INDEX = 1 - Debug UART
- * CONFIG_CONS_INDEX = 4 - FPGA UART connected to FTDI/USB
*/
-#define CONFIG_CONS_INDEX 4
+#define CONFIG_DW_SERIAL
#define CONFIG_SYS_NS16550
#define CONFIG_SYS_NS16550_SERIAL
-#define CONFIG_SYS_NS16550_REG_SIZE -4
-#if (CONFIG_CONS_INDEX == 1)
- /* Debug UART */
-# define CONFIG_SYS_NS16550_CLK 33333000
-#else
- /* FPGA UARTs use different clock */
-# define CONFIG_SYS_NS16550_CLK 33333333
-#endif
-#define CONFIG_SYS_NS16550_COM1 (ARC_APB_PERIPHERAL_BASE + 0x5000)
-#define CONFIG_SYS_NS16550_COM2 (ARC_FPGA_PERIPHERAL_BASE + 0x20000)
-#define CONFIG_SYS_NS16550_COM3 (ARC_FPGA_PERIPHERAL_BASE + 0x21000)
-#define CONFIG_SYS_NS16550_COM4 (ARC_FPGA_PERIPHERAL_BASE + 0x22000)
+#define CONFIG_SYS_NS16550_CLK 33333333
#define CONFIG_SYS_NS16550_MEM32
-
#define CONFIG_BAUDRATE 115200
+
/*
* I2C configuration
*/
@@ -119,18 +107,11 @@
#define CONFIG_DW_AUTONEG
/*
- * Command line configuration
+ * Commands still not supported in Kconfig
*/
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_EEPROM
#define CONFIG_CMD_FAT
-#define CONFIG_CMD_I2C
#define CONFIG_CMD_MMC
#define CONFIG_CMD_NAND
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_RARP
-
-#define CONFIG_OF_LIBFDT
#define CONFIG_AUTO_COMPLETE
#define CONFIG_SYS_MAXARGS 16
diff --git a/include/configs/bcm28155_ap.h b/include/configs/bcm28155_ap.h
index 6ea6fb0..7247907 100644
--- a/include/configs/bcm28155_ap.h
+++ b/include/configs/bcm28155_ap.h
@@ -126,7 +126,6 @@
#define CONFIG_CMD_ASKENV
#define CONFIG_CMD_CACHE
#define CONFIG_CMD_FAT
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_I2C
#define CONFIG_CMD_MMC
#define CONFIG_CMD_BOOTZ
diff --git a/include/configs/bfin_adi_common.h b/include/configs/bfin_adi_common.h
index a075050..91a84fe 100644
--- a/include/configs/bfin_adi_common.h
+++ b/include/configs/bfin_adi_common.h
@@ -80,7 +80,6 @@
# define CONFIG_CMD_BOOTLDR
# define CONFIG_CMD_CACHE
# define CONFIG_CMD_CPLBINFO
-# define CONFIG_CMD_GPIO
# define CONFIG_CMD_KGDB
# define CONFIG_CMD_LDRINFO
# define CONFIG_CMD_REGINFO
diff --git a/include/configs/bg0900.h b/include/configs/bg0900.h
index c45c8c2..9abbc39 100644
--- a/include/configs/bg0900.h
+++ b/include/configs/bg0900.h
@@ -17,7 +17,6 @@
#define CONFIG_CMD_BOOTZ
#define CONFIG_CMD_CACHE
#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_MII
#define CONFIG_CMD_NAND
#define CONFIG_CMD_NAND_TRIMFFS
diff --git a/include/configs/bur_am335x_common.h b/include/configs/bur_am335x_common.h
index 1d96a2d..c9eb63e 100644
--- a/include/configs/bur_am335x_common.h
+++ b/include/configs/bur_am335x_common.h
@@ -113,7 +113,6 @@
#define CONFIG_CMD_I2C
/* GPIO */
#define CONFIG_OMAP_GPIO
-#define CONFIG_CMD_GPIO
/*
* ----------------------------------------------------------------------------
* The following are general good-enough settings for U-Boot. We set a
diff --git a/include/configs/calimain.h b/include/configs/calimain.h
index a5b2f9e..7f942dc 100644
--- a/include/configs/calimain.h
+++ b/include/configs/calimain.h
@@ -316,7 +316,6 @@
#define CONFIG_CMD_MII
#define CONFIG_CMD_PING
#define CONFIG_CMD_SAVES
-#define CONFIG_CMD_GPIO
#ifndef CONFIG_DRIVER_TI_EMAC
#undef CONFIG_CMD_DHCP
diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
index 0513204..180ea28 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -230,7 +230,6 @@
/* SPL */
#include "imx6_spl.h"
-#define CONFIG_SPL_BOARD_INIT
#define CONFIG_SPL_MMC_SUPPORT
#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x80 /* offset 64 kb */
#define CONFIG_SYS_MONITOR_LEN (CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS / 2 * 1024)
diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
index e951b2d..5f2f020 100644
--- a/include/configs/cm_t35.h
+++ b/include/configs/cm_t35.h
@@ -22,7 +22,6 @@
*/
#define CONFIG_OMAP /* in a TI OMAP core */
#define CONFIG_OMAP_GPIO
-#define CONFIG_CMD_GPIO
#define CONFIG_CM_T3X /* working with CM-T35 and CM-T3730 */
#define CONFIG_OMAP_COMMON
/* Common ARM Erratas */
diff --git a/include/configs/cm_t3517.h b/include/configs/cm_t3517.h
index 8a10e9c..1c086fc 100644
--- a/include/configs/cm_t3517.h
+++ b/include/configs/cm_t3517.h
@@ -137,7 +137,6 @@
#define CONFIG_CMD_NAND /* NAND support */
#define CONFIG_CMD_DHCP
#define CONFIG_CMD_PING
-#define CONFIG_CMD_GPIO
#define CONFIG_SYS_NO_FLASH
diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
index 7658e61..9135d6c 100644
--- a/include/configs/colibri_vf.h
+++ b/include/configs/colibri_vf.h
@@ -55,7 +55,6 @@
/* GPIO support */
#define CONFIG_DM_GPIO
-#define CONFIG_CMD_GPIO
#define CONFIG_VYBRID_GPIO
/* Dynamic MTD partition support */
diff --git a/include/configs/devkit3250.h b/include/configs/devkit3250.h
index d3b7620..d89e661 100644
--- a/include/configs/devkit3250.h
+++ b/include/configs/devkit3250.h
@@ -60,7 +60,6 @@
* GPIO
*/
#define CONFIG_LPC32XX_GPIO
-#define CONFIG_CMD_GPIO
/*
* SSP/SPI
diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
index 6d2c22e..b8975fa 100644
--- a/include/configs/devkit8000.h
+++ b/include/configs/devkit8000.h
@@ -101,7 +101,6 @@
#define CONFIG_CMD_NAND_LOCK_UNLOCK /* nand (un)lock commands */
#undef CONFIG_CMD_SPI
-#undef CONFIG_CMD_GPIO
#undef CONFIG_CMD_ASKENV
#undef CONFIG_CMD_BOOTZ
#undef CONFIG_SUPPORT_RAW_INITRD
diff --git a/include/configs/dnp5370.h b/include/configs/dnp5370.h
index e809f20..3b2da0d 100644
--- a/include/configs/dnp5370.h
+++ b/include/configs/dnp5370.h
@@ -94,7 +94,6 @@
/*
* Misc Settings
*/
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_STRINGS
#define CONFIG_MISC_INIT_R
#define CONFIG_RTC_BFIN
diff --git a/include/configs/dreamplug.h b/include/configs/dreamplug.h
index 2815ad8..3f35616 100644
--- a/include/configs/dreamplug.h
+++ b/include/configs/dreamplug.h
@@ -34,31 +34,19 @@
* High Level Configuration Options (easy to change)
*/
#define CONFIG_SHEEVA_88SV131 1 /* CPU Core subversion */
-#define CONFIG_KW88F6281 1 /* SOC Name */
#define CONFIG_MACH_TYPE MACH_TYPE_DREAMPLUG
-#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
-
-/* Add target to build it automatically upon "make" */
-#define CONFIG_BUILD_TARGET "u-boot.kwb"
/*
* Commands configuration
*/
-#define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_ENV
+#define CONFIG_CMD_EXT2
#define CONFIG_CMD_FAT
-#define CONFIG_CMD_SF
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_USB
-#define CONFIG_CMD_IDE
-#define CONFIG_CMD_DATE
/*
- * mv-common.h should be defined after CMD configs since it used them
+ * mv-plug-common.h should be defined after CMD configs since it used them
* to enable certain macros
*/
-#include "mv-common.h"
+#include "mv-plug-common.h"
/*
* Environment variables configurations
@@ -118,20 +106,4 @@
#define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
#endif /*CONFIG_MVSATA_IDE*/
-/*
- * RTC driver configuration
- */
-#ifdef CONFIG_CMD_DATE
-#define CONFIG_RTC_MV
-#endif /* CONFIG_CMD_DATE */
-
-#define CONFIG_SYS_ALT_MEMTEST
-
-/*
- * display enhanced info about the cpu at boot.
- */
-#define CONFIG_DISPLAY_CPUINFO
-
-#define CONFIG_OF_LIBFDT
-
#endif /* _CONFIG_DREAMPLUG_H */
diff --git a/include/configs/duovero.h b/include/configs/duovero.h
index 28d12ad..bb3ba55 100644
--- a/include/configs/duovero.h
+++ b/include/configs/duovero.h
@@ -48,7 +48,6 @@
#define CONFIG_SMC911X_BASE 0x2C000000
/* GPIO */
-#define CONFIG_CMD_GPIO
/* ENV related config options */
#define CONFIG_ENV_IS_NOWHERE
diff --git a/include/configs/ea20.h b/include/configs/ea20.h
index b230d9c..53ad302 100644
--- a/include/configs/ea20.h
+++ b/include/configs/ea20.h
@@ -155,7 +155,6 @@
#define CONFIG_CMD_PING
#define CONFIG_CMD_SAVES
#define CONFIG_CMD_I2C
-#define CONFIG_CMD_GPIO
#ifdef CONFIG_CMD_BDI
#define CONFIG_CLOCKS
diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h
index 4866836..5d2b4f3 100644
--- a/include/configs/exynos5-common.h
+++ b/include/configs/exynos5-common.h
@@ -162,7 +162,6 @@
/* Enable Time Command */
#define CONFIG_CMD_TIME
-#define CONFIG_CMD_GPIO
/* USB */
#define CONFIG_CMD_USB
diff --git a/include/configs/guruplug.h b/include/configs/guruplug.h
index 675ec52..712bfd7 100644
--- a/include/configs/guruplug.h
+++ b/include/configs/guruplug.h
@@ -20,46 +20,18 @@
* High Level Configuration Options (easy to change)
*/
#define CONFIG_SHEEVA_88SV131 1 /* CPU Core subversion */
-#define CONFIG_KW88F6281 1 /* SOC Name */
#define CONFIG_MACH_GURUPLUG /* Machine type */
-#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
/*
- * Compression configuration
+ * Standard filesystems
*/
-#define CONFIG_BZIP2
-#define CONFIG_LZMA
-#define CONFIG_LZO
+#define CONFIG_SYS_MVFS
/*
- * Enable device tree support
- */
-#define CONFIG_OF_LIBFDT
-
-/*
- * Miscellaneous configurable options
- */
-#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
-
-/*
- * Commands configuration
- */
-#define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
-#define CONFIG_CMD_BOOTZ
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_ENV
-#define CONFIG_CMD_IDE
-#define CONFIG_CMD_MII
-#define CONFIG_CMD_NAND
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_USB
-#define CONFIG_CMD_FAT
-
-/*
- * mv-common.h should be defined after CMD configs since it used them
+ * mv-plug-common.h should be defined after CMD configs since it used them
* to enable certain macros
*/
-#include "mv-common.h"
+#include "mv-plug-common.h"
/*
* Environment variables configurations
@@ -123,20 +95,4 @@
#define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
#endif /*CONFIG_MVSATA_IDE*/
-/*
- * File system
- */
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_EXT4
-#define CONFIG_CMD_FAT
-#define CONFIG_CMD_JFFS2
-#define CONFIG_CMD_UBI
-#define CONFIG_CMD_UBIFS
-#define CONFIG_RBTREE
-#define CONFIG_MTD_DEVICE
-#define CONFIG_MTD_PARTITIONS
-#define CONFIG_CMD_MTDPARTS
-
-#define CONFIG_SYS_ALT_MEMTEST
-
#endif /* _CONFIG_GURUPLUG_H */
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
index 484d763..48010eb 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -54,7 +54,6 @@
/* GPIO */
#define CONFIG_MXC_GPIO
-#define CONFIG_CMD_GPIO
/* Thermal */
#define CONFIG_IMX_THERMAL
diff --git a/include/configs/hikey.h b/include/configs/hikey.h
index 1a4381b..796861e 100644
--- a/include/configs/hikey.h
+++ b/include/configs/hikey.h
@@ -79,7 +79,6 @@
#endif
#define CONFIG_HIKEY_GPIO
-#define CONFIG_CMD_GPIO
/* SD/MMC configuration */
#define CONFIG_GENERIC_MMC
diff --git a/include/configs/ib62x0.h b/include/configs/ib62x0.h
index 594fceb..57b1a43 100644
--- a/include/configs/ib62x0.h
+++ b/include/configs/ib62x0.h
@@ -9,7 +9,6 @@
#ifndef _CONFIG_IB62x0_H
#define _CONFIG_IB62x0_H
-
/*
* Version number information
*/
@@ -22,35 +21,23 @@
#define CONFIG_KW88F6281 /* SOC Name */
#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
-/*
- * Machine type
- */
-#define CONFIG_MACH_TYPE MACH_TYPE_NAS6210
-
-/*
- * Enable device tree support
- */
-#define CONFIG_OF_LIBFDT
+/* Add target to build it automatically upon "make" */
+#define CONFIG_BUILD_TARGET "u-boot.kwb"
/*
* Compression configuration
*/
#define CONFIG_BZIP2
#define CONFIG_LZMA
-#define CONFIG_LZO
/*
* Commands configuration
*/
#define CONFIG_SYS_NO_FLASH /* declare no flash (NOR/SPI) */
#define CONFIG_SYS_MVFS
-#define CONFIG_CMD_ENV
#define CONFIG_CMD_BOOTZ
#define CONFIG_CMD_IDE
#define CONFIG_CMD_MII
-#define CONFIG_CMD_NAND
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_USB
/*
* mv-common.h should be defined after CMD configs since it used them
@@ -126,17 +113,4 @@
#define CONFIG_RTC_MV
#endif /* CONFIG_CMD_DATE */
-/*
- * File system
- */
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_FAT
-#define CONFIG_CMD_JFFS2
-#define CONFIG_CMD_UBI
-#define CONFIG_CMD_UBIFS
-#define CONFIG_RBTREE
-#define CONFIG_MTD_DEVICE
-#define CONFIG_MTD_PARTITIONS
-#define CONFIG_CMD_MTDPARTS
-
#endif /* _CONFIG_IB62x0_H */
diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h
index f3248bc..91b29b3 100644
--- a/include/configs/km/keymile-common.h
+++ b/include/configs/km/keymile-common.h
@@ -56,6 +56,10 @@
#define CONFIG_LOADS_ECHO
#define CONFIG_SYS_LOADS_BAUD_CHANGE
+#define CONFIG_AUTOBOOT_KEYED
+#define CONFIG_AUTOBOOT_PROMPT "Hit <SPACE> key to stop autoboot in %2ds\n"
+#define CONFIG_AUTOBOOT_STOP_STR " "
+
/* Support the IVM EEprom */
#define CONFIG_SYS_IVM_EEPROM_ADR 0x50
#define CONFIG_SYS_IVM_EEPROM_MAX_LEN 0x400
@@ -137,8 +141,9 @@
* - 'release': for a standalone system kernel/rootfs from flash
*/
#define CONFIG_KM_DEF_ENV_BOOTTARGETS \
- "subbootcmds=ubiattach ubicopy cramfsloadfdt set_fdthigh " \
- "cramfsloadkernel flashargs add_default addpanic boot\0"\
+ "subbootcmds=ubiattach ubicopy checkfdt cramfsloadfdt " \
+ "set_fdthigh cramfsloadkernel flashargs add_default " \
+ "addpanic boot\0" \
"develop=" \
"tftp 200000 scripts/develop-${arch}.txt && " \
"env import -t 200000 ${filesize} && " \
diff --git a/include/configs/km/km-powerpc.h b/include/configs/km/km-powerpc.h
index eb85a74..3f045f2 100644
--- a/include/configs/km/km-powerpc.h
+++ b/include/configs/km/km-powerpc.h
@@ -17,6 +17,10 @@
#define CONFIG_CMD_DTT
#define CONFIG_JFFS2_CMDLINE
+/* Pass open firmware flat tree */
+#define CONFIG_OF_LIBFDT
+#define CONFIG_OF_BOARD_SETUP
+
/* standard km ethernet_present for piggy */
#define CONFIG_KM_COMMON_ETH_INIT
@@ -63,9 +67,9 @@
* is not valid yet, which is the case for when u-boot copies itself to RAM */
#define CONFIG_PRAM ((CONFIG_KM_PNVRAM + CONFIG_KM_PHRAM)>>10)
-#define CONFIG_KM_CRAMFS_ADDR 0x800000
-#define CONFIG_KM_KERNEL_ADDR 0x400000 /* 3968Kbytes */
-#define CONFIG_KM_FDT_ADDR 0x7E0000 /* 128Kbytes */
+#define CONFIG_KM_CRAMFS_ADDR 0xC00000
+#define CONFIG_KM_KERNEL_ADDR 0x400000 /* 7680Kbytes */
+#define CONFIG_KM_FDT_ADDR 0xB80000 /* 512Kbytes */
/* architecture specific default bootargs */
#define CONFIG_KM_DEF_BOOT_ARGS_CPU ""
@@ -79,6 +83,7 @@
" ${filesize} && " \
"protect on " __stringify(BOOTFLASH_START) " +${filesize}\0"\
"set_fdthigh=true\0" \
+ "checkfdt=true\0" \
""
#endif /* __CONFIG_KEYMILE_POWERPC_H */
diff --git a/include/configs/km/km8309-common.h b/include/configs/km/km8309-common.h
index 5cbb348..d21b500 100644
--- a/include/configs/km/km8309-common.h
+++ b/include/configs/km/km8309-common.h
@@ -28,8 +28,10 @@
/* QE microcode/firmware address */
#define CONFIG_SYS_QE_FMAN_FW_IN_NOR
-/* at end of uboot partition, before env */
-#define CONFIG_SYS_QE_FW_ADDR 0xF00B0000
+/* between the u-boot partition and env */
+#ifndef CONFIG_SYS_QE_FW_ADDR
+#define CONFIG_SYS_QE_FW_ADDR 0xF00C0000
+#endif
/*
* System IO Config
@@ -98,6 +100,12 @@
HRCWH_BIG_ENDIAN | \
HRCWH_LALE_NORMAL)
+#define CONFIG_SYS_DDRCDR (\
+ DDRCDR_EN | \
+ DDRCDR_PZ_MAXZ | \
+ DDRCDR_NZ_MAXZ | \
+ DDRCDR_M_ODR)
+
#define CONFIG_SYS_DDR_CS0_BNDS 0x0000007f
#define CONFIG_SYS_DDR_SDRAM_CFG (SDRAM_CFG_SDRAM_TYPE_DDR2 | \
SDRAM_CFG_32_BE | \
diff --git a/include/configs/km/km8321-common.h b/include/configs/km/km8321-common.h
index cd56380..ef83263 100644
--- a/include/configs/km/km8321-common.h
+++ b/include/configs/km/km8321-common.h
@@ -64,6 +64,12 @@
HRCWH_BIG_ENDIAN | \
HRCWH_LALE_NORMAL)
+#define CONFIG_SYS_DDRCDR (\
+ DDRCDR_EN | \
+ DDRCDR_PZ_MAXZ | \
+ DDRCDR_NZ_MAXZ | \
+ DDRCDR_M_ODR)
+
#define CONFIG_SYS_DDR_CS0_BNDS 0x0000007f
#define CONFIG_SYS_DDR_SDRAM_CFG (SDRAM_CFG_SDRAM_TYPE_DDR2 | \
SDRAM_CFG_32_BE | \
diff --git a/include/configs/km/km83xx-common.h b/include/configs/km/km83xx-common.h
index cebe210..30cf60c 100644
--- a/include/configs/km/km83xx-common.h
+++ b/include/configs/km/km83xx-common.h
@@ -152,9 +152,6 @@
#define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500)
#define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600)
-/* Pass open firmware flat tree */
-#define CONFIG_OF_LIBFDT
-#define CONFIG_OF_BOARD_SETUP
#define CONFIG_OF_STDOUT_VIA_ALIAS
/*
@@ -184,10 +181,14 @@
#ifndef CONFIG_SYS_RAMBOOT
#define CONFIG_ENV_IS_IN_FLASH
+#ifndef CONFIG_ENV_ADDR
#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + \
CONFIG_SYS_MONITOR_LEN)
+#endif
#define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */
+#ifndef CONFIG_ENV_OFFSET
#define CONFIG_ENV_OFFSET (CONFIG_SYS_MONITOR_LEN)
+#endif
/* Address and size of Redundant Environment Sector */
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \
@@ -322,8 +323,8 @@
CONFIG_KM_DEF_ENV \
CONFIG_KM_DEF_ARCH \
"newenv=" \
- "prot off 0xF00C0000 +0x40000 && " \
- "era 0xF00C0000 +0x40000\0" \
+ "prot off "__stringify(CONFIG_ENV_ADDR)" +0x40000 && " \
+ "era "__stringify(CONFIG_ENV_ADDR)" +0x40000\0" \
"unlock=yes\0" \
""
diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h
index b89af53..54aa6fb 100644
--- a/include/configs/km/km_arm.h
+++ b/include/configs/km/km_arm.h
@@ -82,6 +82,12 @@
"u-boot="__stringify(CONFIG_HOSTNAME) "/u-boot.kwb\0" \
CONFIG_KM_UPDATE_UBOOT \
"set_fdthigh=setenv fdt_high ${kernelmem}\0" \
+ "checkfdt=" \
+ "if cramfsls fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb; " \
+ "then true; else setenv cramfsloadfdt true; " \
+ "setenv boot bootm ${load_addr_r}; " \
+ "echo No FDT found, booting with the kernel " \
+ "appended one; fi\0" \
""
#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
@@ -241,7 +247,7 @@ int get_scl(void);
#define CONFIG_SYS_EEPROM_WREN
#define CONFIG_ENV_OFFSET 0x0 /* no bracets! */
#define CONFIG_ENV_SIZE (0x2000 - CONFIG_ENV_OFFSET)
-#define CONFIG_I2C_ENV_EEPROM_BUS KM_ENV_BUS
+#define CONFIG_I2C_ENV_EEPROM_BUS 5 /* I2C2 (Mux-Port 5) */
#define CONFIG_ENV_OFFSET_REDUND 0x2000 /* no bracets! */
#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
#endif
diff --git a/include/configs/km/kmp204x-common.h b/include/configs/km/kmp204x-common.h
index 8a3c74e..e163edb 100644
--- a/include/configs/km/kmp204x-common.h
+++ b/include/configs/km/kmp204x-common.h
@@ -457,6 +457,7 @@ int get_scl(void);
"sf probe 0;sf erase 0 +${filesize};" \
"sf write ${load_addr_r} 0 ${filesize};\0" \
"set_fdthigh=true\0" \
+ "checkfdt=true\0" \
""
#define CONFIG_HW_ENV_SETTINGS \
diff --git a/include/configs/km82xx.h b/include/configs/km82xx.h
index 19e89ce..4cfc1dc 100644
--- a/include/configs/km82xx.h
+++ b/include/configs/km82xx.h
@@ -430,10 +430,7 @@ int get_scl(void);
#define CONFIG_SYS_RESET_ADDRESS 0xFDFFFFFC /* "bad" address */
-/* pass open firmware flat tree */
#define CONFIG_FIT 1
-#define CONFIG_OF_LIBFDT 1
-#define CONFIG_OF_BOARD_SETUP 1
#define OF_TBCLK (bd->bi_busfreq / 4)
#define OF_STDOUT_PATH "/soc/cpm/serial@11a90"
diff --git a/include/configs/km8360.h b/include/configs/km8360.h
index c517e78..49b9200 100644
--- a/include/configs/km8360.h
+++ b/include/configs/km8360.h
@@ -99,7 +99,7 @@
#define CONFIG_SYS_DDR_CS0_CONFIG (\
CSCONFIG_EN | \
CSCONFIG_AP | \
- CSCONFIG_ODT_RD_ONLY_CURRENT | \
+ CSCONFIG_ODT_WR_ONLY_CURRENT | \
CSCONFIG_BANK_BIT_3 | \
CSCONFIG_ROW_BIT_13 | \
CSCONFIG_COL_BIT_10)
@@ -107,7 +107,7 @@
#define CONFIG_SYS_DDR_CS0_CONFIG (CSCONFIG_EN | CSCONFIG_AP | \
CSCONFIG_ROW_BIT_13 | \
CSCONFIG_COL_BIT_10 | \
- CSCONFIG_ODT_RD_ONLY_CURRENT)
+ CSCONFIG_ODT_WR_ONLY_CURRENT)
#endif
#define CONFIG_SYS_DDR_CLK_CNTL (\
diff --git a/include/configs/km_kirkwood.h b/include/configs/km_kirkwood.h
index dc26155..a445aaf 100644
--- a/include/configs/km_kirkwood.h
+++ b/include/configs/km_kirkwood.h
@@ -116,10 +116,6 @@
/* include common defines/options for all arm based Keymile boards */
#include "km/km_arm.h"
-#ifndef CONFIG_KM_ENV_IS_IN_SPI_NOR
-#define KM_ENV_BUS 5 /* I2C2 (Mux-Port 5)*/
-#endif
-
#if defined(CONFIG_KM_PIGGY4_88E6352)
/*
* Some keymile boards like mgcoge5un & nusa1 have their PIGGY4 connected via
diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h
index 29c60b7..24b5489 100644
--- a/include/configs/m28evk.h
+++ b/include/configs/m28evk.h
@@ -32,7 +32,6 @@
#define CONFIG_CMD_EXT4_WRITE
#define CONFIG_CMD_FAT
#define CONFIG_CMD_FS_GENERIC
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_GREPENV
#define CONFIG_CMD_I2C
#define CONFIG_CMD_MII
diff --git a/include/configs/mcx.h b/include/configs/mcx.h
index 6240666..882f3db 100644
--- a/include/configs/mcx.h
+++ b/include/configs/mcx.h
@@ -135,7 +135,6 @@
#define CONFIG_MTD_PARTITIONS
#define CONFIG_MTD_DEVICE
#define CONFIG_CMD_MTDPARTS
-#define CONFIG_CMD_GPIO
#define CONFIG_SYS_NO_FLASH
#define CONFIG_SYS_I2C
diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
index 8ce1c49..6f20a82 100644
--- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h
@@ -248,7 +248,6 @@
#define CONFIG_CMD_ASKENV
#define CONFIG_CMD_IRQ
#define CONFIG_CMD_MFSL
-#define CONFIG_CMD_GPIO
#if defined(CONFIG_DCACHE) || defined(CONFIG_ICACHE)
# define CONFIG_CMD_CACHE
diff --git a/include/configs/mv-plug-common.h b/include/configs/mv-plug-common.h
new file mode 100644
index 0000000..d7d8d81
--- /dev/null
+++ b/include/configs/mv-plug-common.h
@@ -0,0 +1,64 @@
+/*
+ * (C) Copyright 2009-2015
+ * Marvell Semiconductor <www.marvell.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef _CONFIG_MARVELL_PLUG_H
+#define _CONFIG_MARVELL_PLUG_H
+
+
+/*
+ * High Level Configuration Options (easy to change)
+ */
+#define CONFIG_KW88F6281 1 /* SOC Name */
+#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
+
+/* Add target to build it automatically upon "make" */
+#define CONFIG_BUILD_TARGET "u-boot.kwb"
+
+/*
+ * Compression configuration
+ */
+#ifdef CONFIG_SYS_MVFS
+#define CONFIG_BZIP2
+#define CONFIG_LZMA
+#define CONFIG_CMD_BOOTZ
+#endif /* CONFIG_SYS_MVFS */
+
+/*
+ * Enable device tree support
+ */
+#define CONFIG_OF_LIBFDT
+
+/*
+ * Commands configuration
+ */
+#define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
+#define CONFIG_CMD_DATE
+#define CONFIG_CMD_ENV
+#define CONFIG_CMD_IDE
+#define CONFIG_CMD_MII
+
+/*
+ * Extra file system
+ */
+#define CONFIG_CMD_EXT4
+
+/*
+ * mv-common.h should be defined after CMD configs since it used them
+ * to enable certain macros
+ */
+#include "mv-common.h"
+
+/*
+ * RTC driver configuration
+ */
+#ifdef CONFIG_CMD_DATE
+#define CONFIG_RTC_MV
+#endif /* CONFIG_CMD_DATE */
+
+#define CONFIG_SYS_ALT_MEMTEST
+
+#endif /* _CONFIG_MARVELL_PLUG_H */
diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h
index 529f73b..e6a08d1 100644
--- a/include/configs/mx23_olinuxino.h
+++ b/include/configs/mx23_olinuxino.h
@@ -19,7 +19,6 @@
#define CONFIG_CMD_DHCP
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_FAT
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_LED
#define CONFIG_CMD_MMC
#define CONFIG_CMD_USB
diff --git a/include/configs/mx23evk.h b/include/configs/mx23evk.h
index b649c7d..92f8f86 100644
--- a/include/configs/mx23evk.h
+++ b/include/configs/mx23evk.h
@@ -21,7 +21,6 @@
#define CONFIG_CMD_CACHE
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_FAT
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_MMC
#define CONFIG_CMD_USB
#define CONFIG_CMD_BOOTZ
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 588490f..10867a7 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -24,7 +24,6 @@
#define CONFIG_CMD_DATE
#define CONFIG_CMD_DHCP
#define CONFIG_CMD_FAT
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_MII
#define CONFIG_CMD_MMC
#define CONFIG_CMD_PING
diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h
index 29bfbde..1fd7ce3 100644
--- a/include/configs/mx6_common.h
+++ b/include/configs/mx6_common.h
@@ -103,7 +103,6 @@
/* GPIO */
#define CONFIG_MXC_GPIO
-#define CONFIG_CMD_GPIO
/* MMC */
#define CONFIG_MMC
diff --git a/include/configs/mx7_common.h b/include/configs/mx7_common.h
index 5615a34..870e12e 100644
--- a/include/configs/mx7_common.h
+++ b/include/configs/mx7_common.h
@@ -73,7 +73,6 @@
/* GPIO */
#define CONFIG_MXC_GPIO
-#define CONFIG_CMD_GPIO
/* UART */
#define CONFIG_MXC_UART
diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h
index 52369be..f071c59 100644
--- a/include/configs/nokia_rx51.h
+++ b/include/configs/nokia_rx51.h
@@ -129,7 +129,6 @@
#define CONFIG_CMD_I2C /* I2C serial bus support */
#define CONFIG_CMD_MMC /* MMC support */
-#define CONFIG_CMD_GPIO /* Enable gpio command */
#define CONFIG_CMDLINE_EDITING /* add command line history */
#define CONFIG_AUTO_COMPLETE /* add autocompletion support */
diff --git a/include/configs/odroid.h b/include/configs/odroid.h
index 4c85e85..8e67159 100644
--- a/include/configs/odroid.h
+++ b/include/configs/odroid.h
@@ -194,7 +194,6 @@
#define CONFIG_EXYNOS_ACE_SHA
#define CONFIG_LIB_HW_RAND
-#define CONFIG_CMD_GPIO
/* USB */
#define CONFIG_CMD_USB
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index bf986f8..65f08a1 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -108,7 +108,6 @@
#define CONFIG_USB_STORAGE /* USB storage support */
#define CONFIG_CMD_NAND /* NAND support */
#define CONFIG_CMD_LED /* LED support */
-#define CONFIG_CMD_GPIO /* Enable gpio command */
#define CONFIG_CMD_DHCP
#define CONFIG_VIDEO_OMAP3 /* DSS Support */
diff --git a/include/configs/omap4_panda.h b/include/configs/omap4_panda.h
index 95614b9..15f3eec 100644
--- a/include/configs/omap4_panda.h
+++ b/include/configs/omap4_panda.h
@@ -39,7 +39,6 @@
#include <configs/ti_omap4_common.h>
/* GPIO */
-#define CONFIG_CMD_GPIO
/* ENV related config options */
diff --git a/include/configs/qemu-x86.h b/include/configs/qemu-x86.h
index ecb385c..e3e1237 100644
--- a/include/configs/qemu-x86.h
+++ b/include/configs/qemu-x86.h
@@ -52,7 +52,6 @@
/* GPIO is not supported */
#undef CONFIG_INTEL_ICH6_GPIO
-#undef CONFIG_CMD_GPIO
/* SPI is not supported */
#undef CONFIG_ICH_SPI
diff --git a/include/configs/rpi-common.h b/include/configs/rpi-common.h
index 0b8c681..1b83eb3 100644
--- a/include/configs/rpi-common.h
+++ b/include/configs/rpi-common.h
@@ -117,7 +117,6 @@
#define CONFIG_COMMAND_HISTORY
/* Commands */
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_MMC
#define CONFIG_PARTITION_UUIDS
#define CONFIG_CMD_PART
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index c96ec90..2a68203 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -48,7 +48,6 @@
#define CONFIG_CMD_FS_GENERIC
#define CONFIG_CMD_MD5SUM
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_GPT
#define CONFIG_PARTITION_UUIDS
diff --git a/include/configs/sansa_fuze_plus.h b/include/configs/sansa_fuze_plus.h
index 1715678..8088359 100644
--- a/include/configs/sansa_fuze_plus.h
+++ b/include/configs/sansa_fuze_plus.h
@@ -17,7 +17,6 @@
#define CONFIG_CMD_CACHE
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_FAT
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_MMC
#define CONFIG_CMD_PING
#define CONFIG_CMD_USB
diff --git a/include/configs/sc_sps_1.h b/include/configs/sc_sps_1.h
index 6d35cd3..6642b3f 100644
--- a/include/configs/sc_sps_1.h
+++ b/include/configs/sc_sps_1.h
@@ -23,7 +23,6 @@
#define CONFIG_CMD_DHCP
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_FAT
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_MII
#define CONFIG_CMD_MMC
#define CONFIG_CMD_PING
diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h
index 76cdbe0..ebc3d64 100644
--- a/include/configs/sheevaplug.h
+++ b/include/configs/sheevaplug.h
@@ -20,46 +20,23 @@
* High Level Configuration Options (easy to change)
*/
#define CONFIG_FEROCEON_88FR131 1 /* CPU Core subversion */
-#define CONFIG_KW88F6281 1 /* SOC Name */
#define CONFIG_MACH_SHEEVAPLUG /* Machine type */
-#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
/*
- * Compression configuration
- */
-#define CONFIG_BZIP2
-#define CONFIG_LZMA
-#define CONFIG_LZO
-
-/*
- * Enable device tree support
- */
-#define CONFIG_OF_LIBFDT
-
-/*
- * Miscellaneous configurable options
+ * Commands configuration
*/
-#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
+#define CONFIG_CMD_MMC
/*
- * Commands configuration
+ * Standard filesystems
*/
-#define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
-#define CONFIG_CMD_BOOTZ
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_ENV
-#define CONFIG_CMD_IDE
-#define CONFIG_CMD_MII
-#define CONFIG_CMD_MMC
-#define CONFIG_CMD_NAND
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_USB
+#define CONFIG_SYS_MVFS
/*
- * mv-common.h should be defined after CMD configs since it used them
+ * mv-plug-common.h should be defined after CMD configs since it used them
* to enable certain macros
*/
-#include "mv-common.h"
+#include "mv-plug-common.h"
/*
* Environment variables configurations
@@ -132,18 +109,4 @@
#define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET
#endif /* CONFIG_CMD_IDE */
-/*
- * File system
- */
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_EXT4
-#define CONFIG_CMD_FAT
-#define CONFIG_CMD_JFFS2
-#define CONFIG_CMD_UBI
-#define CONFIG_CMD_UBIFS
-#define CONFIG_RBTREE
-#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
-#define CONFIG_MTD_PARTITIONS
-#define CONFIG_CMD_MTDPARTS
-
#endif /* _CONFIG_SHEEVAPLUG_H */
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index 6c374eb..9ab0457 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -615,7 +615,6 @@
#define CONFIG_OMAP_GPIO
/* Gpio cmd support */
-#define CONFIG_CMD_GPIO
/* Watchdog */
#define CONFIG_HW_WATCHDOG
diff --git a/include/configs/snapper9260.h b/include/configs/snapper9260.h
index afcd16a..e5cf7d2 100644
--- a/include/configs/snapper9260.h
+++ b/include/configs/snapper9260.h
@@ -151,7 +151,6 @@
#define CONFIG_CMD_DHCP
#define CONFIG_CMD_FAT
#define CONFIG_CMD_I2C
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_USB
#define CONFIG_CMD_MII
#define CONFIG_CMD_NAND
diff --git a/include/configs/socfpga_arria5_socdk.h b/include/configs/socfpga_arria5_socdk.h
index b75b0a2..8364c66 100644
--- a/include/configs/socfpga_arria5_socdk.h
+++ b/include/configs/socfpga_arria5_socdk.h
@@ -23,7 +23,6 @@
#define CONFIG_CMD_EXT4_WRITE
#define CONFIG_CMD_FAT
#define CONFIG_CMD_FS_GENERIC
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_GREPENV
#define CONFIG_CMD_MII
#define CONFIG_CMD_MMC
diff --git a/include/configs/socfpga_cyclone5_socdk.h b/include/configs/socfpga_cyclone5_socdk.h
index fa67b25..86b53e2 100644
--- a/include/configs/socfpga_cyclone5_socdk.h
+++ b/include/configs/socfpga_cyclone5_socdk.h
@@ -23,7 +23,6 @@
#define CONFIG_CMD_EXT4_WRITE
#define CONFIG_CMD_FAT
#define CONFIG_CMD_FS_GENERIC
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_GREPENV
#define CONFIG_CMD_MII
#define CONFIG_CMD_MMC
diff --git a/include/configs/socfpga_de0_nano_soc.h b/include/configs/socfpga_de0_nano_soc.h
index 191e1f7..3ae9b3e 100644
--- a/include/configs/socfpga_de0_nano_soc.h
+++ b/include/configs/socfpga_de0_nano_soc.h
@@ -23,7 +23,6 @@
#define CONFIG_CMD_EXT4_WRITE
#define CONFIG_CMD_FAT
#define CONFIG_CMD_FS_GENERIC
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_GREPENV
#define CONFIG_CMD_MII
#define CONFIG_CMD_MMC
diff --git a/include/configs/socfpga_mcvevk.h b/include/configs/socfpga_mcvevk.h
index 65816a0..4b270ce 100644
--- a/include/configs/socfpga_mcvevk.h
+++ b/include/configs/socfpga_mcvevk.h
@@ -23,7 +23,6 @@
#define CONFIG_CMD_EXT4_WRITE
#define CONFIG_CMD_FAT
#define CONFIG_CMD_FS_GENERIC
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_GREPENV
#define CONFIG_CMD_MII
#define CONFIG_CMD_MMC
diff --git a/include/configs/socfpga_sockit.h b/include/configs/socfpga_sockit.h
index 6c71ef4..742c5ae 100644
--- a/include/configs/socfpga_sockit.h
+++ b/include/configs/socfpga_sockit.h
@@ -23,7 +23,6 @@
#define CONFIG_CMD_EXT4_WRITE
#define CONFIG_CMD_FAT
#define CONFIG_CMD_FS_GENERIC
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_GREPENV
#define CONFIG_CMD_MII
#define CONFIG_CMD_MMC
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index f5db4d3..d7d5d25 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -271,7 +271,6 @@ extern int soft_i2c_gpio_scl;
/* GPIO */
#define CONFIG_SUNXI_GPIO
#define CONFIG_SPL_GPIO_SUPPORT
-#define CONFIG_CMD_GPIO
#ifdef CONFIG_VIDEO
/*
diff --git a/include/configs/suvd3.h b/include/configs/suvd3.h
index fddba92..af8730a 100644
--- a/include/configs/suvd3.h
+++ b/include/configs/suvd3.h
@@ -29,13 +29,48 @@
#define CONFIG_KM_BOARD_NAME "suvd3"
/* include common defines/options for all 8321 Keymile boards */
#include "km/km8321-common.h"
+
#elif defined(CONFIG_KMVECT1) /* VECT1 board specific */
#define CONFIG_HOSTNAME kmvect1
#define CONFIG_KM_BOARD_NAME "kmvect1"
+/* at end of uboot partition, before env */
+#define CONFIG_SYS_QE_FW_ADDR 0xF00B0000
+/* include common defines/options for all 8309 Keymile boards */
+#include "km/km8309-common.h"
+
+#elif defined(CONFIG_KMTEGR1) /* TEGR1 board specific */
+#define CONFIG_HOSTNAME kmtegr1
+#define CONFIG_KM_BOARD_NAME "kmtegr1"
+#define CONFIG_KM_UBI_PARTITION_NAME_BOOT "ubi0"
+#define CONFIG_KM_UBI_PARTITION_NAME_APP "ubi1"
+#define MTDIDS_DEFAULT "nor0=boot,nand0=app"
+#define MTDPARTS_DEFAULT "mtdparts=" \
+ "boot:" \
+ "768k(u-boot)," \
+ "256k(qe-fw)," \
+ "128k(env)," \
+ "128k(envred)," \
+ "-(" CONFIG_KM_UBI_PARTITION_NAME_BOOT ");" \
+ "app:" \
+ "-(" CONFIG_KM_UBI_PARTITION_NAME_APP ");"
+
+#define CONFIG_ENV_ADDR 0xF0100000
+#define CONFIG_ENV_OFFSET 0x100000
+
+#define CONFIG_CMD_NAND
+#define CONFIG_NAND_ECC_BCH
+#define CONFIG_BCH
+#define CONFIG_NAND_KMETER1
+#define CONFIG_SYS_MAX_NAND_DEVICE 1
+#define NAND_MAX_CHIPS 1
+
/* include common defines/options for all 8309 Keymile boards */
#include "km/km8309-common.h"
+/* must be after the include because KMBEC_FPGA is otherwise undefined */
+#define CONFIG_SYS_NAND_BASE CONFIG_SYS_KMBEC_FPGA_BASE /* PRIO_BASE_ADDRESS */
+
#else
-#error Supported boards are: SUVD3, KMVECT1
+#error Supported boards are: SUVD3, KMVECT1, KMTEGR1
#endif
#define CONFIG_SYS_APP1_BASE 0xA0000000
@@ -56,6 +91,7 @@
*
*/
+#if defined(CONFIG_SUVD3) || defined(CONFIG_KMVECT1)
/*
* APP1 on the local bus CS2
*/
@@ -82,14 +118,26 @@
0x0000c000 | \
MxMR_WLFx_2X)
+#elif defined(CONFIG_KMTEGR1)
+#define CONFIG_SYS_BR3_PRELIM (CONFIG_SYS_APP2_BASE | \
+ BR_PS_16 | \
+ BR_MS_GPCM | \
+ BR_V)
+
+#define CONFIG_SYS_OR3_PRELIM (MEG_TO_AM(CONFIG_SYS_APP2_SIZE) | \
+ OR_GPCM_SCY_5 | \
+ OR_GPCM_TRLX_CLEAR | \
+ OR_GPCM_EHTR_CLEAR)
+
+#endif /* CONFIG_KMTEGR1 */
+
#define CONFIG_SYS_LBLAWBAR3_PRELIM CONFIG_SYS_APP2_BASE
#define CONFIG_SYS_LBLAWAR3_PRELIM (LBLAWAR_EN | LBLAWAR_256MB)
/*
* MMU Setup
*/
-
-
+#if defined(CONFIG_SUVD3) || defined(CONFIG_KMVECT1)
/* APP1: icache cacheable, but dcache-inhibit and guarded */
#define CONFIG_SYS_IBAT5L (CONFIG_SYS_APP1_BASE | BATL_PP_RW | \
BATL_MEMCOHERENCE)
@@ -99,6 +147,13 @@
BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
#define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U
+#elif defined(CONFIG_KMTEGR1)
+#define CONFIG_SYS_IBAT5L (0)
+#define CONFIG_SYS_IBAT5U (0)
+#define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L
+#define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U
+#endif /* CONFIG_KMTEGR1 */
+
#define CONFIG_SYS_IBAT6L (CONFIG_SYS_APP2_BASE | BATL_PP_RW | \
BATL_MEMCOHERENCE)
#define CONFIG_SYS_IBAT6U (CONFIG_SYS_APP2_BASE | BATU_BL_256M | \
@@ -131,7 +186,9 @@
#define CONFIG_SYS_UEC1_PHY_ADDR CONFIG_SYS_FIXED_PHY_ADDR
#define CONFIG_SYS_UEC1_INTERFACE_TYPE PHY_INTERFACE_MODE_MII
#define CONFIG_SYS_UEC1_INTERFACE_SPEED 100
+#endif /* CONFIG_KMVECT1 */
+#if defined(CONFIG_KMVECT1) || defined(CONFIG_KMTEGR1)
/* ethernet port connected to piggy (UEC2) */
#define CONFIG_HAS_ETH1
#define CONFIG_UEC_ETH2
@@ -142,6 +199,6 @@
#define CONFIG_SYS_UEC2_PHY_ADDR 0
#define CONFIG_SYS_UEC2_INTERFACE_TYPE PHY_INTERFACE_MODE_RMII
#define CONFIG_SYS_UEC2_INTERFACE_SPEED 100
-#endif /* CONFIG_KMVECT1 */
+#endif /* CONFIG_KMVECT1 || CONFIG_KMTEGR1 */
#endif /* __CONFIG_H */
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index f993433..4cb7902 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -103,7 +103,6 @@
#define CONFIG_CMD_DHCP
#define CONFIG_CMD_EXT2 /* EXT2 Support */
#define CONFIG_CMD_FAT /* FAT support */
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_I2C /* I2C serial bus support */
#define CONFIG_CMD_MII
#define CONFIG_CMD_MMC /* MMC support */
diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h
index 32cc39b..5bb9e48 100644
--- a/include/configs/tegra-common.h
+++ b/include/configs/tegra-common.h
@@ -113,7 +113,6 @@
GENERATED_GBL_DATA_SIZE)
#define CONFIG_TEGRA_GPIO
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_ENTERRCM
/* Defines for SPL */
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index 7810dd6..2087eb1 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -101,7 +101,6 @@
#define CONFIG_CMD_SPI
/* GPIO block */
-#define CONFIG_CMD_GPIO
/*
* The following are general good-enough settings for U-Boot. We set a
diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
index ed86561..2b2c060 100644
--- a/include/configs/ti_armv7_keystone2.h
+++ b/include/configs/ti_armv7_keystone2.h
@@ -302,7 +302,6 @@
/* And no support for GPIO, yet.. */
#undef CONFIG_SPL_GPIO_SUPPORT
-#undef CONFIG_CMD_GPIO
/* we may include files below only after all above definitions */
#include <asm/arch/hardware.h>
diff --git a/include/configs/tqma6_wru4.h b/include/configs/tqma6_wru4.h
index 1330a0a..450073c 100644
--- a/include/configs/tqma6_wru4.h
+++ b/include/configs/tqma6_wru4.h
@@ -38,7 +38,6 @@
#define CONFIG_SYS_RTC_DS1337_NOOSC
#define CONFIG_CMD_DATE
-#define CONFIG_CMD_GPIO
/* LED */
#define CONFIG_CMD_LED
diff --git a/include/configs/tuxx1.h b/include/configs/tuxx1.h
index 08ead7f..e2ca9e3 100644
--- a/include/configs/tuxx1.h
+++ b/include/configs/tuxx1.h
@@ -36,6 +36,9 @@
#elif defined(CONFIG_KMOPTI2)
#define CONFIG_KM_BOARD_NAME "kmopti2"
#define CONFIG_HOSTNAME kmopti2
+#elif defined(CONFIG_KMTEPR2)
+#define CONFIG_KM_BOARD_NAME "kmtepr2"
+#define CONFIG_HOSTNAME kmtepr2
#else
#error ("Board not supported")
#endif
@@ -47,21 +50,45 @@
#define CONFIG_SYS_APP1_BASE 0xA0000000 /* PAXG */
#define CONFIG_SYS_APP1_SIZE 256 /* Megabytes */
-#if defined(CONFIG_TUXX1) || defined(CONFIG_KMOPTI2)
+#if defined(CONFIG_TUXX1) || defined(CONFIG_KMOPTI2) || defined(CONFIG_KMTEPR2)
#define CONFIG_SYS_APP2_BASE 0xB0000000 /* PINC3 */
#define CONFIG_SYS_APP2_SIZE 256 /* Megabytes */
#endif
/*
* Init Local Bus Memory Controller:
- * Device on
- * Bank Bus Machine PortSz Size TUDA1 TUXA1 TUGE1 KMSUPX4 KMOPTI2
- * ---- --- ------- ------ ----- ---------------------------------------
- * 2 Local GPCM 8 bit 256MB PAXG LPXF PAXI LPXF PAXE
- * 3 Local GPCM 8 bit 256MB PINC3 PINC2 unused unused OPI2(16 bit)
+ * Device on board
+ * Bank Bus Machine PortSz Size TUDA1 TUXA1 TUGE1 KMSUPX4 KMOPTI2
+ * -----------------------------------------------------------------------------
+ * 2 Local GPCM 8 bit 256MB PAXG LPXF PAXI LPXF PAXE
+ * 3 Local GPCM 8 bit 256MB PINC3 PINC2 unused unused OPI2(16 bit)
*
+ * Device on board (continued)
+ * Bank Bus Machine PortSz Size KMTEPR2
+ * -----------------------------------------------------------------------------
+ * 2 Local GPCM 8 bit 256MB NVRAM
+ * 3 Local GPCM 8 bit 256MB TEP2 (16 bit)
*/
+#if defined(CONFIG_KMTEPRO2)
+/*
+ * Configuration for C2 (NVRAM) on the local bus
+ */
+#define CONFIG_SYS_LBLAWBAR2_PRELIM CONFIG_SYS_APP1_BASE
+#define CONFIG_SYS_LBLAWAR2_PRELIM (LBLAWAR_EN | LBLAWAR_256MB)
+#define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_APP1_BASE | \
+ BR_PS_8 | \
+ BR_MS_GPCM | \
+ BR_V)
+#define CONFIG_SYS_OR2_PRELIM (MEG_TO_AM(CONFIG_SYS_APP1_SIZE) | \
+ OR_GPCM_CSNT | \
+ OR_GPCM_ACS_DIV2 | \
+ OR_GPCM_XACS | \
+ OR_GPCM_SCY_2 | \
+ OR_GPCM_TRLX_SET | \
+ OR_GPCM_EHTR_SET | \
+ OR_GPCM_EAD)
+#else
/*
* Configuration for C2 on the local bus
*/
@@ -82,6 +109,8 @@
OR_GPCM_TRLX_SET | \
OR_GPCM_EHTR_CLEAR | \
OR_GPCM_EAD)
+#endif
+
#if defined(CONFIG_TUXX1)
/*
* Configuration for C3 on the local bus
@@ -108,7 +137,7 @@
MxMR_WLFx_2X)
#endif
-#if defined(CONFIG_KMOPTI2)
+#if defined(CONFIG_KMOPTI2) || defined(CONFIG_KMTEPR2)
/*
* Configuration for C3 on the local bus
*/
diff --git a/include/configs/woodburn_common.h b/include/configs/woodburn_common.h
index 2acebf1..caa0434 100644
--- a/include/configs/woodburn_common.h
+++ b/include/configs/woodburn_common.h
@@ -104,7 +104,6 @@
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_FAT
-#define CONFIG_CMD_GPIO
#define CONFIG_MXC_GPIO
#define CONFIG_NET_RETRY_COUNT 100
diff --git a/include/configs/work_92105.h b/include/configs/work_92105.h
index f77d065..e9127c3 100644
--- a/include/configs/work_92105.h
+++ b/include/configs/work_92105.h
@@ -153,7 +153,6 @@
* GPIO
*/
-#define CONFIG_CMD_GPIO
#define CONFIG_LPC32XX_GPIO
/*
diff --git a/include/configs/x600.h b/include/configs/x600.h
index 8534766..58f1aca 100644
--- a/include/configs/x600.h
+++ b/include/configs/x600.h
@@ -117,7 +117,6 @@
#define CONFIG_CMD_FAT
#define CONFIG_CMD_FPGA_LOADMK
#define CONFIG_CMD_FS_GENERIC
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_I2C
#define CONFIG_CMD_MII
#define CONFIG_CMD_MTDPARTS
diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h
index ab9fa0b..33263ab 100644
--- a/include/configs/x86-common.h
+++ b/include/configs/x86-common.h
@@ -102,7 +102,6 @@
*/
#define CONFIG_CMD_DATE
#define CONFIG_CMD_FPGA_LOADMK
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_IO
#define CONFIG_CMD_IRQ
#define CONFIG_CMD_PCI
diff --git a/include/configs/xfi3.h b/include/configs/xfi3.h
index 0551580..aa49c9e 100644
--- a/include/configs/xfi3.h
+++ b/include/configs/xfi3.h
@@ -17,7 +17,6 @@
#define CONFIG_CMD_CACHE
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_FAT
-#define CONFIG_CMD_GPIO
#define CONFIG_CMD_MMC
#define CONFIG_CMD_PING
#define CONFIG_CMD_USB
diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index 36c1100..e990512 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -94,6 +94,9 @@
# define CONFIG_SDHCI
# define CONFIG_ZYNQ_SDHCI
# define CONFIG_CMD_MMC
+# ifndef CONFIG_ZYNQ_SDHCI_MAX_FREQ
+# define CONFIG_ZYNQ_SDHCI_MAX_FREQ 200000000
+# endif
#endif
#if defined(CONFIG_ZYNQ_SDHCI)
@@ -182,6 +185,7 @@
# define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
# define CONFIG_PHYLIB
# define CONFIG_PHY_MARVELL
+# define CONFIG_PHY_TI
#endif
/* I2C */
diff --git a/include/configs/xilinx_zynqmp_ep.h b/include/configs/xilinx_zynqmp_ep.h
index ed6023a..8bdb5c9 100644
--- a/include/configs/xilinx_zynqmp_ep.h
+++ b/include/configs/xilinx_zynqmp_ep.h
@@ -19,6 +19,7 @@
#define CONFIG_ZYNQ_GEM_PHY_ADDR0 7
#define CONFIG_ZYNQ_SDHCI0
+#define CONFIG_ZYNQ_SDHCI_MAX_FREQ 52000000
#define CONFIG_ZYNQ_I2C0
#define CONFIG_SYS_I2C_ZYNQ
#define CONFIG_ZYNQ_EEPROM
diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index f98101f..d10f1dd 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -44,7 +44,6 @@
#endif
#define CONFIG_ZYNQ_GPIO
-#define CONFIG_CMD_GPIO
/* Ethernet driver */
#if defined(CONFIG_ZYNQ_GEM0) || defined(CONFIG_ZYNQ_GEM1)
@@ -106,6 +105,7 @@
# define CONFIG_SDHCI
# define CONFIG_ZYNQ_SDHCI
# define CONFIG_CMD_MMC
+# define CONFIG_ZYNQ_SDHCI_MAX_FREQ 52000000
#endif
#ifdef CONFIG_ZYNQ_USB
@@ -332,7 +332,7 @@
#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
#define CONFIG_SPL_LIBDISK_SUPPORT
#define CONFIG_SPL_FAT_SUPPORT
-#ifdef CONFIG_OF_CONTROL
+#ifdef CONFIG_OF_SEPARATE
# define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot-dtb.img"
#else
# define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
diff --git a/include/image.h b/include/image.h
index 08ae24a..299d6d2 100644
--- a/include/image.h
+++ b/include/image.h
@@ -248,8 +248,9 @@ struct lmb;
#define IH_TYPE_RKIMAGE 23 /* Rockchip Boot Image */
#define IH_TYPE_RKSD 24 /* Rockchip SD card */
#define IH_TYPE_RKSPI 25 /* Rockchip SPI image */
+#define IH_TYPE_ZYNQIMAGE 26 /* Xilinx Zynq Boot Image */
-#define IH_TYPE_COUNT 26 /* Number of image types */
+#define IH_TYPE_COUNT 27 /* Number of image types */
/*
* Compression Types
diff --git a/include/phy.h b/include/phy.h
index 3f826b6..66cf61b 100644
--- a/include/phy.h
+++ b/include/phy.h
@@ -251,6 +251,7 @@ int phy_natsemi_init(void);
int phy_realtek_init(void);
int phy_smsc_init(void);
int phy_teranetics_init(void);
+int phy_ti_init(void);
int phy_vitesse_init(void);
int board_phy_config(struct phy_device *phydev);
diff --git a/include/spl.h b/include/spl.h
index 8e53426..92cdc04 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -45,31 +45,31 @@ int spl_start_uboot(void);
void spl_display_print(void);
/* NAND SPL functions */
-void spl_nand_load_image(void);
+int spl_nand_load_image(void);
/* OneNAND SPL functions */
-void spl_onenand_load_image(void);
+int spl_onenand_load_image(void);
/* NOR SPL functions */
-void spl_nor_load_image(void);
+int spl_nor_load_image(void);
/* MMC SPL functions */
-void spl_mmc_load_image(void);
+int spl_mmc_load_image(u32 boot_device);
/* YMODEM SPL functions */
-void spl_ymodem_load_image(void);
+int spl_ymodem_load_image(void);
/* SPI SPL functions */
-void spl_spi_load_image(void);
+int spl_spi_load_image(void);
/* Ethernet SPL functions */
-void spl_net_load_image(const char *device);
+int spl_net_load_image(const char *device);
/* USB SPL functions */
-void spl_usb_load_image(void);
+int spl_usb_load_image(void);
/* SATA SPL functions */
-void spl_sata_load_image(void);
+int spl_sata_load_image(void);
/* SPL FAT image functions */
int spl_load_image_fat(block_dev_desc_t *block_dev, int partition, const char *filename);
diff --git a/lib/lz4_wrapper.c b/lib/lz4_wrapper.c
index 0739663..6dc8b76 100644
--- a/lib/lz4_wrapper.c
+++ b/lib/lz4_wrapper.c
@@ -94,7 +94,9 @@ int ulz4fn(const void *src, size_t srcn, void *dst, size_t *dstn)
}
while (1) {
- struct lz4_block_header b = { .raw = le32_to_cpu(*(u32 *)in) };
+ struct lz4_block_header b;
+
+ b.raw = le32_to_cpu(*(u32 *)in);
in += sizeof(struct lz4_block_header);
if (in - src + b.size > srcn) {
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index 8f690eb..96f414a 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -117,6 +117,7 @@ MKIMAGEFLAGS_MLO.byteswap = -T omapimage -n byteswap -a $(CONFIG_SPL_TEXT_BASE)
MLO MLO.byteswap: $(obj)/u-boot-spl.bin
$(call if_changed,mkimage)
+ifeq ($(CONFIG_SYS_SOC),"at91")
MKIMAGEFLAGS_boot.bin = -T atmelimage
ifeq ($(CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER),y)
@@ -127,6 +128,12 @@ endif
boot.bin: $(obj)/u-boot-spl.bin
$(call if_changed,mkimage)
+else
+MKIMAGEFLAGS_boot.bin = -T zynqimage
+
+spl/boot.bin: $(obj)/u-boot-spl-dtb.bin
+ $(call if_changed,mkimage)
+endif
ALL-y += $(obj)/$(SPL_BIN).bin $(obj)/$(SPL_BIN).cfg
@@ -150,6 +157,10 @@ ifeq ($(CONFIG_SYS_SOC),"at91")
ALL-y += boot.bin
endif
+ifdef CONFIG_ARCH_ZYNQ
+ALL-y += $(obj)/boot.bin
+endif
+
all: $(ALL-y)
quiet_cmd_cat = CAT $@
diff --git a/test/fs/fat-noncontig-test.sh b/test/fs/fat-noncontig-test.sh
index f153c97..65ed9a5 100755
--- a/test/fs/fat-noncontig-test.sh
+++ b/test/fs/fat-noncontig-test.sh
@@ -74,9 +74,25 @@ make O=${odir} -s sandbox_defconfig && make O=${odir} -s -j8
mkdir -p ${mnt}
if [ ! -f ${img} ]; then
fallocate -l 40M ${img}
+ if [ $? -ne 0 ]; then
+ echo fallocate failed - using dd instead
+ dd if=/dev/zero of=${img} bs=1024 count=$((40 * 1024))
+ if [ $? -ne 0 ]; then
+ echo Could not create empty disk image
+ exit $?
+ fi
+ fi
mkfs.fat ${img}
+ if [ $? -ne 0 ]; then
+ echo Could not create FAT filesystem
+ exit $?
+ fi
sudo mount -o loop,uid=$(id -u) ${img} ${mnt}
+ if [ $? -ne 0 ]; then
+ echo Could not mount test filesystem
+ exit $?
+ fi
for ((sects=8; sects < 512; sects += 8)); do
fn=${mnt}/keep-${sects}.img
@@ -92,11 +108,23 @@ if [ ! -f ${img} ]; then
dd if=${fill} of=${mnttestfn} bs=511 >/dev/null 2>&1
sudo umount ${mnt}
+ if [ $? -ne 0 ]; then
+ echo Could not unmount test filesystem
+ exit $?
+ fi
fi
sudo mount -o ro,loop,uid=$(id -u) ${img} ${mnt}
+if [ $? -ne 0 ]; then
+ echo Could not mount test filesystem
+ exit $?
+fi
crc=0x`crc32 ${mnttestfn}`
sudo umount ${mnt}
+if [ $? -ne 0 ]; then
+ echo Could not unmount test filesystem
+ exit $?
+fi
crc=`printf %02x%02x%02x%02x \
$((${crc} & 0xff)) \
@@ -111,3 +139,7 @@ crc32 ${loadaddr} \$filesize ${crcaddr}
if itest.l *${crcaddr} != ${crc}; then echo FAILURE; else echo PASS; fi
reset
EOF
+if [ $? -ne 0 ]; then
+ echo U-Boot exit status indicates an error
+ exit $?
+fi
diff --git a/tools/Makefile b/tools/Makefile
index 9082bda..9cfd80b 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -98,6 +98,7 @@ dumpimage-mkimage-objs := aisimage.o \
lib/sha256.o \
common/hash.o \
ublimage.o \
+ zynqimage.o \
$(LIBFDT_OBJS) \
$(RSA_OBJS-y)
diff --git a/tools/env/Makefile b/tools/env/Makefile
index 40164f7..38ad118 100644
--- a/tools/env/Makefile
+++ b/tools/env/Makefile
@@ -23,10 +23,12 @@ endif
always := fw_printenv
hostprogs-y := fw_printenv
-fw_printenv-objs := fw_env.o fw_env_main.o \
+lib-y += fw_env.o \
crc32.o ctype.o linux_string.o \
env_attr.o env_flags.o aes.o
+fw_printenv-objs := fw_env_main.o $(lib-y)
+
quiet_cmd_crosstools_strip = STRIP $^
cmd_crosstools_strip = $(STRIP) $^; touch $@
diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index daa02a7..ba11f77 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -124,6 +124,7 @@ static int parse_config (void);
#if defined(CONFIG_FILE)
static int get_config (char *);
+static char *config_file = CONFIG_FILE;
#endif
static inline ulong getenvsize (void)
{
@@ -246,6 +247,19 @@ int fw_printenv (int argc, char *argv[])
int i, n_flag;
int rc = 0;
+#ifdef CONFIG_FILE
+ if (argc >= 2 && strcmp(argv[1], "-c") == 0) {
+ if (argc < 3) {
+ fprintf(stderr,
+ "## Error: '-c' option requires the config file to use\n");
+ return -1;
+ }
+ config_file = argv[2];
+ argv += 2;
+ argc -= 2;
+ }
+#endif
+
if (argc >= 2 && strcmp(argv[1], "-a") == 0) {
if (argc < 3) {
fprintf(stderr,
@@ -486,6 +500,19 @@ int fw_setenv(int argc, char *argv[])
char *name;
char *value = NULL;
+#ifdef CONFIG_FILE
+ if (argc >= 2 && strcmp(argv[1], "-c") == 0) {
+ if (argc < 3) {
+ fprintf(stderr,
+ "## Error: '-c' option requires the config file to use\n");
+ return -1;
+ }
+ config_file = argv[2];
+ argv += 2;
+ argc -= 2;
+ }
+#endif
+
if (argc < 2) {
errno = EINVAL;
return -1;
@@ -1364,9 +1391,9 @@ static int parse_config ()
#if defined(CONFIG_FILE)
/* Fills in DEVNAME(), ENVSIZE(), DEVESIZE(). Or don't. */
- if (get_config (CONFIG_FILE)) {
+ if (get_config (config_file)) {
fprintf (stderr,
- "Cannot parse config file: %s\n", strerror (errno));
+ "Cannot parse config file '%s': %s\n", config_file, strerror (errno));
return -1;
}
#else
diff --git a/tools/env/fw_env_main.c b/tools/env/fw_env_main.c
index ce50d58..234c061 100644
--- a/tools/env/fw_env_main.c
+++ b/tools/env/fw_env_main.c
@@ -50,8 +50,13 @@ void usage(void)
fprintf(stderr, "fw_printenv/fw_setenv, "
"a command line interface to U-Boot environment\n\n"
+#ifndef CONFIG_FILE
"usage:\tfw_printenv [-a key] [-n] [variable name]\n"
"\tfw_setenv [-a key] [variable name] [variable value]\n"
+#else
+ "usage:\tfw_printenv [-c /my/fw_env.config] [-a key] [-n] [variable name]\n"
+ "\tfw_setenv [-c /my/fw_env.config] [-a key] [variable name] [variable value]\n"
+#endif
"\tfw_setenv -s [ file ]\n"
"\tfw_setenv -s - < [ file ]\n\n"
"The file passed as argument contains only pairs "
@@ -98,12 +103,15 @@ int main(int argc, char *argv[])
cmdname = p + 1;
}
- while ((c = getopt_long (argc, argv, "a:ns:h",
+ while ((c = getopt_long (argc, argv, "a:c:ns:h",
long_options, NULL)) != EOF) {
switch (c) {
case 'a':
/* AES key, handled later */
break;
+ case 'c':
+ /* handled later */
+ break;
case 'n':
/* handled in fw_printenv */
break;
diff --git a/tools/kwbimage.c b/tools/kwbimage.c
index d33f1b6..5f6d91c 100644
--- a/tools/kwbimage.c
+++ b/tools/kwbimage.c
@@ -417,7 +417,13 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params,
binhdrsz = sizeof(struct opt_hdr_v1) +
(binarye->binary.nargs + 1) * sizeof(unsigned int) +
s.st_size;
- binhdrsz = ALIGN_SUP(binhdrsz, 32);
+
+ /*
+ * The size includes the binary image size, rounded
+ * up to a 4-byte boundary. Plus 4 bytes for the
+ * next-header byte and 3-byte alignment at the end.
+ */
+ binhdrsz = ALIGN_SUP(binhdrsz, 4) + 4;
hdr->headersz_lsb = binhdrsz & 0xFFFF;
hdr->headersz_msb = (binhdrsz & 0xFFFF0000) >> 16;
@@ -441,7 +447,7 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params,
fclose(bin);
- cur += s.st_size;
+ cur += ALIGN_SUP(s.st_size, 4);
/*
* For now, we don't support more than one binary
@@ -449,7 +455,7 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params,
* supported. So, the binary header is necessarily the
* last one
*/
- *((unsigned char *)cur) = 0;
+ *((uint32_t *)cur) = 0x00000000;
cur += sizeof(uint32_t);
}
diff --git a/tools/zynqimage.c b/tools/zynqimage.c
new file mode 100644
index 0000000..25f558d
--- /dev/null
+++ b/tools/zynqimage.c
@@ -0,0 +1,257 @@
+/*
+ * Copyright (C) 2015 Nathan Rossi <nathan@nathanrossi.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ *
+ * The following Boot Header format/structures and values are defined in the
+ * following documents:
+ * * Xilinx Zynq-7000 Technical Reference Manual (Section 6.3)
+ * * Xilinx Zynq-7000 Software Developers Guide (Appendix A.7 and A.8)
+ *
+ * Expected Header Size = 0x8C0
+ * Forced as 'little' endian, 32-bit words
+ *
+ * 0x 0 - Interrupt Table (8 words)
+ * ... (Default value = 0xeafffffe)
+ * 0x 1f
+ * 0x 20 - Width Detection
+ * * DEFAULT_WIDTHDETECTION 0xaa995566
+ * 0x 24 - Image Identifier
+ * * DEFAULT_IMAGEIDENTIFIER 0x584c4e58
+ * 0x 28 - Encryption
+ * * 0x00000000 - None
+ * * 0xa5c3c5a3 - eFuse
+ * * 0x3a5c3c5a - bbRam
+ * 0x 2C - User Field
+ * 0x 30 - Image Offset
+ * 0x 34 - Image Size
+ * 0x 38 - Reserved (0x00000000) (according to spec)
+ * * FSBL defines this field for Image Destination Address.
+ * 0x 3C - Image Load
+ * 0x 40 - Image Stored Size
+ * 0x 44 - Reserved (0x00000000) (according to spec)
+ * * FSBL defines this field for QSPI configuration Data.
+ * 0x 48 - Checksum
+ * 0x 4c - Unused (21 words)
+ * ...
+ * 0x 9c
+ * 0x a0 - Register Initialization, 256 Address and Data word pairs
+ * * List is terminated with an address of 0xffffffff or
+ * ... * at the max number of entries
+ * 0x89c
+ * 0x8a0 - Unused (8 words)
+ * ...
+ * 0x8bf
+ * 0x8c0 - Data/Image starts here or above
+ */
+
+#include "imagetool.h"
+#include "mkimage.h"
+#include <image.h>
+
+#define HEADER_INTERRUPT_DEFAULT (cpu_to_le32(0xeafffffe))
+#define HEADER_REGINIT_NULL (cpu_to_le32(0xffffffff))
+#define HEADER_WIDTHDETECTION (cpu_to_le32(0xaa995566))
+#define HEADER_IMAGEIDENTIFIER (cpu_to_le32(0x584c4e58))
+
+enum {
+ ENCRYPTION_EFUSE = 0xa5c3c5a3,
+ ENCRYPTION_BBRAM = 0x3a5c3c5a,
+ ENCRYPTION_NONE = 0x0,
+};
+
+struct zynq_reginit {
+ uint32_t address;
+ uint32_t data;
+};
+
+#define HEADER_INTERRUPT_VECTORS 8
+#define HEADER_REGINITS 256
+
+struct zynq_header {
+ uint32_t interrupt_vectors[HEADER_INTERRUPT_VECTORS]; /* 0x0 */
+ uint32_t width_detection; /* 0x20 */
+ uint32_t image_identifier; /* 0x24 */
+ uint32_t encryption; /* 0x28 */
+ uint32_t user_field; /* 0x2c */
+ uint32_t image_offset; /* 0x30 */
+ uint32_t image_size; /* 0x34 */
+ uint32_t __reserved1; /* 0x38 */
+ uint32_t image_load; /* 0x3c */
+ uint32_t image_stored_size; /* 0x40 */
+ uint32_t __reserved2; /* 0x44 */
+ uint32_t checksum; /* 0x48 */
+ uint32_t __reserved3[21]; /* 0x4c */
+ struct zynq_reginit register_init[HEADER_REGINITS]; /* 0xa0 */
+ uint32_t __reserved4[8]; /* 0x8a0 */
+};
+
+static struct zynq_header zynqimage_header;
+
+static uint32_t zynqimage_checksum(struct zynq_header *ptr)
+{
+ uint32_t checksum = 0;
+
+ if (ptr == NULL)
+ return 0;
+
+ checksum += le32_to_cpu(ptr->width_detection);
+ checksum += le32_to_cpu(ptr->image_identifier);
+ checksum += le32_to_cpu(ptr->encryption);
+ checksum += le32_to_cpu(ptr->user_field);
+ checksum += le32_to_cpu(ptr->image_offset);
+ checksum += le32_to_cpu(ptr->image_size);
+ checksum += le32_to_cpu(ptr->__reserved1);
+ checksum += le32_to_cpu(ptr->image_load);
+ checksum += le32_to_cpu(ptr->image_stored_size);
+ checksum += le32_to_cpu(ptr->__reserved2);
+ checksum = ~checksum;
+
+ return cpu_to_le32(checksum);
+}
+
+static void zynqimage_default_header(struct zynq_header *ptr)
+{
+ int i;
+
+ if (ptr == NULL)
+ return;
+
+ ptr->width_detection = HEADER_WIDTHDETECTION;
+ ptr->image_identifier = HEADER_IMAGEIDENTIFIER;
+ ptr->encryption = cpu_to_le32(ENCRYPTION_NONE);
+
+ /* Setup not-supported/constant/reserved fields */
+ for (i = 0; i < HEADER_INTERRUPT_VECTORS; i++)
+ ptr->interrupt_vectors[i] = HEADER_INTERRUPT_DEFAULT;
+
+ for (i = 0; i < HEADER_REGINITS; i++) {
+ ptr->register_init[i].address = HEADER_REGINIT_NULL;
+ ptr->register_init[i].data = HEADER_REGINIT_NULL;
+ }
+
+ /*
+ * Certain reserved fields are required to be set to 0, ensure they are
+ * set as such.
+ */
+ ptr->__reserved1 = 0x0;
+ ptr->__reserved2 = 0x0;
+}
+
+/* mkimage glue functions */
+static int zynqimage_verify_header(unsigned char *ptr, int image_size,
+ struct image_tool_params *params)
+{
+ struct zynq_header *zynqhdr = (struct zynq_header *)ptr;
+
+ if (image_size < sizeof(struct zynq_header))
+ return -1;
+
+ if (zynqhdr->width_detection != HEADER_WIDTHDETECTION)
+ return -1;
+ if (zynqhdr->image_identifier != HEADER_IMAGEIDENTIFIER)
+ return -1;
+
+ if (zynqimage_checksum(zynqhdr) != zynqhdr->checksum)
+ return -1;
+
+ return 0;
+}
+
+static void zynqimage_print_header(const void *ptr)
+{
+ struct zynq_header *zynqhdr = (struct zynq_header *)ptr;
+ int i;
+
+ printf("Image Type : Xilinx Zynq Boot Image support\n");
+ printf("Image Offset : 0x%08x\n", le32_to_cpu(zynqhdr->image_offset));
+ printf("Image Size : %lu bytes (%lu bytes packed)\n",
+ (unsigned long)le32_to_cpu(zynqhdr->image_size),
+ (unsigned long)le32_to_cpu(zynqhdr->image_stored_size));
+ printf("Image Load : 0x%08x\n", le32_to_cpu(zynqhdr->image_load));
+ printf("User Field : 0x%08x\n", le32_to_cpu(zynqhdr->user_field));
+ printf("Checksum : 0x%08x\n", le32_to_cpu(zynqhdr->checksum));
+
+ for (i = 0; i < HEADER_INTERRUPT_VECTORS; i++) {
+ if (zynqhdr->interrupt_vectors[i] == HEADER_INTERRUPT_DEFAULT)
+ continue;
+
+ printf("Modified Interrupt Vector Address [%d]: 0x%08x\n", i,
+ le32_to_cpu(zynqhdr->interrupt_vectors[i]));
+ }
+
+ for (i = 0; i < HEADER_REGINITS; i++) {
+ if (zynqhdr->register_init[i].address == HEADER_REGINIT_NULL)
+ break;
+
+ if (i == 0)
+ printf("Custom Register Initialization:\n");
+
+ printf(" @ 0x%08x -> 0x%08x\n",
+ le32_to_cpu(zynqhdr->register_init[i].address),
+ le32_to_cpu(zynqhdr->register_init[i].data));
+ }
+}
+
+static int zynqimage_check_params(struct image_tool_params *params)
+{
+ if (!params)
+ return 0;
+
+ if (params->addr != 0x0) {
+ fprintf(stderr, "Error: Load Address cannot be specified.\n");
+ return -1;
+ }
+
+ /*
+ * If the entry point is specified ensure it is 64 byte aligned.
+ */
+ if (params->eflag && (params->ep % 64 != 0)) {
+ fprintf(stderr,
+ "Error: Entry Point must be aligned to a 64-byte boundary.\n");
+ return -1;
+ }
+
+ return !((params->lflag || params->dflag) ||
+ (params->dflag && params->eflag));
+}
+
+static int zynqimage_check_image_types(uint8_t type)
+{
+ if (type == IH_TYPE_ZYNQIMAGE)
+ return EXIT_SUCCESS;
+ return EXIT_FAILURE;
+}
+
+static void zynqimage_set_header(void *ptr, struct stat *sbuf, int ifd,
+ struct image_tool_params *params)
+{
+ struct zynq_header *zynqhdr = (struct zynq_header *)ptr;
+ zynqimage_default_header(zynqhdr);
+
+ /* place image directly after header */
+ zynqhdr->image_offset =
+ cpu_to_le32((uint32_t)sizeof(struct zynq_header));
+ zynqhdr->image_size = cpu_to_le32((uint32_t)sbuf->st_size);
+ zynqhdr->image_stored_size = zynqhdr->image_size;
+ zynqhdr->image_load = 0x0;
+ if (params->eflag)
+ zynqhdr->image_load = cpu_to_le32((uint32_t)params->ep);
+
+ zynqhdr->checksum = zynqimage_checksum(zynqhdr);
+}
+
+U_BOOT_IMAGE_TYPE(
+ zynqimage,
+ "Xilinx Zynq Boot Image support",
+ sizeof(struct zynq_header),
+ (void *)&zynqimage_header,
+ zynqimage_check_params,
+ zynqimage_verify_header,
+ zynqimage_print_header,
+ zynqimage_set_header,
+ NULL,
+ zynqimage_check_image_types,
+ NULL,
+ NULL
+);