From d3c3e40355b21832bb92e24f3d16960406529120 Mon Sep 17 00:00:00 2001 From: Alexander Kurz Date: Wed, 17 Aug 2016 15:12:19 +0200 Subject: [PATCH 01/10] mfd mc13xxx: add MC13892_REVISION_2_4 An MC13892CJ having REV[4:0]=0x14 can be found in the kindle-d01100. Add the revision to the list to support this device. Signed-off-by: Alexander Kurz Signed-off-by: Sascha Hauer --- drivers/mfd/mc13xxx.c | 1 + include/mfd/mc13xxx.h | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/mfd/mc13xxx.c b/drivers/mfd/mc13xxx.c index b2fcd9551..f6aa92242 100644 --- a/drivers/mfd/mc13xxx.c +++ b/drivers/mfd/mc13xxx.c @@ -219,6 +219,7 @@ static struct __init { { 0x0a, MC13892_REVISION_1_2, "1.2" }, { 0x10, MC13892_REVISION_2_0, "2.0" }, { 0x11, MC13892_REVISION_2_1, "2.1" }, + { 0x14, MC13892_REVISION_2_4, "2.4" }, { 0x18, MC13892_REVISION_3_0, "3.0" }, { 0x19, MC13892_REVISION_3_1, "3.1" }, { 0x1a, MC13892_REVISION_3_2, "3.2" }, diff --git a/include/mfd/mc13xxx.h b/include/mfd/mc13xxx.h index 96a32e4da..d351c473f 100644 --- a/include/mfd/mc13xxx.h +++ b/include/mfd/mc13xxx.h @@ -127,12 +127,13 @@ #define MC13892_REVISION_2_0 3 #define MC13892_REVISION_2_0a 4 #define MC13892_REVISION_2_1 5 -#define MC13892_REVISION_3_0 6 -#define MC13892_REVISION_3_1 7 -#define MC13892_REVISION_3_2 8 -#define MC13892_REVISION_3_2a 9 -#define MC13892_REVISION_3_3 10 -#define MC13892_REVISION_3_5 11 +#define MC13892_REVISION_2_4 6 +#define MC13892_REVISION_3_0 7 +#define MC13892_REVISION_3_1 8 +#define MC13892_REVISION_3_2 9 +#define MC13892_REVISION_3_2a 10 +#define MC13892_REVISION_3_3 11 +#define MC13892_REVISION_3_5 12 #define MC13783_SWX_VOLTAGE(x) ((x) & 0x3f) #define MC13783_SWX_VOLTAGE_DVS(x) (((x) & 0x3f) << 6) From d97eeac4e21f1a4035c699c9214b0d3fb5a9be72 Mon Sep 17 00:00:00 2001 From: Antony Pavlov Date: Thu, 18 Aug 2016 14:20:39 +0300 Subject: [PATCH 02/10] net: phy: of_phy_register_fixed_link(): drop redundant initialization The phy_device_create() function makes all necessary phydev initialization so we can drop phydev->pause and phydev->link initialization in the of_phy_register_fixed_link() function. Signed-off-by: Antony Pavlov Signed-off-by: Sascha Hauer --- drivers/net/phy/phy.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 13b832470..7132516aa 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -311,8 +311,6 @@ static struct phy_device *of_phy_register_fixed_link(struct device_node *np, phydev->registered = 1; phydev->speed = 1000; phydev->duplex = 1; - phydev->pause = phydev->asym_pause = 0; - phydev->link = 1; return phydev; } From eb2b2e26472abde7b5f1850a7bd9c2cc2c17d27d Mon Sep 17 00:00:00 2001 From: Aleksey Kuleshov Date: Thu, 18 Aug 2016 14:29:03 +0300 Subject: [PATCH 03/10] clarify strim function description Signed-off-by: Aleksey Kuleshov Signed-off-by: Sascha Hauer --- lib/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/string.c b/lib/string.c index a3e9fd819..1d491c9c2 100644 --- a/lib/string.c +++ b/lib/string.c @@ -641,7 +641,7 @@ char *skip_spaces(const char *str) } /** - * strim - Removes leading and trailing whitespace from @s. + * strim - Removes trailing whitespace from @s. * @s: The string to be stripped. * * Note that the first trailing whitespace is replaced with a %NUL-terminator From e37faaf18521e93a9aa859e6dc7d03ebfc9469c8 Mon Sep 17 00:00:00 2001 From: Christian Hemp Date: Thu, 18 Aug 2016 14:21:16 +0200 Subject: [PATCH 04/10] commands/Kconfig: fix typo in CMD_OF_FIXUP_STATUS help The command is of_fixup_status and not of_fixup_node. Signed-off-by: Christian Hemp Signed-off-by: Sascha Hauer --- commands/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/Kconfig b/commands/Kconfig index decd45d76..3c79831d9 100644 --- a/commands/Kconfig +++ b/commands/Kconfig @@ -2058,7 +2058,7 @@ config CMD_OF_FIXUP_STATUS help Register a fixup to enable or disable node - Usage: of_fixup_node [-d] path + Usage: of_fixup_status [-d] path Options: -d disable node From 6b40ff8c7e96c1284e8261cebcb21403f2e8e5ac Mon Sep 17 00:00:00 2001 From: Alexander Kurz Date: Fri, 19 Aug 2016 22:09:40 +0200 Subject: [PATCH 05/10] Kconfig: defaultenv-2 select CMD_TEST CMD_TEST is required for scripts in defaultenv-2, e.g. automount. Signed-off-by: Alexander Kurz Signed-off-by: Sascha Hauer --- common/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/common/Kconfig b/common/Kconfig index 38225ebe6..397bcbed1 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -844,6 +844,7 @@ config DEFAULT_ENVIRONMENT_GENERIC_NEW select CMD_BASENAME select CMD_READLINK select CMD_DIRNAME + select CMD_TEST select NVVAR select CMD_NV select FLEXIBLE_BOOTARGS From 1dff49274b823379c5a06e8fcd337c73c0e4e24b Mon Sep 17 00:00:00 2001 From: grodriguez Date: Mon, 22 Aug 2016 15:45:34 +0200 Subject: [PATCH 06/10] Call boot_board from boot, not from init. This ensures that any board-specific code that must be run at boot time will be run both when autobooting and when manually running the 'boot' command from the console. Signed-off-by: Guillermo Rodriguez Signed-off-by: Sascha Hauer --- defaultenv/defaultenv-1/bin/boot | 4 ++++ defaultenv/defaultenv-1/bin/init | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/defaultenv/defaultenv-1/bin/boot b/defaultenv/defaultenv-1/bin/boot index c17ccdb8f..a5d6596d2 100644 --- a/defaultenv/defaultenv-1/bin/boot +++ b/defaultenv/defaultenv-1/bin/boot @@ -2,6 +2,10 @@ . /env/config +if [ -f /env/bin/boot_board ]; then + . /env/bin/boot_board +fi + if [ x$kernel_loc = xnet ]; then kernel_loc=tftp fi diff --git a/defaultenv/defaultenv-1/bin/init b/defaultenv/defaultenv-1/bin/init index a55d293f0..2dcddbef2 100644 --- a/defaultenv/defaultenv-1/bin/init +++ b/defaultenv/defaultenv-1/bin/init @@ -23,9 +23,8 @@ if [ -f /env/bin/init_board ]; then fi echo -e "\e[?25h" -if [ -f /env/bin/boot_board ]; then - . /env/bin/boot_board -elif [ -n $autoboot_timeout ]; then + +if [ -n $autoboot_timeout ]; then echo -n "Hit any key to stop autoboot: " timeout -a $autoboot_timeout if [ $? != 0 ]; then From b65b13745381101cd9e5d34e3663c919502f10e2 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Tue, 23 Aug 2016 18:47:02 -0700 Subject: [PATCH 07/10] arm: Add both .lds files to CLEAN_FILES unconditionally 'clean' target is listed on 'no-dot-config-targets' list in main Makefile so that conditional statement would yeild the same result every time. Given how CLEAN_FILES are rm'ed with -f there should be no harm in specifying them both unconditionally. Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- arch/arm/Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 55f72484c..96ec588da 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -314,9 +314,5 @@ endif common- += $(patsubst %,arch/arm/boards/%/,$(board-)) CLEAN_FILES += include/generated/mach-types.h barebox-flash-image - -ifeq ($(CONFIG_CPU_V8), y) CLEAN_FILES += arch/arm/lib64/barebox.lds -else CLEAN_FILES += arch/arm/lib32/barebox.lds -endif From 958b3a52019ac8e8b54e88bfe4bb23d935b6a7ea Mon Sep 17 00:00:00 2001 From: Enrico Jorns Date: Thu, 1 Sep 2016 09:33:44 +0200 Subject: [PATCH 08/10] commands: saveenv: exit on invalid option Saveenv should not perform any actions if an invalid parameter was given. Signed-off-by: Enrico Jorns Signed-off-by: Sascha Hauer --- commands/saveenv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commands/saveenv.c b/commands/saveenv.c index 6f210b7ec..bc1202f9a 100644 --- a/commands/saveenv.c +++ b/commands/saveenv.c @@ -35,6 +35,8 @@ static int do_saveenv(int argc, char *argv[]) case 'z': envfs_flags |= ENVFS_FLAGS_FORCE_BUILT_IN; break; + default: + return COMMAND_ERROR_USAGE; } } From a1109d78ddcb3a070acfdb1c9567a8d3a7cbca6a Mon Sep 17 00:00:00 2001 From: Sam Van Den Berge Date: Thu, 1 Sep 2016 22:00:03 +0200 Subject: [PATCH 09/10] Fix small typo in common/Kconfig Fix small typo frendly -> friendly Signed-off-by: Sam Van Den Berge Signed-off-by: Sascha Hauer --- common/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/Kconfig b/common/Kconfig index 397bcbed1..aa721b52d 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -471,7 +471,7 @@ config MENU select PROCESS_ESCAPE_SEQUENCE help a menu framework that allow us to create list menu to simplify - barebox and make it more user-frendly + barebox and make it more user-friendly config PASSWORD bool From faf2ec64e7442fda2e2330c0df047bcd902c5927 Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Fri, 2 Sep 2016 10:50:37 +0200 Subject: [PATCH 10/10] mci: mmci: Fix read FIFO handling According to the Linux kernel and the qemu code, the MMCIFIFOCNT contains the remaining number of words to read, excluding those that are already in the FIFO. So the current number of bytes in the FIFO is host_remain - (readl(base + MMCIFIFOCNT) << 2). Also writing to MMCIDATACTRL will reset the read counter. As a result, MCI_DATABLOCKEND is never set and read_bytes() waits forever. With this change, SD-Card support on qemu vexpress works correctly. Signed-off-by: Michael Olbrich Signed-off-by: Sascha Hauer --- drivers/mci/mmci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mci/mmci.c b/drivers/mci/mmci.c index 9d1e85891..7489ee03a 100644 --- a/drivers/mci/mmci.c +++ b/drivers/mci/mmci.c @@ -212,7 +212,7 @@ static u64 mmci_pio_read(struct mmci_host *host, char *buffer, unsigned int host struct variant_data *variant = host->variant; do { - int count = readl(base + MMCIFIFOCNT) << 2; + int count = host_remain - (readl(base + MMCIFIFOCNT) << 2); if (count > host_remain) count = host_remain; @@ -264,7 +264,6 @@ static int read_bytes(struct mci_host *mci, char *dest, unsigned int blkcount, u dev_dbg(host->hw_dev, "read_bytes: blkcount=%u blksize=%u\n", blkcount, blksize); do { - mmci_writel(host, MMCIDATACTRL, mmci_readl(host, MMCIDATACTRL)); len = mmci_pio_read(host, dest, xfercount); xfercount -= len; dest += len;