diff options
Diffstat (limited to 'include')
37 files changed, 443 insertions, 113 deletions
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 4823a7e4f3..5ad0366730 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -82,15 +82,6 @@ func(PXE, pxe, na) \ func(DHCP, dhcp, na) -#define CONFIG_BOOTCOMMAND \ - "if test ${boot_fit} -eq 1; then " \ - "run update_to_fit;" \ - "fi;" \ - "run findfdt; " \ - "run init_console; " \ - "run envboot; " \ - "run distro_bootcmd" - #include <config_distro_bootcmd.h> #ifndef CONFIG_SPL_BUILD diff --git a/include/configs/apalis-tk1.h b/include/configs/apalis-tk1.h index e6d119eb06..c13e446fce 100644 --- a/include/configs/apalis-tk1.h +++ b/include/configs/apalis-tk1.h @@ -54,10 +54,6 @@ #undef CONFIG_SERVERIP #define CONFIG_SERVERIP 192.168.10.1 -#define CONFIG_BOOTCOMMAND \ - "run emmcboot; setenv fdtfile ${soc}-apalis-${fdt_board}.dtb && " \ - "run distro_bootcmd" - #define DFU_ALT_EMMC_INFO "apalis-tk1.img raw 0x0 0x500 mmcpart 1; " \ "boot part 0 1 mmcpart 0; " \ "rootfs part 0 2 mmcpart 0; " \ diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h index 5061f6c6fd..bf87bac300 100644 --- a/include/configs/clearfog.h +++ b/include/configs/clearfog.h @@ -33,9 +33,7 @@ #define CONFIG_SYS_I2C_SPEED 100000 /* SPI NOR flash default params, used by sf commands */ -#define CONFIG_SF_DEFAULT_SPEED 1000000 -#define CONFIG_SF_DEFAULT_MODE SPI_MODE_3 -#define CONFIG_SPI_FLASH_STMICRO +#define CONFIG_SF_DEFAULT_BUS 1 /* * SDIO/MMC Card Configuration diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonboard410c.h index 6b5d59d363..d2447b27d8 100644 --- a/include/configs/dragonboard410c.h +++ b/include/configs/dragonboard410c.h @@ -100,6 +100,7 @@ REFLASH(dragonboard/u-boot.img, 8)\ BOOTENV #define CONFIG_ENV_SIZE 0x2000 +#define CONFIG_SYS_MMC_ENV_DEV 0 /* mmc0 = emmc, mmc1 = sd */ #define CONFIG_ENV_VARS_UBOOT_CONFIG /* Size of malloc() pool */ diff --git a/include/configs/el6x_common.h b/include/configs/el6x_common.h index 01d75d6aa2..909981cf10 100644 --- a/include/configs/el6x_common.h +++ b/include/configs/el6x_common.h @@ -80,10 +80,6 @@ func(PXE, PXE, na) \ func(DHCP, dhcp, na) -#define CONFIG_BOOTCOMMAND \ - "run findfdt; " \ - "run distro_bootcmd" - #include <config_distro_bootcmd.h> #define CONFIG_ARP_TIMEOUT 200UL diff --git a/include/configs/embestmx6boards.h b/include/configs/embestmx6boards.h index 3f128e67cd..08a29223b2 100644 --- a/include/configs/embestmx6boards.h +++ b/include/configs/embestmx6boards.h @@ -132,10 +132,6 @@ func(PXE, pxe, na) \ func(DHCP, dhcp, na) -#define CONFIG_BOOTCOMMAND \ - "run finduuid; " \ - "run distro_bootcmd" - #include <config_distro_bootcmd.h> #define CONSOLE_STDIN_SETTINGS \ diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h index 0f20e5e2cc..5be61ad7b6 100644 --- a/include/configs/ls1021atwr.h +++ b/include/configs/ls1021atwr.h @@ -375,6 +375,8 @@ "ramdisk_addr_r=0xa0000000\0" \ "load_addr=0xa0000000\0" \ "kernel_size=0x2800000\0" \ + "kernel_addr_sd=0x8000\0" \ + "kernel_size_sd=0x14000\0" \ BOOTENV \ "boot_scripts=ls1021atwr_boot.scr\0" \ "boot_script_hdr=hdr_ls1021atwr_bs.out\0" \ @@ -456,21 +458,25 @@ "${scripthdraddr} ${prefix}${boot_script_hdr} " \ "&& esbc_validate ${scripthdraddr};" \ "source ${scriptaddr}\0" \ - "installer=load mmc 0:2 $load_addr " \ - "/flex_installer_arm32.itb; " \ - "bootm $load_addr#ls1021atwr\0" \ "qspi_bootcmd=echo Trying load from qspi..;" \ "sf probe && sf read $load_addr " \ "$kernel_addr $kernel_size && bootm $load_addr#$board\0" \ "nor_bootcmd=echo Trying load from nor..;" \ "cp.b $kernel_addr $load_addr " \ - "$kernel_size && bootm $load_addr#$board\0" + "$kernel_size && bootm $load_addr#$board\0" \ + "sd_bootcmd=echo Trying load from SD ..;" \ + "mmcinfo && mmc read $load_addr " \ + "$kernel_addr_sd $kernel_size_sd && " \ + "bootm $load_addr#$board\0" #endif #undef CONFIG_BOOTCOMMAND #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) #define CONFIG_BOOTCOMMAND "run distro_bootcmd; env exists secureboot" \ "&& esbc_halt; run qspi_bootcmd;" +#elif defined(CONFIG_SD_BOOT) +#define CONFIG_BOOTCOMMAND "run distro_bootcmd; env exists secureboot" \ + "&& esbc_halt; run sd_bootcmd;" #else #define CONFIG_BOOTCOMMAND "run distro_bootcmd; env exists secureboot" \ "&& esbc_halt; run nor_bootcmd;" diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h index 98fa711b00..a4cd09aa90 100644 --- a/include/configs/ls1043a_common.h +++ b/include/configs/ls1043a_common.h @@ -261,6 +261,8 @@ "fdt_addr_r=0x90000000\0" \ "load_addr=0xa0000000\0" \ "kernel_size=0x2800000\0" \ + "kernel_addr_sd=0x8000\0" \ + "kernel_size_sd=0x14000\0" \ "console=ttyS0,115200\0" \ "boot_os=y\0" \ "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ @@ -291,20 +293,25 @@ "${scripthdraddr} ${prefix}${boot_script_hdr} " \ "&& esbc_validate ${scripthdraddr};" \ "source ${scriptaddr}\0" \ - "installer=load mmc 0:2 $load_addr " \ - "/flex_installer_arm64.itb; " \ - "bootm $load_addr#ls1043ardb\0" \ "qspi_bootcmd=echo Trying load from qspi..;" \ "sf probe && sf read $load_addr " \ "$kernel_addr $kernel_size && bootm $load_addr#$board\0" \ "nor_bootcmd=echo Trying load from nor..;" \ "cp.b $kernel_addr $load_addr " \ - "$kernel_size && bootm $load_addr#$board\0" + "$kernel_size && bootm $load_addr#$board\0" \ + "sd_bootcmd=echo Trying load from SD ..;" \ + "mmcinfo; mmc read $load_addr " \ + "$kernel_addr_sd $kernel_size_sd && " \ + "bootm $load_addr#$board\0" + #undef CONFIG_BOOTCOMMAND #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) #define CONFIG_BOOTCOMMAND "run distro_bootcmd; env exists secureboot" \ "&& esbc_halt; run qspi_bootcmd;" +#elif defined(CONFIG_SD_BOOT) +#define CONFIG_BOOTCOMMAND "run distro_bootcmd; env exists secureboot" \ + "&& esbc_halt; run sd_bootcmd;" #else #define CONFIG_BOOTCOMMAND "run distro_bootcmd; env exists secureboot" \ "&& esbc_halt; run nor_bootcmd;" diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h index eea54c7ae2..11f2a28743 100644 --- a/include/configs/ls1046a_common.h +++ b/include/configs/ls1046a_common.h @@ -227,6 +227,8 @@ "kernel_start=0x1000000\0" \ "kernel_load=0xa0000000\0" \ "kernel_size=0x2800000\0" \ + "kernel_addr_sd=0x8000\0" \ + "kernel_size_sd=0x14000\0" \ "console=ttyS0,115200\0" \ CONFIG_MTDPARTS_DEFAULT "\0" \ BOOTENV \ @@ -257,12 +259,13 @@ "${scripthdraddr} ${prefix}${boot_script_hdr} " \ "&& esbc_validate ${scripthdraddr};" \ "source ${scriptaddr}\0" \ - "installer=load mmc 0:2 $load_addr " \ - "/flex_installer_arm64.itb; " \ - "bootm $load_addr#ls1046ardb\0" \ "qspi_bootcmd=echo Trying load from qspi..;" \ "sf probe && sf read $load_addr " \ - "$kernel_start $kernel_size && bootm $load_addr#$board\0" + "$kernel_start $kernel_size && bootm $load_addr#$board\0" \ + "sd_bootcmd=echo Trying load from SD ..;" \ + "mmcinfo; mmc read $load_addr " \ + "$kernel_addr_sd $kernel_size_sd && " \ + "bootm $load_addr#$board\0" #endif diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h index 87d6c81067..d001b80270 100644 --- a/include/configs/ls1046ardb.h +++ b/include/configs/ls1046ardb.h @@ -225,8 +225,13 @@ #ifndef SPL_NO_MISC #undef CONFIG_BOOTCOMMAND +#if defined(CONFIG_QSPI_BOOT) #define CONFIG_BOOTCOMMAND "run distro_bootcmd; env exists secureboot" \ "&& esbc_halt; run qspi_bootcmd;" +#elif defined(CONFIG_SD_BOOT) +#define CONFIG_BOOTCOMMAND "run distro_bootcmd; env exists secureboot" \ + "&& esbc_halt; run sd_bootcmd;" +#endif #endif #include <asm/fsl_secure_boot.h> diff --git a/include/configs/ls1088a_common.h b/include/configs/ls1088a_common.h index fa058f7e52..6b71d47c5a 100644 --- a/include/configs/ls1088a_common.h +++ b/include/configs/ls1088a_common.h @@ -20,18 +20,24 @@ #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_FSL_OCRAM_BASE + 0xfff0) /* Link Definitions */ +#ifdef CONFIG_SPL +#define CONFIG_SYS_TEXT_BASE 0x80400000 +#else #ifdef CONFIG_QSPI_BOOT #define CONFIG_SYS_TEXT_BASE 0x20100000 #else #define CONFIG_SYS_TEXT_BASE 0x30100000 #endif +#endif #define CONFIG_SUPPORT_RAW_INITRD #define CONFIG_SKIP_LOWLEVEL_INIT +#if !defined(CONFIG_SD_BOOT) #define CONFIG_FSL_DDR_INTERACTIVE /* Interactive debugging */ +#endif #define CONFIG_VERY_BIG_RAM #define CONFIG_SYS_DDR_SDRAM_BASE 0x80000000UL @@ -148,6 +154,19 @@ unsigned long long get_qixis_addr(void); /* Miscellaneous configurable options */ #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_DDR_SDRAM_BASE + 0x10000000) +/* SATA */ +#ifdef CONFIG_SCSI +#define CONFIG_LIBATA +#define CONFIG_SCSI_AHCI +#define CONFIG_SCSI_AHCI_PLAT +#define CONFIG_SYS_SATA1 AHCI_BASE_ADDR1 + +#define CONFIG_SYS_SCSI_MAX_SCSI_ID 1 +#define CONFIG_SYS_SCSI_MAX_LUN 1 +#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ + CONFIG_SYS_SCSI_MAX_LUN) +#endif + /* Physical Memory Map */ #define CONFIG_CHIP_SELECTS_PER_CTRL 4 @@ -187,6 +206,11 @@ unsigned long long get_qixis_addr(void); " fsl_mc apply dpl 0x80200000 &&" \ " sf read $kernel_load $kernel_start" \ " $kernel_size && bootm $kernel_load" +#elif defined(CONFIG_SD_BOOT) +#define CONFIG_BOOTCOMMAND "mmcinfo;mmc read 0x80200000 0x6800 0x800;"\ + " fsl_mc apply dpl 0x80200000 &&" \ + " mmc read $kernel_load $kernel_start" \ + " $kernel_size && bootm $kernel_load" #else /* NOR BOOT*/ #define CONFIG_BOOTCOMMAND "fsl_mc apply dpl 0x580d00000 &&" \ " cp.b $kernel_start $kernel_load" \ @@ -206,6 +230,20 @@ unsigned long long get_qixis_addr(void); #define CONFIG_PANIC_HANG /* do not reset board on panic */ +#ifdef CONFIG_SPL +#define CONFIG_SPL_BSS_START_ADDR 0x80100000 +#define CONFIG_SPL_BSS_MAX_SIZE 0x00100000 +#define CONFIG_SPL_FRAMEWORK +#define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/armv8/u-boot-spl.lds" +#define CONFIG_SPL_MAX_SIZE 0x16000 +#define CONFIG_SPL_STACK (CONFIG_SYS_FSL_OCRAM_BASE + 0x9ff0) +#define CONFIG_SPL_TARGET "u-boot-with-spl.bin" +#define CONFIG_SPL_TEXT_BASE 0x1800a000 + +#define CONFIG_SYS_SPL_MALLOC_SIZE 0x00100000 +#define CONFIG_SYS_SPL_MALLOC_START 0x80200000 +#define CONFIG_SYS_MONITOR_LEN (512 * 1024) +#endif #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */ #endif /* __LS1088_COMMON_H */ diff --git a/include/configs/ls1088aqds.h b/include/configs/ls1088aqds.h index c2e6fd26d3..310e8fd59f 100644 --- a/include/configs/ls1088aqds.h +++ b/include/configs/ls1088aqds.h @@ -23,6 +23,10 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_ENV_SIZE 0x2000 /* 8KB */ #define CONFIG_ENV_OFFSET 0x300000 /* 3MB */ #define CONFIG_ENV_SECT_SIZE 0x40000 +#elif defined(CONFIG_SD_BOOT) +#define CONFIG_ENV_OFFSET (3 * 1024 * 1024) +#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_ENV_SIZE 0x2000 #else #define CONFIG_ENV_IS_IN_FLASH #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x300000) @@ -30,10 +34,11 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_ENV_SIZE 0x20000 #endif -#if defined(CONFIG_QSPI_BOOT) +#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) #define CONFIG_QIXIS_I2C_ACCESS #define SYS_NO_FLASH +#undef CONFIG_CMD_IMLS #define CONFIG_SYS_CLK_FREQ 100000000 #define CONFIG_DDR_CLK_FREQ 100000000 #else @@ -190,7 +195,7 @@ unsigned long get_board_ddr_clk(void); | CSPR_V) #define CONFIG_SYS_FPGA_AMASK IFC_AMASK(64*1024) -#if defined(CONFIG_QSPI_BOOT) +#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) #define CONFIG_SYS_FPGA_CSOR CSOR_GPCM_ADM_SHIFT(0) #else #define CONFIG_SYS_FPGA_CSOR CSOR_GPCM_ADM_SHIFT(12) @@ -293,9 +298,8 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5 /* QSPI device */ -#if defined(CONFIG_QSPI_BOOT) +#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) #define CONFIG_FSL_QSPI -#define CONFIG_SPI_FLASH_SPANSION #define FSL_QSPI_FLASH_SIZE (1 << 26) #define FSL_QSPI_FLASH_NUM 2 @@ -316,7 +320,11 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_SYS_MEMTEST_START 0x80000000 #define CONFIG_SYS_MEMTEST_END 0x9fffffff +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SYS_MONITOR_BASE CONFIG_SPL_TEXT_BASE +#else #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE +#endif #define CONFIG_FSL_MEMAC @@ -344,6 +352,23 @@ unsigned long get_board_ddr_clk(void); "sf read 0x80100000 0xE00000 0x100000;" \ "fsl_mc start mc 0x80000000 0x80100000\0" \ "mcmemsize=0x70000000 \0" +#elif defined(CONFIG_SD_BOOT) +#undef CONFIG_EXTRA_ENV_SETTINGS +#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 /* NOR BOOT */ #undef CONFIG_EXTRA_ENV_SETTINGS #define CONFIG_EXTRA_ENV_SETTINGS \ diff --git a/include/configs/ls1088ardb.h b/include/configs/ls1088ardb.h index 478ddd0864..e6bf2b8d87 100644 --- a/include/configs/ls1088ardb.h +++ b/include/configs/ls1088ardb.h @@ -15,6 +15,10 @@ #define CONFIG_ENV_SIZE 0x2000 /* 8KB */ #define CONFIG_ENV_OFFSET 0x300000 /* 3MB */ #define CONFIG_ENV_SECT_SIZE 0x40000 +#elif defined(CONFIG_SD_BOOT) +#define CONFIG_ENV_OFFSET (3 * 1024 * 1024) +#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_ENV_SIZE 0x2000 #else #define CONFIG_ENV_IS_IN_FLASH #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x300000) @@ -22,9 +26,10 @@ #define CONFIG_ENV_SIZE 0x20000 #endif -#if defined(CONFIG_QSPI_BOOT) +#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) #define CONFIG_QIXIS_I2C_ACCESS #define SYS_NO_FLASH +#undef CONFIG_CMD_IMLS #endif #define CONFIG_SYS_CLK_FREQ 100000000 @@ -232,9 +237,8 @@ #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5 /* QSPI device */ -#if defined(CONFIG_QSPI_BOOT) +#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) #define CONFIG_FSL_QSPI -#define CONFIG_SPI_FLASH_SPANSION #define FSL_QSPI_FLASH_SIZE (1 << 26) #define FSL_QSPI_FLASH_NUM 2 #endif @@ -244,29 +248,112 @@ #define CONFIG_SYS_MEMTEST_START 0x80000000 #define CONFIG_SYS_MEMTEST_END 0x9fffffff +#ifdef CONFIG_SPL_BUILD +#define CONFIG_SYS_MONITOR_BASE CONFIG_SPL_TEXT_BASE +#else #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE +#endif #define CONFIG_FSL_MEMAC /* Initial environment variables */ #if defined(CONFIG_QSPI_BOOT) +#define MC_INIT_CMD \ + "mcinitcmd=sf probe 0:0;sf read 0x80000000 0xA00000 0x100000;" \ + "sf read 0x80100000 0xE00000 0x100000;" \ + "fsl_mc start mc 0x80000000 0x80100000\0" \ + "mcmemsize=0x70000000\0" +#elif defined(CONFIG_SD_BOOT) +#define MC_INIT_CMD \ + "mcinitcmd=mmcinfo;mmc read 0x80000000 0x5000 0x800;" \ + "mmc read 0x80100000 0x7000 0x800;" \ + "fsl_mc start mc 0x80000000 0x80100000\0" \ + "mcmemsize=0x70000000\0" +#endif + #undef CONFIG_EXTRA_ENV_SETTINGS #define CONFIG_EXTRA_ENV_SETTINGS \ + "BOARD=ls1088ardb\0" \ "hwconfig=fsl_ddr:bank_intlv=auto\0" \ - "loadaddr=0x90100000\0" \ - "kernel_addr=0x100000\0" \ "ramdisk_addr=0x800000\0" \ "ramdisk_size=0x2000000\0" \ "fdt_high=0xa0000000\0" \ "initrd_high=0xffffffffffffffff\0" \ - "kernel_start=0x1000000\0" \ - "kernel_load=0xa0000000\0" \ + "fdt_addr=0x64f00000\0" \ + "kernel_addr=0x1000000\0" \ + "kernel_addr_sd=0x8000\0" \ + "kernel_start=0x580100000\0" \ + "kernelheader_start=0x580800000\0" \ + "scriptaddr=0x80000000\0" \ + "scripthdraddr=0x80080000\0" \ + "fdtheader_addr_r=0x80100000\0" \ + "kernelheader_addr=0x800000\0" \ + "kernelheader_addr_r=0x80200000\0" \ + "kernel_addr_r=0x81000000\0" \ + "kernelheader_size=0x40000\0" \ + "fdt_addr_r=0x90000000\0" \ + "load_addr=0xa0000000\0" \ "kernel_size=0x2800000\0" \ - "mcinitcmd=sf probe 0:0;sf read 0x80000000 0xA00000 0x100000;" \ - "sf read 0x80100000 0xE00000 0x100000;" \ - "fsl_mc start mc 0x80000000 0x80100000\0" \ - "mcmemsize=0x70000000 \0" - + "kernel_size_sd=0x14000\0" \ + MC_INIT_CMD \ + BOOTENV \ + "boot_scripts=ls1088ardb_boot.scr\0" \ + "boot_script_hdr=hdr_ls1088ardb_bs.out\0" \ + "scan_dev_for_boot_part=" \ + "part list ${devtype} ${devnum} devplist; " \ + "env exists devplist || setenv devplist 1; " \ + "for distro_bootpart in ${devplist}; do " \ + "if fstype ${devtype} " \ + "${devnum}:${distro_bootpart} " \ + "bootfstype; then " \ + "run scan_dev_for_boot; " \ + "fi; " \ + "done\0" \ + "scan_dev_for_boot=" \ + "echo Scanning ${devtype} " \ + "${devnum}:${distro_bootpart}...; " \ + "for prefix in ${boot_prefixes}; do " \ + "run scan_dev_for_scripts; " \ + "done;\0" \ + "boot_a_script=" \ + "load ${devtype} ${devnum}:${distro_bootpart} " \ + "${scriptaddr} ${prefix}${script}; " \ + "env exists secureboot && load ${devtype} " \ + "${devnum}:${distro_bootpart} " \ + "${scripthdraddr} ${prefix}${boot_script_hdr} " \ + "&& esbc_validate ${scripthdraddr};" \ + "source ${scriptaddr}\0" \ + "installer=load mmc 0:2 $load_addr " \ + "/flex_installer_arm64.itb; " \ + "env exists mcinitcmd && run mcinitcmd && " \ + "mmc read 0x80200000 0x6800 0x800;" \ + "fsl_mc apply dpl 0x80200000;" \ + "bootm $load_addr#ls1088ardb\0" \ + "qspi_bootcmd=echo Trying load from qspi..;" \ + "sf probe && sf read $load_addr " \ + "$kernel_addr $kernel_size &&" \ + "bootm $load_addr#$BOARD\0" \ + "sd_bootcmd=echo Trying load from sd card..;" \ + "mmcinfo; mmc read $load_addr " \ + "$kernel_addr_sd $kernel_size_sd ;" \ + "bootm $load_addr#$BOARD\0" + +#undef CONFIG_BOOTCOMMAND +#if defined(CONFIG_QSPI_BOOT) +/* Try to boot an on-QSPI kernel first, then do normal distro boot */ +#define CONFIG_BOOTCOMMAND \ + "env exists mcinitcmd && run mcinitcmd && " \ + "sf read 0x80200000 0xd00000 0x100000;" \ + " fsl_mc apply dpl 0x80200000;" \ + "run distro_bootcmd;run qspi_bootcmd" +/* Try to boot an on-SD kernel first, then do normal distro boot */ +#elif defined(CONFIG_SD_BOOT) +#define CONFIG_BOOTCOMMAND \ + "env exists mcinitcmd && run mcinitcmd ;" \ + "&& env exists mcinitcmd && mmcinfo; " \ + "mmc read 0x88000000 0x6800 0x800; " \ + "&& fsl_mc apply dpl 0x88000000;" \ + "run distro_bootcmd;run sd_bootcmd" #endif /* MAC/PHY configuration */ @@ -304,7 +391,6 @@ #include <config_distro_defaults.h> #define BOOT_TARGET_DEVICES(func) \ - func(USB, usb, 0) \ func(MMC, mmc, 0) \ func(SCSI, scsi, 0) \ func(DHCP, dhcp, na) diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h index 48c3a5397f..650db2f594 100644 --- a/include/configs/ls2080ardb.h +++ b/include/configs/ls2080ardb.h @@ -349,6 +349,17 @@ unsigned long get_board_sys_clk(void); "esbc_validate 0x20700000 && " \ "esbc_validate 0x20740000;" \ "fsl_mc start mc 0x20a00000 0x20e00000 \0" +#elif defined(CONFIG_SD_BOOT) +#define MC_INIT_CMD \ + "mcinitcmd=mmcinfo;mmc read 0x80000000 0x5000 0x800;" \ + "mmc read 0x80100000 0x7000 0x800;" \ + "env exists secureboot && " \ + "mmc read 0x80700000 0x3800 0x10 && " \ + "mmc read 0x80740000 0x3A00 0x10 && " \ + "esbc_validate 0x80700000 && " \ + "esbc_validate 0x80740000 ;" \ + "fsl_mc start mc 0x80000000 0x80100000\0" \ + "mcmemsize=0x70000000\0" #else #define MC_INIT_CMD \ "mcinitcmd=env exists secureboot && " \ @@ -379,8 +390,14 @@ unsigned long get_board_sys_clk(void); "fdt_addr_r=0x90000000\0" \ "load_addr=0xa0000000\0" \ "kernel_size=0x2800000\0" \ + "kernel_addr_sd=0x8000\0" \ + "kernel_size_sd=0x14000\0" \ "console=ttyAMA0,38400n8\0" \ "mcmemsize=0x70000000\0" \ + "sd_bootcmd=echo Trying load from SD ..;" \ + "mmcinfo; mmc read $load_addr " \ + "$kernel_addr_sd $kernel_size_sd && " \ + "bootm $load_addr#$board\0" \ MC_INIT_CMD \ BOOTENV \ "boot_scripts=ls2088ardb_boot.scr\0" \ @@ -409,9 +426,6 @@ unsigned long get_board_sys_clk(void); "${scripthdraddr} ${prefix}${boot_script_hdr} " \ "&& esbc_validate ${scripthdraddr};" \ "source ${scriptaddr}\0" \ - "installer=load mmc 0:2 $load_addr " \ - "/flex_installer_arm64.itb; " \ - "bootm $load_addr#ls2088ardb\0" \ "qspi_bootcmd=echo Trying load from qspi..;" \ "sf probe && sf read $load_addr " \ "$kernel_start $kernel_size ; env exists secureboot &&" \ @@ -433,16 +447,27 @@ unsigned long get_board_sys_clk(void); "&& esbc_validate 0x20780000; " \ "env exists mcinitcmd && " \ "fsl_mc lazyapply dpl 0x20d00000; " \ - "run distro_bootcmd;run qspi_bootcmd; " \ - "env exists secureboot && esbc_halt; " + "run distro_bootcmd;env exists secureboot " \ + " && esbc_halt;run qspi_bootcmd; " +#elif defined(CONFIG_SD_BOOT) +/* Try to boot an on-SD kernel first, then do normal distro boot */ +#define CONFIG_BOOTCOMMAND \ + "env exists mcinitcmd && env exists secureboot "\ + "&& mmcinfo && mmc read $load_addr 0x3c00 0x800 " \ + "&& esbc_validate $load_addr; " \ + "env exists mcinitcmd && run mcinitcmd " \ + "&& mmc read 0x88000000 0x6800 0x800 " \ + "&& fsl_mc lazyapply dpl 0x88000000; " \ + "run distro_bootcmd;env exists secureboot " \ + "&& esbc_halt;run sd_bootcmd;" #else /* Try to boot an on-NOR kernel first, then do normal distro boot */ #define CONFIG_BOOTCOMMAND \ "env exists mcinitcmd && env exists secureboot "\ "&& esbc_validate 0x580780000; env exists mcinitcmd "\ "&& fsl_mc lazyapply dpl 0x580d00000;" \ - "run distro_bootcmd;run nor_bootcmd; " \ - "env exists secureboot && esbc_halt; " + "run distro_bootcmd; env exists secureboot " \ + "&& esbc_halt; run nor_bootcmd;" #endif /* MAC/PHY configuration */ diff --git a/include/configs/lsxl.h b/include/configs/lsxl.h index 5d5851f516..0793fcb9e4 100644 --- a/include/configs/lsxl.h +++ b/include/configs/lsxl.h @@ -70,7 +70,6 @@ * Default environment variables */ #define CONFIG_LOADADDR 0x00800000 -#define CONFIG_BOOTCOMMAND "run bootcmd_${bootsource}" #if defined(CONFIG_LSXHL) #define CONFIG_FDTFILE "kirkwood-lsxhl.dtb" diff --git a/include/configs/mx6cuboxi.h b/include/configs/mx6cuboxi.h index 7fefe8edcb..6b42b2b3c1 100644 --- a/include/configs/mx6cuboxi.h +++ b/include/configs/mx6cuboxi.h @@ -122,11 +122,6 @@ "echo WARNING: Could not determine dtb to use; fi; \0" \ BOOTENV -#define CONFIG_BOOTCOMMAND \ - "run findfdt; " \ - "run finduuid; " \ - "run distro_bootcmd" - #define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) \ func(SATA, sata, 0) \ diff --git a/include/configs/novena.h b/include/configs/novena.h index 3acc8c62de..dd0e637062 100644 --- a/include/configs/novena.h +++ b/include/configs/novena.h @@ -38,7 +38,6 @@ /* Booting Linux */ #define CONFIG_BOOTFILE "fitImage" -#define CONFIG_BOOTCOMMAND "run distro_bootcmd ; run net_nfs" #define CONFIG_HOSTNAME novena /* Physical Memory Map */ diff --git a/include/configs/odroid.h b/include/configs/odroid.h index 22e9c82497..60ed013959 100644 --- a/include/configs/odroid.h +++ b/include/configs/odroid.h @@ -44,7 +44,7 @@ /* Console configuration */ #define CONFIG_BOOTCOMMAND "run autoboot" -#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" +#define CONFIG_DEFAULT_CONSOLE "ttySAC1,115200n8" #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR \ - GENERATED_GBL_DATA_SIZE) @@ -158,7 +158,7 @@ "elif test -e mmc 0 uImage; then; " \ "run boot_uimg;" \ "fi;\0" \ - "console=" CONFIG_DEFAULT_CONSOLE \ + "console=" CONFIG_DEFAULT_CONSOLE "\0" \ "mmcbootdev=0\0" \ "mmcbootpart=1\0" \ "mmcrootdev=0\0" \ diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h index 13a45010bf..2969f18993 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -34,7 +34,7 @@ #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x1000000) -#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0" +#define CONFIG_DEFAULT_CONSOLE "ttySAC2,115200n8" /* USB */ #define CONFIG_USB_EHCI_EXYNOS @@ -108,7 +108,7 @@ BOOTENV \ "bootdelay=0\0" \ "rootfstype=ext4\0" \ - "console=" CONFIG_DEFAULT_CONSOLE \ + "console=" CONFIG_DEFAULT_CONSOLE "\0"\ "fdtfile=exynos5422-odroidxu3.dtb\0" \ "boardname=odroidxu3\0" \ "mmcbootdev=0\0" \ diff --git a/include/configs/omap3_igep00x0.h b/include/configs/omap3_igep00x0.h index 1a90cb5311..91b3a23d29 100644 --- a/include/configs/omap3_igep00x0.h +++ b/include/configs/omap3_igep00x0.h @@ -72,10 +72,6 @@ #define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) -#define CONFIG_BOOTCOMMAND \ - "run findfdt; " \ - "run distro_bootcmd" - #include <config_distro_bootcmd.h> #define ENV_FINDFDT \ diff --git a/include/configs/p212.h b/include/configs/p212.h new file mode 100644 index 0000000000..793b556800 --- /dev/null +++ b/include/configs/p212.h @@ -0,0 +1,24 @@ +/* + * Configuration for Amlogic P212 + * + * Copyright (C) 2017 Baylibre, SAS + * Author: Neil Armstrong <narmstrong@baylibre.com> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#define CONFIG_MISC_INIT_R + +#define CONFIG_PHY_ADDR 8 + +/* Serial setup */ +#define CONFIG_CONS_INDEX 0 + +#define MESON_FDTFILE_SETTING "fdtfile=amlogic/meson-gxl-s905x-p212.dtb\0" + +#include <configs/meson-gxbb-common.h> + +#endif /* __CONFIG_H */ diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h index d81a36e065..86835e735e 100644 --- a/include/configs/s5p_goni.h +++ b/include/configs/s5p_goni.h @@ -95,7 +95,7 @@ #define CONFIG_BOOTCOMMAND "run mmcboot" -#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0" +#define CONFIG_DEFAULT_CONSOLE "ttySAC2,115200n8" #define CONFIG_RAMDISK_BOOT "root=/dev/ram0 rw rootfstype=ext4" \ " ${console} ${meminfo}" @@ -145,7 +145,7 @@ "bootchart=set opts init=/sbin/bootchartd; run bootcmd\0" \ "verify=n\0" \ "rootfstype=ext4\0" \ - "console=" CONFIG_DEFAULT_CONSOLE \ + "console=" CONFIG_DEFAULT_CONSOLE "\0"\ "meminfo=mem=80M mem=256M@0x40000000 mem=128M@0x50000000\0" \ "loaduimage=ext4load mmc ${mmcdev}:${mmcbootpart} 0x30007FC0 uImage\0" \ "mmcdev=0\0" \ diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h index 2b71c5e5c1..b0bcc56a1b 100644 --- a/include/configs/s5pc210_universal.h +++ b/include/configs/s5pc210_universal.h @@ -30,7 +30,7 @@ /* Console configuration */ #define CONFIG_BOOTCOMMAND "run mmcboot" -#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" +#define CONFIG_DEFAULT_CONSOLE "ttySAC1,115200n8" #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR \ - GENERATED_GBL_DATA_SIZE) @@ -119,7 +119,7 @@ "mmcoops=mmc read 0 0x40000000 0x40 8; md 0x40000000 0x400\0" \ "verify=n\0" \ "rootfstype=ext4\0" \ - "console=" CONFIG_DEFAULT_CONSOLE \ + "console=" CONFIG_DEFAULT_CONSOLE "\0" \ "mtdparts=" CONFIG_MTDPARTS_DEFAULT \ "mbrparts=" MBRPARTS_DEFAULT \ "meminfo=crashkernel=32M@0x50000000\0" \ diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index 71c2ae3b39..f0426567fd 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -74,8 +74,6 @@ func(HOST, host, 1) \ func(HOST, host, 0) -#define CONFIG_BOOTCOMMAND "" - #include <config_distro_bootcmd.h> #define CONFIG_KEEP_SERVERADDR diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h index 8994400de9..91b2132455 100644 --- a/include/configs/ti_omap4_common.h +++ b/include/configs/ti_omap4_common.h @@ -91,14 +91,6 @@ func(PXE, pxe, na) \ func(DHCP, dhcp, na) -#define CONFIG_BOOTCOMMAND \ - "if test ${boot_fit} -eq 1; then " \ - "run update_to_fit;" \ - "fi;" \ - "run findfdt; " \ - "run envboot; " \ - "run distro_bootcmd" - #include <config_distro_bootcmd.h> #include <environment/ti/mmc.h> diff --git a/include/configs/trats.h b/include/configs/trats.h index a34c349bb3..b97efc21cd 100644 --- a/include/configs/trats.h +++ b/include/configs/trats.h @@ -42,7 +42,7 @@ #define CONFIG_MACH_TYPE MACH_TYPE_TRATS #define CONFIG_BOOTCOMMAND "run autoboot" -#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0" +#define CONFIG_DEFAULT_CONSOLE "ttySAC2,115200n8" #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR \ - GENERATED_GBL_DATA_SIZE) @@ -129,7 +129,7 @@ "mmcoops=mmc read 0 0x40000000 0x40 8; md 0x40000000 0x400\0" \ "verify=n\0" \ "rootfstype=ext4\0" \ - "console=" CONFIG_DEFAULT_CONSOLE \ + "console=" CONFIG_DEFAULT_CONSOLE "\0" \ "meminfo=crashkernel=32M@0x50000000\0" \ "nfsroot=/nfsroot/arm\0" \ "bootblock=" CONFIG_BOOTBLOCK "\0" \ diff --git a/include/configs/trats2.h b/include/configs/trats2.h index 6b371f4ab9..871accf791 100644 --- a/include/configs/trats2.h +++ b/include/configs/trats2.h @@ -39,7 +39,7 @@ /* Console configuration */ #define CONFIG_BOOTCOMMAND "run autoboot" -#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0" +#define CONFIG_DEFAULT_CONSOLE "ttySAC2,115200n8" #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR \ - GENERATED_GBL_DATA_SIZE) @@ -111,7 +111,7 @@ "boottrace=setenv opts initcall_debug; run bootcmd\0" \ "verify=n\0" \ "rootfstype=ext4\0" \ - "console=" CONFIG_DEFAULT_CONSOLE \ + "console=" CONFIG_DEFAULT_CONSOLE "\0" \ "kernelname=uImage\0" \ "loaduimage=ext4load mmc ${mmcdev}:${mmcbootpart} 0x40007FC0 " \ "${kernelname}\0" \ diff --git a/include/configs/udoo_neo.h b/include/configs/udoo_neo.h index 9b0a20d3ad..3e46a42c71 100644 --- a/include/configs/udoo_neo.h +++ b/include/configs/udoo_neo.h @@ -60,10 +60,6 @@ func(MMC, mmc, 0) \ func(DHCP, dhcp, na) -#define CONFIG_BOOTCOMMAND \ - "run findfdt; " \ - "run distro_bootcmd" - #include <config_distro_bootcmd.h> /* Miscellaneous configurable options */ diff --git a/include/configs/vexpress_common.h b/include/configs/vexpress_common.h index ade7ba4a8a..294ca18186 100644 --- a/include/configs/vexpress_common.h +++ b/include/configs/vexpress_common.h @@ -177,10 +177,6 @@ #include <config_distro_defaults.h> /* Basic environment settings */ -#define CONFIG_BOOTCOMMAND \ - "run distro_bootcmd; " \ - "run bootflash; " - #define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 1) \ func(MMC, mmc, 0) \ diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h index 8fdfc0277d..97d193ba49 100644 --- a/include/configs/wandboard.h +++ b/include/configs/wandboard.h @@ -140,11 +140,6 @@ func(PXE, pxe, na) \ func(DHCP, dhcp, na) -#define CONFIG_BOOTCOMMAND \ - "run findfdt; " \ - "run finduuid; " \ - "run distro_bootcmd" - #include <config_distro_bootcmd.h> /* Physical Memory Map */ diff --git a/include/dt-bindings/gpio/meson-gxl-gpio.h b/include/dt-bindings/gpio/meson-gxl-gpio.h new file mode 100644 index 0000000000..684d0d7add --- /dev/null +++ b/include/dt-bindings/gpio/meson-gxl-gpio.h @@ -0,0 +1,131 @@ +/* + * GPIO definitions for Amlogic Meson GXL SoCs + * + * Copyright (C) 2016 Endless Mobile, Inc. + * Author: Carlo Caione <carlo@endlessm.com> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef _DT_BINDINGS_MESON_GXL_GPIO_H +#define _DT_BINDINGS_MESON_GXL_GPIO_H + +#define GPIOAO_0 0 +#define GPIOAO_1 1 +#define GPIOAO_2 2 +#define GPIOAO_3 3 +#define GPIOAO_4 4 +#define GPIOAO_5 5 +#define GPIOAO_6 6 +#define GPIOAO_7 7 +#define GPIOAO_8 8 +#define GPIOAO_9 9 + +#define GPIOZ_0 0 +#define GPIOZ_1 1 +#define GPIOZ_2 2 +#define GPIOZ_3 3 +#define GPIOZ_4 4 +#define GPIOZ_5 5 +#define GPIOZ_6 6 +#define GPIOZ_7 7 +#define GPIOZ_8 8 +#define GPIOZ_9 9 +#define GPIOZ_10 10 +#define GPIOZ_11 11 +#define GPIOZ_12 12 +#define GPIOZ_13 13 +#define GPIOZ_14 14 +#define GPIOZ_15 15 +#define GPIOH_0 16 +#define GPIOH_1 17 +#define GPIOH_2 18 +#define GPIOH_3 19 +#define GPIOH_4 20 +#define GPIOH_5 21 +#define GPIOH_6 22 +#define GPIOH_7 23 +#define GPIOH_8 24 +#define GPIOH_9 25 +#define BOOT_0 26 +#define BOOT_1 27 +#define BOOT_2 28 +#define BOOT_3 29 +#define BOOT_4 30 +#define BOOT_5 31 +#define BOOT_6 32 +#define BOOT_7 33 +#define BOOT_8 34 +#define BOOT_9 35 +#define BOOT_10 36 +#define BOOT_11 37 +#define BOOT_12 38 +#define BOOT_13 39 +#define BOOT_14 40 +#define BOOT_15 41 +#define CARD_0 42 +#define CARD_1 43 +#define CARD_2 44 +#define CARD_3 45 +#define CARD_4 46 +#define CARD_5 47 +#define CARD_6 48 +#define GPIODV_0 49 +#define GPIODV_1 50 +#define GPIODV_2 51 +#define GPIODV_3 52 +#define GPIODV_4 53 +#define GPIODV_5 54 +#define GPIODV_6 55 +#define GPIODV_7 56 +#define GPIODV_8 57 +#define GPIODV_9 58 +#define GPIODV_10 59 +#define GPIODV_11 60 +#define GPIODV_12 61 +#define GPIODV_13 62 +#define GPIODV_14 63 +#define GPIODV_15 64 +#define GPIODV_16 65 +#define GPIODV_17 66 +#define GPIODV_18 67 +#define GPIODV_19 68 +#define GPIODV_20 69 +#define GPIODV_21 70 +#define GPIODV_22 71 +#define GPIODV_23 72 +#define GPIODV_24 73 +#define GPIODV_25 74 +#define GPIODV_26 75 +#define GPIODV_27 76 +#define GPIODV_28 77 +#define GPIODV_29 78 +#define GPIOX_0 79 +#define GPIOX_1 80 +#define GPIOX_2 81 +#define GPIOX_3 82 +#define GPIOX_4 83 +#define GPIOX_5 84 +#define GPIOX_6 85 +#define GPIOX_7 86 +#define GPIOX_8 87 +#define GPIOX_9 88 +#define GPIOX_10 89 +#define GPIOX_11 90 +#define GPIOX_12 91 +#define GPIOX_13 92 +#define GPIOX_14 93 +#define GPIOX_15 94 +#define GPIOX_16 95 +#define GPIOX_17 96 +#define GPIOX_18 97 +#define GPIOCLK_0 98 +#define GPIOCLK_1 99 +#define GPIO_TEST_N 100 + +#endif diff --git a/include/fdt.h b/include/fdt.h index f40b56c755..b97b3f2bcc 100644 --- a/include/fdt.h +++ b/include/fdt.h @@ -1 +1 @@ -#include "../lib/libfdt/fdt.h" +#include "../scripts/dtc/libfdt/fdt.h" diff --git a/include/libfdt_env.h b/include/libfdt_env.h index 6c6845f76c..273b5d30f8 100644 --- a/include/libfdt_env.h +++ b/include/libfdt_env.h @@ -23,12 +23,6 @@ typedef __be64 fdt64_t; #define fdt64_to_cpu(x) be64_to_cpu(x) #define cpu_to_fdt64(x) cpu_to_be64(x) -#ifdef __UBOOT__ -#include <vsprintf.h> - -#define strtoul(cp, endp, base) simple_strtoul(cp, endp, base) -#endif - /* adding a ramdisk needs 0x44 bytes in version 2008.10 */ #define FDT_RAMDISK_OVERHEAD 0x80 diff --git a/include/linux/libfdt.h b/include/linux/libfdt.h new file mode 100644 index 0000000000..2a663c6bb4 --- /dev/null +++ b/include/linux/libfdt.h @@ -0,0 +1,17 @@ +#ifndef _LIBFDT_ENV_H +#define _LIBFDT_ENV_H + +#include <linux/string.h> + +#include <asm/byteorder.h> + +typedef __be16 fdt16_t; +typedef __be32 fdt32_t; +typedef __be64 fdt64_t; + +#define fdt32_to_cpu(x) be32_to_cpu(x) +#define cpu_to_fdt32(x) cpu_to_be32(x) +#define fdt64_to_cpu(x) be64_to_cpu(x) +#define cpu_to_fdt64(x) cpu_to_be64(x) + +#endif /* _LIBFDT_ENV_H */ diff --git a/include/linux/libfdt_env.h b/include/linux/libfdt_env.h new file mode 100644 index 0000000000..8178f9174b --- /dev/null +++ b/include/linux/libfdt_env.h @@ -0,0 +1,22 @@ +#ifndef _LIBFDT_ENV_H +#define _LIBFDT_ENV_H + +#include <linux/string.h> + +#include <asm/byteorder.h> + +typedef __be16 fdt16_t; +typedef __be32 fdt32_t; +typedef __be64 fdt64_t; + +#define fdt32_to_cpu(x) be32_to_cpu(x) +#define cpu_to_fdt32(x) cpu_to_be32(x) +#define fdt64_to_cpu(x) be64_to_cpu(x) +#define cpu_to_fdt64(x) cpu_to_be64(x) + +/* U-Boot: for strtoul in fdt_overlay.c */ +#include <vsprintf.h> + +#define strtoul(cp, endp, base) simple_strtoul(cp, endp, base) + +#endif /* _LIBFDT_ENV_H */ diff --git a/include/linux/types.h b/include/linux/types.h index 416fa66284..7c33e7adbc 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -24,6 +24,8 @@ typedef __kernel_gid32_t gid_t; typedef __kernel_uid16_t uid16_t; typedef __kernel_gid16_t gid16_t; +typedef unsigned long uintptr_t; + #ifdef CONFIG_UID16 /* This is defined by include/asm-{arch}/posix_types.h */ typedef __kernel_old_uid_t old_uid_t; diff --git a/include/phy.h b/include/phy.h index a0b1f12317..50f1e12f8c 100644 --- a/include/phy.h +++ b/include/phy.h @@ -268,6 +268,7 @@ int phy_lxt_init(void); int phy_marvell_init(void); int phy_micrel_ksz8xxx_init(void); int phy_micrel_ksz90x1_init(void); +int phy_meson_gxl_init(void); int phy_natsemi_init(void); int phy_realtek_init(void); int phy_smsc_init(void); |