summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-12-15colibri_imx6.c: call phy_reset on Ethernet startupColibri_iMX6_LinuxImageV2.5Beta3_20151215Colibri_VF_LinuxImageV2.5Beta3_20151215Colibri_T30_LinuxImageV2.5Beta3_20151215Colibri_T20_LinuxImageV2.5Beta3_20151215Apalis_iMX6_LinuxImageV2.5Beta3_20151215Apalis_T30_LinuxImageV2.5Beta3_20151215Max Krummenacher
See commit 3473c2e3e88f4a2046a24f164d7d67ad5db27b1e Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2015-12-15phy.c: clear flags for special PHY modes on phy_resetMax Krummenacher
Clear the following flags on SW reset: BMCR_PDOWN|BMCR_LOOPBACK|BMCR_CTST They are cleared by a HW/POR reset but not if the PHY goes through a SW reset. If the BMCR_PDOWN bit is set on reboot U-Boot fails to use Ethernet otherwise. Steps to reproduce the issue without the patch (from within Linux): Don't use phy_reset or use the unpatched version in U-Boot. Then: ip link set down eth0 reboot stop in U-Boot ping <connected host> -> Link stays down, a ping to a valid address does fail. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2015-12-15Apalis/Colibri iMX6: use the enum from command.h for return codesMax Krummenacher
This cleans up the code without changing the functionality. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2015-12-15configblock.c: use is_cpu_type to detect i.MX 6 CPUMax Krummenacher
Using the RAM size on Colibri iMX6 might fail if the DCD is not yet updated to a 64-bit DDR bus on the Colibri iMX6DL. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2015-12-15Makefile:Add GCC flag -fno-delete-null-pointer-checksPrabhakar Kushwaha
-fdelete-null-pointer-checks flag controls global dataflow analyses and eliminate useless checks for null pointers; It assume that if a pointer is checked after it has already been dereferenced, it cannot be null. This flag is enabled by default. gcc v4.9 has more optimizations added to this option. Hence it is very aggressive with GCC v4.9 series. Add -fno-delete-null-pointer-checks to disable the optimization Signed-off-by: Rohit Dharmakan <rohitarulraj@freescale.com> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> (cherry picked from commit 687a7518a1b1e40e005711603dcb14e0f6942d6d) Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2015-11-02colibri_vf: add U-Boot config env varsColibri_iMX6_LinuxImageV2.5Beta2_20151106Colibri_VF_LinuxImageV2.5Beta2_20151106Colibri_T30_LinuxImageV2.5Beta2_20151106Colibri_T20_LinuxImageV2.5Beta2_20151106Apalis_iMX6_LinuxImageV2.5Beta2_20151106Apalis_T30_LinuxImageV2.5Beta2_20151106Stefan Agner
Add CONFIG_ENV_VARS_UBOOT_CONFIG which adds environment variables such as board_name or arch which is helpful for scripting.
2015-11-02arm: vf610: fix delay when using global timerStefan Agner
The global timer used to divide the waiting cycles by two for no reason, which lead to too short delays (e.g. when waiting for PHY). This fixes an issue seen when bootdelay is 0 and the boot command requires network: FEC Waiting for PHY auto negotiation to complete......... TIMEOUT !
2015-11-02Merge branch '2015.04-toradex-next-fastmap-fixes' into 2015.04-toradex-nextStefan Agner
This fixes have been backported from Linux 4.1 and seem to fix the PEB leak warnings and alleviate fastmap being corrupted or marked invalid by U-Boot. * 2015.04-toradex-next-fastmap-fixes: UBI: Fastmap: Set used_ebs only for static volumes UBI: Fastmap: Fix leb_count unbalance UBI: Fastmap: Switch to ro mode if invalidate_fastmap() fails UBI: Fastmap: Remove eba_orphans logic UBI: Fastmap: Remove bogus ubi_assert() UBI: Fastmap: Fix memory leak while attaching UBI: Fastmap: Don't allocate new ubi_wl_entry objects UBI: Fastmap: Care about the protection queue UBI: Fastmap: Calc fastmap size correctly UBI: add missing kmem_cache_free() in process_pool_aeb error path UBI: fastmap: do not miss bit-flips UBI: fix the volumes tree sorting criteria UBI: fix rb_tree node comparison in add_map
2015-10-30apalis/colibri_imx6/t20/t30/vf: fix automatic ethernet updateMarcel Ziswiler
Fix automatic Ethernet update in case the configblock or U-Boot environment is corrupted/missing which results in ethaddr aka the MAC address not being set. Fix this by temporarily using a default Toradex OUI only based MAC address.
2015-10-30colibri_vf: introduce automatic ethernet update capabilityMarcel Ziswiler
Introduce Ethernet update capability via setethupdate which is automatically tried by setupdate as well should SD and USB update fail (e.g. neither an SD card nor an USB memory stick with our flash_blk.img script and accompanying artefacts is inserted.
2015-10-30colibri_vf: sort extra env settingsMarcel Ziswiler
Sort CONFIG_EXTRA_ENV_SETTINGS alphabetically in order to allow for easy comparison with our other board configuration files.
2015-10-29colibri_imx6: update do_patch_ddr_size functionMarcel Ziswiler
Update do_patch_ddr_size() to accommodate our new eMMC layout (e.g. switch to primary eMMC boot area partition for patching).
2015-10-28apalis/colibri_imx6/vf: enable crc32 verify supportMarcel Ziswiler
Enable the crc32 commands verify support as our U-Boot update scripts make use of this in order to detect and migrate the Toradex factory configuration block. BTW: On the Tegras this gets already pulled in through tegra-common.h.
2015-10-26apalis/colibri_t30: move env end of emmc boot area before config blockMarcel Ziswiler
Move the U-Boot environment before the config block at the end of the first eMMC (hardware) boot area partition to be again more in line with how this got recently changed on Apalis/Colibri iMX6.
2015-10-26apalis/colibri_imx6: move env and config block to end of emmc boot areaMarcel Ziswiler
Move the U-Boot environment and config block to the end of the first eMMC (hardware) boot area partition.
2015-10-26apalis_imx6: fix V1.0 hardware device tree namingMarcel Ziswiler
Fix V1.0 hardware device tree naming after that got fixed in the kernel sources of late: http://git.toradex.com/cgit/linux-toradex.git/commit?id=9f1778fdaf4df8a39c761d47d8651d6279363571
2015-10-26apalis/colibri_imx6: cosmetic configuration file changesMarcel Ziswiler
Fix various spelling issues in our Apalis/Colibri iMX6 configuration files (e.g. UARTS vs. UARTs, u-boot vs. U-Boot, 8bit vs. 8-bit. While at it also stop claiming sdboot having anything to do with an 8-bit SD slot on Colibri iMX6 which does not have any such at least in its default pin muxing.
2015-10-26ARM: vf610: support L2 cache for VybridStefan Agner
Support L2 cache which is available on for the Cortex-A5 core on some Vybrid SoCs (VFx1x series). Vybrid seems to use revision r3p2 of the PL310 cache controller. To enable the cache controller use this two configuration symbols: #define CONFIG_SYS_L2_PL310 #define CONFIG_SYS_PL310_BASE CA5_L2C_BASE_ADDR Note: U-Boot is currently not able to detect the existence of the L2 cache at runtime. Hence enabling these configurations leads to a crash on SoCs which do not have a L2 cache (e.g. VF500 on Colibri VF50)
2015-10-26colibri_vf: increase available malloc memoryStefan Agner
This helps to get rid of error -12 (ENOMEM) messages when attaching the UBI partition.
2015-10-26apalis/colibri: allow to interrupt boot even if delay is 0Stefan Agner
Use the CONFIG_ZERO_BOOTDELAY_CHECK option to allow interrupt the boot process even if the delay is 0.
2015-10-26apalis/colibri_imx6: enable emmc boot support commandsMarcel Ziswiler
Enable eMMC specific boot support commands by defining CONFIG_SUPPORT_EMMC_BOOT in our Apalis/Colibri iMX6 configuration files. This allows switching to proper eMMC (hardware) boot area partition booting once our update scripts can cope with this as well as follows: Configure the eMMC to 8-bit DDR boot operation mode: mmc bootbus 0 2 1 2 Enable booting from the (hardware) boot area partition 1 and the boot acknowledge to be sent during boot operation: mmc partconf 0 1 1 0 BTW: A good overview about the thematic can be found in Micron's TN-FC-06: Booting from Embedded MMC (e.MMC) - JEDEC v. 4.41.
2015-10-26apalis/colibri_imx6: cosmetic board file changesMarcel Ziswiler
Fix various comment style, indentation and spelling issues in our Apalis/Colibri iMX6 board files.
2015-10-12mtd: nand: vf610_nfc: resync with upstream Linux versionStefan Agner
This resyncs the driver changes with the Linux version of the driver. The driver received some feedback in the LKML and got recently acceppted, the latest version can be found here: https://lkml.org/lkml/2015/9/2/678 Notable changes are: - On ECC error, reread OOB and count bit flips in OOB too. If flipped bits are below threshold, also return an empty OOB buffer. - Return the amount of bit flips in vf610_nfc_read_page. - Use endianness aware vf610_nfc_read to read ECC status. - Do not enable IDLE IRQ (since we do not operate with an interrupt service routine). - Use type safe struct for buffer variants (vf610_nfc_alt_buf). - Renamed variables in struct vf610_nfc (column and page_sz) to reflect better what they really representing. The U-Boot version currently does not support RAW NAND write when using the HW ECC engine. Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2015-10-05toradex: configblock: fix command return codesStefan Agner
Return success/failure depending whether config block loading succeeded or failed (e.g. if written in different ECC format or not available at all).
2015-10-01colibri_vf: fix compile error when disabling DCUStefan Agner
If the DCU framebuffer is not configured, the board file still tries to call fsl_dcu_fixedfb_setup, which leads to a compile issue. Call fsl_dcu_fixedfb_setup only if DCU is enabled.
2015-09-04Apalis iMX6: cleanup filename for V1.0 HWMax Krummenacher
Follow the rename imx6q-apalis-eval_v1_0.dtb to imx6q-apalis_v1_0-eval.dtb in the kernel. The v1_0 denotes the Apalis module version, not the evaluation board version.
2015-09-01UBI: Fastmap: Set used_ebs only for static volumesRichard Weinberger
If we set it for dynamic ones we might confuse various self checks. Signed-off-by: Richard Weinberger <richard@nod.at>
2015-09-01UBI: Fastmap: Fix leb_count unbalanceRichard Weinberger
If a LEB is unmapped we have to decrement leb_count as well. Signed-off-by: Richard Weinberger <richard@nod.at>
2015-09-01UBI: Fastmap: Switch to ro mode if invalidate_fastmap() failsRichard Weinberger
We have to switch to ro mode to guarantee that upon next UBI attach all data is consistent. Signed-off-by: Richard Weinberger <richard@nod.at>
2015-09-01UBI: Fastmap: Remove eba_orphans logicRichard Weinberger
This logic is in vain as we treat protected PEBs also as used, so this case must not happen. If a PEB is found which is in the EBA table but not known as used has to be issued as fatal error. Signed-off-by: Richard Weinberger <richard@nod.at>
2015-09-01UBI: Fastmap: Remove bogus ubi_assert()Richard Weinberger
It is legal to have PEBs left in the used list. This can happen if UBI copies a PEB and a powercut happens between writing a new fastmap and adding this PEB into the EBA table. In this case the old PEB will be used. Signed-off-by: Richard Weinberger <richard@nod.at>
2015-09-01UBI: Fastmap: Fix memory leak while attachingRichard Weinberger
Currently we leak a few ubi_ainf_pebs while attaching. Signed-off-by: Richard Weinberger <richard@nod.at>
2015-09-01UBI: Fastmap: Don't allocate new ubi_wl_entry objectsRichard Weinberger
There is no need to allocate new ones every time, we can reuse the existing ones. This makes the code cleaner and more easy to follow. Signed-off-by: Richard Weinberger <richard@nod.at> Reviewed-by: Tanya Brokhman <tlinder@codeaurora.org> Reviewed-by: Guido Martínez <guido@vanguardiasur.com.ar>
2015-09-01UBI: Fastmap: Care about the protection queueRichard Weinberger
Fastmap can miss a PEB if it is in the protection queue and not jet in the used tree. Treat every protected PEB as used. Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2015-09-01UBI: Fastmap: Calc fastmap size correctlyRichard Weinberger
We need to add fm_sb too. Signed-off-by: Richard Weinberger <richard@nod.at> Reviewed-by: Tanya Brokhman <tlinder@codeaurora.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2015-09-01UBI: add missing kmem_cache_free() in process_pool_aeb error pathRichard Genoud
I ran into this error after a ubiupdatevol, because I forgot to backport e9110361a9a4 UBI: fix the volumes tree sorting criteria. UBI error: process_pool_aeb: orphaned volume in fastmap pool UBI error: ubi_scan_fastmap: Attach by fastmap failed, doing a full scan! kmem_cache_destroy ubi_ainf_peb_slab: Slab cache still has objects CPU: 0 PID: 1 Comm: swapper Not tainted 3.14.18-00053-gf05cac8dbf85 #1 [<c000d298>] (unwind_backtrace) from [<c000baa8>] (show_stack+0x10/0x14) [<c000baa8>] (show_stack) from [<c01b7a68>] (destroy_ai+0x230/0x244) [<c01b7a68>] (destroy_ai) from [<c01b8fd4>] (ubi_attach+0x98/0x1ec) [<c01b8fd4>] (ubi_attach) from [<c01ade90>] (ubi_attach_mtd_dev+0x2b8/0x868) [<c01ade90>] (ubi_attach_mtd_dev) from [<c038b510>] (ubi_init+0x1dc/0x2ac) [<c038b510>] (ubi_init) from [<c0008860>] (do_one_initcall+0x94/0x140) [<c0008860>] (do_one_initcall) from [<c037aadc>] (kernel_init_freeable+0xe8/0x1b0) [<c037aadc>] (kernel_init_freeable) from [<c02730ac>] (kernel_init+0x8/0xe4) [<c02730ac>] (kernel_init) from [<c00093f0>] (ret_from_fork+0x14/0x24) UBI: scanning is finished Freeing the cache in the error path fixes the Slab error. Tested on at91sam9g35 (3.14.18+fastmap backports) Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Cc: stable <stable@vger.kernel.org> # 3.10+
2015-09-01UBI: fastmap: do not miss bit-flipsBrian Norris
The return value from 'ubi_io_read_ec_hdr()' was stored in 'err', not in 'ret'. This fix makes sure Fastmap-enabled UBI does not miss bit-flip while reading EC headers, events and scrubs the affected PEBs. This issue was reported by Coverity Scan. Artem: improved the commit message. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Acked-by: Richard Weinberger <richard@nod.at> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2015-09-01UBI: fix the volumes tree sorting criteriaHeiko Schocher
Commig "604b592 UBI: fix rb_tree node comparison in add_map" broke fastmap backward compatibility and older fastmap images cannot be mounted anymore. The reason is that it changes the volumes RB-tree sorting criteria. This patch fixes the problem. Artem: re-write the commit message Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Richard Weinberger <richard@nod.at> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2015-09-01UBI: fix rb_tree node comparison in add_mapMike Snitzer
The comparisons used in add_vol() shouldn't be identical. Pretty sure the following is correct but it is completely untested. Signed-off-by: Mike Snitzer <snitzer@redhat.com> Acked-by: Richard Weinberger <richard@nod.at> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2015-08-18dm: spi: Correct SPI claim/release_bus() methodsSimon Glass
These methods should be passed a slave device, not a bus. This matches the old SPI interface. It is important to know which device is claiming the bus so passing a bus is not that useful. Reported-by: Haikun Wang <haikun.wang@freescale.com> Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Peng Fan <Peng.Fan@freescale.com> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
2015-08-18colibri_t20: implement early pmic rail configurationMarcel Ziswiler
Implement early TPS6586X PMIC rail configuration setting SM0 being VDD_CORE_1.2V to 1.2 volts and SM1 being VDD_CPU_1.0V to 1.0 volts. While those are PMIC power-up defaults the SoC might have been reset separately with certain rails being left at lower DVFS states which is e.g. the case upon watchdog reset while otherwise nearly idling.
2015-08-11ARM: vf610: use strcpy for soc environemnt variableColibri_VF_LinuxImageV2.5Beta1_20150813Stefan Agner
To create the soc environment variable we concatenate two strings on the stack. So far, strcat has been used for the first string as well as for the second string. Since the variable on the stack is not initialized, the first strcat may not start using the first entry in the character array. This then could lead to an buffer overflow on the stack.
2015-08-11colibri_vf: fix DDR property fixupStefan Agner
Set DDR property fixup also in (future) version 2.x revisions.
2015-08-10colibri-vf: Enable SPI supportBhuvanchandra DV
Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> [add CONFIG_DM to colibri_vf_defconfig] Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2015-08-10arm: vf610: Add iomux support for DSPIBhuvanchandra DV
Add iomux definitions for DSPI second instance. Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
2015-08-10arm: vf610: Add clock support for DSPIBhuvanchandra DV
Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
2015-08-10colibri_vf: Add separate defconfig for device tree supportBhuvanchandra DV
Most of the drivers available for Vybrid are not yet converted to OF model to use device tree model, only few drivers like SPI and GPIO drivers use device trees. Add separate defconfig for who needs to use device tree model. Later this can be integrated to single defconfig. Acked-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
2015-08-10vf610: dts: Add device tree supportBhuvanchandra DV
Add device tree files for Freescale Vybrid platform and Toradex Colibri VF50, VF61 modules. Device tree files are taken from upstream Kernel. Removed the stuff which are not used/supported yet in U-Boot. Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
2015-08-10dm: spi: Convert Freescale DSPI driver to driver modelHaikun.Wang@freescale.com
Move the Freescale DSPI driver over to driver model. Signed-off-by: Haikun Wang <Haikun.Wang@freescale.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
2015-08-10imx-common: m4boot: rename Cortex-M4 bootargsStefan Agner
The environment variable was called bootargsm4, which is somewhat incongruent with the boot command name "m4boot". Rename the bootargs environment variable for Cortex-M4 to m4bootargs.