diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-05-06 09:30:28 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-05-06 09:30:28 +0200 |
commit | c8af035b4176af0e8da2cdd2d10109b56e06444e (patch) | |
tree | 5e1e6feff42470e7c167c89ee07b7e8b1c37f81b | |
parent | 3cdd18632e72cbb8b0402df3e4821dfd7d24643b (diff) | |
parent | 9e809ef4317cf96a477342a09b8c205a49e44554 (diff) | |
download | barebox-c8af035b4176af0e8da2cdd2d10109b56e06444e.tar.gz barebox-c8af035b4176af0e8da2cdd2d10109b56e06444e.tar.xz |
Merge branch 'for-next/misc'
39 files changed, 221 insertions, 98 deletions
@@ -667,9 +667,6 @@ define rule_barebox-modpost $(Q)echo 'cmd_$@ := $(cmd_barebox-modpost)' > $(dot-target).cmd endef -quiet_cmd_objcopy = OBJCOPY $@ - cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ - OBJCOPYFLAGS_barebox.bin = -O binary barebox.bin: barebox FORCE diff --git a/arch/arm/boards/highbank/env/boot.d/010-ahci-boot b/arch/arm/boards/highbank/env/boot.d/010-ahci-boot new file mode 120000 index 0000000000..3672f0495e --- /dev/null +++ b/arch/arm/boards/highbank/env/boot.d/010-ahci-boot @@ -0,0 +1 @@ +../boot/ahci-boot
\ No newline at end of file diff --git a/arch/arm/boards/highbank/env/boot.d/011-ahci b/arch/arm/boards/highbank/env/boot.d/011-ahci new file mode 120000 index 0000000000..36b3b2815b --- /dev/null +++ b/arch/arm/boards/highbank/env/boot.d/011-ahci @@ -0,0 +1 @@ +../boot/ahci
\ No newline at end of file diff --git a/arch/arm/boards/highbank/env/boot.d/020-mmc-boot b/arch/arm/boards/highbank/env/boot.d/020-mmc-boot new file mode 120000 index 0000000000..85c19bbd66 --- /dev/null +++ b/arch/arm/boards/highbank/env/boot.d/020-mmc-boot @@ -0,0 +1 @@ +../boot/mmc-boot
\ No newline at end of file diff --git a/arch/arm/boards/highbank/env/boot.d/021-mmc b/arch/arm/boards/highbank/env/boot.d/021-mmc new file mode 120000 index 0000000000..5af95d0ac7 --- /dev/null +++ b/arch/arm/boards/highbank/env/boot.d/021-mmc @@ -0,0 +1 @@ +../boot/mmc
\ No newline at end of file diff --git a/arch/arm/boards/highbank/env/boot.d/030-net b/arch/arm/boards/highbank/env/boot.d/030-net new file mode 120000 index 0000000000..70b8ea3965 --- /dev/null +++ b/arch/arm/boards/highbank/env/boot.d/030-net @@ -0,0 +1 @@ +../boot/net
\ No newline at end of file diff --git a/arch/arm/boards/highbank/env/boot.d/031-net-eth1 b/arch/arm/boards/highbank/env/boot.d/031-net-eth1 new file mode 120000 index 0000000000..5a30a308c7 --- /dev/null +++ b/arch/arm/boards/highbank/env/boot.d/031-net-eth1 @@ -0,0 +1 @@ +../boot/net-eth1
\ No newline at end of file diff --git a/arch/arm/boards/highbank/env/boot/ahci b/arch/arm/boards/highbank/env/boot/ahci new file mode 100644 index 0000000000..3bdb809932 --- /dev/null +++ b/arch/arm/boards/highbank/env/boot/ahci @@ -0,0 +1,21 @@ +#!/bin/sh + +if [ "$1" = menu ]; then + boot-menu-add-entry "$0" "AHCI" + exit +fi + +path="/mnt/ahci" + +global.bootm.image="${path}/zImage" + +. /env/data/oftree + +oftree=${path}/oftree +if [ -f $oftree ]; then + global.bootm.oftree="$oftree" +fi + +# The rootdevice may actually be mmcblk1p2 if a card +# is inserted to the back MMC slot +global.linux.bootargs.dyn.root="root=/dev/sda2" diff --git a/arch/arm/boards/highbank/env/boot/ahci-boot b/arch/arm/boards/highbank/env/boot/ahci-boot new file mode 100644 index 0000000000..0064a46fcc --- /dev/null +++ b/arch/arm/boards/highbank/env/boot/ahci-boot @@ -0,0 +1,21 @@ +#!/bin/sh + +if [ "$1" = menu ]; then + boot-menu-add-entry "$0" "AHCI (UEFI boot partiton)" + exit +fi + +path="/mnt/ahci-boot" + +global.bootm.image="${path}/zImage" + +. /env/data/oftree + +oftree=${path}/oftree +if [ -f $oftree ]; then + global.bootm.oftree="$oftree" +fi + +# The rootdevice may actually be mmcblk1p2 if a card +# is inserted to the back MMC slot +global.linux.bootargs.dyn.root="root=/dev/sda2" diff --git a/arch/arm/boards/highbank/env/boot/mmc b/arch/arm/boards/highbank/env/boot/mmc new file mode 100644 index 0000000000..43a04b5d6b --- /dev/null +++ b/arch/arm/boards/highbank/env/boot/mmc @@ -0,0 +1,21 @@ +#!/bin/sh + +if [ "$1" = menu ]; then + boot-menu-add-entry "$0" "MMC slot" + exit +fi + +path="/mnt/mmc" + +global.bootm.image="${path}/zimage" + +. /env/data/oftree + +oftree=${path}/oftree +if [ -f $oftree ]; then + global.bootm.oftree="$oftree" +fi + +# The rootdevice may actually be mmcblk1p2 if a card +# is inserted to the back MMC slot +global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2" diff --git a/arch/arm/boards/highbank/env/boot/mmc-boot b/arch/arm/boards/highbank/env/boot/mmc-boot new file mode 100644 index 0000000000..93cd99b684 --- /dev/null +++ b/arch/arm/boards/highbank/env/boot/mmc-boot @@ -0,0 +1,21 @@ +#!/bin/sh + +if [ "$1" = menu ]; then + boot-menu-add-entry "$0" "MMC slot (UEFI boot partiton)" + exit +fi + +path="/mnt/mmc-boot" + +global.bootm.image="${path}/zimage" + +. /env/data/oftree + +oftree=${path}/oftree +if [ -f $oftree ]; then + global.bootm.oftree="$oftree" +fi + +# The rootdevice may actually be mmcblk1p2 if a card +# is inserted to the back MMC slot +global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2" diff --git a/arch/arm/boards/highbank/env/boot/net b/arch/arm/boards/highbank/env/boot/net new file mode 100644 index 0000000000..80862cdac1 --- /dev/null +++ b/arch/arm/boards/highbank/env/boot/net @@ -0,0 +1,18 @@ +#!/bin/sh + +if [ "$1" = menu ]; then + boot-menu-add-entry "$0" "network (tftp, nfs) (eth0)" + exit +fi + +ethact eth0 + +path="/mnt/tftp" + +. /env/data/oftree + +global.bootm.image="${path}/${global.user}-linux-${global.hostname}" +#global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}" +nfsroot="/home/${global.user}/nfsroot/${global.hostname}" +bootargs-ip +global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp" diff --git a/arch/arm/boards/highbank/env/boot/net-eth1 b/arch/arm/boards/highbank/env/boot/net-eth1 new file mode 100644 index 0000000000..d9e9804a02 --- /dev/null +++ b/arch/arm/boards/highbank/env/boot/net-eth1 @@ -0,0 +1,18 @@ +#!/bin/sh + +if [ "$1" = menu ]; then + boot-menu-add-entry "$0" "network (tftp, nfs) (eth1)" + exit +fi + +ethact eth1 + +path="/mnt/tftp" + +. /env/data/oftree + +global.bootm.image="${path}/${global.user}-linux-${global.hostname}" +#global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}" +nfsroot="/home/${global.user}/nfsroot/${global.hostname}" +bootargs-ip +global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp" diff --git a/arch/arm/boards/highbank/env/config b/arch/arm/boards/highbank/env/config deleted file mode 100644 index 1bb2c493b2..0000000000 --- a/arch/arm/boards/highbank/env/config +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp -global.dhcp.vendor_id=barebox-highbank - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp' or 'nor' -kernel_loc=tftp -# can be either 'net', 'nor' or 'initrd' -rootfs_loc=initrd - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type - -kernelimage=zImage -#kernelimage=uImage -#kernelimage=Image -#kernelimage=Image.lzo - -autoboot_timeout=3 - -bootargs="console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;31m[barebox@\h]:\w\e[0m\n# " diff --git a/arch/arm/boards/highbank/env/config-board b/arch/arm/boards/highbank/env/config-board new file mode 100644 index 0000000000..a64d9e3245 --- /dev/null +++ b/arch/arm/boards/highbank/env/config-board @@ -0,0 +1,11 @@ +#!/bin/sh + +# board defaults, do not change in running system. Change /env/config +# instead + +global.hostname=highbank +global.allow_color=true +global.autoboot_timeout=3 +global.bootm.oftree="/dev/dtb" +global.linux.bootargs.base="console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0" +global.boot.default=/env/boot.d diff --git a/arch/arm/boards/highbank/env/data/oftree b/arch/arm/boards/highbank/env/data/oftree new file mode 100644 index 0000000000..9a94b310c3 --- /dev/null +++ b/arch/arm/boards/highbank/env/data/oftree @@ -0,0 +1,4 @@ +#!/bin/sh + +#device tree provided by the firmware +global.bootm.oftree="/dev/dtb" diff --git a/arch/arm/boards/highbank/env/bin/init_board b/arch/arm/boards/highbank/env/init/001-dtb-probe index 610db1500e..610db1500e 100644 --- a/arch/arm/boards/highbank/env/bin/init_board +++ b/arch/arm/boards/highbank/env/init/001-dtb-probe diff --git a/arch/arm/boards/highbank/env/init/automount b/arch/arm/boards/highbank/env/init/automount new file mode 100644 index 0000000000..2c283c6eed --- /dev/null +++ b/arch/arm/boards/highbank/env/init/automount @@ -0,0 +1,27 @@ +#!/bin/sh + +if [ "$1" = menu ]; then + init-menu-add-entry "$0" "Automountpoints" + exit +fi + +# automount tftp server based on $eth0.serverip + +mkdir -p /mnt/tftp +automount /mnt/tftp 'ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp' + +# SD card slot, boot partition +mkdir -p /mnt/mmc-boot +automount -d /mnt/mmc 'mount /dev/disk0.boot /mnt/mmc-boot' + +# SD card slot, first partition +mkdir -p /mnt/mmc +automount -d /mnt/mmc 'mount /dev/disk0.0 /mnt/mmc' + +# AHCI, boot partition +mkdir -p /mnt/ahci-boot +automount -d /mnt/ahci 'mount /dev/ata0.boot /mnt/ahci-boot' + +# AHCI, first partition +mkdir -p /mnt/ahci +automount -d /mnt/ahci 'mount /dev/ata0.0 /mnt/ahci' diff --git a/arch/arm/boards/highbank/env/init/ps1 b/arch/arm/boards/highbank/env/init/ps1 new file mode 100644 index 0000000000..a94acc14f8 --- /dev/null +++ b/arch/arm/boards/highbank/env/init/ps1 @@ -0,0 +1,9 @@ +#!/bin/sh + +/env/config + +if [ ${global.allow_color} = "true" ]; then + export PS1="\e[1;32mbarebox@\e[1;36m\h:\w\e[0m\n# " +else + export PS1="barebox@\h:\w\n# " +fi diff --git a/arch/arm/configs/phycard_a_l1_defconfig b/arch/arm/configs/phycard_a_l1_defconfig index d90a333e0a..fabaa2d688 100644 --- a/arch/arm/configs/phycard_a_l1_defconfig +++ b/arch/arm/configs/phycard_a_l1_defconfig @@ -7,7 +7,6 @@ CONFIG_CPU_V7=y CONFIG_CPU_32v7=y CONFIG_BOARDINFO="Phytec phyCARD-A-L1" CONFIG_ARCH_OMAP3=y -CONFIG_OMAP_CLOCK_ALL=y CONFIG_OMAP_CLOCK_SOURCE_S32K=y CONFIG_OMAP3_CLOCK_CONFIG=y CONFIG_OMAP3_COPY_CLOCK_SRAM=n diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index 34fe5c3515..e3ea3b6b9e 100644 --- a/arch/arm/cpu/mmu.c +++ b/arch/arm/cpu/mmu.c @@ -189,7 +189,7 @@ static int arm_mmu_remap_sdram(struct memory_bank *bank) ptes, ttb_start, ttb_end); for (i = 0; i < num_ptes; i++) { - ptes[i] = (phys + i * 4096) | PTE_TYPE_SMALL | + ptes[i] = (phys + i * PAGE_SIZE) | PTE_TYPE_SMALL | pte_flags_cached; } @@ -300,7 +300,7 @@ static int mmu_init(void) asm volatile ("mcr p15,0,%0,c3,c0,0" : : "r"(i) /*:*/); /* create a flat mapping using 1MiB sections */ - create_sections(0, 0, 4096, PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | + create_sections(0, 0, PAGE_SIZE, PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT); vectors_init(); @@ -332,7 +332,7 @@ void *dma_alloc_coherent(size_t size) void *ret; size = PAGE_ALIGN(size); - ret = xmemalign(4096, size); + ret = xmemalign(PAGE_SIZE, size); dma_inv_range((unsigned long)ret, (unsigned long)ret + size); @@ -353,6 +353,7 @@ void *phys_to_virt(unsigned long phys) void dma_free_coherent(void *mem, size_t size) { + size = PAGE_ALIGN(size); remap_range(mem, size, pte_flags_cached); free(mem); diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c index c2618c7b56..0e39a526d2 100644 --- a/arch/arm/mach-at91/gpio.c +++ b/arch/arm/mach-at91/gpio.c @@ -185,10 +185,10 @@ static struct at91_pinctrl_mux_ops at91sam9x5_ops = { int at91_mux_pin(unsigned pin, enum at91_mux mux, int use_pullup) { struct at91_gpio_chip *at91_gpio = pin_to_controller(pin); - void __iomem *pio = at91_gpio->regbase; + void __iomem *pio; + struct device_d *dev; unsigned mask = pin_to_mask(pin); int bank = pin_to_bank(pin); - struct device_d *dev = at91_gpio->chip.dev; if (!at91_gpio) return -EINVAL; @@ -197,6 +197,7 @@ int at91_mux_pin(unsigned pin, enum at91_mux mux, int use_pullup) if (!pio) return -EINVAL; + dev = at91_gpio->chip.dev; at91_mux_disable_interrupt(pio, mask); pin %= MAX_NB_GPIO_PER_BANK; diff --git a/arch/arm/mach-at91/sam9_smc.c b/arch/arm/mach-at91/sam9_smc.c index b48275e07e..a137da4266 100644 --- a/arch/arm/mach-at91/sam9_smc.c +++ b/arch/arm/mach-at91/sam9_smc.c @@ -120,12 +120,12 @@ void sam9_smc_read(int id, int cs, struct sam9_smc_config *config) static int at91sam9_smc_probe(struct device_d *dev) { - int id; + int id = dev->id; - if (dev->id < 0) { + if (id < 0) { id = 0; - } else if (dev->id > 1) { - dev_warn(dev, ": id > 2\n"); + } else if (id > 1) { + dev_warn(dev, "id > 1\n"); return -EIO; } diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig index 47c6405eb1..9cfe53968b 100644 --- a/arch/arm/mach-highbank/Kconfig +++ b/arch/arm/mach-highbank/Kconfig @@ -12,6 +12,7 @@ choice config MACH_HIGHBANK bool "Calxeda Highbank" + select HAVE_DEFAULT_ENVIRONMENT_NEW endchoice diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 8ddec9d605..eee6acd04e 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -17,9 +17,9 @@ config ARCH_TEXT_BASE default 0x87f00000 if MACH_PCM043 default 0x08f80000 if MACH_SCB9328 default 0xa7e00000 if MACH_NESO - default 0x97f00000 if MACH_MX51_PDK - default 0x7ff00000 if MACH_MX53_LOCO - default 0x7ff00000 if MACH_MX53_SMD + default 0x97f00000 if MACH_FREESCALE_MX51_PDK + default 0x7ff00000 if MACH_FREESCALE_MX53_LOCO + default 0x7ff00000 if MACH_FREESCALE_MX53_SMD default 0x87f00000 if MACH_GUF_CUPID default 0x93d00000 if MACH_TX25 default 0x7ff00000 if MACH_TQMA53 diff --git a/arch/arm/mach-netx/Kconfig b/arch/arm/mach-netx/Kconfig index 8d8f49b85d..3c62d605a9 100644 --- a/arch/arm/mach-netx/Kconfig +++ b/arch/arm/mach-netx/Kconfig @@ -9,35 +9,19 @@ config BOARDINFO config NETX_SDRAM_CTRL hex - default 0x010D0001 if MACH_NXDKN default 0x010D0121 if MACH_NXDB500 - default 0x030D0111 if MACH_NXHMIBB - default 0x010D0111 if MACH_NXEB500HMI - default 0x030D0001 if MACH_NXHX config NETX_SDRAM_TIMING_CTRL hex - default 0x03C12151 if MACH_NXDKN default 0x03C13261 if MACH_NXDB500 - default 0x03C13251 if MACH_NXHMIBB - default 0x03C13251 if MACH_NXEB500HMI - default 0x03C23251 if MACH_NXHX config NETX_MEM_CTRL hex - default 0x0103030F if MACH_NXDKN default 0x0203030F if MACH_NXDB500 - default 0x0103030F if MACH_NXHMIBB - default 0x0103030F if MACH_NXEB500HMI - default 0x0103030F if MACH_NXHX config NETX_COOKIE hex - default 16 if MACH_NXDKN default 32 if MACH_NXDB500 - default 16 if MACH_NXHMIBB - default 16 if MACH_NXEB500HMI - default 16 if MACH_NXHX choice prompt "Netx Board Type" diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig index 42e5f4af07..0913d0e13b 100644 --- a/arch/arm/mach-omap/Kconfig +++ b/arch/arm/mach-omap/Kconfig @@ -134,7 +134,6 @@ config MACH_BEAGLE config MACH_BEAGLEBONE bool "Texas Instrument's Beagle Bone" - select OMAP_CLOCK_ALL depends on ARCH_AM33XX help Say Y here if you are using Beagle Bone @@ -179,7 +178,6 @@ config MACH_PCAAXL2 config MACH_PCM051 bool "Phytec phyCORE pcm051" - select OMAP_CLOCK_ALL select HAVE_DEFAULT_ENVIRONMENT_NEW depends on ARCH_AM33XX help diff --git a/arch/arm/mach-omap/omap3_clock.c b/arch/arm/mach-omap/omap3_clock.c index bcde48ff64..03aca492a1 100644 --- a/arch/arm/mach-omap/omap3_clock.c +++ b/arch/arm/mach-omap/omap3_clock.c @@ -652,12 +652,6 @@ void prcm_init(void) /** * @brief Enable the clks & power for perifs * - * GPT2 Sysclk, ICLK,FCLK, 32k Sync is enabled by default - * Uses CONFIG_OMAP_CLOCK_UART to enable UART clocks - * Uses CONFIG_OMAP_CLOCK_I2C to enable I2C clocks - * Uses CONFIG_OMAP_CLOCK_ALL to enable All Clocks! - * - Not a wise idea in most cases - * * @return void */ static void per_clocks_enable(void) diff --git a/commands/Kconfig b/commands/Kconfig index e6168cede2..6a759ce204 100644 --- a/commands/Kconfig +++ b/commands/Kconfig @@ -356,12 +356,12 @@ config CMD_MEMSET config CMD_CRC tristate select CRC32 - prompt "crc" + prompt "crc32" config CMD_CRC_CMP tristate depends on CMD_CRC - prompt "compare 2 files crc" + prompt "compare 2 files using crc32" config CMD_DIGEST tristate diff --git a/commands/bootm.c b/commands/bootm.c index e5dfc6ab3c..5dd1703538 100644 --- a/commands/bootm.c +++ b/commands/bootm.c @@ -127,9 +127,6 @@ static int bootm_open_initrd_uimage(struct image_data *data) data->initrd = data->os; } - if (data->initrd_address == UIMAGE_SOME_ADDRESS) - data->initrd_address = data->initrd->header.ih_load; - return 0; } @@ -256,7 +253,7 @@ static int do_bootm(int argc, char *argv[]) memset(&data, 0, sizeof(struct image_data)); - data.initrd_address = UIMAGE_SOME_ADDRESS; + data.initrd_address = UIMAGE_INVALID_ADDRESS; data.os_address = UIMAGE_SOME_ADDRESS; data.verify = 0; data.verbose = 0; @@ -408,8 +405,6 @@ static int do_bootm(int argc, char *argv[]) #endif if (data.os_address == UIMAGE_SOME_ADDRESS) data.os_address = UIMAGE_INVALID_ADDRESS; - if (data.initrd_address == UIMAGE_SOME_ADDRESS) - data.initrd_address = UIMAGE_INVALID_ADDRESS; handler = bootm_find_handler(os_type, &data); if (!handler) { diff --git a/commands/i2c.c b/commands/i2c.c index 8370b43dab..626255d612 100644 --- a/commands/i2c.c +++ b/commands/i2c.c @@ -45,7 +45,7 @@ static int do_i2c_probe(int argc, char *argv[]) if (stopaddr > 0x7F) stopaddr = 0x7F; - printf("probing i2c range 0X%02x - 0x%02x :\n", startaddr, stopaddr); + printf("probing i2c range 0x%02x - 0x%02x :\n", startaddr, stopaddr); for (addr = startaddr; addr <= stopaddr; addr++) { client.addr = addr; ret = i2c_write_reg(&client, 0x00, ®, 0); diff --git a/defaultenv-2/base/bin/init b/defaultenv-2/base/bin/init index 6a658d137c..ca02ba6427 100644 --- a/defaultenv-2/base/bin/init +++ b/defaultenv-2/base/bin/init @@ -16,12 +16,6 @@ global editcmd=sedit [ -e /env/config-board ] && /env/config-board /env/config -if [ -e /env/menu ]; then - echo -e -n "\nHit m for menu or any other key to stop autoboot: " -else - echo -e -n "\nHit any key to stop autoboot: " -fi - # allow to stop the boot before execute the /env/init/* # but without waiting timeout -s -a -v key 0 @@ -34,6 +28,12 @@ for i in /env/init/*; do . $i done +if [ -e /env/menu ]; then + echo -e -n "\nHit m for menu or any other key to stop autoboot: " +else + echo -e -n "\nHit any key to stop autoboot: " +fi + timeout -a $global.autoboot_timeout -v key autoboot="$?" diff --git a/defaultenv-2/base/boot/net b/defaultenv-2/base/boot/net index 90c25aa147..05bb728fa1 100644 --- a/defaultenv-2/base/boot/net +++ b/defaultenv-2/base/boot/net @@ -8,7 +8,12 @@ fi path="/mnt/tftp" global.bootm.image="${path}/${global.user}-linux-${global.hostname}" -#global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}" + +oftree="${path}/${global.user}-oftree-${global.hostname}" +if [ -f "${oftree}" ]; then + global.bootm.oftree="$oftree" +fi + nfsroot="/home/${global.user}/nfsroot/${global.hostname}" bootargs-ip global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp" diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index 42f2065a61..9830cc07a8 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig @@ -35,7 +35,6 @@ config DISK_ATA config DISK_AHCI bool "AHCI support" select DISK_ATA - select DISK_DRIVE config DISK_AHCI_IMX depends on ARCH_IMX diff --git a/drivers/mci/atmel_mci.c b/drivers/mci/atmel_mci.c index f032403109..c5fd306a9a 100644 --- a/drivers/mci/atmel_mci.c +++ b/drivers/mci/atmel_mci.c @@ -262,11 +262,13 @@ static int atmci_read_response(struct atmel_mci *host, unsigned int stat) { struct mci_cmd *cmd = host->cmd; int i; - u32 *resp = (u32 *)cmd->response; + u32 *resp; if (!cmd) return 0; + resp = (u32 *)cmd->response; + if (stat & (ATMCI_RTOE | ATMCI_DTOE)) { dev_err(host->hw_dev, "command/data timeout\n"); return -ETIMEDOUT; diff --git a/drivers/mci/imx.c b/drivers/mci/imx.c index 3d9bd0deb1..c98596434e 100644 --- a/drivers/mci/imx.c +++ b/drivers/mci/imx.c @@ -225,12 +225,13 @@ static int mxcmci_read_response(struct mxcmci_host *host, unsigned int stat) { struct mci_cmd *cmd = host->cmd; int i; - u32 a, b, c; - u32 *resp = (u32 *)cmd->response; + u32 a, b, c, *resp; if (!cmd) return 0; + resp = (u32 *)cmd->response; + if (stat & STATUS_TIME_OUT_RESP) { printf("CMD TIMEOUT\n"); return -ETIMEDOUT; diff --git a/drivers/mtd/nand/nand_imx_bbm.c b/drivers/mtd/nand/nand_imx_bbm.c index 03961a0fb3..135d74e664 100644 --- a/drivers/mtd/nand/nand_imx_bbm.c +++ b/drivers/mtd/nand/nand_imx_bbm.c @@ -91,7 +91,7 @@ static void *create_bbt(struct mtd_info *mtd) buf = malloc(mtd->writesize); if (!buf) { ret = -ENOMEM; - goto out; + goto out2; } numblocks = mtd->size >> (chip->bbt_erase_shift - 1); @@ -99,7 +99,7 @@ static void *create_bbt(struct mtd_info *mtd) for (i = 0; i < numblocks;) { ret = checkbad(mtd, from, buf); if (ret < 0) - goto out; + goto out1; if (ret) { bbt[i >> 3] |= 0x03 << (i & 0x6); @@ -112,8 +112,11 @@ static void *create_bbt(struct mtd_info *mtd) } return bbt; -out: + +out1: free(buf); +out2: + free(bbt); return ERR_PTR(ret); } diff --git a/include/usb/usb.h b/include/usb/usb.h index afccf706d7..b2700127f3 100644 --- a/include/usb/usb.h +++ b/include/usb/usb.h @@ -196,7 +196,6 @@ struct usb_driver { extern struct bus_type usb_bus_type; int usb_driver_register(struct usb_driver *); -int usb_driver_unregister(struct usb_driver *); struct usb_host { int (*init)(struct usb_host *); diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 0d94f982fa..e80926fa0b 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -209,7 +209,7 @@ our $typeTypedefs = qr{(?x: )}; our $logFunctions = qr{(?x: - printk| + printk|printf| pr_(debug|dbg|vdbg|devel|info|warning|err|notice|alert|crit|emerg|cont)| (dev|netdev|netif)_(printk|dbg|vdbg|info|warn|err|notice|alert|crit|emerg|WARN)| WARN| |