Age | Commit message (Collapse) | Author |
|
See commit 3473c2e3e88f4a2046a24f164d7d67ad5db27b1e
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
|
|
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>
|
|
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>
|
|
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>
|
|
-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>
|
|
Add CONFIG_ENV_VARS_UBOOT_CONFIG which adds environment variables
such as board_name or arch which is helpful for scripting.
|
|
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 !
|
|
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
|
|
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.
|
|
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.
|
|
Sort CONFIG_EXTRA_ENV_SETTINGS alphabetically in order to allow for
easy comparison with our other board configuration files.
|
|
Update do_patch_ddr_size() to accommodate our new eMMC layout (e.g.
switch to primary eMMC boot area partition for patching).
|
|
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.
|
|
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.
|
|
Move the U-Boot environment and config block to the end of the first
eMMC (hardware) boot area partition.
|
|
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
|
|
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.
|
|
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)
|
|
This helps to get rid of error -12 (ENOMEM) messages when attaching
the UBI partition.
|
|
Use the CONFIG_ZERO_BOOTDELAY_CHECK option to allow interrupt the
boot process even if the delay is 0.
|
|
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.
|
|
Fix various comment style, indentation and spelling issues in our
Apalis/Colibri iMX6 board files.
|
|
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>
|
|
Return success/failure depending whether config block loading
succeeded or failed (e.g. if written in different ECC format or
not available at all).
|
|
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.
|
|
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.
|
|
If we set it for dynamic ones we might confuse various self checks.
Signed-off-by: Richard Weinberger <richard@nod.at>
|
|
If a LEB is unmapped we have to decrement leb_count as well.
Signed-off-by: Richard Weinberger <richard@nod.at>
|
|
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>
|
|
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>
|
|
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>
|
|
Currently we leak a few ubi_ainf_pebs while attaching.
Signed-off-by: Richard Weinberger <richard@nod.at>
|
|
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>
|
|
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>
|
|
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>
|
|
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+
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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.
|
|
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.
|
|
Set DDR property fixup also in (future) version 2.x revisions.
|
|
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>
|
|
Add iomux definitions for DSPI second instance.
Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
|
|
Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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.
|