summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Power: remove support for Freescale MPC8220Wolfgang Denk2013-05-158-1691/+1
| | | | | | | | | | The Freescale MPC8220 Power Architecture processors have long reached EOL; Freescale does not even list these any more on their web site. Remove the code to avoid wasting maitaining efforts on dead stuff. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Andy Fleming <afleming@gmail.com>
* image: Add device tree setup to image librarySimon Glass2013-05-144-13/+62
| | | | | | | | | | | This seems to be a common function for several architectures, so create a common function rather than duplicating the code in each arch. Also make an attempt to avoid introducing #ifdefs in the new code, partly by removing useless #ifdefs around function declarations in the image.h header. Signed-off-by: Simon Glass <sjg@chromium.org>
* image: Add CONFIG_FIT_SPL_PRINT to control FIT image printing in SPLSimon Glass2013-05-141-2/+31
| | | | | | | | This code is very large, and in SPL it isn't always useful to print out image information (in fact there might not even be a console active). So disable this feature unless this option is set. Signed-off-by: Simon Glass <sjg@chromium.org>
* image: Remove remaining #ifdefs in image-fit.cSimon Glass2013-05-141-0/+2
| | | | | | | There are only two left. One is unnecessary and the other can be moved to the header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: image: Add support for booting images in sandboxSimon Glass2013-05-141-1/+1
| | | | | | | | | | | | | | | | | Much of the image code uses addresses as ulongs and pointers interchangeably, casting between the two forms as needed. This doesn't work with sandbox, which has a U-Boot RAM buffer which is separate from the host machine's memory. Adjust the cost so that translating from a U-Boot address to a pointer uses map_sysmem(). This allows bootm to work correctly on sandbox. Note that there are no exhaustive tests for this code on sandbox, so it is possible that some dark corners remain. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de> (v1)
* image: Rename hash printing to fit_image_print_verification_data()Simon Glass2013-05-141-1/+0
| | | | | | | | This function will be used to print signatures as well as hashes, so rename it. Also make it static since it is not used outside this file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
* image: Rename fit_add_hashes() to fit_add_verification_data()Simon Glass2013-05-141-2/+8
| | | | | | | | | We intend to add signatures to FITs also, so rename this function so that it is not specific to hashing. Also rename fit_image_set_hashes() and make it static since it is not used outside this file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
* image: Export fit_conf_get_prop_node()Simon Glass2013-05-141-0/+14
| | | | | | | This function will be needed by signature checking code, so export it, and also add docs. Signed-off-by: Simon Glass <sjg@chromium.org>
* image: Move hash checking into its own functionSimon Glass2013-05-141-3/+5
| | | | | | | | The existing function is long and most of the code is indented a long way. Before adding yet more code, split this out into its own function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de> (v1)
* image: Rename fit_image_check_hashes() to fit_image_verify()Simon Glass2013-05-141-2/+2
| | | | | | | | | This is the main entry point to the FIT image verification code. We will be using it to handle image verification with signatures, so rename the function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
* image: Convert fit_image_hash_set_value() to static, and renameSimon Glass2013-05-141-2/+0
| | | | | | | | | This function doesn't need to be exported, and with verification we want to use it for setting the 'value' property in any node, so rename it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
* image: Move HOSTCC image code to tools/Simon Glass2013-05-141-0/+3
| | | | | | | | This code is never compiled into U-Boot, so move it into a separate file in tools/ to avoid the large #ifdef. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
* image: Export fit_check_ramdisk()Simon Glass2013-05-141-0/+3
| | | | | | | | One we split out the FIT code from image.c we will need this function. Export it in the header. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
* image: Move timestamp #ifdefs to header fileSimon Glass2013-05-141-0/+8
| | | | | | | | | | | | | | | Rather than repeat the line #if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE) || \ defined(USE_HOSTCC) everywhere, put this in a header file and #define IMAGE_ENABLE_TIMESTAMP to either 1 or 0. Then we can use a plain if() in most code and avoid the #ifdefs. The compiler's dead code elimination ensures that the result is the same. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de>
* libfdt: Add fdt_next_subnode() to permit easy subnode iterationSimon Glass2013-05-141-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Iterating through subnodes with libfdt is a little painful to write as we need something like this: for (depth = 0, count = 0, offset = fdt_next_node(fdt, parent_offset, &depth); (offset >= 0) && (depth > 0); offset = fdt_next_node(fdt, offset, &depth)) { if (depth == 1) { /* code body */ } } Using fdt_next_subnode() we can instead write this, which is shorter and easier to get right: for (offset = fdt_first_subnode(fdt, parent_offset); offset >= 0; offset = fdt_next_subnode(fdt, offset)) { /* code body */ } Also, it doesn't require two levels of indentation for the loop body. Signed-off-by: Simon Glass <sjg@chromium.org> (Cherry-picked from dtc commit 4e76ec79) Acked-by: Gerald Van Baren <vanbaren@cideas.com>
* bootstage: Don't build for HOSTCCSimon Glass2013-05-141-2/+3
| | | | | | | | We don't measure boot timing on the host, or with SPL, so use both conditions in the bootstage header. This allows us to avoid using conditional compilation around bootstage_...() calls. (#ifdef) Signed-off-by: Simon Glass <sjg@chromium.org>
* hash: Add a way to calculate a hash for any algortihmSimon Glass2013-05-141-0/+22
| | | | | | | | | | | Rather than needing to call one of many hashing algorithms in U-Boot, provide a function hash_block() which handles this, and can support all available hash algorithms. Once we have md5 supported within hashing, we can use this function in the FIT image code. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge branch 'master' of git://git.denx.de/u-boot-blackfin into ↵Tom Rini2013-05-147-29/+50
|\ | | | | | | powerpc-eldk53-warning-fixes
| * bfin: Move gpio support for bf54x and bf60x into the generic driver folder.Sonic Zhang2013-05-133-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gpio spec for bf54x and bf60x differ a lot from the old gpio driver for bf5xx. A lot of machine macros are used to accomodate both code in one gpio driver. This patch split the old gpio driver and move new gpio2 support to the generic gpio driver folder. - To enable gpio2 driver, macro CONFIG_ADI_GPIO2 should be defined in the board's config header file. - The gpio2 driver supports bf54x, bf60x and future ADI processors, while the older gpio driver supports bf50x, bf51x, bf52x, bf53x and bf561. - All blackfin specific gpio function names are replaced by the generic gpio APIs. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
| * blackfin: Move blackfin serial driver out of blackfin arch folder.Sonic Zhang2013-05-131-0/+3
| | | | | | | | | | | | | | | | - Move blackfin serial driver to the generic driver folder. - Move blackfin serial headers to blackfin arch head folder. - Update the include path to blackfin serial header in start up code. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
| * blackfin: Move blackfin watchdog driver out of the blackfin arch folder.Sonic Zhang2013-05-132-2/+7
| | | | | | | | | | | | | | | | | | | | - Enable hw_watchdog_init() in watchdog.h if CONFIG_HW_WATCHDOG is defined. - Move blackfin hw watchdog driver to the generic driver folder. - Call hw_watchdog_init() from blackfin board init code. - Reuse macro CONFIG_WATCHDOG_TIMEOUT_MSECS - Update README.watchdog accordingly Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
| * blackfin: Enable early print via the generic serial API.Sonic Zhang2013-05-131-3/+0
| | | | | | | | | | | | | | | | | | | | | | Remove blackfin specific implementation of the generic serial API when early print macro is defined. In BFIN_BOOT_BYPASS mode, don't call generic serial_puts, because early print in bypass mode is running before code binary is relocated to the link address. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
| * blackfin: Fit u-boot image size into limited nor flash on blackfin.Sonic Zhang2013-05-133-10/+14
| | | | | | | | | | | | | | | | | | | | - Disable NAND driver on bf537-stamp. - Make MMC_SPI optional. - Disable LCD driver on bf527-ezkit. - Enlarge BF609 nor flash reserved size from 256k to 512k bytes. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
| * blackfin: bf609: add softswitch config commandBob Liu2013-05-131-0/+1
| | | | | | | | | | | | | | Add softswitch_output command for bf609-ezkit to enable softswitches. Signed-off-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
| * blackfin: run core1 from L1 code sram start address in uboot init code on core 0Sonic Zhang2013-05-132-0/+10
| | | | | | | | | | | | | | | | Define core 1 L1 code sram start address. Add function to enable core 1 for BF609 and BF561. Add config macro to allow customer to run core 1 in uboot init code on core 0. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
| * blackfin: reduce size of u-boot.ldr in bf548-ezkit default config.Bob Liu2013-05-131-14/+9
| | | | | | | | | | | | | | Enable VIDEO and NAND supports only when the config options is defined. Signed-off-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
* | x86: config: Enable LZO for coreboot, remove zlib, gzipSimon Glass2013-05-131-0/+4
| | | | | | | | | | | | We don't use zlib and gzip but do use lzo, so enable this. Signed-off-by: Simon Glass <sjg@chromium.org>
* | bootstage: Allow marking a particular line of codeSimon Glass2013-05-131-0/+23
| | | | | | | | | | | | | | | | Add a function which allows a (file, function, line number) to be marked in bootstage. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
* | x86: Enable bootstage for corebootSimon Glass2013-05-131-0/+9
| | | | | | | | | | | | | | This is a convenient way of finding out where boottime is going. Enable it for coreboot. Signed-off-by: Simon Glass <sjg@chromium.org>
* | bootstage: Copy bootstage strings post-relocationDoug Anderson2013-05-131-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Any pointers to name strings that were passed to bootstage_mark_name() pre-relocation should be copied post-relocation so that they don't get trashed as the original location of U-Boot is re-used for other purposes. This change introduces a new API call that should be called from board_init_r() after malloc has been initted on any board that uses bootstage. Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* | bootstage: Add stubs for new bootstage functionsSimon Glass2013-05-131-0/+16
| | | | | | | | | | | | | | | | | | Some functions don't have a stub for when CONFIG_BOOTSTAGE is not defined. Add one to avoid #ifdefs in the code when this is used in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Che-Liang Chiou <clchiou@chromium.org> Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
* | x86: Re-enable PCAT timer 2 for beepingSimon Glass2013-05-131-0/+1
| | | | | | | | | | | | | | | | While we don't want PCAT timers for timing, we want timer 2 so that we can still make a beep. Re-purpose the PCAT driver for this, and enable it in coreboot. Signed-off-by: Simon Glass <sjg@chromium.org>
* | x86: Add TSC timerSimon Glass2013-05-131-3/+1
|/ | | | | | | | | | | | | | This timer runs at a rate that can be calculated, well over 100MHz. It is ideal for accurate timing and does not need interrupt servicing. Tidy up some old broken and unneeded implementations at the same time. To provide a consistent view of boot time, we use the same time base as coreboot. Use the base timestamp supplied by coreboot as U-Boot's base time. Signed-off-by: Simon Glass <sjg@chromium.org>base Signed-off-by: Simon Glass <sjg@chromium.org>
* Move FDT_RAMDISK_OVERHEAD from fdt.h to libfdt_env.hGerald Van Baren2013-05-102-2/+3
| | | | | | | The define should not have been put in fdt.h originally, libfdt_env.h is the proper place for target-specific customizations. Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
* Added license header to dtc/libfdt/fdt.h and libfdt_env.hJustin Sobota2013-05-101-0/+51
| | | | | | | | | | | | | | | This commit adds a license header to fdt.h and libfdt_env.h because the license was omitted. U-Boot note: the u-boot libfdt_env.h header portion was not applied to the u-boot libfdt_env.h because that file was created by Gerald Van Baren (with a license header). - gvb Ref: DTC commit 27cdc1b1 Signed-off-by: Justin Sobota <jsobota@ti.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
* Fix typoFrançois Revol2013-05-101-1/+1
| | | | | | Ref: DTC commit cc11e522 Signed-off-by: François Revol <revol@free.fr>
* Export fdt_stringlist_contains()Simon Glass2013-05-101-0/+14
| | | | | | | | | This function is useful outside libfdt, so export it. Ref: DTC commit b7aa300e Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: David Gibson <david@gibson.dropbear.id.au>
* fs/ext4: Support device block sizes != 512 bytesEgbert Eich2013-05-102-9/+4
| | | | | | | | | The 512 byte block size was hard coded in the ext4 file systems. Large harddisks today support bigger block sizes typically 4096 bytes. This patch removes this limitation. Signed-off-by: Egbert Eich <eich@suse.com>
* gpio: Add support for microblaze xilinx GPIOMichal Simek2013-05-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Microblaze uses gpio which is connected to the system reset. Currently gpio subsystem wasn't used for it. Add gpio driver and change Microblaze reset logic to be done via gpio subsystem. There are various configurations which Microblaze can have that's why gpio_alloc/gpio_alloc_dual(for dual channel) function has been introduced and gpio can be allocated dynamically. Adding several gpios IP is also possible and supported. For listing gpio configuration please use "gpio status" command This patch also remove one compilation warning: microblaze-generic.c: In function 'do_reset': microblaze-generic.c:38:47: warning: operation on '*1073741824u' may be undefined [-Wsequence-point] Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* Merge branch 'master' of git://www.denx.de/git/u-boot-mmcTom Rini2013-05-071-0/+30
|\
| * mmc: Split device init to decouple OCR-polling delayChe-Liang Chiou2013-05-061-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of time that MMC driver spends on initializing a device is polling OCR (operation conditions register). To decouple this polling loop, device init is split into two parts: The first part fires the OCR query command, and the second part polls the result. So the caller is now no longer bound to the OCR-polling delay; he may fire the query, go somewhere and then come back later for the result. To use this, call mmc_set_preinit() on any device which needs this. This can save significant amounts of time on boot (e.g. 200ms) by hiding the MMC init time behind other init. Signed-off-by: Che-Liang Chiou <clchiou@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
* | usb: common: Use a global definition for 'min3'Vivek Gautam2013-05-061-4/+21
| | | | | | | | | | | | | | | | | | We can use a common global method for calculating minimum of 3 numbers. Put the same in 'common header' and let 'ehci' use it. Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> Acked-by: Tom Rini <trini@ti.com>
* | usb: fix: Fixing Port status and feature number constantsVivek Gautam2013-05-061-16/+23
| | | | | | | | | | | | | | Fix the Port status bit constants and Port feature number constants as a part of USB 2.0 and USB 3.0 Hub class. Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
* | USB: SS: Add support for Super Speed USB interfaceVivek Gautam2013-05-052-1/+29
| | | | | | | | | | | | | | | | This adds usb framework support for super-speed usb, which will further facilitate to add stack support for xHCI. Signed-off-by: Vikas C Sajjan <vikas.sajjan@samsung.com> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
* | USB: Some cleanup prior to USB 3.0 interface additionVivek Gautam2013-05-051-1/+1
| | | | | | | | | | | | | | Some cleanup in usb framework, nothing much on feature side. Signed-off-by: Vikas C Sajjan <vikas.sajjan@samsung.com> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
* | usb: Add new command to set USB 2.0 port test modesJulius Werner2013-05-051-0/+13
|/ | | | | | | | | This patch adds a new 'usb test' command, that will set a port to a USB 2.0 test mode (see USB 2.0 spec 7.1.20). It supports all five test modes on both downstream hub ports and ordinary device's upstream ports. In addition, it supports EHCI root hub ports. Signed-off-by: Julius Werner <jwerner@chromium.org>
* P1022DS: Set CONFIG_SPL_MAX_SIZE directlyTom Rini2013-05-031-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-022-14/+119
|\
| * powerpc/85xx: set USB2 default mode to 'device' for (super)hydra boardsShaohui Xie2013-05-021-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-021-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>
OpenPOWER on IntegriCloud