u-boot-brain/drivers
Thomas Gleixner 6f4e7d3c75 spl: Lightweight UBI and UBI fastmap support
Booting a payload out of NAND FLASH from the SPL is a crux today, as
it requires hard partioned FLASH. Not a brilliant idea with the
reliability of todays NAND FLASH chips.

The upstream UBI + UBI fastmap implementation which is about to
brought to u-boot is too heavy weight for SPLs as it provides way more
functionality than needed for a SPL and does not even fit into the
restricted SPL areas which are loaded from the SoC boot ROM.

So this provides a fast and lightweight implementation of UBI scanning
and UBI fastmap attach. The scan and logical to physical block mapping
code is developed from scratch, while the fastmap implementation is
lifted from the linux kernel source and stripped down to fit the SPL
needs.

The text foot print on the board which I used for development is:

6854	0	0	6854	1abd
drivers/mtd/ubispl/built-in.o

Attaching a NAND chip with 4096 physical eraseblocks (4 blocks are
reserved for the SPL) takes:

In full scan mode:      1172ms
In fastmap mode:          95ms

The code requires quite some storage. The largest and unknown part of
it is the number of fastmap blocks to read. Therefor the data
structure is not put into the BSS. The code requires a pointer to free
memory handed in which is initialized by the UBI attach code itself.

See doc/README.ubispl for further information on how to use it.

This shares the ubi-media.h and crc32 implementation of drivers/mtd/ubi
There is no way to share the fastmap code, as UBISPL only utilizes the
slightly modified functions ubi_attach_fastmap() and ubi_scan_fastmap()
from the original kernel ubi fastmap implementation.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-07-22 09:53:00 -04:00
..
adc sandbox: add ADC driver 2015-11-02 10:38:00 +09:00
bios_emulator Various, unrelated tree-wide typo fixes. 2016-07-16 09:43:12 -04:00
block block: dwc_ahsata: support i.MX6DQPlus 2016-05-24 14:59:57 +02:00
bootcount bootcounter_ram: Flush dcache after data is written into SDRAM 2016-04-11 20:48:25 -04:00
clk dm: clk: Remove simple version of clk_get_by_index/name() 2016-07-22 14:05:50 +02:00
core dm: core: Add an implementation of regmap_init_mem_platdata() 2016-07-14 20:40:24 -06:00
cpu x86: Move MP initialization codes into a common place 2015-07-14 18:03:16 -06:00
crypto powerpc/mpc85xx: SECURE BOOT- Enable chain of trust in SPL 2016-07-21 11:09:23 -07:00
ddr Various, unrelated tree-wide typo fixes. 2016-07-16 09:43:12 -04:00
demo drivers: hierarchize drivers Kconfig menu 2015-08-12 20:47:44 -04:00
dfu dm: dfu: mmc: Support CONFIG_BLK in DFU for MMC 2016-07-11 14:06:44 -06:00
dma drivers: dma: ti-edma3: convert driver to adopt driver model 2016-02-23 16:14:46 +05:30
fpga Various, unrelated tree-wide typo fixes. 2016-07-16 09:43:12 -04:00
gpio dm: gpio: MPC85XX GPIO platform data support 2016-07-11 14:06:44 -06:00
hwmon mailaddr: Update mail address 2016-01-27 15:32:05 +01:00
i2c clk: convert API to match reset/mailbox style 2016-06-19 17:05:55 -06:00
input input: i8042: Make sure the keyboard is enabled 2016-03-17 10:27:24 +08:00
led dm: led: Tidy up SPL options for the led and led-gpio 2015-09-02 21:28:22 -06:00
mailbox mailbox: add Tegra186 HSP driver 2016-06-19 17:05:55 -06:00
memory memory: Move TI_AEMIF config to KCONFIG 2016-04-18 17:11:43 -04:00
misc i2c_eeprom: Add reading support 2016-07-22 09:52:59 -04:00
mmc mmc: sdhci: Disable internal clock enable bit 2016-07-22 14:03:50 +02:00
mtd spl: Lightweight UBI and UBI fastmap support 2016-07-22 09:53:00 -04:00
net net: Add EMAC driver for H3/A83T/A64 SoCs. 2016-07-15 08:34:34 +02:00
pch x86: pch9: Implement get_io_base op 2016-02-05 12:47:21 +08:00
pci pci: Add board_ prefix to should_load_oprom() and make it weak 2016-07-12 13:46:01 +08:00
pcmcia powerpc: mpc824x: remove MPC824X cpu support 2015-01-05 12:08:55 -05:00
pinctrl rockchip: pinctrl: Update the rk3288 driver to support of-platdata 2016-07-14 20:40:24 -06:00
power sunxi: power: add AXP809 support 2016-05-25 17:52:39 +02:00
pwm exynos: pwm: Add a driver for the exynos5 PWM 2016-05-25 13:25:18 +09:00
qe board: ls1043ardb: Add micro QE support for ls1043ardb 2016-02-24 08:51:14 -08:00
ram ram: rename CONFIG_SPL_RAM_SUPPORT to CONFIG_SPL_RAM 2015-08-18 13:46:02 -04:00
remoteproc remoteproc: Add support for TI power processor 2016-03-14 19:18:37 -04:00
reset reset: implement a reset test 2016-06-19 17:05:55 -06:00
rtc rtc: Tidy up the code style 2016-07-14 18:33:11 -04:00
serial serial: zynq: Read information about clock from DT 2016-07-22 14:04:40 +02:00
soc Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
sound of: clean up OF_CONTROL ifdef conditionals 2015-08-18 13:46:05 -04:00
spi dm: spi: Read default speed and mode values from DT 2016-07-09 20:16:34 +05:30
spmi spmi: Fix sandbox spmi driver memory corruption 2016-04-11 20:48:22 -04:00
thermal Fix various typos, scattered over the code. 2016-05-05 21:39:26 -04:00
timer Merge git://git.denx.de/u-boot-dm 2016-03-14 19:21:44 -04:00
tpm drivers/tpm/tpm_tis_sandbox.c: Fix uninitialized variable use 2016-04-15 08:14:37 -06:00
twserial drivers: convert makefiles to Kbuild style 2013-10-31 13:26:01 -04:00
usb usb: Kconfig: Add Kconfigs entry USB_EHCI_ZYNQ 2016-07-22 14:06:11 +02:00
video Various, unrelated tree-wide typo fixes. 2016-07-16 09:43:12 -04:00
watchdog imx_watchdog: always set minimal timeout in reset_cpu 2016-01-07 17:54:53 +01:00
Kconfig Add a reset driver framework/uclass 2016-06-19 17:05:55 -06:00
Makefile spl: Lightweight UBI and UBI fastmap support 2016-07-22 09:53:00 -04:00