summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeLines
* Merge branch 'u-boot-pxa/master' into 'u-boot-arm/master'Albert ARIBAUD2013-05-11-199/+724
|\
| * mtd: nand: add driver for diskonchip g4 nand flashMike Dunn2013-05-05-0/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a driver for the diskonchip G4 nand flash device. It is based on the driver from the linux kernel. This also includes a separate SPL driver. A separate SPL driver is used because the device operates in a different mode (reliable mode) when loading a boot image, and also because the storage format of the boot image is different from normal data (pages are stored redundantly). The SPL driver basically mimics how a typical IPL reads data from the device. The special operating mode and storage format are used to compensate for the fact that the IPL does not contain the BCH ecc decoding algorithm (due to size constraints). Although the u-boot SPL *could* use ecc, it operates like an IPL for the sake of simplicity and uniformity, since the IPL and SPL share the task of loading the u-boot image. As a side benefit, the SPL driver is very small. [port from linux kernel 3.4 commit 570469f3bde7f71cc1ece07a18d54a05b6a8775d] Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
| * lib: import bitrev library from the linux kernelMike Dunn2013-05-05-0/+23
| | | | | | | | | | | | | | | | | | | | | | This patch adds the bitrev library from the linux kernel. This is a simple algorithm that uses an 8 bit look-up table to reverse the bits in data types of 8, 16, or 32 bit widths. The docg4 nand flash driver uses it. [port from linux kernel v3.9 commit 7ee32a6d30d1c8a3b7a07a6269da8f0a08662927] [originally added: v2.6.20 by commit a5cfc1ec58a07074dacb6aa8c79eff864c966d12] Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
| * P1022DS: Set CONFIG_SPL_MAX_SIZE directlyTom Rini2013-05-03-1/+1
| | | | | | | | | | | | | | | | | | With the u-boot-with-spl.bin rule calling $(OBJCOPY) with CONFIG_SPL_PAD_TO, and CONFIG_SPL_PAD_TO defaulting to CONFIG_SPL_MAX_SIZE we cannot use math here, so set it to 4096 rather than 4 * 1024. Signed-off-by: Tom Rini <trini@ti.com>
| * Merge branch 'master' of git://git.denx.de/u-boot-mpc85xxTom Rini2013-05-02-14/+119
| |\
| | * powerpc/85xx: set USB2 default mode to 'device' for (super)hydra boardsShaohui Xie2013-05-02-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Hydra and Superhydra (P3041DS, P5020DS, and P5040DS) boards have a second USB port that can be configured in either host, peripheral (aka device), or OTG (on-the-go) mode. When configured in host mode, if the port is connected to another USB host, damage to the board can occur. To avoid this, we change the default setting to peripheral mode. Ideally, we'd set it to OTG mode, but currently there is no OTG support for these boards. Setting the hwconfig variable will also update the device tree, and so Linux will configure the port for peripheral mode as well. Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Signed-off-by: Timur Tabi <timur@tabi.org> Signed-off-by: Andy Fleming <afleming@freescale.com>
| | * powerpc/p1022ds: Add support for NAND and NAND boot using SPLMatthew McClintock2013-05-02-14/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add defines needed to access NAND, remove second flash bank that is actually connected to NAND. Add nand booting support for P1022DS with hardcoded DDR config using SPL framework from 2011 Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com> Signed-off-by: Jiang Yutang <b14898@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Andy Fleming <afleming@freescale.com>
| * | Merge branch 'master' of git://git.denx.de/u-boot-mpc5xxxTom Rini2013-05-02-31/+64
| |\ \ | | |/ | |/|
| | * mpc5200: a3m071/a4m2k: Miscellaneous updates and fixesStefan Roese2013-05-02-25/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The changes to a3m071/a4m2k in summary are: - Enable CAN1 on I2C in GPS Port Configuration - Enable SPI on PSC2 - Activate network console - New flash partitioning - Fix some typos - Pass host name to Linux - Change rootfs to squashfs,jffs2 - Enable UBI/UBIFS support - Enable FIT support Signed-off-by: Stefan Roese <sr@denx.de>
| | * mpc5200: a3m071/a4m2k: Fix problem with increased global_data structStefan Roese2013-05-02-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The v2013.04 release has this patch set included: 5cb48582 "Add architecture-specific global data" With this, the global_data struct is now common and new variables have been added. Resulting in a bigger struct. Unfortunately the currently allocated 128 bytes are just a bit too small for this new struct. This patch now uses the automatically generated struct size instead to not run into this problem again. Please note that this problem might hit some other platforms which currently reserve a tight space of 128 bytes for the global_data struct! Signed-off-by: Stefan Roese <sr@denx.de>
| | * mpc5200: a3m071/a4m2k: Enable flash verify optionStefan Roese2013-05-02-0/+1
| | | | | | | | | | | | Signed-off-by: Stefan Roese <sr@denx.de>
| | * mpc512x: remove dead codeAnatolij Gustschin2013-05-02-3/+0
| | | | | | | | | | | | | | | | | | | | | The prt_mpc512x_clks() function isn't referenced anywhere and its prototype is wrong. Remove it. Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * | omap5_uevm: Enable redundant MMC environmentTom Rini2013-05-01-0/+2
| | | | | | | | | | | | | | | Cc: Sricharan R <r.sricharan@ti.com> Signed-off-by: Tom Rini <trini@ti.com>
| * | mx28evk: Guard NAND-related ENV defines with CONFIG_ENV_IS_IN_NANDTom Rini2013-05-01-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The redundancy related defines are only correct for NAND, so guard all of that area with CONFIG_ENV_IS_IN_NAND Cc: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Tom Rini <trini@ti.com>
| * | tx25: add CONFIG_SPL_LIBGENERIC_SUPPORTAndreas Bießmann2013-05-01-0/+1
| | | | | | | | | | | | | | | | | | | | | In order to use the generic hang() later on pull libgeneric in SPL. This has no impact on the SPL size. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
| * | mx31pdk: add CONFIG_SPL_LIBGENERIC_SUPPORTAndreas Bießmann2013-05-01-0/+1
| | | | | | | | | | | | | | | | | | | | | In order to use the generic hang() later on pull libgeneric in SPL. This has no impact on the SPL size. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
| * | part/dev_desc: Add log2 of blocksize to block_dev_desc data structEgbert Eich2013-05-01-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | log2 of the device block size serves as the shift value used to calculate the block number to read in file systems when implementing avaiable block sizes. It is needed quite often in file systems thus it is pre-calculated and stored in the block device descriptor. Signed-off-by: Egbert Eich <eich@suse.com>
| * | disk/iso: Add Support for block sizes > 512 byte to ISO partition supportEgbert Eich2013-05-01-1/+1
| | | | | | | | | | | | | | | | | | | | | For ISO we check the block size of the device if this is != the CD sector size we assume that the device has no ISO partition. Signed-off-by: Egbert Eich <eich@suse.com>
| * | disk/gpt: Fix GPT partition handling for blocksize != 512Egbert Eich2013-05-01-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | Disks beyond 2T in size use blocksizes of 4096 bytes. However a lot of code in u-boot still assumes a 512 byte blocksize. This patch fixes the handling of GPTs. Signed-off-by: Egbert Eich <eich@suse.com>
| * | mmc: Define a constant for the maximum block sizeSimon Glass2013-05-01-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The number 512 appears quite a bit in the mmc code. Add a constant for this so that it can be used here and in other parts of the code (e.g. SPL code which loads from mmc). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@google.com>
| * | amcc-common.h: enable support for "env grep", "setexpr", and regex.Wolfgang Denk2013-05-01-0/+3
| | | | | | | | | | | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Stefan Roese <sr@denx.de>
| * | amcc-common.h: minor white space cleanupWolfgang Denk2013-05-01-3/+3
| | | | | | | | | | | | | | | | | | | | | Align some comments. Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Stefan Roese <sr@denx.de>
| * | m28evk: enable "env grep" and regexp supportWolfgang Denk2013-05-01-0/+3
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> Conflicts: include/configs/m28evk.h
| * | m28evk: white space cleanupWolfgang Denk2013-05-01-128/+128
| | | | | | | | | | | | | | | | | | | | | Change all "#define<TAB>" sequences into "#define<SPACE>" Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Marek Vasut <marex@denx.de>
| * | "env grep" - add support for regular expression matchesWolfgang Denk2013-05-01-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CONFIG_REGEX is enabled, the new option "-e" becomes available which causes regular expression matches to be used. This allows for example things like these: - print all MAC addresses: => env grep -e eth.*addr eth1addr=00:10:ec:80:c5:15 ethaddr=00:10:ec:00:c5:15 - print all variables that have at least 2 colons in their value: => env grep -v -e :.*: addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1 eth1addr=00:10:ec:80:c5:15 ethaddr=00:10:ec:00:c5:15 ver=U-Boot 2013.04-rc1-00289-g497746b-dirty (Mar 22 2013 - 12:50:25) etc. Signed-off-by: Wolfgang Denk <wd@denx.de>
| * | Add SLRE - Super Light Regular Expression libraryWolfgang Denk2013-05-01-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Downloaded from http://slre.sourceforge.net/ and adapted for U-Boot environment. Used to implement regex operations on environment variables. Code size is ~ 3.5 KiB on PPC. To enable this code, define the CONFIG_REGEX option in your board config file. Note: There are more recent versions of the SLRE library available at http://slre.googlecode.com ; unfortunately, the new code has a heavily reorked API which makes it less usable for our purposes: - the return code is strings, which are more difficult to process - we don't get any information any more which sub-string of the data was matched by the given regex - it is much more cumbersome to work with arbitrary expressions, where for example the number of substrings for capturing are not known at compile time Also, there does not seem to be any real changes or improvements of the functionality. Because of this, we deliberately stick with the older code. Note 2: the test code (built when SLRE_TEST is defined) was modified to allow for more extensive testing; now we can test the regexp matching on all lines on a text file (instead of the whole data in the file as a single block). Signed-off-by: Wolfgang Denk <wd@denx.de>
| * | "env grep" - reimplement command using hexport_r()Wolfgang Denk2013-05-01-6/+0
| | | | | | | | | | | | | | | | | | | | | Also drop hstrstr_r() which is not needed any more. The new code is way more flexible. Signed-off-by: Wolfgang Denk <wd@denx.de>
| * | hashtable: preparations to use hexport_r() for "env grep"Wolfgang Denk2013-05-01-1/+7
| |/ | | | | | | | | | | | | | | | | | | The output of "env grep" is unsorted, and printing is done by a private implementation to parse the hash table. We have all the needed code in place in hexport_r() alsready, so let's use this instead. Here we prepare the code for this, without any functional changes yet. Signed-off-by: Wolfgang Denk <wd@denx.de>
| * sandbox: config: Enable CONFIG_FIT and CONFIG_CMD_FITSimon Glass2013-05-01-0/+2
| | | | | | | | | | | | Enable these options to use FITs on sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
| * sandbox: fs: Add support for saving files to host filesystemSimon Glass2013-05-01-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This allows write of files from the host filesystem in sandbox. There is currently no concept of overwriting the file and removing its existing contents - all writing is done on top of what is there. This means that writing 10 bytes to the start of a 1KB file will only update those 10 bytes, not truncate the file to 10 byte slong. If the file does not exist it is created. Signed-off-by: Simon Glass <sjg@chromium.org>
| * fs: Add support for saving data to filesystemsSimon Glass2013-05-01-0/+2
| | | | | | | | | | | | | | Add a new method for saving that filesystems can implement. This mirrors the existing load method. Signed-off-by: Simon Glass <sjg@chromium.org>
| * Add getenv_hex() to return an environment variable as hexSimon Glass2013-05-01-0/+13
| | | | | | | | | | | | | | | | This conversion is required in a number of places in U-Boot. Add a standard function to provide this feature, so we avoid all the different variations in the way it is coded. Signed-off-by: Simon Glass <sjg@chromium.org>
| * sandbox: Add CONFIG_OF_HOSTFILE to read FDT from host fileSimon Glass2013-05-01-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | With sandbox it is tricky to add an FDT to the image at build time (or later) since we build an ELF file, not a plain binary, and the address space of the whole U-Boot is not accessible in the emulated memory map of sandbox. Sandbox can read files directly from the host, though, so add an option to read an FDT from a host file on start-up. Signed-off-by: Simon Glass <sjg@chromium.org>
| * sandbox: Switch over to generic boardSimon Glass2013-05-01-4/+5
| | | | | | | | | | | | | | | | | | Add generic board support for sandbox. and remove the old board init code. Select CONFIG_SYS_GENERIC_BOARD for sandbox now that this is supported. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com>
| * sandbox: Provide a way to map from host RAM to U-Boot RAMSimon Glass2013-05-01-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In many cases, pointers to memory are passed around, and these pointers refer to U-Boot memory, not host memory. This in itself is not a problem. However, in a few places, we cast that pointer back to a ulong (being a U-Boot memory address). It is possible to convert many of these cases to avoid this. However there are data structures (e.g. struct bootm_headers) which use pointers. We could with a lot of effort adjust the structs and all code that uses them to use ulong instead of pointers. This seems like an unacceptable cost, since our objective with sandbox is to minimise the impact on U-Boot code while maximising the features available to sandbox. Therefore, create a map_to_sysmem() function which converts from a pointer to a U-Boot address. This can be used sparingly when needed. Signed-off-by: Simon Glass <sjg@chromium.org>
| * Merge branch 'microblaze' of git://www.denx.de/git/u-boot-microblazeTom Rini2013-05-01-1/+16
| |\
| | * watchdog: Add support for Xilinx Microblaze watchdogMichal Simek2013-04-30-0/+8
| | | | | | | | | | | | | | | | | | | | | Watchdog can be used on Microblaze, PPC and Zynq hw designs. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@ti.com>
| | * microblaze: Enable netconsoleMichal Simek2013-04-30-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | Setup environment and enable netconsole. Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@ti.com>
| * | Merge branch 'master' of git://www.denx.de/git/u-boot-ppc4xxTom Rini2013-04-22-3/+65
| |\ \
| | * | ppc4xx: Add lcd4_lwmon5 supportStefan Roese2013-04-22-3/+65
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the fast booting LWMON5 derivat "lcd4_lwmon5". Its a stripped down version of the full blown lwmon5 support, without ECC, USB, POST and some other stuff. It used the newly introduced SPL infrastrucure for SPL from NOR flash booting on the PPC4xx. By setting the environment variable "boot_os" to "yes", Linux will be started from the SPL version. If not, the "normal" U-Boot will be started. Signed-off-by: Stefan Roese <sr@denx.de>
| * | config_cmd_default.h: Remove CONFIG_CMD_MEMTESTTom Rini2013-04-19-1/+0
| |/ | | | | | | | | | | | | As per doc/feature-removal-schedule.txt, remove CONFIG_CMD_MEMTEST from default list of commands. Signed-off-by: Tom Rini <trini@ti.com>
* | fpga: Remove all CONFIG_SYS_* fpga related optionsMichal Simek2013-05-06-60/+6
| | | | | | | | | | | | | | | | All these macros are completely unused by any code. CONFIG_FPGA is not a bitfield anymore. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@ti.com>
* | fpga: Check device name against bitstream nameMichal Simek2013-05-06-4/+7
| | | | | | | | | | | | | | | | Ensure that wrong bitstream won't be loaded to current device. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@ti.com>
* | fpga: zynq: Add support for loading bitstreamMichal Simek2013-05-06-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | Devcfg device requires to load bitstream in binary format. But u-boot also has an option for loading bitstream in bit format. Let's handle both cases by zynqpl driver. Also add suport for loading partial bitstreams. The first driver version was done by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@ti.com>
* | fpga: Change the first parameter in fpga_loadbitstreamMichal Simek2013-05-06-1/+1
| | | | | | | | | | | | | | | | | | All fpga functions use devnum as int. Only fpga_loadbitstream is using it as unsinged long dev. This patch synchronize it. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@ti.com>
* | cmd: fpga: Move fpga_loadbitstream to fpga.cMichal Simek2013-05-06-0/+1
| | | | | | | | | | | | | | | | | | In bitstream decoding you can directly check device which you want to load and in fpga.c are fpga_validate and fpga_dev_info functions which should be used for it. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@ti.com>
* | i2c: zynq: Add support for Xilinx ZynqMichal Simek2013-04-30-0/+11
| | | | | | | | | | | | | | | | | | Support Xilinx Zynq i2c controller. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Heiko Schocher <hs@denx.de> Reviewed-by: Tom Rini <trini@ti.com>
* | mmc: Add support for Xilinx Zynq sdhci controllerMichal Simek2013-04-30-0/+16
| | | | | | | | | | | | | | Add support for SD, MMC and eMMC card on Xilinx Zynq. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@ti.com>
* | net: gem: Preserve clk on emio interfaceDavid Andrey2013-04-30-1/+1
| | | | | | | | | | | | | | | | | | | | | | Avoid overwriting GEMx_RCLK_CTRL and GEMx_CLK_CTRL if the Ethernet interface is connect on EMIO Do not enable emio for this standard board configuration for now. Signed-off-by: David Andrey <david.andrey@netmodule.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@ti.com>
* | net: gem: Pass phy address to initDavid Andrey2013-04-30-1/+2
| | | | | | | | | | | | | | | | | | Pass the PHY address to the driver init to allow parallel use of both interfaces Signed-off-by: David Andrey <david.andrey@netmodule.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@ti.com>