summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kconfig4
-rw-r--r--Makefile21
-rw-r--r--README6
-rw-r--r--api/Kconfig9
-rw-r--r--arch/arm/dts/Makefile8
-rw-r--r--arch/arm/dts/keystone-k2e-clocks.dtsi (renamed from arch/arm/dts/k2e-clocks.dtsi)0
-rw-r--r--arch/arm/dts/keystone-k2e-evm.dts (renamed from arch/arm/dts/k2e-evm.dts)2
-rw-r--r--arch/arm/dts/keystone-k2e-netcp.dtsi (renamed from arch/arm/dts/k2e-netcp.dtsi)0
-rw-r--r--arch/arm/dts/keystone-k2e.dtsi (renamed from arch/arm/dts/k2e.dtsi)4
-rw-r--r--arch/arm/dts/keystone-k2g-evm.dts (renamed from arch/arm/dts/k2g-evm.dts)6
-rw-r--r--arch/arm/dts/keystone-k2g-netcp.dtsi (renamed from arch/arm/dts/k2g-netcp.dtsi)2
-rw-r--r--arch/arm/dts/keystone-k2g.dtsi (renamed from arch/arm/dts/k2g.dtsi)6
-rw-r--r--arch/arm/dts/keystone-k2hk-clocks.dtsi (renamed from arch/arm/dts/k2hk-clocks.dtsi)0
-rw-r--r--arch/arm/dts/keystone-k2hk-evm.dts (renamed from arch/arm/dts/k2hk-evm.dts)2
-rw-r--r--arch/arm/dts/keystone-k2hk-netcp.dtsi (renamed from arch/arm/dts/k2hk-netcp.dtsi)0
-rw-r--r--arch/arm/dts/keystone-k2hk.dtsi (renamed from arch/arm/dts/k2hk.dtsi)4
-rw-r--r--arch/arm/dts/keystone-k2l-clocks.dtsi (renamed from arch/arm/dts/k2l-clocks.dtsi)0
-rw-r--r--arch/arm/dts/keystone-k2l-evm.dts (renamed from arch/arm/dts/k2l-evm.dts)2
-rw-r--r--arch/arm/dts/keystone-k2l-netcp.dtsi (renamed from arch/arm/dts/k2l-netcp.dtsi)0
-rw-r--r--arch/arm/dts/keystone-k2l.dtsi (renamed from arch/arm/dts/k2l.dtsi)4
-rw-r--r--arch/arm/lib/crt0_64.S4
-rw-r--r--arch/arm/lib/relocate_64.S2
-rw-r--r--arch/arm/mach-uniphier/Kconfig1
-rw-r--r--board/phytec/pcm052/pcm052.c9
-rw-r--r--cmd/.gitignore6
-rw-r--r--cmd/Kconfig23
-rw-r--r--cmd/Makefile37
-rw-r--r--cmd/bootm.c4
-rw-r--r--cmd/config.c44
-rw-r--r--cmd/license.c31
-rw-r--r--common/env_sf.c8
-rw-r--r--configs/PMC440_defconfig1
-rw-r--r--configs/brxre1_defconfig1
-rw-r--r--configs/dragonboard410c_defconfig1
-rw-r--r--configs/ethernut5_defconfig1
-rw-r--r--configs/hikey_defconfig1
-rw-r--r--configs/icnova-a20-swac_defconfig3
-rw-r--r--configs/k2e_evm_defconfig2
-rw-r--r--configs/k2g_evm_defconfig2
-rw-r--r--configs/k2hk_evm_defconfig2
-rw-r--r--configs/k2l_evm_defconfig2
-rw-r--r--configs/lsxhl_defconfig1
-rw-r--r--configs/vexpress_aemv8a_dram_defconfig1
-rw-r--r--configs/vexpress_aemv8a_juno_defconfig1
-rw-r--r--configs/vexpress_aemv8a_semi_defconfig1
-rw-r--r--configs/xilinx_zynqmp_ep_defconfig1
-rw-r--r--configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig1
-rw-r--r--configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig1
-rw-r--r--configs/xilinx_zynqmp_zc1751_xm018_dc4_defconfig1
-rw-r--r--configs/xilinx_zynqmp_zc1751_xm019_dc5_defconfig1
-rw-r--r--configs/xilinx_zynqmp_zcu102_defconfig1
-rw-r--r--configs/xilinx_zynqmp_zcu102_revB_defconfig1
-rw-r--r--disk/part_efi.c7
-rw-r--r--drivers/clk/aspeed/clk_ast2500.c4
-rw-r--r--drivers/gpio/db8500_gpio.c2
-rw-r--r--drivers/net/cpsw-common.c2
-rw-r--r--drivers/power/regulator/palmas_regulator.c2
-rw-r--r--drivers/pwm/Makefile13
-rw-r--r--include/.gitignore1
-rw-r--r--include/config_cmd_all.h1
-rw-r--r--include/configs/PMC440.h2
-rw-r--r--include/configs/am3517_crane.h2
-rw-r--r--include/configs/am3517_evm.h2
-rw-r--r--include/configs/brxre1.h1
-rw-r--r--include/configs/dragonboard410c.h1
-rw-r--r--include/configs/ethernut5.h1
-rw-r--r--include/configs/hikey.h1
-rw-r--r--include/configs/lsxl.h5
-rw-r--r--include/configs/omap3_evm.h2
-rw-r--r--include/configs/tao3530.h1
-rw-r--r--include/configs/ti_armv7_keystone2.h4
-rw-r--r--include/configs/uniphier.h4
-rw-r--r--include/configs/vexpress_aemv8a.h1
-rw-r--r--include/configs/xilinx_zynqmp.h2
-rw-r--r--scripts/.gitignore1
-rw-r--r--scripts/Kconfig2
-rw-r--r--scripts/Makefile4
-rw-r--r--scripts/bin2c.c36
-rwxr-xr-xscripts/check-config.sh12
-rwxr-xr-xscripts/checkpatch.pl81
-rw-r--r--scripts/config_whitelist.txt1
-rw-r--r--tools/Makefile11
-rw-r--r--tools/bin2header.c41
83 files changed, 361 insertions, 165 deletions
diff --git a/Kconfig b/Kconfig
index 8f9ea97..81b4226 100644
--- a/Kconfig
+++ b/Kconfig
@@ -308,6 +308,8 @@ config ARCH_FIXUP_FDT_MEMORY
endmenu # Boot images
+source "api/Kconfig"
+
source "common/Kconfig"
source "cmd/Kconfig"
@@ -325,3 +327,5 @@ source "fs/Kconfig"
source "lib/Kconfig"
source "test/Kconfig"
+
+source "scripts/Kconfig"
diff --git a/Makefile b/Makefile
index ed817f5..0b1e8a6 100644
--- a/Makefile
+++ b/Makefile
@@ -482,6 +482,13 @@ else
# Build targets only - this includes vmlinux, arch specific targets, clean
# targets and others. In general all targets except *config targets.
+# Additional helpers built in scripts/
+# Carefully list dependencies so we do not try to build scripts twice
+# in parallel
+PHONY += scripts
+scripts: scripts_basic include/config/auto.conf
+ $(Q)$(MAKE) $(build)=$(@)
+
ifeq ($(dot-config),1)
# Read in config
-include include/config/auto.conf
@@ -829,6 +836,10 @@ cmd_pad_cat = $(cmd_objcopy) && $(append) || rm -f $@
cfg: u-boot.cfg
+quiet_cmd_cfgcheck = CFGCHK $2
+cmd_cfgcheck = $(srctree)/scripts/check-config.sh $2 \
+ $(srctree)/scripts/config_whitelist.txt $(srctree)
+
all: $(ALL-y)
ifeq ($(CONFIG_DM_I2C_COMPAT)$(CONFIG_SANDBOX),y)
@echo "===================== WARNING ======================"
@@ -840,8 +851,7 @@ endif
@# Check that this build does not use CONFIG options that we do not
@# know about unless they are in Kconfig. All the existing CONFIG
@# options are whitelisted, so new ones should not be added.
- $(srctree)/scripts/check-config.sh u-boot.cfg \
- $(srctree)/scripts/config_whitelist.txt ${srctree} 1>&2
+ $(call cmd,cfgcheck,u-boot.cfg)
PHONY += dtbs
dtbs: dts/dt.dtb
@@ -1418,7 +1428,7 @@ CLEAN_DIRS += $(MODVERDIR) \
$(foreach d, spl tpl, $(patsubst %,$d/%, \
$(filter-out include, $(shell ls -1 $d 2>/dev/null))))
-CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h include/license.h \
+CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h \
boot* u-boot* MLO* SPL System.map
# Directories & files removed with 'make mrproper'
@@ -1539,11 +1549,6 @@ tests:
$(Q)$(MAKE) $(build)=scripts build_docproc
$(Q)$(MAKE) $(build)=doc/DocBook $@
-# Dummies...
-PHONY += prepare scripts
-prepare: ;
-scripts: ;
-
endif #ifeq ($(config-targets),1)
endif #ifeq ($(mixed-targets),1)
diff --git a/README b/README
index ecb1710..a3d3ecc 100644
--- a/README
+++ b/README
@@ -1771,12 +1771,6 @@ The following options need to be configured:
can be displayed via the splashscreen support or the
bmp command.
-- Do compressing for memory range:
- CONFIG_CMD_ZIP
-
- If this option is set, it would use zlib deflate method
- to compress the specified memory at its best effort.
-
- Compression support:
CONFIG_GZIP
diff --git a/api/Kconfig b/api/Kconfig
new file mode 100644
index 0000000..16731d3
--- /dev/null
+++ b/api/Kconfig
@@ -0,0 +1,9 @@
+menu "API"
+
+config API
+ bool "Enable U-Boot API"
+ default n
+ help
+ This option enables the U-Boot API. See api/README for more information.
+
+endmenu
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 397a0ae..2d75f64 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -320,10 +320,10 @@ dtb-$(CONFIG_MX6) += imx6ull-14x14-evk.dtb \
dtb-$(CONFIG_MX7) += imx7-colibri.dtb
-dtb-$(CONFIG_SOC_KEYSTONE) += k2hk-evm.dtb \
- k2l-evm.dtb \
- k2e-evm.dtb \
- k2g-evm.dtb
+dtb-$(CONFIG_SOC_KEYSTONE) += keystone-k2hk-evm.dtb \
+ keystone-k2l-evm.dtb \
+ keystone-k2e-evm.dtb \
+ keystone-k2g-evm.dtb
dtb-$(CONFIG_TARGET_SAMA5D2_XPLAINED) += \
at91-sama5d2_xplained.dtb
diff --git a/arch/arm/dts/k2e-clocks.dtsi b/arch/arm/dts/keystone-k2e-clocks.dtsi
index d56d68f..d56d68f 100644
--- a/arch/arm/dts/k2e-clocks.dtsi
+++ b/arch/arm/dts/keystone-k2e-clocks.dtsi
diff --git a/arch/arm/dts/k2e-evm.dts b/arch/arm/dts/keystone-k2e-evm.dts
index e2c3fb4..3be8b53 100644
--- a/arch/arm/dts/k2e-evm.dts
+++ b/arch/arm/dts/keystone-k2e-evm.dts
@@ -10,7 +10,7 @@
/dts-v1/;
#include "keystone.dtsi"
-#include "k2e.dtsi"
+#include "keystone-k2e.dtsi"
/ {
compatible = "ti,k2e-evm","ti,keystone";
diff --git a/arch/arm/dts/k2e-netcp.dtsi b/arch/arm/dts/keystone-k2e-netcp.dtsi
index b13b3c9..b13b3c9 100644
--- a/arch/arm/dts/k2e-netcp.dtsi
+++ b/arch/arm/dts/keystone-k2e-netcp.dtsi
diff --git a/arch/arm/dts/k2e.dtsi b/arch/arm/dts/keystone-k2e.dtsi
index 675fb8e..b5d9061 100644
--- a/arch/arm/dts/k2e.dtsi
+++ b/arch/arm/dts/keystone-k2e.dtsi
@@ -41,7 +41,7 @@
};
soc {
- /include/ "k2e-clocks.dtsi"
+ /include/ "keystone-k2e-clocks.dtsi"
usb: usb@2680000 {
interrupts = <GIC_SPI 152 IRQ_TYPE_EDGE_RISING>;
@@ -142,6 +142,6 @@
clock-names = "fck";
bus_freq = <2500000>;
};
- /include/ "k2e-netcp.dtsi"
+ /include/ "keystone-k2e-netcp.dtsi"
};
};
diff --git a/arch/arm/dts/k2g-evm.dts b/arch/arm/dts/keystone-k2g-evm.dts
index 61d0d55..696a0d7 100644
--- a/arch/arm/dts/k2g-evm.dts
+++ b/arch/arm/dts/keystone-k2g-evm.dts
@@ -1,7 +1,7 @@
/*
* Copyright 2014 Texas Instruments, Inc.
*
- * Keystone 2 Galileo EVM device tree
+ * Device Tree Source for K2G EVM
*
* 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
@@ -9,11 +9,11 @@
*/
/dts-v1/;
-#include "k2g.dtsi"
+#include "keystone-k2g.dtsi"
/ {
compatible = "ti,k2g-evm","ti,keystone";
- model = "Texas Instruments Keystone 2 Galileo EVM";
+ model = "Texas Instruments K2G General Purpose EVM";
chosen {
stdout-path = &uart0;
diff --git a/arch/arm/dts/k2g-netcp.dtsi b/arch/arm/dts/keystone-k2g-netcp.dtsi
index 6f0ff86..a9b26c3 100644
--- a/arch/arm/dts/k2g-netcp.dtsi
+++ b/arch/arm/dts/keystone-k2g-netcp.dtsi
@@ -1,5 +1,5 @@
/*
- * Device Tree Source for Keystone 2 Galileo Netcp driver
+ * Device Tree Source for K2G Netcp driver
*
* Copyright 2015 Texas Instruments, Inc.
*
diff --git a/arch/arm/dts/k2g.dtsi b/arch/arm/dts/keystone-k2g.dtsi
index add03b7..2193f9f 100644
--- a/arch/arm/dts/k2g.dtsi
+++ b/arch/arm/dts/keystone-k2g.dtsi
@@ -1,7 +1,7 @@
/*
* Copyright 2014 Texas Instruments, Inc.
*
- * Keystone 2 Galileo soc device tree
+ * Device Tree Source for K2G SOC
*
* 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
@@ -12,7 +12,7 @@
#include "skeleton.dtsi"
/ {
- model = "Texas Instruments Keystone 2 SoC";
+ model = "Texas Instruments K2G SoC";
#address-cells = <1>;
#size-cells = <1>;
interrupt-parent = <&gic>;
@@ -98,7 +98,7 @@
status = "disabled";
};
- #include "k2g-netcp.dtsi"
+ #include "keystone-k2g-netcp.dtsi"
pmmc: pmmc@2900000 {
compatible = "ti,power-processor";
diff --git a/arch/arm/dts/k2hk-clocks.dtsi b/arch/arm/dts/keystone-k2hk-clocks.dtsi
index af9b719..af9b719 100644
--- a/arch/arm/dts/k2hk-clocks.dtsi
+++ b/arch/arm/dts/keystone-k2hk-clocks.dtsi
diff --git a/arch/arm/dts/k2hk-evm.dts b/arch/arm/dts/keystone-k2hk-evm.dts
index c5cad2c..76a675f 100644
--- a/arch/arm/dts/k2hk-evm.dts
+++ b/arch/arm/dts/keystone-k2hk-evm.dts
@@ -10,7 +10,7 @@
/dts-v1/;
#include "keystone.dtsi"
-#include "k2hk.dtsi"
+#include "keystone-k2hk.dtsi"
/ {
compatible = "ti,k2hk-evm","ti,keystone";
diff --git a/arch/arm/dts/k2hk-netcp.dtsi b/arch/arm/dts/keystone-k2hk-netcp.dtsi
index 77a32c3..77a32c3 100644
--- a/arch/arm/dts/k2hk-netcp.dtsi
+++ b/arch/arm/dts/keystone-k2hk-netcp.dtsi
diff --git a/arch/arm/dts/k2hk.dtsi b/arch/arm/dts/keystone-k2hk.dtsi
index d0810a5..fc78696 100644
--- a/arch/arm/dts/k2hk.dtsi
+++ b/arch/arm/dts/keystone-k2hk.dtsi
@@ -41,7 +41,7 @@
};
soc {
- /include/ "k2hk-clocks.dtsi"
+ /include/ "keystone-k2hk-clocks.dtsi"
dspgpio0: keystone_dsp_gpio@02620240 {
compatible = "ti,keystone-dsp-gpio";
@@ -109,6 +109,6 @@
clock-names = "fck";
bus_freq = <2500000>;
};
- /include/ "k2hk-netcp.dtsi"
+ /include/ "keystone-k2hk-netcp.dtsi"
};
};
diff --git a/arch/arm/dts/k2l-clocks.dtsi b/arch/arm/dts/keystone-k2l-clocks.dtsi
index ef8464b..ef8464b 100644
--- a/arch/arm/dts/k2l-clocks.dtsi
+++ b/arch/arm/dts/keystone-k2l-clocks.dtsi
diff --git a/arch/arm/dts/k2l-evm.dts b/arch/arm/dts/keystone-k2l-evm.dts
index da0661b..b5c5617 100644
--- a/arch/arm/dts/k2l-evm.dts
+++ b/arch/arm/dts/keystone-k2l-evm.dts
@@ -10,7 +10,7 @@
/dts-v1/;
#include "keystone.dtsi"
-#include "k2l.dtsi"
+#include "keystone-k2l.dtsi"
/ {
compatible = "ti,k2l-evm","ti,keystone";
diff --git a/arch/arm/dts/k2l-netcp.dtsi b/arch/arm/dts/keystone-k2l-netcp.dtsi
index 6b95284..6b95284 100644
--- a/arch/arm/dts/k2l-netcp.dtsi
+++ b/arch/arm/dts/keystone-k2l-netcp.dtsi
diff --git a/arch/arm/dts/k2l.dtsi b/arch/arm/dts/keystone-k2l.dtsi
index 49fd414..d681cab 100644
--- a/arch/arm/dts/k2l.dtsi
+++ b/arch/arm/dts/keystone-k2l.dtsi
@@ -29,7 +29,7 @@
};
soc {
- /include/ "k2l-clocks.dtsi"
+ /include/ "keystone-k2l-clocks.dtsi"
uart2: serial@02348400 {
compatible = "ns16550a";
@@ -89,7 +89,7 @@
clock-names = "fck";
bus_freq = <2500000>;
};
- /include/ "k2l-netcp.dtsi"
+ /include/ "keystone-k2l-netcp.dtsi"
};
};
diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S
index 91b19e0..19c6a98 100644
--- a/arch/arm/lib/crt0_64.S
+++ b/arch/arm/lib/crt0_64.S
@@ -117,10 +117,8 @@ relocation_return:
*/
ldr x0, =__bss_start /* this is auto-relocated! */
ldr x1, =__bss_end /* this is auto-relocated! */
- mov x2, #0
clear_loop:
- str x2, [x0]
- add x0, x0, #8
+ str xzr, [x0], #8
cmp x0, x1
b.lo clear_loop
diff --git a/arch/arm/lib/relocate_64.S b/arch/arm/lib/relocate_64.S
index 242e56e..c760053 100644
--- a/arch/arm/lib/relocate_64.S
+++ b/arch/arm/lib/relocate_64.S
@@ -68,7 +68,7 @@ relocate_done:
b 0f
1: mrs x0, sctlr_el1
0: tbz w0, #2, 5f /* skip flushing cache if disabled */
- tbz w0, #12, 4f /* invalide i-cache is enabled */
+ tbz w0, #12, 4f /* skip invalidating i-cache if disabled */
ic iallu /* i-cache invalidate all */
isb sy
4: ldp x0, x1, [sp, #16]
diff --git a/arch/arm/mach-uniphier/Kconfig b/arch/arm/mach-uniphier/Kconfig
index cd9ba6b..5739325 100644
--- a/arch/arm/mach-uniphier/Kconfig
+++ b/arch/arm/mach-uniphier/Kconfig
@@ -13,6 +13,7 @@ config ARCH_UNIPHIER_32BIT
config ARCH_UNIPHIER_64BIT
bool
select ARM64
+ select CMD_UNZIP
select SPL_SEPARATE_BSS if SPL
select ARMV8_MULTIENTRY if SPL
select ARMV8_SPIN_TABLE if SPL
diff --git a/board/phytec/pcm052/pcm052.c b/board/phytec/pcm052/pcm052.c
index e75ff4f..54a4e4f 100644
--- a/board/phytec/pcm052/pcm052.c
+++ b/board/phytec/pcm052/pcm052.c
@@ -258,8 +258,7 @@ int dram_init(void)
.wldqsen = 25,
};
- ddrmc_ctrl_init_ddr3(&pcm052_ddr_timings, pcm052_cr_settings,
- pcm052_phy_settings, 1, 2);
+ const int row_diff = 2;
#elif defined(CONFIG_TARGET_BK4R1)
@@ -314,8 +313,7 @@ int dram_init(void)
.wldqsen = 25,
};
- ddrmc_ctrl_init_ddr3(&pcm052_ddr_timings, pcm052_cr_settings,
- pcm052_phy_settings, 1, 1);
+ const int row_diff = 1;
#else /* Unknown PCM052 variant */
@@ -325,6 +323,9 @@ int dram_init(void)
imx_iomux_v3_setup_multiple_pads(pcm052_pads, ARRAY_SIZE(pcm052_pads));
+ ddrmc_ctrl_init_ddr3(&pcm052_ddr_timings, pcm052_cr_settings,
+ pcm052_phy_settings, 1, row_diff);
+
gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
return 0;
diff --git a/cmd/.gitignore b/cmd/.gitignore
new file mode 100644
index 0000000..bab889f
--- /dev/null
+++ b/cmd/.gitignore
@@ -0,0 +1,6 @@
+config_data.gz
+config_data_gz.h
+config_data_size.h
+license_data.gz
+license_data_gz.h
+license_data_size.h
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 4a0d489..ef53156 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -126,6 +126,18 @@ config CMD_BDI
help
Print board info
+config CMD_CONFIG
+ bool "config"
+ select BUILD_BIN2C
+ default SANDBOX
+ help
+ Print ".config" contents.
+
+ If this option is enabled, the ".config" file contents are embedded
+ in the U-Boot image and can be printed on the console by the "config"
+ command. This provides information of which options are enabled on
+ the running U-Boot.
+
config CMD_CONSOLE
bool "coninfo"
default y
@@ -142,6 +154,7 @@ config CMD_CPU
config CMD_LICENSE
bool "license"
+ select BUILD_BIN2C
help
Print GPL license text
@@ -346,6 +359,16 @@ config CMD_MEMINFO
help
Display memory information.
+config CMD_UNZIP
+ bool "unzip"
+ help
+ Uncompress a zip-compressed memory region.
+
+config CMD_ZIP
+ bool "zip"
+ help
+ Compress a memory region with zlib deflate method.
+
endmenu
menu "Device access commands"
diff --git a/cmd/Makefile b/cmd/Makefile
index 566fed9..f13bb8c 100644
--- a/cmd/Makefile
+++ b/cmd/Makefile
@@ -31,6 +31,7 @@ obj-$(CONFIG_CMD_BOOTI) += booti.o
obj-$(CONFIG_CMD_CACHE) += cache.o
obj-$(CONFIG_CMD_CBFS) += cbfs.o
obj-$(CONFIG_CMD_CLK) += clk.o
+obj-$(CONFIG_CMD_CONFIG) += config.o
obj-$(CONFIG_CMD_CONSOLE) += console.o
obj-$(CONFIG_CMD_CPLBINFO) += cplbinfo.o
obj-$(CONFIG_CMD_CPU) += cpu.o
@@ -165,3 +166,39 @@ obj-$(CONFIG_CMD_BLOB) += blob.o
obj-y += nvedit.o
obj-$(CONFIG_ARCH_MVEBU) += mvebu/
+
+filechk_data_gz = (echo "static const char data_gz[] ="; cat $< | scripts/bin2c; echo ";")
+
+filechk_data_size = \
+ (echo "static const size_t data_size = "; \
+ cat $< | wc -c; echo ";")
+
+# "config" command
+$(obj)/config.o: $(obj)/config_data_gz.h $(obj)/config_data_size.h
+
+targets += config_data.gz
+$(obj)/config_data.gz: $(KCONFIG_CONFIG) FORCE
+ $(call if_changed,gzip)
+
+targets += config_data_gz.h
+$(obj)/config_data_gz.h: $(obj)/config_data.gz FORCE
+ $(call filechk,data_gz)
+
+targets += config_data_size.h
+$(obj)/config_data_size.h: $(KCONFIG_CONFIG) FORCE
+ $(call filechk,data_size)
+
+# "license" command
+$(obj)/license.o: $(obj)/license_data_gz.h $(obj)/license_data_size.h
+
+targets += license_data.gz
+$(obj)/license_data.gz: $(srctree)/Licenses/gpl-2.0.txt FORCE
+ $(call if_changed,gzip)
+
+targets += license_data_gz.h
+$(obj)/license_data_gz.h: $(obj)/license_data.gz FORCE
+ $(call filechk,data_gz)
+
+targets += license_data_size.h
+$(obj)/license_data_size.h: $(srctree)/Licenses/gpl-2.0.txt FORCE
+ $(call filechk,data_size)
diff --git a/cmd/bootm.c b/cmd/bootm.c
index a7e181d..953a57d 100644
--- a/cmd/bootm.c
+++ b/cmd/bootm.c
@@ -390,7 +390,7 @@ static int nand_imls_legacyimage(struct mtd_info *mtd, int nand_dev,
return -ENOMEM;
}
- ret = nand_read_skip_bad(mtd, off, &len, imgdata);
+ ret = nand_read_skip_bad(mtd, off, &len, NULL, mtd->size, imgdata);
if (ret < 0 && ret != -EUCLEAN) {
free(imgdata);
return ret;
@@ -430,7 +430,7 @@ static int nand_imls_fitimage(struct mtd_info *mtd, int nand_dev, loff_t off,
return -ENOMEM;
}
- ret = nand_read_skip_bad(mtd, off, &len, imgdata);
+ ret = nand_read_skip_bad(mtd, off, &len, NULL, mtd->size, imgdata);
if (ret < 0 && ret != -EUCLEAN) {
free(imgdata);
return ret;
diff --git a/cmd/config.c b/cmd/config.c
new file mode 100644
index 0000000..0c7f4e0
--- /dev/null
+++ b/cmd/config.c
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2017 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <command.h>
+#include <malloc.h>
+
+#include "config_data_gz.h"
+#include "config_data_size.h"
+
+static int do_config(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+ char *dst;
+ unsigned long len = data_size;
+ int ret = CMD_RET_SUCCESS;
+
+ dst = malloc(data_size + 1);
+ if (!dst)
+ return CMD_RET_FAILURE;
+
+ ret = gunzip(dst, data_size, (unsigned char *)data_gz, &len);
+ if (ret) {
+ printf("failed to uncompress .config data\n");
+ ret = CMD_RET_FAILURE;
+ goto free;
+ }
+
+ dst[data_size] = 0;
+ puts(dst);
+
+free:
+ free(dst);
+
+ return ret;
+}
+
+U_BOOT_CMD(
+ config, 1, 1, do_config,
+ "print .config",
+ ""
+);
diff --git a/cmd/license.c b/cmd/license.c
index 5ee57f8..29fc8aa 100644
--- a/cmd/license.c
+++ b/cmd/license.c
@@ -6,31 +6,36 @@
*/
#include <common.h>
-
-/* Licenses/gpl-2.0.txt is currently 18092 bytes in size */
-#define LICENSE_MAX 20480
-
#include <command.h>
#include <malloc.h>
-#include <license.h>
-int do_license(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+#include "license_data_gz.h"
+#include "license_data_size.h"
+
+static int do_license(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
- char *dst = malloc(LICENSE_MAX);
- unsigned long len = LICENSE_MAX;
+ char *dst;
+ unsigned long len = data_size;
+ int ret = CMD_RET_SUCCESS;
+ dst = malloc(data_size + 1);
if (!dst)
- return -1;
+ return CMD_RET_FAILURE;
- if (gunzip(dst, LICENSE_MAX, license_gzip, &len) != 0) {
+ ret = gunzip(dst, data_size, (unsigned char *)data_gz, &len);
+ if (ret) {
printf("Error uncompressing license text\n");
- free(dst);
- return -1;
+ ret = CMD_RET_FAILURE;
+ goto free;
}
+
+ dst[data_size] = 0;
puts(dst);
+
+free:
free(dst);
- return 0;
+ return ret;
}
U_BOOT_CMD(
diff --git a/common/env_sf.c b/common/env_sf.c
index c53200f..27b4d12 100644
--- a/common/env_sf.c
+++ b/common/env_sf.c
@@ -19,16 +19,16 @@
#include <dm/device-internal.h>
#ifndef CONFIG_ENV_SPI_BUS
-# define CONFIG_ENV_SPI_BUS 0
+# define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
#endif
#ifndef CONFIG_ENV_SPI_CS
-# define CONFIG_ENV_SPI_CS 0
+# define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
#endif
#ifndef CONFIG_ENV_SPI_MAX_HZ
-# define CONFIG_ENV_SPI_MAX_HZ 1000000
+# define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
#endif
#ifndef CONFIG_ENV_SPI_MODE
-# define CONFIG_ENV_SPI_MODE SPI_MODE_3
+# define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
#endif
#ifdef CONFIG_ENV_OFFSET_REDUND
diff --git a/configs/PMC440_defconfig b/configs/PMC440_defconfig
index 0bcc586..7380ba7 100644
--- a/configs/PMC440_defconfig
+++ b/configs/PMC440_defconfig
@@ -24,3 +24,4 @@ CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_API=y
diff --git a/configs/brxre1_defconfig b/configs/brxre1_defconfig
index 0b7b082..dfa8712 100644
--- a/configs/brxre1_defconfig
+++ b/configs/brxre1_defconfig
@@ -31,6 +31,7 @@ CONFIG_CMD_BOOTZ=y
# CONFIG_CMD_XIMG is not set
# CONFIG_CMD_EDITENV is not set
# CONFIG_CMD_CRC32 is not set
+CONFIG_CMD_UNZIP=y
# CONFIG_CMD_LOADB is not set
# CONFIG_CMD_LOADS is not set
# CONFIG_CMD_FLASH is not set
diff --git a/configs/dragonboard410c_defconfig b/configs/dragonboard410c_defconfig
index 8f206e2..e94f7b3 100644
--- a/configs/dragonboard410c_defconfig
+++ b/configs/dragonboard410c_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="dragonboard410c => "
# CONFIG_CMD_IMI is not set
# CONFIG_CMD_IMLS is not set
CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_UNZIP=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
diff --git a/configs/ethernut5_defconfig b/configs/ethernut5_defconfig
index c831aab..4d1b4b0 100644
--- a/configs/ethernut5_defconfig
+++ b/configs/ethernut5_defconfig
@@ -8,6 +8,7 @@ CONFIG_HUSH_PARSER=y
CONFIG_SYS_PROMPT="U-Boot> "
# CONFIG_CMD_BDI is not set
CONFIG_CMD_ASKENV=y
+CONFIG_CMD_UNZIP=y
# CONFIG_CMD_LOADS is not set
CONFIG_CMD_MMC=y
CONFIG_CMD_SF=y
diff --git a/configs/hikey_defconfig b/configs/hikey_defconfig
index 8dd330a..b112be2 100644
--- a/configs/hikey_defconfig
+++ b/configs/hikey_defconfig
@@ -7,6 +7,7 @@ CONFIG_DISTRO_DEFAULTS=y
# CONFIG_DISPLAY_BOARDINFO is not set
CONFIG_BOARD_EARLY_INIT_F=y
# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_UNZIP=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_GPIO=y
diff --git a/configs/icnova-a20-swac_defconfig b/configs/icnova-a20-swac_defconfig
index 567eb9b..5ef0e47 100644
--- a/configs/icnova-a20-swac_defconfig
+++ b/configs/icnova-a20-swac_defconfig
@@ -13,9 +13,10 @@ CONFIG_VIDEO_LCD_POWER="PH22"
CONFIG_VIDEO_LCD_PANEL_LVDS=y
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-icnova-swac"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,CMD_BMP,CMD_UNZIP"
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,CMD_BMP"
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_UNZIP=y
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_FPGA is not set
# CONFIG_SPL_DOS_PARTITION is not set
diff --git a/configs/k2e_evm_defconfig b/configs/k2e_evm_defconfig
index 8f0d3fa..a42a485 100644
--- a/configs/k2e_evm_defconfig
+++ b/configs/k2e_evm_defconfig
@@ -8,7 +8,7 @@ CONFIG_SPL_POWER_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL_SPI_FLASH_SUPPORT=y
CONFIG_SPL_SPI_SUPPORT=y
-CONFIG_DEFAULT_DEVICE_TREE="k2e-evm"
+CONFIG_DEFAULT_DEVICE_TREE="keystone-k2e-evm"
CONFIG_OF_BOARD_SETUP=y
CONFIG_SYS_CONSOLE_INFO_QUIET=y
CONFIG_VERSION_VARIABLE=y
diff --git a/configs/k2g_evm_defconfig b/configs/k2g_evm_defconfig
index 17a5e67..f3ee01a 100644
--- a/configs/k2g_evm_defconfig
+++ b/configs/k2g_evm_defconfig
@@ -8,7 +8,7 @@ CONFIG_SPL_POWER_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL_SPI_FLASH_SUPPORT=y
CONFIG_SPL_SPI_SUPPORT=y
-CONFIG_DEFAULT_DEVICE_TREE="k2g-evm"
+CONFIG_DEFAULT_DEVICE_TREE="keystone-k2g-evm"
CONFIG_OF_BOARD_SETUP=y
CONFIG_SYS_CONSOLE_INFO_QUIET=y
CONFIG_VERSION_VARIABLE=y
diff --git a/configs/k2hk_evm_defconfig b/configs/k2hk_evm_defconfig
index 6791d56..d924796 100644
--- a/configs/k2hk_evm_defconfig
+++ b/configs/k2hk_evm_defconfig
@@ -8,7 +8,7 @@ CONFIG_SPL_POWER_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL_SPI_FLASH_SUPPORT=y
CONFIG_SPL_SPI_SUPPORT=y
-CONFIG_DEFAULT_DEVICE_TREE="k2hk-evm"
+CONFIG_DEFAULT_DEVICE_TREE="keystone-k2hk-evm"
CONFIG_OF_BOARD_SETUP=y
CONFIG_SYS_CONSOLE_INFO_QUIET=y
CONFIG_VERSION_VARIABLE=y
diff --git a/configs/k2l_evm_defconfig b/configs/k2l_evm_defconfig
index 4a70e1a..c817585 100644
--- a/configs/k2l_evm_defconfig
+++ b/configs/k2l_evm_defconfig
@@ -8,7 +8,7 @@ CONFIG_SPL_POWER_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL_SPI_FLASH_SUPPORT=y
CONFIG_SPL_SPI_SUPPORT=y
-CONFIG_DEFAULT_DEVICE_TREE="k2l-evm"
+CONFIG_DEFAULT_DEVICE_TREE="keystone-k2l-evm"
CONFIG_OF_BOARD_SETUP=y
CONFIG_SYS_CONSOLE_INFO_QUIET=y
CONFIG_VERSION_VARIABLE=y
diff --git a/configs/lsxhl_defconfig b/configs/lsxhl_defconfig
index 75bd46d..4d974f1 100644
--- a/configs/lsxhl_defconfig
+++ b/configs/lsxhl_defconfig
@@ -23,3 +23,4 @@ CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
+CONFIG_API=y
diff --git a/configs/vexpress_aemv8a_dram_defconfig b/configs/vexpress_aemv8a_dram_defconfig
index c899be0..db492af 100644
--- a/configs/vexpress_aemv8a_dram_defconfig
+++ b/configs/vexpress_aemv8a_dram_defconfig
@@ -14,6 +14,7 @@ CONFIG_SYS_PROMPT="VExpress64# "
# CONFIG_CMD_EDITENV is not set
# CONFIG_CMD_ENV_EXISTS is not set
CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_UNZIP=y
# CONFIG_CMD_LOADS is not set
CONFIG_CMD_ARMFLASH=y
# CONFIG_CMD_FPGA is not set
diff --git a/configs/vexpress_aemv8a_juno_defconfig b/configs/vexpress_aemv8a_juno_defconfig
index 2267362..537301c 100644
--- a/configs/vexpress_aemv8a_juno_defconfig
+++ b/configs/vexpress_aemv8a_juno_defconfig
@@ -14,6 +14,7 @@ CONFIG_SYS_PROMPT="VExpress64# "
# CONFIG_CMD_EDITENV is not set
# CONFIG_CMD_ENV_EXISTS is not set
CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_UNZIP=y
# CONFIG_CMD_LOADS is not set
CONFIG_CMD_ARMFLASH=y
# CONFIG_CMD_FPGA is not set
diff --git a/configs/vexpress_aemv8a_semi_defconfig b/configs/vexpress_aemv8a_semi_defconfig
index 02740a4..2720a71 100644
--- a/configs/vexpress_aemv8a_semi_defconfig
+++ b/configs/vexpress_aemv8a_semi_defconfig
@@ -14,6 +14,7 @@ CONFIG_SYS_PROMPT="VExpress64# "
# CONFIG_CMD_EDITENV is not set
# CONFIG_CMD_ENV_EXISTS is not set
CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_UNZIP=y
# CONFIG_CMD_LOADS is not set
CONFIG_CMD_ARMFLASH=y
# CONFIG_CMD_FPGA is not set
diff --git a/configs/xilinx_zynqmp_ep_defconfig b/configs/xilinx_zynqmp_ep_defconfig
index 49c0786..6b568b4 100644
--- a/configs/xilinx_zynqmp_ep_defconfig
+++ b/configs/xilinx_zynqmp_ep_defconfig
@@ -21,6 +21,7 @@ CONFIG_SYS_PROMPT="ZynqMP> "
# CONFIG_CMD_XIMG is not set
# CONFIG_CMD_EDITENV is not set
# CONFIG_CMD_ENV_EXISTS is not set
+CONFIG_CMD_UNZIP=y
# CONFIG_CMD_LOADB is not set
# CONFIG_CMD_LOADS is not set
CONFIG_CMD_GPT=y
diff --git a/configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig b/configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig
index a3585d0..4d7bcf3 100644
--- a/configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig
+++ b/configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig
@@ -19,6 +19,7 @@ CONFIG_SPL_OS_BOOT=y
CONFIG_SYS_PROMPT="ZynqMP> "
# CONFIG_CMD_IMLS is not set
CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_UNZIP=y
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
diff --git a/configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig b/configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig
index 3693d9b..822b25d 100644
--- a/configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig
+++ b/configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig
@@ -21,6 +21,7 @@ CONFIG_SPL_OS_BOOT=y
CONFIG_SYS_PROMPT="ZynqMP> "
# CONFIG_CMD_IMLS is not set
CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_UNZIP=y
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_GPT=y
CONFIG_CMD_NAND=y
diff --git a/configs/xilinx_zynqmp_zc1751_xm018_dc4_defconfig b/configs/xilinx_zynqmp_zc1751_xm018_dc4_defconfig
index a4c73f8..89813df 100644
--- a/configs/xilinx_zynqmp_zc1751_xm018_dc4_defconfig
+++ b/configs/xilinx_zynqmp_zc1751_xm018_dc4_defconfig
@@ -16,6 +16,7 @@ CONFIG_SPL_OS_BOOT=y
CONFIG_SYS_PROMPT="ZynqMP> "
# CONFIG_CMD_IMLS is not set
CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_UNZIP=y
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_MMC=y
CONFIG_CMD_I2C=y
diff --git a/configs/xilinx_zynqmp_zc1751_xm019_dc5_defconfig b/configs/xilinx_zynqmp_zc1751_xm019_dc5_defconfig
index f981b21..b8fe33e 100644
--- a/configs/xilinx_zynqmp_zc1751_xm019_dc5_defconfig
+++ b/configs/xilinx_zynqmp_zc1751_xm019_dc5_defconfig
@@ -17,6 +17,7 @@ CONFIG_SPL_OS_BOOT=y
CONFIG_SYS_PROMPT="ZynqMP> "
# CONFIG_CMD_IMLS is not set
CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_UNZIP=y
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_MMC=y
CONFIG_CMD_I2C=y
diff --git a/configs/xilinx_zynqmp_zcu102_defconfig b/configs/xilinx_zynqmp_zcu102_defconfig
index 7b65fe0..b13bf5b 100644
--- a/configs/xilinx_zynqmp_zcu102_defconfig
+++ b/configs/xilinx_zynqmp_zcu102_defconfig
@@ -19,6 +19,7 @@ CONFIG_SPL_OS_BOOT=y
CONFIG_SYS_PROMPT="ZynqMP> "
# CONFIG_CMD_IMLS is not set
CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_UNZIP=y
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
diff --git a/configs/xilinx_zynqmp_zcu102_revB_defconfig b/configs/xilinx_zynqmp_zcu102_revB_defconfig
index 4bed589..2489d89 100644
--- a/configs/xilinx_zynqmp_zcu102_revB_defconfig
+++ b/configs/xilinx_zynqmp_zcu102_revB_defconfig
@@ -19,6 +19,7 @@ CONFIG_SPL_OS_BOOT=y
CONFIG_SYS_PROMPT="ZynqMP> "
# CONFIG_CMD_IMLS is not set
CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_UNZIP=y
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
diff --git a/disk/part_efi.c b/disk/part_efi.c
index b5928e5..893cbbd 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -324,6 +324,13 @@ static int set_protective_mbr(struct blk_desc *dev_desc)
printf("%s: calloc failed!\n", __func__);
return -1;
}
+
+ /* Read MBR to backup boot code if it exists */
+ if (blk_dread(dev_desc, 0, 1, p_mbr) != 1) {
+ error("** Can't read from device %d **\n", dev_desc->devnum);
+ return -1;
+ }
+
/* Append signature */
p_mbr->signature = MSDOS_MBR_SIGNATURE;
p_mbr->partition_record[0].sys_ind = EFI_PMBR_OSTYPE_EFI_GPT;
diff --git a/drivers/clk/aspeed/clk_ast2500.c b/drivers/clk/aspeed/clk_ast2500.c
index af369cc..26a5e58 100644
--- a/drivers/clk/aspeed/clk_ast2500.c
+++ b/drivers/clk/aspeed/clk_ast2500.c
@@ -35,7 +35,7 @@ static ulong ast2500_get_mpll_rate(ulong clkin, u32 mpll_reg)
const ulong post_div = (mpll_reg >> SCU_MPLL_POST_SHIFT)
& SCU_MPLL_POST_MASK;
- return (clkin * ((num + 1) / (denum + 1))) / post_div;
+ return (clkin * ((num + 1) / (denum + 1))) / (post_div + 1);
}
/*
@@ -50,7 +50,7 @@ static ulong ast2500_get_hpll_rate(ulong clkin, u32 hpll_reg)
const ulong post_div = (hpll_reg >> SCU_HPLL_POST_SHIFT)
& SCU_HPLL_POST_MASK;
- return (clkin * ((num + 1) / (denum + 1))) / post_div;
+ return (clkin * ((num + 1) / (denum + 1))) / (post_div + 1);
}
static ulong ast2500_get_clkin(struct ast2500_scu *scu)
diff --git a/drivers/gpio/db8500_gpio.c b/drivers/gpio/db8500_gpio.c
index db32db6..eefb56d 100644
--- a/drivers/gpio/db8500_gpio.c
+++ b/drivers/gpio/db8500_gpio.c
@@ -174,7 +174,7 @@ void db8500_gpio_set_output(unsigned gpio, int val)
/**
* config_pin - configure a pin's mux attributes
- * @cfg: pin confguration
+ * @cfg: pin configuration
*
* Configures a pin's mode (alternate function or GPIO), its pull up status,
* and its sleep mode based on the specified configuration. The @cfg is
diff --git a/drivers/net/cpsw-common.c b/drivers/net/cpsw-common.c
index aa52503..55f56d9 100644
--- a/drivers/net/cpsw-common.c
+++ b/drivers/net/cpsw-common.c
@@ -110,7 +110,7 @@ int ti_cm_get_macid(struct udevice *dev, int slave, u8 *mac_addr)
if (of_device_is_compatible(dev, "ti,dm816-emac"))
return cpsw_am33xx_cm_get_macid(dev, 0x30, slave, mac_addr);
- if (of_machine_is_compatible("ti,am4372"))
+ if (of_machine_is_compatible("ti,am43"))
return cpsw_am33xx_cm_get_macid(dev, 0x630, slave, mac_addr);
if (of_machine_is_compatible("ti,dra7"))
diff --git a/drivers/power/regulator/palmas_regulator.c b/drivers/power/regulator/palmas_regulator.c
index cce7cd2..399f7a5 100644
--- a/drivers/power/regulator/palmas_regulator.c
+++ b/drivers/power/regulator/palmas_regulator.c
@@ -356,7 +356,7 @@ static int palmas_smps_probe(struct udevice *dev)
case 8:
case 9:
case 10:
- idx = dev->driver_data - 4;
+ idx = dev->driver_data - 3;
uc_pdata->ctrl_reg = palmas_smps_ctrl[type][idx];
uc_pdata->volt_reg = palmas_smps_volt[type][idx];
break;
diff --git a/drivers/pwm/Makefile b/drivers/pwm/Makefile
index af39347..b037130 100644
--- a/drivers/pwm/Makefile
+++ b/drivers/pwm/Makefile
@@ -10,10 +10,9 @@
#ccflags-y += -DDEBUG
-obj-$(CONFIG_DM_PWM) += pwm-uclass.o
-obj-$(CONFIG_PWM_ROCKCHIP) += rk_pwm.o
-obj-$(CONFIG_PWM_IMX) += pwm-imx.o pwm-imx-util.o
-ifdef CONFIG_DM_PWM
-obj-$(CONFIG_PWM_TEGRA) += tegra_pwm.o
-obj-$(CONFIG_PWM_EXYNOS) += exynos_pwm.o
-endif
+obj-$(CONFIG_DM_PWM) += pwm-uclass.o
+
+obj-$(CONFIG_PWM_EXYNOS) += exynos_pwm.o
+obj-$(CONFIG_PWM_IMX) += pwm-imx.o pwm-imx-util.o
+obj-$(CONFIG_PWM_ROCKCHIP) += rk_pwm.o
+obj-$(CONFIG_PWM_TEGRA) += tegra_pwm.o
diff --git a/include/.gitignore b/include/.gitignore
index 75be527..8e41a95 100644
--- a/include/.gitignore
+++ b/include/.gitignore
@@ -2,4 +2,3 @@
/bmp_logo.h
/bmp_logo_data.h
/config.h
-/license.h
diff --git a/include/config_cmd_all.h b/include/config_cmd_all.h
index a0d4e94..a8befe3 100644
--- a/include/config_cmd_all.h
+++ b/include/config_cmd_all.h
@@ -49,7 +49,6 @@
#define CONFIG_CMD_TERMINAL /* built-in Serial Terminal */
#define CONFIG_CMD_UBIFS /* UBIFS Support */
#define CONFIG_CMD_UNIVERSE /* Tundra Universe Support */
-#define CONFIG_CMD_UNZIP /* unzip from memory to memory */
#define CONFIG_CMD_ZFS /* ZFS Support */
#endif /* _CONFIG_CMD_ALL_H */
diff --git a/include/configs/PMC440.h b/include/configs/PMC440.h
index 5ea82f8..59ba79e 100644
--- a/include/configs/PMC440.h
+++ b/include/configs/PMC440.h
@@ -385,6 +385,4 @@
#define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
#endif
-#define CONFIG_API 1
-
#endif /* __CONFIG_H */
diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h
index 5d56860..f1b82df 100644
--- a/include/configs/am3517_crane.h
+++ b/include/configs/am3517_crane.h
@@ -88,8 +88,6 @@
#ifdef CONFIG_USB_MUSB_HCD
-#define CONGIG_CMD_STORAGE
-
#ifdef CONFIG_USB_KEYBOARD
#define CONFIG_SYS_USB_EVENT_POLL
#define CONFIG_PREBOOT "usb start"
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index 13de819..1062e20 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -88,8 +88,6 @@
#ifdef CONFIG_USB_MUSB_HOST
-#define CONGIG_CMD_STORAGE
-
#ifdef CONFIG_USB_KEYBOARD
#define CONFIG_SYS_USB_EVENT_POLL
#define CONFIG_PREBOOT "usb start"
diff --git a/include/configs/brxre1.h b/include/configs/brxre1.h
index 02094b5..82ee7c6 100644
--- a/include/configs/brxre1.h
+++ b/include/configs/brxre1.h
@@ -22,7 +22,6 @@
#define CONFIG_VIDEO_BMP_GZIP
#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (1366*767*4)
-#define CONFIG_CMD_UNZIP
#define CONFIG_CMD_BMP
#define CONFIG_BMP_24BMP
#define CONFIG_BMP_32BPP
diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonboard410c.h
index da1c589..9b7f43f 100644
--- a/include/configs/dragonboard410c.h
+++ b/include/configs/dragonboard410c.h
@@ -57,7 +57,6 @@
/*#define CONFIG_SUPPORT_EMMC_BOOT */
#define CONFIG_CMD_REGINFO /* Register dump */
#define CONFIG_CMD_TFTP
-#define CONFIG_CMD_UNZIP
/* Partition table support */
#define HAVE_BLOCK_DEVICE /* Needed for partition commands */
diff --git a/include/configs/ethernut5.h b/include/configs/ethernut5.h
index a3c40d6..55d65ef 100644
--- a/include/configs/ethernut5.h
+++ b/include/configs/ethernut5.h
@@ -95,7 +95,6 @@
#define CONFIG_CMD_REISER
#define CONFIG_CMD_SAVES
#define CONFIG_CMD_UBIFS
-#define CONFIG_CMD_UNZIP
#endif
/* NAND flash */
diff --git a/include/configs/hikey.h b/include/configs/hikey.h
index 9ec8140..899d62d 100644
--- a/include/configs/hikey.h
+++ b/include/configs/hikey.h
@@ -74,7 +74,6 @@
#define CONFIG_FS_EXT4
/* Command line configuration */
-#define CONFIG_CMD_UNZIP
#define CONFIG_CMD_ENV
#define CONFIG_MTD_PARTITIONS
diff --git a/include/configs/lsxl.h b/include/configs/lsxl.h
index 7ec82cd..ad1adce 100644
--- a/include/configs/lsxl.h
+++ b/include/configs/lsxl.h
@@ -38,11 +38,6 @@
#define CONFIG_SYS_NO_FLASH
/*
- * Enable u-boot API for standalone programs.
- */
-#define CONFIG_API
-
-/*
* Commands configuration
*/
#define CONFIG_CMD_ENV
diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h
index 8846aa6..8ed5602 100644
--- a/include/configs/omap3_evm.h
+++ b/include/configs/omap3_evm.h
@@ -217,8 +217,6 @@
#ifdef CONFIG_USB_MUSB_HCD
-#define CONGIG_CMD_STORAGE
-
#ifdef CONFIG_USB_KEYBOARD
#define CONFIG_SYS_USB_EVENT_POLL
#define CONFIG_PREBOOT "usb start"
diff --git a/include/configs/tao3530.h b/include/configs/tao3530.h
index dafb05f..32a4b27 100644
--- a/include/configs/tao3530.h
+++ b/include/configs/tao3530.h
@@ -263,7 +263,6 @@
#define CONFIG_USB_ETHER
#define CONFIG_USB_ETHER_RNDIS
-#define CONGIG_CMD_STORAGE
/* Defines for SPL */
#define CONFIG_SPL_FRAMEWORK
diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
index d120c69..5d4ef58 100644
--- a/include/configs/ti_armv7_keystone2.h
+++ b/include/configs/ti_armv7_keystone2.h
@@ -47,11 +47,11 @@
#define CONFIG_SYS_SPL_MALLOC_START (CONFIG_SPL_BSS_START_ADDR + \
CONFIG_SPL_BSS_MAX_SIZE)
#define CONFIG_SYS_SPL_MALLOC_SIZE (32 * 1024)
-#define CONFIG_SPL_STACK_SIZE (8 * 1024)
+#define KEYSTONE_SPL_STACK_SIZE (8 * 1024)
#define CONFIG_SPL_STACK (CONFIG_SYS_SPL_MALLOC_START + \
CONFIG_SYS_SPL_MALLOC_SIZE + \
SPL_MALLOC_F_SIZE + \
- CONFIG_SPL_STACK_SIZE - 4)
+ KEYSTONE_SPL_STACK_SIZE - 4)
#define CONFIG_SPL_SPI_LOAD
#define CONFIG_SYS_SPI_U_BOOT_OFFS CONFIG_SPL_PAD_TO
diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h
index 22962392e..b453d8f 100644
--- a/include/configs/uniphier.h
+++ b/include/configs/uniphier.h
@@ -15,10 +15,6 @@
#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10
-#ifdef CONFIG_ARM64
-#define CONFIG_CMD_UNZIP
-#endif
-
/*-----------------------------------------------------------------------
* MMU and Cache Setting
*----------------------------------------------------------------------*/
diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h
index 3a4bfe8..35ac60a 100644
--- a/include/configs/vexpress_aemv8a.h
+++ b/include/configs/vexpress_aemv8a.h
@@ -126,7 +126,6 @@
#endif
/*#define CONFIG_MENU_SHOW*/
-#define CONFIG_CMD_UNZIP
#define CONFIG_CMD_ENV
/* BOOTP options */
diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index 4759373..73830b2 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -207,8 +207,6 @@
#define CONFIG_SYS_BOOTM_LEN (60 * 1024 * 1024)
-#define CONFIG_CMD_UNZIP
-
#define CONFIG_BOARD_EARLY_INIT_R
#define CONFIG_CLOCKS
diff --git a/scripts/.gitignore b/scripts/.gitignore
index 82bc06e..17b903b 100644
--- a/scripts/.gitignore
+++ b/scripts/.gitignore
@@ -1,4 +1,5 @@
#
# Generated files
#
+bin2c
docproc
diff --git a/scripts/Kconfig b/scripts/Kconfig
new file mode 100644
index 0000000..2a2c18e
--- /dev/null
+++ b/scripts/Kconfig
@@ -0,0 +1,2 @@
+config BUILD_BIN2C
+ bool
diff --git a/scripts/Makefile b/scripts/Makefile
index 2f081f7..3e10c16 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -7,6 +7,10 @@
# SPDX-License-Identifier: GPL-2.0
#
+hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c
+
+always := $(hostprogs-y)
+
# The following hostprogs-y programs are only build on demand
hostprogs-y += docproc
diff --git a/scripts/bin2c.c b/scripts/bin2c.c
new file mode 100644
index 0000000..c3d7eef
--- /dev/null
+++ b/scripts/bin2c.c
@@ -0,0 +1,36 @@
+/*
+ * Unloved program to convert a binary on stdin to a C include on stdout
+ *
+ * Jan 1999 Matt Mackall <mpm@selenic.com>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ */
+
+#include <stdio.h>
+
+int main(int argc, char *argv[])
+{
+ int ch, total = 0;
+
+ if (argc > 1)
+ printf("const char %s[] %s=\n",
+ argv[1], argc > 2 ? argv[2] : "");
+
+ do {
+ printf("\t\"");
+ while ((ch = getchar()) != EOF) {
+ total++;
+ printf("\\x%02x", ch);
+ if (total % 16 == 0)
+ break;
+ }
+ printf("\"\n");
+ } while (ch != EOF);
+
+ if (argc > 1)
+ printf("\t;\n\n#include <linux/types.h>\n\nconst size_t %s_size = %d;\n",
+ argv[1], total);
+
+ return 0;
+}
diff --git a/scripts/check-config.sh b/scripts/check-config.sh
index 6618dfb..97e52dc 100755
--- a/scripts/check-config.sh
+++ b/scripts/check-config.sh
@@ -37,12 +37,12 @@ cat `find ${srctree} -name "Kconfig*"` |sed -n \
-e 's/^menuconfig \([A-Za-z0-9_]*\).*$/CONFIG_\1/p' |sort |uniq > ${ok}
comm -23 ${suspects} ${ok} >${new_adhoc}
if [ -s ${new_adhoc} ]; then
- echo "Error: You must add new CONFIG options using Kconfig"
- echo "The following new ad-hoc CONFIG options were detected:"
- cat ${new_adhoc}
- echo
- echo "Please add these via Kconfig instead. Find a suitable Kconfig"
- echo "file and add a 'config' or 'menuconfig' option."
+ echo >&2 "Error: You must add new CONFIG options using Kconfig"
+ echo >&2 "The following new ad-hoc CONFIG options were detected:"
+ cat >&2 ${new_adhoc}
+ echo >&2
+ echo >&2 "Please add these via Kconfig instead. Find a suitable Kconfig"
+ echo >&2 "file and add a 'config' or 'menuconfig' option."
# Don't delete the temporary files in case they are useful
exit 1
else
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 84f5756..3afc870 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -7,9 +7,12 @@
use strict;
use POSIX;
+use File::Basename;
+use Cwd 'abs_path';
my $P = $0;
$P =~ s@.*/@@g;
+my $D = dirname(abs_path($P));
my $V = '0.32';
@@ -42,6 +45,9 @@ my $configuration_file = ".checkpatch.conf";
my $max_line_length = 80;
my $ignore_perl_version = 0;
my $minimum_perl_version = 5.10.0;
+my $spelling_file = "$D/spelling.txt";
+my $codespell = 0;
+my $codespellfile = "/usr/share/codespell/dictionary.txt";
sub help {
my ($exitcode) = @_;
@@ -82,6 +88,9 @@ Options:
file. It's your fault if there's no backup or git
--ignore-perl-version override checking of perl version. expect
runtime errors.
+ --codespell Use the codespell dictionary for spelling/typos
+ (default:/usr/local/share/codespell/dictionary.txt)
+ --codespellfile Use this codespell dictionary
-h, --help, --version display this help and exit
When FILE is - read standard input.
@@ -139,6 +148,8 @@ GetOptions(
'ignore-perl-version!' => \$ignore_perl_version,
'debug=s' => \%debug,
'test-only=s' => \$tst_only,
+ 'codespell!' => \$codespell,
+ 'codespellfile=s' => \$codespellfile,
'h|help' => \$help,
'version' => \$help
) or help(1);
@@ -387,6 +398,56 @@ our $allowed_asm_includes = qr{(?x:
)};
# memory.h: ARM has a custom one
+# Load common spelling mistakes and build regular expression list.
+my $misspellings;
+my %spelling_fix;
+
+if (open(my $spelling, '<', $spelling_file)) {
+ while (<$spelling>) {
+ my $line = $_;
+
+ $line =~ s/\s*\n?$//g;
+ $line =~ s/^\s*//g;
+
+ next if ($line =~ m/^\s*#/);
+ next if ($line =~ m/^\s*$/);
+
+ my ($suspect, $fix) = split(/\|\|/, $line);
+
+ $spelling_fix{$suspect} = $fix;
+ }
+ close($spelling);
+} else {
+ warn "No typos will be found - file '$spelling_file': $!\n";
+}
+
+if ($codespell) {
+ if (open(my $spelling, '<', $codespellfile)) {
+ while (<$spelling>) {
+ my $line = $_;
+
+ $line =~ s/\s*\n?$//g;
+ $line =~ s/^\s*//g;
+
+ next if ($line =~ m/^\s*#/);
+ next if ($line =~ m/^\s*$/);
+ next if ($line =~ m/, disabled/i);
+
+ $line =~ s/,.*$//;
+
+ my ($suspect, $fix) = split(/->/, $line);
+
+ $spelling_fix{$suspect} = $fix;
+ }
+ close($spelling);
+ } else {
+ warn "No codespell typos will be found - file '$codespellfile': $!\n";
+ }
+}
+
+$misspellings = join("|", sort keys %spelling_fix) if keys %spelling_fix;
+
+
sub build_types {
my $mods = "(?x: \n" . join("|\n ", @modifierList) . "\n)";
my $all = "(?x: \n" . join("|\n ", @typeList) . "\n)";
@@ -528,6 +589,8 @@ my @rawlines = ();
my @lines = ();
my @fixed = ();
my $vname;
+my $fixlinenr = -1;
+
for my $filename (@ARGV) {
my $FILE;
if ($file) {
@@ -1950,6 +2013,24 @@ sub process {
"8-bit UTF-8 used in possible commit log\n" . $herecurr);
}
+# Check for various typo / spelling mistakes
+ if (defined($misspellings) &&
+ ($in_commit_log || $line =~ /^(?:\+|Subject:)/i)) {
+ while ($rawline =~ /(?:^|[^a-z@])($misspellings)(?:\b|$|[^a-z@])/gi) {
+ my $typo = $1;
+ my $typo_fix = $spelling_fix{lc($typo)};
+ $typo_fix = ucfirst($typo_fix) if ($typo =~ /^[A-Z]/);
+ $typo_fix = uc($typo_fix) if ($typo =~ /^[A-Z]+$/);
+ my $msg_type = \&WARN;
+ $msg_type = \&CHK if ($file);
+ if (&{$msg_type}("TYPO_SPELLING",
+ "'$typo' may be misspelled - perhaps '$typo_fix'?\n" . $herecurr) &&
+ $fix) {
+ $fixed[$fixlinenr] =~ s/(^|[^A-Za-z@])($typo)($|[^A-Za-z@])/$1$typo_fix$3/;
+ }
+ }
+ }
+
# ignore non-hunk lines and lines being removed
next if (!$hunk_line || $line =~ /^-/);
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index d21589b..826d031 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -102,7 +102,6 @@ CONFIG_APBH_DMA_BURST8
CONFIG_APER_0_BASE
CONFIG_APER_1_BASE
CONFIG_APER_SIZE
-CONFIG_API
CONFIG_APUS_FAST_EXCEPT
CONFIG_AP_SH4A_4A
CONFIG_ARCH_ADPAG101P
diff --git a/tools/Makefile b/tools/Makefile
index f5ac631..cbccd4a 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -32,7 +32,6 @@ CONFIG_BUILD_ENVCRC ?= $(ENVCRC-y)
hostprogs-$(CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER) += atmel_pmecc_params
-hostprogs-$(CONFIG_CMD_LICENSE) += bin2header
hostprogs-$(CONFIG_LCD_LOGO) += bmp_logo
hostprogs-$(CONFIG_VIDEO_LOGO) += bmp_logo
HOSTCFLAGS_bmp_logo.o := -pedantic
@@ -233,10 +232,6 @@ endif
endif # !LOGO_BMP
-# Generated gziped GPL-2.0 license text
-LICENSE_H = $(objtree)/include/license.h
-LICENSE-$(CONFIG_CMD_LICENSE) += $(LICENSE_H)
-
#
# Use native tools and options
# Define __KERNEL_STRICT_NAMES to prevent typedef overlaps
@@ -251,7 +246,7 @@ HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \
-D__KERNEL_STRICT_NAMES \
-D_GNU_SOURCE
-__build: $(LOGO-y) $(LICENSE-y)
+__build: $(LOGO-y)
$(LOGO_H): $(obj)/bmp_logo $(LOGO_BMP)
$(obj)/bmp_logo --gen-info $(LOGO_BMP) > $@
@@ -259,10 +254,6 @@ $(LOGO_H): $(obj)/bmp_logo $(LOGO_BMP)
$(LOGO_DATA_H): $(obj)/bmp_logo $(LOGO_BMP)
$(obj)/bmp_logo --gen-data $(LOGO_BMP) > $@
-$(LICENSE_H): $(obj)/bin2header $(srctree)/Licenses/gpl-2.0.txt
- cat $(srctree)/Licenses/gpl-2.0.txt | gzip -9 -c | \
- $(obj)/bin2header license_gzip > $(LICENSE_H)
-
# Let clean descend into subdirs
subdir- += env
diff --git a/tools/bin2header.c b/tools/bin2header.c
deleted file mode 100644
index 6c2c23f..0000000
--- a/tools/bin2header.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* bin2header.c - program to convert binary file into a C structure
- * definition to be included in a header file.
- *
- * (C) Copyright 2008 by Harald Welte <laforge@openmoko.org>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-
-int main(int argc, char **argv)
-{
- if (argc < 2) {
- fprintf(stderr, "%s needs one argument: the structure name\n",
- argv[0]);
- exit(1);
- }
-
- printf("/* bin2header output - automatically generated */\n");
- printf("unsigned char %s[] = {\n", argv[1]);
-
- while (1) {
- int i, nread;
- unsigned char buf[10];
- nread = read(0, buf, sizeof(buf));
- if (nread <= 0)
- break;
-
- printf("\t");
- for (i = 0; i < nread - 1; i++)
- printf("0x%02x, ", buf[i]);
-
- printf("0x%02x,\n", buf[nread-1]);
- }
-
- printf("};\n");
-
- exit(0);
-}