]> git.sur5r.net Git - u-boot/commitdiff
Merge git://git.denx.de/u-boot-fdt
authorTom Rini <trini@konsulko.com>
Sun, 4 Jun 2017 17:13:29 +0000 (13:13 -0400)
committerTom Rini <trini@konsulko.com>
Sun, 4 Jun 2017 17:13:29 +0000 (13:13 -0400)
233 files changed:
README
arch/Kconfig
arch/arm/Kconfig
arch/arm/cpu/armv8/fsl-layerscape/Kconfig
arch/arm/cpu/armv8/fsl-layerscape/cpu.c
arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c
arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S
arch/arm/cpu/armv8/fsl-layerscape/ppa.c
arch/arm/cpu/armv8/fsl-layerscape/soc.c
arch/arm/cpu/armv8/fsl-layerscape/spl.c
arch/arm/cpu/armv8/sec_firmware.c
arch/arm/cpu/armv8/start.S
arch/arm/dts/Makefile
arch/arm/dts/sun50i-a64-bananapi-m64.dts [new file with mode: 0644]
arch/arm/dts/sun50i-a64-pine64-common.dtsi [deleted file]
arch/arm/dts/sun50i-a64-pine64-plus-u-boot.dtsi [new file with mode: 0644]
arch/arm/dts/sun50i-a64-pine64-plus.dts
arch/arm/dts/sun50i-a64-pine64.dts
arch/arm/dts/sun50i-a64.dtsi
arch/arm/dts/sun50i-h5-orangepi-pc2.dts
arch/arm/dts/sun50i-h5-orangepi-prime.dts [new file with mode: 0644]
arch/arm/dts/sun50i-h5.dtsi [new file with mode: 0644]
arch/arm/dts/sun8i-h3-nanopi-m1.dts [new file with mode: 0644]
arch/arm/dts/sun8i-h3-nanopi-neo.dts
arch/arm/dts/sun8i-h3-nanopi.dtsi [new file with mode: 0644]
arch/arm/include/asm/arch-fsl-layerscape/config.h
board/freescale/common/ns_access.c
board/freescale/ls2080a/ls2080a.c
board/freescale/ls2080aqds/MAINTAINERS
board/freescale/ls2080aqds/README
board/freescale/ls2080aqds/eth.c
board/freescale/ls2080aqds/ls2080aqds.c
board/freescale/ls2080ardb/eth_ls2080rdb.c
board/sunxi/MAINTAINERS
board/ti/common/Kconfig
cmd/Kconfig
common/spl/Kconfig
configs/Sinlinx_SinA33_defconfig
configs/am335x_baltos_defconfig
configs/am335x_evm_nor_defconfig
configs/am335x_igep003x_defconfig
configs/am335x_shc_defconfig
configs/am335x_shc_ict_defconfig
configs/am335x_shc_netboot_defconfig
configs/am335x_shc_prompt_defconfig
configs/am335x_shc_sdboot_defconfig
configs/am335x_shc_sdboot_prompt_defconfig
configs/am335x_sl50_defconfig
configs/am43xx_evm_ethboot_defconfig
configs/am43xx_evm_qspiboot_defconfig
configs/am43xx_evm_usbhost_boot_defconfig
configs/am57xx_evm_nodt_defconfig
configs/apalis_imx6_defconfig
configs/apalis_imx6_nospl_com_defconfig
configs/apalis_imx6_nospl_it_defconfig
configs/at91sam9m10g45ek_mmc_defconfig
configs/at91sam9n12ek_mmc_defconfig
configs/at91sam9rlek_mmc_defconfig
configs/at91sam9x5ek_mmc_defconfig
configs/bananapi_m64_defconfig [new file with mode: 0644]
configs/bcm958622hr_defconfig
configs/birdland_bav335a_defconfig
configs/birdland_bav335b_defconfig
configs/brppt1_mmc_defconfig
configs/brppt1_nand_defconfig
configs/brppt1_spi_defconfig
configs/brxre1_defconfig
configs/cairo_defconfig
configs/chiliboard_defconfig
configs/cl-som-am57x_defconfig
configs/cm_t335_defconfig
configs/cm_t43_defconfig
configs/cm_t54_defconfig
configs/colibri_imx6_defconfig
configs/colibri_imx6_nospl_defconfig
configs/ds109_defconfig
configs/duovero_defconfig
configs/gurnard_defconfig
configs/hikey_defconfig
configs/igep0020_defconfig
configs/igep0030_defconfig
configs/igep0032_defconfig
configs/kzm9g_defconfig
configs/ls1021aiot_qspi_defconfig
configs/ls1021aiot_sdcard_defconfig
configs/ls1043ardb_sdcard_defconfig
configs/ls1046aqds_nand_defconfig
configs/ls1046aqds_sdcard_ifc_defconfig
configs/ls1046aqds_sdcard_qspi_defconfig
configs/ls1046ardb_emmc_defconfig
configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
configs/ls1046ardb_sdcard_defconfig
configs/ls2080aqds_nand_defconfig
configs/ls2080aqds_sdcard_defconfig [new file with mode: 0644]
configs/ls2080ardb_nand_defconfig
configs/m28evk_defconfig
configs/m53evk_defconfig
configs/ma5d4evk_defconfig
configs/mx7ulp_evk_defconfig
configs/mx7ulp_evk_plugin_defconfig
configs/nanopi_m1_defconfig [new file with mode: 0644]
configs/novena_defconfig
configs/omap3_beagle_defconfig
configs/omap3_overo_defconfig
configs/omap3_pandora_defconfig
configs/omap3_zoom1_defconfig
configs/omap4_panda_defconfig
configs/omap4_sdp4430_defconfig
configs/omap5_uevm_defconfig
configs/omapl138_lcdk_defconfig
configs/orangepi_prime_defconfig [new file with mode: 0644]
configs/pcm051_rev1_defconfig
configs/pcm051_rev3_defconfig
configs/pengwyn_defconfig
configs/pepper_defconfig
configs/pic32mzdask_defconfig
configs/picosam9g45_defconfig
configs/r8a7795_salvator-x_defconfig
configs/r8a7796_salvator-x_defconfig
configs/s5p_goni_defconfig
configs/sama5d2_ptc_nandflash_defconfig
configs/sama5d2_ptc_spiflash_defconfig
configs/sama5d2_xplained_mmc_defconfig
configs/sama5d36ek_cmp_mmc_defconfig
configs/sama5d36ek_cmp_nandflash_defconfig
configs/sama5d36ek_cmp_spiflash_defconfig
configs/sama5d3_xplained_mmc_defconfig
configs/sama5d3_xplained_nandflash_defconfig
configs/sama5d3xek_mmc_defconfig
configs/sama5d3xek_nandflash_defconfig
configs/sama5d3xek_spiflash_defconfig
configs/sama5d4_xplained_mmc_defconfig
configs/sama5d4ek_mmc_defconfig
configs/zynq_zc770_xm011_defconfig
configs/zynq_zc770_xm012_defconfig
configs/zynq_zc770_xm013_defconfig
drivers/net/Kconfig
drivers/net/cpsw.c
drivers/net/designware.c
drivers/net/fm/ls1043.c
drivers/net/fm/ls1046.c
drivers/net/fsl-mc/mc.c
drivers/net/macb.c
drivers/net/mvpp2.c
drivers/net/pch_gbe.c
drivers/net/phy/Kconfig
drivers/net/phy/marvell.c
drivers/net/zynq_gem.c
drivers/qe/qe.c
fs/fat/Kconfig
include/config_fallbacks.h
include/configs/am43xx_evm.h
include/configs/apalis-tk1.h
include/configs/apalis_imx6.h
include/configs/apalis_t30.h
include/configs/at91-sama5_common.h
include/configs/at91sam9m10g45ek.h
include/configs/at91sam9n12ek.h
include/configs/at91sam9rlek.h
include/configs/at91sam9x5ek.h
include/configs/bcm23550_w1d.h
include/configs/bcm28155_ap.h
include/configs/bcm_ep_board.h
include/configs/brppt1.h
include/configs/brxre1.h
include/configs/colibri_imx6.h
include/configs/colibri_t20.h
include/configs/colibri_t30.h
include/configs/devkit8000.h
include/configs/ds109.h
include/configs/etamin.h
include/configs/exynos-common.h
include/configs/hikey.h
include/configs/k2e_evm.h
include/configs/k2g_evm.h
include/configs/k2hk_evm.h
include/configs/k2l_evm.h
include/configs/ls1021aiot.h
include/configs/ls1021aqds.h
include/configs/ls1021atwr.h
include/configs/ls1043a_common.h
include/configs/ls1043ardb.h
include/configs/ls2080a_common.h
include/configs/ls2080aqds.h
include/configs/m28evk.h
include/configs/m53evk.h
include/configs/ma5d4evk.h
include/configs/mx7ulp_evk.h
include/configs/novena.h
include/configs/pic32mzdask.h
include/configs/picosam9g45.h
include/configs/rcar-gen2-common.h
include/configs/rcar-gen3-common.h
include/configs/rk3036_common.h
include/configs/rk3188_common.h
include/configs/rk3288_common.h
include/configs/rk3328_common.h
include/configs/rk3399_common.h
include/configs/rpi.h
include/configs/s5p_goni.h
include/configs/sama5d2_ptc.h
include/configs/sama5d3_xplained.h
include/configs/sama5d3xek.h
include/configs/sandbox.h
include/configs/siemens-am33x-common.h
include/configs/snapper9g45.h
include/configs/socfpga_arria10_socdk.h
include/configs/socfpga_arria5_socdk.h
include/configs/socfpga_cyclone5_socdk.h
include/configs/socfpga_de0_nano_soc.h
include/configs/socfpga_de10_nano.h
include/configs/socfpga_de1_soc.h
include/configs/socfpga_is1.h
include/configs/socfpga_mcvevk.h
include/configs/socfpga_sockit.h
include/configs/socfpga_socrates.h
include/configs/socfpga_sr1500.h
include/configs/socfpga_vining_fpga.h
include/configs/sunxi-common.h
include/configs/tegra-common-post.h
include/configs/tegra-common.h
include/configs/ti816x_evm.h
include/configs/ti_armv7_common.h
include/configs/ti_armv7_keystone2.h
include/configs/uniphier.h
include/configs/xilinx_zynqmp.h
include/configs/zynq-common.h
include/dt-bindings/clock/sun50i-a64-ccu.h [new file with mode: 0644]
include/dt-bindings/reset/sun50i-a64-ccu.h [new file with mode: 0644]
include/fat.h
include/fsl-mc/fsl_mc.h
net/eth-uclass.c
scripts/config_whitelist.txt

diff --git a/README b/README
index 77d46d2b42e0856d92e8c3280e1172c3f608f4c3..075d919df3fee00e6c486e65344b1c1d61338422 100644 (file)
--- a/README
+++ b/README
@@ -840,7 +840,6 @@ The following options need to be configured:
                                          that work for multiple fs types
                CONFIG_CMD_FS_UUID      * Look up a filesystem UUID
                CONFIG_CMD_SAVEENV        saveenv
-               CONFIG_CMD_FAT          * FAT command support
                CONFIG_CMD_FLASH          flinfo, erase, protect
                CONFIG_CMD_FPGA           FPGA device initialization support
                CONFIG_CMD_GO           * the 'go' command (exec code)
@@ -1065,8 +1064,6 @@ The following options need to be configured:
 - Partition Labels (disklabels) Supported:
                Zero or more of the following:
                CONFIG_MAC_PARTITION   Apple's MacOS partition table.
-               CONFIG_DOS_PARTITION   MS Dos partition table, traditional on the
-                                      Intel architecture, USB sticks, etc.
                CONFIG_ISO_PARTITION   ISO partition table, used on CDROM etc.
                CONFIG_EFI_PARTITION   GPT partition table, common when EFI is the
                                       bootloader.  Note 2TB partition limit; see
@@ -1519,21 +1516,6 @@ The following options need to be configured:
                CONFIG_SYS_JFFS2_FIRST_BANK, CONFIG_SYS_JFFS2_NUM_BANKS
                Define these for a default partition on a NOR device
 
-- FAT(File Allocation Table) filesystem write function support:
-               CONFIG_FAT_WRITE
-
-               Define this to enable support for saving memory data as a
-               file in FAT formatted partition.
-
-               This will also enable the command "fatwrite" enabling the
-               user to write files to FAT.
-
-- FAT(File Allocation Table) filesystem cluster size:
-               CONFIG_FS_FAT_MAX_CLUSTSIZE
-
-               Define the max cluster size for fat operations else
-               a default value of 65536 will be defined.
-
 - Keyboard Support:
                See Kconfig help for available keyboard drivers.
 
@@ -3870,7 +3852,7 @@ but it can not erase, write this NOR flash by SRIO or PCIE interface.
          environment.
 
        - CONFIG_FAT_WRITE:
-         This should be defined. Otherwise it cannot save the environment file.
+         This must be enabled. Otherwise it cannot save the environment file.
 
 - CONFIG_ENV_IS_IN_MMC:
 
index e0e4e8486c067467bfb44d1e044cecf5fe6a0a04..e44767113db2f3d27645acd3e3e7da6601375562 100644 (file)
@@ -70,14 +70,15 @@ config SANDBOX
        select DM_SPI
        select DM_GPIO
        select DM_MMC
-       imply CRC32_VERIFY
        imply CMD_GETTIME
        imply CMD_HASH
        imply CMD_IO
        imply CMD_IOTRACE
-       imply LZMA
        imply CMD_LZMADEC
+       imply CRC32_VERIFY
+       imply FAT_WRITE
        imply HASH_VERIFY
+       imply LZMA
 
 config SH
        bool "SuperH architecture"
index a8118ce0dfbdd0505869e61986dc9806579e9ac2..deb7b246823a8a843f35c57470eeb83ebdcd2b09 100644 (file)
@@ -477,6 +477,7 @@ config ARCH_BCM283X
        select DM_SERIAL
        select DM_GPIO
        select OF_CONTROL
+       imply FAT_WRITE
 
 config TARGET_VEXPRESS_CA15_TC2
        bool "Support vexpress_ca15_tc2"
@@ -496,17 +497,20 @@ config TARGET_BCM23550_W1D
        bool "Support bcm23550_w1d"
        select CPU_V7
        imply CRC32_VERIFY
+       imply FAT_WRITE
 
 config TARGET_BCM28155_AP
        bool "Support bcm28155_ap"
        select CPU_V7
        imply CRC32_VERIFY
+       imply FAT_WRITE
 
 config TARGET_BCMCYGNUS
        bool "Support bcmcygnus"
        select CPU_V7
        imply CRC32_VERIFY
        imply CMD_HASH
+       imply FAT_WRITE
        imply HASH_VERIFY
 
 config TARGET_BCMNSP
@@ -530,6 +534,7 @@ config ARCH_EXYNOS
        select DM_SPI
        select DM_GPIO
        select DM_KEYBOARD
+       imply FAT_WRITE
 
 config ARCH_S5PC1XX
        bool "Samsung S5PC1XX"
@@ -602,6 +607,7 @@ config ARCH_RMOBILE
        select DM
        select DM_SERIAL
        select BOARD_EARLY_INIT_F
+       imply FAT_WRITE
        imply SYS_THUMB_BUILD
 
 config TARGET_S32V234EVB
@@ -634,6 +640,7 @@ config ARCH_SOCFPGA
        select SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
        select SYS_THUMB_BUILD
        imply CRC32_VERIFY
+       imply FAT_WRITE
 
 config ARCH_SUNXI
        bool "Support sunxi (Allwinner) SoCs"
@@ -657,6 +664,7 @@ config ARCH_SUNXI
        select USB_STORAGE if DISTRO_DEFAULTS
        select USB_KEYBOARD if DISTRO_DEFAULTS
        select USE_TINY_PRINTF
+       imply FAT_WRITE
        imply PRE_CONSOLE_BUFFER
        imply SPL_GPIO_SUPPORT
        imply SPL_LIBCOMMON_SUPPORT
@@ -700,6 +708,7 @@ config ARCH_ZYNQ
        select SPL_CLK
        select CLK_ZYNQ
        imply CMD_CLK
+       imply FAT_WRITE
 
 config ARCH_ZYNQMP
        bool "Support Xilinx ZynqMP Platform"
@@ -713,9 +722,11 @@ config ARCH_ZYNQMP
        select SPL_BOARD_INIT if SPL
        select SPL_CLK
        select DM_USB if USB
+       imply FAT_WRITE
 
 config TEGRA
        bool "NVIDIA Tegra"
+       imply FAT_WRITE
 
 config TARGET_VEXPRESS64_AEMV8A
        bool "Support vexpress_aemv8a"
@@ -974,6 +985,7 @@ config ARCH_UNIPHIER
        select SPL_OF_CONTROL if SPL
        select SPL_PINCTRL if SPL
        select SUPPORT_SPL
+       imply FAT_WRITE
        help
          Support for UniPhier SoC family developed by Socionext Inc.
          (formerly, System LSI Business Division of Panasonic Corporation)
@@ -1016,6 +1028,7 @@ config ARCH_ROCKCHIP
        select DM_USB if USB
        select DM_PWM
        select DM_REGULATOR
+       imply FAT_WRITE
 
 config TARGET_THUNDERX_88XX
        bool "Support ThunderX 88xx"
index fa386c6896287b89f8f06731e501875baf5efe17..d8b285dcd7318cdb2ecc69f27be2e0b09404bd3b 100644 (file)
@@ -135,6 +135,19 @@ config FSL_LS_PPA
          which is loaded during boot stage, and then remains resident in RAM
          and runs in the TrustZone after boot.
          Say y to enable it.
+
+config SPL_FSL_LS_PPA
+       bool "FSL Layerscape PPA firmware support for SPL build"
+       depends on !ARMV8_PSCI
+       select SPL_ARMV8_SEC_FIRMWARE_SUPPORT
+       select SEC_FIRMWARE_ARMV8_PSCI
+       select ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT if FSL_LSCH2
+       help
+         The FSL Primary Protected Application (PPA) is a software component
+         which is loaded during boot stage, and then remains resident in RAM
+         and runs in the TrustZone after boot. This is to load PPA during SPL
+         stage instead of the RAM version of U-Boot. Once PPA is initialized,
+         the rest of U-Boot (including RAM version) runs at EL2.
 choice
        prompt "FSL Layerscape PPA firmware loading-media select"
        depends on FSL_LS_PPA
index cba0095e6a1d92449b46d5fc6ab7cb85a7cf4a1c..cb3a52c711b35f008da0ac8f6a1e71e9a14cfe93 100644 (file)
@@ -244,6 +244,14 @@ u64 get_page_table_size(void)
 
 int arch_cpu_init(void)
 {
+       /*
+        * This function is called before U-Boot relocates itself to speed up
+        * on system running. It is not necessary to run if performance is not
+        * critical. Skip if MMU is already enabled by SPL or other means.
+        */
+       if (get_sctlr() & CR_M)
+               return 0;
+
        icache_enable();
        __asm_invalidate_dcache_all();
        __asm_invalidate_tlb_all();
@@ -464,7 +472,7 @@ int cpu_eth_init(bd_t *bis)
 {
        int error = 0;
 
-#ifdef CONFIG_FSL_MC_ENET
+#if defined(CONFIG_FSL_MC_ENET) && !defined(CONFIG_SPL_BUILD)
        error = fsl_mc_ldpaa_init(bis);
 #endif
 #ifdef CONFIG_FMAN_ENET
@@ -530,7 +538,8 @@ int timer_init(void)
        unsigned long cntfrq = COUNTER_FREQUENCY_REAL;
 
        /* Update with accurate clock frequency */
-       asm volatile("msr cntfrq_el0, %0" : : "r" (cntfrq) : "memory");
+       if (current_el() == 3)
+               asm volatile("msr cntfrq_el0, %0" : : "r" (cntfrq) : "memory");
 #endif
 
 #ifdef CONFIG_FSL_LSCH3
@@ -608,7 +617,7 @@ phys_size_t board_reserve_ram_top(phys_size_t ram_size)
 {
        phys_size_t ram_top = ram_size;
 
-#ifdef CONFIG_FSL_MC_ENET
+#if defined(CONFIG_FSL_MC_ENET) && !defined(CONFIG_SPL_BUILD)
        /* The start address of MC reserved memory needs to be aligned. */
        ram_top -= mc_get_dram_block_size();
        ram_top &= ~(CONFIG_SYS_MC_RSV_MEM_ALIGN - 1);
@@ -723,7 +732,7 @@ int dram_init_banksize(void)
        }
 #endif /* CONFIG_SYS_MEM_RESERVE_SECURE */
 
-#ifdef CONFIG_FSL_MC_ENET
+#if defined(CONFIG_FSL_MC_ENET) && !defined(CONFIG_SPL_BUILD)
        /* Assign memory for MC */
 #ifdef CONFIG_SYS_DDR_BLOCK3_BASE
        if (gd->bd->bi_dram[2].size >=
index 955e0b747854383a1de097f886d7aafae30fbf48..ef97556367c1b055120b573bbeafd43b1a5cf378 100644 (file)
@@ -18,7 +18,7 @@ static u8 serdes1_prtcl_map[SERDES_PRCTL_COUNT];
 static u8 serdes2_prtcl_map[SERDES_PRCTL_COUNT];
 #endif
 
-#ifdef CONFIG_FSL_MC_ENET
+#if defined(CONFIG_FSL_MC_ENET) && !defined(CONFIG_SPL_BUILD)
 int xfi_dpmac[XFI8 + 1];
 int sgmii_dpmac[SGMII16 + 1];
 #endif
@@ -110,7 +110,7 @@ void serdes_init(u32 sd, u32 sd_addr, u32 rcwsr, u32 sd_prctl_mask,
                        debug("Unknown SerDes lane protocol %d\n", lane_prtcl);
                else {
                        serdes_prtcl_map[lane_prtcl] = 1;
-#ifdef CONFIG_FSL_MC_ENET
+#if defined(CONFIG_FSL_MC_ENET) && !defined(CONFIG_SPL_BUILD)
                        switch (lane_prtcl) {
                        case QSGMII_A:
                        case QSGMII_B:
@@ -141,7 +141,7 @@ void serdes_init(u32 sd, u32 sd_addr, u32 rcwsr, u32 sd_prctl_mask,
 
 void fsl_serdes_init(void)
 {
-#ifdef CONFIG_FSL_MC_ENET
+#if defined(CONFIG_FSL_MC_ENET) && !defined(CONFIG_SPL_BUILD)
        int i , j;
 
        for (i = XFI1, j = 1; i <= XFI8; i++, j++)
index f4273561040f9deede84f2c0bb5d99a907b09b3b..619d9b7a0eda718bcb3ab7a5fc44e634e8ac870b 100644 (file)
@@ -73,6 +73,9 @@ ENDPROC(smp_kick_all_cpus)
 ENTRY(lowlevel_init)
        mov     x29, lr                 /* Save LR */
 
+       switch_el x1, 1f, 100f, 100f    /* skip if not in EL3 */
+1:
+
 #ifdef CONFIG_FSL_LSCH3
 
        /* Set Wuo bit for RN-I 20 */
@@ -193,6 +196,7 @@ ENTRY(lowlevel_init)
 #endif
 #endif
 
+100:
        branch_if_master x0, x1, 2f
 
 #if defined(CONFIG_MP) && defined(CONFIG_ARMV8_MULTIENTRY)
@@ -201,6 +205,8 @@ ENTRY(lowlevel_init)
 #endif
 
 2:
+       switch_el x1, 1f, 100f, 100f    /* skip if not in EL3 */
+1:
 #ifdef CONFIG_FSL_TZPC_BP147
        /* Set Non Secure access for all devices protected via TZPC */
        ldr     x1, =TZPCDECPROT_0_SET_BASE /* Decode Protection-0 Set Reg */
@@ -266,8 +272,11 @@ ENTRY(lowlevel_init)
        isb
        dsb     sy
 #endif
+100:
 1:
 #ifdef CONFIG_ARCH_LS1046A
+       switch_el x1, 1f, 100f, 100f    /* skip if not in EL3 */
+1:
        /* Initialize the L2 RAM latency */
        mrs   x1, S3_1_c11_c0_2
        mov   x0, #0x1C7
@@ -279,6 +288,7 @@ ENTRY(lowlevel_init)
        orr   x1,  x1, #0x80
        msr   S3_1_c11_c0_2, x1
        isb
+100:
 #endif
 
 #if defined(CONFIG_FSL_LSCH2) && !defined(CONFIG_SPL_BUILD)
@@ -379,11 +389,14 @@ ENTRY(__asm_flush_l3_dcache)
        /*
         * Return status in x0
         *    success 0
-        *    tmeout 1 for setting SFONLY, 2 for FAM, 3 for both
+        *    timeout 1 for setting SFONLY, 2 for FAM, 3 for both
         */
        mov     x29, lr
        mov     x8, #0
 
+       switch_el x0, 1f, 100f, 100f    /* skip if not in EL3 */
+
+1:
        dsb     sy
        mov     x0, #0x1                /* HNFPSTAT_SFONLY */
        bl      hnf_set_pstate
@@ -401,6 +414,7 @@ ENTRY(__asm_flush_l3_dcache)
        bl      hnf_pstate_poll
        cbz     x0, 1f
        add     x8, x8, #0x2
+100:
 1:
        mov     x0, x8
        mov     lr, x29
index 26c47a183c668c4f8754d7727230704b10646b37..35c612df05181ea7301a578cb7db30d7de202100 100644 (file)
@@ -32,6 +32,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int ppa_init(void)
 {
+       unsigned int el = current_el();
        void *ppa_fit_addr;
        u32 *boot_loc_ptr_l, *boot_loc_ptr_h;
        int ret;
@@ -45,6 +46,12 @@ int ppa_init(void)
 #endif
 #endif
 
+       /* Skip if running at lower exception level */
+       if (el < 3) {
+               debug("Skipping PPA init, running at EL%d\n", el);
+               return 0;
+       }
+
 #ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP
        ppa_fit_addr = (void *)CONFIG_SYS_LS_PPA_FW_ADDR;
        debug("%s: PPA image load from XIP\n", __func__);
index 9e3cdd78af5b6f70fffc9298801c69331f599462..0943e833d740a10efed6da9b42b016629e2b26f2 100644 (file)
@@ -134,7 +134,7 @@ void erratum_a009635(void)
 
 static void erratum_rcw_src(void)
 {
-#if defined(CONFIG_SPL)
+#if defined(CONFIG_SPL) && defined(CONFIG_NAND_BOOT)
        u32 __iomem *dcfg_ccsr = (u32 __iomem *)DCFG_BASE;
        u32 __iomem *dcfg_dcsr = (u32 __iomem *)DCFG_DCSR_BASE;
        u32 val;
@@ -288,6 +288,10 @@ static void erratum_a008850_early(void)
        struct ccsr_cci400 __iomem *cci = (void *)CONFIG_SYS_CCI400_ADDR;
        struct ccsr_ddr __iomem *ddr = (void *)CONFIG_SYS_FSL_DDR_ADDR;
 
+       /* Skip if running at lower exception level */
+       if (current_el() < 3)
+               return;
+
        /* disables propagation of barrier transactions to DDRC from CCI400 */
        out_le32(&cci->ctrl_ord, CCI400_CTRLORD_TERM_BARRIER);
 
@@ -304,6 +308,10 @@ void erratum_a008850_post(void)
        struct ccsr_ddr __iomem *ddr = (void *)CONFIG_SYS_FSL_DDR_ADDR;
        u32 tmp;
 
+       /* Skip if running at lower exception level */
+       if (current_el() < 3)
+               return;
+
        /* enable propagation of barrier transactions to DDRC from CCI400 */
        out_le32(&cci->ctrl_ord, CCI400_CTRLORD_EN_BARRIER);
 
@@ -455,8 +463,10 @@ void fsl_lsch2_early_init_f(void)
         * Enable snoop requests and DVM message requests for
         * Slave insterface S4 (A53 core cluster)
         */
-       out_le32(&cci->slave[4].snoop_ctrl,
-                CCI400_DVM_MESSAGE_REQ_EN | CCI400_SNOOP_REQ_EN);
+       if (current_el() == 3) {
+               out_le32(&cci->slave[4].snoop_ctrl,
+                        CCI400_DVM_MESSAGE_REQ_EN | CCI400_SNOOP_REQ_EN);
+       }
 
        /* Erratum */
        erratum_a008850_early(); /* part 1 of 2 */
index eb730e84a46d58b3442eef404a4df4f7d87bfcfb..2776240be38bef1ae93c80861b22d953426c44dc 100644 (file)
@@ -9,6 +9,9 @@
 #include <asm/io.h>
 #include <fsl_ifc.h>
 #include <i2c.h>
+#include <fsl_csu.h>
+#include <asm/arch/fdt.h>
+#include <asm/arch/ppa.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -57,6 +60,12 @@ void spl_board_init(void)
        val = (in_le32(SMMU_NSCR0) | SCR0_CLIENTPD_MASK) & ~(SCR0_USFCFG_MASK);
        out_le32(SMMU_NSCR0, val);
 #endif
+#ifdef CONFIG_LAYERSCAPE_NS_ACCESS
+       enable_layerscape_ns_access();
+#endif
+#ifdef CONFIG_SPL_FSL_LS_PPA
+       ppa_init();
+#endif
 }
 
 void board_init_f(ulong dummy)
@@ -76,5 +85,35 @@ void board_init_f(ulong dummy)
        i2c_init_all();
 #endif
        dram_init();
-}
+#ifdef CONFIG_SPL_FSL_LS_PPA
+#ifndef CONFIG_SYS_MEM_RESERVE_SECURE
+#error Need secure RAM for PPA
 #endif
+       /*
+        * Secure memory location is determined in dram_init_banksize().
+        * gd->ram_size is deducted by the size of secure ram.
+        */
+       dram_init_banksize();
+
+       /*
+        * After dram_init_bank_size(), we know U-Boot only uses the first
+        * memory bank regardless how big the memory is.
+        */
+       gd->ram_top = gd->bd->bi_dram[0].start + gd->bd->bi_dram[0].size;
+
+       /*
+        * If PPA is loaded, U-Boot will resume running at EL2.
+        * Cache and MMU will be enabled. Need a place for TLB.
+        * U-Boot will be relocated to the end of available memory
+        * in first bank. At this point, we cannot know how much
+        * memory U-Boot uses. Put TLB table lower by SPL_TLB_SETBACK
+        * to avoid overlapping. As soon as the RAM version U-Boot sets
+        * up new MMU, this space is no longer needed.
+        */
+       gd->ram_top -= SPL_TLB_SETBACK;
+       gd->arch.tlb_size = PGTABLE_SIZE;
+       gd->arch.tlb_addr = (gd->ram_top - gd->arch.tlb_size) & ~(0x10000 - 1);
+       gd->arch.tlb_allocated = gd->arch.tlb_addr;
+#endif /* CONFIG_SPL_FSL_LS_PPA */
+}
+#endif /* CONFIG_SPL_BUILD */
index 4afa3ad8b1dcefc6deb6115b464998fd897c9b72..fffce712d38b99d3e739a5970b275d2138aee8e8 100644 (file)
@@ -224,7 +224,7 @@ __weak bool sec_firmware_is_valid(const void *sec_firmware_img)
  */
 unsigned int sec_firmware_support_psci_version(void)
 {
-       if (sec_firmware_addr & SEC_FIRMWARE_RUNNING)
+       if (current_el() == SEC_FIRMWARE_TARGET_EL)
                return _sec_firmware_support_psci_version();
 
        return PSCI_INVALID_VER;
index 354468b9053d5e03d7ca8d513ce33623abd47c32..5c500be51d1f5fb616e04539e5fd2cb9e7287e3b 100644 (file)
@@ -91,9 +91,12 @@ save_boot_params_ret:
         * this bit should be set for A53/A57/A72.
         */
 #ifdef CONFIG_ARMV8_SET_SMPEN
+       switch_el x1, 3f, 1f, 1f
+3:
        mrs     x0, S3_1_c15_c2_1               /* cpuectlr_el1 */
        orr     x0, x0, #0x40
        msr     S3_1_c15_c2_1, x0
+1:
 #endif
 
        /* Apply ARM core specific erratas */
index 2b1a4e926e2f6667973bb378469be2a8b030bd43..b95920a3ec9ca1a0bcc5dae08d2a495a4dd25566 100644 (file)
@@ -309,6 +309,7 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \
        sun8i-h3-orangepi-pc-plus.dtb \
        sun8i-h3-orangepi-plus.dtb \
        sun8i-h3-orangepi-plus2e.dtb \
+       sun8i-h3-nanopi-m1.dtb \
        sun8i-h3-nanopi-neo.dtb \
        sun8i-h3-nanopi-neo-air.dtb
 dtb-$(CONFIG_MACH_SUN8I_R40) += \
@@ -316,8 +317,10 @@ dtb-$(CONFIG_MACH_SUN8I_R40) += \
 dtb-$(CONFIG_MACH_SUN8I_V3S) += \
        sun8i-v3s-licheepi-zero.dtb
 dtb-$(CONFIG_MACH_SUN50I_H5) += \
-       sun50i-h5-orangepi-pc2.dtb
+       sun50i-h5-orangepi-pc2.dtb \
+       sun50i-h5-orangepi-prime.dtb
 dtb-$(CONFIG_MACH_SUN50I) += \
+       sun50i-a64-bananapi-m64.dtb \
        sun50i-a64-pine64-plus.dtb \
        sun50i-a64-pine64.dtb
 dtb-$(CONFIG_MACH_SUN9I) += \
diff --git a/arch/arm/dts/sun50i-a64-bananapi-m64.dts b/arch/arm/dts/sun50i-a64-bananapi-m64.dts
new file mode 100644 (file)
index 0000000..02db114
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2016 ARM Ltd.
+ * Copyright (C) 2017 Jagan Teki <jteki@openedev.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This library is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+
+#include "sun50i-a64.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+       model = "BananaPi-M64";
+       compatible = "sinovoip,bananapi-m64", "allwinner,sun50i-a64";
+
+       aliases {
+               serial0 = &uart0;
+               serial1 = &uart1;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       reg_vcc3v3: vcc3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+};
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins>;
+       status = "okay";
+};
+
+&i2c1_pins {
+       bias-pull-up;
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins>;
+       vmmc-supply = <&reg_vcc3v3>;
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
+       cd-inverted;
+       disable-wp;
+       bus-width = <4>;
+       status = "okay";
+};
+
+&mmc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+};
+
+&mmc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc2_pins>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <8>;
+       non-removable;
+       cap-mmc-hw-reset;
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_a>;
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+       status = "okay";
+};
diff --git a/arch/arm/dts/sun50i-a64-pine64-common.dtsi b/arch/arm/dts/sun50i-a64-pine64-common.dtsi
deleted file mode 100644 (file)
index 9ec81c6..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2016 ARM Ltd.
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This library is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This library is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "sun50i-a64.dtsi"
-
-/ {
-
-       aliases {
-               serial0 = &uart0;
-               ethernet0 = &emac;
-       };
-
-       soc {
-               reg_vcc3v3: vcc3v3 {
-                       compatible = "regulator-fixed";
-                       regulator-name = "vcc3v3";
-                       regulator-min-microvolt = <3300000>;
-                       regulator-max-microvolt = <3300000>;
-               };
-       };
-};
-
-&mmc0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&mmc0_pins>, <&mmc0_default_cd_pin>;
-       vmmc-supply = <&reg_vcc3v3>;
-       cd-gpios = <&pio 5 6 0>;
-       cd-inverted;
-       status = "okay";
-};
-
-&uart0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&uart0_pins_a>;
-       status = "okay";
-};
-
-&i2c1 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&i2c1_pins>;
-       status = "okay";
-};
-
-&usbphy {
-       status = "okay";
-};
-
-&ohci1 {
-       status = "okay";
-};
-
-&ehci1 {
-       status = "okay";
-};
diff --git a/arch/arm/dts/sun50i-a64-pine64-plus-u-boot.dtsi b/arch/arm/dts/sun50i-a64-pine64-plus-u-boot.dtsi
new file mode 100644 (file)
index 0000000..9c61bea
--- /dev/null
@@ -0,0 +1,50 @@
+/ {
+       aliases {
+               ethernet0 = &emac;
+       };
+
+       soc {
+               emac: ethernet@01c30000 {
+                       compatible = "allwinner,sun50i-a64-emac";
+                       reg = <0x01c30000 0x2000>, <0x01c00030 0x4>;
+                       reg-names = "emac", "syscon";
+                       interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
+                       resets = <&ccu RST_BUS_EMAC>;
+                       reset-names = "ahb";
+                       clocks = <&ccu CLK_BUS_EMAC>;
+                       clock-names = "ahb";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&rgmii_pins>;
+                       phy-mode = "rgmii";
+                       phy = <&phy1>;
+                       status = "okay";
+
+                       phy1: ethernet-phy@1 {
+                               reg = <1>;
+                       };
+               };
+       };
+};
+
+&pio {
+       rmii_pins: rmii_pins {
+               allwinner,pins = "PD10", "PD11", "PD13", "PD14",
+                                "PD17", "PD18", "PD19", "PD20",
+                                "PD22", "PD23";
+               allwinner,function = "emac";
+               allwinner,drive = <3>;
+               allwinner,pull = <0>;
+       };
+
+       rgmii_pins: rgmii_pins {
+               allwinner,pins = "PD8", "PD9", "PD10", "PD11",
+                                "PD12", "PD13", "PD15",
+                                "PD16", "PD17", "PD18", "PD19",
+                                "PD20", "PD21", "PD22", "PD23";
+               allwinner,function = "emac";
+               allwinner,drive = <3>;
+               allwinner,pull = <0>;
+       };
+};
index 389c6096ca149734af69b9d9549b72073841d475..790d14daaa6a68f2b6ebe40594c5e78baea3f52a 100644 (file)
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
-/dts-v1/;
-
-#include "sun50i-a64-pine64-common.dtsi"
+#include "sun50i-a64-pine64.dts"
 
 / {
        model = "Pine64+";
        compatible = "pine64,pine64-plus", "allwinner,sun50i-a64";
 
-       chosen {
-               stdout-path = "serial0:115200n8";
-       };
-
-       /* There is a model with 2GB of DRAM, but U-Boot fixes this for us. */
-       memory {
-               reg = <0x40000000 0x40000000>;
-       };
-};
-
-&emac {
-       pinctrl-names = "default";
-       pinctrl-0 = <&rgmii_pins>;
-       phy-mode = "rgmii";
-       phy = <&phy1>;
-       status = "okay";
-
-       phy1: ethernet-phy@1 {
-       reg = <1>;
-       };
+       /* TODO: Camera, Ethernet PHY, touchscreen, etc. */
 };
-
index ebe029e8a8d77cbe91cb9d714a416d65cb3599ee..c680ed385da3565da0291e325b5429fcb1e3eeec 100644 (file)
 
 /dts-v1/;
 
-#include "sun50i-a64-pine64-common.dtsi"
+#include "sun50i-a64.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
 
 / {
        model = "Pine64";
        compatible = "pine64,pine64", "allwinner,sun50i-a64";
 
+       aliases {
+               serial0 = &uart0;
+       };
+
        chosen {
                stdout-path = "serial0:115200n8";
        };
 
-       memory {
-               reg = <0x40000000 0x20000000>;
+       reg_vcc3v3: vcc3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
        };
 };
+
+&ehci1 {
+       status = "okay";
+};
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins>;
+       status = "okay";
+};
+
+&i2c1_pins {
+       bias-pull-up;
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins>;
+       vmmc-supply = <&reg_vcc3v3>;
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
+       cd-inverted;
+       disable-wp;
+       bus-width = <4>;
+       status = "okay";
+};
+
+&ohci1 {
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_a>;
+       status = "okay";
+};
+
+&usb_otg {
+       dr_mode = "host";
+       status = "okay";
+};
+
+&usbphy {
+       status = "okay";
+};
index bef0d00be8b23e9a4118f4b87d28e81c36d408f5..c7f669f5884f910c6e4be44ac1dd09a216cb97f0 100644 (file)
@@ -42,8 +42,9 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include <dt-bindings/clock/sun50i-a64-ccu.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
-#include <dt-bindings/pinctrl/sun4i-a10.h>
+#include <dt-bindings/reset/sun50i-a64-ccu.h>
 
 / {
        interrupt-parent = <&gic>;
                #address-cells = <1>;
                #size-cells = <0>;
 
-               cpu@0 {
+               cpu0: cpu@0 {
                        compatible = "arm,cortex-a53", "arm,armv8";
                        device_type = "cpu";
                        reg = <0>;
                        enable-method = "psci";
                };
 
-               cpu@1 {
+               cpu1: cpu@1 {
                        compatible = "arm,cortex-a53", "arm,armv8";
                        device_type = "cpu";
                        reg = <1>;
                        enable-method = "psci";
                };
 
-               cpu@2 {
+               cpu2: cpu@2 {
                        compatible = "arm,cortex-a53", "arm,armv8";
                        device_type = "cpu";
                        reg = <2>;
                        enable-method = "psci";
                };
 
-               cpu@3 {
+               cpu3: cpu@3 {
                        compatible = "arm,cortex-a53", "arm,armv8";
                        device_type = "cpu";
                        reg = <3>;
                };
        };
 
-       psci {
-               compatible = "arm,psci-0.2";
-               method = "smc";
+       osc24M: osc24M_clk {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <24000000>;
+               clock-output-names = "osc24M";
+       };
+
+       osc32k: osc32k_clk {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <32768>;
+               clock-output-names = "osc32k";
        };
 
-       memory {
-               device_type = "memory";
-               reg = <0x40000000 0>;
+       iosc: internal-osc-clk {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <16000000>;
+               clock-accuracy = <300000000>;
+               clock-output-names = "iosc";
        };
 
-       gic: interrupt-controller@1c81000 {
-               compatible = "arm,gic-400";
-               interrupt-controller;
-               #interrupt-cells = <3>;
-               #address-cells = <0>;
-
-               reg = <0x01c81000 0x1000>,
-                     <0x01c82000 0x2000>,
-                     <0x01c84000 0x2000>,
-                     <0x01c86000 0x2000>;
-               interrupts = <GIC_PPI 9
-                     (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
+       psci {
+               compatible = "arm,psci-0.2";
+               method = "smc";
        };
 
        timer {
                        (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
        };
 
-       clocks {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               osc24M: osc24M_clk {
-                       #clock-cells = <0>;
-                       compatible = "fixed-clock";
-                       clock-frequency = <24000000>;
-                       clock-output-names = "osc24M";
-               };
-
-               osc32k: osc32k_clk {
-                       #clock-cells = <0>;
-                       compatible = "fixed-clock";
-                       clock-frequency = <32768>;
-                       clock-output-names = "osc32k";
-               };
-
-               pll1: pll1_clk@1c20000 {
-                       #clock-cells = <0>;
-                       compatible = "allwinner,sun8i-a23-pll1-clk";
-                       reg = <0x01c20000 0x4>;
-                       clocks = <&osc24M>;
-                       clock-output-names = "pll1";
-               };
-
-               pll6: pll6_clk@1c20028 {
-                       #clock-cells = <1>;
-                       compatible = "allwinner,sun6i-a31-pll6-clk";
-                       reg = <0x01c20028 0x4>;
-                       clocks = <&osc24M>;
-                       clock-output-names = "pll6", "pll6x2";
-               };
-
-               pll6d2: pll6d2_clk {
-                       #clock-cells = <0>;
-                       compatible = "fixed-factor-clock";
-                       clock-div = <2>;
-                       clock-mult = <1>;
-                       clocks = <&pll6 0>;
-                       clock-output-names = "pll6d2";
-               };
-
-               pll7: pll7_clk@1c2002c {
-                       #clock-cells = <1>;
-                       compatible = "allwinner,sun6i-a31-pll6-clk";
-                       reg = <0x01c2002c 0x4>;
-                       clocks = <&osc24M>;
-                       clock-output-names = "pll7", "pll7x2";
-               };
-
-               cpu: cpu_clk@1c20050 {
-                       #clock-cells = <0>;
-                       compatible = "allwinner,sun4i-a10-cpu-clk";
-                       reg = <0x01c20050 0x4>;
-                       clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>;
-                       clock-output-names = "cpu";
-                       critical-clocks = <0>;
-               };
-
-               axi: axi_clk@1c20050 {
-                       #clock-cells = <0>;
-                       compatible = "allwinner,sun4i-a10-axi-clk";
-                       reg = <0x01c20050 0x4>;
-                       clocks = <&cpu>;
-                       clock-output-names = "axi";
-               };
-
-               ahb1: ahb1_clk@1c20054 {
-                       #clock-cells = <0>;
-                       compatible = "allwinner,sun6i-a31-ahb1-clk";
-                       reg = <0x01c20054 0x4>;
-                       clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6 0>;
-                       clock-output-names = "ahb1";
-               };
-
-               ahb2: ahb2_clk@1c2005c {
-                       #clock-cells = <0>;
-                       compatible = "allwinner,sun8i-h3-ahb2-clk";
-                       reg = <0x01c2005c 0x4>;
-                       clocks = <&ahb1>, <&pll6d2>;
-                       clock-output-names = "ahb2";
-               };
-
-               apb1: apb1_clk@1c20054 {
-                       #clock-cells = <0>;
-                       compatible = "allwinner,sun4i-a10-apb0-clk";
-                       reg = <0x01c20054 0x4>;
-                       clocks = <&ahb1>;
-                       clock-output-names = "apb1";
-               };
-
-               apb2: apb2_clk@1c20058 {
-                       #clock-cells = <0>;
-                       compatible = "allwinner,sun4i-a10-apb1-clk";
-                       reg = <0x01c20058 0x4>;
-                       clocks = <&osc32k>, <&osc24M>, <&pll6 1>, <&pll6 1>;
-                       clock-output-names = "apb2";
-               };
-
-               bus_gates: bus_gates_clk@1c20060 {
-                       #clock-cells = <1>;
-                       compatible = "allwinner,sun50i-a64-bus-gates-clk",
-                                    "allwinner,sunxi-multi-bus-gates-clk";
-                       reg = <0x01c20060 0x14>;
-                       ahb1_parent {
-                               clocks = <&ahb1>;
-                               clock-indices = <1>, <5>,
-                                               <6>, <8>,
-                                               <9>, <10>,
-                                               <13>, <14>,
-                                               <18>, <19>,
-                                               <20>, <21>,
-                                               <23>, <24>,
-                                               <25>, <28>,
-                                               <32>, <35>,
-                                               <36>, <37>,
-                                               <40>, <43>,
-                                               <44>, <52>,
-                                               <53>, <54>,
-                                               <135>;
-                               clock-output-names = "bus_mipidsi", "bus_ce",
-                                               "bus_dma", "bus_mmc0",
-                                               "bus_mmc1", "bus_mmc2",
-                                               "bus_nand", "bus_sdram",
-                                               "bus_ts", "bus_hstimer",
-                                               "bus_spi0", "bus_spi1",
-                                               "bus_otg", "bus_otg_ehci0",
-                                               "bus_ehci0", "bus_otg_ohci0",
-                                               "bus_ve", "bus_lcd0",
-                                               "bus_lcd1", "bus_deint",
-                                               "bus_csi", "bus_hdmi",
-                                               "bus_de", "bus_gpu",
-                                               "bus_msgbox", "bus_spinlock",
-                                               "bus_dbg";
-                       };
-                       ahb2_parent {
-                               clocks = <&ahb2>;
-                               clock-indices = <17>, <29>;
-                               clock-output-names = "bus_gmac", "bus_ohci0";
-                       };
-                       apb1_parent {
-                               clocks = <&apb1>;
-                               clock-indices = <64>, <65>,
-                                               <69>, <72>,
-                                               <76>, <77>,
-                                               <78>;
-                               clock-output-names = "bus_codec", "bus_spdif",
-                                               "bus_pio", "bus_ths",
-                                               "bus_i2s0", "bus_i2s1",
-                                               "bus_i2s2";
-                       };
-                       abp2_parent {
-                               clocks = <&apb2>;
-                               clock-indices = <96>, <97>,
-                                               <98>, <101>,
-                                               <112>, <113>,
-                                               <114>, <115>,
-                                               <116>;
-                               clock-output-names = "bus_i2c0", "bus_i2c1",
-                                               "bus_i2c2", "bus_scr",
-                                               "bus_uart0", "bus_uart1",
-                                               "bus_uart2", "bus_uart3",
-                                               "bus_uart4";
-                       };
-               };
-
-               mmc0_clk: mmc0_clk@1c20088 {
-                       #clock-cells = <0>;
-                       compatible = "allwinner,sun4i-a10-mod0-clk";
-                       reg = <0x01c20088 0x4>;
-                       clocks = <&osc24M>, <&pll6 1>, <&pll7 1>;
-                       clock-output-names = "mmc0";
-                };
-
-               mmc1_clk: mmc1_clk@1c2008c {
-                       #clock-cells = <0>;
-                       compatible = "allwinner,sun4i-a10-mod0-clk";
-                       reg = <0x01c2008c 0x4>;
-                       clocks = <&osc24M>, <&pll6 1>, <&pll7 1>;
-                       clock-output-names = "mmc1";
-               };
-
-               mmc2_clk: mmc2_clk@1c20090 {
-                       #clock-cells = <0>;
-                       compatible = "allwinner,sun4i-a10-mod0-clk";
-                       reg = <0x01c20090 0x4>;
-                       clocks = <&osc24M>, <&pll6 1>, <&pll7 1>;
-                       clock-output-names = "mmc2";
-               };
-       };
-
        soc {
                compatible = "simple-bus";
                #address-cells = <1>;
                ranges;
 
                mmc0: mmc@1c0f000 {
-                       compatible = "allwinner,sun50i-a64-mmc",
-                                    "allwinner,sun5i-a13-mmc";
+                       compatible = "allwinner,sun50i-a64-mmc";
                        reg = <0x01c0f000 0x1000>;
-                       clocks = <&bus_gates 8>, <&mmc0_clk>,
-                                <&mmc0_clk>, <&mmc0_clk>;
-                       clock-names = "ahb", "mmc",
-                                     "output", "sample";
-                       resets = <&ahb_rst 8>;
+                       clocks = <&ccu CLK_BUS_MMC0>, <&ccu CLK_MMC0>;
+                       clock-names = "ahb", "mmc";
+                       resets = <&ccu RST_BUS_MMC0>;
                        reset-names = "ahb";
                        interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
+                       max-frequency = <150000000>;
                        status = "disabled";
                        #address-cells = <1>;
                        #size-cells = <0>;
                };
 
                mmc1: mmc@1c10000 {
-                       compatible = "allwinner,sun50i-a64-mmc",
-                                    "allwinner,sun5i-a13-mmc";
+                       compatible = "allwinner,sun50i-a64-mmc";
                        reg = <0x01c10000 0x1000>;
-                       clocks = <&bus_gates 9>, <&mmc1_clk>,
-                                <&mmc1_clk>, <&mmc1_clk>;
-                       clock-names = "ahb", "mmc",
-                                     "output", "sample";
-                       resets = <&ahb_rst 9>;
+                       clocks = <&ccu CLK_BUS_MMC1>, <&ccu CLK_MMC1>;
+                       clock-names = "ahb", "mmc";
+                       resets = <&ccu RST_BUS_MMC1>;
                        reset-names = "ahb";
                        interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
+                       max-frequency = <150000000>;
                        status = "disabled";
                        #address-cells = <1>;
                        #size-cells = <0>;
                };
 
                mmc2: mmc@1c11000 {
-                       compatible = "allwinner,sun50i-a64-mmc",
-                                    "allwinner,sun5i-a13-mmc";
+                       compatible = "allwinner,sun50i-a64-emmc";
                        reg = <0x01c11000 0x1000>;
-                       clocks = <&bus_gates 10>, <&mmc2_clk>,
-                                <&mmc2_clk>, <&mmc2_clk>;
-                       clock-names = "ahb", "mmc",
-                                     "output", "sample";
-                       resets = <&ahb_rst 10>;
+                       clocks = <&ccu CLK_BUS_MMC2>, <&ccu CLK_MMC2>;
+                       clock-names = "ahb", "mmc";
+                       resets = <&ccu RST_BUS_MMC2>;
                        reset-names = "ahb";
                        interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
+                       max-frequency = <200000000>;
                        status = "disabled";
                        #address-cells = <1>;
                        #size-cells = <0>;
                };
 
+               usb_otg: usb@01c19000 {
+                       compatible = "allwinner,sun8i-a33-musb";
+                       reg = <0x01c19000 0x0400>;
+                       clocks = <&ccu CLK_BUS_OTG>;
+                       resets = <&ccu RST_BUS_OTG>;
+                       interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "mc";
+                       phys = <&usbphy 0>;
+                       phy-names = "usb";
+                       extcon = <&usbphy 0>;
+                       status = "disabled";
+               };
+
+               usbphy: phy@01c19400 {
+                       compatible = "allwinner,sun50i-a64-usb-phy";
+                       reg = <0x01c19400 0x14>,
+                             <0x01c1a800 0x4>,
+                             <0x01c1b800 0x4>;
+                       reg-names = "phy_ctrl",
+                                   "pmu0",
+                                   "pmu1";
+                       clocks = <&ccu CLK_USB_PHY0>,
+                                <&ccu CLK_USB_PHY1>;
+                       clock-names = "usb0_phy",
+                                     "usb1_phy";
+                       resets = <&ccu RST_USB_PHY0>,
+                                <&ccu RST_USB_PHY1>;
+                       reset-names = "usb0_reset",
+                                     "usb1_reset";
+                       status = "disabled";
+                       #phy-cells = <1>;
+               };
+
+               ehci1: usb@01c1b000 {
+                       compatible = "allwinner,sun50i-a64-ehci", "generic-ehci";
+                       reg = <0x01c1b000 0x100>;
+                       interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_OHCI1>,
+                                <&ccu CLK_BUS_EHCI1>,
+                                <&ccu CLK_USB_OHCI1>;
+                       resets = <&ccu RST_BUS_OHCI1>,
+                                <&ccu RST_BUS_EHCI1>;
+                       phys = <&usbphy 1>;
+                       phy-names = "usb";
+                       status = "disabled";
+               };
+
+               ohci1: usb@01c1b400 {
+                       compatible = "allwinner,sun50i-a64-ohci", "generic-ohci";
+                       reg = <0x01c1b400 0x100>;
+                       interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_OHCI1>,
+                                <&ccu CLK_USB_OHCI1>;
+                       resets = <&ccu RST_BUS_OHCI1>;
+                       phys = <&usbphy 1>;
+                       phy-names = "usb";
+                       status = "disabled";
+               };
+
+               ccu: clock@01c20000 {
+                       compatible = "allwinner,sun50i-a64-ccu";
+                       reg = <0x01c20000 0x400>;
+                       clocks = <&osc24M>, <&osc32k>;
+                       clock-names = "hosc", "losc";
+                       #clock-cells = <1>;
+                       #reset-cells = <1>;
+               };
+
                pio: pinctrl@1c20800 {
                        compatible = "allwinner,sun50i-a64-pinctrl";
                        reg = <0x01c20800 0x400>;
                        interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&bus_gates 69>;
+                       clocks = <&ccu 58>;
                        gpio-controller;
                        #gpio-cells = <3>;
                        interrupt-controller;
-                       #interrupt-cells = <2>;
-
-                       uart0_pins_a: uart0@0 {
-                               allwinner,pins = "PB8", "PB9";
-                               allwinner,function = "uart0";
-                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-                       };
-
-                       uart0_pins_b: uart0@1 {
-                               allwinner,pins = "PF2", "PF3";
-                               allwinner,function = "uart0";
-                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-                       };
-
-                       uart1_2pins: uart1_2@0 {
-                               allwinner,pins = "PG6", "PG7";
-                               allwinner,function = "uart1";
-                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-                       };
-
-                       uart1_4pins: uart1_4@0 {
-                               allwinner,pins = "PG6", "PG7", "PG8", "PG9";
-                               allwinner,function = "uart1";
-                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-                       };
-
-                       uart2_2pins: uart2_2@0 {
-                               allwinner,pins = "PB0", "PB1";
-                               allwinner,function = "uart2";
-                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-                       };
-
-                       uart2_4pins: uart2_4@0 {
-                               allwinner,pins = "PB0", "PB1", "PB2", "PB3";
-                               allwinner,function = "uart2";
-                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-                       };
-
-                       uart3_pins_a: uart3@0 {
-                               allwinner,pins = "PD0", "PD1";
-                               allwinner,function = "uart3";
-                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-                       };
-
-                       uart3_2pins_b: uart3_2@1 {
-                               allwinner,pins = "PH4", "PH5";
-                               allwinner,function = "uart3";
-                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-                       };
+                       #interrupt-cells = <3>;
 
-                       uart3_4pins_b: uart3_4@1 {
-                               allwinner,pins = "PH4", "PH5", "PH6", "PH7";
-                               allwinner,function = "uart3";
-                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-                       };
-
-                       uart4_2pins: uart4_2@0 {
-                               allwinner,pins = "PD2", "PD3";
-                               allwinner,function = "uart4";
-                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-                       };
-
-                       uart4_4pins: uart4_4@0 {
-                               allwinner,pins = "PD2", "PD3", "PD4", "PD5";
-                               allwinner,function = "uart4";
-                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-                       };
-
-                       mmc0_pins: mmc0@0 {
-                               allwinner,pins = "PF0", "PF1", "PF2", "PF3",
-                                                "PF4", "PF5";
-                               allwinner,function = "mmc0";
-                               allwinner,drive = <SUN4I_PINCTRL_30_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-                       };
-
-                       mmc0_default_cd_pin: mmc0_cd_pin@0 {
-                               allwinner,pins = "PF6";
-                               allwinner,function = "gpio_in";
-                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-                       };
-
-                       mmc1_pins: mmc1@0 {
-                               allwinner,pins = "PG0", "PG1", "PG2", "PG3",
-                                                "PG4", "PG5";
-                               allwinner,function = "mmc1";
-                               allwinner,drive = <SUN4I_PINCTRL_30_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       i2c1_pins: i2c1_pins {
+                               pins = "PH2", "PH3";
+                               function = "i2c1";
                        };
 
-                       mmc2_pins: mmc2@0 {
-                               allwinner,pins = "PC1", "PC5", "PC6", "PC8",
-                                                "PC9", "PC10";
-                               allwinner,function = "mmc2";
-                               allwinner,drive = <SUN4I_PINCTRL_30_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       mmc0_pins: mmc0-pins {
+                               pins = "PF0", "PF1", "PF2", "PF3",
+                                      "PF4", "PF5";
+                               function = "mmc0";
+                               drive-strength = <30>;
+                               bias-pull-up;
                        };
 
-                       i2c0_pins: i2c0_pins {
-                               allwinner,pins = "PH0", "PH1";
-                               allwinner,function = "i2c0";
-                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       mmc1_pins: mmc1-pins {
+                               pins = "PG0", "PG1", "PG2", "PG3",
+                                      "PG4", "PG5";
+                               function = "mmc1";
+                               drive-strength = <30>;
+                               bias-pull-up;
                        };
 
-                       i2c1_pins: i2c1_pins {
-                               allwinner,pins = "PH2", "PH3";
-                               allwinner,function = "i2c1";
-                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       mmc2_pins: mmc2-pins {
+                               pins = "PC1", "PC5", "PC6", "PC8", "PC9",
+                                      "PC10","PC11", "PC12", "PC13",
+                                      "PC14", "PC15", "PC16";
+                               function = "mmc2";
+                               drive-strength = <30>;
+                               bias-pull-up;
                        };
 
-                       i2c2_pins: i2c2_pins {
-                               allwinner,pins = "PE14", "PE15";
-                               allwinner,function = "i2c2";
-                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       uart0_pins_a: uart0@0 {
+                               pins = "PB8", "PB9";
+                               function = "uart0";
                        };
 
-                       rmii_pins: rmii_pins {
-                               allwinner,pins = "PD10", "PD11", "PD13", "PD14",
-                                                "PD17", "PD18", "PD19", "PD20",
-                                                "PD22", "PD23";
-                               allwinner,function = "emac";
-                               allwinner,drive = <SUN4I_PINCTRL_40_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       uart1_pins: uart1_pins {
+                               pins = "PG6", "PG7";
+                               function = "uart1";
                        };
 
-                       rgmii_pins: rgmii_pins {
-                               allwinner,pins = "PD8", "PD9", "PD10", "PD11",
-                                                "PD12", "PD13", "PD15",
-                                                "PD16", "PD17", "PD18", "PD19",
-                                                "PD20", "PD21", "PD22", "PD23";
-                               allwinner,function = "emac";
-                               allwinner,drive = <SUN4I_PINCTRL_40_MA>;
-                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       uart1_rts_cts_pins: uart1_rts_cts_pins {
+                               pins = "PG8", "PG9";
+                               function = "uart1";
                        };
                };
 
-               ahb_rst: reset@1c202c0 {
-                       #reset-cells = <1>;
-                       compatible = "allwinner,sun6i-a31-clock-reset";
-                       reg = <0x01c202c0 0xc>;
-               };
-
-               apb1_rst: reset@1c202d0 {
-                       #reset-cells = <1>;
-                       compatible = "allwinner,sun6i-a31-clock-reset";
-                       reg = <0x01c202d0 0x4>;
-               };
-
-               apb2_rst: reset@1c202d8 {
-                       #reset-cells = <1>;
-                       compatible = "allwinner,sun6i-a31-clock-reset";
-                       reg = <0x01c202d8 0x4>;
-               };
-
                uart0: serial@1c28000 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x01c28000 0x400>;
                        interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
-                       clocks = <&bus_gates 112>;
-                       resets = <&apb2_rst 16>;
+                       clocks = <&ccu 67>;
+                       resets = <&ccu 46>;
                        status = "disabled";
                };
 
                        interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
-                       clocks = <&bus_gates 113>;
-                       resets = <&apb2_rst 17>;
+                       clocks = <&ccu 68>;
+                       resets = <&ccu 47>;
                        status = "disabled";
                };
 
                        interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
-                       clocks = <&bus_gates 114>;
-                       resets = <&apb2_rst 18>;
+                       clocks = <&ccu 69>;
+                       resets = <&ccu 48>;
                        status = "disabled";
                };
 
                        interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
-                       clocks = <&bus_gates 115>;
-                       resets = <&apb2_rst 19>;
+                       clocks = <&ccu 70>;
+                       resets = <&ccu 49>;
                        status = "disabled";
                };
 
                        interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
-                       clocks = <&bus_gates 116>;
-                       resets = <&apb2_rst 20>;
+                       clocks = <&ccu 71>;
+                       resets = <&ccu 50>;
                        status = "disabled";
                };
 
-               rtc: rtc@1f00000 {
-                       compatible = "allwinner,sun6i-a31-rtc";
-                       reg = <0x01f00000 0x54>;
-                       interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
-                                    <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
-               };
-
                i2c0: i2c@1c2ac00 {
                        compatible = "allwinner,sun6i-a31-i2c";
                        reg = <0x01c2ac00 0x400>;
                        interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&bus_gates 96>;
-                       resets = <&apb2_rst 0>;
+                       clocks = <&ccu 63>;
+                       resets = <&ccu 42>;
                        status = "disabled";
                        #address-cells = <1>;
                        #size-cells = <0>;
                        compatible = "allwinner,sun6i-a31-i2c";
                        reg = <0x01c2b000 0x400>;
                        interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&bus_gates 97>;
-                       resets = <&apb2_rst 1>;
+                       clocks = <&ccu 64>;
+                       resets = <&ccu 43>;
                        status = "disabled";
                        #address-cells = <1>;
                        #size-cells = <0>;
                        compatible = "allwinner,sun6i-a31-i2c";
                        reg = <0x01c2b400 0x400>;
                        interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&bus_gates 98>;
-                       resets = <&apb2_rst 2>;
+                       clocks = <&ccu 65>;
+                       resets = <&ccu 44>;
                        status = "disabled";
                        #address-cells = <1>;
                        #size-cells = <0>;
                };
 
-               emac: ethernet@01c30000 {
-                       compatible = "allwinner,sun50i-a64-emac";
-                       reg = <0x01c30000 0x2000>, <0x01c00030 0x4>;
-                       reg-names = "emac", "syscon";
-                       interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
-                       resets = <&ahb_rst 17>;
-                       reset-names = "ahb";
-                       clocks = <&bus_gates 17>;
-                       clock-names = "ahb";
-                       status = "disabled";
-                       #address-cells = <1>;
-                       #size-cells = <0>;
+               gic: interrupt-controller@1c81000 {
+                       compatible = "arm,gic-400";
+                       reg = <0x01c81000 0x1000>,
+                             <0x01c82000 0x2000>,
+                             <0x01c84000 0x2000>,
+                             <0x01c86000 0x2000>;
+                       interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
+                       interrupt-controller;
+                       #interrupt-cells = <3>;
                };
 
-               usbphy: phy@1c1b810 {
-                       compatible = "allwinner,sun50i-a64-usb-phy",
-                                    "allwinner,sun8i-a33-usb-phy";
-                       reg = <0x01c1b810 0x14>, <0x01c1b800 0x4>;
-                       reg-names = "phy_ctrl", "pmu1";
-                       status = "disabled";
-                       #phy-cells = <1>;
+               rtc: rtc@1f00000 {
+                       compatible = "allwinner,sun6i-a31-rtc";
+                       reg = <0x01f00000 0x54>;
+                       interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
                };
 
-               ehci1: usb@01c1b000 {
-                       compatible = "allwinner,sun50i-a64-ehci",
-                                    "generic-ehci";
-                       reg = <0x01c1b000 0x100>;
-                       interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
-                       phys = <&usbphy 1>;
-                       phy-names = "usb";
-                       status = "disabled";
+               r_ccu: clock@1f01400 {
+                       compatible = "allwinner,sun50i-a64-r-ccu";
+                       reg = <0x01f01400 0x100>;
+                       clocks = <&osc24M>, <&osc32k>, <&iosc>;
+                       clock-names = "hosc", "losc", "iosc";
+                       #clock-cells = <1>;
+                       #reset-cells = <1>;
                };
 
-               ohci1: usb@01c1b400 {
-                       compatible = "allwinner,sun50i-a64-ohci",
-                                    "generic-ohci";
-                       reg = <0x01c1b400 0x100>;
-                       interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
-                       phys = <&usbphy 1>;
-                       phy-names = "usb";
-                       status = "enabled";
+               r_pio: pinctrl@01f02c00 {
+                       compatible = "allwinner,sun50i-a64-r-pinctrl";
+                       reg = <0x01f02c00 0x400>;
+                       interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&r_ccu 3>, <&osc24M>, <&osc32k>;
+                       clock-names = "apb", "hosc", "losc";
+                       gpio-controller;
+                       #gpio-cells = <3>;
+                       interrupt-controller;
+                       #interrupt-cells = <3>;
                };
        };
 };
index de60f783d3a6047c58058c61ef000685e0edcb06..780d59a0960cc9611dbec1c716e29d36e4552f69 100644 (file)
 
 /dts-v1/;
 
-#include "sun8i-h3.dtsi"
+#include "sun50i-h5.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
 
 / {
        model = "OrangePi PC 2";
        compatible = "xunlong,orangepi-pc-2", "allwinner,sun50i-h5";
 
-       cpus {
-               cpu@0 {
-                       compatible = "arm,cortex-a53", "arm,armv8";
-                       enable-method = "psci";
-               };
-               cpu@1 {
-                       compatible = "arm,cortex-a53", "arm,armv8";
-                       enable-method = "psci";
-               };
-               cpu@2 {
-                       compatible = "arm,cortex-a53", "arm,armv8";
-                       enable-method = "psci";
-               };
-               cpu@3 {
-                       compatible = "arm,cortex-a53", "arm,armv8";
-                       enable-method = "psci";
-               };
-       };
-
-       psci {
-               compatible = "arm,psci-0.2";
-               method = "smc";
-       };
-
-       timer {
-               compatible = "arm,armv8-timer";
-       };
-
        chosen {
                stdout-path = "serial0:115200n8";
        };
        };
 };
 
-&gic {
-       compatible = "arm,gic-400";
-};
-
 &mmc0 {
        compatible = "allwinner,sun50i-h5-mmc",
                     "allwinner,sun50i-a64-mmc",
        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
-       cd-gpios = <&pio 5 6 0>;
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
        cd-inverted;
        status = "okay";
 };
diff --git a/arch/arm/dts/sun50i-h5-orangepi-prime.dts b/arch/arm/dts/sun50i-h5-orangepi-prime.dts
new file mode 100644 (file)
index 0000000..67eade7
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2017 Jagan Teki <jteki@openedev.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This library is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+
+#include "sun50i-h5.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+       model = "OrangePi Prime";
+       compatible = "xunlong,orangepi-prime", "allwinner,sun50i-h5";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       memory {
+               reg = <0x40000000 0x80000000>;
+       };
+
+       soc {
+               reg_vcc3v3: vcc3v3 {
+                       compatible = "regulator-fixed";
+                       regulator-name = "vcc3v3";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+               };
+       };
+};
+
+&mmc0 {
+       compatible = "allwinner,sun50i-h5-mmc",
+                    "allwinner,sun50i-a64-mmc",
+                    "allwinner,sun5i-a13-mmc";
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
+       cd-inverted;
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_a>;
+       status = "okay";
+};
+
+&usbphy {
+       status = "okay";
+};
+
+&ohci1 {
+       status = "okay";
+};
+
+&ehci1 {
+       status = "okay";
+};
diff --git a/arch/arm/dts/sun50i-h5.dtsi b/arch/arm/dts/sun50i-h5.dtsi
new file mode 100644 (file)
index 0000000..4904c18
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2016 ARM Ltd.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This library is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "sun8i-h3.dtsi"
+
+/ {
+       cpus {
+               cpu@0 {
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       enable-method = "psci";
+               };
+               cpu@1 {
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       enable-method = "psci";
+               };
+               cpu@2 {
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       enable-method = "psci";
+               };
+               cpu@3 {
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       enable-method = "psci";
+               };
+       };
+
+       psci {
+               compatible = "arm,psci-0.2";
+               method = "smc";
+       };
+
+       timer {
+               compatible = "arm,armv8-timer";
+       };
+};
+
+&gic {
+       compatible = "arm,gic-400";
+};
diff --git a/arch/arm/dts/sun8i-h3-nanopi-m1.dts b/arch/arm/dts/sun8i-h3-nanopi-m1.dts
new file mode 100644 (file)
index 0000000..ec63d10
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2016 Milo Kim <woogyom.kim@gmail.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "sun8i-h3-nanopi.dtsi"
+
+/ {
+       model = "FriendlyArm NanoPi M1";
+       compatible = "friendlyarm,nanopi-m1", "allwinner,sun8i-h3";
+};
+
+&ehci1 {
+       status = "okay";
+};
+
+&ehci2 {
+       status = "okay";
+};
+
+&ohci1 {
+       status = "okay";
+};
+
+&ohci2 {
+       status = "okay";
+};
index 096ff0b5a53a2acdacc57dfe662447bd5836476f..511305909894489ad40677d5fff91246bb946c8e 100644 (file)
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
-/dts-v1/;
-#include "sun8i-h3.dtsi"
-#include "sunxi-common-regulators.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/pinctrl/sun4i-a10.h>
+#include "sun8i-h3-nanopi.dtsi"
 
 / {
        model = "FriendlyARM NanoPi NEO";
        compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3";
-
-       aliases {
-               serial0 = &uart0;
-       };
-
-       chosen {
-               stdout-path = "serial0:115200n8";
-       };
-
-       leds {
-               compatible = "gpio-leds";
-               pinctrl-names = "default";
-               pinctrl-0 = <&leds_opc>, <&leds_r_opc>;
-
-               pwr {
-                       label = "nanopi:green:pwr";
-                       gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
-                       default-state = "on";
-               };
-
-               status {
-                       label = "nanopi:blue:status";
-                       gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */
-               };
-       };
-};
-
-&ehci3 {
-       status = "okay";
-};
-
-&mmc0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
-       vmmc-supply = <&reg_vcc3v3>;
-       bus-width = <4>;
-       cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
-       cd-inverted;
-       status = "okay";
-};
-
-&ohci3 {
-       status = "okay";
-};
-
-&pio {
-       leds_opc: led-pins {
-               allwinner,pins = "PA10";
-               allwinner,function = "gpio_out";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-       };
-};
-
-&r_pio {
-       leds_r_opc: led-pins {
-               allwinner,pins = "PL10";
-               allwinner,function = "gpio_out";
-               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-       };
-};
-
-&uart0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&uart0_pins_a>;
-       status = "okay";
-};
-
-&usbphy {
-       /* USB VBUS is always on */
-       status = "okay";
 };
 
 &emac {
diff --git a/arch/arm/dts/sun8i-h3-nanopi.dtsi b/arch/arm/dts/sun8i-h3-nanopi.dtsi
new file mode 100644 (file)
index 0000000..c6decee
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 2016 James Pettigrew <james@innovum.com.au>
+ * Copyright (C) 2016 Milo Kim <woogyom.kim@gmail.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun8i-h3.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&leds_npi>, <&leds_r_npi>;
+
+               status {
+                       label = "nanopi:blue:status";
+                       gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+               };
+
+               pwr {
+                       label = "nanopi:green:pwr";
+                       gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
+               };
+       };
+
+       r_gpio_keys {
+               compatible = "gpio-keys";
+               input-name = "k1";
+               pinctrl-names = "default";
+               pinctrl-0 = <&sw_r_npi>;
+
+               k1@0 {
+                       label = "k1";
+                       linux,code = <KEY_POWER>;
+                       gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+               };
+       };
+};
+
+&ehci3 {
+       status = "okay";
+};
+
+&mmc0 {
+       bus-width = <4>;
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
+       cd-inverted;
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
+       status = "okay";
+       vmmc-supply = <&reg_vcc3v3>;
+};
+
+&ohci3 {
+       status = "okay";
+};
+
+&pio {
+       leds_npi: led_pins@0 {
+               pins = "PA10";
+               function = "gpio_out";
+       };
+};
+
+&r_pio {
+       leds_r_npi: led_pins@0 {
+               pins = "PL10";
+               function = "gpio_out";
+       };
+
+       sw_r_npi: key_pins@0 {
+               pins = "PL3";
+               function = "gpio_in";
+       };
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_a>;
+       status = "okay";
+};
+
+&usbphy {
+       status = "okay";
+};
index 93e6597d9e0fb121011699bf677f59cdd7c07dd2..79e94f9f2c4498b66dfa361e7b4664b139ab85cc 100644 (file)
@@ -17,6 +17,7 @@
  * To be aligned with MMU block size
  */
 #define CONFIG_SYS_MEM_RESERVE_SECURE  (2048 * 1024)   /* 2MB */
+#define SPL_TLB_SETBACK        0x1000000       /* 16MB under effective memory top */
 
 #ifdef CONFIG_ARCH_LS2080A
 #define CONFIG_SYS_FSL_CLUSTER_CLOCKS          { 1, 1, 4, 4 }
index 81c921122e8f65053e7e581426fc8083a62b44e1..1c2287d22a352d023bd28ef7cec12005bc62b10f 100644 (file)
@@ -39,7 +39,10 @@ static void enable_devices_ns_access(struct csu_ns_dev *ns_dev, uint32_t num)
 
 void enable_layerscape_ns_access(void)
 {
-       enable_devices_ns_access(ns_dev, ARRAY_SIZE(ns_dev));
+#ifdef CONFIG_ARM64
+       if (current_el() == 3)
+#endif
+               enable_devices_ns_access(ns_dev, ARRAY_SIZE(ns_dev));
 }
 
 void set_pcie_ns_access(int pcie, u16 val)
index 9e7701d81ff517edddacf08e046b204e62393bbe..41417e9dc6914aed4b9a2f1b12b3f696702eec35 100644 (file)
@@ -64,13 +64,13 @@ int board_eth_init(bd_t *bis)
        error = smc91111_initialize(0, CONFIG_SMC91111_BASE);
 #endif
 
-#ifdef CONFIG_FSL_MC_ENET
+#if defined(CONFIG_FSL_MC_ENET) && !defined(CONFIG_SPL_BUILD)
        error = cpu_eth_init(bis);
 #endif
        return error;
 }
 
-#ifdef CONFIG_FSL_MC_ENET
+#if defined(CONFIG_FSL_MC_ENET) && !defined(CONFIG_SPL_BUILD)
 void fdt_fixup_board_enet(void *fdt)
 {
        int offset;
@@ -128,10 +128,16 @@ int ft_board_setup(void *blob, bd_t *bd)
 
        fdt_fixup_memory_banks(blob, base, size, 2);
 
-#ifdef CONFIG_FSL_MC_ENET
+#if defined(CONFIG_FSL_MC_ENET) && !defined(CONFIG_SPL_BUILD)
        fdt_fixup_board_enet(blob);
 #endif
 
        return 0;
 }
 #endif
+
+#if defined(CONFIG_RESET_PHY_R)
+void reset_phy(void)
+{
+}
+#endif
index 79877d7774244e21d250029f4c1e6793592deb9f..62c8fac09c694f40e9fb066716680f5fd6d41495 100644 (file)
@@ -7,6 +7,7 @@ F:      include/configs/ls2080aqds.h
 F:     configs/ls2080aqds_defconfig
 F:     configs/ls2080aqds_nand_defconfig
 F:     configs/ls2080aqds_qspi_defconfig
+F:     configs/ls2080aqds_sdcard_defconfig
 
 LS2080A_SECURE_BOOT BOARD
 M:     Saksham Jain <saksham.jain@nxp.freescale.com>
index cad860eac2008fe93055a6caa006364b2486fe61..8e31e9e41e3e18744d93b6778924b10b9aa3a41b 100644 (file)
@@ -102,6 +102,19 @@ DPAA2 DPL                  0x00D00000
 DPAA2 DPC                      0x00E00000
 Kernel.itb                     0x01000000
 
+Memory map for SD boot
+-------------------------
+Image                          Flash Offset    SD Card
+                                               Start Block No.
+RCW+PBI                                0x00000000      0x00008
+Boot firmware (U-Boot)         0x00100000      0x00800
+Boot firmware Environment      0x00300000      0x01800
+PPA firmware                   0x00400000      0x02000
+DPAA2 MC                       0x00A00000      0x05000
+DPAA2 DPL                      0x00D00000      0x06800
+DPAA2 DPC                      0x00E00000      0x07000
+Kernel.itb                     0x01000000      0x08000
+
 Environment Variables
 ---------------------
 - mcboottimeout: MC boot timeout in milliseconds. If this variable is not defined
index 59361e9111f5382b528911a97319a712c8b65bed..defcac52634fac2be3f595b935673df1b17560f5 100644 (file)
@@ -14,6 +14,7 @@
 #include <fm_eth.h>
 #include <i2c.h>
 #include <miiphy.h>
+#include <fsl-mc/fsl_mc.h>
 #include <fsl-mc/ldpaa_wriop.h>
 
 #include "../common/qixis.h"
@@ -22,7 +23,7 @@
 
 #define MC_BOOT_ENV_VAR "mcinitcmd"
 
-#ifdef CONFIG_FSL_MC_ENET
+#if defined(CONFIG_FSL_MC_ENET) && !defined(CONFIG_SPL_BUILD)
  /* - In LS2080A there are only 16 SERDES lanes, spread across 2 SERDES banks.
  *   Bank 1 -> Lanes A, B, C, D, E, F, G, H
  *   Bank 2 -> Lanes A,B, C, D, E, F, G, H
@@ -834,8 +835,7 @@ void ls2080a_handle_phy_interface_xsgmii(int i)
 int board_eth_init(bd_t *bis)
 {
        int error;
-       char *mc_boot_env_var;
-#ifdef CONFIG_FSL_MC_ENET
+#if defined(CONFIG_FSL_MC_ENET) && !defined(CONFIG_SPL_BUILD)
        struct ccsr_gur __iomem *gur = (void *)CONFIG_SYS_FSL_GUTS_ADDR;
        int serdes1_prtcl = (in_le32(&gur->rcwsr[28]) &
                                FSL_CHASSIS3_RCWSR28_SRDS1_PRTCL_MASK)
@@ -902,9 +902,6 @@ int board_eth_init(bd_t *bis)
                }
        }
 
-       mc_boot_env_var = getenv(MC_BOOT_ENV_VAR);
-       if (mc_boot_env_var)
-               run_command_list(mc_boot_env_var, -1, 0);
        error = cpu_eth_init(bis);
 
        if (hwconfig_f("xqsgmii", env_hwconfig)) {
@@ -919,6 +916,9 @@ int board_eth_init(bd_t *bis)
        return error;
 }
 
-#ifdef CONFIG_FSL_MC_ENET
-
-#endif
+#if defined(CONFIG_RESET_PHY_R)
+void reset_phy(void)
+{
+       mc_env_boot();
+}
+#endif /* CONFIG_RESET_PHY_R */
index 6da9c6cfe8313d4445d6153cb266f6f844c1fa98..f36fb9810bd2d7a365fd540a24a3560a63a73f90 100644 (file)
@@ -280,7 +280,7 @@ int arch_misc_init(void)
 }
 #endif
 
-#ifdef CONFIG_FSL_MC_ENET
+#if defined(CONFIG_FSL_MC_ENET) && !defined(CONFIG_SPL_BUILD)
 void fdt_fixup_board_enet(void *fdt)
 {
        int offset;
@@ -336,7 +336,7 @@ int ft_board_setup(void *blob, bd_t *bd)
 
        fsl_fdt_fixup_dr_usb(blob, bd);
 
-#ifdef CONFIG_FSL_MC_ENET
+#if defined(CONFIG_FSL_MC_ENET) && !defined(CONFIG_SPL_BUILD)
        fdt_fixup_board_enet(blob);
 #endif
 
index ba584c8a76874684ad9a9db1ce73af4f2f382631..32677f7ae1b466f4d6e3f65b615d3f3e6c51c235 100644 (file)
 #include <asm/io.h>
 #include <exports.h>
 #include <asm/arch/fsl_serdes.h>
+#include <fsl-mc/fsl_mc.h>
 #include <fsl-mc/ldpaa_wriop.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#define MC_BOOT_ENV_VAR "mcinitcmd"
 int board_eth_init(bd_t *bis)
 {
 #if defined(CONFIG_FSL_MC_ENET)
-       char *mc_boot_env_var;
        int i, interface;
        struct memac_mdio_info mdio_info;
        struct mii_dev *dev;
@@ -98,11 +97,8 @@ int board_eth_init(bd_t *bis)
                }
        }
 
-       mc_boot_env_var = getenv(MC_BOOT_ENV_VAR);
-       if (mc_boot_env_var)
-               run_command_list(mc_boot_env_var, -1, 0);
        cpu_eth_init(bis);
-#endif /* CONFIG_FMAN_ENET */
+#endif /* CONFIG_FSL_MC_ENET */
 
 #ifdef CONFIG_PHY_AQUANTIA
        /*
@@ -118,3 +114,10 @@ int board_eth_init(bd_t *bis)
 #endif
        return pci_eth_init(bis);
 }
+
+#if defined(CONFIG_RESET_PHY_R)
+void reset_phy(void)
+{
+       mc_env_boot();
+}
+#endif /* CONFIG_RESET_PHY_R */
index a512a201d0183923cc72fc289711fb4253a9cd50..0f1290acc02ea0a3b39cec8ec858133aa8e6db60 100644 (file)
@@ -114,6 +114,11 @@ S: Maintained
 F:     configs/Bananapi_M2_Ultra_defconfig
 F:     arch/arm/dts/sun8i-r40-bananapi-m2-ultra.dts
 
+BANANAPI M64
+M:     Jagan Teki <jagan@amarulasolutions.com>
+S:     Maintained
+F:     configs/bananapi_m64_defconfig
+
 COLOMBUS BOARD
 M:     Maxime Ripard <maxime.ripard@free-electrons.com>
 S:     Maintained
@@ -237,6 +242,11 @@ M: Siarhei Siamashka <siarhei.siamashka@gmail.com>
 S:     Maintained
 F:     configs/MSI_Primo81_defconfig
 
+NANOPI-M1 BOARD
+M:     Mylène Josserand <mylene.josserand@free-electrons.com>
+S:     Maintained
+F:     configs/nanopi_m1_defconfig
+
 NANOPI-NEO BOARD
 M:     Jelle van der Waa <jelle@vdwaa.nl>
 S:     Maintained
@@ -262,6 +272,11 @@ M: Andre Przywara <andre.przywara@arm.com>
 S:     Maintained
 F:     configs/orangepi_pc2_defconfig
 
+ORANGEPI PRIME BOARD
+M:     Jagan Teki <jagan@amarulasolutions.com>
+S:     Maintained
+F:     configs/orangepi_prime_defconfig
+
 PINE64 BOARDS
 M:     Andre Przywara <andre.przywara@arm.com>
 S:     Maintained
index e35afa0e512d8a160cff05eb014d0b3da9a590f6..c21eb8c2d2e39c9d17c8ec3616a1faa8c0fbf413 100644 (file)
@@ -27,6 +27,7 @@ config TI_COMMON_CMD_OPTIONS
        imply CMD_EXT4_WRITE
        imply CMD_FASTBOOT if FASTBOOT
        imply CMD_FAT
+       imply FAT_WRITE if CMD_FAT
        imply CMD_FS_GENERIC
        imply CMD_GPIO
        imply CMD_GPT
index 6f75b86e255626ebc7a86052f4e8fe3d76f4300d..270cff6297d96db67e98210ef6e88ae65a394d8c 100644 (file)
@@ -1166,6 +1166,7 @@ config CMD_EXT4_WRITE
 
 config CMD_FAT
        bool "FAT command support"
+       select FS_FAT
        help
          Support for the FAT fs
 
index eabb2d02ec44be51d19221ebd2ab50a73318ce21..48a0fadb5f9a961ca32095f7adf8604db24d0a4f 100644 (file)
@@ -306,6 +306,7 @@ config SPL_EXT_SUPPORT
 config SPL_FAT_SUPPORT
        bool "Support FAT filesystems"
        depends on SPL
+       select FS_FAT
        help
          Enable support for FAT and VFAT filesystems with SPL. This
          permits U-Boot (or Linux in Falcon mode) to be loaded from a FAT
index 8a51bf3d0b246a443844faa5004f1714a36e8750..d1b5b22689f2958734156eb02619525806c12512 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_SUNXI=y
+CONFIG_CONS_INDEX=1
 CONFIG_MACH_SUN8I_A33=y
 CONFIG_DRAM_CLK=552
 CONFIG_DRAM_ZQ=15291
index 590673b37c1e0ad25f86039f9787722c8cf1dcd7..f210cca87f44684df362708d6a8bdd78177dd358 100644 (file)
@@ -60,4 +60,5 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0403
 CONFIG_G_DNL_PRODUCT_NUM=0xbd00
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index 55ed8f36540ced71ee9ba1a36ccc9af38c68b61f..31019e30a0108692c7c2a608e06acc12ee5d1cb0 100644 (file)
@@ -44,4 +44,5 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0451
 CONFIG_G_DNL_PRODUCT_NUM=0xd022
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index fa468f05e7fd91d2ce04b7b7ae22b69963fee5f0..651e194ae6c3554dfe72380bca7c1cd9a3e4a124 100644 (file)
@@ -49,6 +49,7 @@ CONFIG_EFI_PARTITION=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD_UBI_FASTMAP=y
 CONFIG_SYS_NS16550=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
 CONFIG_FDT_FIXUP_PARTITIONS=y
 # CONFIG_GENERATE_SMBIOS_TABLE is not set
index 1068678a7c7480492164e3ce64d7b83bf9fb7303..ab912bbc53c406e27a7b962735dcc90a69371bde 100644 (file)
@@ -39,4 +39,5 @@ CONFIG_ISO_PARTITION=y
 # CONFIG_SPL_ISO_PARTITION is not set
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index 85b24a548a7a6200db6410584f1fa6eae471a4b6..7d75c5cc7ac20cd74dbef03f125c4664d1906800 100644 (file)
@@ -39,4 +39,5 @@ CONFIG_ISO_PARTITION=y
 # CONFIG_SPL_ISO_PARTITION is not set
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index 9117407065ec75dbfd856bf32f6778cd2892b8da..322a070dea8a1dca3d55706dff9ac11af5f68dc0 100644 (file)
@@ -40,4 +40,5 @@ CONFIG_ISO_PARTITION=y
 # CONFIG_SPL_ISO_PARTITION is not set
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index e71e54b3f5b8b91096dad33151e11de985af45ca..c5d8dcae878ccee9ec634b8809c9b1ed0761da8d 100644 (file)
@@ -37,4 +37,5 @@ CONFIG_ISO_PARTITION=y
 # CONFIG_SPL_ISO_PARTITION is not set
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index bd66fbc7b1a143fe987366630c9005c4df97ab6a..185258de082f9cf79f7c699120e654fa8b12e790 100644 (file)
@@ -39,4 +39,5 @@ CONFIG_ISO_PARTITION=y
 # CONFIG_SPL_ISO_PARTITION is not set
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index bd66fbc7b1a143fe987366630c9005c4df97ab6a..185258de082f9cf79f7c699120e654fa8b12e790 100644 (file)
@@ -39,4 +39,5 @@ CONFIG_ISO_PARTITION=y
 # CONFIG_SPL_ISO_PARTITION is not set
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index bae1dfec2328a942a80627e9f56952e81cd7d569..86035d2897ad0ee0849ba34da18b68dbbc9917b6 100644 (file)
@@ -37,4 +37,5 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index 6a307066eb91fdea7b943f651d4034289eda55e1..20874dd0bc16633b6aa2c98dbbf4d8e3d854315d 100644 (file)
@@ -58,4 +58,5 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0403
 CONFIG_G_DNL_PRODUCT_NUM=0xbd00
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index 84766e86748d7a3b713ad03346aa4845cbedbad0..c0d0bcc66898260533f5cd46a88a7c3eff5dc90f 100644 (file)
@@ -55,4 +55,5 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0403
 CONFIG_G_DNL_PRODUCT_NUM=0xbd00
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index a98a97fa427c628cb0d565959e9c2fb7e83dad82..870ed0fb24abc3e186f5442b8338f16e039052bf 100644 (file)
@@ -72,3 +72,4 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0403
 CONFIG_G_DNL_PRODUCT_NUM=0xbd00
+CONFIG_FAT_WRITE=y
index 33e7f91e434d803e024509c470d466f3b148285f..6048e6c9112ea66b0b36ef65c0b75c0987590ded 100644 (file)
@@ -62,4 +62,5 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0451
 CONFIG_G_DNL_PRODUCT_NUM=0xd022
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index c712cf91dfe85110f39ab0d523324d82158f11cf..d171cf075468653e60db2fa6387b7df4d90072cc 100644 (file)
@@ -49,6 +49,7 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Toradex"
 CONFIG_G_DNL_VENDOR_NUM=0x1b67
 CONFIG_G_DNL_PRODUCT_NUM=0x4000
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
 CONFIG_OF_LIBFDT_OVERLAY=y
 # CONFIG_EFI_LOADER is not set
index f5f4e3de7f4aaed682e804923f3384320bfca8a5..6611c4306daf05b02e44c38b34e7ff3b33ac17d4 100644 (file)
@@ -42,5 +42,6 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Toradex"
 CONFIG_G_DNL_VENDOR_NUM=0x1b67
 CONFIG_G_DNL_PRODUCT_NUM=0x4020
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
 # CONFIG_EFI_LOADER is not set
index 0de47fe360f40e6c49b025a405897358810ffa4f..dba0a7c6700269dc103ac7c0ac8c6990ec3d0dbf 100644 (file)
@@ -42,5 +42,6 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Toradex"
 CONFIG_G_DNL_VENDOR_NUM=0x1b67
 CONFIG_G_DNL_PRODUCT_NUM=0x4020
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
 # CONFIG_EFI_LOADER is not set
index 18b6ddf7cff968125485d9d394f6d9675e9f73de..d8ba087d38dffa7105bfdf464fb60025c49099b0 100644 (file)
@@ -49,3 +49,4 @@ CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
+CONFIG_FAT_WRITE=y
index e7e8a014c6e4aebd58030c2ef3776f05dd10d166..d13eed0c15a6831877b10d02c8b3d16b571d45fa 100644 (file)
@@ -48,3 +48,4 @@ CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
+CONFIG_FAT_WRITE=y
index 9a40c41f361ab89c41525f94a8497bc73fd1a11d..edf98810bf0bfdb2ec349c88feb184e918a5dbfb 100644 (file)
@@ -42,3 +42,4 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_LCD=y
+CONFIG_FAT_WRITE=y
index ddeeeefa1ea56924eb10c1284f49a9511b6a487d..fbe11ef6cdeddb8b1f398c10ba493b2809634b81 100644 (file)
@@ -54,3 +54,4 @@ CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
+CONFIG_FAT_WRITE=y
diff --git a/configs/bananapi_m64_defconfig b/configs/bananapi_m64_defconfig
new file mode 100644 (file)
index 0000000..3908d42
--- /dev/null
@@ -0,0 +1,17 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN50I=y
+CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
+CONFIG_MMC0_CD_PIN="PH13"
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-bananapi-m64"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL=y
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+# CONFIG_SPL_DOS_PARTITION is not set
+# CONFIG_SPL_ISO_PARTITION is not set
+# CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SUN8I_EMAC=y
+CONFIG_USB_EHCI_HCD=y
index 67e18b6268091f3d32fadc9fe6e3e0e75995abbc..62e50b63f41403ef6aa5a5f5ef21341173b1a0d8 100644 (file)
@@ -19,6 +19,7 @@ CONFIG_HASH_VERIFY=y
 CONFIG_CMD_FAT=y
 # CONFIG_MMC is not set
 CONFIG_SYS_NS16550=y
+CONFIG_FAT_WRITE=y
 CONFIG_SHA1=y
 CONFIG_SHA256=y
 CONFIG_OF_LIBFDT=y
index 7811273e92b16bec6414fe3aa9f948f651f6b1ee..d866b6014f6c69cf9a2ee93c824162be16bdd097 100644 (file)
@@ -63,4 +63,5 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0451
 CONFIG_G_DNL_PRODUCT_NUM=0xd022
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index 1765ec4fa95d7a36ac263346283b092fa75ee78a..ef73fbfde16cfc052edfed24328ec744a4a2579e 100644 (file)
@@ -54,6 +54,7 @@ CONFIG_MMC_OMAP_HS=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
+CONFIG_FAT_WRITE=y
 CONFIG_USB=y
 CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_MUSB_GADGET=y
index 1bdbf90495972bd74c4764269b936a021b9e9f5c..356622319071d1730847f9e950645630455bbbea 100644 (file)
@@ -58,4 +58,5 @@ CONFIG_USB_STORAGE=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_LCD=y
 CONFIG_OMAP_WATCHDOG=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index ed7432d7f42d330f7b067ccc74adc0c561c66301..f07a46b78ff8be5b037aaab7ac4332310a913031 100644 (file)
@@ -58,4 +58,5 @@ CONFIG_USB_STORAGE=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_LCD=y
 CONFIG_OMAP_WATCHDOG=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index 02b5ff60e21de25bdd174674f43a68c3c2f05553..333e2043107fb71f0e7cb66867b2a7892b20a52e 100644 (file)
@@ -66,4 +66,5 @@ CONFIG_USB_STORAGE=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_LCD=y
 CONFIG_OMAP_WATCHDOG=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index 940793b5a672166499e9e7c6cbcc0239e2479294..f558886067e5b3839415316acb7335f221548c46 100644 (file)
@@ -57,5 +57,6 @@ CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_STORAGE=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_LCD=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
 # CONFIG_EFI_LOADER is not set
index da28e13d6ba72a9fdc0e89d4f2883171a96f912c..d96a71a8280a86bcb0228037602fbe614ea09425 100644 (file)
@@ -34,4 +34,5 @@ CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index 2f4c694a0aa25fdac8a5dffd5d426c3bfd4736f1..579df941d43f6fe1297b9d51270fbb38f6bfb946 100644 (file)
@@ -41,4 +41,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_STORAGE=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index ef760337797a4e3c3108199c4b08e1147911f593..8485137f1adfd9e6be12a0238b1a9469381115f8 100644 (file)
@@ -53,4 +53,5 @@ CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_STORAGE=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index dbb1c3b88675d6e85369bcb2088bc7bf2eb7ce25..876e3320b741407638b7b04d53ede729042f4650 100644 (file)
@@ -50,4 +50,5 @@ CONFIG_LED_STATUS_BOOT_ENABLE=y
 CONFIG_LED_STATUS_BOOT=0
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index bec96aec98ba1e0dcf204a9e672f7bf8997a6e9b..d813cc54fb3ed7f6f19422424d4459ed37fe7765 100644 (file)
@@ -68,4 +68,5 @@ CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_STORAGE=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index eef2f89dc306b95a7fc1cd2a0c75962c012b2d36..ec26f999bac25a893806865d306a38c239707d1d 100644 (file)
@@ -43,4 +43,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index fcb7c537970102ae49f065142b498f4b99d932f4..d8307b0836efbf9324287440643960aaa9073116 100644 (file)
@@ -49,6 +49,7 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Toradex"
 CONFIG_G_DNL_VENDOR_NUM=0x1b67
 CONFIG_G_DNL_PRODUCT_NUM=0x4000
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
 CONFIG_OF_LIBFDT_OVERLAY=y
 # CONFIG_EFI_LOADER is not set
index fbf9306eeb167db7abc5ae1270013b11029304e8..df24f17b2d5c34150cf4c5de96d51d40bb4e67f0 100644 (file)
@@ -42,5 +42,6 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Toradex"
 CONFIG_G_DNL_VENDOR_NUM=0x1b67
 CONFIG_G_DNL_PRODUCT_NUM=0x4000
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
 # CONFIG_EFI_LOADER is not set
index 46ac56797fae00abb34afc27c41599ab9c432cf2..d8f373b492b3dc5a83fccc7ec0f3bf5bce97a630 100644 (file)
@@ -12,7 +12,7 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_DATE=y
-CONFIG_DOS_PARTITION=y
+CONFIG_CMD_FAT=y
 CONFIG_ISO_PARTITION=y
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
index 9e0ac20985c4e2b4d571358bd8f634090b44a593..b945875adf5ee5700a1252f6959d8a5dfdeccad2 100644 (file)
@@ -28,4 +28,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index 2c6f52494a08708689e3c7bde5dc161e973fcb71..d43fd14a8a1649d0816fff6bb3442a5cbcd18e1e 100644 (file)
@@ -18,6 +18,7 @@ CONFIG_CMD_PART=y
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SOURCE is not set
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_FAT=y
 CONFIG_OF_CONTROL=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
index b112be2ef505876731ff3fe2e36a34944dbacfe5..5981d2f530abf2332bd70229812b9a4c05529a81 100644 (file)
@@ -16,3 +16,4 @@ CONFIG_MMC_DW=y
 CONFIG_MMC_DW_K3=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
+CONFIG_FAT_WRITE=y
index c81dfdfbdb8e0945e3375af79af88d6454475045..6e0a5e9812b8da54e92a12ee873d9677395397d5 100644 (file)
@@ -47,5 +47,6 @@ CONFIG_LED_STATUS_BOOT_ENABLE=y
 CONFIG_LED_STATUS_BOOT=0
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
 CONFIG_FDT_FIXUP_PARTITIONS=y
index 9098451d84c0482d7d4f69778da8e5bf1f67bb1a..5908a356292a7dedc0ca7ea9cbbba0221ad00e30 100644 (file)
@@ -36,5 +36,6 @@ CONFIG_LED_STATUS_BOOT_ENABLE=y
 CONFIG_LED_STATUS_BOOT=0
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
 CONFIG_FDT_FIXUP_PARTITIONS=y
index 56be1a1b23166b12d11461fce3879ca6671786e7..53399e7523b1f48a3b2c2ea464b4317a33ef1386 100644 (file)
@@ -28,5 +28,6 @@ CONFIG_CMD_UBI=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
 CONFIG_FDT_FIXUP_PARTITIONS=y
index bc3e5d90918fb4604cf3c16f3c9e4ad2f41fa0f3..a884e5a10c9e3aab0bcd677c2b20d69ad19a5d41 100644 (file)
@@ -13,4 +13,5 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
+# CONFIG_FAT_WRITE is not set
 CONFIG_OF_LIBFDT=y
index 3deda487ce08b7bdcf1896022fb6b565f63e0e34..3628367df002dfcf5781f78c62b22a74f6578cfb 100644 (file)
@@ -4,7 +4,7 @@ CONFIG_DEFAULT_DEVICE_TREE="ls1021a-iot-duart"
 CONFIG_SYS_EXTRA_OPTIONS="QSPI_BOOT"
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_CMD_GPT=y
-CONFIG_DOS_PARTITION=y
+CONFIG_CMD_FAT=y
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
 CONFIG_FSL_CAAM=y
index 089ea343348c43ae06c1a30dc29c2678ede0f8a7..e4120243493bb490066178d43ad8b0c2f7e10e37 100644 (file)
@@ -7,7 +7,7 @@ CONFIG_SPL=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xe8
 CONFIG_CMD_GPT=y
-CONFIG_DOS_PARTITION=y
+CONFIG_CMD_FAT=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
index 329dd3b0d55b44aaec8b8aab0e2b1f9c4c3e6530..ea674c8b2ced68b2e8c7e035f475d35bbafc0361 100644 (file)
@@ -3,6 +3,7 @@ CONFIG_TARGET_LS1043ARDB=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_FSL_LS_PPA=y
+CONFIG_SPL_FSL_LS_PPA=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
index cdcc25d8f91b718445a236e787fb5f3f89cbb415..a3c60651ece6c65e2566a1eb1545f1423e2f6589 100644 (file)
@@ -8,6 +8,7 @@ CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL"
 CONFIG_NAND_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_SPL=y
+CONFIG_SPL_BOARD_INIT=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x110
 CONFIG_HUSH_PARSER=y
index a35e1be5bed07402f68c3010b7479f8c70d9ad4f..19b80777fbad750f9c49bad82a18c8061ed3f640 100644 (file)
@@ -8,6 +8,7 @@ CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL"
 CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_SPL=y
+CONFIG_SPL_BOARD_INIT=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x110
 CONFIG_HUSH_PARSER=y
index 922f202863a66ec0fbc7807961322132e56dd553..e49de18746b0d273b84c6f11201a2bebb72807ab 100644 (file)
@@ -8,6 +8,7 @@ CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,SD_BOOT_QSPI"
 CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_SPL=y
+CONFIG_SPL_BOARD_INIT=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x110
 CONFIG_HUSH_PARSER=y
index 94bd8a52e130660e1a84a86489ce406e8654fc18..c50931a3391e6784dc4c97552ac7aa02072caa9a 100644 (file)
@@ -8,6 +8,7 @@ CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,EMMC_BOOT"
 CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_SPL=y
+CONFIG_SPL_BOARD_INIT=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x110
 CONFIG_HUSH_PARSER=y
index 5162c2cadc30a204032ca35265d0d12ef193e750..1cd19edec578565be60f28a031b1bc20760bd7c7 100644 (file)
@@ -9,6 +9,7 @@ CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL"
 CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_SPL=y
+CONFIG_SPL_BOARD_INIT=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x110
 CONFIG_SPL_CRYPTO_SUPPORT=y
index d70a3870eb476fb3802f220dc8a23e9b81587814..da8c5b815bc3bbf4290e3b73111a9ab5d3b26bc5 100644 (file)
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_TARGET_LS1046ARDB=y
 CONFIG_FSL_LS_PPA=y
+CONFIG_SPL_FSL_LS_PPA=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-rdb"
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
@@ -8,6 +9,7 @@ CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL"
 CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_SPL=y
+CONFIG_SPL_BOARD_INIT=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x110
 CONFIG_HUSH_PARSER=y
index 99df6e0818f196b506946fef5aedeb05fda89109..614660008b991626a804aef5332a4e7f1eb859fa 100644 (file)
@@ -10,6 +10,7 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_NAND_BOOT=y
 CONFIG_SYS_EXTRA_OPTIONS="NAND"
 CONFIG_BOOTDELAY=10
 CONFIG_SPL=y
diff --git a/configs/ls2080aqds_sdcard_defconfig b/configs/ls2080aqds_sdcard_defconfig
new file mode 100644 (file)
index 0000000..a6d2f81
--- /dev/null
@@ -0,0 +1,56 @@
+CONFIG_ARM=y
+CONFIG_TARGET_LS2080AQDS=y
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SPL_I2C_SUPPORT=y
+CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL_ENV_SUPPORT=y
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
+CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-qds"
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_OF_BOARD_SETUP=y
+CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4"
+CONFIG_SD_BOOT=y
+CONFIG_BOOTDELAY=10
+CONFIG_SPL=y
+CONFIG_FSL_LS_PPA=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x8b0
+CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_GREPENV=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_I2C=y
+CONFIG_SPL_MMC_SUPPORT=y
+CONFIG_CMD_USB=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_DATE=y
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
+CONFIG_OF_EMBED=y
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_DM=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_NETDEVICES=y
+CONFIG_E1000=y
+CONFIG_PCI=y
+CONFIG_DM_PCI=y
+CONFIG_DM_PCI_COMPAT=y
+CONFIG_PCIE_LAYERSCAPE=y
+CONFIG_SYS_NS16550=y
+CONFIG_DM_SPI=y
+CONFIG_FSL_QSPI=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_STORAGE=y
+CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
index 5ce37fdfb433d6015b34db2b6d64512f7ec563d7..5800213e41e058b19d36bbbd5645c4851710258b 100644 (file)
@@ -10,6 +10,7 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_NAND_BOOT=y
 CONFIG_SYS_EXTRA_OPTIONS="NAND"
 CONFIG_BOOTDELAY=10
 CONFIG_SPL=y
index fbd106ef92bfef1ef927acdae351f31351470605..944e39dda1c2e45d6218cc1abf99ab91350b1a08 100644 (file)
@@ -41,4 +41,5 @@ CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index a7bf29731e581103614506fb125af4a769d75376..a33a60123659edb2b160e4c53ccae41a6b8fcf07 100644 (file)
@@ -37,4 +37,5 @@ CONFIG_CMD_UBI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 # CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index a267c9a55f19b7a22b09035cd548b66d09638243..eca10d3c854bed9baaa5a418d6c046501bf12991 100644 (file)
@@ -40,5 +40,6 @@ CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_ATMEL_USBA=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
 # CONFIG_EFI_LOADER is not set
index c457d348d39203ff50f195fb338e1b9faf9f3d93..6ab7cb77e6f09e3e2105b21e7deb5e3948da8dcf 100644 (file)
@@ -7,6 +7,7 @@ CONFIG_HUSH_PARSER=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_FAT=y
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
 # CONFIG_BLK is not set
index c457d348d39203ff50f195fb338e1b9faf9f3d93..6ab7cb77e6f09e3e2105b21e7deb5e3948da8dcf 100644 (file)
@@ -7,6 +7,7 @@ CONFIG_HUSH_PARSER=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_FAT=y
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
 # CONFIG_BLK is not set
diff --git a/configs/nanopi_m1_defconfig b/configs/nanopi_m1_defconfig
new file mode 100644 (file)
index 0000000..498496b
--- /dev/null
@@ -0,0 +1,16 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN8I_H3=y
+CONFIG_DRAM_CLK=408
+CONFIG_DRAM_ZQ=3881979
+CONFIG_DRAM_ODT_EN=y
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-m1"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL=y
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+# CONFIG_SPL_DOS_PARTITION is not set
+# CONFIG_SPL_ISO_PARTITION is not set
+# CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_USB_EHCI_HCD=y
index 49b963c64fa4b8016218909462ad6d9a5b41170d..3c7589bf78bd13e1c6079d595058f1fb53be1fbe 100644 (file)
@@ -39,4 +39,5 @@ CONFIG_USB_KEYBOARD=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
 # CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index 64971c139c53361176451479d87ae2efc889c693..eb780ab2239168aba90ddf3ec16db35a57e310a2 100644 (file)
@@ -42,4 +42,5 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="TI"
 CONFIG_G_DNL_VENDOR_NUM=0x0451
 CONFIG_G_DNL_PRODUCT_NUM=0xd022
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index 3be4a1d0b3e857e8263b5b349f7c8d49cf8bc8d0..e360780d253d2aa9be454e8a7c9054a1d804b3a2 100644 (file)
@@ -44,4 +44,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index 3aa7ba3f589373c98b75d63cd571bff4934bb121..d219ad011f3bb17385a6ae2b01cddbe6256d2d3c 100644 (file)
@@ -24,4 +24,5 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_UBI=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index c985c86d6d1a820a1059e018e49bb97341a50c21..8c0e83004813b38c6921a4be0354c147db635938 100644 (file)
@@ -30,4 +30,5 @@ CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index 8fdf76076c5b4ff0f3ebd408f82bfe693bcc5ae8..3d91f137e875c465121d3de0fdf0d08d0675aae0 100644 (file)
@@ -27,4 +27,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index 722914289603c22bc2a29f57039b869d2a6a692b..dda4030eccb58734104773c94b3ae7f908705f0e 100644 (file)
@@ -25,4 +25,5 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index bd799b7dc3974052f2a06394506d7ed40f1f0a87..f5ac38b47c5425b0a91cb33b5d0d7a112d4e3eb7 100644 (file)
@@ -48,4 +48,5 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0403
 CONFIG_G_DNL_PRODUCT_NUM=0xbd00
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index 354438e1ef0dbf489309195afc1911902a3598fd..cb351e4e672faa6c79fc0a4219d272bc341f464c 100644 (file)
@@ -30,4 +30,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
+# CONFIG_FAT_WRITE is not set
 CONFIG_OF_LIBFDT=y
diff --git a/configs/orangepi_prime_defconfig b/configs/orangepi_prime_defconfig
new file mode 100644 (file)
index 0000000..dc8d59e
--- /dev/null
@@ -0,0 +1,16 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN50I_H5=y
+CONFIG_DRAM_CLK=672
+CONFIG_DRAM_ZQ=3881977
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-prime"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL=y
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+# CONFIG_SPL_DOS_PARTITION is not set
+# CONFIG_SPL_ISO_PARTITION is not set
+# CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SUN8I_EMAC=y
+CONFIG_USB_EHCI_HCD=y
index f278075b449d9afcf56367ca06cde0fe82d4b9f3..6b4e229f50517a26757a228baf5153c5cae6a27d 100644 (file)
@@ -57,4 +57,5 @@ CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index 5fa60b7785eba0c12ecfc84fe816b5494ea609d5..6baca9650bfed838f2ed6eea0ec1d635400eb015 100644 (file)
@@ -57,4 +57,5 @@ CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index 6d4d8ada49ca42307de915e3465326e1e265a70a..8693dea534e18d39b15a1b46e0ef526ab11ecf4c 100644 (file)
@@ -56,4 +56,5 @@ CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index a7d67bf472d1e15b46f5d932aeabc2e7e972ee10..4b122d6d8c7c3a4257f217f9ddfbf82b4d94cd06 100644 (file)
@@ -40,4 +40,5 @@ CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index 9eb80766ed41868633fa9b8342fc23daf345da54..688b989419462cfd9dedffec291b0d2b74709522 100644 (file)
@@ -42,5 +42,6 @@ CONFIG_DM_USB=y
 CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_MUSB_PIC32=y
 CONFIG_USB_STORAGE=y
+CONFIG_FAT_WRITE=y
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
index f34dfe9fdb34276cd342c70d6b78fc1221e0600a..aa61e4b65a94bb53207a4933ddee0933250638a9 100644 (file)
@@ -35,4 +35,5 @@ CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
+CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
index 60e0b720bba6d0020a165a0ff82e7ae7cae0f284..1eba2992425a6bbd10986836864a5f68efe91cad 100644 (file)
@@ -16,6 +16,7 @@ CONFIG_CMD_NET=y
 CONFIG_CMD_NFS=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
+CONFIG_CMD_FAT=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_USB=y
 CONFIG_USB=y
index d6f1840eab111af6afd86230461766dc4c8891b0..5bd762da79029d82b3e33fc15dc374ed9236e4f4 100644 (file)
@@ -16,6 +16,7 @@ CONFIG_CMD_NET=y
 CONFIG_CMD_NFS=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
+CONFIG_CMD_FAT=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_USB=y
 CONFIG_USB=y
index c3e04573b4f7eae39fb2504835616328cd6334fe..8aeab15bfb7ebf89ef27d4005dbd45260d883edc 100644 (file)
@@ -35,3 +35,4 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Samsung"
 CONFIG_G_DNL_VENDOR_NUM=0x04e8
 CONFIG_G_DNL_PRODUCT_NUM=0x6601
+CONFIG_FAT_WRITE=y
index 239bfdd66b9648eeec2f67d3b05818a331919f17..66edd31bfe17bdf4defd20ad1680bc062a75c346 100644 (file)
@@ -16,6 +16,7 @@ CONFIG_SPL=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_SF=y
 # CONFIG_CMD_FPGA is not set
+CONFIG_CMD_FAT=y
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_USB=y
index 21014b937c6b124e9e90fea12d302fa20cd84769..8771e0846ce189c4bd5438f9143e8720b7c7cfd3 100644 (file)
@@ -17,6 +17,7 @@ CONFIG_SPL=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_SF=y
 # CONFIG_CMD_FPGA is not set
+CONFIG_CMD_FAT=y
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_USB=y
index f064a43c6bbef4a55896a2dd1231493cf6ef0c55..b60e00ce5af8cabe99c74b428c9dcd08ef4aa5f9 100644 (file)
@@ -74,3 +74,4 @@ CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_ATMEL_USBA=y
+CONFIG_FAT_WRITE=y
index 32a21f9294d6177a709d98ea17fe53fa12514e98..8c34e64bc50a62029dac1a0b298ad5e32f23bb49 100644 (file)
@@ -49,3 +49,4 @@ CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
 CONFIG_LCD=y
+CONFIG_FAT_WRITE=y
index 34c4de17b9af49893634311f8f889b3b4f078f7d..9c72a67572d4ec05fac91b6e8d20dd4f83298427 100644 (file)
@@ -49,3 +49,4 @@ CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
 CONFIG_LCD=y
+CONFIG_FAT_WRITE=y
index 42c31111a1fde6ee3916f32fad0b997835deb47a..10db9c96c6fedb75af066fce694562ecde644af4 100644 (file)
@@ -49,3 +49,4 @@ CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
 CONFIG_LCD=y
+CONFIG_FAT_WRITE=y
index d28d1d9a331a750164aab99462c29653b9eea5bf..533dbcd00d667440133e9cfde0460796caa5b712 100644 (file)
@@ -65,3 +65,4 @@ CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
+CONFIG_FAT_WRITE=y
index 6f2432473ddbb3d9e457867ca20bb7eba7ecae7d..d00ef6a6330374c1416e5a7b46164bcbd83287b1 100644 (file)
@@ -62,3 +62,4 @@ CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
+CONFIG_FAT_WRITE=y
index 994bc048bab08bcc03f449e5172c4dff01c88598..74719854a03d71f65a988742e0bb0d184362e7ef 100644 (file)
@@ -74,3 +74,4 @@ CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_ATMEL_USBA=y
 CONFIG_LCD=y
+CONFIG_FAT_WRITE=y
index dd0263cea2d6a1eb8a93736092cc224647b9f058..a75767be85a0b4346d898511aa242f4b78153c44 100644 (file)
@@ -69,3 +69,4 @@ CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_ATMEL_USBA=y
 CONFIG_LCD=y
+CONFIG_FAT_WRITE=y
index 069fbcc0a35250524ed27cba716bdce16ddcac12..1d8491cdb737a60c47a52c05ded22a6301e86afc 100644 (file)
@@ -70,3 +70,4 @@ CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_ATMEL_USBA=y
 CONFIG_LCD=y
+CONFIG_FAT_WRITE=y
index 4fc44e5747856db70585603c8d82e0422ba0f24b..e23df47ce6fbbf8efd27ad6f5e90f8c5b4abc3f5 100644 (file)
@@ -68,3 +68,4 @@ CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_ATMEL_USBA=y
+CONFIG_FAT_WRITE=y
index 204d128395edc002e90ca8a8a441bb5ccb68df96..68da5f9400cdc86f523cb0f4900116e58df6a825 100644 (file)
@@ -72,3 +72,4 @@ CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_ATMEL_USBA=y
 CONFIG_LCD=y
+CONFIG_FAT_WRITE=y
index dc49372e48fba790d9452c9c99b3d7946e2370e7..148f70360bf3f0cd2183a0aea76b39ec3a588910 100644 (file)
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_ZYNQ=y
 CONFIG_SYS_TEXT_BASE=0x4000000
+# CONFIG_SPL_FAT_SUPPORT is not set
 CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm011"
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
index 16cd61311009e47564887801b59798816efd52d1..943efdb141c6e86d2e8c0fc2e386c14bfea39cf1 100644 (file)
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_ZYNQ=y
 CONFIG_SYS_TEXT_BASE=0x4000000
+# CONFIG_SPL_FAT_SUPPORT is not set
 CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm012"
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
index 4396db0eb151f67c0bab500b84b478120b5f37b4..5c029109e2b1e7af5975e0f5d0f12a6faa7001eb 100644 (file)
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_ZYNQ=y
 CONFIG_SYS_TEXT_BASE=0x4000000
+# CONFIG_SPL_FAT_SUPPORT is not set
 CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm013"
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
index d49bf572f8f92798592c0b7c386ff0c379750671..33634c33d4cb77cad995d25798def9ea904dcd75 100644 (file)
@@ -22,6 +22,13 @@ menuconfig NETDEVICES
 
 if NETDEVICES
 
+config PHY_GIGE
+       bool "Enable GbE PHY status parsing and configuration"
+       help
+         Enables support for parsing the status output and for
+         configuring GbE PHYs (affects the inner workings of some
+         commands and miiphyutil.c).
+
 config AG7XXX
        bool "Atheros AG7xxx Ethernet MAC support"
        depends on DM_ETH && ARCH_ATH79
@@ -187,6 +194,7 @@ config SUN8I_EMAC
         bool "Allwinner Sun8i Ethernet MAC support"
         depends on DM_ETH
         select PHYLIB
+       select PHY_GIGE
         help
           This driver supports the  Allwinner based SUN8I/SUN50I Ethernet MAC.
          It can be found in H3/A64/A83T based SoCs and compatible with both
index 778d2f573951294c436fa132f67bdf07c75b7575..d7db0fc432f7a93996cfbfd40439699f6de54e86 100644 (file)
@@ -612,21 +612,25 @@ static void cpsw_set_slave_mac(struct cpsw_slave *slave,
 #endif
 }
 
-static void cpsw_slave_update_link(struct cpsw_slave *slave,
+static int cpsw_slave_update_link(struct cpsw_slave *slave,
                                   struct cpsw_priv *priv, int *link)
 {
        struct phy_device *phy;
        u32 mac_control = 0;
+       int ret = -ENODEV;
 
        phy = priv->phydev;
-
        if (!phy)
-               return;
+               goto out;
+
+       ret = phy_startup(phy);
+       if (ret)
+               goto out;
 
-       phy_startup(phy);
-       *link = phy->link;
+       if (link)
+               *link = phy->link;
 
-       if (*link) { /* link up */
+       if (phy->link) { /* link up */
                mac_control = priv->data.mac_control;
                if (phy->speed == 1000)
                        mac_control |= GIGABITEN;
@@ -637,7 +641,7 @@ static void cpsw_slave_update_link(struct cpsw_slave *slave,
        }
 
        if (mac_control == slave->mac_control)
-               return;
+               goto out;
 
        if (mac_control) {
                printf("link up on port %d, speed %d, %s duplex\n",
@@ -649,17 +653,20 @@ static void cpsw_slave_update_link(struct cpsw_slave *slave,
 
        __raw_writel(mac_control, &slave->sliver->mac_control);
        slave->mac_control = mac_control;
+
+out:
+       return ret;
 }
 
 static int cpsw_update_link(struct cpsw_priv *priv)
 {
-       int link = 0;
+       int ret = -ENODEV;
        struct cpsw_slave *slave;
 
        for_active_slave(slave, priv)
-               cpsw_slave_update_link(slave, priv, &link);
+               ret = cpsw_slave_update_link(slave, priv, NULL);
 
-       return link;
+       return ret;
 }
 
 static inline u32  cpsw_get_slave_port(struct cpsw_priv *priv, u32 slave_num)
@@ -822,7 +829,9 @@ static int _cpsw_init(struct cpsw_priv *priv, u8 *enetaddr)
        for_active_slave(slave, priv)
                cpsw_slave_init(slave, priv);
 
-       cpsw_update_link(priv);
+       ret = cpsw_update_link(priv);
+       if (ret)
+               goto out;
 
        /* init descriptor pool */
        for (i = 0; i < NUM_DESCS; i++) {
@@ -897,7 +906,8 @@ static int _cpsw_init(struct cpsw_priv *priv, u8 *enetaddr)
                }
        }
 
-       return 0;
+out:
+       return ret;
 }
 
 static void _cpsw_halt(struct cpsw_priv *priv)
index e3a194c2c00e35438522d38dd134ee7788de4b36..e8569e6fef5fefdd36e874e7efc2689e559871ff 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/compiler.h>
 #include <linux/err.h>
 #include <asm/io.h>
+#include <power/regulator.h>
 #include "designware.h"
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -661,6 +662,22 @@ int designware_eth_probe(struct udevice *dev)
        ulong ioaddr;
        int ret;
 
+#if defined(CONFIG_DM_REGULATOR)
+       struct udevice *phy_supply;
+
+       ret = device_get_supply_regulator(dev, "phy-supply",
+                                         &phy_supply);
+       if (ret) {
+               debug("%s: No phy supply\n", dev->name);
+       } else {
+               ret = regulator_set_enable(phy_supply, true);
+               if (ret) {
+                       puts("Error enabling phy supply\n");
+                       return ret;
+               }
+       }
+#endif
+
 #ifdef CONFIG_DM_PCI
        /*
         * If we are on PCI bus, either directly attached to a PCI root port,
index 93ba318bf5286bd11114cf5a94dad87497a99f27..6bb6a71470808d0ec9422173ce04c1dd931ec283 100644 (file)
@@ -66,12 +66,12 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
        if (port == FM1_DTSEC3)
                if ((rcwsr13 & FSL_CHASSIS2_RCWSR13_EC1) ==
                                FSL_CHASSIS2_RCWSR13_EC1_DTSEC3_RGMII) {
-                       return PHY_INTERFACE_MODE_RGMII;
+                       return PHY_INTERFACE_MODE_RGMII_TXID;
                }
        if (port == FM1_DTSEC4)
                if ((rcwsr13 & FSL_CHASSIS2_RCWSR13_EC2) ==
                                FSL_CHASSIS2_RCWSR13_EC2_DTSEC4_RGMII) {
-                       return PHY_INTERFACE_MODE_RGMII;
+                       return PHY_INTERFACE_MODE_RGMII_TXID;
                }
 
        /* handle SGMII */
index bf555548b7b4a9944251edb8ab8e0bc05a306f13..6c91fb97f4a56c95e167da28d969d75ff907fa6a 100644 (file)
@@ -72,12 +72,12 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
        if (port == FM1_DTSEC3)
                if ((rcwsr13 & FSL_CHASSIS2_RCWSR13_EC1) ==
                                FSL_CHASSIS2_RCWSR13_EC1_DTSEC3_RGMII)
-                       return PHY_INTERFACE_MODE_RGMII;
+                       return PHY_INTERFACE_MODE_RGMII_TXID;
 
        if (port == FM1_DTSEC4)
                if ((rcwsr13 & FSL_CHASSIS2_RCWSR13_EC2) ==
                                FSL_CHASSIS2_RCWSR13_EC2_DTSEC4_RGMII)
-                       return PHY_INTERFACE_MODE_RGMII;
+                       return PHY_INTERFACE_MODE_RGMII_TXID;
 
        /* handle SGMII, only MAC 2/5/6/9/10 available */
        switch (port) {
index 0a74e3e42e49f1110a0d53df7155d651484fac2f..8bf25c7040c9b2b2f5b67e446fcce86d8c1bca7e 100644 (file)
@@ -27,6 +27,7 @@
 
 #define MC_MEM_SIZE_ENV_VAR    "mcmemsize"
 #define MC_BOOT_TIMEOUT_ENV_VAR        "mcboottimeout"
+#define MC_BOOT_ENV_VAR                "mcinitcmd"
 
 DECLARE_GLOBAL_DATA_PTR;
 static int mc_boot_status = -1;
@@ -155,19 +156,142 @@ int parse_mc_firmware_fit_image(u64 mc_fw_addr,
 }
 #endif
 
-static int mc_fixup_dpc_mac_addr(void *blob, int noff, int dpmac_id,
-               struct eth_device *eth_dev)
+#define MC_DT_INCREASE_SIZE    64
+
+enum mc_fixup_type {
+       MC_FIXUP_DPL,
+       MC_FIXUP_DPC
+};
+
+static int mc_fixup_mac_addr(void *blob, int nodeoffset,
+                            const char *propname, struct eth_device *eth_dev,
+                            enum mc_fixup_type type)
 {
-       int nodeoffset, err = 0;
+       int err = 0, len = 0, size, i;
+       unsigned char env_enetaddr[ARP_HLEN];
+       unsigned int enetaddr_32[ARP_HLEN];
+       void *val = NULL;
+
+       switch (type) {
+       case MC_FIXUP_DPL:
+       /* DPL likes its addresses on 32 * ARP_HLEN bits */
+       for (i = 0; i < ARP_HLEN; i++)
+               enetaddr_32[i] = cpu_to_fdt32(eth_dev->enetaddr[i]);
+       val = enetaddr_32;
+       len = sizeof(enetaddr_32);
+       break;
+
+       case MC_FIXUP_DPC:
+       val = eth_dev->enetaddr;
+       len = ARP_HLEN;
+       break;
+       }
+
+       /* MAC address property present */
+       if (fdt_get_property(blob, nodeoffset, propname, NULL)) {
+               /* u-boot MAC addr randomly assigned - leave the present one */
+               if (!eth_getenv_enetaddr_by_index("eth", eth_dev->index,
+                                                 env_enetaddr))
+                       return err;
+       } else {
+               size = MC_DT_INCREASE_SIZE + strlen(propname) + len;
+               /* make room for mac address property */
+               err = fdt_increase_size(blob, size);
+               if (err) {
+                       printf("fdt_increase_size: err=%s\n",
+                              fdt_strerror(err));
+                       return err;
+               }
+       }
+
+       err = fdt_setprop(blob, nodeoffset, propname, val, len);
+       if (err) {
+               printf("fdt_setprop: err=%s\n", fdt_strerror(err));
+               return err;
+       }
+
+       return err;
+}
+
+#define is_dpni(s) (s != NULL ? !strncmp(s, "dpni@", 5) : 0)
+
+const char *dpl_get_connection_endpoint(void *blob, char *endpoint)
+{
+       int connoffset = fdt_path_offset(blob, "/connections"), off;
+       const char *s1, *s2;
+
+       for (off = fdt_first_subnode(blob, connoffset);
+            off >= 0;
+            off = fdt_next_subnode(blob, off)) {
+               s1 = fdt_stringlist_get(blob, off, "endpoint1", 0, NULL);
+               s2 = fdt_stringlist_get(blob, off, "endpoint2", 0, NULL);
+
+               if (!s1 || !s2)
+                       continue;
+
+               if (strcmp(endpoint, s1) == 0)
+                       return s2;
+
+               if (strcmp(endpoint, s2) == 0)
+                       return s1;
+       }
+
+       return NULL;
+}
+
+static int mc_fixup_dpl_mac_addr(void *blob, int dpmac_id,
+                                struct eth_device *eth_dev)
+{
+       int objoff = fdt_path_offset(blob, "/objects");
+       int dpmacoff = -1, dpnioff = -1;
+       const char *endpoint;
        char mac_name[10];
-       const char link_type_mode[] = "FIXED_LINK";
-       unsigned char env_enetaddr[6];
+       int err;
+
+       sprintf(mac_name, "dpmac@%d", dpmac_id);
+       dpmacoff = fdt_subnode_offset(blob, objoff, mac_name);
+       if (dpmacoff < 0)
+               /* dpmac not defined in DPL, so skip it. */
+               return 0;
+
+       err = mc_fixup_mac_addr(blob, dpmacoff, "mac_addr", eth_dev,
+                               MC_FIXUP_DPL);
+       if (err) {
+               printf("Error fixing up dpmac mac_addr in DPL\n");
+               return err;
+       }
+
+       /* now we need to figure out if there is any
+        * DPNI connected to this MAC, so we walk the
+        * connection list
+        */
+       endpoint = dpl_get_connection_endpoint(blob, mac_name);
+       if (!is_dpni(endpoint))
+               return 0;
+
+       /* let's see if we can fixup the DPNI as well */
+       dpnioff = fdt_subnode_offset(blob, objoff, endpoint);
+       if (dpnioff < 0)
+               /* DPNI not defined in DPL in the objects area */
+               return 0;
+
+       return mc_fixup_mac_addr(blob, dpnioff, "mac_addr", eth_dev,
+                                MC_FIXUP_DPL);
+}
+
+static int mc_fixup_dpc_mac_addr(void *blob, int dpmac_id,
+                                struct eth_device *eth_dev)
+{
+       int nodeoffset = fdt_path_offset(blob, "/board_info/ports"), noff;
+       int err = 0;
+       char mac_name[10];
+       const char link_type_mode[] = "MAC_LINK_TYPE_FIXED";
 
        sprintf(mac_name, "mac@%d", dpmac_id);
 
        /* node not found - create it */
-       nodeoffset = fdt_subnode_offset(blob, noff, (const char *) mac_name);
-       if (nodeoffset < 0) {
+       noff = fdt_subnode_offset(blob, nodeoffset, (const char *)mac_name);
+       if (noff < 0) {
                err = fdt_increase_size(blob, 200);
                if (err) {
                        printf("fdt_increase_size: err=%s\n",
@@ -175,10 +299,15 @@ static int mc_fixup_dpc_mac_addr(void *blob, int noff, int dpmac_id,
                        return err;
                }
 
-               nodeoffset = fdt_add_subnode(blob, noff, mac_name);
+               noff = fdt_add_subnode(blob, nodeoffset, mac_name);
+               if (noff < 0) {
+                       printf("fdt_add_subnode: err=%s\n",
+                              fdt_strerror(err));
+                       return err;
+               }
 
                /* add default property of fixed link */
-               err = fdt_appendprop_string(blob, nodeoffset,
+               err = fdt_appendprop_string(blob, noff,
                                            "link_type", link_type_mode);
                if (err) {
                        printf("fdt_appendprop_string: err=%s\n",
@@ -187,49 +316,53 @@ static int mc_fixup_dpc_mac_addr(void *blob, int noff, int dpmac_id,
                }
        }
 
-       /* port_mac_address property present in DPC */
-       if (fdt_get_property(blob, nodeoffset, "port_mac_address", NULL)) {
-               /* MAC addr randomly assigned - leave the one in DPC */
-               eth_getenv_enetaddr_by_index("eth", eth_dev->index,
-                                               env_enetaddr);
-               if (is_zero_ethaddr(env_enetaddr))
-                       return err;
+       return mc_fixup_mac_addr(blob, noff, "port_mac_address", eth_dev,
+                                MC_FIXUP_DPC);
+}
 
-               /* replace DPC MAC address with u-boot env one */
-               err = fdt_setprop(blob, nodeoffset, "port_mac_address",
-                                 eth_dev->enetaddr, 6);
-               if (err) {
-                       printf("fdt_setprop mac: err=%s\n", fdt_strerror(err));
-                       return err;
-               }
+static int mc_fixup_mac_addrs(void *blob, enum mc_fixup_type type)
+{
+       int i, err = 0, ret = 0;
+       char ethname[10];
+       struct eth_device *eth_dev;
 
-               return 0;
-       }
+       for (i = WRIOP1_DPMAC1; i < NUM_WRIOP_PORTS; i++) {
+               /* port not enabled */
+               if ((wriop_is_enabled_dpmac(i) != 1) ||
+                   (wriop_get_phy_address(i) == -1))
+                       continue;
 
-       /* append port_mac_address property to mac node in DPC */
-       err = fdt_increase_size(blob, 80);
-       if (err) {
-               printf("fdt_increase_size: err=%s\n", fdt_strerror(err));
-               return err;
-       }
+               sprintf(ethname, "DPMAC%d@%s", i,
+                       phy_interface_strings[wriop_get_enet_if(i)]);
 
-       err = fdt_appendprop(blob, nodeoffset,
-                            "port_mac_address", eth_dev->enetaddr, 6);
-       if (err) {
-               printf("fdt_appendprop: err=%s\n", fdt_strerror(err));
-               return err;
+               eth_dev = eth_get_dev_by_name(ethname);
+               if (eth_dev == NULL)
+                       continue;
+
+               switch (type) {
+               case MC_FIXUP_DPL:
+                       err = mc_fixup_dpl_mac_addr(blob, i, eth_dev);
+                       break;
+               case MC_FIXUP_DPC:
+                       err = mc_fixup_dpc_mac_addr(blob, i, eth_dev);
+                       break;
+               default:
+                       break;
+               }
+
+               if (err)
+                       printf("fsl-mc: ERROR fixing mac address for %s\n",
+                              ethname);
+               ret |= err;
        }
 
-       return err;
+       return ret;
 }
 
 static int mc_fixup_dpc(u64 dpc_addr)
 {
        void *blob = (void *)dpc_addr;
        int nodeoffset, err = 0;
-       char ethname[10];
-       struct eth_device *eth_dev;
-       int i;
 
        /* delete any existing ICID pools */
        nodeoffset = fdt_path_offset(blob, "/resources/icid_pools");
@@ -254,30 +387,9 @@ static int mc_fixup_dpc(u64 dpc_addr)
        /* fixup MAC addresses for dpmac ports */
        nodeoffset = fdt_path_offset(blob, "/board_info/ports");
        if (nodeoffset < 0)
-               goto out;
-
-       for (i = WRIOP1_DPMAC1; i < NUM_WRIOP_PORTS; i++) {
-               /* port not enabled */
-               if ((wriop_is_enabled_dpmac(i) != 1) ||
-                   (wriop_get_phy_address(i) == -1))
-                       continue;
-
-               sprintf(ethname, "DPMAC%d@%s", i,
-                       phy_interface_strings[wriop_get_enet_if(i)]);
-
-               eth_dev = eth_get_dev_by_name(ethname);
-               if (eth_dev == NULL)
-                       continue;
-
-               err = mc_fixup_dpc_mac_addr(blob, nodeoffset, i, eth_dev);
-               if (err) {
-                       printf("mc_fixup_dpc_mac_addr failed: err=%s\n",
-                       fdt_strerror(err));
-                       goto out;
-               }
-       }
+               return 0;
 
-out:
+       err = mc_fixup_mac_addrs(blob, MC_FIXUP_DPC);
        flush_dcache_range(dpc_addr, dpc_addr + fdt_totalsize(blob));
 
        return err;
@@ -340,6 +452,25 @@ static int load_mc_dpc(u64 mc_ram_addr, size_t mc_ram_size, u64 mc_dpc_addr)
        return 0;
 }
 
+
+static int mc_fixup_dpl(u64 dpl_addr)
+{
+       void *blob = (void *)dpl_addr;
+       u32 ver = fdt_getprop_u32_default(blob, "/", "dpl-version", 0);
+       int err = 0;
+
+       /* The DPL fixup for mac addresses is only relevant
+        * for old-style DPLs
+        */
+       if (ver >= 10)
+               return 0;
+
+       err = mc_fixup_mac_addrs(blob, MC_FIXUP_DPL);
+       flush_dcache_range(dpl_addr, dpl_addr + fdt_totalsize(blob));
+
+       return err;
+}
+
 static int load_mc_dpl(u64 mc_ram_addr, size_t mc_ram_size, u64 mc_dpl_addr)
 {
        u64 mc_dpl_offset;
@@ -386,6 +517,8 @@ static int load_mc_dpl(u64 mc_ram_addr, size_t mc_ram_size, u64 mc_dpl_addr)
                      (u64)dpl_fdt_hdr, dpl_size, mc_ram_addr + mc_dpl_offset);
 #endif /* not defined CONFIG_SYS_LS_MC_DPL_IN_DDR */
 
+       if (mc_fixup_dpl(mc_ram_addr + mc_dpl_offset))
+               return -EINVAL;
        dump_ram_words("DPL", (void *)(mc_ram_addr + mc_dpl_offset));
        return 0;
 }
@@ -1368,3 +1501,18 @@ U_BOOT_CMD(
        "fsl_mc lazyapply DPL [DPL_addr] - Apply DPL file on exit\n"
        "fsl_mc start aiop [FW_addr] - Start AIOP\n"
 );
+
+void mc_env_boot(void)
+{
+#if defined(CONFIG_FSL_MC_ENET)
+       char *mc_boot_env_var;
+       /* The MC may only be initialized in the reset PHY function
+        * because otherwise U-Boot has not yet set up all the MAC
+        * address info properly. Without MAC addresses, the MC code
+        * can not properly initialize the DPC.
+        */
+       mc_boot_env_var = getenv(MC_BOOT_ENV_VAR);
+       if (mc_boot_env_var)
+               run_command_list(mc_boot_env_var, -1, 0);
+#endif /* CONFIG_FSL_MC_ENET */
+}
index bbbdb74e9517604800fcf316f1d074c5431454c6..f9373db0b9370e7afcca58caba2c3928817b87d0 100644 (file)
@@ -450,7 +450,6 @@ static void macb_phy_reset(struct macb_device *macb, const char *name)
                       name, status);
 }
 
-#ifdef CONFIG_MACB_SEARCH_PHY
 static int macb_phy_find(struct macb_device *macb, const char *name)
 {
        int i;
@@ -471,7 +470,6 @@ static int macb_phy_find(struct macb_device *macb, const char *name)
 
        return 0;
 }
-#endif /* CONFIG_MACB_SEARCH_PHY */
 
 #ifdef CONFIG_DM_ETH
 static int macb_phy_init(struct udevice *dev, const char *name)
@@ -488,11 +486,9 @@ static int macb_phy_init(struct macb_device *macb, const char *name)
        int i;
 
        arch_get_mdio_control(name);
-#ifdef CONFIG_MACB_SEARCH_PHY
        /* Auto-detect phy_addr */
        if (!macb_phy_find(macb, name))
                return 0;
-#endif /* CONFIG_MACB_SEARCH_PHY */
 
        /* Check if the PHY is up to snuff... */
        phy_id = macb_mdio_read(macb, MII_PHYSID1);
@@ -667,7 +663,8 @@ static int _macb_init(struct macb_device *macb, const char *name)
                 * to select interface between RMII and MII.
                 */
 #ifdef CONFIG_DM_ETH
-               if (macb->phy_interface == PHY_INTERFACE_MODE_RMII)
+               if ((macb->phy_interface == PHY_INTERFACE_MODE_RMII) ||
+                   (macb->phy_interface == PHY_INTERFACE_MODE_RGMII))
                        gem_writel(macb, UR, GEM_BIT(RGMII));
                else
                        gem_writel(macb, UR, 0);
index 6dc7239cd7af6e5606b03eff8047ae8d551dc729..1b46218e4dd91b3ec32928f625b32f9cb2ba6d76 100644 (file)
@@ -442,7 +442,7 @@ do {                                                                        \
 /* MPCS registers */
 
 #define PCS40G_COMMON_CONTROL                  0x14
-#define      FORWARD_ERROR_CORRECTION_MASK     BIT(1)
+#define      FORWARD_ERROR_CORRECTION_MASK     BIT(10)
 
 #define PCS_CLOCK_RESET                                0x14c
 #define      TX_SD_CLK_RESET_MASK              BIT(0)
@@ -3251,7 +3251,7 @@ static int gop_xpcs_mode(struct mvpp2_port *port, int num_of_lanes)
 
        /* configure XG MAC mode */
        val = readl(port->priv->xpcs_base + MVPP22_XPCS_GLOBAL_CFG_0_REG);
-       val &= ~MVPP22_XPCS_PCSMODE_OFFS;
+       val &= ~MVPP22_XPCS_PCSMODE_MASK;
        val &= ~MVPP22_XPCS_LANEACTIVE_MASK;
        val |= (2 * lane) << MVPP22_XPCS_LANEACTIVE_OFFS;
        writel(val, port->priv->xpcs_base + MVPP22_XPCS_GLOBAL_CFG_0_REG);
@@ -4479,7 +4479,15 @@ static int mvpp2_rx_refill(struct mvpp2_port *port,
 /* Set hw internals when starting port */
 static void mvpp2_start_dev(struct mvpp2_port *port)
 {
-       mvpp2_gmac_max_rx_size_set(port);
+       switch (port->phy_interface) {
+       case PHY_INTERFACE_MODE_RGMII:
+       case PHY_INTERFACE_MODE_RGMII_ID:
+       case PHY_INTERFACE_MODE_SGMII:
+               mvpp2_gmac_max_rx_size_set(port);
+       default:
+               break;
+       }
+
        mvpp2_txp_max_tx_size_set(port);
 
        if (port->priv->hw_version == MVPP21)
@@ -4574,11 +4582,16 @@ static int mvpp2_open(struct udevice *dev, struct mvpp2_port *port)
                return err;
        }
 
-       err = mvpp2_phy_connect(dev, port);
-       if (err < 0)
-               return err;
+       if (port->phy_node) {
+               err = mvpp2_phy_connect(dev, port);
+               if (err < 0)
+                       return err;
 
-       mvpp2_link_event(port);
+               mvpp2_link_event(port);
+       } else {
+               mvpp2_egress_enable(port);
+               mvpp2_ingress_enable(port);
+       }
 
        mvpp2_start_dev(port);
 
@@ -4723,13 +4736,19 @@ static int phy_info_parse(struct udevice *dev, struct mvpp2_port *port)
        const char *phy_mode_str;
        int phy_node;
        u32 id;
-       u32 phyaddr;
+       u32 phyaddr = 0;
        int phy_mode = -1;
 
        phy_node = fdtdec_lookup_phandle(gd->fdt_blob, port_node, "phy");
-       if (phy_node < 0) {
-               dev_err(&pdev->dev, "missing phy\n");
-               return -ENODEV;
+
+       if (phy_node > 0) {
+               phyaddr = fdtdec_get_int(gd->fdt_blob, phy_node, "reg", 0);
+               if (phyaddr < 0) {
+                       dev_err(&pdev->dev, "could not find phy address\n");
+                       return -1;
+               }
+       } else {
+               phy_node = 0;
        }
 
        phy_mode_str = fdt_getprop(gd->fdt_blob, port_node, "phy-mode", NULL);
@@ -4755,8 +4774,6 @@ static int phy_info_parse(struct udevice *dev, struct mvpp2_port *port)
        port->phy_speed = fdtdec_get_int(gd->fdt_blob, port_node,
                                         "phy-speed", 1000);
 
-       phyaddr = fdtdec_get_int(gd->fdt_blob, phy_node, "reg", 0);
-
        port->id = id;
        if (port->priv->hw_version == MVPP21)
                port->first_rxq = port->id * rxq_number;
@@ -5316,7 +5333,14 @@ static int mvpp2_start(struct udevice *dev)
        /* Reconfigure parser accept the original MAC address */
        mvpp2_prs_update_mac_da(port, port->dev_addr);
 
-       mvpp2_port_power_up(port);
+       switch (port->phy_interface) {
+       case PHY_INTERFACE_MODE_RGMII:
+       case PHY_INTERFACE_MODE_RGMII_ID:
+       case PHY_INTERFACE_MODE_SGMII:
+               mvpp2_port_power_up(port);
+       default:
+               break;
+       }
 
        mvpp2_open(dev, port);
 
@@ -5479,7 +5503,8 @@ static int mvpp2_probe(struct udevice *dev)
                        port->gop_id * MVPP22_PORT_OFFSET;
 
                /* Set phy address of the port */
-               mvpp22_smi_phy_addr_cfg(port);
+               if(port->phy_node)
+                       mvpp22_smi_phy_addr_cfg(port);
 
                /* GoP Init */
                gop_port_init(port);
index d40fff0e48863fb79f26099899257ae4b32566a5..8866f6632fd22151e30dd2682f051921c6e85854 100644 (file)
@@ -117,15 +117,17 @@ static void pch_gbe_rx_descs_init(struct udevice *dev)
 
        memset(rx_desc, 0, sizeof(struct pch_gbe_rx_desc) * PCH_GBE_DESC_NUM);
        for (i = 0; i < PCH_GBE_DESC_NUM; i++)
-               rx_desc->buffer_addr = dm_pci_phys_to_mem(priv->dev,
-                       (ulong)(priv->rx_buff[i]));
+               rx_desc[i].buffer_addr = dm_pci_virt_to_mem(priv->dev,
+                       priv->rx_buff[i]);
 
-       writel(dm_pci_phys_to_mem(priv->dev, (ulong)rx_desc),
+       flush_dcache_range((ulong)rx_desc, (ulong)&rx_desc[PCH_GBE_DESC_NUM]);
+
+       writel(dm_pci_virt_to_mem(priv->dev, rx_desc),
               &mac_regs->rx_dsc_base);
        writel(sizeof(struct pch_gbe_rx_desc) * (PCH_GBE_DESC_NUM - 1),
               &mac_regs->rx_dsc_size);
 
-       writel(dm_pci_phys_to_mem(priv->dev, (ulong)(rx_desc + 1)),
+       writel(dm_pci_virt_to_mem(priv->dev, rx_desc + 1),
               &mac_regs->rx_dsc_sw_p);
 }
 
@@ -137,11 +139,13 @@ static void pch_gbe_tx_descs_init(struct udevice *dev)
 
        memset(tx_desc, 0, sizeof(struct pch_gbe_tx_desc) * PCH_GBE_DESC_NUM);
 
-       writel(dm_pci_phys_to_mem(priv->dev, (ulong)tx_desc),
+       flush_dcache_range((ulong)tx_desc, (ulong)&tx_desc[PCH_GBE_DESC_NUM]);
+
+       writel(dm_pci_virt_to_mem(priv->dev, tx_desc),
               &mac_regs->tx_dsc_base);
        writel(sizeof(struct pch_gbe_tx_desc) * (PCH_GBE_DESC_NUM - 1),
               &mac_regs->tx_dsc_size);
-       writel(dm_pci_phys_to_mem(priv->dev, (ulong)(tx_desc + 1)),
+       writel(dm_pci_virt_to_mem(priv->dev, tx_desc + 1),
               &mac_regs->tx_dsc_sw_p);
 }
 
@@ -245,24 +249,28 @@ static int pch_gbe_send(struct udevice *dev, void *packet, int length)
        u32 int_st;
        ulong start;
 
+       flush_dcache_range((ulong)packet, (ulong)packet + length);
+
        tx_head = &priv->tx_desc[0];
        tx_desc = &priv->tx_desc[priv->tx_idx];
 
        if (length < 64)
                frame_ctrl |= PCH_GBE_TXD_CTRL_APAD;
 
-       tx_desc->buffer_addr = dm_pci_phys_to_mem(priv->dev, (ulong)packet);
+       tx_desc->buffer_addr = dm_pci_virt_to_mem(priv->dev, packet);
        tx_desc->length = length;
        tx_desc->tx_words_eob = length + 3;
        tx_desc->tx_frame_ctrl = frame_ctrl;
        tx_desc->dma_status = 0;
        tx_desc->gbec_status = 0;
 
+       flush_dcache_range((ulong)tx_desc, (ulong)&tx_desc[1]);
+
        /* Test the wrap-around condition */
        if (++priv->tx_idx >= PCH_GBE_DESC_NUM)
                priv->tx_idx = 0;
 
-       writel(dm_pci_phys_to_mem(priv->dev, (ulong)(tx_head + priv->tx_idx)),
+       writel(dm_pci_virt_to_mem(priv->dev, tx_head + priv->tx_idx),
               &mac_regs->tx_dsc_sw_p);
 
        start = get_timer(0);
@@ -283,7 +291,8 @@ static int pch_gbe_recv(struct udevice *dev, int flags, uchar **packetp)
        struct pch_gbe_priv *priv = dev_get_priv(dev);
        struct pch_gbe_regs *mac_regs = priv->mac_regs;
        struct pch_gbe_rx_desc *rx_desc;
-       ulong hw_desc, buffer_addr, length;
+       ulong hw_desc, length;
+       void *buffer;
 
        rx_desc = &priv->rx_desc[priv->rx_idx];
 
@@ -291,12 +300,16 @@ static int pch_gbe_recv(struct udevice *dev, int flags, uchar **packetp)
        hw_desc = readl(&mac_regs->rx_dsc_hw_p_hld);
 
        /* Just return if not receiving any packet */
-       if ((ulong)rx_desc == hw_desc)
+       if (virt_to_phys(rx_desc) == hw_desc)
                return -EAGAIN;
 
-       buffer_addr = dm_pci_mem_to_phys(priv->dev, rx_desc->buffer_addr);
-       *packetp = (uchar *)buffer_addr;
+       /* Invalidate the descriptor */
+       invalidate_dcache_range((ulong)rx_desc, (ulong)&rx_desc[1]);
+
        length = rx_desc->rx_words_eob - 3 - ETH_FCS_LEN;
+       buffer = dm_pci_mem_to_virt(priv->dev, rx_desc->buffer_addr, length, 0);
+       invalidate_dcache_range((ulong)buffer, (ulong)buffer + length);
+       *packetp = (uchar *)buffer;
 
        return length;
 }
@@ -315,7 +328,7 @@ static int pch_gbe_free_pkt(struct udevice *dev, uchar *packet, int length)
        if (++rx_swp >= PCH_GBE_DESC_NUM)
                rx_swp = 0;
 
-       writel(dm_pci_phys_to_mem(priv->dev, (ulong)(rx_head + rx_swp)),
+       writel(dm_pci_virt_to_mem(priv->dev, rx_head + rx_swp),
               &mac_regs->rx_dsc_sw_p);
 
        return 0;
@@ -422,6 +435,7 @@ int pch_gbe_probe(struct udevice *dev)
        struct pch_gbe_priv *priv;
        struct eth_pdata *plat = dev_get_platdata(dev);
        void *iobase;
+       int err;
 
        /*
         * The priv structure contains the descriptors and frame buffers which
@@ -444,6 +458,10 @@ int pch_gbe_probe(struct udevice *dev)
        pch_gbe_mdio_init(dev->name, priv->mac_regs);
        priv->bus = miiphy_get_dev_by_name(dev->name);
 
+       err = pch_gbe_reset(dev);
+       if (err)
+               return err;
+
        return pch_gbe_phy_init(dev);
 }
 
index aca3990aebf12296701c1d48d44522bd966f7551..1afd8097b2fa7d8bcafbb30b16190c3e4e061bff 100644 (file)
@@ -57,6 +57,40 @@ config PHY_MARVELL
 
 config PHY_MICREL
        bool "Micrel Ethernet PHYs support"
+       help
+         Enable support for the GbE PHYs manufactured by Micrel (now
+         a part of Microchip). This includes drivers for the KSZ804,
+         KSZ8031, KSZ8051, KSZ8081, KSZ8895, KSZ886x, KSZ8721
+         either/or KSZ9021 (see the "Micrel KSZ9021 family support"
+         config option for details), and KSZ9031 (if configured).
+
+if PHY_MICREL
+
+config PHY_MICREL_KSZ9021
+       bool "Micrel KSZ9021 family support"
+       select PHY_GIGE
+       help
+         Enable support for the Micrel KSZ9021 GbE PHY family.  If
+         enabled, the extended register read/write for KSZ9021 PHYs
+         is supported through the 'mdio' command and any RGMII signal
+         delays configured in the device tree will be applied to the
+         PHY during initialisation.
+
+         Note that the KSZ9021 uses the same part number os the
+         KSZ8921BL, so enabling this option disables support for the
+         KSZ8721BL.
+
+config PHY_MICREL_KSZ9031
+       bool "Micrel KSZ9031 family support"
+       select PHY_GIGE
+       help
+         Enable support for the Micrel KSZ9031 GbE PHY family.  If
+         enabled, the extended register read/write for KSZ9021 PHYs
+         is supported through the 'mdio' command and any RGMII signal
+         delays configured in the device tree will be applied to the
+         PHY during initialisatioin.
+
+endif # PHY_MICREL
 
 config PHY_MSCC
        bool "Microsemi Corp Ethernet PHYs support"
index ab0c44354c3494f70a4629e2ada0e5f767bd6602..8041922a02dc6ff533536dd5c96a0df3cfdd0438 100644 (file)
@@ -13,6 +13,8 @@
 
 #define PHY_AUTONEGOTIATE_TIMEOUT 5000
 
+#define MII_MARVELL_PHY_PAGE           22
+
 /* 88E1011 PHY Status Register */
 #define MIIM_88E1xxx_PHY_STATUS                0x11
 #define MIIM_88E1xxx_PHYSTAT_SPEED     0xc000
 #define MIIM_88E1310_PHY_PAGE          22
 
 /* 88E151x PHY defines */
+/* Page 2 registers */
+#define MIIM_88E151x_PHY_MSCR          21
+#define MIIM_88E151x_RGMII_RX_DELAY    BIT(5)
+#define MIIM_88E151x_RGMII_TX_DELAY    BIT(4)
+#define MIIM_88E151x_RGMII_RXTX_DELAY  (BIT(5) | BIT(4))
 /* Page 3 registers */
 #define MIIM_88E151x_LED_FUNC_CTRL     16
 #define MIIM_88E151x_LED_FLD_SZ                4
@@ -295,6 +302,8 @@ void m88e1518_phy_writebits(struct phy_device *phydev,
 
 static int m88e1518_config(struct phy_device *phydev)
 {
+       u16 reg;
+
        /*
         * As per Marvell Release Notes - Alaska 88E1510/88E1518/88E1512
         * /88E1514 Rev A0, Errata Section 3.1
@@ -331,7 +340,41 @@ static int m88e1518_config(struct phy_device *phydev)
                udelay(100);
        }
 
-       return m88e1111s_config(phydev);
+       if (phydev->interface == PHY_INTERFACE_MODE_SGMII) {
+               reg = phy_read(phydev, MDIO_DEVAD_NONE,
+                              MIIM_88E1111_PHY_EXT_SR);
+
+               reg &= ~(MIIM_88E1111_HWCFG_MODE_MASK);
+               reg |= MIIM_88E1111_HWCFG_MODE_SGMII_NO_CLK;
+               reg |= MIIM_88E1111_HWCFG_FIBER_COPPER_AUTO;
+
+               phy_write(phydev, MDIO_DEVAD_NONE,
+                         MIIM_88E1111_PHY_EXT_SR, reg);
+       }
+
+       if (phy_interface_is_rgmii(phydev)) {
+               phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE, 2);
+
+               reg = phy_read(phydev, MDIO_DEVAD_NONE, MIIM_88E151x_PHY_MSCR);
+               reg &= ~MIIM_88E151x_RGMII_RXTX_DELAY;
+               if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)
+                       reg |= MIIM_88E151x_RGMII_RXTX_DELAY;
+               else if (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID)
+                       reg |= MIIM_88E151x_RGMII_RX_DELAY;
+               else if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID)
+                       reg |= MIIM_88E151x_RGMII_TX_DELAY;
+               phy_write(phydev, MDIO_DEVAD_NONE, MIIM_88E151x_PHY_MSCR, reg);
+
+               phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE, 0);
+       }
+
+       /* soft reset */
+       phy_reset(phydev);
+
+       genphy_config_aneg(phydev);
+       genphy_restart_aneg(phydev);
+
+       return 0;
 }
 
 /* Marvell 88E1510 */
index 1bb7fa576f581903a6e12c8b129dc7d9c9cd3131..f6bbcdc48eded15e2ed78d842c37b1b6ad46bea9 100644 (file)
@@ -192,7 +192,7 @@ static u32 phy_setup_op(struct zynq_gem_priv *priv, u32 phy_addr, u32 regnum,
        int err;
 
        err = wait_for_bit(__func__, &regs->nwsr, ZYNQ_GEM_NWSR_MDIOIDLE_MASK,
-                           true, 20000, true);
+                           true, 20000, false);
        if (err)
                return err;
 
@@ -205,7 +205,7 @@ static u32 phy_setup_op(struct zynq_gem_priv *priv, u32 phy_addr, u32 regnum,
        writel(mgtcr, &regs->phymntnc);
 
        err = wait_for_bit(__func__, &regs->nwsr, ZYNQ_GEM_NWSR_MDIOIDLE_MASK,
-                           true, 20000, true);
+                           true, 20000, false);
        if (err)
                return err;
 
@@ -407,10 +407,6 @@ static int zynq_gem_init(struct udevice *dev)
                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);
@@ -587,14 +583,12 @@ __weak int zynq_board_read_rom_ethaddr(unsigned char *ethaddr)
 
 static int zynq_gem_read_rom_mac(struct udevice *dev)
 {
-       int retval;
        struct eth_pdata *pdata = dev_get_platdata(dev);
 
-       retval = zynq_board_read_rom_ethaddr(pdata->enetaddr);
-       if (retval == -ENOSYS)
-               retval = 0;
+       if (!pdata)
+               return -ENOSYS;
 
-       return retval;
+       return zynq_board_read_rom_ethaddr(pdata->enetaddr);
 }
 
 static int zynq_gem_miiphy_read(struct mii_dev *bus, int addr,
index 4f0a27892f2e8e19de9f3605b0de94cdaeb1b018..24e764dc7c59ea2aa5bc0d3bdb885cb65bb1185a 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <malloc.h>
 #include <command.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/arch/immap_ls102xa.h>
 #endif
 
+#ifdef CONFIG_SYS_QE_FMAN_FW_IN_MMC
+#include <mmc.h>
+#endif
+
 #define MPC85xx_DEVDISR_QE_DISABLE     0x1
 
 qe_map_t               *qe_immr = NULL;
@@ -194,8 +199,37 @@ void u_qe_init(void)
 {
        qe_immr = (qe_map_t *)(CONFIG_SYS_IMMR + QE_IMMR_OFFSET);
 
-       u_qe_upload_firmware((const void *)CONFIG_SYS_QE_FW_ADDR);
+       void *addr = (void *)CONFIG_SYS_QE_FW_ADDR;
+#ifdef CONFIG_SYS_QE_FMAN_FW_IN_MMC
+       int dev = CONFIG_SYS_MMC_ENV_DEV;
+       u32 cnt = CONFIG_SYS_QE_FMAN_FW_LENGTH / 512;
+       u32 blk = CONFIG_SYS_QE_FW_ADDR / 512;
+
+       if (mmc_initialize(gd->bd)) {
+               printf("%s: mmc_initialize() failed\n", __func__);
+               return;
+       }
+       addr = malloc(CONFIG_SYS_QE_FMAN_FW_LENGTH);
+       struct mmc *mmc = find_mmc_device(CONFIG_SYS_MMC_ENV_DEV);
+
+       if (!mmc) {
+               free(addr);
+               printf("\nMMC cannot find device for ucode\n");
+       } else {
+               printf("\nMMC read: dev # %u, block # %u, count %u ...\n",
+                      dev, blk, cnt);
+               mmc_init(mmc);
+               (void)mmc->block_dev.block_read(&mmc->block_dev, blk, cnt,
+                                               addr);
+               /* flush cache after read */
+               flush_cache((ulong)addr, cnt * 512);
+       }
+#endif
+       u_qe_upload_firmware(addr);
        out_be32(&qe_immr->iram.iready, QE_IRAM_READY);
+#ifdef CONFIG_SYS_QE_FMAN_FW_IN_MMC
+       free(addr);
+#endif
 }
 #endif
 
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..e7978aae67d27ac9aed8b66f3e5acee6db39e3db 100644 (file)
@@ -0,0 +1,24 @@
+config FS_FAT
+       bool "Enable FAT filesystem support"
+       help
+         This provides support for reading images from File Allocation Table
+         (FAT) filesystem. FAT filesystem is a legacy, lightweight filesystem.
+         It is useful mainly for its wide compatibility with various operating
+         systems. You can also enable CMD_FAT to get access to fat commands.
+
+config FAT_WRITE
+       bool "Enable FAT filesystem write support"
+       depends on FS_FAT
+       help
+         This provides support for creating and writing new files to an
+         existing FAT filesystem partition.
+
+config FS_FAT_MAX_CLUSTSIZE
+       int "Set maximum possible clusersize"
+       default 65536
+       depends on FS_FAT
+       help
+         Set the maximum possible clustersize for the FAT filesytem. This
+         is the smallest amount of disk space that can be used to hold a
+         file. Unless you have an extremely tight memory memory constraints,
+         leave the default.
index 5a698a8349ab2751486f842a5a1415e097466d57..2656c75b3005a8fcb2c1593a79564167224b310b 100644 (file)
 #define CONFIG_SYS_BAUDRATE_TABLE      { 9600, 19200, 38400, 57600, 115200 }
 #endif
 
-#if defined(CONFIG_CMD_FAT) && !defined(CONFIG_FS_FAT)
+#if defined(CONFIG_ENV_IS_IN_FAT) && !defined(CONFIG_FS_FAT)
 #define CONFIG_FS_FAT
 #endif
 
+#if defined(CONFIG_ENV_IS_IN_FAT) && !defined(CONFIG_FAT_WRITE)
+#define CONFIG_FAT_WRITE
+#endif
+
 #if (defined(CONFIG_CMD_EXT4) || defined(CONFIG_CMD_EXT2)) && \
                                                !defined(CONFIG_FS_EXT4)
 #define CONFIG_FS_EXT4
index 25f63e8311425ebdaf50e76bd0df4a39c4744c1c..1d8e39c2035256d245c3234f500280518ef5c808 100644 (file)
@@ -75,7 +75,6 @@
 #define FAT_ENV_INTERFACE              "mmc"
 #define FAT_ENV_DEVICE_AND_PART                "0:1"
 #define FAT_ENV_FILE                   "uboot.env"
-#define CONFIG_FAT_WRITE
 
 #define CONFIG_SPL_LDSCRIPT            "arch/arm/mach-omap2/u-boot-spl.lds"
 
index 2c49729caab5fffd6a7c9c21e0ad923cb7256e22..c3cade9ea6b14a8473081a7791195b3c6f611794 100644 (file)
@@ -50,9 +50,6 @@
 #define CONFIG_TFTP_BLOCKSIZE          16352
 #define CONFIG_TFTP_TSIZE
 
-/* Miscellaneous commands */
-#define CONFIG_FAT_WRITE
-
 #undef CONFIG_IPADDR
 #define CONFIG_IPADDR          192.168.10.2
 #define CONFIG_NETMASK         255.255.255.0
index 83a09153b4cdb6275912e354302135cc033982f6..8be586b51f898a3a21ac9a50bd8bc82c7e8ebe58 100644 (file)
@@ -66,7 +66,6 @@
 
 #define CONFIG_SUPPORT_EMMC_BOOT       /* eMMC specific */
 #define CONFIG_BOUNCE_BUFFER
-#define CONFIG_FAT_WRITE
 
 #ifdef CONFIG_MX6Q
 #define CONFIG_CMD_SATA
index cdb50cc28b8e94fccdcc9658228bc7d4cacc7558..9772d8b5c3918649114962d5a7b5ab35ed017d9f 100644 (file)
@@ -46,9 +46,6 @@
 #define CONFIG_TFTP_BLOCKSIZE          16352
 #define CONFIG_TFTP_TSIZE
 
-/* Miscellaneous commands */
-#define CONFIG_FAT_WRITE
-
 /* Increase console I/O buffer size */
 #undef CONFIG_SYS_CBSIZE
 #define CONFIG_SYS_CBSIZE              1024
index dbd4d843ebdeee9c6d85539a0f83c763796ff066..dea8130046557c7858d99e13883d250f1c6dd9d9 100644 (file)
@@ -54,7 +54,6 @@
 #else
 /* u-boot env in sd/mmc card */
 #define CONFIG_ENV_IS_IN_FAT
-#define CONFIG_FAT_WRITE
 #define FAT_ENV_INTERFACE      "mmc"
 #define FAT_ENV_DEVICE_AND_PART        "0"
 #define FAT_ENV_FILE           "uboot.env"
index 010ebdbd40f01c03c5455d6fb27d26b3cd684b06..a0c5b9afae1baff03808eb5619e60b9ea8e05157 100644 (file)
 #define FAT_ENV_DEVICE_AND_PART        "0"
 #define FAT_ENV_FILE           "uboot.env"
 #define CONFIG_ENV_IS_IN_FAT
-#define CONFIG_FAT_WRITE
 #define CONFIG_ENV_SIZE                0x4000
 
 #define CONFIG_BOOTARGS                "console=ttyS0,115200 " \
index 411d7412afd0abaee122f563102fdf4772993f5f..50ddbd647595738fb215681082e8982e7a139d00 100644 (file)
 #else
 /* Use file in FAT file to save environment */
 #define CONFIG_ENV_IS_IN_FAT
-#define CONFIG_FAT_WRITE
 #define FAT_ENV_INTERFACE              "mmc"
 #define FAT_ENV_FILE                   "uboot.env"
 #define FAT_ENV_DEVICE_AND_PART                "0"
index 7dcf7913de19321f697445fc5ec55f8a0d7f68c9..8a8eb7c34fd96293c4a3f66f2311916a6a60a23b 100644 (file)
 
 /* bootstrap + u-boot + env + linux in mmc */
 #define CONFIG_ENV_IS_IN_FAT
-#define CONFIG_FAT_WRITE
 #define FAT_ENV_INTERFACE      "mmc"
 #define FAT_ENV_FILE           "uboot.env"
 #define FAT_ENV_DEVICE_AND_PART        "0"
index 33cc5fc7aae8e8ddcb1105630f8a7d0f884cd7da..fd2dbed1374dff37604b70e4d380d4d493763e61 100644 (file)
 #else /* CONFIG_SYS_USE_MMC */
 /* bootstrap + u-boot + env + linux in mmc */
 #define CONFIG_ENV_IS_IN_FAT
-#define CONFIG_FAT_WRITE
 #define FAT_ENV_INTERFACE      "mmc"
 #define FAT_ENV_FILE           "uboot.env"
 #define FAT_ENV_DEVICE_AND_PART "0"
index 9a36a4c5d75027ede84b38dc86be79fe15fbdeac..02ae65ff5771f83aff18ee00a7e1de97e643c6d2 100644 (file)
 /* Initial upstream - boot to cmd prompt only */
 #define CONFIG_BOOTCOMMAND             ""
 
-/* Commands */
-#define CONFIG_FAT_WRITE
-
 #undef CONFIG_USB_GADGET_VBUS_DRAW
 #define CONFIG_USB_GADGET_VBUS_DRAW    0
 #define CONFIG_USBID_ADDR              0x34052c46
index bb61e5b8c8c6a40683452451824019df151ec369..5a85f7fa9c05324dc12c909bb85bcff000773ed2 100644 (file)
 /* Initial upstream - boot to cmd prompt only */
 #define CONFIG_BOOTCOMMAND             ""
 
-/* Commands */
-#define CONFIG_FAT_WRITE
-
 #define CONFIG_USBID_ADDR              0x34052c46
 
 #endif /* __BCM28155_AP_H */
index fa7eff54289660e985a9bca0feb0a8903d7e6ddf..2afbbea140a652f6ccbc8cdeb84fdca2aa0b1bc2 100644 (file)
@@ -62,9 +62,6 @@
 
 #define CONFIG_MX_CYCLIC
 
-/* Commands */
-#define CONFIG_FAT_WRITE
-
 /* Enable Time Command */
 
 /* Misc utility code */
index 521d097f8a9643bcbcfe7f673500117992c0ba56..10e8f88810ed3773f2b812ce42cc4d9cc22648ba 100644 (file)
@@ -276,7 +276,6 @@ MMCARGS
  * enabled a number of useful commands and support.
  */
 #if defined(CONFIG_MMC) || defined(CONFIG_USB_STORAGE)
-#define CONFIG_FAT_WRITE
 #define CONFIG_FS_EXT4
 #define CONFIG_EXT4_WRITE
 #endif /* CONFIG_MMC, ... */
index 99846890e0f7ed438c3998df5512ebe6bcf24fe7..5814d748d9585cb9978167449685a57c3caa52fd 100644 (file)
@@ -118,12 +118,5 @@ BUR_COMMON_ENV \
 #define CONFIG_ENV_OFFSET              0x40000 /* TODO: Adresse definieren */
 #define CONFIG_ENV_OFFSET_REDUND       (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
-/*
- * Common filesystems support.  When we have removable storage we
- * enabled a number of useful commands and support.
- */
-#if defined(CONFIG_MMC) || defined(CONFIG_USB_STORAGE)
-#define CONFIG_FAT_WRITE
-#endif /* CONFIG_MMC, ... */
 
 #endif /* __CONFIG_BRXRE1_H__ */
index 8f4022a1348ba5c1ebd1961675f152568dc232e9..82812e577a9598708d4a3a313b3868fcf92c6259 100644 (file)
@@ -64,7 +64,6 @@
 
 #define CONFIG_SUPPORT_EMMC_BOOT       /* eMMC specific */
 #define CONFIG_BOUNCE_BUFFER
-#define CONFIG_FAT_WRITE
 
 /* Network */
 #define CONFIG_FEC_MXC
index 03f6863169d3d2324832e2d71cc40be5032a6d0a..7355f78fcf040a68fb8e076ad96f5151b876f778 100644 (file)
 #define CONFIG_LZO
 #define CONFIG_RBTREE
 
-/* Debug commands */
-
-/* Miscellaneous commands */
-#define CONFIG_FAT_WRITE
 
 #define BOARD_EXTRA_ENV_SETTINGS \
        "mtdparts=" MTDPARTS_DEFAULT "\0"
index 853cd5287800eb04d5f9010bbe5902c560b41b4c..53ff33e4b9d9d373f30ba8602950b7fc0a123d9e 100644 (file)
@@ -44,9 +44,6 @@
 #define CONFIG_TFTP_BLOCKSIZE          16352
 #define CONFIG_TFTP_TSIZE
 
-/* Miscellaneous commands */
-#define CONFIG_FAT_WRITE
-
 /* Increase console I/O buffer size */
 #undef CONFIG_SYS_CBSIZE
 #define CONFIG_SYS_CBSIZE              1024
index c892b5faa9f617ce3175e8a84c2d231f6bba60ba..92ce1273c63376121483557431405087eb3c7103 100644 (file)
@@ -94,7 +94,6 @@
 #define CONFIG_CMD_NAND_LOCK_UNLOCK    /* nand (un)lock commands       */
 
 #undef CONFIG_SUPPORT_RAW_INITRD
-#undef CONFIG_FAT_WRITE
 
 /* BOOTP/DHCP options */
 #define CONFIG_BOOTP_SUBNETMASK
index 4c874367fd2db8a84caafaf8623732d7a5df731f..133b2b023ca123b91bb1c133574e547a6c2958db 100644 (file)
@@ -24,7 +24,6 @@
  * Commands configuration
  */
 #define CONFIG_CMD_EXT2
-#define CONFIG_CMD_FAT
 
 /*
  * mv-plug-common.h should be defined after CMD configs since it used them
index a0152a4a43e94b00855cd0d018e41702b7263482..1662dbf1971bed0c94aedf32064891c76cb65b1a 100644 (file)
@@ -87,8 +87,6 @@
        "led4=60,0,1\0" \
        "led5=63,0,1\0"
 
-#undef CONFIG_CMD_FAT
-
 /* Physical Memory Map */
 #define CONFIG_MAX_RAM_BANK_SIZE       (1024 << 20)    /* 1GB */
 
index ade66a43309d8ee5fe5135515e10962a336f36cf..031586b0dfc4112469d7243353cff4bde6329977 100644 (file)
@@ -41,9 +41,6 @@
 /* PWM */
 #define CONFIG_PWM
 
-/* Command definition*/
-#define CONFIG_FAT_WRITE
-
 /* Miscellaneous configurable options */
 #define CONFIG_SYS_CBSIZE              1024    /* Console I/O Buffer Size */
 #define CONFIG_SYS_PBSIZE              1024    /* Print Buffer Size */
index 0fb6fb3b60cd39aaddc9318c0d3e105dc4e36ede..2b4fec4bd4239a4d12e7497d06fa93c8b50bfb30 100644 (file)
 #define FAT_ENV_INTERFACE               "mmc"
 #define FAT_ENV_DEVICE_AND_PART         "1:1"
 #define FAT_ENV_FILE                    "uboot.env"
-#define CONFIG_FAT_WRITE
 #define CONFIG_ENV_VARS_UBOOT_CONFIG
 
 /* Monitor Command Prompt */
index 3a7993e8290c9135b73167064490a6e4073ad3c5..b186bfc891516b9275593c1173908683533f26f2 100644 (file)
        "name_uboot=u-boot-spi-k2e-evm.gph\0"                           \
        "name_fs=arago-console-image-k2e-evm.cpio.gz\0"
 
+#define CONFIG_ENV_SIZE                                (256 << 10)  /* 256 KiB */
+#define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_OFFSET                      0x100000
+
 #include <configs/ti_armv7_keystone2.h>
 
 /* SPL SPI Loader Configuration */
index bee1be794bafd7aa441733e1911e9b2f88b55102..1cc35769840ff0834a1407788d99784b7233d5a8 100644 (file)
@@ -48,8 +48,6 @@
        "get_pmmc_${boot} run_pmmc get_mon_${boot} run_mon "            \
        "get_fdt_${boot} get_kern_${boot} run_kern"
 
-#include <configs/ti_armv7_keystone2.h>
-
 /* SPL SPI Loader Configuration */
 #define CONFIG_SPL_TEXT_BASE           0x0c080000
 
@@ -63,8 +61,8 @@
 #define CONFIG_PHY_MICREL
 #define PHY_ANEG_TIMEOUT       10000 /* PHY needs longer aneg time */
 
-#undef CONFIG_ENV_IS_IN_NAND
 #define CONFIG_ENV_IS_IN_FAT
+#define CONFIG_ENV_SIZE                        (256 << 10)  /* 256 KiB */
 #define FAT_ENV_INTERFACE              "mmc"
 #define FAT_ENV_DEVICE_AND_PART                "0:1"
 #define FAT_ENV_FILE                   "uboot.env"
@@ -80,4 +78,7 @@
 #endif
 
 #define SPI_MTD_PARTS  KEYSTONE_SPI1_MTD_PARTS
+
+#include <configs/ti_armv7_keystone2.h>
+
 #endif /* __CONFIG_K2G_EVM_H */
index 202167bdef790e0fc1808a40f0e3aca68bc09c82..9598bc6976e9e29f741211cc9b602f01d8fc8eec 100644 (file)
        "name_uboot=u-boot-spi-k2hk-evm.gph\0"                          \
        "name_fs=arago-console-image-k2hk-evm.cpio.gz\0"
 
+#define CONFIG_ENV_SIZE                                (256 << 10)  /* 256 KiB */
+#define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_OFFSET                      0x100000
+
 #include <configs/ti_armv7_keystone2.h>
 
 /* SPL SPI Loader Configuration */
index a7ccdd117cd2c17e2175bd7eeba89671dae7d893..d054276e61eb5f7a825623b83dc79a2445384860 100644 (file)
        "name_uboot=u-boot-spi-k2l-evm.gph\0"                           \
        "name_fs=arago-console-image-k2l-evm.cpio.gz\0"
 
+#define CONFIG_ENV_SIZE                                (256 << 10)  /* 256 KiB */
+#define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_OFFSET                      0x100000
+
 #include <configs/ti_armv7_keystone2.h>
 
 /* SPL SPI Loader Configuration */
index d6839c09160a29089a14fa8706500c72ada9dcb9..c1ec2d440cd823302f0d36b56c02773c6227c84d 100644 (file)
 #define CONFIG_SYS_SCSI_MAX_DEVICE     (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
                CONFIG_SYS_SCSI_MAX_LUN)
 
-#define CONFIG_CMD_FAT
-
 /* SPI */
 #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
 #define CONFIG_SPI_FLASH_SPANSION
index 8cf4eaa0218583ff724e0e1486a87bb8d39ed620..152954165cc802e978a68a653508e32b95474f2f 100644 (file)
@@ -125,6 +125,7 @@ unsigned long get_board_ddr_clk(void);
 #if !defined(CONFIG_SD_BOOT) && !defined(CONFIG_NAND_BOOT) && \
        !defined(CONFIG_QSPI_BOOT)
 #define CONFIG_U_QE
+#define CONFIG_SYS_QE_FMAN_FW_IN_NOR
 #endif
 
 /*
index f0033b85d8e931dc61e400722aaea23e87f188e8..067ef4df93c32a6ceb04c02064521de825352c29 100644 (file)
 #if !defined(CONFIG_SD_BOOT) && !defined(CONFIG_NAND_BOOT) && \
        !defined(CONFIG_QSPI_BOOT)
 #define CONFIG_U_QE
+#define CONFIG_SYS_QE_FMAN_FW_IN_NOR
 #endif
 
 /*
index 1b0106d5ab0b345e115277f4d955d8228f75ed5e..7fd3464fa594e9fcef352bfc6d459ee62e91beb7 100644 (file)
  */
 #define CONFIG_SYS_QE_FMAN_FW_IN_MMC
 #define CONFIG_SYS_FMAN_FW_ADDR                (512 * 0x4800)
+#define CONFIG_SYS_QE_FW_ADDR          (512 * 0x4a08)
 #elif defined(CONFIG_QSPI_BOOT)
 #define CONFIG_SYS_QE_FW_IN_SPIFLASH
 #define CONFIG_SYS_FMAN_FW_ADDR                0x40900000
 #define CONFIG_SYS_QE_FMAN_FW_IN_NOR
 /* FMan fireware Pre-load address */
 #define CONFIG_SYS_FMAN_FW_ADDR                0x60900000
+#define CONFIG_SYS_QE_FW_ADDR          0x60940000
 #endif
 #define CONFIG_SYS_QE_FMAN_FW_LENGTH   0x10000
 #define CONFIG_SYS_FDT_PAD             (0x3000 + CONFIG_SYS_QE_FMAN_FW_LENGTH)
index 2647b150b46a7498f9292baede3ed4bd3e86517f..deae7873588ee5d11a8819f4fdcb5df765d8bf5d 100644 (file)
 
 /* QE */
 #ifndef SPL_NO_QE
-#if !defined(CONFIG_SD_BOOT) && !defined(CONFIG_NAND_BOOT) && \
-       !defined(CONFIG_QSPI_BOOT)
+#if !defined(CONFIG_NAND_BOOT) && !defined(CONFIG_QSPI_BOOT)
 #define CONFIG_U_QE
 #endif
-#define CONFIG_SYS_QE_FW_ADDR     0x60940000
 #endif
 
 /* USB */
 #define CONFIG_LIBATA
 #define CONFIG_SCSI_AHCI
 #define CONFIG_CMD_SCSI
-#ifndef CONFIG_CMD_FAT
-#define CONFIG_CMD_FAT
-#endif
 #ifndef CONFIG_CMD_EXT2
 #define CONFIG_CMD_EXT2
 #endif
index b044768883f01b76929f51d001632c1de59b3e90..e311d0b149b01acbd9da9f0332256749646d9802 100644 (file)
@@ -156,6 +156,11 @@ unsigned long long get_qixis_addr(void);
 #define CONFIG_SYS_LS_MC_AIOP_IMG_MAX_LENGTH   0x200000
 #define CONFIG_SYS_LS_MC_DRAM_AIOP_IMG_OFFSET  0x07000000
 
+/* Define phy_reset function to boot the MC based on mcinitcmd.
+ * This happens late enough to properly fixup u-boot env MAC addresses.
+ */
+#define CONFIG_RESET_PHY_R
+
 /*
  * Carve out a DDR region which will not be used by u-boot/Linux
  *
@@ -203,9 +208,16 @@ unsigned long long get_qixis_addr(void);
                                "earlycon=uart8250,mmio,0x21c0500 " \
                                "ramdisk_size=0x2000000 default_hugepagesz=2m" \
                                " hugepagesz=2m hugepages=256"
+#ifdef CONFIG_SD_BOOT
+#define CONFIG_BOOTCOMMAND     "mmc read 0x80200000 0x6800 0x800;"\
+                               " fsl_mc apply dpl 0x80200000 &&" \
+                               " mmc read $kernel_load $kernel_start" \
+                               " $kernel_size && bootm $kernel_load"
+#else
 #define CONFIG_BOOTCOMMAND     "fsl_mc apply dpl 0x580d00000 &&" \
                                " cp.b $kernel_start $kernel_load" \
                                " $kernel_size && bootm $kernel_load"
+#endif
 
 /* Monitor Command Prompt */
 #define CONFIG_SYS_CBSIZE              512     /* Console I/O Buffer Size */
@@ -228,8 +240,10 @@ unsigned long long get_qixis_addr(void);
 #define CONFIG_SPL_TARGET              "u-boot-with-spl.bin"
 #define CONFIG_SPL_TEXT_BASE           0x1800a000
 
+#ifdef CONFIG_NAND_BOOT
 #define CONFIG_SYS_NAND_U_BOOT_DST     0x80400000
 #define CONFIG_SYS_NAND_U_BOOT_START   CONFIG_SYS_NAND_U_BOOT_DST
+#endif
 #define CONFIG_SYS_SPL_MALLOC_SIZE     0x00100000
 #define CONFIG_SYS_SPL_MALLOC_START    0x80200000
 #define CONFIG_SYS_MONITOR_LEN         (640 * 1024)
index d0b0aa93e463c807a09b319c909570835f767b53..8a8ee9d351f9144b0459b1854e9c970989c5c340 100644 (file)
@@ -166,12 +166,14 @@ unsigned long get_board_ddr_clk(void);
 #define QIXIS_LBMAP_DFLTBANK           0x00
 #define QIXIS_LBMAP_ALTBANK            0x04
 #define QIXIS_LBMAP_NAND               0x09
+#define QIXIS_LBMAP_SD                 0x00
 #define QIXIS_LBMAP_QSPI               0x0f
 #define QIXIS_RST_CTL_RESET            0x31
 #define QIXIS_RCFG_CTL_RECONFIG_IDLE   0x20
 #define QIXIS_RCFG_CTL_RECONFIG_START  0x21
 #define QIXIS_RCFG_CTL_WATCHDOG_ENBLE  0x08
 #define QIXIS_RCW_SRC_NAND             0x107
+#define QIXIS_RCW_SRC_SD               0x40
 #define QIXIS_RCW_SRC_QSPI             0x62
 #define        QIXIS_RST_FORCE_MEM             0x01
 
@@ -198,7 +200,8 @@ unsigned long get_board_ddr_clk(void);
                                        FTIM2_GPCM_TWP(0x3E))
 #define CONFIG_SYS_CS3_FTIM3           0x0
 
-#if defined(CONFIG_SPL) && defined(CONFIG_NAND)
+#if defined(CONFIG_SPL)
+#if defined(CONFIG_NAND_BOOT)
 #define CONFIG_SYS_CSPR1_EXT           CONFIG_SYS_NOR0_CSPR_EXT
 #define CONFIG_SYS_CSPR1               CONFIG_SYS_NOR0_CSPR_EARLY
 #define CONFIG_SYS_CSPR1_FINAL         CONFIG_SYS_NOR0_CSPR
@@ -234,6 +237,12 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_SPL_PAD_TO              0x20000
 #define CONFIG_SYS_NAND_U_BOOT_OFFS    (256 * 1024)
 #define CONFIG_SYS_NAND_U_BOOT_SIZE    (640 * 1024)
+#elif defined(CONFIG_SD_BOOT)
+#define CONFIG_ENV_OFFSET              0x200000
+#define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SYS_MMC_ENV_DEV         0
+#define CONFIG_ENV_SIZE                        0x20000
+#endif
 #else
 #define CONFIG_SYS_CSPR0_EXT           CONFIG_SYS_NOR0_CSPR_EXT
 #define CONFIG_SYS_CSPR0               CONFIG_SYS_NOR0_CSPR_EARLY
@@ -366,6 +375,22 @@ unsigned long get_board_ddr_clk(void);
        "esbc_validate 0x580740000;"            \
        "fsl_mc start mc 0x580a00000"           \
        " 0x580e00000 \0"
+#elif defined(CONFIG_SD_BOOT)
+#define CONFIG_EXTRA_ENV_SETTINGS              \
+       "hwconfig=fsl_ddr:bank_intlv=auto\0"    \
+       "loadaddr=0x90100000\0"                 \
+       "kernel_addr=0x800\0"                \
+       "ramdisk_addr=0x800000\0"               \
+       "ramdisk_size=0x2000000\0"              \
+       "fdt_high=0xa0000000\0"                 \
+       "initrd_high=0xffffffffffffffff\0"      \
+       "kernel_start=0x8000\0"              \
+       "kernel_load=0xa0000000\0"              \
+       "kernel_size=0x14000\0"               \
+       "mcinitcmd=mmcinfo;mmc read 0x80000000 0x5000 0x800;"  \
+       "mmc read 0x80100000 0x7000 0x800;" \
+       "fsl_mc start mc 0x80000000 0x80100000\0"       \
+       "mcmemsize=0x70000000 \0"
 #else
 #define CONFIG_EXTRA_ENV_SETTINGS              \
        "hwconfig=fsl_ddr:bank_intlv=auto\0"    \
@@ -384,7 +409,7 @@ unsigned long get_board_ddr_clk(void);
 #endif /* CONFIG_SECURE_BOOT */
 
 
-#ifdef CONFIG_FSL_MC_ENET
+#if defined(CONFIG_FSL_MC_ENET) && !defined(CONFIG_SPL_BUILD)
 #define CONFIG_FSL_MEMAC
 #define        CONFIG_PHYLIB
 #define CONFIG_PHYLIB_10G
index c4717238bb5c90aa5993d6b01a8d2d76ec332744..8dea0313a346f6af149b95338bab2cc787d6c13f 100644 (file)
@@ -14,8 +14,6 @@
 #define CONFIG_TIMESTAMP               /* Print image info with timestamp */
 
 /* U-Boot Commands */
-#define CONFIG_FAT_WRITE
-
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_NAND_TRIMFFS
 
index b237cea1da259ac7967633bad63a914bed87ad1a..51812257e19989e5a1ac99303d57963dc76ddbb7 100644 (file)
@@ -20,8 +20,6 @@
 /*
  * U-Boot Commands
  */
-#define CONFIG_FAT_WRITE
-
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_NAND_TRIMFFS
 #define CONFIG_CMD_SATA
index 6dc1fb047e80d10d2634da1569227865e97ae2a8..bb661400ec4d18d75c9ea0f7981503b9a5debe33 100644 (file)
 #undef CONFIG_BOOTARGS
 #define CONFIG_SYS_USE_SERIALFLASH     1
 
-/*
- * U-Boot Commands
- */
-#define CONFIG_FAT_WRITE
-
 /*
  * Memory configurations
  */
index 37f365dc55ba5b85fe266dc4e9f66b1e25cf787f..288a8894d17e938750645b7bc0819677294f596a 100644 (file)
@@ -45,9 +45,6 @@
 #define CONFIG_ENV_IS_IN_MMC
 #define CONFIG_ENV_SIZE                        SZ_8K
 
-#define CONFIG_CMD_FAT
-#define CONFIG_DOS_PARTITION
-
 /* Using ULP WDOG for reset */
 #define WDOG_BASE_ADDR                 WDG1_RBASE
 
index 6cb1807a8e6c9bca321077c960f8b37d2a2a68f5..1f1bf15af7bc9ebd911c32fb7da473a18de981b1 100644 (file)
@@ -17,7 +17,6 @@
 #include "mx6_common.h"
 
 /* U-Boot Commands */
-#define CONFIG_FAT_WRITE
 #define CONFIG_CMD_PCI
 #define CONFIG_CMD_SATA
 
index 2dcc6c4539cead26ecd71c0e716a26017f8c8a66..c5bfdec8fa878ce9268203a3ca41ca2b627ce2e5 100644 (file)
@@ -90,8 +90,6 @@
  */
 /* FAT FS */
 #define CONFIG_SUPPORT_VFAT
-#define CONFIG_FS_FAT
-#define CONFIG_FAT_WRITE
 
 /* EXT4 FS */
 #define CONFIG_FS_EXT4
index 998a7a344b2b9e7a05fd8afc8f49fc80708fafd9..c83e559a5ac726fd3d842346250e1586692530ac 100644 (file)
 #define FAT_ENV_DEVICE_AND_PART        "0"
 #define FAT_ENV_FILE           "uboot.env"
 #define CONFIG_ENV_IS_IN_FAT
-#define CONFIG_FAT_WRITE
 #define CONFIG_ENV_SIZE                0x4000
 
 #define CONFIG_BOOTARGS                "console=ttyS0,115200 " \
index 3a719c0b37d47c6e365c067fff4572ea66595ea7..365950d7298a0bb29a13e7261e8799f78a60269f 100644 (file)
@@ -14,7 +14,6 @@
 #define CONFIG_CMD_SDRAM
 
 /* Support File sytems */
-#define CONFIG_FAT_WRITE
 #define CONFIG_SUPPORT_VFAT
 #define CONFIG_FS_EXT4
 #define CONFIG_EXT4_WRITE
index e73bc6185631151fec258d41287aa849cfe590ff..8da3e7a2355730dde588346ccc561ecd9b6df693 100644 (file)
@@ -13,7 +13,6 @@
 #include <asm/arch/rmobile.h>
 
 #define CONFIG_CMD_SDRAM
-#define CONFIG_CMD_FAT
 #define CONFIG_CMD_EXT2
 #define CONFIG_CMD_EXT4
 #define CONFIG_CMD_EXT4_WRITE
@@ -24,7 +23,6 @@
 #define CONFIG_SUPPORT_RAW_INITRD
 
 /* Support File sytems */
-#define CONFIG_FAT_WRITE
 #define CONFIG_SUPPORT_VFAT
 #define CONFIG_FS_EXT4
 #define CONFIG_EXT4_WRITE
index 2893f80c9f23ad2792925980002898b51a6a2ccb..836c5e3fed453e70bfdb7e02f7f0042103bbdf45 100644 (file)
@@ -36,8 +36,6 @@
 /* MMC/SD IP block */
 #define CONFIG_BOUNCE_BUFFER
 
-#define CONFIG_FAT_WRITE
-
 #define CONFIG_SYS_SDRAM_BASE          0x60000000
 #define CONFIG_NR_DRAM_BANKS           1
 #define SDRAM_BANK_SIZE                        (512UL << 20UL)
index 81a1553390b28aeb7d1e18b6ad457617e243a264..a1e0eb7c8d68f093aeae10a175337dfe5a53cade 100644 (file)
@@ -61,8 +61,6 @@
 /* MMC/SD IP block */
 #define CONFIG_BOUNCE_BUFFER
 
-#define CONFIG_FAT_WRITE
-
 #define CONFIG_SYS_SDRAM_BASE          0x60000000
 #define CONFIG_NR_DRAM_BANKS           1
 #define SDRAM_BANK_SIZE                        (2UL << 30)
index 4cf71fa17e150427b8ccf63e21a049d36d9bfa3c..ecf2675255120349ec166bbfd68ce3e4b3fb87b8 100644 (file)
@@ -38,8 +38,6 @@
 /* MMC/SD IP block */
 #define CONFIG_BOUNCE_BUFFER
 
-#define CONFIG_FAT_WRITE
-
 /* RAW SD card / eMMC locations. */
 #define CONFIG_SYS_SPI_U_BOOT_OFFS     (128 << 10)
 
index b0dcd4820986ec23ecd6026f40ce31917e3349a3..7ccbc9b241ca855e45877b97743de74508a03361 100644 (file)
@@ -28,8 +28,6 @@
 #define CONFIG_BOUNCE_BUFFER
 
 #define CONFIG_SUPPORT_VFAT
-#define CONFIG_FS_FAT
-#define CONFIG_FAT_WRITE
 #define CONFIG_FS_EXT4
 
 /* RAW SD card / eMMC locations. */
index 49f56f23de5b9036f971ba165bfbe21edec88b2e..7a8a442336a119aedffa067a11a0cb9c9d07a811 100644 (file)
@@ -43,8 +43,6 @@
 #define CONFIG_ROCKCHIP_SDHCI_MAX_FREQ 200000000
 
 #define CONFIG_SUPPORT_VFAT
-#define CONFIG_FS_FAT
-#define CONFIG_FAT_WRITE
 #define CONFIG_FS_EXT4
 
 /* RAW SD card / eMMC locations. */
index 7b9017ff99f98ab375a118e7cfc165a555faff57..d715eaad14f4d3c25f0fecc853c838cf0a367b28 100644 (file)
@@ -97,7 +97,6 @@
 #define FAT_ENV_INTERFACE              "mmc"
 #define FAT_ENV_DEVICE_AND_PART                "0:1"
 #define FAT_ENV_FILE                   "uboot.env"
-#define CONFIG_FAT_WRITE
 #define CONFIG_ENV_VARS_UBOOT_CONFIG
 #define CONFIG_SYS_LOAD_ADDR           0x1000000
 #define CONFIG_PREBOOT                 "usb start"
index e49b3d95803bf40d449eb5c7f288b9a1793e8ffc..c328e43dd64f9cb6c77ac49760de6df4eff31c7d 100644 (file)
 #define CONFIG_SYS_ONENAND_BASE                0xB0000000
 
 /* write support for filesystems */
-#define CONFIG_FAT_WRITE
 #define CONFIG_EXT4_WRITE
 
 /* GPT */
index 57fa67d234bedec88b8b6e0754de7dfb2f77e293..7607f946405a120e09a90ba51839ab6950ad8b49 100644 (file)
 #define CONFIG_USB_ETH_RNDIS
 #define CONFIG_USBNET_MANUFACTURER      "Atmel SAMA5D2_PTC"
 
-#if defined(CONFIG_CMD_USB)
-#define CONFIG_CMD_FAT
-#endif
-
 /* Ethernet Hardware */
 #define CONFIG_MACB
 #define CONFIG_RMII
index 074c7568f04d24ae1c0cefad8ec957b40b7763f3..fbe26cae21b8b7196e41e5504eb04673028700e2 100644 (file)
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS     2
 #endif
 
-#if defined(CONFIG_CMD_USB) || defined(CONFIG_CMD_MMC)
-#define CONFIG_FAT_WRITE
-#endif
-
 #define CONFIG_SYS_LOAD_ADDR                   0x22000000 /* load address */
 
 #if CONFIG_SYS_USE_NANDFLASH
index 9540a4a0ff9097312fe9e3dbfe58ff21764e68e4..891d6a0f79acf0226d66f5835b46037a556e4849 100644 (file)
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS     3
 #endif
 
-#if defined(CONFIG_CMD_USB) || defined(CONFIG_CMD_MMC)
-#define CONFIG_FAT_WRITE
-#endif
-
 #define CONFIG_SYS_LOAD_ADDR                   0x22000000 /* load address */
 
 #ifdef CONFIG_SYS_USE_SERIALFLASH
index fbbd6cd99b8e7405abfd1902d9fb809e1d47f6d8..31ceb5402f7f674faaeaa16c6ffce5cbefff2a86 100644 (file)
@@ -29,8 +29,6 @@
 
 #define CONFIG_CMD_PCI
 
-#define CONFIG_FS_FAT
-#define CONFIG_FAT_WRITE
 #define CONFIG_FS_EXT4
 #define CONFIG_EXT4_WRITE
 #define CONFIG_HOST_MAX_DEVICES 4
index 91618676752f981372ab33a41ac80eea99cb1114..b5705b71693c986e56cd06fc82a0582d29d8574a 100644 (file)
 
 #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION     1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME        "u-boot.img"
-#define CONFIG_FS_FAT
 
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x20000
index 99b5b23d2940b85d670c8ebbb932de2642b2924b..4e0b9b12525791754527addad416110fc4e7cf2c 100644 (file)
 /* Command line configuration */
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_DHCP
-#define CONFIG_CMD_FAT
 #define CONFIG_CMD_USB
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_MMC
index 7ea780b48b1a7ed9c06c3ba7d16111302ceeb5f7..3b59b6a1069f309db4402a81fb48e95db7cc8f77 100644 (file)
@@ -8,8 +8,7 @@
 #define __CONFIG_SOCFGPA_ARRIA10_H__
 
 #include <asm/arch/base_addr_a10.h>
-/* U-Boot Commands */
-#define CONFIG_FAT_WRITE
+
 #define CONFIG_HW_WATCHDOG
 
 /* Booting Linux */
index b60d007478dfcfd5773676956069dad4b0ad16ae..fe4031910b63b5ff09b262c345a573945aa0e4f8 100644 (file)
@@ -8,8 +8,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-/* U-Boot Commands */
-#define CONFIG_FAT_WRITE
 #define CONFIG_HW_WATCHDOG
 
 /* Memory configurations */
index dfe4980b85a0f33bb273c947e22a251b83d65342..be565211219631369e4f9c5766333821ad05be4b 100644 (file)
@@ -8,8 +8,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-/* U-Boot Commands */
-#define CONFIG_FAT_WRITE
 #define CONFIG_HW_WATCHDOG
 
 /* Memory configurations */
index dd5933d43c24fd91c4f57405ccf57882b7fc2c58..320c585a397866b58f0c767bca03d21c20b107f0 100644 (file)
@@ -8,8 +8,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-/* U-Boot Commands */
-#define CONFIG_FAT_WRITE
 #define CONFIG_HW_WATCHDOG
 
 /* Memory configurations */
index 302ec200bdee25cb4d434d65b562ada7bfcbbf38..ef693b00380fc71b04e1c3ea3027450bb026d74d 100644 (file)
@@ -8,8 +8,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-/* U-Boot Commands */
-#define CONFIG_FAT_WRITE
 #define CONFIG_HW_WATCHDOG
 
 /* Memory configurations */
index 014828bc08279c873d8cf873baaa31e7f05b6a57..522ac74ffef54365078d72bd7c92047d66d7bf81 100644 (file)
@@ -8,8 +8,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-/* U-Boot Commands */
-#define CONFIG_FAT_WRITE
 #define CONFIG_HW_WATCHDOG
 
 /* Memory configurations */
index 3585eeb3c4ac7ccdf28a9121d3978a28823ee58f..68403aa744c3417aa9f9d2ad36642bc0531401bc 100644 (file)
@@ -9,8 +9,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-/* U-Boot Commands */
-#define CONFIG_FAT_WRITE
 #define CONFIG_HW_WATCHDOG
 
 /* Memory configurations */
index 2d367026b6eb49992d0cef832468f163d4d5d707..ee85708b7a0a5c1f589838158c0a676878a829a8 100644 (file)
@@ -8,8 +8,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-/* U-Boot Commands */
-#define CONFIG_FAT_WRITE
 #define CONFIG_HW_WATCHDOG
 
 /* Memory configurations */
index c9fc5c90d96371f3d4bbf12106f5d2c21a6f7c06..c75acc0749def305b52d1dc5753495a0809e7bff 100644 (file)
@@ -8,8 +8,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-/* U-Boot Commands */
-#define CONFIG_FAT_WRITE
 #define CONFIG_HW_WATCHDOG
 
 /* Memory configurations */
index 5dc929852bcac73cdd7d1605d83017832e2a3784..a08fa9ff4ccc5dbf432bdc9c36ba1d75888de1ef 100644 (file)
@@ -8,8 +8,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-/* U-Boot Commands */
-#define CONFIG_FAT_WRITE
 #define CONFIG_HW_WATCHDOG
 
 /* Memory configurations */
index 64e1595cbe79a1db3723a8c15c69e1a8634b3288..4366061f77ea6332c485d4a62088701855805f51 100644 (file)
@@ -8,8 +8,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-#define CONFIG_FAT_WRITE
-
 #define CONFIG_HW_WATCHDOG
 
 /* Memory configurations */
index 251dd0e901b18e7fc2e25f4c7173fe5fd9985c3e..e2bdfb12f91f151f0d881ef3681a666f2b5a5304 100644 (file)
@@ -8,8 +8,6 @@
 
 #include <asm/arch/base_addr_ac5.h>
 
-/* U-Boot Commands */
-#define CONFIG_FAT_WRITE
 #define CONFIG_HW_WATCHDOG
 
 /* Memory configurations */
index f042f0d0c29fba459b1ca0aa33185f1e480fb8b2..9b514ff37ac6b14dc2336788c2783ad249a0e87e 100644 (file)
 
 #define CONFIG_SYS_MONITOR_LEN         (768 << 10)     /* 768 KiB */
 
-#define CONFIG_FAT_WRITE       /* enable write access */
-
 #define CONFIG_SPL_FRAMEWORK
 
 #ifndef CONFIG_ARM64           /* AArch64 FEL support is not ready yet */
index 1a4a7e23205aa21c55600dc8e38d6ed090ff06fe..c03efd852a66b40b1bb39bde751ae7e3f7407343 100644 (file)
 #ifdef CONFIG_FS_EXT4
 #undef CONFIG_FS_EXT4
 #endif
-#ifdef CONFIG_FS_FAT
-#undef CONFIG_FS_FAT
-#endif
 
 /* remove USB */
 #ifdef CONFIG_USB_EHCI_TEGRA
index 7ca5c0b9dac22589dc2228530b68f3a6f29dfef8..723435e0ae2cc1f31afa1ff266af4d1ab783a77a 100644 (file)
@@ -99,7 +99,6 @@
 
 #ifndef CONFIG_SPL_BUILD
 #include <config_distro_defaults.h>
-#define CONFIG_FAT_WRITE
 #endif
 
 #endif /* _TEGRA_COMMON_H_ */
index 2303970d889b75030b0cb5c3ba84bdfeb9bce920..68eb08f8126f466ee474424ecc799568d34f8a41 100644 (file)
@@ -50,8 +50,6 @@
 
 #define CONFIG_CMD_ASKENV
 
-#define CONFIG_FS_FAT
-
 /*
  * Only one of the following two options (DDR3/DDR2) should be enabled
  * CONFIG_TI816X_EVM_DDR2
index 0bd3c9f94cfacf257e48fd8dd06366ec114b3ab1..5321ed6b091978fae9ae6c196138d554a301007c 100644 (file)
 
 #define CONFIG_SUPPORT_RAW_INITRD
 
-/*
- * Common filesystems support.  When we have removable storage we
- * enabled a number of useful commands and support.
- */
-#if defined(CONFIG_MMC) || defined(CONFIG_USB_STORAGE)
-#define CONFIG_FAT_WRITE
-#endif
-
 /*
  * Our platforms make use of SPL to initalize the hardware (primarily
  * memory) enough for full U-Boot to be loaded. We make use of the general
index 06b9bba80c41822152d9cd9adae2fc7f46219ad0..ac8dabd9caebb7db2f5f046dbf6d188e887463ec 100644 (file)
 #define CONFIG_SYS_MAX_NAND_DEVICE             1
 #define CONFIG_SYS_NAND_MAX_CHIPS              1
 #define CONFIG_SYS_NAND_NO_SUBPAGE_WRITE
-#define CONFIG_ENV_SIZE                                (256 << 10)  /* 256 KiB */
-#define CONFIG_ENV_IS_IN_NAND
-#define CONFIG_ENV_OFFSET                      0x100000
 #define CONFIG_MTD_PARTITIONS
 #define CONFIG_RBTREE
 #define CONFIG_LZO
 /* USB Configuration */
 #define CONFIG_USB_XHCI_KEYSTONE
 #define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS     2
-#define CONFIG_FS_FAT
 #define CONFIG_USB_SS_BASE                     KS2_USB_SS_BASE
 #define CONFIG_USB_HOST_XHCI_BASE              KS2_USB_HOST_XHCI_BASE
 #define CONFIG_DEV_USB_PHY_BASE                        KS2_DEV_USB_PHY_BASE
index bc57e8a73a6daadcdf36cc0a0791e652e32bbba9..e45b506eba9217849aa8cd8e2e5c87b27b846121 100644 (file)
 
 /* USB */
 #define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS     4
-#define CONFIG_FAT_WRITE
 
 /* SD/MMC */
 #define CONFIG_SUPPORT_EMMC_BOOT
index 1b436205401124c00729bfa598c21f10614c25fe..c56cd8c98bf704a9ea9cc5482eabb4f1d71c9ed9 100644 (file)
 # define FAT_ENV_INTERFACE             "mmc"
 #endif
 
-#if defined(CONFIG_MMC_SDHCI_ZYNQ) || defined(CONFIG_ZYNQMP_USB)
-# define CONFIG_FAT_WRITE
-#endif
-
 #ifdef CONFIG_NAND_ARASAN
 # define CONFIG_CMD_NAND_LOCK_UNLOCK
 # define CONFIG_SYS_MAX_NAND_DEVICE    1
index df4765c0760b9be1f327e4ffa854a4689c77e6cc..4b6b08885134125187fb38a82a4e4a983c6483e5 100644 (file)
 
 #if defined(CONFIG_MMC_SDHCI_ZYNQ) || defined(CONFIG_ZYNQ_USB)
 # define CONFIG_SUPPORT_VFAT
-# define CONFIG_FAT_WRITE
 #endif
 
 #if defined(CONFIG_ZYNQ_I2C0) || defined(CONFIG_ZYNQ_I2C1)
diff --git a/include/dt-bindings/clock/sun50i-a64-ccu.h b/include/dt-bindings/clock/sun50i-a64-ccu.h
new file mode 100644 (file)
index 0000000..370c0a0
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2016 Maxime Ripard <maxime.ripard@free-electrons.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef _DT_BINDINGS_CLK_SUN50I_A64_H_
+#define _DT_BINDINGS_CLK_SUN50I_A64_H_
+
+#define CLK_BUS_MIPI_DSI       28
+#define CLK_BUS_CE             29
+#define CLK_BUS_DMA            30
+#define CLK_BUS_MMC0           31
+#define CLK_BUS_MMC1           32
+#define CLK_BUS_MMC2           33
+#define CLK_BUS_NAND           34
+#define CLK_BUS_DRAM           35
+#define CLK_BUS_EMAC           36
+#define CLK_BUS_TS             37
+#define CLK_BUS_HSTIMER                38
+#define CLK_BUS_SPI0           39
+#define CLK_BUS_SPI1           40
+#define CLK_BUS_OTG            41
+#define CLK_BUS_EHCI0          42
+#define CLK_BUS_EHCI1          43
+#define CLK_BUS_OHCI0          44
+#define CLK_BUS_OHCI1          45
+#define CLK_BUS_VE             46
+#define CLK_BUS_TCON0          47
+#define CLK_BUS_TCON1          48
+#define CLK_BUS_DEINTERLACE    49
+#define CLK_BUS_CSI            50
+#define CLK_BUS_HDMI           51
+#define CLK_BUS_DE             52
+#define CLK_BUS_GPU            53
+#define CLK_BUS_MSGBOX         54
+#define CLK_BUS_SPINLOCK       55
+#define CLK_BUS_CODEC          56
+#define CLK_BUS_SPDIF          57
+#define CLK_BUS_PIO            58
+#define CLK_BUS_THS            59
+#define CLK_BUS_I2S0           60
+#define CLK_BUS_I2S1           61
+#define CLK_BUS_I2S2           62
+#define CLK_BUS_I2C0           63
+#define CLK_BUS_I2C1           64
+#define CLK_BUS_I2C2           65
+#define CLK_BUS_SCR            66
+#define CLK_BUS_UART0          67
+#define CLK_BUS_UART1          68
+#define CLK_BUS_UART2          69
+#define CLK_BUS_UART3          70
+#define CLK_BUS_UART4          71
+#define CLK_BUS_DBG            72
+#define CLK_THS                        73
+#define CLK_NAND               74
+#define CLK_MMC0               75
+#define CLK_MMC1               76
+#define CLK_MMC2               77
+#define CLK_TS                 78
+#define CLK_CE                 79
+#define CLK_SPI0               80
+#define CLK_SPI1               81
+#define CLK_I2S0               82
+#define CLK_I2S1               83
+#define CLK_I2S2               84
+#define CLK_SPDIF              85
+#define CLK_USB_PHY0           86
+#define CLK_USB_PHY1           87
+#define CLK_USB_HSIC           88
+#define CLK_USB_HSIC_12M       89
+
+#define CLK_USB_OHCI0          91
+
+#define CLK_USB_OHCI1          93
+
+#define CLK_DRAM_VE            95
+#define CLK_DRAM_CSI           96
+#define CLK_DRAM_DEINTERLACE   97
+#define CLK_DRAM_TS            98
+#define CLK_DE                 99
+#define CLK_TCON0              100
+#define CLK_TCON1              101
+#define CLK_DEINTERLACE                102
+#define CLK_CSI_MISC           103
+#define CLK_CSI_SCLK           104
+#define CLK_CSI_MCLK           105
+#define CLK_VE                 106
+#define CLK_AC_DIG             107
+#define CLK_AC_DIG_4X          108
+#define CLK_AVS                        109
+#define CLK_HDMI               110
+#define CLK_HDMI_DDC           111
+
+#define CLK_DSI_DPHY           113
+#define CLK_GPU                        114
+
+#endif /* _DT_BINDINGS_CLK_SUN50I_H_ */
diff --git a/include/dt-bindings/reset/sun50i-a64-ccu.h b/include/dt-bindings/reset/sun50i-a64-ccu.h
new file mode 100644 (file)
index 0000000..db60b29
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2016 Maxime Ripard <maxime.ripard@free-electrons.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef _DT_BINDINGS_RST_SUN50I_A64_H_
+#define _DT_BINDINGS_RST_SUN50I_A64_H_
+
+#define RST_USB_PHY0           0
+#define RST_USB_PHY1           1
+#define RST_USB_HSIC           2
+#define RST_DRAM               3
+#define RST_MBUS               4
+#define RST_BUS_MIPI_DSI       5
+#define RST_BUS_CE             6
+#define RST_BUS_DMA            7
+#define RST_BUS_MMC0           8
+#define RST_BUS_MMC1           9
+#define RST_BUS_MMC2           10
+#define RST_BUS_NAND           11
+#define RST_BUS_DRAM           12
+#define RST_BUS_EMAC           13
+#define RST_BUS_TS             14
+#define RST_BUS_HSTIMER                15
+#define RST_BUS_SPI0           16
+#define RST_BUS_SPI1           17
+#define RST_BUS_OTG            18
+#define RST_BUS_EHCI0          19
+#define RST_BUS_EHCI1          20
+#define RST_BUS_OHCI0          21
+#define RST_BUS_OHCI1          22
+#define RST_BUS_VE             23
+#define RST_BUS_TCON0          24
+#define RST_BUS_TCON1          25
+#define RST_BUS_DEINTERLACE    26
+#define RST_BUS_CSI            27
+#define RST_BUS_HDMI0          28
+#define RST_BUS_HDMI1          29
+#define RST_BUS_DE             30
+#define RST_BUS_GPU            31
+#define RST_BUS_MSGBOX         32
+#define RST_BUS_SPINLOCK       33
+#define RST_BUS_DBG            34
+#define RST_BUS_LVDS           35
+#define RST_BUS_CODEC          36
+#define RST_BUS_SPDIF          37
+#define RST_BUS_THS            38
+#define RST_BUS_I2S0           39
+#define RST_BUS_I2S1           40
+#define RST_BUS_I2S2           41
+#define RST_BUS_I2C0           42
+#define RST_BUS_I2C1           43
+#define RST_BUS_I2C2           44
+#define RST_BUS_SCR            45
+#define RST_BUS_UART0          46
+#define RST_BUS_UART1          47
+#define RST_BUS_UART2          48
+#define RST_BUS_UART3          49
+#define RST_BUS_UART4          50
+
+#endif /* _DT_BINDINGS_RST_SUN50I_A64_H_ */
index e38f3808af2524463507848b89044f37433f54e8..71879f01cac159ece96d87418069869099375fc5 100644 (file)
@@ -18,9 +18,6 @@
 #define VFAT_MAXSEQ            9   /* Up to 9 of 13 2-byte UTF-16 entries */
 #define PREFETCH_BLOCKS                2
 
-#ifndef CONFIG_FS_FAT_MAX_CLUSTSIZE
-#define CONFIG_FS_FAT_MAX_CLUSTSIZE 65536
-#endif
 #define MAX_CLUSTSIZE  CONFIG_FS_FAT_MAX_CLUSTSIZE
 
 #define DIRENTSPERBLOCK        (mydata->sect_size / sizeof(dir_entry))
index ffe6da54b76a996a21f8a5ad00c3bdafc452c196..60088ecf8326196de83f9a3721a9e438f4ba1483 100644 (file)
@@ -61,4 +61,5 @@ u64 mc_get_dram_addr(void);
 unsigned long mc_get_dram_block_size(void);
 int fsl_mc_ldpaa_init(bd_t *bis);
 int fsl_mc_ldpaa_exit(bd_t *bd);
+void mc_env_boot(void);
 #endif
index c3cc3152a280155dcb6659cb69570034a3b83dea..b659961a5dd4dd883c933f5dad3e3a2754bc2d89 100644 (file)
@@ -181,7 +181,7 @@ int eth_get_dev_index(void)
 
 static int eth_write_hwaddr(struct udevice *dev)
 {
-       struct eth_pdata *pdata = dev->platdata;
+       struct eth_pdata *pdata;
        int ret = 0;
 
        if (!dev || !device_active(dev))
@@ -189,6 +189,7 @@ static int eth_write_hwaddr(struct udevice *dev)
 
        /* seq is valid since the device is active */
        if (eth_get_ops(dev)->write_hwaddr && !eth_mac_skip(dev->seq)) {
+               pdata = dev->platdata;
                if (!is_valid_ethaddr(pdata->enetaddr)) {
                        printf("\nError: %s address %pM illegal value\n",
                               dev->name, pdata->enetaddr);
index ee95359d7926733c37054a2bd2ef712c0e2db0cc..e9531687f39a00700c17190b7c1aa579cbda7506 100644 (file)
@@ -854,7 +854,6 @@ CONFIG_FASTBOOT_FLASH_FILLBUF_SIZE
 CONFIG_FASTBOOT_FLASH_NAND_DEV
 CONFIG_FASTBOOT_FLASH_NAND_TRIMFFS
 CONFIG_FAST_FLASH_BIT
-CONFIG_FAT_WRITE
 CONFIG_FB_ADDR
 CONFIG_FB_BACKLIGHT
 CONFIG_FB_DEFERRED_IO
@@ -985,8 +984,6 @@ CONFIG_FSMC_NAND_BASE
 CONFIG_FSMTDBLK
 CONFIG_FSNOTIFY
 CONFIG_FS_EXT4
-CONFIG_FS_FAT
-CONFIG_FS_FAT_MAX_CLUSTSIZE
 CONFIG_FS_POSIX_ACL
 CONFIG_FTAHBC020S
 CONFIG_FTAHBC020S_BASE