summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | blackfin: fix undefined reference to srand and randMasahiro Yamada2015-06-111-1/+3
|/ | | | | | | | | | | | | | | | | | | | | Commit 9ba9e85f3f1c (net: Fix NET_RANDOM_ETHADDR dependencies) accidentally dropped CONFIG_LIB_RAND defines for 14 Blackfin boards. Prior to that commit, those boards defined CONFIG_LIB_RAND, but not CONFIG_NET_RANDOM_ETHADDR. So, commit 9ba9e85f3f1c should not have touched them, but in fact it ripped CONFIG_LIB_RAND off from all the header files, which caused undefined reference to srand and rand. CONFIG_LIB_RAND=y must be revived for such boards. BTW, this commit indeed makes it better, but even with this fix, three boards (bf533-stamp, bf538f-ezkit, cm-bf548) still can not build due to region 'ram' overflowed error. This was cause by commit 6eed3786c68c (net: Move the CMD_NET config to defconfigs) because CMD_NET selects NET, and NET selects REGEX. Eventually, some boards were newly enabled with CONFIG_REGEX, increasing the memory footprint. A patch is expected to fix the build error. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* x86: gpio: add pinctrl support from the device treeGabriel Huau2015-06-041-0/+1
| | | | | | | | | Every pin can be configured now from the device tree. A dt-bindings has been added to describe the different property available. Change-Id: I1668886062655f83700d0e7bbbe3ad09b19ee975 Signed-off-by: Gabriel Huau <contact@huau-gabriel.fr> Acked-by: Simon Glass <sjg@chromium.org>
* x86: Refactor PIRQ routing supportBin Meng2015-06-041-0/+1
| | | | | | | | | | | | PIRQ routing is pretty much common in Intel chipset. It has several PIRQ links (normally 8) and corresponding registers (either in PCI configuration space or memory-mapped IBASE) to configure the legacy 8259 IRQ vector mapping. Refactor current Queensbay PIRQ routing support using device tree and move it to a common place, so that we can easily add PIRQ routing support on a new platform. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* net: Fix NET_RANDOM_ETHADDR dependenciesMichal Simek2015-06-011-0/+3
| | | | | | | | | | NET_RANDOM_ETHADDR depends on lib/rand.c. This patch adds dependency to Kconfig to ensure that library is also compiled. Remove the definitions from Blackfin boards' include/configs. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* pmic: max77686 set the same compatible as in the kernelPrzemyslaw Marczak2015-05-141-1/+1
| | | | | | | This commit also updates the proper dts files. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
* lib: Kconfig: add entry for errno_str() functionPrzemyslaw Marczak2015-05-141-0/+8
| | | | | Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
* sandbox: Fix warning in display_optionsSimon Glass2015-05-141-1/+1
| | | | | | | This fixes a warning in the print_buffer() function with some toolchains. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* tpm: Rename Infineon TPM to slb9645ttSimon Glass2015-05-141-1/+1
| | | | | | This name is used in Linux, so use it in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
* tegra: video: Support serial output resource (SOR) on tegra124Simon Glass2015-05-131-0/+3
| | | | | | | | | The SOR is required for talking to eDP LCD panels. Add a driver for this which will be used by the DisplayPort driver. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Tom Warren <twarren@nvidia.com>
* fdt: Add binding decode function for display-timingsSimon Glass2015-05-131-0/+92
| | | | | | | | This is useful for display parameters. Add a simple decode function to read from this device tree node. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
* kconfig: Move REGEX to KconfigJoe Hershberger2015-05-101-0/+8
| | | | | | | Having this as a Kconfig allows it to be a dependent feature. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: usb: exynos: Drop legacy USB codeSimon Glass2015-05-061-2/+0
| | | | | | Drop the code that doesn't use driver model for USB. Signed-off-by: Simon Glass <sjg@chromium.org>
* Add print_freq() to display frequencies nicelySimon Glass2015-04-291-0/+42
| | | | | | | | | Add a function similar to print_size() that works for frequencies. It can handle from Hz to GHz. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
* Move display_options functions to their own headerSimon Glass2015-04-291-13/+0
| | | | | | | | Before adding one more function, create a separate header to help reduce the size of common.h. Add the missing function comments and tidy up. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* fdt: Fix handling of paths with options in themHans de Goede2015-04-231-3/+22
| | | | | | | | | | | | | | | | After syncing the sunxi dts files with the upstream kernel dm/fdt sunxi builds would no longer boot. The problem is that stdout-path is now set like this in the upstream dts files: stdout-path = "serial0:115200n8". The use of options in of-paths, either after an alias name, or after a full path, e.g. stdout-path = "/soc@01c00000/serial@01c28000:115200", is standard of usage, but something which the u-boot dts code so far did not handle. This commit fixes this, adding support for both path formats. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
* Merge branch 'master' of git://git.denx.de/u-boot-dmTom Rini2015-04-233-8/+60
|\
| * fdt: Allow FDT functions to be built for SPLSimon Glass2015-04-231-0/+6
| | | | | | | | | | | | Remove the implicit assumption that SPL does not support device tree. Signed-off-by: Simon Glass <sjg@chromium.org>
| * fdt: Rename setup_fdt() and make it prepare alsoSimon Glass2015-04-231-2/+2
| | | | | | | | | | | | | | There is little reason to split these two functions. Bring them together which simplifies the init sequence. Signed-off-by: Simon Glass <sjg@chromium.org>
| * fdt: sandbox: Move setup code from board_f to fdtdecSimon Glass2015-04-231-0/+31
| | | | | | | | | | | | | | We want to be able to set up the device tree in SPL, so move this code to a common place. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: Add a panic_str() function to reduce code sizeSimon Glass2015-04-232-8/+23
| | | | | | | | | | | | | | | | The printf() in panic() adds about 1.5KB of code size to SPL when compiled with Thumb-2. Provide a smaller version that does not support printf()-style arguments and use it in two commonly compiled places. Signed-off-by: Simon Glass <sjg@chromium.org>
* | gunzip: add gzwrite routine for extracting compresed images to block deviceEric Nelson2015-04-221-1/+194
|/ | | | | | | | | | Initial filesystem images are generally highly compressible. Add a routine gzwrite that allows gzip-compressed images to be written to block devices. Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com> Reviewed-by: Tom Rini <trini@ti.com>
* sandbox: Move CONFIG_SYS_VSNPRINTF to KconfigSimon Glass2015-04-181-0/+9
| | | | | | Move this over to Kconfig and tidy up. Signed-off-by: Simon Glass <sjg@chromium.org>
* net: cosmetic: Change IPaddr_t to struct in_addrJoe Hershberger2015-04-181-7/+9
| | | | | | | | | This patch is simply clean-up to make the IPv4 type that is used match what Linux uses. It also attempts to move all variables that are IP addresses use good naming instead of CamelCase. No functional change. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* cros_ec: exynos: Match up device tree with kernel versionSimon Glass2015-04-181-1/+0
| | | | | | | | | | | The U-Boot device trees are slightly different in a few places. Adjust them to remove most of the differences. Note that U-Boot does not support the concept of interrupts as distinct from GPIOs, so this difference remains. For sandbox, use the same keyboard file as for ARM boards and drop the host emulation bus which seems redundant. Signed-off-by: Simon Glass <sjg@chromium.org>
* fdt: Drop LPC compatible string in fdtdecSimon Glass2015-04-181-1/+0
| | | | | | | This is not needed now that we have moved chromebook_link and cros_ec to driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
* fdt: cros_ec: Drop compatible string in fdtdecSimon Glass2015-04-181-1/+0
| | | | | | This is not needed now that we have moved to driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: chromebook_link: dts: Add PCH and LPC devicesSimon Glass2015-04-181-1/+2
| | | | | | | | | | | | The PCH (Platform Controller Hub) is on the PCI bus, so show it as such. The LPC (Low Pin Count) and SPI bus are inside the PCH, so put these in the right place also. Rename the compatible strings to be more descriptive since this board is the only user. Once we are using driver model fully on x86, these will be dropped. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Make sure arch-specific map_sysmem() is definedJoe Hershberger2015-04-181-0/+1
| | | | | | | | | | | In the case where the arch defines a custom map_sysmem(), make sure that including just mapmem.h is sufficient to have these functions as they are when the arch does not override it. Also split the non-arch specific functions out of common.h Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: x86: pci: Convert chromebook_link to use driver model for pciSimon Glass2015-04-181-1/+1
| | | | | | | | | | | | | | | | Move chromebook_link over to driver model for PCI. This involves: - adding a uclass for platform controller hub - removing most of the existing PCI driver - adjusting how CPU init works to use driver model instead - rename the lpc compatible string (it will be removed later) This does not really take advantage of driver model fully, but it does work. Furture work will improve the code structure to remove many of the explicit calls to init the board. Signed-off-by: Simon Glass <sjg@chromium.org>
* fdt: Tighten up error handling in fdtdec_get_pci_addr()Simon Glass2015-04-161-1/+3
| | | | | | | | | | | | | This function returns -ENOENT when the property is missing (which the caller might forgive) and also when the property is present but incorrectly formatted (which many callers would like to report). Update the error return value to allow these different situations to be distinguished. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* fdt: Export fdtdec_get_number() for general useSimon Glass2015-04-161-1/+1
| | | | | | | This function is missing a prototype but is more widey useful. Add it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: UniPhier: adjust device trees for business transferMasahiro Yamada2015-03-151-1/+1
| | | | | | | Panasonic's System LSI products, UniPhier SoC family, have been transferred to Socionext Inc. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* Merge branch 'master' of git://git.denx.de/u-boot-mpc85xxTom Rini2015-03-051-1/+2
|\
| * rsa : Compile Modular Exponentiation files based on CONFIG_RSA_SOFTWARE_EXPgaurav rana2015-03-051-1/+2
| | | | | | | | | | | | | | | | | | | | Remove dependency of rsa_mod_exp from CONFIG_FIT_SIGNATURE. As rsa modular exponentiation is an independent module and can be invoked independently. Signed-off-by: Gaurav Rana <gaurav.rana@freescale.com> Acked-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <yorksun@freescale.com>
* | lib/asm-offsets - make GD_RELOCADDR, GD_RELOC_OFF & GD_START_ADDR_SP ↵Alexey Brodkin2015-03-051-4/+0
|/ | | | | | | | | | | | | available for all architectures GD_RELOCADDR, GD_RELOC_OFF & GD_START_ADDR_SP are generic members of global data structure so why don't we allow architectures other than ARM to use it. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@ti.com> Acked-by: Simon Glass <sjg@chromium.org>
* usb: UniPhier: add UniPhier on-chip xHCI host driver supportMasahiro Yamada2015-03-011-0/+1
| | | | | | | Support xHCI host driver used on Panasonic UniPhier platform. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Marek Vasut <marex@denx.de>
* crypto/fsl - Add progressive hashing support using hardware acceleration.gaurav rana2015-02-251-0/+36
| | | | | | | | | | | Currently only normal hashing is supported using hardware acceleration. Added support for progressive hashing using hardware. Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com> Signed-off-by: Gaurav Rana <gaurav.rana@freescale.com> CC: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <yorksun@freescale.com>
* fdtdec: Add compatible id and string for Intel Quark MRCBin Meng2015-02-061-0/+1
| | | | | | | | Add COMPAT_INTEL_QRK_MRC and "intel,quark-mrc" so that fdtdec can decode Intel Quark MRC node. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* rsa: Use checksum algorithms from struct hash_algoRuchika Gupta2015-01-292-21/+36
| | | | | | | | | | | | | | | Currently the hash functions used in RSA are called directly from the sha1 and sha256 libraries. Change the RSA checksum library to use the progressive hash API's registered with struct hash_algo. This will allow the checksum library to use the hardware accelerated progressive hash API's once available. Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com> CC: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> (Fixed build error in am335x_boneblack_vboot due to duplicate CONFIG_DM) Change-Id: Ic44279432f88d4e8594c6e94feb1cfcae2443a54
* lib/rsa: Add Kconfig for devices supporting RSA Modular ExponentiationRuchika Gupta2015-01-292-6/+28
| | | | | | | | | | | | | | | | | | | Kconfig option added for devices which support RSA Verification. 1. RSA_SOFTWARE_EXP Enables driver for supporting RSA Modular Exponentiation in Software 2. RSA_FREESCALE_EXP Enables driver for supporting RSA Modular Exponentiation using Freescale specific driver The above drivers use RSA uclass Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com> CC: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> (Removed duplicate line in Kconfig comment) Change-Id: I7663c4d5350e2bfc3dfa2696f70ef777d6ccc6f6
* lib/rsa: Modify rsa to use DM driverRuchika Gupta2015-01-291-0/+14
| | | | | | | | | | | | | Modify rsa_verify to use the rsa driver of DM library .The tools will continue to use the same RSA sw library. CONFIG_RSA is now dependent on CONFIG_DM. All configurations which enable FIT based signatures have been modified to enable CONFIG_DM by default. Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com> CC: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* FIT: Modify option FIT_SIGNATURE in KconfigRuchika Gupta2015-01-291-0/+7
| | | | | | | | | | For FIT signature based approach to work, RSA library needs to be selected. The FIT_SIGNATURE option in Kconfig is modified to automatically select RSA. Selecting RSA compiles the RSA library required for image verification. Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com> CC: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* rsa: Split the rsa-verify to separate the modular exponentiationRuchika Gupta2015-01-293-275/+359
| | | | | | | | | | | | | | | | | | | | | | Public exponentiation which is required in rsa verify functionality is tightly integrated with verification code in rsa_verify.c. The patch splits the file into twp separating the modular exponentiation. 1. rsa-verify.c - The file parses device tree keys node to fill a keyprop structure. The keyprop structure can then be converted to implementation specific format. (struct rsa_pub_key for sw implementation) - The parsed device tree node is then passed to a generic rsa_mod_exp function. 2. rsa-mod-exp.c Move the software specific functions related to modular exponentiation from rsa-verify.c to this file. Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com> CC: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* dm: exynos: Drop unused COMPAT features for SPISimon Glass2015-01-291-1/+0
| | | | | | | This has moved to driver model so we don't need the fdtdec support. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Minkyu Kang <mk7.kang@samsung.com>
* dm: tegra: Drop unused COMPAT features for I2C, SPISimon Glass2015-01-291-6/+0
| | | | | | These have moved to driver model so we don't need the fdtdec support. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: Drop gpio.h header from fdtdec.cSimon Glass2015-01-291-2/+0
| | | | | | | Since GPIO support has now moved to the driver model uclass, we can drop this include. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: fdt: Remove the old GPIO functionsSimon Glass2015-01-291-95/+0
| | | | | | | Now that we support device tree GPIO bindings directly in the driver model GPIO uclass we can remove these functions. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: fdt: Add a function to decode phandles with argumentsSimon Glass2015-01-291-0/+124
| | | | | | | | | | | For GPIOs and other functions we want to look up a phandle and then decode a list of arguments for that phandle. Each phandle can have a different number of arguments, specified by a property in the target node. This is the "#gpio-cells" property for GPIOs. Add a function to provide this feature, taken modified from Linux 3.18. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: dts: Add compatible string for Intel ICH9 SPI controllerSimon Glass2015-01-231-0/+1
| | | | | | | Add this to the enum so that we can use the various fdtdec functions. A later commit will move this driver to driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
* lzo: Update dst_len even on errorSimon Glass2015-01-141-1/+3
| | | | | | | This allows the caller to easily detect how much of the destination buffer has been used. Signed-off-by: Simon Glass <sjg@chromium.org>
OpenPOWER on IntegriCloud