summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeLines
...
| * | | ums: use get_device() not find_mmc_device();Stephen Warren2014-05-08-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_device() is a generic routine that will support any type of block device. Use this instead of the type-specific find_mmc_device(), for future flexibility. Cc: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
| * | | ums: move IO support code to common locationStephen Warren2014-05-08-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's nothing Samsung-/board-specfic about the implementation of ums_init(). Move the code into cmd_usb_mass_storage.c, so that it can be shared by any user of that command. Cc: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
| * | | usb: ums: add error handling for failed registrationStephen Warren2014-05-08-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this, if g_dnl_register() fails, the UMS code continues on blindly and crashes. This fix makes it simply print an error message instead. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* | | | common/board_f: Fix size variableYork Sun2014-05-12-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DRAM size should use 64-bit variable when the size could be more than 4GB. Caught and verified on P4080DS with 4GB DDR. Signed-off-by: York Sun <yorksun@freescale.com> Acked-by: Simon Glass <sjg@chromium.org>
* | | | common/board_f: Initialized global data for generic boardYork Sun2014-05-12-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some platforms (tested on mpc85xx, mpc86xx) use global data before calling function baord_inti_f(). The data should not be cleared later. Any arch which uses global data in generic board board_init_f() should define CONFIG_SYS_GENERIC_GLOBAL_DATA. Signed-off-by: York Sun <yorksun@freescale.com> CC: Scott Wood <scottwood@freescale.com> CC: Simon Glass <sjg@chromium.org> CC: Albert ARIBAUD <albert.u.boot@aribaud.net> Acked-by: Simon Glass <sjg@chromium.org>
* | | | cmd_bootm.c: Only say XIP image when load is image_startTom Rini2014-05-12-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We say we have an XIP (in this case, image loaded at desired execution address) when the image header has been offset in the load. It's possible that in some cases executing the header is non-fatal but that's not true in many other cases. Signed-off-by: Tom Rini <trini@ti.com>
* | | | hush shell: Avoid string write overflow when entering max cmd lengthKristian Otnes2014-05-12-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | console_buffer array is defined to be CONFIG_SYS_CBSIZE + 1 long, whereas the_command array only CONFIG_SYS_CBSIZE long. Subsequent use of strcpy(the_command, console_buffer) will write final \0 terminating byte outside the_command array when entering a command of max length. Signed-off-by: Kristian Otnes <kotnes <at> cisco <dot> com>
* | | | cmd_time: do not show ticksMasahiro Yamada2014-05-12-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The command "time" shows the execution time of the command given to the argument, like this: time: 45.293 seconds, 45293 ticks Since we adopted CONFIG_SYS_HZ = 1000 for all boards, we always have a simple formula: "1 tick = 0.0001 second". Showing ticks looks almost redundant. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | | | bd_info: remove bi_barudrate member from struct bd_infoMasahiro Yamada2014-05-12-23/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gd->bd->bi_baudrate is a copy of gd->baudrate. Since baudrate is a common feature for all architectures, keep gd->baudrate only. It is true that bi_baudrate was passed to the kernel in that structure but it was a long time ago. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Tom Rini <trini@ti.com> Cc: Simon Glass <sjg@chromium.org> Cc: Wolfgang Denk <wd@denx.de> Cc: Heiko Schocher <hs@denx.de> Acked-by: Michal Simek <monstr@monstr.eu> (For microblaze)
* | | | Merge branch 'tom' of git://git.denx.de/u-boot-x86Tom Rini2014-05-09-14/+19
|\ \ \ \ | |_|_|/ |/| | |
| * | | Make 'run' use run_command_list() instead of run_command()Simon Glass2014-05-09-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the case where an environment variable spans multiple lines, we should use run_command_list() so that all lines are executed. This shold be backwards compatible with existing behaviour for existing scripts. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | | sandbox: Support 'env import' and 'env export'Simon Glass2014-05-09-13/+18
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Adjust the code for these commands so that they work on sandbox. Signed-off-by: Simon Glass <sjg@chromium.org> (Adjusted to fix minor merge comflict, when applied) Change-Id: I987dee6194cd5c83f82604caf894fc85e4eb71a8
* | | Merge branch 'u-boot/master'Albert ARIBAUD2014-05-09-287/+649
|\ \ \ | |/ / | | / | |/ |/| | | | | Conflicts: drivers/net/Makefile (trivial merge)
| * USB: gadget: added a saner gadget downloader registration APIMateusz Zalega2014-05-05-5/+3
| | | | | | | | | | | | | | | | | | | | Preprocessor definitions and hardcoded implementation selection in g_dnl core were replaced by a linker list made of (usb_function_name, bind_callback) pairs. Signed-off-by: Mateusz Zalega <m.zalega@samsung.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Acked-by: Marek Vasut <marex@denx.de>
| * usb: dfu: fix boards wo USB cable detectionMateusz Zalega2014-05-05-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Former usb_cable_connected() patch broke compilation of boards which do not support this feature. I've renamed usb_cable_connected() to g_dnl_usb_cable_connected() and added its default implementation to gadget downloader driver code. There's only one driver of this kind and it's unlikely there'll be another, so there's no point in keeping it in /common. Previously this function was declared in usb.h. I've moved it, since it's more appropriate to keep it in g_dnl.h - usb.h seems to be intended for USB host implementation. Existing code, confronted with default -EOPNOTSUPP return value, continues as if the cable was connected. CONFIG_USB_CABLE_CHECK was removed. Change-Id: Ib9198621adee2811b391c64512f14646cefd0369 Signed-off-by: Mateusz Zalega <m.zalega@samsung.com> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
| * usb: Fix USB keyboard polling via control endpointAdrian Cox2014-04-30-11/+25
| | | | | | | | | | | | | | | | | | | | USB keyboard polling failed for some keyboards on PowerPC 5020. This was caused by requesting only 4 bytes of data from keyboards that produce an 8 byte HID report. Signed-off-by: Adrian Cox <adrian@humboldt.co.uk> Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Marek Vasut <marex@denx.de>
| * Merge branch 'master' of git://git.denx.de/u-boot-mpc85xxTom Rini2014-04-25-7/+170
| |\
| | * driver/ddr/fsl: Add DDR4 support to Freescale DDR driverYork Sun2014-04-22-1/+44
| | | | | | | | | | | | | | | | | | | | | Mostly reusing DDR3 driver, this patch adds DDR4 SPD handling, register calculation and programming. Signed-off-by: York Sun <yorksun@freescale.com>
| | * fdt_support: Add helper function to read "ranges" propertyAlexander Graf2014-04-22-0/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a helper function that can be used to interpret most "ranges" properties in the device tree. It reads the n'th range out of a "ranges" array and returns the node's virtual address of the range, the physical address that range starts at and the size of the range. Signed-off-by: Alexander Graf <agraf@suse.de> Acked-by: Scott Wood <scottwood@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
| | * fdt_support: split fdt_getprop_u32_defaultAlexander Graf2014-04-22-6/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already have a nice helper to give us a property cell value with default fall back from a path. Split that into two helpers - one for the old path based lookup and one to give us a value based on a node offset. Signed-off-by: Alexander Graf <agraf@suse.de> Acked-by: Scott Wood <scottwood@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
| * | board_f: call timer_init on MIPSPaul Burton2014-04-20-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | MIPS needs a call to timer_init to preserve its current behaviour ensuring that the cop0 compare register is initialised appropriately. Reported-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
| * | board_f: call init_func_ram on MIPSPaul Burton2014-04-20-2/+2
| |/ | | | | | | | | | | | | | | Assigning gd->ram_size the return value of initdram matches the existing MIPS board behaviour. Suggested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
| * bootm: set max decompression size for LZOKees Cook2014-04-18-1/+1
| | | | | | | | | | | | | | | | | | | | The LZO decompressor wasn't initializing the maximum output size, which meant it would fail to decompress most of the time. Reported-by: Matthias Weißer <weisserm@arcor.de> Signed-off-by: Kees Cook <keescook@chromium.org> Tested-by: Matthias Weißer <weisserm@arcor.de> Acked-by: Simon Glass <sjg@chromium.org>
| * board_r: return 0 from show_model_rPaul Burton2014-04-18-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The show_model_r function should return an int but didn't. Return 0 to indicate inevitable success and avoid the following if it is used: common/board_r.c: In function 'show_model_r': common/board_r.c:531:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Paul Burton <paul.burton@imgtec.com> Acked-by: Simon Glass <sjg@chromium.org>
| * blackfin: make name_to_gpio be a weak symbolIan Campbell2014-04-18-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This required moving it into a C file from the header. The only user of a non-default name_to_gpio is blackfin, therefore build tested with the blackfin bct-brettl2 build, which is one I picked at random. Also tested with a build for the ARM tec board which uses the default/fallback implementation. Inspection with objdump shows that both have done the right thing. This change was requested by Marek during review of the sunxi patch series. Signed-off-by: Ian Campbell <ijc@hellion.org.uk> Cc: Marek Vasut <marex@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Sonic Zhang <sonic.adi@gmail.com>
| * env_flash.c: Drop unused variablesTom Rini2014-04-17-2/+1
| | | | | | | | | | | | With 7ce1526 we no longer need 'len' or 'res', so drop these variables. Signed-off-by: Tom Rini <trini@ti.com>
| * floppy: delete unused filesMasahiro Yamada2014-04-17-124/+0
| | | | | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
| * Merge branch 'next'Tom Rini2014-04-17-129/+429
| |\
| | * env: Implement support for encrypting environmentMarek Vasut2014-03-21-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add function which allows encrypting the whole environment block with AES-128-CBC. The key for the environment is retrieved by env_aes_cbc_get_key() function, which must be implemented on a per-board basis. Signed-off-by: Marek Vasut <marex@denx.de>
| | * env: Add env_export() wrapperMarek Vasut2014-03-21-117/+63
| | | | | | | | | | | | | | | | | | | | | | | | Implement env_export() wrapper, so that all implementers of saveenv() don't have to call hexport_r(), crc32() etc. sequence . This trims down a bit of code duplication. Signed-off-by: Marek Vasut <marex@denx.de>
| | * aes: Add 'aes' command to access AES-128-CBCMarek Vasut2014-03-21-0/+90
| | | | | | | | | | | | | | | | | | | | | Add simple 'aes' command, which allows using the AES-128-CBC encryption and decryption functions from U-Boot command line. Signed-off-by: Marek Vasut <marex@denx.de>
| | * tools, fit_check_sign: verify a signed fit imageHeiko Schocher2014-03-21-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | add host tool "fit_check_sign" which verifies, if a fit image is signed correct. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org>
| | * gen: Add progressive hash APIHung-ying Tyan2014-03-21-11/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add hash_init(), hash_update() and hash_finish() to the hash_algo struct. Add hash_lookup_algo() to look up the struct given an algorithm name. Signed-off-by: Hung-ying Tyan <tyanh@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Simon Glass <sjg@chromium.org>
| | * rsa: add sha256,rsa4096 algorithmHeiko Schocher2014-03-21-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | Add support for sha256,rsa4096 signatures in u-boot. Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Simon Glass <sjg@chromium.org> Cc: andreas@oetken.name
| | * rsa: add sha256-rsa2048 algorithmHeiko Schocher2014-03-21-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | based on patch from andreas@oetken.name: http://patchwork.ozlabs.org/patch/294318/ commit message: I currently need support for rsa-sha256 signatures in u-boot and found out that the code for signatures is not very generic. Thus adding of different hash-algorithms for rsa-signatures is not easy to do without copy-pasting the rsa-code. I attached a patch for how I think it could be better and included support for rsa-sha256. This is a fast first shot. aditionally work: - removed checkpatch warnings - removed compiler warnings - rebased against current head Signed-off-by: Heiko Schocher <hs@denx.de> Cc: andreas@oetken.name Cc: Simon Glass <sjg@chromium.org>
| | * fit: add sha256 supportHeiko Schocher2014-03-21-0/+5
| | | | | | | | | | | | | | | | | | | | | add sha256 support to fit images Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Simon Glass <sjg@chromium.org>
| | * fdt: add "fdt checksign" commandHeiko Schocher2014-03-21-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | check if a fdt is correct signed pass an optional addr value. Contains the addr of the key blob Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Simon Glass <sjg@chromium.org>
| * | Start the deprecation process for generic boardSimon Glass2014-04-17-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | We should move forward to remove the old board init code. Add a prominent message to encourage maintainers to get started on this work. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | tools: mkimage: add support for gpimage formatKaricheri, Muralidharan2014-04-17-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch add support for gpimage format as a preparatory patch for porting u-boot for keystone2 devices and is based on omapimage format. It re-uses gph header to store the size and loadaddr as done in omapimage.c Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Acked-by: Tom Rini <trini@ti.com>
* | | fdt: call ft_board_setup_ex() at the end of image_setup_libfdt()Vitaly Andrianov2014-04-17-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The keystone2 SOC requires to fix all 32 bit aliased addresses to their 36 physical format. This has to happen after all fdt nodes are added or modified. Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Acked-by: Tom Rini <trini@ti.com>
* | | spl_mmc/CONFIG_SPL_OS_BOOT: Allow environment to determine what to bootTom Rini2014-04-17-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | We add two new environment variables, falcon_args_file and falcon_image_file, which when set will override the compiled in default values for falcon mode. Signed-off-by: Tom Rini <trini@ti.com>
* | | env_mmc.c: Remove NULL check on tmp_env1/2Tom Rini2014-04-17-6/+0
| | | | | | | | | | | | | | | | | | | | | With 452a272 we moved to allocating these variables on the stack. So they will never now be NULL so remove these checks. Signed-off-by: Tom Rini <trini@ti.com>
* | | env_mmc.c: Allow environment to be used within SPLTom Rini2014-04-17-8/+37
|/ / | | | | | | | | | | | | | | Inside of SPL we only concern ourself with one MMC device, so instead of being able to use CONFIG_SYS_MMC_ENV_DEV we need to use 0 in SPL. Switch the code to use a 'dev' variable to facilitate this. Signed-off-by: Tom Rini <trini@ti.com>
* | Revert "Start the deprecation process for generic board"Tom Rini2014-04-04-6/+0
| | | | | | | | | | | | | | | | | | We've run into a non-trivial conversion to CONFIG_SYS_GENERIC_BOARD so we'll postpone this notice until right after v2014.04 is out. This reverts commit 36c4b1d98059244c34ec3327d9cc9f3c552fd01b. Signed-off-by: Tom Rini <trini@ti.com>
* | cmd:gpt: randomly generate each partition uuid if undefinedPrzemyslaw Marczak2014-04-02-15/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: - randomly generate partition uuid if any is undefined and CONFIG_RAND_UUID is defined - print debug info about set/unset/generated uuid - update doc/README.gpt Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Piotr Wilczek <p.wilczek@samsung.com> Cc: Tom Rini <trini@ti.com> Cc: Stephen Warren <swarren@nvidia.com> Cc: Lukasz Majewski <l.majewski@samsung.com>
* | mmc: Add 'mmc rst-function' sub-commandTom Rini2014-04-02-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | Some eMMC chips may need the RST_n_FUNCTION bit set to a non-zero value in order for warm reset of the system to work. Details on this being required will be part of the eMMC datasheet. Also add using this command to the dra7xx README. * Whitespace fix by panto Signed-off-by: Tom Rini <trini@ti.com> Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
* | Start the deprecation process for generic boardSimon Glass2014-03-28-0/+6
| | | | | | | | | | | | | | | | We should move forward to remove the old board init code. Add a prominent message to encourage maintainers to get started on this work. Signed-off-by: Simon Glass <sjg@chromium.org>
* | common, env: Fix support for environment in i2c eepromMatthias Fuchs2014-03-28-2/+7
| | | | | | | | | | | | | | | | When using CONFIG_SYS_I2C i2c needs to be initialized by i2c_init_all(). This is done in some places but not in eeprom_init(). Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
* | Merge branch 'master' of git://git.denx.de/u-boot-mmcTom Rini2014-03-28-2/+2
|\ \
| * | mmc: Split mmc struct, rework mmc initialization (v2)Pantelis Antoniou2014-03-24-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way that struct mmc was implemented was a bit of a mess; configuration and internal state all jumbled up in a single structure. On top of that the way initialization is done with mmc_register leads to a lot of duplicated code in drivers. Typically the initialization got something like this in every driver. struct mmc *mmc = malloc(sizeof(struct mmc)); memset(mmc, 0, sizeof(struct mmc); /* fill in fields of mmc struct */ /* store private data pointer */ mmc_register(mmc); By using the new mmc_create call one just passes an mmc config struct and an optional private data pointer like this: struct mmc = mmc_create(&cfg, priv); All in tree drivers have been updated to the new form, and expect mmc_register to go away before long. Changes since v1: * Use calloc instead of manually calling memset. * Mark mmc_register as deprecated. Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>