summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-04-01mtd: nand: do not scan BBT after scrub2014.10-toradex-nextMasahiro Yamada
Currently, "nand scrub" runs chip->scan_bbt at the end of nand_erase_opts() even if NAND_SKIP_BBTSCAN flag is set. It violates the intention of NAND_SKIP_BBTSCAN. Move NAND_SKIP_BBTSCAN flag check to nand_block_checkbad() so that chip->scan_bbt() is never run if NAND_SKIP_BBTSCAN is set. Also, unset NAND_BBT_SCANNED flag instead of running chip->scan_bbt() right after scrub. We can be lazier here because the BBT is scanned at the next call of nand_block_checkbad(). Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Scott Wood <scottwood@freescale.com>
2015-04-01mtd: nand: Mark the BBT as scanned prior to calling scan_bbt againMasahiro Yamada
Commit 35c204d8a9d0 (nand: reinstate lazy bad block scanning) broke NAND_BBT_USE_FLASH feature. Its git-log claimed that it reinstated the change as by commit fb49454b1b6c ("nand: reinstate lazy bad block scanning"), but it moved "chip->options |= NAND_BBT_SCANNED" below "chip->scan_bbt(mtd);". It causes recursion if scan_bbt does not find a flash based BBT and tries to write one, and the attempt to erase the BBT area causes a bad block check. Reinstate commit ff49ea8977b5 (NAND: Mark the BBT as scanned prior to calling scan_bbt.). Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Rostislav Lisovy <lisovy@merica.cz> Cc: Heiko Schocher <hs@denx.de> Cc: Scott Wood <scottwood@freescale.com>
2015-04-01mtd: nand: revive "nand scrub" commandMasahiro Yamada
Since commit ff94bc40af34 (mtd, ubi, ubifs: resync with Linux-3.14), the "nand scrub" command has not been working. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Scott Wood <scottwood@freescale.com> Cc: Heiko Schocher <hs@denx.de>
2015-04-01nand: reinstate lazy bad block scanningRostislav Lisovy
Commit ff94bc40af3481d47546595ba73c136de6af6929 ("mtd, ubi, ubifs: resync with Linux-3.14") accidentally reverted part of the commit 13f0fd94e3cae6f8a0d9fba5d367e311edc8ebde ("NAND: Scan bad blocks lazily."). Reinstate the change as by commit fb49454b1b6c7c6e238ac3c0b1e302e73eb1a1ea ("nand: reinstate lazy bad block scanning") Signed-off-by: Rostislav Lisovy <lisovy@merica.cz> Acked-by: Heiko Schocher <hs@denx.de>
2015-03-18colibri_vf: Enable GPIO support for Colibri VybridBhuvanchandra DV
Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
2015-03-18colibri_vf: Add pinmux entries for GPIOsBhuvanchandra DV
Inorder to use the pins as GPIO, apart from setting the alt-function, pinmuxing need to be done, this patch adds pinmux entries of few GPIOs. Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
2015-03-18gpio: vf610: Add gpio supportBhuvanchandra DV
Add GPIO support to Freescale VF610 Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
2015-03-18arm: vf610: fix boot from SD-cardStefan Agner
Boot from SD-card (and probably also from NAND) was broken since commit d6d07a9bec ("arm: vf610: add NAND support for vf610twr"). It looks like the increased size of U-Boot lead to a situation where the boot ROM overwrote its own stack/heap while loading U-Boot from the SD-card to the SRAM. However, U-Boot worked fine when loaded through USB serial loader directly into SRAM. It looks like loading from SD-card uses other stack/heap location then the serial loader (or maybe no stack or heap at all). This fix moves U-Boot to gfxRAM, which is 512kB in size and is not used by the boot ROM nor the SD-card loader of it. Signed-off-by: Stefan Agner <stefan@agner.ch> Acked-by: Bill Pringlemeir <bpringlemeir@nbsps.com>
2015-02-19fs/fs.c: read up to EOF when len would read past EOFMax Krummenacher
http://lists.denx.de/pipermail/u-boot/2012-September/134347.html allows for reading files in chunks from the shell. When this feature is used to read past the end of a file an error was returned instead of returning the bytes read up to the end of file. Thus the following fails in the shell: offset = 0 len = chunksize do read file, offset, len write data until bytes_read < len The patch changes the behaviour to printing an informational message and returning the actual read number of bytes. (cherry picked from commit 4641b92713300089c5980259ba31e668657aa75d)
2015-02-04colibri-vf: Fix SD bootBhuvanchandra DV
Add missing absolute /boot path for dtb file in sddtbload variable. Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2015-02-02colibri_vf: update default configColibri_VF_LinuxImageV2.3Beta7_201502032014.10-toradexStefan Agner
Add consoleblank=0 to disable console blanking by default. To use initramfs without the need of creating a U-Boot image using mkimage, enable CONFIG_SUPPORT_RAW_INITRD too.
2015-02-02colibri_vf: Enable update procedure using USB mass storageSanchayan Maity
Add default environment variable allowing update of the on-board flash using USB mass storage in addition to SD card. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> [merged with SD-card update script] Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2015-01-07mtd: vf610_nfc: allow bitflips in an empty pageStefan Agner
Allow bit flips in a empty page up to half of the recoverable bits (strength / 2). Some flash show bit flips in empty pages which are larger then the corrected bit count according to the ECC controller. It is not yet clear how to solve this correctly, discussion is ongoing: http://thread.gmane.org/gmane.linux.ports.arm.kernel/295424 Since we habe a 24-bit correction, this allows up to 12 bit flips on a empty page before reporting it as page with ECC errors.
2014-12-19colibri_vf: set USB vendor and product ID when using DFUColibri_VF_LinuxImageV2.3Beta5_20141219Colibri_T30_LinuxImageV2.3Beta5_20141219Apalis_T30_LinuxImageV2.3Beta5_20141219Stefan Agner
Set USB vendor and product ID of the module when using DFU. This allows to identify the module over USB and act accordingly if necessary (e.g. flash different version or root filesystem or similar use cases). Also the serial number of the USB device is visible by using the lsusb utility: $ lsusb -d 1b67: -v Bus 002 Device 092: ID 1b67:0018 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 2 Communications bDeviceSubClass 2 Abstract (modem) bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x1b67 idProduct 0x0018 bcdDevice 2.21 iManufacturer 1 Toradex iProduct 2 USB download gadget iSerial 3 4799890 ...
2014-12-16colibri_vf: switch console to ttyLP0 by defaultStefan Agner
Switch default console to ttyLP0 by default since future image will use the mainline kernel which uses the lpuart driver.
2014-12-03ARM: vf610: fix DIV_SELECT and clear it for USB PLL'sStefan Agner
Fix the DIV_SELECT definition for PLL3 and PLL7, but don't set it in the PLL control registers since USB needs a clock multiplier of 20 to get 480MHz. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2014-11-27arm: vf610: improve evaluation of reset sourceStefan Agner
Improve the evaluation of the reset source. Bit description according to latest reference manual rev. 7.
2014-11-27colibri_vf: set environment range correctStefan Agner
Environment range is used to move the config block to the next block in case the first erase block of the environment is marked as bad block. The absence of this config made saving of the environment impossible when the first block of the environment partition was marked bad.
2014-11-25colibri_vf/usb: fix multiple USB controller usageStefan Agner
Fix usage of multiple USB controllers by setting returning ENODEV for the respective controllers when trying to initialize them in the non-standard mode (on USBH allows only host mode, on USBC allow only device mode).
2014-11-25colibri_vf: Enable USB support for Colibri VybridSanchayan Maity
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2014-11-25usb: host: Add ehci-vf USB driver for ARM Vybrid SOC'sSanchayan Maity
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2014-11-25colibri_vf: Enable USB peripheralsSanchayan Maity
Enable clock and PLL's for USB Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2014-11-25ARM: vf610: Add USB peripheral supportSanchayan Maity
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2014-11-25mtd/nand/vf610_nfc: Disable subpage writesSanchayan Maity
This patch disables subpage writes for vf610_nfc nand driver. This is required as without this fix, writing unaligned u-boot images with DFU results in a hang. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2014-11-19colibri_vf: switch to Thumb2 buildsStefan Agner
Switch to Thumb to builds which are considerable smaller: 415512 19. Nov 14:52 ../u-boot-toradex/u-boot.imx vs. 313112 19. Nov 14:55 ../u-boot-toradex/u-boot.imx Especially download time through serial loader is linearly to size, hence download time is faster by 25% too.
2014-11-19arm: make arch memset/memcpy to work with Thumb2 buildsStefan Agner
Resynchronize memcpy/memset with kernel and build them explicitly in Thumb2 mode (unified syntax). Those assembler files can be built and linked in ARM mode too, however when calling them from Thumb2 built code, the stack got corrupted and the copy did not succeed (the exact details have not been traced back). Hoever, the Linux kernel builds those files in Thumb2 mode. Hence U-Boot should build them in Thumb2 mode too when CONFIG_SYS_THUMB_BUILD is set. Also add implicit-it=always to AFLAGS when building for Thumb2. Furthermore add no-warn-deprecated option to AFLAGS to rid of deprecated unified syntax: arch/arm/lib/memcpy.S: Assembler messages: arch/arm/lib/memcpy.S:153: Warning: conditional infixes are deprecated in unified syntax arch/arm/lib/memcpy.S:154: Warning: conditional infixes are deprecated in unified syntax ...
2014-11-18toradex: improve configblock error handlingStefan Agner
Improve error handling in common configblock code. Also fixes a warning when loading configblock from NAND (unused variable offset).
2014-11-18colibri_vf: calculate and set secondary MAC addressStefan Agner
In order to support dual ethernet configurations, a second MAC address is needed. Toradex assignes two addresses for each module, one address is the serial number, and the second is the serial number with an offset of 0x100000.
2014-10-31fw_env.h: include autoconf.hColibri_VF_LinuxImageV2.3Beta3_20141031Colibri_T30_LinuxImageV2.3Beta3_20141031Apalis_T30_LinuxImageV2.3Beta3_20141031Max Krummenacher
Without this, when CONFIG_ENV_VARS_UBOOT_CONFIG is active we get a compile time error when doing 'make env'. In file included from tools/env/fw_env.c:117:0: include/env_default.h:110:11: error: expected ‘}’ before ‘CONFIG_SYS_ARCH’ When building U-Boot this is included indirectly by the compiler switch -include /home/trdx/git.toradex.com/u-boot-2014.10-toradex/include/linux/kconfig.h
2014-10-28net: asix: fix operation without eepromMarcel Ziswiler
This patch fixes operation of our on-board AX88772B chip without EEPROM but with a ethaddr coming from the regular U-Boot environment. This is a forward port of some remaining parts initially implemented by Antmicro.
2014-10-28arm: vf610: extract leveling parameter in a structStefan Agner
DDR leveling parameters are board specific, hence we should be able to set them differently per board. Extract the leveling parameters in a seperate struct to be able to set them per board.
2014-10-28arm: vf610: improve DDR initializationStefan Agner
With the new JEDEC standardized initialization parameter, the initialization takes longer than 200us. Use the status bit to determine whether the memory initialization was completed. Also use recommended JEDEC defaults for t_INIT.
2014-10-28colibri_vf: use PLL1 as DDR clock on VF50Stefan Agner
On VF50, we can use PLL1 as DDR clock since the CPU is clocked with 400MHz as well. This saves some power (measured around ~10mW).
2014-10-28colibri_vf: read Toradex config blockStefan Agner
Add Toradex config block support using the new common config block handling. Extend common config block handling to support reading from NAND too.
2014-10-28apalis/colibri_t30: migrate and integrate new update conceptMarcel Ziswiler
Migrate Apalis/Colibri T30 to U-Boot 2014.10 and integrate new update concept based on Apalis/Colibri iMX6 and Colibri VF50/VF61.
2014-10-23toradex: add common config block codeMarcel Ziswiler
Add common confg block hanlding. The config block is a Toradex specific data structure containing manufacturing data and static module information such as ethernet address.
2014-10-23e1000: reduce i210/i211 hackMarcel Ziswiler
Now that the FW/SW synchronisation is fixed we can reduce the hack introduced by the following commit: 02bf24ad4a7c882e25771f656b973d5458695cf0 e1000: i210/i211 hack Note that we leave one final hack for now required for unprogrammed i210 operation.
2014-10-23e1000: fix sw fw sync on igb i210/i211Marcel Ziswiler
I finally had a look at the datasheet and spotted an additional register address difference between regular E1000 and i210/i211 chips. This patch fixes this and now successfully works on programmed i210/i211 as well as unprogrammed i211. Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
2014-10-23net/e1000: Fix EEPROM access errorYork Sun
Commit 951860634fdb557bbb58e0f99215391bc0c29779 may have changed the logic unintentially from "if (!(swfw_sync & (fwmask | swmask)))" to "if ((swfw_sync & swmask) && !(swfw_sync & fwmask))". This change breaks some e1000 NIC with a message "ERROR: Unable to read EEPROM!". Signed-off-by: York Sun <yorksun@freescale.com> CC: Marek Vasut <marex@denx.de> CC: Tim Harvey <tharvey@gateworks.com>
2014-10-23Revert "dm: tegra: Enable driver model for serial"Marcel Ziswiler
Migrating our BSPs towards mainline U-Boot I noticed it suddenly booting slower. With mainline Linux I noticed about a 1 to 2 second increase while booting downstream L4T takes 10 to 15 seconds longer! This reverts commit 858530a8c0a7ce7e573e513934804a00d6676813. Conflicts: drivers/serial/Makefile
2014-10-23colibri_vf: synchronize environment with i.MX6 U-BootStefan Agner
Synchronize environment with i.MX6 U-boot. Load device tree unconditionally, but set parameter to device tree file only when loading succeeded. Also load the device tree when using SD or NFS boot.
2014-10-23colibri_vf: fix environment for NFS/SD-BootStefan Agner
Switch to zImage for SD and NFS-Boot. Explicitly define the load address in all commands.
2014-10-23colibri_vf: extend environmentStefan Agner
Newer UBI implementation do not allow small UBI partitions since the amount of bad blocks is now calculated by the size of the MTD partition (instead volume size). On small partitions, this leads to UBI partitions only consisting of reserved blocks. Therefor we now use only one volume, which also allows better wear leveling and bad block management. Since it is needed to attach the whole UBI partition, mounting the UBI filesystem would be a good option. Measurement showed that the overhead reading from UBI filesystem compared to read from a UBI volume is minimal (below 100ms). Furthermore, this also adds support to load device trees for newer, device tree based kernels. By setting the variable fdt_board, the scripts read the FDT file and try to pass this to the kernel. The FDT file will be concatinated: ${soc}-colibri-{fdt_board}.dtb E.g. when fdt_board is set to "eval-v3", the scripts will load the device tree file "vf610-colibri-eval-v3.dtb" on a Colibri VF61.
2014-10-23arm: vf610: add SoC detectionStefan Agner
Vybrid product family consists of several rather similar SoC which can be determined by softare during boot time. This allows to use the variable ${soc} for Linux device tree files.
2014-10-23arm: vf610: enable cachesStefan Agner
Enables caches which provides a rather huge speedup of the boot loader. Also mark the on-chip RAM as cachable since this is the area U-Boot runs from.
2014-10-23colibri_vf: disable automatic boot when using recovery modeStefan Agner
Since we use the same UART to download U-Boot and get the U-Boot prompt, it is quite hard to switch between the download program and the terminal emulator within the boot delay. This patch disables the automatic boot by setting the bootdelay to -1 when using the recovery mode (serial downloader).
2014-10-23vf610: improve CPU type detectionStefan Agner
Detect VF5xx CPU's by reading the CPU count register. Also we can guess the second number of the CPU type (VF6x0) which indicates the presence of a L2 cache.
2014-10-23colibri vf50/61: detect bad blocks in U-Boot areaStefan Agner
The boot ROM was not able to detect bad blocks in the U-Boot area due to disabled "bad block marking swap" functionality. The description of this field is a bit unclear, but tests show that skipping bad blocks in U-Boot area only work if this field is set to 0.
2014-10-23vf610: enable external 32KHz oscillatorStefan Agner
Enable the SCSC (Slow Clock Source Controller) and select the external 32KHz oscillator. This improves accuracy of the RTC.
2014-10-17arm: vf610: initial integration for Colibri VF50/VF61Stefan Agner
This adds initial support for Colibri VF50/VF61 based on Freescale Vybrid SoC. The board support package is based on Freescale Tower board, with following differences: - CPU clocked at 500MHz - Use PLL2 as DDR3 clock (400MHz) - New Machine ID - Console on UART1 (Colibri UART_A) - Ethernet on FEC1 - Enabled command line editing - PLL5 based RMII clocking (e.g. no external crystal) - UART_A and UART_C I/O muxing - Boot from OCRAM gfxRAM - Boot from NAND by default Tested on Colibri VF50/VF61 booting using serial loader over UART.