u-boot-brain/doc
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
..
device-tree-bindings serial_sh: Add standrad SCI (w/o FIFO) support 2016-07-09 05:51:57 +09:00
DocBook
driver-model dm: Update the of-platdata README for the new features 2016-07-14 20:40:24 -06:00
SPI Fix various typos, scattered over the code. 2016-05-05 21:39:26 -04:00
SPL doc: SPL: Add README for secure boot support 2016-07-21 11:11:29 -07:00
uImage.FIT mkimage: fit: spl: Add an optional static offset for external data 2016-06-24 17:23:06 -04:00
feature-removal-schedule.txt Various, unrelated tree-wide typo fixes. 2016-07-16 09:43:12 -04:00
git-mailrc git-mailrc: add rockchip alias 2016-07-11 10:56:54 -04:00
I2C_Edge_Conditions
kwboot.1 Fix spelling of "transferred". 2016-03-22 12:16:16 -04:00
mkimage.1 mkimage: fit: spl: Add an optional static offset for external data 2016-06-24 17:23:06 -04:00
README.440-DDR-performance Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
README.ag101p
README.AMCC-eval-boards-cleanup
README.android-fastboot
README.android-fastboot-protocol
README.ARC
README.arm64 arm64: Remove non-full-va map code 2016-03-15 15:13:10 -04:00
README.arm-caches
README.ARM-memory-map
README.arm-relocation
README.at91
README.at91-soc Change my mailaddress 2016-05-02 18:37:09 -04:00
README.atmel_mci
README.atmel_pmecc Change my mailaddress 2016-05-02 18:37:09 -04:00
README.autoboot autoboot: remove CONFIG_ZERO_BOOTDELAY_CHECK 2016-07-01 17:42:55 -04:00
README.AVR32
README.AVR32-port-muxing
README.b4860qds Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
README.bedbug
README.bitbangMII
README.blackfin
README.bootmenu
README.bus_vcxk
README.cfi
README.clang arm: clang: Update support slightly 2016-04-01 17:17:39 -04:00
README.commands
README.commands.itest
README.commands.spl Fix various typos, scattered over the code. 2016-05-05 21:39:26 -04:00
README.console
README.davinci
README.davinci.nand_spl
README.dfutftp
README.displaying-bmps
README.distro Kconfig: Add a new DISTRO_DEFAULTS Kconfig option 2016-06-20 21:30:13 -04:00
README.dns
README.drivers.eth
README.efi efi_loader: Add README section in README.efi 2016-03-15 21:30:12 -04:00
README.enetaddr
README.esbc_validate
README.ext4 doc: Updated README.ext4 2016-04-18 17:11:47 -04:00
README.falcon
README.fdt-control Remove/update old generic-board documentation and warning 2016-05-27 15:39:50 -04:00
README.fec_mxc Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
README.fsl_iim
README.fsl-clk
README.fsl-ddr driver/ddr/fsl: Add address parity support for DDR4 UDIMM/discrete 2016-03-21 12:42:13 -07:00
README.fsl-dpaa
README.fsl-esdhc
README.fsl-hwconfig
README.fsl-trustzone-components
README.fuse
README.generic_usb_ohci
README.generic-board Remove/update old generic-board documentation and warning 2016-05-27 15:39:50 -04:00
README.gpt Various, unrelated tree-wide typo fixes. 2016-07-16 09:43:12 -04:00
README.Heterogeneous-SoCs
README.hwconfig
README.i2c
README.idma2intr
README.imx5
README.imx6 Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
README.imx25
README.imx27
README.imx31
README.imximage
README.iomux
README.JFFS2
README.JFFS2_NAND
README.kconfig
README.kwbimage
README.LED
README.LED_display
README.link-local
README.lynxkdi
README.m68k Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
README.m54418twr
README.malta Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
README.marubun-pcmcia Fix various typos, scattered over the code. 2016-05-05 21:39:26 -04:00
README.memory-test
README.menu Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
README.mips
README.mpc5xx
README.mpc74xx
README.mpc83xx.ddrecc
README.mpc83xxads Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
README.mpc85xx
README.mpc85xx-sd-spi-boot
README.mpc85xx-spin-table Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
README.mpc85xxads Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
README.mpc85xxcds Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
README.MPC866
README.mxc_hab
README.mxc_ocotp
README.mxs Fix various typos, scattered over the code. 2016-05-05 21:39:26 -04:00
README.mxsimage
README.N1213
README.nand mtd: nand: Patch remaining places where nand_to_mtd() should be used 2016-06-19 19:28:38 -05:00
README.nand-boot-ppc440
README.NDS32
README.ne2000
README.NetConsole
README.nios2
README.nokia_rx51
README.odroid odroid: Update README with correct firmware link and XU4 support 2016-04-14 19:38:40 +09:00
README.OFT
README.omap3
README.omap-reset-time
README.omap-ulpi-viewport
README.pblimage
README.plan9
README.POST Fix spelling of "transferred". 2016-03-22 12:16:16 -04:00
README.power-framework
README.ppc440
README.pxe Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
README.qemu-mips Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
README.ramboot-ppc85xx
README.rmobile
README.rockchip
README.s5pc1xx
README.sata Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
README.sched
README.scrapyard Various, unrelated tree-wide typo fixes. 2016-07-16 09:43:12 -04:00
README.semihosting
README.serial_multi
README.sh
README.sh7752evb
README.sh7753evb
README.sha1
README.silent
README.SNTP
README.socfpga
README.spear
README.SPL
README.splashprepare
README.srio-pcie-boot-corenet
README.standalone
README.t1040-l2switch
README.ti-secure doc: Update info on using secure devices from TI 2016-07-14 18:22:23 -04:00
README.TPL
README.trace
README.ubi
README.ubispl spl: Lightweight UBI and UBI fastmap support 2016-07-22 09:53:00 -04:00
README.ublimage
README.unaligned-memory-access.txt
README.uniphier ARM: uniphier: switch to raw U-Boot image 2016-03-24 01:45:41 +09:00
README.update
README.usb
README.vf610
README.video Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
README.VLAN
README.VSC3316-3308
README.vxworks
README.watchdog
README.x86 x86: acpi: Pack global NVS into ACPI table 2016-07-12 13:46:01 +08:00
README.zfs
README.zynq

#
# Xilinx ZYNQ U-Boot
#
# (C) Copyright 2013 Xilinx, Inc.
#
# SPDX-License-Identifier:	GPL-2.0+
#

1. About this

This document describes the information about Xilinx Zynq U-Boot -
like supported boards, ML status and TODO list.

2. Zynq boards

Xilinx Zynq-7000 All Programmable SoCs enable extensive system level
differentiation, integration, and flexibility through hardware, software,
and I/O programmability.

* zc702 (single qspi, gem0, mmc) [1]
* zc706 (dual parallel qspi, gem0, mmc) [2]
* zed (single qspi, gem0, mmc) [3]
* microzed (single qspi, gem0, mmc) [4]
* zc770
  - zc770-xm010 (single qspi, gem0, mmc)
  - zc770-xm011 (8 or 16 bit nand)
  - zc770-xm012 (nor)
  - zc770-xm013 (dual parallel qspi, gem1)

3. Building

 ex. configure and build for zc702 board
   $ make zynq_zc702_config
   $ make

4. Bootmode

Zynq has a facility to read the bootmode from the slcr bootmode register
once user is setting through jumpers on the board - see page no:1546 on [5]

All possible bootmode values are defined in Table 6-2:Boot_Mode MIO Pins
on [5].

board_late_init() will read the bootmode values using slcr bootmode register
at runtime and assign the modeboot variable to specific bootmode string which
is intern used in autoboot.

SLCR bootmode register Bit[3:0] values
#define ZYNQ_BM_NOR		0x02
#define ZYNQ_BM_SD		0x05
#define ZYNQ_BM_JTAG		0x0

"modeboot" variable can assign any of "norboot", "sdboot" or "jtagboot"
bootmode strings at runtime.

5. Mainline status

- Added basic board configurations support.
- Added zynq u-boot bsp code - arch/arm/cpu/armv7/zynq
- Added zynq boards named - zc70x, zed, microzed, zc770_xm010, zc770_xm012, zc770_xm013
- Added zynq drivers:
  serial - drivers/serial/serial_zynq.c
  net - drivers/net/zynq_gem.c
  mmc - drivers/mmc/zynq_sdhci.c
  mmc - drivers/mmc/zynq_sdhci.c
  spi-  drivers/spi/zynq_spi.c
  i2c - drivers/i2c/zynq_i2c.c
- Done proper cleanups on board configurations
- Added basic FDT support for zynq boards
- d-cache support for zynq_gem.c

6. TODO

- Add zynq boards support - zc770_xm011
- Add zynq qspi controller driver
- Add zynq nand controller driver
- Add FDT support on individual drivers

[1] http://www.xilinx.com/products/boards-and-kits/EK-Z7-ZC702-G.htm
[2] http://www.xilinx.com/products/boards-and-kits/EK-Z7-ZC706-G.htm
[3] http://zedboard.org/product/zedboard
[4] http://zedboard.org/product/microzed
[5] http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf

--
Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Sun Dec 15 14:52:41 IST 2013