summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-08-15atmel: Bring in at91 pio4 device tree file and bindingsWenyou Yang
Bring in required device tree file and bindings from Linux. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Andreas Bießmann <andreas@biessmann.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-08-15pinctrl: at91-pio4: Add pinctrl driverWenyou Yang
AT91 PIO4 controller is a combined gpio-controller, pin-mux and pin-config module. The peripheral's pins are assigned through per-pin based muxing logic. The pin configuration is performed on specific registers which are shared along with the gpio controller. So regard the pinctrl device as a child of atmel_pio4 device. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
2016-08-15gpio: atmel_pio4: Rework to support DM & DTWenyou Yang
Rework the driver to support driver model and device tree, and support to regard the pio4 pinctrl device as a child of atmel_pio4 device. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-08-15gpio: atmel_pio4: Move PIO4 definitions to head fileWenyou Yang
In order to make these PIO4 definitions shared with AT91 PIO4 pinctrl driver, move them from the existing gpio driver to the head file, and rephrase them. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-08-15clk.h: inline clk_get_by_name()Andreas Bießmann
Fix compile warning for non OF_CONTROL builds: ---8<--- In file included from /Volumes/devel/u-boot/drivers/gpio/atmel_pio4.c:10:0: /Volumes/devel/u-boot/include/clk.h:107:12: warning: 'clk_get_by_name' defined but not used [-Wunused-function] --->8--- Signed-off-by: Andreas Bießmann <andreas@biessmann.org> Acked-by: Stephen Warren <swarren@nvidia.com>
2016-08-15clk: at91: Add clock driverWenyou Yang
The patch is referred to at91 clock driver of Linux, to make the clock node descriptions in DT aligned with the Linux's. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-08-15tpm: atmel_twi: Make compatible with DM I2C bussesmario.six@gdsys.cc
Commit 302c5db ("dm: tpm: Add Driver Model support for tpm_atmel_twi driver") converted the Atmel TWI TPM driver itself to driver model, but kept the legacy-style i2c_write/i2c_read calls. Commit 3e7d940 ("dm: tpm: Every TPM drivers should depends on DM_TPM") then made DM_I2C a dependency of the driver, effectively forcing users to turn on CONFIG_DM_I2C_COMPAT to get it to work. This patch adds the necessary dm_i2c_write/dm_i2c_read calls to make the driver compatible with DM, but also keeps the legacy calls in ifdefs, so that the driver is now compatible with both DM and non-DM setups. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
2016-08-15i2c: atmel: DT binding for i2c driverSongjun Wu
DT binding documentation for atmel i2c driver. Signed-off-by: Songjun Wu <songjun.wu@atmel.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Heiko Schocher <hs@denx.de>
2016-08-15i2c: atmel: add i2c driverSongjun Wu
Add i2c driver. Signed-off-by: Songjun Wu <songjun.wu@atmel.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Heiko Schocher <hs@denx.de>
2016-08-12Merge git://git.denx.de/u-boot-dmTom Rini
2016-08-12misc: add "call" uclass opStephen Warren
The call op requests that the callee pass a message to the underlying HW or device, wait for a response, and then pass back the response error code and message to the callee. It is useful for drivers that represent some kind of messaging or IPC channel to a remote device. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
2016-08-12power: pmic: act8846: add missing newline to debug statementsJohn Keeping
Signed-off-by: John Keeping <john@metanate.com> Acked-by: Simon Glass <sjg@chromium.org>
2016-08-12power: regulator: act8846: fix reading valuesJohn Keeping
The voltage and control registers need to be looked up from the value in driver_data. Adjust the get_value and get_enable functions to match the corresponding set_* functions. Signed-off-by: John Keeping <john@metanate.com> Acked-by: Simon Glass <sjg@chromium.org>
2016-08-12fdt: allow fdtdec_get_addr_size_*() to translate addressesStephen Warren
Some code may want to read reg values from DT, but from nodes that aren't associated with DM devices, so using dev_get_addr_index() isn't appropriate. In this case, fdtdec_get_addr_size_*() are the functions to use. However, "translation" (via the chain of ranges properties in parent nodes) may still be desirable. Add a function parameter to request that, and implement it. Update all call sites to default to the original behaviour. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Squashed in build fix from Stephen: Signed-off-by: Simon Glass <sjg@chromium.org>
2016-08-12fdt_support: fdt_translate_address() blob const correctnessStephen Warren
The next patch will call fdt_translate_address() from somewhere with a "const void *blob" rather than a "void *blob", so fdt_translate_address() must accept a const pointer too. Constify the minimum number of function parameters to achieve this. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org> Squashed in build fix from Stephen: Signed-off-by: Simon Glass <sjg@chromium.org>
2016-08-12kconfig: use bool instead of boolean for type definition attributesMasahiro Yamada
Linux stopped the use of keyword 'boolean' in Kconfig. Refer to commit 6341e62b212a2541efb0160c470e90bd226d5496 ("kconfig: use bool instead of boolean for type definition attributes") in Linux Kernel. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-12defconfig: am43xx_evm: enable eth driver modelMugunthan V N
Enable eth driver model for am43xx_evm as cpsw supports driver model. This was already added with the commit bc705ea1cf12 but with commit 4c4e3b37750f to add fit support CONFIG_DM_ETH was missed. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Cc: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-08-12drivers: net: cpsw: always flush cache of size aligned to PKTALIGNLokesh Vutla
cpsw tries to flush dcache which is not in the range of PKTALIGN. Because of this the following warning comes while flushing: CACHE: Misaligned operation at range [dffecec0, dffed016] Fix it by flushing cache of size aligned to PKTALIGN. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2016-08-12configs: dra7xx_evm: enable eth driver modelMugunthan V N
Enable eth driver model for dra7xx_evm as cpsw supports driver model. This was already added with the commit 641b936fa5ba but with commit bd7245849f7c to add fit support CONFIG_DM_ETH was missed. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Cc: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Lokesh Vutla <lokeshvutla@ti.com>
2016-08-12ARM: dra7xx_evm: Enable regulator DM supportVignesh R
Enable DM based regulator framework and also fixed regulator support as some IPs like mmc use regulators for there functioning. Signed-off-by: Vignesh R <vigneshr@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-08-12ARM: dts: dra7xx-evm: add evm_3v3_sd regulatorVignesh R
Add a node for evm_3v3_sd using onboard PCF GPIO expander which feeds on to mmc vdd. Update mapping for vmmc-supply and vmmc_aux-supply. evm_3v3_sd supplies to SD card vdd, and ldo1 to sdcard i/o lines. Signed-off-by: Vignesh R <vigneshr@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-08-12common: image: Add support for post-processing of imagesAndreas Dannenberg
This commit allows injecting a board/platform/device-specific post- processing function into the FIT image data loading process, which can include modifying the size and altering the starting source address of an image data artifact. This might be desired to do things like strip headers or footers attached to the images before they were packaged into the FIT, or to perform operations such as decryption or authentication. Introduce new configuration option CONFIG_FIT_IMAGE_POST_PROCESS to allow controlling this feature. If enabled, a platform-specific post- process function must be provided. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-08-12drivers/sysreset: group sysreset driversMax Filippov
Create drivers/sysreset and move sysreset-uclass and all sysreset drivers there. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
2016-08-12ARM: non-sec: flush code cacheline alignedStefan Agner
Flush operations need to be cacheline aligned to take effect, make sure to flush always complete cachelines. This avoids messages such as: CACHE: Misaligned operation at range [00900000, 009004d9] Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Tested-by: Fabio Estevam <fabio.estevam@nxp.com>
2016-08-12i2c: Drop redundant platform data setting in driversSimon Glass
The i2c uclass has a default setting for per_child_platdata_auto_alloc_size so drivers do not need to set it. Remove this from drivers to avoid confusion. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2016-08-11Merge branch 'master' of git://git.denx.de/u-boot-uniphierTom Rini
2016-08-11Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini
2016-08-11ARM: uniphier: add PSCI support for UniPhier ARMv7 SoCsMasahiro Yamada
Currently, only the CPU_ON function is supported. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-11ARM: uniphier: add uniphier_cache_set_active_ways()Masahiro Yamada
This outer cache allows to control active ways independently for each CPU, so this function will be useful to set up active ways for a specific CPU. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-11ARM: uniphier: add uniphier_cache_inv_way() to support way invalidationMasahiro Yamada
This invalidates entries in specified ways of the outer cache. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-11ARM: uniphier: fix CONFIG_SYS_CACHELINE_SIZE when outer cache is onMasahiro Yamada
The UniPhier outer cache (L2 cache on ARMv7 SoCs) has 128 byte line length and its tags are also managed per 128 byte line. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-11ARM: uniphier: move (and rename) CONFIG_UNIPHIER_L2CACHE_ON to KconfigMasahiro Yamada
Move this option to Kconfig, renaming it into CONFIG_CACHE_UNIPHIER. The new option name makes sense enough, and the same as Linux has. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-11ARM: uniphier: move outer cache register macros to .c fileMasahiro Yamada
Now, all of these macros are only used in cache-uniphier.c, so there is no need to export them in a header file. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-11ARM: uniphier: reuse uniphier_cache_disable() for lowlevel_initMasahiro Yamada
The DRAM is available at this point, so setup the temporary stack and call the C function to reduce the code duplication a bit. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-11ARM: uniphier: export uniphier_cache_enable/disable functionsMasahiro Yamada
The System Cache (outer cache) is used not only as L2 cache, but also as locked SRAM. The functions for turning on/off it is necessary whether the L2 cache is enabled or not. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-11ARM: uniphier: move lowlevel debug init code after page table switchMasahiro Yamada
As the sLD3 Boot ROM has a complex page table, it is difficult to set up the debug UART with enabling it. It will be much easier to initialize the UART port after switching over to the straight-mapped page table. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-11ARM: uniphier: fix ROM boot mode for PH1-sLD3Masahiro Yamada
Commit 4b50369fb535 ("ARM: uniphier: create early page table at run-time") broke the ROM boot mode for PH1-sLD3 SoC, because the run-time page table creation requires the outer cache register access but the page table in the sLD3 Boot ROM does not straight-map virtual/physical addresses. The idea here is to check the current page table to determine if it is a straight map table. If not, adjust the outer cache register base. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-11ARM: uniphier: refactor L2 zero-touching code in lowlevel_initMasahiro Yamada
Here, the ldr pseudo-instruction falls into the ldr + data set. The register access by [r1, #offset] produces shorter code. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-11ARM: uniphier: do not compile v7_outer_cache_disable if L2 is disabledMasahiro Yamada
If CONFIG_UNIPHIER_L2CACHE_ON is undefined, the L2 cache is never enabled, so there is no need for v7_outer_cache_disable(). The weak stub avoids the compile error anyway. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-11ARM: uniphier: support prefetch and touch operations for outer cacheMasahiro Yamada
The UniPhier outer cache (L2 cache on ARMv7 SoCs) can be used as SRAM by locking ways. These functions will be used to transfer the trampoline code for SMP into the locked SRAM. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-11ARM: uniphier: refactor outer cache codeMasahiro Yamada
Unify the range/all operation routines into the common function, uniphier_cache_maint_common(), and sync code with Linux a bit more. This reduces the code duplication. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-09Merge git://www.denx.de/git/u-boot-ppc4xxTom Rini
2016-08-09eth: asix88179: Add support for the driver modelAlban Bedel
Adjust this driver to support driver model for Ethernet. Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
2016-08-09eth: asix88179: Prepare supporting the driver modelAlban Bedel
Change the prototype of a few functions to allow resuing the code for the driver model. Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
2016-08-09ppc4xx: Fix platform supportDirk Eibach
Commit "ecc3066 Fix board init code to respect the C runtime environment" broke platform support for ppc4xx. start.S prepares a stackframe that is later rendered unusable by appending the reserved space for global data. Instead the reserved space has to be put first. Then the stackframe can be pushed. I can only test the 405EP OCM case. At least all other ppc4xx boards still build. Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2016-08-08i2c: i2c-uclass-compat: avoid any BSS usageVignesh R
As I2C can be used before DRAM initialization for reading EEPROM, avoid using static variables stored in BSS, since BSS is in DRAM, which may not have been initialised yet. Explicitly mark "static global" variables as belonging to the .data section. Signed-off-by: Vignesh R <vigneshr@ti.com> Acked-by: Heiko Schocher<hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-08-08efi_loader: disk: Sanitize exposed devicesAlexander Graf
When a target device is 0 bytes long, there's no point in exposing it to the user. Let's just skip them. Also, when an offset is passed into the efi disk creation, we should remove this offset from the total number of sectors we can handle. This patch fixes both things. Signed-off-by: Alexander Graf <agraf@suse.de>
2016-08-08efi_loader: disk: Fix CONFIG_BLK breakageAlexander Graf
When using CONFIG_BLK, there were 2 issues: 1) The name we generate the device with has to match the name we set in efi_set_bootdev() 2) The device we pass into our block functions was wrong, we should not rediscover it but just use the already known pointer. This patch fixes both issues. Signed-off-by: Alexander Graf <agraf@suse.de>
2016-08-08tiny-printf: Adjust to avoid using data sectionSimon Glass
We can pass all the variables down to the functions that need them, and then everything is on the stack. This is safer than using the data section. At least on firefly-rk3288, the code size is the same and the data size is 12 bytes smaller: before: 18865 2636 40 21541 5425 b/firefly-rk3288/spl/u-boot-spl after: 18865 2624 40 21529 5419 b/firefly-rk3288/spl/u-boot-spl Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Stefan Roese <sr@denx.de>
2016-08-08configs: k2l_evm: add random eth address supportMugunthan V N
There is only one ethernet mac address in e-fuse, but there are multiple slaves in keystone net, so enable random mac address support. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>