summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/boards/imx/amazon-kindle-4-5.rst6
-rw-r--r--Documentation/devicetree/bindings/barebox/barebox,state.rst2
-rw-r--r--Documentation/user/state.rst1
-rw-r--r--arch/arm/boards/nxp-imx8mq-evk/ddr_init.c4
-rw-r--r--arch/arm/boards/qemu-virt64/Kconfig8
-rw-r--r--arch/arm/boards/wago-pfc-am35xx/board.c45
-rw-r--r--arch/arm/include/asm/types.h2
-rw-r--r--arch/arm/mach-at91/include/mach/sama5d3_matrix.h15
-rw-r--r--arch/arm/mach-imx/include/mach/clock-imx1.h5
-rw-r--r--arch/arm/mach-imx/include/mach/iomux-mx8.h2
-rw-r--r--arch/arm/mach-mvebu/armada-370-xp.c6
-rw-r--r--arch/arm/mach-mvebu/include/mach/dove.h23
-rw-r--r--arch/arm/mach-mvebu/include/mach/kirkwood.h22
-rw-r--r--arch/arm/mach-netx/include/mach/netx-devices.h73
-rw-r--r--arch/arm/mach-omap/Kconfig1
-rw-r--r--arch/arm/mach-omap/include/mach/am33xx-devices.h80
-rw-r--r--arch/blackfin/include/asm/types.h2
-rw-r--r--arch/mips/include/asm/types.h35
-rw-r--r--arch/nios2/include/asm/types.h2
-rw-r--r--arch/openrisc/include/asm/types.h2
-rw-r--r--arch/ppc/include/asm/e300.h130
-rw-r--r--arch/ppc/include/asm/mc146818rtc.h27
-rw-r--r--arch/ppc/include/asm/types.h2
-rw-r--r--arch/riscv/include/asm/types.h2
-rw-r--r--arch/sandbox/include/asm/types.h2
-rw-r--r--arch/x86/include/asm/types.h2
-rw-r--r--commands/i2c.c26
-rw-r--r--commands/ls.c12
-rw-r--r--common/block.c47
-rw-r--r--common/boot.c20
-rw-r--r--common/image-fit.c2
-rw-r--r--common/memory.c75
-rw-r--r--common/state/backend_bucket_circular.c40
-rw-r--r--common/state/backend_bucket_direct.c3
-rw-r--r--common/state/backend_format_raw.c4
-rw-r--r--common/state/backend_storage.c22
-rw-r--r--common/state/state.c12
-rw-r--r--common/state/state.h2
-rw-r--r--common/ubiformat.c40
-rw-r--r--defaultenv/defaultenv-2-base/boot/net9
-rw-r--r--drivers/clk/imx/clk-imx7.c2
-rw-r--r--drivers/efi/efi-device.c2
-rw-r--r--drivers/mtd/peb.c27
-rw-r--r--drivers/mtd/ubi/fastmap.c3
-rw-r--r--drivers/net/designware.c42
-rw-r--r--drivers/net/phy/micrel.c32
-rw-r--r--drivers/nvmem/eeprom_93xx46.c5
-rw-r--r--drivers/of/of_net.c12
-rw-r--r--drivers/pci/pcie-designware-host.c2
-rw-r--r--fs/cramfs/cramfs.c2
-rw-r--r--include/linux/phy.h3
-rw-r--r--include/linux/types.h1
-rw-r--r--include/mtd/mtd-peb.h1
-rw-r--r--lib/image-sparse.c2
-rw-r--r--lib/readline.c1
-rw-r--r--lib/strtox.c102
-rw-r--r--lib/unlink-recursive.c27
-rwxr-xr-xscripts/gen-dtb-s4
-rw-r--r--scripts/kconfig/gconf.c2
-rw-r--r--scripts/kconfig/zconf.hash.c289
-rw-r--r--scripts/socfpga_mkimage.c2
61 files changed, 425 insertions, 953 deletions
diff --git a/Documentation/boards/imx/amazon-kindle-4-5.rst b/Documentation/boards/imx/amazon-kindle-4-5.rst
index 58f38a058e..26f072e28d 100644
--- a/Documentation/boards/imx/amazon-kindle-4-5.rst
+++ b/Documentation/boards/imx/amazon-kindle-4-5.rst
@@ -36,13 +36,15 @@ USB bootloader mode by the SoC microcode:
1. Connect the Kindle to your host computer with a USB cable.
2. Power down the device by holding the power button until the power LED goes
dark (about 10 seconds).
-4. Hold the power button, and hold down a device-specific special key:
+3. Hold the power button, and hold down a device-specific special key:
+
* the fiveway down button on the model D01100
* the home button on model D01200
+
4. Then release the power button, but still hold the special key.
5. A new USB device named ``NS Blank CODEX`` should appear on your host computer.
You can now release the special button.
-7. Finally, upload barebox to the Kindle by using:
+6. Finally, upload barebox to the Kindle by using:
.. code-block:: console
diff --git a/Documentation/devicetree/bindings/barebox/barebox,state.rst b/Documentation/devicetree/bindings/barebox/barebox,state.rst
index 2893937820..390e148a28 100644
--- a/Documentation/devicetree/bindings/barebox/barebox,state.rst
+++ b/Documentation/devicetree/bindings/barebox/barebox,state.rst
@@ -52,7 +52,7 @@ Optional Properties
``circular`` or ``noncircular``. If the backend memory needs to be erased
prior a write it defaults to the ``circular`` storage backend type, for backend
memories like RAMs or EEPROMs it defaults to the ``direct`` storage backend type.
-* ``algo``: A HMAC algorithm used to detect manipulation of the data
+* ``algo``: An HMAC algorithm used to detect manipulation of the data
or header, sensible values follow this pattern ``hmac(<HASH>)``,
e.g. ``hmac(sha256)``. Only available for the ``backend-type`` ``raw``.
* ``keep-previous-content``: Check if a the bucket meta magic field contains
diff --git a/Documentation/user/state.rst b/Documentation/user/state.rst
index 89129add77..07743df0cb 100644
--- a/Documentation/user/state.rst
+++ b/Documentation/user/state.rst
@@ -647,7 +647,6 @@ within the EEPROM.
};
};
};
-};
With this 'backend' definition it's possible to define the *state* variable set
content, its backend-type and *state* variable layout.
diff --git a/arch/arm/boards/nxp-imx8mq-evk/ddr_init.c b/arch/arm/boards/nxp-imx8mq-evk/ddr_init.c
index 44103b5e26..39addea973 100644
--- a/arch/arm/boards/nxp-imx8mq-evk/ddr_init.c
+++ b/arch/arm/boards/nxp-imx8mq-evk/ddr_init.c
@@ -12,7 +12,7 @@ void ddr_cfg_phy(void);
void ddr_init(void)
{
volatile unsigned int tmp, tmp_t;
-
+
/** Initialize DDR clock and DDRC registers **/
reg32_write(0x3038a088,0x7070000);
reg32_write(0x3038a084,0x4030000);
@@ -177,7 +177,7 @@ void ddr_init(void)
reg32_write(DDRC_SWCTL(0), 0x0000);
/*
* ------------------- 9 -------------------
- * Set DFIMISC.dfi_init_start to 1
+ * Set DFIMISC.dfi_init_start to 1
* -----------------------------------------
*/
reg32_write(DDRC_DFIMISC(0), 0x00000030);
diff --git a/arch/arm/boards/qemu-virt64/Kconfig b/arch/arm/boards/qemu-virt64/Kconfig
deleted file mode 100644
index b7bee3a245..0000000000
--- a/arch/arm/boards/qemu-virt64/Kconfig
+++ /dev/null
@@ -1,8 +0,0 @@
-
-if MACH_QEMU
-
-config ARCH_TEXT_BASE
- hex
- default 0x40000000
-
-endif
diff --git a/arch/arm/boards/wago-pfc-am35xx/board.c b/arch/arm/boards/wago-pfc-am35xx/board.c
index 2bad40912d..c0a039ba50 100644
--- a/arch/arm/boards/wago-pfc-am35xx/board.c
+++ b/arch/arm/boards/wago-pfc-am35xx/board.c
@@ -3,6 +3,7 @@
* Copyright (C) 2014 WAGO Kontakttechnik GmbH & Co. KG <http://global.wago.com>
* Author: Heinrich Toews <heinrich.toews@wago.com>
*/
+#define pr_fmt(fmt) "pfc200: " fmt
#include <common.h>
#include <init.h>
@@ -10,6 +11,8 @@
#include <gpio.h>
#include <linux/sizes.h>
#include <linux/err.h>
+#include <linux/phy.h>
+#include <linux/micrel_phy.h>
#include <asm/memory.h>
#include <mach/generic.h>
@@ -23,6 +26,48 @@ static int pfc200_mem_init(void)
}
mem_initcall(pfc200_mem_init);
+#define BMCR_HP_MDIX 0x20
+
+static int pfc200_phy_fixup(struct mii_bus *mii, int phyadr)
+{
+ struct phy_device *phydev;
+ int ret;
+
+ phydev = mdiobus_scan(mii, phyadr);
+
+ if (IS_ERR(phydev)) {
+ pr_err("Cannot find phydev %d on mii bus\n", phyadr);
+ return PTR_ERR(phydev);
+ }
+
+ ret = phy_write(phydev, MII_BMCR, BMCR_ANENABLE | BMCR_HP_MDIX);
+ if (ret)
+ pr_err("Failed to write to phy: %s\n", strerror(-ret));
+
+ return ret;
+}
+
+static int pfc200_late_init(void)
+{
+ struct mii_bus *mii;
+
+ if (!of_machine_is_compatible("ti,pfc200"))
+ return 0;
+
+ mii = mdiobus_get_bus(0);
+ if (!mii) {
+ pr_err("Cannot find mii bus 0\n");
+ return -ENODEV;
+ }
+
+ pfc200_phy_fixup(mii, 1);
+ pfc200_phy_fixup(mii, 2);
+
+ return 0;
+}
+late_initcall(pfc200_late_init);
+
+
#define GPIO_KSZ886x_RESET 136
static int pfc200_devices_init(void)
diff --git a/arch/arm/include/asm/types.h b/arch/arm/include/asm/types.h
index 1a7f47add0..9c21066882 100644
--- a/arch/arm/include/asm/types.h
+++ b/arch/arm/include/asm/types.h
@@ -3,8 +3,6 @@
#ifndef __ASSEMBLY__
-typedef unsigned short umode_t;
-
/*
* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
* header files exported to user space
diff --git a/arch/arm/mach-at91/include/mach/sama5d3_matrix.h b/arch/arm/mach-at91/include/mach/sama5d3_matrix.h
deleted file mode 100644
index 8176b38bd3..0000000000
--- a/arch/arm/mach-at91/include/mach/sama5d3_matrix.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Matrix-centric header file for the SAMA5D3 family
- *
- * Copyright (C) 2009-2012 Atmel Corporation.
- *
- * Only EBI related registers.
- * Write Protect register definitions may be useful.
- *
- * Licensed under GPLv2 or later.
- */
-
-#ifndef SAMA5D3_MATRIX_H
-#define SAMA5D3_MATRIX_H
-
-#endif
diff --git a/arch/arm/mach-imx/include/mach/clock-imx1.h b/arch/arm/mach-imx/include/mach/clock-imx1.h
deleted file mode 100644
index 8d456b84b2..0000000000
--- a/arch/arm/mach-imx/include/mach/clock-imx1.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#ifndef ASM_ARCH_CLOCK_IMX1_H
-#define ASM_ARCH_CLOCK_IMX1_H
-
-#endif /* ASM_ARCH_CLOCK_IMX1_H */
-
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx8.h b/arch/arm/mach-imx/include/mach/iomux-mx8.h
index 1caa2235b1..9660697d96 100644
--- a/arch/arm/mach-imx/include/mach/iomux-mx8.h
+++ b/arch/arm/mach-imx/include/mach/iomux-mx8.h
@@ -163,7 +163,7 @@ enum {
IMX8MQ_PAD_SD1_DATA5__USDHC1_DATA5 = IOMUX_PAD(0x0324, 0x00BC, 0, 0x0000, 0, 0),
IMX8MQ_PAD_SD1_DATA5__GPIO2_IO7 = IOMUX_PAD(0x0324, 0x00BC, 5, 0x0000, 0, 0),
- IMX8MQ_PAD_SD1_DATA6__USDHC1_DATA6 = IOMUX_PAD(0x0328, 0x00C0, 0, 0x0000, 0, 0),
+ IMX8MQ_PAD_SD1_DATA6__USDHC1_DATA6 = IOMUX_PAD(0x0328, 0x00C0, 0, 0x0000, 0, 0),
IMX8MQ_PAD_SD1_DATA6__GPIO2_IO8 = IOMUX_PAD(0x0328, 0x00C0, 5, 0x0000, 0, 0),
IMX8MQ_PAD_SD1_DATA7__USDHC1_DATA7 = IOMUX_PAD(0x032C, 0x00C4, 0, 0x0000, 0, 0),
diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c
index 0612830025..2589f4fe72 100644
--- a/arch/arm/mach-mvebu/armada-370-xp.c
+++ b/arch/arm/mach-mvebu/armada-370-xp.c
@@ -105,12 +105,12 @@ static void setup_usb_phys(void)
/* Power up PLL and PHY channel */
setbits_le32(MV_USB_PHY_PLL_REG(2), BIT(9));
-
+
/* Assert VCOCAL_START */
setbits_le32(MV_USB_PHY_PLL_REG(1), BIT(21));
-
+
mdelay(1);
-
+
/*
* USB PHY init (change from defaults) specific for 40nm (78X30 78X60)
*/
diff --git a/arch/arm/mach-mvebu/include/mach/dove.h b/arch/arm/mach-mvebu/include/mach/dove.h
deleted file mode 100644
index 1712fa7a1d..0000000000
--- a/arch/arm/mach-mvebu/include/mach/dove.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright
- * (C) 2013 Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __MACH_MVEBU_DOVE_H
-#define __MACH_MVEBU_DOVE_H
-
-int dove_add_uart(int num);
-void __naked __noreturn dove_barebox_entry(void);
-
-#endif /* __MACH_MVEBU_DOVE_H */
diff --git a/arch/arm/mach-mvebu/include/mach/kirkwood.h b/arch/arm/mach-mvebu/include/mach/kirkwood.h
deleted file mode 100644
index 7fe002d44d..0000000000
--- a/arch/arm/mach-mvebu/include/mach/kirkwood.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (C) 2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __MACH_KIRKWOOD_H
-#define __MACH_KIRKWOOD_H
-
-int kirkwood_add_uart0(void);
-void __naked __noreturn kirkwood_barebox_entry(void);
-
-#endif /* __MACH_KIRKWOOD_H */
diff --git a/arch/arm/mach-netx/include/mach/netx-devices.h b/arch/arm/mach-netx/include/mach/netx-devices.h
deleted file mode 100644
index 9c64adb5da..0000000000
--- a/arch/arm/mach-netx/include/mach/netx-devices.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * (c) 2012 Pengutronix, Juergen Beisert <kernel@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#ifndef _NETX_DEVICES_H
-# define _NETX_DEVICES_H
-
-#include <mach/netx-regs.h>
-
-static inline struct device_d *netx_add_uart(resource_size_t base, int index)
-{
- return add_generic_device("netx_serial", index, NULL,
- base, 0x40, IORESOURCE_MEM, NULL);
-}
-
-static inline struct device_d *netx_add_uart0(void)
-{
- return netx_add_uart(NETX_PA_UART0, 0);
-}
-
-static inline struct device_d *netx_add_uart1(void)
-{
- return netx_add_uart(NETX_PA_UART1, 1);
-}
-
-static inline struct device_d *netx_add_uart3(void)
-{
- return netx_add_uart(NETX_PA_UART2, 2);
-}
-
-/* parallel flash connected to the SRAM interface */
-static inline struct device_d *netx_add_pflash(resource_size_t size)
-{
- return add_cfi_flash_device(0, NETX_CS0_BASE, size, 0);
-}
-
-static inline struct device_d *netx_add_eth(int index, void *pdata)
-{
- return add_generic_device("netx-eth", index, NULL,
- 0, 0, IORESOURCE_MEM, pdata);
-}
-
-static inline struct device_d *netx_add_eth0(void *pdata)
-{
- return netx_add_eth(0, pdata);
-}
-
-static inline struct device_d *netx_add_eth1(void *pdata)
-{
- return netx_add_eth(1, pdata);
-}
-
-static inline struct device_d *netx_add_eth2(void *pdata)
-{
- return netx_add_eth(2, pdata);
-}
-
-static inline struct device_d *netx_add_eth3(void *pdata)
-{
- return netx_add_eth(3, pdata);
-}
-
-#endif /* _NETX_DEVICES_H */
diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig
index e793175f38..49ca0ee157 100644
--- a/arch/arm/mach-omap/Kconfig
+++ b/arch/arm/mach-omap/Kconfig
@@ -186,7 +186,6 @@ config MACH_VSCOM_BALTOS
config MACH_WAGO_PFC_AM35XX
bool "Wago PFC200 Fieldbus Controller"
select ARCH_AM35XX
- select HAVE_DEFAULT_ENVIRONMENT_NEW
select HAVE_PBL_MULTI_IMAGES
select HAVE_CONFIGURABLE_MEMORY_LAYOUT
help
diff --git a/arch/arm/mach-omap/include/mach/am33xx-devices.h b/arch/arm/mach-omap/include/mach/am33xx-devices.h
deleted file mode 100644
index 4790071c98..0000000000
--- a/arch/arm/mach-omap/include/mach/am33xx-devices.h
+++ /dev/null
@@ -1,80 +0,0 @@
-#ifndef __MACH_OMAP3_DEVICES_H
-#define __MACH_OMAP3_DEVICES_H
-
-#include <driver.h>
-#include <linux/sizes.h>
-#include <mach/am33xx-silicon.h>
-#include <mach/devices.h>
-#include <mach/omap_hsmmc.h>
-#include <mach/cpsw.h>
-
-/* the device numbering is the same as in the TRM memory map (SPRUH73G) */
-
-static inline struct device_d *am33xx_add_uart0(void)
-{
- return omap_add_uart(0, AM33XX_UART0_BASE);
-}
-
-static inline struct device_d *am33xx_add_uart1(void)
-{
- return omap_add_uart(1, AM33XX_UART1_BASE);
-}
-
-static inline struct device_d *am33xx_add_uart2(void)
-{
- return omap_add_uart(2, AM33XX_UART2_BASE);
-}
-
-static inline struct device_d *am33xx_add_mmc0(struct omap_hsmmc_platform_data *pdata)
-{
- return add_generic_device("omap4-hsmmc", 0, NULL,
- AM33XX_MMCHS0_BASE, SZ_4K, IORESOURCE_MEM, pdata);
-}
-
-static inline struct device_d *am33xx_add_mmc1(struct omap_hsmmc_platform_data *pdata)
-{
- return add_generic_device("omap4-hsmmc", 1, NULL,
- AM33XX_MMC1_BASE, SZ_4K, IORESOURCE_MEM, pdata);
-}
-
-static inline struct device_d *am33xx_add_cpsw(struct cpsw_platform_data *cpsw_data)
-{
- return add_generic_device("cpsw", 0, NULL,
- AM335X_CPSW_BASE, SZ_32K, IORESOURCE_MEM, cpsw_data);
-}
-
-static inline struct device_d *am33xx_add_spi(int id, resource_size_t start)
-{
- return add_generic_device("omap4-spi", id, NULL, start, SZ_4K,
- IORESOURCE_MEM, NULL);
-}
-
-static inline struct device_d *am33xx_add_spi0(void)
-{
- return am33xx_add_spi(0, AM33XX_MCSPI0_BASE);
-}
-
-static inline struct device_d *am33xx_add_spi1(void)
-{
- return am33xx_add_spi(1, AM33XX_MCSPI1_BASE);
-}
-
-static inline struct device_d *am33xx_add_i2c0(void *pdata)
-{
- return add_generic_device("i2c-am33xx", 0, NULL, AM33XX_I2C0_BASE,
- SZ_4K, IORESOURCE_MEM, pdata);
-}
-
-static inline struct device_d *am33xx_add_i2c1(void *pdata)
-{
- return add_generic_device("i2c-am33xx", 1, NULL, AM33XX_I2C1_BASE,
- SZ_4K, IORESOURCE_MEM, pdata);
-}
-
-static inline struct device_d *am33xx_add_i2c2(void *pdata)
-{
- return add_generic_device("i2c-am33xx", 2, NULL, AM33XX_I2C2_BASE,
- SZ_4K, IORESOURCE_MEM, pdata);
-}
-
-#endif /* __MACH_OMAP3_DEVICES_H */
diff --git a/arch/blackfin/include/asm/types.h b/arch/blackfin/include/asm/types.h
index e9d73377eb..086da34d7f 100644
--- a/arch/blackfin/include/asm/types.h
+++ b/arch/blackfin/include/asm/types.h
@@ -30,8 +30,6 @@
*/
#ifndef __ASSEMBLY__
-typedef unsigned short umode_t;
-
/*
* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
* header files exported to user space
diff --git a/arch/mips/include/asm/types.h b/arch/mips/include/asm/types.h
index cd76f53b50..c635c1aac1 100644
--- a/arch/mips/include/asm/types.h
+++ b/arch/mips/include/asm/types.h
@@ -10,39 +10,4 @@
#include <asm-generic/int-ll64.h>
-/*
- * We don't use int-l64.h for the kernel anymore but still use it for
- * userspace to avoid code changes.
- */
-#if (_MIPS_SZLONG == 64) && !defined(__KERNEL__)
-# include <asm-generic/int-l64.h>
-#else
-# include <asm-generic/int-ll64.h>
-#endif
-
-#ifndef __ASSEMBLY__
-
-typedef unsigned short umode_t;
-
-#endif /* __ASSEMBLY__ */
-
-/*
- * These aren't exported outside the kernel to avoid name space clashes
- */
-#ifdef __KERNEL__
-#ifndef __ASSEMBLY__
-
-/*
- * Don't use phys_t. You've been warned.
- */
-#ifdef CONFIG_64BIT_PHYS_ADDR
-typedef unsigned long long phys_t;
-#else
-typedef unsigned long phys_t;
-#endif
-
-#endif /* __ASSEMBLY__ */
-
-#endif /* __KERNEL__ */
-
#endif /* _ASM_TYPES_H */
diff --git a/arch/nios2/include/asm/types.h b/arch/nios2/include/asm/types.h
index 710ee55796..0067ea83c1 100644
--- a/arch/nios2/include/asm/types.h
+++ b/arch/nios2/include/asm/types.h
@@ -3,6 +3,4 @@
#include <asm/int-ll64.h>
-typedef unsigned short umode_t;
-
#endif
diff --git a/arch/openrisc/include/asm/types.h b/arch/openrisc/include/asm/types.h
index 5b6391baf0..8ee6bb00f9 100644
--- a/arch/openrisc/include/asm/types.h
+++ b/arch/openrisc/include/asm/types.h
@@ -24,8 +24,6 @@
* need to be careful to avoid a name clashes.
*/
-typedef unsigned short umode_t;
-
/*
* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
* header files exported to user space
diff --git a/arch/ppc/include/asm/e300.h b/arch/ppc/include/asm/e300.h
deleted file mode 100644
index 79dcae416f..0000000000
--- a/arch/ppc/include/asm/e300.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright 2004 Freescale Semiconductor, Inc.
- * Liberty Eran (liberty@freescale.com)
- */
-
-#ifndef __E300_H__
-#define __E300_H__
-
-/*
- * e300 Processor Version & Revision Numbers
- */
-#define PVR_83xx 0x80830000
-#define PVR_8349_REV10 (PVR_83xx | 0x0010)
-#define PVR_8349_REV11 (PVR_83xx | 0x0011)
-#define PVR_8360_REV10 (PVR_83xx | 0x0020)
-#define PVR_8360_REV11 (PVR_83xx | 0x0020)
-
-/*
- * Hardware Implementation-Dependent Register 0 (HID0)
- */
-
-/* #define HID0 1008 already defined in processor.h */
-#define HID0_MASK_MACHINE_CHECK 0x00000000
-#define HID0_ENABLE_MACHINE_CHECK 0x80000000
-
-#define HID0_DISABLE_CACHE_PARITY 0x00000000
-#define HID0_ENABLE_CACHE_PARITY 0x40000000
-
-#define HID0_DISABLE_ADDRESS_PARITY 0x00000000 /* on mpc8349ads must be disabled */
-#define HID0_ENABLE_ADDRESS_PARITY 0x20000000
-
-#define HID0_DISABLE_DATA_PARITY 0x00000000 /* on mpc8349ads must be disabled */
-#define HID0_ENABLE_DATE_PARITY 0x10000000
-
-#define HID0_CORE_CLK_OUT 0x00000000
-#define HID0_CORE_CLK_OUT_DIV_2 0x08000000
-
-#define HID0_ENABLE_ARTRY_OUT_PRECHARGE 0x00000000 /* on mpc8349ads must be enabled */
-#define HID0_DISABLE_ARTRY_OUT_PRECHARGE 0x01000000
-
-#define HID0_DISABLE_DOSE_MODE 0x00000000
-#define HID0_ENABLE_DOSE_MODE 0x00800000
-
-#define HID0_DISABLE_NAP_MODE 0x00000000
-#define HID0_ENABLE_NAP_MODE 0x00400000
-
-#define HID0_DISABLE_SLEEP_MODE 0x00000000
-#define HID0_ENABLE_SLEEP_MODE 0x00200000
-
-#define HID0_DISABLE_DYNAMIC_POWER_MANAGMENT 0x00000000
-#define HID0_ENABLE_DYNAMIC_POWER_MANAGMENT 0x00100000
-
-#define HID0_SOFT_RESET 0x00010000
-
-#define HID0_DISABLE_INSTRUCTION_CACHE 0x00000000
-#define HID0_ENABLE_INSTRUCTION_CACHE 0x00008000
-
-#define HID0_DISABLE_DATA_CACHE 0x00000000
-#define HID0_ENABLE_DATA_CACHE 0x00004000
-
-#define HID0_LOCK_INSTRUCTION_CACHE 0x00002000
-
-#define HID0_LOCK_DATA_CACHE 0x00001000
-
-#define HID0_INVALIDATE_INSTRUCTION_CACHE 0x00000800
-
-#define HID0_INVALIDATE_DATA_CACHE 0x00000400
-
-#define HID0_DISABLE_M_BIT 0x00000000
-#define HID0_ENABLE_M_BIT 0x00000080
-
-#define HID0_FBIOB 0x00000010
-
-#define HID0_DISABLE_ADDRESS_BROADCAST 0x00000000
-#define HID0_ENABLE_ADDRESS_BROADCAST 0x00000008
-
-#define HID0_ENABLE_NOOP_DCACHE_INSTRUCTION 0x00000000
-#define HID0_DISABLE_NOOP_DCACHE_INSTRUCTION 0x00000001
-
-/*
- * Hardware Implementation-Dependent Register 2 (HID2)
- */
-#define HID2 1011
-
-#define HID2_LET 0x08000000
-#define HID2_HBE 0x00040000
-#define HID2_IWLCK_000 0x00000000 /* no ways locked */
-#define HID2_IWLCK_001 0x00002000 /* way 0 locked */
-#define HID2_IWLCK_010 0x00004000 /* way 0 through way 1 locked */
-#define HID2_IWLCK_011 0x00006000 /* way 0 through way 2 locked */
-#define HID2_IWLCK_100 0x00008000 /* way 0 through way 3 locked */
-#define HID2_IWLCK_101 0x0000A000 /* way 0 through way 4 locked */
-#define HID2_IWLCK_110 0x0000C000 /* way 0 through way 5 locked */
-
-
-/* BAT (block address translation */
-#define BATU_BEPI_MSK 0xfffe0000
-#define BATU_BL_MSK 0x00001ffc
-
-#define BATU_BL_128K 0x00000000
-#define BATU_BL_256K 0x00000004
-#define BATU_BL_512K 0x0000000c
-#define BATU_BL_1M 0x0000001c
-#define BATU_BL_2M 0x0000003c
-#define BATU_BL_4M 0x0000007c
-#define BATU_BL_8M 0x000000fc
-#define BATU_BL_16M 0x000001fc
-#define BATU_BL_32M 0x000003fc
-#define BATU_BL_64M 0x000007fc
-#define BATU_BL_128M 0x00000ffc
-#define BATU_BL_256M 0x00001ffc
-
-#define BATU_VS 0x00000002
-#define BATU_VP 0x00000001
-
-#define BATL_BRPN_MSK 0xfffe0000
-#define BATL_WIMG_MSK 0x00000078
-
-#define BATL_WRITETHROUGH 0x00000040
-#define BATL_CACHEINHIBIT 0x00000020
-#define BATL_MEMCOHERENCE 0x00000010
-#define BATL_GUARDEDSTORAGE 0x00000008
-
-#define BATL_PP_MSK 0x00000003
-#define BATL_PP_00 0x00000000 /* No access */
-#define BATL_PP_01 0x00000001 /* Read-only */
-#define BATL_PP_10 0x00000002 /* Read-write */
-#define BATL_PP_11 0x00000003
-
-#endif /* __E300_H__ */
diff --git a/arch/ppc/include/asm/mc146818rtc.h b/arch/ppc/include/asm/mc146818rtc.h
deleted file mode 100644
index adc4e24db7..0000000000
--- a/arch/ppc/include/asm/mc146818rtc.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Machine dependent access functions for RTC registers.
- */
-#ifndef __ASM_PPC_MC146818RTC_H
-#define __ASM_PPC_MC146818RTC_H
-
-#include <io.h>
-
-#ifndef RTC_PORT
-#define RTC_PORT(x) (0x70 + (x))
-#define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */
-#endif
-
-/*
- * The yet supported machines all access the RTC index register via
- * an ISA port access but the way to access the date register differs ...
- */
-#define CMOS_READ(addr) ({ \
-outb_p((addr),RTC_PORT(0)); \
-inb_p(RTC_PORT(1)); \
-})
-#define CMOS_WRITE(val, addr) ({ \
-outb_p((addr),RTC_PORT(0)); \
-outb_p((val),RTC_PORT(1)); \
-})
-
-#endif /* __ASM_PPC_MC146818RTC_H */
diff --git a/arch/ppc/include/asm/types.h b/arch/ppc/include/asm/types.h
index 6eb3877032..2d3ce0a283 100644
--- a/arch/ppc/include/asm/types.h
+++ b/arch/ppc/include/asm/types.h
@@ -3,8 +3,6 @@
#ifndef __ASSEMBLY__
-typedef unsigned short umode_t;
-
typedef __signed__ char __s8;
typedef unsigned char __u8;
diff --git a/arch/riscv/include/asm/types.h b/arch/riscv/include/asm/types.h
index ba386ab4c5..8200a03349 100644
--- a/arch/riscv/include/asm/types.h
+++ b/arch/riscv/include/asm/types.h
@@ -15,8 +15,6 @@
#endif
-typedef unsigned short umode_t;
-
/*
* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
* header files exported to user space
diff --git a/arch/sandbox/include/asm/types.h b/arch/sandbox/include/asm/types.h
index 501883f5aa..8426de4cc2 100644
--- a/arch/sandbox/include/asm/types.h
+++ b/arch/sandbox/include/asm/types.h
@@ -16,8 +16,6 @@
#endif
-typedef unsigned short umode_t;
-
/*
* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
* header files exported to user space
diff --git a/arch/x86/include/asm/types.h b/arch/x86/include/asm/types.h
index 3caac398d8..e57ae2c8cf 100644
--- a/arch/x86/include/asm/types.h
+++ b/arch/x86/include/asm/types.h
@@ -18,8 +18,6 @@
#endif
-typedef unsigned short umode_t;
-
/*
* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
* header files exported to user space
diff --git a/commands/i2c.c b/commands/i2c.c
index 2f7f820d4d..77d65e3fa3 100644
--- a/commands/i2c.c
+++ b/commands/i2c.c
@@ -24,19 +24,19 @@
static void i2c_probe_range(struct i2c_adapter *adapter, int startaddr, int stopaddr)
{
- struct i2c_client client = {};
int addr;
- int ret;
- u8 reg;
-
- client.adapter = adapter;
printf("probing i2c%d range 0x%02x-0x%02x: ", adapter->nr, startaddr, stopaddr);
for (addr = startaddr; addr <= stopaddr && !ctrlc(); addr++) {
- client.addr = addr;
- ret = i2c_write_reg(&client, 0x00, &reg, 0);
- if (ret == 0)
+ struct i2c_msg msg = {
+ .addr = addr,
+ .buf = NULL,
+ .len = 0,
+ };
+ int ret = i2c_transfer(adapter, &msg, 1);
+ if (ret == 1)
printf("0x%02x ", addr);
+
}
printf("\n");
}
@@ -44,7 +44,7 @@ static void i2c_probe_range(struct i2c_adapter *adapter, int startaddr, int stop
static int do_i2c_probe(int argc, char *argv[])
{
struct i2c_adapter *adapter = NULL;
- int startaddr = 0, stopaddr = 0x7f;
+ int startaddr = 4, stopaddr = 0x77;
if (argc > 1) {
adapter = i2c_get_adapter(simple_strtoul(argv[1], NULL, 0));
@@ -57,13 +57,15 @@ static int do_i2c_probe(int argc, char *argv[])
if (argc > 3)
stopaddr = simple_strtol(argv[3], NULL, 0);
+ if (stopaddr > 0x7f)
+ stopaddr = 0x7f;
+
+ if (startaddr < 0)
+ startaddr = 0;
if (startaddr > stopaddr)
return COMMAND_ERROR_USAGE;
- if (stopaddr > 0x7F)
- stopaddr = 0x7F;
-
if (adapter) {
i2c_probe_range(adapter, startaddr, stopaddr);
} else {
diff --git a/commands/ls.c b/commands/ls.c
index e54991862d..e5e37d75c5 100644
--- a/commands/ls.c
+++ b/commands/ls.c
@@ -26,6 +26,15 @@
#include <getopt.h>
#include <stringlist.h>
+/*
+ * SIZELEN = strlen(itoa(MAX_LFS_FILESIZE)) + 1;
+ */
+#ifdef CONFIG_CPU_64
+#define SIZELEN 20
+#else
+#define SIZELEN 14
+#endif
+
static void ls_one(const char *path, const char* fullname)
{
char modestr[11];
@@ -38,7 +47,8 @@ static void ls_one(const char *path, const char* fullname)
return;
mkmodestr(s.st_mode, modestr);
- printf("%s %14llu %*.*s", modestr, s.st_size, namelen, namelen, path);
+ printf("%s %*llu %*.*s", modestr, SIZELEN, s.st_size, namelen,
+ namelen, path);
if (S_ISLNK(s.st_mode)) {
char realname[PATH_MAX];
diff --git a/common/block.c b/common/block.c
index d90c98948c..97cf5dc4de 100644
--- a/common/block.c
+++ b/common/block.c
@@ -38,6 +38,11 @@ struct chunk {
#define BUFSIZE (PAGE_SIZE * 4)
+static int writebuffer_io_len(struct block_device *blk, struct chunk *chunk)
+{
+ return min(blk->rdbufsize, blk->num_blocks - chunk->block_start);
+}
+
/*
* Write all dirty chunks back to the device
*/
@@ -51,7 +56,9 @@ static int writebuffer_flush(struct block_device *blk)
list_for_each_entry(chunk, &blk->buffered_blocks, list) {
if (chunk->dirty) {
- ret = blk->ops->write(blk, chunk->data, chunk->block_start, blk->rdbufsize);
+ ret = blk->ops->write(blk, chunk->data,
+ chunk->block_start,
+ writebuffer_io_len(blk, chunk));
if (ret < 0)
return ret;
@@ -76,7 +83,8 @@ static struct chunk *chunk_get_cached(struct block_device *blk, int block)
list_for_each_entry(chunk, &blk->buffered_blocks, list) {
if (block >= chunk->block_start &&
block < chunk->block_start + blk->rdbufsize) {
- debug("%s: found %d in %d\n", __func__, block, chunk->num);
+ dev_dbg(blk->dev, "%s: found %d in %d\n", __func__,
+ block, chunk->num);
/*
* move most recently used entry to the head of the list
*/
@@ -117,22 +125,20 @@ static struct chunk *get_chunk(struct block_device *blk)
/* use last entry which is the most unused */
chunk = list_last_entry(&blk->buffered_blocks, struct chunk, list);
if (chunk->dirty) {
- size_t num_blocks = min(blk->rdbufsize,
- blk->num_blocks - chunk->block_start);
- ret = blk->ops->write(blk, chunk->data, chunk->block_start,
- num_blocks);
+ ret = blk->ops->write(blk, chunk->data,
+ chunk->block_start,
+ writebuffer_io_len(blk, chunk));
if (ret < 0)
return ERR_PTR(ret);
chunk->dirty = 0;
}
-
- list_del(&chunk->list);
} else {
chunk = list_first_entry(&blk->idle_blocks, struct chunk, list);
- list_del(&chunk->list);
}
+ list_del(&chunk->list);
+
return chunk;
}
@@ -144,7 +150,6 @@ static struct chunk *get_chunk(struct block_device *blk)
static int block_cache(struct block_device *blk, int block)
{
struct chunk *chunk;
- size_t num_blocks;
int ret;
chunk = get_chunk(blk);
@@ -153,12 +158,11 @@ static int block_cache(struct block_device *blk, int block)
chunk->block_start = block & ~blk->blkmask;
- debug("%s: %d to %d\n", __func__, chunk->block_start,
- chunk->num);
-
- num_blocks = min(blk->rdbufsize, blk->num_blocks - chunk->block_start);
+ dev_dbg(blk->dev, "%s: %d to %d\n", __func__, chunk->block_start,
+ chunk->num);
- ret = blk->ops->read(blk, chunk->data, chunk->block_start, num_blocks);
+ ret = blk->ops->read(blk, chunk->data, chunk->block_start,
+ writebuffer_io_len(blk, chunk));
if (ret) {
list_add_tail(&chunk->list, &blk->idle_blocks);
return ret;
@@ -329,13 +333,6 @@ static ssize_t block_op_write(struct cdev *cdev, const void *buf, size_t count,
}
#endif
-static int block_op_close(struct cdev *cdev)
-{
- struct block_device *blk = cdev->priv;
-
- return writebuffer_flush(blk);
-}
-
static int block_op_flush(struct cdev *cdev)
{
struct block_device *blk = cdev->priv;
@@ -343,6 +340,8 @@ static int block_op_flush(struct cdev *cdev)
return writebuffer_flush(blk);
}
+static int block_op_close(struct cdev *cdev) __alias(block_op_flush);
+
static struct cdev_operations block_ops = {
.read = block_op_read,
#ifdef CONFIG_BLOCK_WRITE
@@ -368,8 +367,8 @@ int blockdevice_register(struct block_device *blk)
INIT_LIST_HEAD(&blk->idle_blocks);
blk->blkmask = blk->rdbufsize - 1;
- debug("%s: rdbufsize: %d blockbits: %d blkmask: 0x%08x\n", __func__, blk->rdbufsize, blk->blockbits,
- blk->blkmask);
+ dev_dbg(blk->dev, "rdbufsize: %d blockbits: %d blkmask: 0x%08x\n",
+ blk->rdbufsize, blk->blockbits, blk->blkmask);
for (i = 0; i < 32; i++) {
struct chunk *chunk = xzalloc(sizeof(*chunk));
diff --git a/common/boot.c b/common/boot.c
index 41bf1ce64b..974eaf5d02 100644
--- a/common/boot.c
+++ b/common/boot.c
@@ -96,8 +96,8 @@ static int bootscript_boot(struct bootentry *entry, int verbose, int dryrun)
ret = run_command(bs->scriptpath);
if (ret) {
- printf("Running %s failed\n", bs->scriptpath);
- goto out;
+ pr_err("Running script '%s' failed: %s\n", bs->scriptpath, strerror(-ret));
+ return ret;
}
bootm_data_init_defaults(&data);
@@ -107,11 +107,7 @@ static int bootscript_boot(struct bootentry *entry, int verbose, int dryrun)
if (dryrun)
data.dryrun = dryrun;
- ret = bootm_boot(&data);
- if (ret)
- pr_err("Booting '%s' failed: %s\n", basename(bs->scriptpath), strerror(-ret));
-out:
- return ret;
+ return bootm_boot(&data);
}
static unsigned int boot_watchdog_timeout;
@@ -135,7 +131,7 @@ int boot_entry(struct bootentry *be, int verbose, int dryrun)
{
int ret;
- printf("booting '%s'\n", be->title);
+ printf("Booting entry '%s'\n", be->title);
if (IS_ENABLED(CONFIG_WATCHDOG) && boot_watchdog_timeout) {
ret = watchdog_set_timeout(boot_watchdog_timeout);
@@ -144,9 +140,8 @@ int boot_entry(struct bootentry *be, int verbose, int dryrun)
}
ret = be->boot(be, verbose, dryrun);
-
if (ret)
- printf("booting '%s' failed: %s\n", be->title, strerror(-ret));
+ pr_err("Booting entry '%s' failed\n", be->title);
return ret;
}
@@ -154,11 +149,8 @@ int boot_entry(struct bootentry *be, int verbose, int dryrun)
static void bootsource_action(struct menu *m, struct menu_entry *me)
{
struct bootentry *be = container_of(me, struct bootentry, me);
- int ret;
- ret = boot_entry(be, 0, 0);
- if (ret)
- printf("Booting failed with: %s\n", strerror(-ret));
+ boot_entry(be, 0, 0);
printf("Press any key to continue\n");
diff --git a/common/image-fit.c b/common/image-fit.c
index 87a55b7e27..6ac4644686 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -368,7 +368,7 @@ static int fit_verify_signature(struct device_node *sig_node, const void *fit)
out_sl:
string_list_free(&inc_nodes);
string_list_free(&exc_props);
-
+
return ret;
}
diff --git a/common/memory.c b/common/memory.c
index 00fa7c50ff..21b2b4f63a 100644
--- a/common/memory.c
+++ b/common/memory.c
@@ -224,39 +224,78 @@ int memory_bank_first_find_space(resource_size_t *retstart,
#ifdef CONFIG_OFTREE
-static int of_memory_fixup(struct device_node *node, void *unused)
+static int of_memory_fixup(struct device_node *root, void *unused)
{
struct memory_bank *bank;
int err;
- int addr_cell_len, size_cell_len, len = 0;
- struct device_node *memnode;
- u8 tmp[16 * 16]; /* Up to 64-bit address + 64-bit size */
+ int addr_cell_len, size_cell_len;
+ struct device_node *memnode, *tmp, *np;
+ char *memnode_name;
- memnode = of_create_node(node, "/memory");
- if (!memnode)
- return -ENOMEM;
+ /*
+ * Since kernel 4.16 the memory node got a @<reg> suffix. To support
+ * the old and the new style delete any found memory node and add it
+ * again to be sure that the memory node exists only once. It shouldn't
+ * bother older kernels if the memory node has this suffix so adding it
+ * following the new style.
+ */
- err = of_property_write_string(memnode, "device_type", "memory");
- if (err)
- return err;
+ for_each_child_of_node_safe(root, tmp, np) {
+ const char *device_type;
- addr_cell_len = of_n_addr_cells(memnode);
- size_cell_len = of_n_size_cells(memnode);
+ err = of_property_read_string(np, "device_type", &device_type);
+ if (err || of_node_cmp("memory", device_type))
+ continue;
+
+ /* delete every found memory node */
+ of_delete_node(np);
+ }
+
+ addr_cell_len = of_n_addr_cells(root);
+ size_cell_len = of_n_size_cells(root);
for_each_memory_bank(bank) {
- of_write_number(tmp + len, bank->start, addr_cell_len);
+ u8 tmp[16]; /* Up to 64-bit address + 64-bit size */
+ int len = 0;
+
+ /* Create a /memory node for each bank */
+ memnode_name = basprintf("/memory@%lx", bank->start);
+ if (!memnode_name) {
+ err = -ENOMEM;
+ goto err_out;
+ }
+
+ memnode = of_create_node(root, memnode_name);
+ if (!memnode) {
+ err = -ENOMEM;
+ goto err_free;
+ }
+
+ err = of_property_write_string(memnode, "device_type",
+ "memory");
+ if (err)
+ goto err_free;
+
+ of_write_number(tmp, bank->start, addr_cell_len);
len += addr_cell_len * 4;
of_write_number(tmp + len, bank->size, size_cell_len);
len += size_cell_len * 4;
- }
- err = of_set_property(memnode, "reg", tmp, len, 1);
- if (err) {
- pr_err("could not set reg %s.\n", strerror(-err));
- return err;
+ err = of_set_property(memnode, "reg", tmp, len, 1);
+ if (err) {
+ pr_err("could not set reg %s.\n", strerror(-err));
+ goto err_free;
+ }
+
+ free(memnode_name);
}
return 0;
+
+err_free:
+ free(memnode_name);
+err_out:
+ return err;
}
static int of_register_memory_fixup(void)
diff --git a/common/state/backend_bucket_circular.c b/common/state/backend_bucket_circular.c
index 4b71d8751d..da7c8421ae 100644
--- a/common/state/backend_bucket_circular.c
+++ b/common/state/backend_bucket_circular.c
@@ -23,6 +23,10 @@
#include <mtd/mtd-peb.h>
#include <string.h>
+#ifndef __BAREBOX__
+#include <sys/param.h>
+#endif
+
#include "state.h"
/*
@@ -161,17 +165,17 @@ static int state_mtd_peb_read(struct state_backend_storage_bucket_circular *circ
ret = lseek(circ->fd, offset, SEEK_SET);
if (ret < 0) {
dev_err(circ->dev, "Failed to set circular read position to %lld, %d\n",
- offset, ret);
+ (long long) offset, ret);
return ret;
}
- dev_dbg(circ->dev, "Read state from %ld length %zd\n", offset,
+ dev_dbg(circ->dev, "Read state from %lld length %d\n", (long long) offset,
len);
ret = read_full(circ->fd, buf, len);
if (ret < 0) {
- dev_err(circ->dev, "Failed to read circular storage len %zd, %d\n",
+ dev_err(circ->dev, "Failed to read circular storage len %d, %d\n",
len, ret);
free(buf);
}
@@ -189,15 +193,15 @@ static int state_mtd_peb_write(struct state_backend_storage_bucket_circular *cir
ret = lseek(circ->fd, offset, SEEK_SET);
if (ret < 0) {
- dev_err(circ->dev, "Failed to set position for circular write %ld, %d\n",
- offset, ret);
+ dev_err(circ->dev, "Failed to set position for circular write %lld, %d\n",
+ (long long) offset, ret);
return ret;
}
ret = write_full(circ->fd, buf, len);
if (ret < 0) {
- dev_err(circ->dev, "Failed to write circular to %ld length %zd, %d\n",
- offset, len, ret);
+ dev_err(circ->dev, "Failed to write circular to %lld length %d, %d\n",
+ (long long) offset, len, ret);
return ret;
}
@@ -207,8 +211,8 @@ static int state_mtd_peb_write(struct state_backend_storage_bucket_circular *cir
*/
flush(circ->fd);
- dev_dbg(circ->dev, "Written state to offset %ld length %zd data length %zd\n",
- offset, len, len);
+ dev_dbg(circ->dev, "Written state to offset %lld length %d data length %d\n",
+ (long long) offset, len, len);
return 0;
}
@@ -265,8 +269,8 @@ static int state_backend_bucket_circular_read(struct state_backend_storage_bucke
if (!buf)
return -ENOMEM;
- dev_dbg(circ->dev, "Read state from PEB %u global offset %ld length %zd\n",
- circ->eraseblock, offset, read_len);
+ dev_dbg(circ->dev, "Read state from PEB %u global offset %lld length %zd\n",
+ circ->eraseblock, (long long) offset, read_len);
ret = state_mtd_peb_read(circ, buf, offset, read_len);
if (ret < 0 && ret != -EUCLEAN) {
@@ -298,7 +302,7 @@ static int state_backend_bucket_circular_write(struct state_backend_storage_buck
void *write_buf;
if (written_length > circ->max_size) {
- dev_err(circ->dev, "Error, state data too big to be written, to write: %zd, writesize: %zd, length: %zd, available: %zd\n",
+ dev_err(circ->dev, "Error, state data too big to be written, to write: %u, writesize: %zd, length: %zd, available: %zd\n",
written_length, circ->writesize, len, circ->max_size);
return -E2BIG;
}
@@ -345,13 +349,13 @@ static int state_backend_bucket_circular_write(struct state_backend_storage_buck
ret = state_mtd_peb_write(circ, write_buf, offset, written_length);
if (ret < 0 && ret != -EUCLEAN) {
- dev_err(circ->dev, "Failed to write circular to %ld length %zd, %d\n",
- offset, written_length, ret);
+ dev_err(circ->dev, "Failed to write circular to %lld length %u, %d\n",
+ (long long) offset, written_length, ret);
goto out_free;
}
- dev_dbg(circ->dev, "Written state to PEB %u offset %ld length %zd data length %zd\n",
- circ->eraseblock, offset, written_length, len);
+ dev_dbg(circ->dev, "Written state to PEB %u offset %lld length %u data length %zd\n",
+ circ->eraseblock, (long long) offset, written_length, len);
out_free:
free(write_buf);
@@ -445,8 +449,8 @@ static int bucket_circular_is_block_bad(struct state_backend_storage_bucket_circ
ret = ioctl(circ->fd, MEMGETBADBLOCK, &offs);
if (ret < 0)
- dev_err(circ->dev, "Failed to use ioctl to check for bad block at offset %ld, %d\n",
- offs, ret);
+ dev_err(circ->dev, "Failed to use ioctl to check for bad block at offset %lld, %d\n",
+ (long long) offs, ret);
return ret;
}
diff --git a/common/state/backend_bucket_direct.c b/common/state/backend_bucket_direct.c
index 9d6a337e66..1f00b0fb2f 100644
--- a/common/state/backend_bucket_direct.c
+++ b/common/state/backend_bucket_direct.c
@@ -110,6 +110,9 @@ static int state_backend_bucket_direct_write(struct state_backend_storage_bucket
int ret;
struct state_backend_storage_bucket_direct_meta meta;
+ if (len > direct->max_size - sizeof(meta))
+ return -E2BIG;
+
ret = lseek(direct->fd, direct->offset, SEEK_SET);
if (ret < 0) {
dev_err(direct->dev, "Failed to seek file, %d\n", ret);
diff --git a/common/state/backend_format_raw.c b/common/state/backend_format_raw.c
index 4369f76e37..5a71149d34 100644
--- a/common/state/backend_format_raw.c
+++ b/common/state/backend_format_raw.c
@@ -127,7 +127,7 @@ static int backend_format_raw_verify(struct state_backend_format *format,
return -EINVAL;
}
- if (backend_raw->algo && !(flags & STATE_FLAG_NO_AUTHENTIFICATION)) {
+ if (backend_raw->algo && !(flags & STATE_FLAG_NO_AUTHENTICATION)) {
ret = backend_raw_digest_init(backend_raw);
if (ret)
return ret;
@@ -153,7 +153,7 @@ static int backend_format_raw_verify(struct state_backend_format *format,
*lenp = header->data_len + sizeof(*header);
- if (backend_raw->algo && !(flags & STATE_FLAG_NO_AUTHENTIFICATION)) {
+ if (backend_raw->algo && !(flags & STATE_FLAG_NO_AUTHENTICATION)) {
const void *hmac = data + header->data_len;
/* hmac over header and data */
diff --git a/common/state/backend_storage.c b/common/state/backend_storage.c
index c6ebe86244..fca887e93f 100644
--- a/common/state/backend_storage.c
+++ b/common/state/backend_storage.c
@@ -19,7 +19,7 @@
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/mtd/mtd-abi.h>
-#include <linux/stat.h>
+#include <sys/stat.h>
#include <malloc.h>
#include <printk.h>
@@ -111,11 +111,11 @@ refresh:
ret = bucket->write(bucket, buf, len);
if (ret) {
- dev_warn(storage->dev, "Failed to restore bucket %d@0x%08lx\n",
- bucket->num, bucket->offset);
+ dev_warn(storage->dev, "Failed to restore bucket %d@0x%08llx\n",
+ bucket->num, (long long) bucket->offset);
} else {
- dev_info(storage->dev, "restored bucket %d@0x%08lx\n",
- bucket->num, bucket->offset);
+ dev_info(storage->dev, "restored bucket %d@0x%08llx\n",
+ bucket->num, (long long) bucket->offset);
bucket->needs_refresh = 0;
}
@@ -166,7 +166,7 @@ int state_storage_read(struct state_backend_storage *storage,
if (!ret && !bucket_used)
bucket_used = bucket;
if (ret)
- dev_info(storage->dev, "Ignoring broken bucket %d@0x%08lx...\n", bucket->num, bucket->offset);
+ dev_info(storage->dev, "Ignoring broken bucket %d@0x%08llx...\n", bucket->num, (long long) bucket->offset);
}
dev_dbg(storage->dev, "Checking redundant buckets finished.\n");
@@ -177,7 +177,7 @@ int state_storage_read(struct state_backend_storage *storage,
return -ENOENT;
}
- dev_info(storage->dev, "Using bucket %d@0x%08lx\n", bucket_used->num, bucket_used->offset);
+ dev_info(storage->dev, "Using bucket %d@0x%08llx\n", bucket_used->num, (long long) bucket_used->offset);
/*
* Restore/refresh all buckets except the one we currently use (in case
@@ -252,8 +252,8 @@ static int state_storage_mtd_buckets_init(struct state_backend_storage *storage,
end = meminfo->size;
if (!IS_ALIGNED(storage->offset, meminfo->erasesize)) {
- dev_err(storage->dev, "Offset within the device is not aligned to eraseblocks. Offset is %ld, erasesize %u\n",
- storage->offset, meminfo->erasesize);
+ dev_err(storage->dev, "Offset within the device is not aligned to eraseblocks. Offset is %lld, erasesize %u\n",
+ (long long) storage->offset, meminfo->erasesize);
return -EINVAL;
}
@@ -326,8 +326,8 @@ static int state_storage_file_buckets_init(struct state_backend_storage *storage
&bucket, offset,
stridesize);
if (ret) {
- dev_warn(storage->dev, "Failed to create direct bucket at '%s' offset %ld\n",
- storage->path, offset);
+ dev_warn(storage->dev, "Failed to create direct bucket at '%s' offset %lld\n",
+ storage->path, (long long) offset);
continue;
}
diff --git a/common/state/state.c b/common/state/state.c
index 54c57232e6..3f5d43ecbf 100644
--- a/common/state/state.c
+++ b/common/state/state.c
@@ -128,7 +128,7 @@ int state_load(struct state *state)
int state_load_no_auth(struct state *state)
{
- return state_do_load(state, STATE_FLAG_NO_AUTHENTIFICATION);
+ return state_do_load(state, STATE_FLAG_NO_AUTHENTICATION);
}
static int state_format_init(struct state *state, const char *backend_format,
@@ -596,6 +596,8 @@ struct state *state_new_from_node(struct device_node *node, bool readonly)
const char *alias;
uint32_t stridesize;
struct device_node *partition_node;
+ off_t offset = 0;
+ size_t size = 0;
alias = of_alias_get(node);
if (!alias) {
@@ -614,7 +616,11 @@ struct state *state_new_from_node(struct device_node *node, bool readonly)
goto out_release_state;
}
+#ifdef __BAREBOX__
ret = of_find_path_by_node(partition_node, &state->backend_path, 0);
+#else
+ ret = of_get_devicepath(partition_node, &state->backend_path, &offset, &size);
+#endif
if (ret) {
if (ret != -EPROBE_DEFER)
dev_err(&state->dev, "state failed to parse path to backend: %s\n",
@@ -645,8 +651,8 @@ struct state *state_new_from_node(struct device_node *node, bool readonly)
if (ret)
goto out_release_state;
- ret = state_storage_init(state, state->backend_path, 0,
- 0, stridesize, storage_type);
+ ret = state_storage_init(state, state->backend_path, offset,
+ size, stridesize, storage_type);
if (ret)
goto out_release_state;
diff --git a/common/state/state.h b/common/state/state.h
index 3a0662fd25..912d6d4848 100644
--- a/common/state/state.h
+++ b/common/state/state.h
@@ -6,7 +6,7 @@ struct state;
struct mtd_info_user;
enum state_flags {
- STATE_FLAG_NO_AUTHENTIFICATION = (1 << 0),
+ STATE_FLAG_NO_AUTHENTICATION = (1 << 0),
};
enum state_variable_type {
diff --git a/common/ubiformat.c b/common/ubiformat.c
index 0811525bd2..1968bd98f8 100644
--- a/common/ubiformat.c
+++ b/common/ubiformat.c
@@ -710,8 +710,10 @@ int ubiformat_write(struct mtd_info *mtd, const void *buf, size_t count,
loff_t offset)
{
int writesize = mtd->writesize >> mtd->subpage_sft;
- size_t retlen;
int ret;
+ int peb = 0;
+ int n_skip_blocks = mtd_div_by_eb(offset, mtd);
+ int offset_in_peb = mtd_mod_by_eb(offset, mtd);
if (offset & (mtd->writesize - 1))
return -EINVAL;
@@ -719,27 +721,44 @@ int ubiformat_write(struct mtd_info *mtd, const void *buf, size_t count,
if (count & (mtd->writesize - 1))
return -EINVAL;
+ /* Seek forward to the first PEB we actually want to write */
+ while (1) {
+ ret = mtd_skip_bad(mtd, &peb);
+ if (ret)
+ return ret;
+
+ if (!n_skip_blocks)
+ break;
+
+ peb++;
+ n_skip_blocks--;
+ }
+
while (count) {
- size_t now;
+ size_t now = mtd->erasesize - offset_in_peb;
- now = ALIGN(offset, mtd->erasesize) - offset;
if (now > count)
now = count;
- if (!now) {
+ if (!offset_in_peb) {
const struct ubi_ec_hdr *ec = buf;
const struct ubi_vid_hdr *vid;
+ ret = mtd_skip_bad(mtd, &peb);
+ if (ret)
+ return ret;
+
if (be32_to_cpu(ec->magic) != UBI_EC_HDR_MAGIC) {
pr_err("bad UBI magic %#08x, should be %#08x",
be32_to_cpu(ec->magic), UBI_EC_HDR_MAGIC);
return -EINVAL;
}
- /* skip ec header */
- offset += writesize;
+ /* skip ec header in both flash and image */
+ offset_in_peb = writesize;
buf += writesize;
count -= writesize;
+ now -= writesize;
if (!count)
break;
@@ -750,19 +769,16 @@ int ubiformat_write(struct mtd_info *mtd, const void *buf, size_t count,
be32_to_cpu(vid->magic), UBI_VID_HDR_MAGIC);
return -EINVAL;
}
-
- continue;
}
- ret = mtd_write(mtd, offset, now, &retlen, buf);
+ ret = mtd_peb_write(mtd, buf, peb, offset_in_peb, now);
if (ret < 0)
return ret;
- if (retlen != now)
- return -EIO;
buf += now;
count -= now;
- offset += now;
+ offset_in_peb = 0;
+ peb++;
}
return 0;
diff --git a/defaultenv/defaultenv-2-base/boot/net b/defaultenv/defaultenv-2-base/boot/net
index f8895290ad..e79432eb27 100644
--- a/defaultenv/defaultenv-2-base/boot/net
+++ b/defaultenv/defaultenv-2-base/boot/net
@@ -2,6 +2,9 @@
path="/mnt/tftp"
+# global.net.server and global.hostname may be set by DHCP, so trigger it first
+ifup -a
+
global.bootm.image="${path}/${global.user}-linux-${global.hostname}"
oftree="${path}/${global.user}-oftree-${global.hostname}"
@@ -15,13 +18,11 @@ if [ $? != 0 ]; then
exit 1
fi
-nfsroot="${nfsserver}:/home/${global.user}/nfsroot/${global.hostname}"
-
-ip_route_get -b ${global.net.server} global.linux.bootargs.dyn.ip
-
initramfs="${path}/${global.user}-initramfs-${global.hostname}"
if [ -f "${initramfs}" ]; then
global.bootm.initrd="$initramfs"
else
+ nfsroot="${nfsserver}:/home/${global.user}/nfsroot/${global.hostname}"
+ ip_route_get -b ${global.net.server} global.linux.bootargs.dyn.ip
global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
fi
diff --git a/drivers/clk/imx/clk-imx7.c b/drivers/clk/imx/clk-imx7.c
index 97fe7abda2..781bc43e09 100644
--- a/drivers/clk/imx/clk-imx7.c
+++ b/drivers/clk/imx/clk-imx7.c
@@ -743,7 +743,7 @@ static int imx7_ccm_probe(struct device_d *dev)
"enet_axi_post_div", base + 0x4700, 0);
clks[IMX7D_ENET1_TIME_ROOT_CLK] = imx_clk_gate2_shared2("enet1_time_root_clk",
"enet1_time_post_div", base + 0x4700, 0);
- clks[IMX7D_ENET2_IPG_ROOT_CLK] = imx_clk_gate2_shared2("enet2_ipg_root_clk",
+ clks[IMX7D_ENET2_IPG_ROOT_CLK] = imx_clk_gate2_shared2("enet2_ipg_root_clk",
"enet_axi_post_div", base + 0x4710, 0);
clks[IMX7D_ENET2_TIME_ROOT_CLK] = imx_clk_gate2_shared2("enet2_time_root_clk",
"enet2_time_post_div", base + 0x4710, 0);
diff --git a/drivers/efi/efi-device.c b/drivers/efi/efi-device.c
index b7dea7c822..5cc68fb781 100644
--- a/drivers/efi/efi-device.c
+++ b/drivers/efi/efi-device.c
@@ -551,7 +551,7 @@ static int do_efi_protocol_dump(int argc, char **argv)
if (len != 36)
return -EINVAL;
-
+
read_xbit(s, a, 32);
if (*s != '-')
return -EINVAL;
diff --git a/drivers/mtd/peb.c b/drivers/mtd/peb.c
index c35b63f2fd..388db7f587 100644
--- a/drivers/mtd/peb.c
+++ b/drivers/mtd/peb.c
@@ -130,6 +130,33 @@ int mtd_num_pebs(struct mtd_info *mtd)
}
/**
+ * mtd_skip_bad - skip bad blocks
+ * @mtd: mtd device
+ * @pnum: The number of the block
+ *
+ * This function skips bad blocks beginning from @pnum. Returns 0 for success and
+ * a negative error code otherwise. on successful exit @pnum points to the next
+ * good block.
+ */
+int mtd_skip_bad(struct mtd_info *mtd, int *pnum)
+{
+ if (*pnum < 0)
+ return -EINVAL;
+
+ while (1) {
+ loff_t offset = (uint64_t)mtd->erasesize * *pnum;
+
+ if (offset >= mtd->size)
+ return -ENOSPC;
+
+ if (!mtd_block_isbad(mtd, offset))
+ return 0;
+
+ *pnum = *pnum + 1;
+ }
+}
+
+/**
* mtd_peb_mark_bad - mark a physical eraseblock as bad
* @mtd: mtd device
* @pnum: The number of the block
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index 84c2912bf5..32b60ccad8 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -1051,7 +1051,8 @@ int ubi_fastmap_init_checkmap(struct ubi_volume *vol, int leb_count)
void ubi_fastmap_destroy_checkmap(struct ubi_volume *vol)
{
- kfree(vol->checkmap);
+ if (vol)
+ kfree(vol->checkmap);
}
/**
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 3c9bca981c..0ee6d3d78a 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -328,24 +328,48 @@ static int dwc_ether_rx(struct eth_device *dev)
u32 status = desc_p->txrx_status;
int length = 0;
+ int ret = 0;
/* Check if the owner is the CPU */
if (status & DESC_RXSTS_OWNBYDMA)
return 0;
- length = (status & DESC_RXSTS_FRMLENMSK) >>
- DESC_RXSTS_FRMLENSHFT;
+ if ((status & (DESC_RXSTS_ERROR | DESC_RXSTS_DAFILTERFAIL |
+ DESC_RXSTS_SAFILTERFAIL)) ||
+ (status & (DESC_RXSTS_RXIPC_GIANTFRAME |
+ DESC_RXSTS_RXFRAMEETHER)) ==
+ DESC_RXSTS_RXIPC_GIANTFRAME) {
+ /* Error in packet - discard it */
+ dev_warn(&dev->dev, "Rx error status (%x)\n",
+ status & (DESC_RXSTS_DAFILTERFAIL |
+ DESC_RXSTS_ERROR |
+ DESC_RXSTS_RXTRUNCATED |
+ DESC_RXSTS_SAFILTERFAIL |
+ DESC_RXSTS_RXIPC_GIANTFRAME |
+ DESC_RXSTS_RXDAMAGED |
+ DESC_RXSTS_RXIPC_GIANT |
+ DESC_RXSTS_RXCOLLISION |
+ DESC_RXSTS_RXFRAMEETHER |
+ DESC_RXSTS_RXWATCHDOG |
+ DESC_RXSTS_RXMIIERROR |
+ DESC_RXSTS_RXCRC));
+ ret = -EIO;
+ } else {
+ length = (status & DESC_RXSTS_FRMLENMSK) >>
+ DESC_RXSTS_FRMLENSHFT;
+
+ dma_sync_single_for_cpu((unsigned long)desc_p->dmamac_addr,
+ length, DMA_FROM_DEVICE);
+ net_receive(dev, desc_p->dmamac_addr, length);
+ dma_sync_single_for_device((unsigned long)desc_p->dmamac_addr,
+ length, DMA_FROM_DEVICE);
+ ret = length;
+ }
/*
* Make the current descriptor valid again and go to
* the next one
*/
- dma_sync_single_for_cpu((unsigned long)desc_p->dmamac_addr, length,
- DMA_FROM_DEVICE);
- net_receive(dev, desc_p->dmamac_addr, length);
- dma_sync_single_for_device((unsigned long)desc_p->dmamac_addr, length,
- DMA_FROM_DEVICE);
-
desc_p->txrx_status |= DESC_RXSTS_OWNBYDMA;
/* Test the wrap-around condition. */
@@ -354,7 +378,7 @@ static int dwc_ether_rx(struct eth_device *dev)
priv->rx_currdescnum = desc_num;
- return length;
+ return ret;
}
static void dwc_ether_halt (struct eth_device *dev)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 67c2ca9d54..8f0b81d8fa 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -220,6 +220,7 @@ static int ksz9031_config_init(struct phy_device *phydev)
"txd2-skew-ps", "txd3-skew-ps"
};
static const char *control_skews[2] = {"txen-skew-ps", "rxdv-skew-ps"};
+ int ret;
if (!of_node && dev->parent->device_node)
of_node = dev->parent->device_node;
@@ -240,9 +241,40 @@ static int ksz9031_config_init(struct phy_device *phydev)
ksz9031_of_load_skew_values(phydev, of_node,
MII_KSZ9031RN_TX_DATA_PAD_SKEW, 4,
tx_data_skews, 4);
+
+ /* Silicon Errata Sheet (DS80000691D or DS80000692D):
+ * When the device links in the 1000BASE-T slave mode only,
+ * the optional 125MHz reference output clock (CLK125_NDO)
+ * has wide duty cycle variation.
+ *
+ * The optional CLK125_NDO clock does not meet the RGMII
+ * 45/55 percent (min/max) duty cycle requirement and therefore
+ * cannot be used directly by the MAC side for clocking
+ * applications that have setup/hold time requirements on
+ * rising and falling clock edges.
+ *
+ * Workaround:
+ * Force the phy to be the master to receive a stable clock
+ * which meets the duty cycle requirement.
+ */
+ if (of_property_read_bool(of_node, "micrel,force-master")) {
+ ret = phy_read(phydev, MII_CTRL1000);
+ if (ret < 0)
+ goto err_force_master;
+
+ /* enable master mode, config & prefer master */
+ ret |= CTL1000_ENABLE_MASTER | CTL1000_AS_MASTER;
+ ret = phy_write(phydev, MII_CTRL1000, ret);
+ if (ret < 0)
+ goto err_force_master;
+ }
}
return ksz9031_center_flp_timing(phydev);
+
+err_force_master:
+ dev_err(dev, "failed to force the phy to master mode\n");
+ return ret;
}
#define KSZ8873MLL_GLOBAL_CONTROL_4 0x06
diff --git a/drivers/nvmem/eeprom_93xx46.c b/drivers/nvmem/eeprom_93xx46.c
index d96ba32d07..49ed396dc2 100644
--- a/drivers/nvmem/eeprom_93xx46.c
+++ b/drivers/nvmem/eeprom_93xx46.c
@@ -339,7 +339,7 @@ static int eeprom_93xx46_probe_dt(struct spi_device *spi)
if (of_property_read_bool(np, "read-only"))
pd->flags |= EE_READONLY;
- pd->select =of_get_named_gpio_flags(np, "select", 0, &of_flags);
+ pd->select = of_get_named_gpio_flags(np, "select", 0, &of_flags);
if (gpio_is_valid(pd->select)) {
char *name;
@@ -441,6 +441,3 @@ static struct driver_d eeprom_93xx46_driver = {
.of_compatible = DRV_OF_COMPAT(eeprom_93xx46_of_table),
};
device_spi_driver(eeprom_93xx46_driver);
-
-
-
diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
index 9b54e44674..cee4597195 100644
--- a/drivers/of/of_net.c
+++ b/drivers/of/of_net.c
@@ -17,18 +17,28 @@
*/
static const char *phy_modes[] = {
[PHY_INTERFACE_MODE_NA] = "",
+ [PHY_INTERFACE_MODE_INTERNAL] = "internal",
[PHY_INTERFACE_MODE_MII] = "mii",
[PHY_INTERFACE_MODE_GMII] = "gmii",
[PHY_INTERFACE_MODE_SGMII] = "sgmii",
[PHY_INTERFACE_MODE_TBI] = "tbi",
+ [PHY_INTERFACE_MODE_REVMII] = "rev-mii",
[PHY_INTERFACE_MODE_RMII] = "rmii",
[PHY_INTERFACE_MODE_RGMII] = "rgmii",
[PHY_INTERFACE_MODE_RGMII_ID] = "rgmii-id",
[PHY_INTERFACE_MODE_RGMII_RXID] = "rgmii-rxid",
- [PHY_INTERFACE_MODE_RGMII_TXID] = "rgmii-txid",
+ [PHY_INTERFACE_MODE_RGMII_TXID] = "rgmii-txid",
[PHY_INTERFACE_MODE_RTBI] = "rtbi",
[PHY_INTERFACE_MODE_SMII] = "smii",
+ [PHY_INTERFACE_MODE_XGMII] = "xgmii",
+ [PHY_INTERFACE_MODE_MOCA] = "moca",
[PHY_INTERFACE_MODE_QSGMII] = "qsgmii",
+ [PHY_INTERFACE_MODE_TRGMII] = "trgmii",
+ [PHY_INTERFACE_MODE_1000BASEX] = "1000base-x",
+ [PHY_INTERFACE_MODE_2500BASEX] = "2500base-x",
+ [PHY_INTERFACE_MODE_RXAUI] = "rxaui",
+ [PHY_INTERFACE_MODE_XAUI] = "xaui",
+ [PHY_INTERFACE_MODE_10GKR] = "10gbase-kr",
};
/**
diff --git a/drivers/pci/pcie-designware-host.c b/drivers/pci/pcie-designware-host.c
index dc38cdc8f6..63ce3696d1 100644
--- a/drivers/pci/pcie-designware-host.c
+++ b/drivers/pci/pcie-designware-host.c
@@ -391,7 +391,7 @@ void dw_pcie_setup_rc(struct pcie_port *pp)
pci->iatu_unroll_enabled = dw_pcie_iatu_unroll_enabled(pci);
dev_dbg(pci->dev, "iATU unroll: %s\n",
pci->iatu_unroll_enabled ? "enabled" : "disabled");
-
+
dw_pcie_prog_outbound_atu(pci, PCIE_ATU_REGION_INDEX0,
PCIE_ATU_TYPE_MEM, pp->mem_mod_base,
pp->mem_bus_addr, pp->mem_size);
diff --git a/fs/cramfs/cramfs.c b/fs/cramfs/cramfs.c
index 3cc0fa787c..99cbdb920c 100644
--- a/fs/cramfs/cramfs.c
+++ b/fs/cramfs/cramfs.c
@@ -329,7 +329,7 @@ static struct inode *cramfs_alloc_inode(struct super_block *sb)
struct cramfs_inode_info *info;
info = xzalloc(sizeof(*info));
-
+
return &info->i_inode;
}
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 5b2c63ff69..5081ebacb3 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -43,10 +43,12 @@
/* Interface Mode definitions */
typedef enum {
PHY_INTERFACE_MODE_NA,
+ PHY_INTERFACE_MODE_INTERNAL,
PHY_INTERFACE_MODE_MII,
PHY_INTERFACE_MODE_GMII,
PHY_INTERFACE_MODE_SGMII,
PHY_INTERFACE_MODE_TBI,
+ PHY_INTERFACE_MODE_REVMII,
PHY_INTERFACE_MODE_RMII,
PHY_INTERFACE_MODE_RGMII,
PHY_INTERFACE_MODE_RGMII_ID,
@@ -55,6 +57,7 @@ typedef enum {
PHY_INTERFACE_MODE_RTBI,
PHY_INTERFACE_MODE_SMII,
PHY_INTERFACE_MODE_XGMII,
+ PHY_INTERFACE_MODE_MOCA,
PHY_INTERFACE_MODE_QSGMII,
PHY_INTERFACE_MODE_TRGMII,
PHY_INTERFACE_MODE_1000BASEX,
diff --git a/include/linux/types.h b/include/linux/types.h
index ed3a5b6e81..c19d1dc053 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -15,6 +15,7 @@ typedef __kernel_fd_set fd_set;
typedef __kernel_dev_t dev_t;
typedef __kernel_ino_t ino_t;
typedef __kernel_mode_t mode_t;
+typedef unsigned short umode_t;
typedef __kernel_off_t off_t;
typedef __kernel_pid_t pid_t;
typedef __kernel_daddr_t daddr_t;
diff --git a/include/mtd/mtd-peb.h b/include/mtd/mtd-peb.h
index e4fd01df90..23f89d89a8 100644
--- a/include/mtd/mtd-peb.h
+++ b/include/mtd/mtd-peb.h
@@ -12,6 +12,7 @@ int mtd_peb_torture(struct mtd_info *mtd, int pnum);
int mtd_peb_erase(struct mtd_info *mtd, int pnum);
int mtd_peb_mark_bad(struct mtd_info *mtd, int pnum);
int mtd_peb_is_bad(struct mtd_info *mtd, int pnum);
+int mtd_skip_bad(struct mtd_info *mtd, int *pnum);
int mtd_peb_check_all_ff(struct mtd_info *mtd, int pnum, int offset, int len,
int warn);
int mtd_peb_verify(struct mtd_info *mtd, const void *buf, int pnum,
diff --git a/lib/image-sparse.c b/lib/image-sparse.c
index 7137d15fd0..0c31742ab6 100644
--- a/lib/image-sparse.c
+++ b/lib/image-sparse.c
@@ -60,7 +60,7 @@ struct sparse_image_ctx {
uint32_t fill_val;
};
-int sparse_seek(struct sparse_image_ctx *si)
+static int sparse_seek(struct sparse_image_ctx *si)
{
unsigned int chunk_data_sz, payload;
loff_t offs;
diff --git a/lib/readline.c b/lib/readline.c
index 904a776394..d026af1104 100644
--- a/lib/readline.c
+++ b/lib/readline.c
@@ -290,6 +290,7 @@ int readline(const char *prompt, char *buf, int len)
insert = !insert;
break;
case BB_KEY_ERASE_LINE:
+ case CTL_CH('u'):
BEGINNING_OF_LINE();
ERASE_TO_EOL();
break;
diff --git a/lib/strtox.c b/lib/strtox.c
index 4b601a1b39..a5b770c8ca 100644
--- a/lib/strtox.c
+++ b/lib/strtox.c
@@ -1,38 +1,56 @@
#include <common.h>
#include <linux/ctype.h>
-unsigned long simple_strtoul(const char *cp, char **endp, unsigned int base)
+#include "kstrtox.h"
+
+/**
+ * simple_strtoull - convert a string to an unsigned long long
+ * @cp: The start of the string
+ * @endp: A pointer to the end of the parsed string will be placed here
+ * @base: The number base to use
+ *
+ * This function is obsolete. Please use kstrtoull instead.
+ */
+unsigned long long simple_strtoull(const char *cp, char **endp,
+ unsigned int base)
{
- unsigned long result = 0, value;
-
- if (*cp == '0') {
- cp++;
-
- if ((*cp == 'x') && isxdigit(cp[1])) {
- base = 16;
- cp++;
- }
-
- if (!base)
- base = 8;
- }
+ unsigned long long result;
+ unsigned int rv;
- if (!base)
- base = 10;
-
- while (isxdigit(*cp) && (value = isdigit(*cp) ?
- *cp - '0' : toupper(*cp) - 'A' + 10) < base) {
- result = result * base + value;
- cp++;
- }
+ cp = _parse_integer_fixup_radix(cp, &base);
+ rv = _parse_integer(cp, base, &result);
+ /* FIXME */
+ cp += (rv & ~KSTRTOX_OVERFLOW);
if (endp)
*endp = (char *)cp;
return result;
}
+EXPORT_SYMBOL(simple_strtoull);
+
+/**
+ * simple_strtoul - convert a string to an unsigned long
+ * @cp: The start of the string
+ * @endp: A pointer to the end of the parsed string will be placed here
+ * @base: The number base to use
+ *
+ * This function is obsolete. Please use kstrtoul instead.
+ */
+unsigned long simple_strtoul(const char *cp, char **endp, unsigned int base)
+{
+ return simple_strtoull(cp, endp, base);
+}
EXPORT_SYMBOL(simple_strtoul);
+/**
+ * simple_strtol - convert a string to a signed long
+ * @cp: The start of the string
+ * @endp: A pointer to the end of the parsed string will be placed here
+ * @base: The number base to use
+ *
+ * This function is obsolete. Please use kstrtol instead.
+ */
long simple_strtol(const char *cp, char **endp, unsigned int base)
{
if (*cp == '-')
@@ -42,38 +60,14 @@ long simple_strtol(const char *cp, char **endp, unsigned int base)
}
EXPORT_SYMBOL(simple_strtol);
-unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base)
-{
- unsigned long long result = 0, value;
-
- if (*cp == '0') {
- cp++;
-
- if ((*cp == 'x') && isxdigit(cp[1])) {
- base = 16;
- cp++;
- }
-
- if (!base)
- base = 8;
- }
-
- if (!base)
- base = 10;
-
- while (isxdigit(*cp) && (value = isdigit(*cp) ?
- *cp - '0' : toupper(*cp) - 'A' + 10) < base) {
- result = result * base + value;
- cp++;
- }
-
- if (endp)
- *endp = (char *)cp;
-
- return result;
-}
-EXPORT_SYMBOL(simple_strtoull);
-
+/**
+ * simple_strtoll - convert a string to a signed long long
+ * @cp: The start of the string
+ * @endp: A pointer to the end of the parsed string will be placed here
+ * @base: The number base to use
+ *
+ * This function is obsolete. Please use kstrtoll instead.
+ */
long long simple_strtoll(const char *cp, char **endp, unsigned int base)
{
if (*cp == '-')
diff --git a/lib/unlink-recursive.c b/lib/unlink-recursive.c
index 434fdc791b..f28c6dae5b 100644
--- a/lib/unlink-recursive.c
+++ b/lib/unlink-recursive.c
@@ -6,50 +6,37 @@
static char unlink_recursive_failedpath[PATH_MAX];
-struct data {
- int error;
-};
-
static int file_action(const char *filename, struct stat *statbuf,
void *userdata, int depth)
{
- struct data *data = userdata;
- int ret;
-
- ret = unlink(filename);
- if (ret) {
+ if (unlink(filename)) {
strcpy(unlink_recursive_failedpath, filename);
- data->error = ret;
+ return 0;
}
- return ret ? 0 : 1;
+ return 1;
}
static int dir_action(const char *dirname, struct stat *statbuf,
void *userdata, int depth)
{
- struct data *data = userdata;
- int ret;
-
- ret = rmdir(dirname);
- if (ret) {
+ if (rmdir(dirname)) {
strcpy(unlink_recursive_failedpath, dirname);
- data->error = ret;
+ return 0;
}
- return ret ? 0 : 1;
+ return 1;
}
int unlink_recursive(const char *path, char **failedpath)
{
- struct data data = {};
int ret;
if (failedpath)
*failedpath = NULL;
ret = recursive_action(path, ACTION_RECURSE | ACTION_DEPTHFIRST,
- file_action, dir_action, &data, 0);
+ file_action, dir_action, NULL, 0);
if (!ret && failedpath)
*failedpath = unlink_recursive_failedpath;
diff --git a/scripts/gen-dtb-s b/scripts/gen-dtb-s
index 4215461edb..2b44ffb361 100755
--- a/scripts/gen-dtb-s
+++ b/scripts/gen-dtb-s
@@ -25,7 +25,7 @@ if [ "$imd" = "y" ]; then
if [ "$compat" != "notfound" ]; then
compatlen=$($FDTGET -t s "$dtb" / compatible | wc -c)
- le32 0x640c8005
+ le32 0x640c8005 # IMD_TYPE_OF_COMPATIBLE
le32 $compatlen
echo ".byte " $compat
echo ".balign 4"
@@ -35,7 +35,7 @@ if [ "$imd" = "y" ]; then
if [ "$model" != "notfound" ]; then
modellen=$($FDTGET -t s "$dtb" / model | wc -c)
- le32 0x640c8004
+ le32 0x640c8004 # IMD_TYPE_MODEL
le32 $modellen
echo ".byte " $model
echo ".balign 4"
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index 36f578415c..0ac700bf12 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -640,7 +640,7 @@ on_set_option_mode3_activate(GtkMenuItem *menuitem, gpointer user_data)
void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data)
{
GtkWidget *dialog;
- const gchar *intro_text =
+ const gchar *intro_text =
"Welcome to gkc, the GTK+ graphical configuration tool\n"
"For each option, a blank box indicates the feature is disabled, a\n"
"check indicates it is enabled, and a dot indicates that it is to\n"
diff --git a/scripts/kconfig/zconf.hash.c b/scripts/kconfig/zconf.hash.c
deleted file mode 100644
index c77a8eff1e..0000000000
--- a/scripts/kconfig/zconf.hash.c
+++ /dev/null
@@ -1,289 +0,0 @@
-/* ANSI-C code produced by gperf version 3.0.4 */
-/* Command-line: gperf -t --output-file scripts/kconfig/zconf.hash.c_shipped -a -C -E -g -k '1,3,$' -p -t scripts/kconfig/zconf.gperf */
-
-#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
- && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
- && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
- && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
- && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
- && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
- && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
- && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
- && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
- && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
- && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
- && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
- && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
- && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
- && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
- && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
- && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
- && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
- && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
- && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
- && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
- && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
- && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
-/* The character set is not based on ISO-646. */
-#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
-#endif
-
-#line 10 "scripts/kconfig/zconf.gperf"
-struct kconf_id;
-
-static const struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
-/* maximum key range = 71, duplicates = 0 */
-
-#ifdef __GNUC__
-__inline
-#else
-#ifdef __cplusplus
-inline
-#endif
-#endif
-static unsigned int
-kconf_id_hash (register const char *str, register unsigned int len)
-{
- static const unsigned char asso_values[] =
- {
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 5, 25, 25,
- 0, 0, 0, 5, 0, 0, 73, 73, 5, 0,
- 10, 5, 45, 73, 20, 20, 0, 15, 15, 73,
- 20, 5, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
- 73, 73, 73, 73, 73, 73
- };
- register int hval = len;
-
- switch (hval)
- {
- default:
- hval += asso_values[(unsigned char)str[2]];
- /*FALLTHROUGH*/
- case 2:
- case 1:
- hval += asso_values[(unsigned char)str[0]];
- break;
- }
- return hval + asso_values[(unsigned char)str[len - 1]];
-}
-
-struct kconf_id_strings_t
- {
- char kconf_id_strings_str2[sizeof("if")];
- char kconf_id_strings_str3[sizeof("int")];
- char kconf_id_strings_str5[sizeof("endif")];
- char kconf_id_strings_str7[sizeof("default")];
- char kconf_id_strings_str8[sizeof("tristate")];
- char kconf_id_strings_str9[sizeof("endchoice")];
- char kconf_id_strings_str12[sizeof("def_tristate")];
- char kconf_id_strings_str13[sizeof("def_bool")];
- char kconf_id_strings_str14[sizeof("defconfig_list")];
- char kconf_id_strings_str17[sizeof("on")];
- char kconf_id_strings_str18[sizeof("optional")];
- char kconf_id_strings_str21[sizeof("option")];
- char kconf_id_strings_str22[sizeof("endmenu")];
- char kconf_id_strings_str23[sizeof("mainmenu")];
- char kconf_id_strings_str25[sizeof("menuconfig")];
- char kconf_id_strings_str27[sizeof("modules")];
- char kconf_id_strings_str28[sizeof("allnoconfig_y")];
- char kconf_id_strings_str29[sizeof("menu")];
- char kconf_id_strings_str31[sizeof("select")];
- char kconf_id_strings_str32[sizeof("comment")];
- char kconf_id_strings_str33[sizeof("env")];
- char kconf_id_strings_str35[sizeof("range")];
- char kconf_id_strings_str36[sizeof("choice")];
- char kconf_id_strings_str39[sizeof("bool")];
- char kconf_id_strings_str41[sizeof("source")];
- char kconf_id_strings_str42[sizeof("visible")];
- char kconf_id_strings_str43[sizeof("hex")];
- char kconf_id_strings_str46[sizeof("config")];
- char kconf_id_strings_str47[sizeof("boolean")];
- char kconf_id_strings_str51[sizeof("string")];
- char kconf_id_strings_str54[sizeof("help")];
- char kconf_id_strings_str56[sizeof("prompt")];
- char kconf_id_strings_str72[sizeof("depends")];
- };
-static const struct kconf_id_strings_t kconf_id_strings_contents =
- {
- "if",
- "int",
- "endif",
- "default",
- "tristate",
- "endchoice",
- "def_tristate",
- "def_bool",
- "defconfig_list",
- "on",
- "optional",
- "option",
- "endmenu",
- "mainmenu",
- "menuconfig",
- "modules",
- "allnoconfig_y",
- "menu",
- "select",
- "comment",
- "env",
- "range",
- "choice",
- "bool",
- "source",
- "visible",
- "hex",
- "config",
- "boolean",
- "string",
- "help",
- "prompt",
- "depends"
- };
-#define kconf_id_strings ((const char *) &kconf_id_strings_contents)
-#ifdef __GNUC__
-__inline
-#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
-__attribute__ ((__gnu_inline__))
-#endif
-#endif
-const struct kconf_id *
-kconf_id_lookup (register const char *str, register unsigned int len)
-{
- enum
- {
- TOTAL_KEYWORDS = 33,
- MIN_WORD_LENGTH = 2,
- MAX_WORD_LENGTH = 14,
- MIN_HASH_VALUE = 2,
- MAX_HASH_VALUE = 72
- };
-
- static const struct kconf_id wordlist[] =
- {
- {-1}, {-1},
-#line 25 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_IF, TF_COMMAND|TF_PARAM},
-#line 36 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_TYPE, TF_COMMAND, S_INT},
- {-1},
-#line 26 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str5, T_ENDIF, TF_COMMAND},
- {-1},
-#line 29 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_DEFAULT, TF_COMMAND, S_UNKNOWN},
-#line 31 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_TYPE, TF_COMMAND, S_TRISTATE},
-#line 20 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str9, T_ENDCHOICE, TF_COMMAND},
- {-1}, {-1},
-#line 32 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_TRISTATE},
-#line 35 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN},
-#line 45 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_OPT_DEFCONFIG_LIST,TF_OPTION},
- {-1}, {-1},
-#line 43 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_ON, TF_PARAM},
-#line 28 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_OPTIONAL, TF_COMMAND},
- {-1}, {-1},
-#line 42 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_OPTION, TF_COMMAND},
-#line 17 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ENDMENU, TF_COMMAND},
-#line 15 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_MAINMENU, TF_COMMAND},
- {-1},
-#line 23 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str25, T_MENUCONFIG, TF_COMMAND},
- {-1},
-#line 44 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION},
-#line 47 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_OPT_ALLNOCONFIG_Y,TF_OPTION},
-#line 16 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND},
- {-1},
-#line 39 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_SELECT, TF_COMMAND},
-#line 21 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND},
-#line 46 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_OPT_ENV, TF_OPTION},
- {-1},
-#line 40 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_RANGE, TF_COMMAND},
-#line 19 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_CHOICE, TF_COMMAND},
- {-1}, {-1},
-#line 33 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str39, T_TYPE, TF_COMMAND, S_BOOLEAN},
- {-1},
-#line 18 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_SOURCE, TF_COMMAND},
-#line 41 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_VISIBLE, TF_COMMAND},
-#line 37 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str43, T_TYPE, TF_COMMAND, S_HEX},
- {-1}, {-1},
-#line 22 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_CONFIG, TF_COMMAND},
-#line 34 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str47, T_TYPE, TF_COMMAND, S_BOOLEAN},
- {-1}, {-1}, {-1},
-#line 38 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51, T_TYPE, TF_COMMAND, S_STRING},
- {-1}, {-1},
-#line 24 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str54, T_HELP, TF_COMMAND},
- {-1},
-#line 30 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str56, T_PROMPT, TF_COMMAND},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
-#line 27 "scripts/kconfig/zconf.gperf"
- {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str72, T_DEPENDS, TF_COMMAND}
- };
-
- if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
- {
- register int key = kconf_id_hash (str, len);
-
- if (key <= MAX_HASH_VALUE && key >= 0)
- {
- register int o = wordlist[key].name;
- if (o >= 0)
- {
- register const char *s = o + kconf_id_strings;
-
- if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
- return &wordlist[key];
- }
- }
- }
- return 0;
-}
-#line 48 "scripts/kconfig/zconf.gperf"
-
diff --git a/scripts/socfpga_mkimage.c b/scripts/socfpga_mkimage.c
index fedcfb5b6f..03150cce8d 100644
--- a/scripts/socfpga_mkimage.c
+++ b/scripts/socfpga_mkimage.c
@@ -157,7 +157,7 @@ uint32_t crc32(uint32_t crc, void *_buf, int length)
return crc;
}
-/* Create an ARM relative branch instuction
+/* Create an ARM relative branch instuction
* branch is where the instruction will be placed and dest points to where
* it should branch too. */
static void branch(uint8_t *branch, uint8_t *dest)