Age | Commit message (Collapse) | Author |
|
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.
|
|
Add additional environment variable "fdt_fixup" which will be
called between device tree load command and kernel boot command.
This allows to change device tree using U-Boot scripting
environment.
|
|
We do use PWM instance zero by default which is actually muxed for PWM
as primary function.
|
|
Enable the display driver on Apalis T30. Unfortunately the PWM pin
muxing wasn't any good neither which made that display stay dark.
|
|
On popular request enable the display driver on Colibri T30. A few
notes about some things encountered during porting: While analogue VGA
(e.g. via the on-carrier RAMDAC) worked just fine from the beginning
the EDT display flickered like crazy which turned out to be a pin
muxing issue. Unfortunately the PWM pin muxing wasn't any good neither
which made that display stay dark. Enjoy.
|
|
On popular request make the display driver from T20 work on T30 as
well. Turned out to be quite straight forward. However a few notes
about some things encountered during porting: Of course the T30 device
tree was completely missing host1x as well as PWM support but it turns
out this can simply be copied from T20. The only trouble compiling the
Tegra video driver for T30 had to do with some hard-coded PWM pin
muxing for T20 which is quite ugly anyway. On T30 this gets handled by
a board specific complete pin muxing table. The older Chromium U-Boot
2011.06 which to my knowledge was the only prior attempt at enabling a
display driver for T30 for whatever reason got some clocking stuff
mixed up. Turns out at least for a single display controller T20 and
T30 can be clocked quite similar. Enjoy.
|
|
Enable CONFIG_IP_DEFRAG and set CONFIG_TFTP_BLOCKSIZE to 16384 (resp.
1536 on Colibri T20). This increases the tftp download speed
considerably.
While at it enable CONFIG_TFTP_TSIZE which limits the progress bar to
fifty '#' independent of the downloaded file size.
While at it also fix some spacing from using spaces to tabs.
|
|
This is a copy/paste error from the Apalis T30 configuration as there
we show the Linux framebuffer console by default on the second
framebuffer instance being the DVI-D aka HDMI one due to analogue VGA
not being available. This patch changes it for the Colibri T30 back to
the first framebuffer instance being the parallel RGB aka TFTLCD one
which usually gets converted to analogue VGA via an on-carrier RAMDAC
(e.g. at least on the Colibri Evaluation board as well as Iris this is
the case).
|
|
Use the correct I2C instance for the I2C going to SODIMM_194/196.
|
|
|
|
use Apalis GPIO1 to switch on VPGM
|
|
commit 2da77958e96151295e72f8f85aee352d0b4010fe added a configuration option
to include commands used during production.
Fixing the use of the CONFIG macro.
|
|
Some firmwares running on the secondary core rely on UART pins
muxed at start time. Mux the Vybrid UART2 (which maps to Colibri
UART_B) at startup.
|
|
Add support for ARM global timer. This allows to save the platform
wide PIT timer for other purposes such as MQX on the secondary
Cortex-M4 core.
|
|
Fixup the device-tree with the property fsl,has-cke-reset-pulls
which annotates that the board has pull-ups/downs which are required
to put the memory into self-refresh mode. The self-refresh mode in
turn is a requirement to put the SoC into deep sleep mode LPSTOP.
|
|
Use device-tree fixup to communicate the MTD partitions to the
kernel. U-Boot's mtdparts environment variable will be used as
partition source for the device-tree based partition table too.
|
|
Allow to boot eCos, MQX and bare-metal firmwares to boot on the
secondary Cortex-M4. The boot code is equal for all those firmware
types, the argument register will be set to 0 and the code will
jump to the specified entry point directly.
|
|
Add new identifiers for Cortex-M4 related (RT)OS eCos, MQX and
Bare-metal.
|
|
Move entry point is Thumb2 check just after reading the entry point
from the FIT image.
|
|
Include vf610m4bootldr, a mini boot loader for the Cortex-M4 CPU
inside Freescale Vybrid SoC. The mini loader enables caches and
copies the pointer to the device tree from the platform specific
argument register (PERSISTENT_ARG1) to the Cortex-M4 r2 register,
where the Linux kernel expects the pointer. The mini loader hence
essentially takes over the parts of the m4boot command which can
not be done from the Cortex-A5 main CPU.
|
|
Add m4boot command which allows to boot FIT images on the Cortex-M4
kernel. The command currently only supports FIT image, which allows
to provide entry point and load addresses for all boot artifacts.
Currently, the Cortex-M4 mini loader needs to be loaded manually
to Kernel loadaddr - 0x80 (e.g. 0x8f000000, if kernel is loaded at
0x8f000080).
|
|
Do not configure all interrupts to the primary core by default since
newer Linux versions configure the MSCM interrupt router correctly
by themself. This also prevents warnings due to already routed
interrupts when booting Linux on the secondary Cortex-M4 CPU.
|
|
Enable CONFIG_IP_DEFRAG and set CONFIG_TFTP_BLOCKSIZE to 16384.
This increases the tftp download speed from ~2.5 to ~8.2MiB/s.
While at it enable CONFIG_TFTP_TSIZE which limits the progress bar
to 50 '#' indepent off the downloaded file size.
|
|
Increase console IO buffer size to 1024 from the previous value of 256.
The previous value was too short for editing environment variables like
ubiboot, from the console.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
|
|
Enable CONFIG_IP_DEFRAG and set CONFIG_TFTP_BLOCKSIZE to 16384.
This increases the tftp download speed considerably.
While at it enable CONFIG_TFTP_TSIZE which limits the progress bar to
fifty '#' indepent off the downloaded file size.
|
|
CONFIG_TFTP_TSIZE should limit a tftp downloads progress to 50 '#' chars.
Make this work also for small files.
If the file size is small, i.e. smaller than 2 tftp block sizes the number
of '#' can get much larger. i.e. with a 1 byte file 65000 characters are
printed, with a 512 byte file around 500.
When using CONFIG TFTP BLOCKSIZE together with CONFIG_IP_DEFRAG the issue
is more notable.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
Fix setsdupdate by adding missing 'usb start' command.
While at it also add USB start to setethupdate as doing it twice won't
hurt (e.g. it returns immediately only 'usb reset' does a full rescan).
|
|
In order to use the gpio commandline feature of U-Boot the pins
one wants to control must be muxed to GPIO.
Do that for Apalis pins GPIO[1:8] and for WAKE1_MICO.
This feature can be used as follows:
e.g. set GPIO1 to 1:
Apalis iMX6 # gpio set 36
gpio: pin 36 (gpio 36) value is 1
e.g. read the state of GPIO8:
Apalis iMX6 # gpio input 6
gpio: pin 6 (gpio 6) value is 1
|
|
In order to use the gpio commandline feature of U-Boot the pins
one wants to control must be muxed to GPIO.
Do that for all unused pins which in the default kernel device tree also gets
muxed to gpio for userspace use.
This feature can be used as follows:
e.g. change the LCD brightness signal from 0V to 3.3V:
Colibri iMX6 # gpio set 41
gpio: pin 41 (gpio 41) value is 1
e.g. read the state of gpio 111:
Colibri iMX6 # gpio input 111
gpio: pin 111 (gpio 111) value is 1
|
|
Out of reset EMI_ADDR22 is output and connected to GPIO01.
As we want to use GPIO01 as an output for backlight control
mux EMI_ADDR22 to a GPIO which by default is input.
|
|
Add an alias for the ESDHC0 which provides the standard MMC connection
on Colibri iMX6.
Add an alias for the ESDHC0/1 which provides the standard MMC/SD connection
on Apalis iMX6.
|
|
Enable OF system setup to add hardware revision and serial number
information to the device-tree in case a mainline Linux kernel with any
such is booted.
While at it default back to the regular 8 MB DFU data buffer size.
|
|
Enable optional raw initrd support to allow boot using an initrd.
|
|
Introduce cache alignment bounce buffer to workaround issues as follows:
Loading file '/boot/zImage' to addr 0x01000000 with size 4499152 (0x0044a6d0)...
ERROR: v7_dcache_inval_range - start address is not aligned - 0x1f7f0108
ERROR: v7_dcache_inval_range - stop address is not aligned - 0x1f7f1108
Done
Kernel image @ 0x1000000 [ 0x000000 - 0x44a6d0 ]
Starting kernel ...
undefined instruction
pc : [<005ff03c>] lr : [<0000800c>]
sp : 0144b6e8 ip : 01000188 fp : 0144a6c8
r10: 00000000 r9 : 411fc090 r8 : 00000100
r7 : 00000cfb r6 : 0144a6d0 r5 : 00000000 r4 : 00008000
r3 : 0000000c r2 : 00000100 r1 : 00000cfb r0 : 00000000
Flags: nZCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...
|
|
Various U-Boot adoptions/extensions to MTD/NAND/UBI did not take buffer
alignment into account which led to failures of the following form:
ERROR: v7_dcache_inval_range - start address is not aligned - 0x1f7f0108
ERROR: v7_dcache_inval_range - stop address is not aligned - 0x1f7f1108
|
|
Fix build of configurations without the Toradex config block. Also
move away from the ifdefery through the file, but create a global
ifdef which distingush between the two variants on a global level.
|