summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Move all command code into its own directorySimon Glass2016-01-25128-43190/+6
| | | | | | | | | | | | | | | | | | | | | | | | | There are a lot of unrelated files in common, including all of the commands. Moving them into their own directory makes them easier to find and is more logical. Some commands include non-command code, such as cmd_scsi.c. This should be sorted out at some point so that the function can be enabled with or without the associated command. Unfortunately, with m68k I get this error: m68k: + M5329AFEE +arch/m68k/cpu/mcf532x/start.o: In function `_start': +arch/m68k/cpu/mcf532x/start.S:159:(.text+0x452): relocation truncated to fit: R_68K_PC16 against symbol `board_init_f' defined in .text.board_init_f section in common/built-in.o I hope someone can shed some light on what this means. I hope it isn't depending on the position of code in the image. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
* gpio: Warn about invalid GPIOs used with the 'gpio' commandSimon Glass2016-01-211-1/+3
| | | | | | | | At present there is no indication that an invalid GPIO is used except that the GPIO status is not displayed. Make the error more explicit to avoid confusion. Signed-off-by: Simon Glass <sjg@chromium.org>
* stdio: Correct a build error with driver modelSimon Glass2016-01-211-0/+3
| | | | | | | When driver model is used for video but not for the keyboard, a compiler warnings is produced. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
* gpio: Allow 's' as an abbreviation for 'status'Simon Glass2016-01-211-1/+1
| | | | | | | The 'gpio' command allows abbreviations for most subcommands. Allow them for 'status' also. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: pmic: Add 'reg status' to show all regulatorsSimon Glass2016-01-211-10/+56
| | | | | | | It is convenient to be able to see the status of all regulators in a list. Add this feature to the 'reg status' command. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: video: sandbox: Convert sandbox to use driver model for videoSimon Glass2016-01-201-11/+0
| | | | | | | | Now that driver model support is available, convert sandbox over to use it. We can remove a few of the special hooks that sandbox currently has. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
* dm: stdio: video: Plumb the video uclass into stdioSimon Glass2016-01-201-4/+15
| | | | | | | | | Register video drivers with stdio so that they can be used for text output. This needs to be done explicitly for now. At some point we should be able to convert stdio itself to driver model and avoid this step. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
* dm: video: Implement the bmp command for driver modelSimon Glass2016-01-201-1/+21
| | | | | | | | | This command can use the bitmap display code in the uclass. This is similar to the code in lcd.c and cfb_console.c. These other copies will go away when all boards are converted to use driver model for video. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
* dm: common: Add memory reservation for the video uclassSimon Glass2016-01-201-12/+35
| | | | | | | | | | | | | Before relocation we need to reserve memory for the video driver frame buffers so that they can use this memory when they start up (after relocation). Add a call to the uclass to permit this. The current top and bottom of the region is stored in global_data so that it can be checked post-relocation to ensure enough memory is available. No video device should be probed before relocation. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
* common: Move LCD and video memory reservation togetherSimon Glass2016-01-201-14/+14
| | | | | | | | These two functions are conceptually the same. Move them together in the pre-relocation init. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
* dm: lcd: Avoid using the lcd.h header file with driver modelSimon Glass2016-01-201-0/+2
| | | | | | | | | The LCD functions and definitions are not used with the driver model video uclass. When all boards are converted over we can remove the file. For now, use #ifdef to omit the contents. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
* Revert "fdt_support: Add multi-serial support for stdout fixup"Bin Meng2016-01-201-15/+1
| | | | | | | | | | | | | | This reverts commit 3e303f748cf57fb23e8ec95ab7eac0074be50e2b. The fix up in the /aliases node does not work under the following scenarios: - Not every non-DM serial driver was written to have a driver name that conforms the format of "serial%d" or "eserial%d". - With driver model serial, the stdio_devices[] stores the serial device node name in the device tree. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* usb: Define USB_MAX_STOR_DEV in only one placeSimon Glass2016-01-201-1/+0
| | | | | | | | We can define this in the header file and use it in usb_storage.c. There is no need to define it twice. Remove the #define from usb_storage.c. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
* sandbox: Support the bmp commandSimon Glass2016-01-201-5/+8
| | | | | | | | Adjust this command to use map_sysmem() correctly so that it works on sandbox. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* i2c: Correct command return valuesSimon Glass2016-01-201-2/+4
| | | | | | | | | We should not return a -ve error code from command functions. Instead, return CMD_RET_FAILURE. This avoids the "exit not allowed from main input shell" error messages from the hush shell. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
* Add more SPDX-License-Identifier tagsTom Rini2016-01-192-14/+2
| | | | | | | | | In a number of places we had wordings of the GPL (or LGPL in a few cases) license text that were split in such a way that it wasn't caught previously. Convert all of these to the correct SPDX-License-Identifier tag. Signed-off-by: Tom Rini <trini@konsulko.com>
* image: fix getenv_bootm_size() functionMasahiro Yamada2016-01-191-2/+2
| | | | | | | | Currently, this function returns wrong size if "bootm_low" is defined, but "bootm_size" is not. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* common: usb: fix checking conditionPeng Fan2016-01-161-1/+1
| | | | | | | | | | | | | | We support max USB_MAXENDPOINTS, so need to use "epno >= USB_MAXENDPOINTS", but not "epno > USB_MAXENDPOINTS". If use ">", we may exceeds the array of if_desc->ep_desc. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Simon Glass <sjg@chromium.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Marek Vasut <marex@denx.de> Cc: Paul Kocialkowski <contact@paulk.fr> Cc: "Stefan Brüns" <stefan.bruens@rwth-aachen.de> Cc: Vincent Palatin <vpalatin@chromium.org>
* x86: Fix board init breakageSimon Glass2016-01-151-1/+1
| | | | | | | | | Commit ecc30663 ("Fix board init code to respect the C runtime environment") breaks x86. This was mentioned on https://patchwork.ozlabs.org/patch/548644 but not addressed. Correct it so that x86 boards boot again. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* Fix GCC format-security errors and convert sprintfs.Ben Whitten2016-01-142-6/+9
| | | | | | | | | | | With format-security errors turned on, GCC picks up the use of sprintf with a format parameter not being a string literal. Simple uses of sprintf are also converted to use strcpy. Signed-off-by: Ben Whitten <ben.whitten@gmail.com> Acked-by: Wolfgang Denk <wd@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
* common: env_flags: fix loop condition when using env_flags_varaccess_maskPeng Fan2016-01-131-1/+1
| | | | | | | | | | | | | | | We should use ARRAY_SIZE, but not sizeof. The size of env_flags_varaccess_mask is 16bytes, but we only need 4 loops. If using 16 as the end condition, we may access memory that not belong to array env_flags_varaccess_mask. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: York Sun <yorksun@freescale.com> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* common: cli_simple: use strlcpy instead of strcpyPeng Fan2016-01-131-1/+2
| | | | | | | | | | | | | Report Coverity log: Destination buffer too small (STRING_OVERFLOW) string_overflow: You might overrun the 1024 byte destination string lastcommand by writing 1025 bytes from console_buffer Signed-off-by: Peng Fan <van.freenix@gmail.com> Cc: Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* cmd_boot: Add a poweroff commandMichael van Slingerland2016-01-132-0/+11
| | | | | | | | | Add a 'poweroff' command to boot commands, this only gets enabled if the board Kconfig does a "select CMD_POWEROFF". Signed-off-by: Michael van Slingerland <michael@deviousops.nl> [hdegoede@redhat.com: Make the cmd conditional on a CMD_POWEROFF Kconfig] Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* ums: support multiple LUNs at onceStephen Warren2016-01-131-32/+103
| | | | | | | | | | | | | | | Extend the ums command to accept a list of block devices. Each of these will be exported as a separate LUN. An example use-case would be: ums 0 mmc 0,0.1,0.2 ... which would export LUNs for eMMC 0's user data, boot0, and boot1 HW partitions. This is useful since it allows the host access to everything on the eMMC without having to somehow stop the ums command from executing and restart it with different parameters. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* mmc: store hwpart in the block deviceStephen Warren2016-01-132-19/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will allow us to have multiple block device structs each referring to the same eMMC device, yet different HW partitions. For now, there is still a single block device per eMMC device. As before, this block device always accesses whichever HW partition was most recently selected. Clients wishing to make use of multiple block devices referring to different HW partitions can simply take a copy of this block device once it points at the correct HW partition, and use each one as they wish. This feature will be used by the next patch. In the future, perhaps get_device() could be enhanced to return a dynamically allocated block device struct, to avoid the client needing to copy it in order to maintain multiple block devices. However, this would require all users to be updated to free those block device structs at some point, which is rather a large change. Most callers of mmc_switch_part() wish to permanently switch the default MMC block device's HW partition. Enhance mmc_switch_part() so that it does this. This removes the need for callers to do this. However, common/env_mmc.c needs to save and restore the current HW partition. Make it do this more explicitly. Replace use of mmc_switch_part() with mmc_select_hwpart() in order to remove duplicate code that skips the call if that HW partition is already selected. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* block: pass block dev not num to read/write/erase()Stephen Warren2016-01-1312-57/+74
| | | | | | | | | | | This will allow the implementation to make use of data in the block_dev structure beyond the base device number. This will be useful so that eMMC block devices can encompass the HW partition ID rather than treating this out-of-band. Equally, the existence of the priv field is crying out for this patch to exist. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* arm: move gd handling outside of C codeAlbert ARIBAUD2016-01-132-15/+19
| | | | | | | | | | | | | | | | | | As of gcc 5.2.1 for Thumb-1, it is not possible any more to assign gd from C code, as gd is mapped to r9, and r9 may now be saved in the prolog sequence, and restored in the epilog sequence, of any C functions. Therefore arch_setup_gd(), which is supposed to set r9, may actually have no effect, causing U-Boot to use a bad address to access GD. Fix this by never calling arch_setup_gd() for ARM, and instead setting r9 in arch/arm/lib/crt0.S, to the value returned by board_init_f_alloc_reserve(). Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> Reviewed-by: Simon Glass <sjg@chromium.org>
* Fix board init code to respect the C runtime environmentAlbert ARIBAUD2016-01-131-10/+99
| | | | | | | | | | | | | board_init_f_mem() alters the C runtime environment's stack it is actually already using. This is not a valid behaviour within a C runtime environment. Split board_init_f_mem into C functions which do not alter their own stack and always behave properly with respect to their C runtime environment. Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> Acked-by: Thomas Chou <thomas@wytron.com.tw>
* Merge git://git.denx.de/u-boot-netTom Rini2016-01-131-31/+33
|\
| * fdt: Rewrite the logic in fdt_fixup_ethernet()Bin Meng2015-12-211-21/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently in fdt_fixup_ethernet() the MAC address fix up is handled in a loop of which the exit condition is to test the "eth%daddr" env is not NULL. However this creates unnecessary constrains that those "eth%daddr" env variables must be sequential even if "ethernet%d" does not start from 0 in the "/aliases" node. For example, with "/aliases" node below: aliases { ethernet3 = &enet3; ethernet4 = &enet4; }; "ethaddr", "eth1addr", "eth2addr" must exist in order to fix up ethernet3's MAC address successfully. Now we change the loop logic to iterate the properties in the "/aliases" node. For each property, test if it is in a format of "ethernet%d", then get its MAC address from corresponding "eth%daddr" env and fix it up in the dtb. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Tom Rini <trini@konsulko.com> On OMAP4 Panda (+v4.3 kernel) Tested-by: Tom Rini <trini@konsulko.com>
| * fdt: Deprecate "usbethaddr" usage in fdt_fixup_ethernet()Bin Meng2015-12-211-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In fdt_fixup_ethernet() only "usbethaddr" is handled to fix up the first usb ethernet port MAC address. Other additional usb ethernet ports are ignored as there is no logic to handle "usbeth%daddr". It is suggested we should use "ethaddr" for all ethernet devices. Hence deprecate "usbethaddr" usage in fdt_fixup_ethernet(). This actually reverts commit b1f49ab8c7bad60426b30c134ae065ef77d2dfc1 "ARM: fdt support: Add usbethaddr as an acceptable MAC". Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Tom Rini <trini@konsulko.com> On OMAP4 Panda (+ v4.3 kernel) Tested-by: Tom Rini <trini@konsulko.com>
* | hash.c: Conditionally compile hash_command, static hash_showTom Rini2016-01-131-23/+25
| | | | | | | | | | | | | | | | | | | | | | The function hash_show is now only called by hash_command, so mark it as static (and drop from hash.h). We only call hash_command when any of CONFIG_CMD_CRC32, CONFIG_CMD_SHA1SUM or CONFIG_CMD_HASH are set. Since hash.c is linked in unconditionally we must take extra care with functions that bring in read-only strings as these will not be discarded. Signed-off-by: Tom Rini <trini@konsulko.com>
* | image: check "bootm_low" and "bootm_size" if "initrd_high" is missingMasahiro Yamada2016-01-131-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To boot Linux, we should prevent Initramdisk and FDT from going too high. Currently, boot_relocate_fdt() checks "fdt_high" environment first, and then falls back to getenv_bootm_mapsize() + getenv_bootm_low() if "fdt_high" is missing. On the other hand, boot_ramdisk_high() only checks "initrd_high" to get the address limit for the Initramdisk. We also want to let this case fall back to getenv_bootm_mapsize() + getenv_bootm_low(). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | dm: pci: scsi: Use driver-model PCI APISimon Glass2016-01-121-1/+13
| | | | | | | | | | | | | | | | Adjust the SCSI command to use driver model for its PCI interface. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
* | dm: pci: Add a dm_ prefix to pci_bus_find_bdf()Simon Glass2016-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Most driver model PCI functions have a dm_ prefix. At some point, when the old code is converted to driver model and the old functions are removed, we will drop that prefix. For consistency, we should use the dm_ prefix for all driver model functions. Update pci_bus_find_bdf() accordingly. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | fix always succesful memory testRasmus Villemoes2016-01-081-2/+2
| | | | | | | | | | | | | | | | | | Since 51209b1f42cb ("Use common mtest iteration counting"), do_mem_mtest has always reported 0 errors and hence returned 0, even if errors were detected. Fix the helpers mem_test_alt() and mem_test_quick() to return the number of errors found. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
* | fdt: fix address cell count checking in fdt_translate_address()Przemyslaw Marczak2016-01-071-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit: dm: core: Enable optional use of fdt_translate_address() Enables use of this function as default, but after this it's not possible to get dev address for the case in which: '#size-cells == 0' This causes errors when getting address for some GPIOs, for which the '#size-cells' is set to 0. Example error: '__of_translate_address: Bad cell count for gpx0' Allowing for that case by modifying the macro 'OF_CHECK_COUNTS', (called from )__of_translate_address(), fixes the issue. Now, this macro doesn't check, that '#size-cells' is greater than 0. This is possible from the specification point of view, but I'm not sure that it doesn't introduce a regression for other configs. Please test and share the results. Tested-on: Odroid U3, Odroid X2, Odroid XU3, Sandbox. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Marek Vasut <marex@denx.de> Tested-by: Jaehoon Chung <jh80.chung@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com>
* | dm: usb: Add a remove() method for USB keyboardsSimon Glass2016-01-071-0/+36
| | | | | | | | | | | | | | | | At present USB keyboards are not properly removed with driver model. Add the code to handle this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
* | usb: Allow up to 7 storage devicesSimon Glass2016-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | The current limit of 5 is not enough for the driver model USB tests. Really we should not have a limit but the driver model code still uses the usb_dev_desc[] array, which has a limit. Increasing the limit by 2 should not bother anyone. Adjust it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
* | common: nvedit: use snprintf instead of sprintfPeng Fan2016-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use snprintf to replace sprintf. Coverity log: " Unbounded source buffer (STRING_SIZE) string_size: Passing string init_val of unknown size to sprintf. " Reported-by: Coverity Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* | common: env: initialize scalar variablePeng Fan2016-01-042-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before calling hsearch_r, initialize callback entry to NULL. Coverity log: " Uninitialized scalar variable (UNINIT) uninit_use_in_call: Using uninitialized value e. Field e.callback is uninitialized when calling hsearch_r. " Reported-by: Coverity Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org>
* | common: cli: avoid memory leakPeng Fan2016-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | Whether CONFIG_SYS_HUSH_PARSER is defined or not, should always check to free 'buff' to avoid memory leak. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Tom Rini <trini@konsulko.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Simon Glass <sjg@chromium.org>
* | usb: Move determination of TT hub address/port into separate functionStefan Brüns2015-12-311-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | Start split and complete split tokens need the hub address and the downstream port of the first HS hub (device view). The core of the function was duplicated in both host/ehci_hcd and musb-new/usb-compat.h. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Hans de Goede <hdegoede@redhat.com>
* | usb: Alloc buffer for USB descriptor dynamicallyStefan Brüns2015-12-311-14/+28
|/ | | | | | | | | The configuration descriptor includes all interface, endpoint and auxiliary descriptors (e.g. report, union) so 512 bytes may not be enough. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2015-12-171-0/+3
|\
| * usb: kbd: don't use int xfers when polling via ctrl xfersStephen Warren2015-12-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | When CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP is enabled, use a GET_REPORT control transfer to retrieve the initial state of the keyboard. This matches the technique used to poll the keyboard state. This is useful since it eliminates the remaining use of interrupt transfers from the USB keyboard driver, which allows it to work with USB HCD that don't support interrupt transfers. Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* | Merge git://git.denx.de/u-boot-rockchipTom Rini2015-12-161-1/+1
|\ \ | |/ |/|
| * spl: use panic_str instead of panicSjoerd Simons2015-12-131-1/+1
| | | | | | | | | | | | | | | | For a simple static string, use panic_str() which prevents calling printf needlessly. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Reviewed-by: Simon Glass <sjg@chromium.org>
* | eeprom: fix eeprom write procedureAlexey Brodkin2015-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes commit 1a37889b0ad084a740b4f785031d7ae9955d947b: ----------------------->8-------------------- eeprom: Pull out the RW loop Unify the code for doing read/write into single function, since the code for both the read and write is almost identical. This again trims down the code duplication. ----------------------->8-------------------- where the same one routine is utilized for both EEPROM writing and reading. The only difference was supposed to be a "read" flag which in both cases was set with 1 somehow. That lead to a missing delay in case of writing which lead to write failure (in my case no data was written). Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Acked-by: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Heiko Schocher <hs@denx.de>
* | Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriqTom Rini2015-12-143-11/+33
|\ \
OpenPOWER on IntegriCloud