summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* pinctrl: uniphier: support drive-strength configurationMasahiro Yamada2018-05-082-5/+140
| | | | | | This allows our DT to specify drive-strength property. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* pinctrl: uniphier: support per-pin configuration via DTMasahiro Yamada2018-05-082-4/+36
| | | | | | | | | | Currently, the UniPhier pinctrl drivers expose only the pin-group interface to device tree. Provide .get_pins_count, .get_pin_name, .pinconf_set hooks to support pin configuration via 'pins' DT property. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* pinctrl: uniphier: include <linux/build_bug.h> instead of <linux/bug.h>Masahiro Yamada2018-05-081-1/+1
| | | | | | | | | The #include <linux/bug.h> is here to use BUILD_BUG_ON_ZERO(). By replacing it with <linux/build_bug.h>, we can reduce the number of headers pulled in. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* pinctrl: uniphier: replace printf() with dev_err()Masahiro Yamada2018-05-081-1/+1
| | | | | | dev_err() is more suitable for printing error messages. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* pinctrl: uniphier: remove unneeded pin data of LD6b SoCMasahiro Yamada2018-05-081-13/+0
| | | | | | | | Since commit f73cfb4d0dee ("pinctrl: uniphier: simplify input enable and delete pin arrays"), these data are no longer used in any useful way. Remove. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* arm: v7R: Add support for enabling cachesLokesh Vutla2018-05-072-1/+22
| | | | | | | | | | Cache maintenance procedure is same for v7A and v7R processors. So re-use cache-cp15.c file except for mmu parts. Tested-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* arm: v7R: Add support for MPULokesh Vutla2018-05-078-109/+257
| | | | | | | | | | | | | The Memory Protection Unit(MPU) allows to partition memory into regions and set individual protection attributes for each region. In absence of MPU a default map[1] will take effect. Add support for configuring MPU on Cortex-R, by reusing the existing support for Cortex-M processor. [1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0460d/I1002400.html Tested-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* arm: v7R: Add initial supportMichal Simek2018-05-074-1/+12
| | | | | | | | | | | | | | | | The Cortex-R* processors are a mid-range CPUs for use in deeply-embedded, real-time systems. It implements the ARMv7-R architecture, and includes Thumb-2 technology for optimum code density and processing throughput. Except for MPU(Memory Protection Unit) and few CP15 registers, most of the features are compatible with v7 architecture. So,reuse the same armv7 folder and introduce a new config CPU_V7R in order to differentiate from v7 based platforms. Tested-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* arm: v7: Kconfig: Introduce SYS_ARM_CACHE_CP15Lokesh Vutla2018-05-072-5/+8
| | | | | | | | | | | Certain ARM architectures like ARMv7-A, ARMv7-R has support for enabling caches using CP15 registers. To have a common support for all these architectures, introduce a Kconfig symbol SYS_ARM_CACHE_CP15 that selects cache-cp15.c Tested-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* arm: v7: Kconfig: Add entry for MMULokesh Vutla2018-05-071-0/+15
| | | | | | | | | | Add a Kconfig entry for MMU and imply for all platforms using cache-cp15.c containing MMU setup. Using imply instead of select so that MMU can be disabled by defconfigs when not needed. Tested-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* arm: v7: Kconfig: Rename CPU_V7 as CPU_V7ALokesh Vutla2018-05-0723-76/+76
| | | | | | | | | | | | | | | | | Currently CPU_V7 kconfig symbol supports only ARMv7A architectures under armv7 folder. This led to a misconception of creating separate folders for armv7m and armv7r. There is no reason to create separate folder for other armv7 based architectures when it can co-exist with few Kconfig symbols. As a first step towards a common folder, rename CPU_V7 as CPUV7A. Later separate Kconfig symbols can be added for CPU_V7R and CPU_V7M and can co exist in the same folder. Reviewed-by: Tom Rini <trini@konsulko.com> Tested-by: Michal Simek <michal.simek@xilinx.com> Suggested-by: Alexander Graf <agraf@suse.de> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* arm: v7: Update VBAR only if availableLokesh Vutla2018-05-071-0/+2
| | | | | | | | Not all ARM V7 based cpus has VBAR for remapping vector base address. So, update VBAR only if it available. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* test: ofnode: test ofnode_device_is_compatible()Masahiro Yamada2018-05-072-0/+18
| | | | | | | | Test ofnode_device_is_compatible(), and also ofnode_path(). Requested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* test: regmap: test Linux-compatible syscon_node_to_regmap()Masahiro Yamada2018-05-072-0/+25
| | | | | | | | | Like Linux, syscon_node_to_regmap() allows a node to work as a syscon provider without binding it to a syscon driver. Test this. Requested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* syscon: add Linux-compatible syscon APIMasahiro Yamada2018-05-072-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The syscon implementation in U-Boot is different from that in Linux. Thus, DT files imported from Linux do not work for U-Boot. In U-Boot driver model, each node is bound to a dedicated driver that is the most compatible to it. This design gets along with the concept of DT, and the syscon in Linux originally worked like that. However, Linux commit bdb0066df96e ("mfd: syscon: Decouple syscon interface from platform devices") changed the behavior because it is useful to let a device bind to another driver, but still work as a syscon provider. That change had happened before U-Boot initially supported the syscon driver by commit 6f98b7504f70 ("dm: Add support for generic system controllers (syscon)"). So, the U-Boot's syscon works differently from the beginning. I'd say this is mis-implementation given that DT is not oriented to a particular project, but Linux is the canon of DT in practice. The problem typically arises in the combination of "syscon" and "simple-mfd" compatibles. In Linux, they are orthogonal, i.e., the order between "syscon" and "simple-mfd" does not matter at all. Assume the following compatible. compatible = "foo,bar-syscon", "syscon", "simple-mfd"; In U-Boot, this device node is bound to the syscon driver (driver/core/syscon-uclass.c) since the "syscon" is found to be the most compatible. Then, syscon_get_regmap() succeeds. However, compatible = "foo,bar-syscon", "simple-mfd", "syscon"; does not work because this node is bound to the simple-bus driver (drivers/core/simple-bus.c) in favor of "simple-mfd" compatible. The compatible string "syscon" is just dismissed. Moreover, compatible = "foo,bar-syscon", "syscon"; works like the first case because the syscon driver populates the child devices. This is wrong because populating children is the job of "simple-mfd" (or "simple-bus"). This commit ports syscon_node_to_regmap() from Linux. This API does not require the given node to be bound to a driver in any way. Reported-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* regmap: change regmap_init_mem() to take ofnode instead udeviceMasahiro Yamada2018-05-0713-19/+18
| | | | | | | | | | | | Currently, regmap_init_mem() takes a udevice. This requires the node has already been associated with a device. It prevents syscon/regmap from behaving like those in Linux. Change the first argumenet to take a device node. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: ofnode: add ofnode_device_is_compatible() helperMasahiro Yamada2018-05-073-7/+23
| | | | | | | | device_is_compatible() takes udevice, but there is no such a helper that takes ofnode. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* regmap: clean up regmap allocationMasahiro Yamada2018-05-079-43/+24
| | | | | | | | | | | | | | | | | | Putting zero length array at the end of struct is a common technique to embed arbitrary length of members. There is no good reason to let regmap_alloc_count() branch by "if (count <= 1)". As far as I understood the code, regmap->base is an alias of regmap->ranges[0].start, but it is not helpful but make the code just ugly. Rename regmap_alloc_count() to regmap_alloc() because the _count suffix seems pointless. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: fixup cpu_info-rcar.c] Signed-off-by: Tom Rini <trini@konsulko.com>
* psci: arm: remove armv7 function psci_save_target_pcPatrick Delaunay2018-05-072-9/+1
| | | | | | | | | | This function is no more used, and replaced by psci_save which save also context id as requested by PSCI requirements. Even if the context id is not used by Linux, it should be saved and restored in r0 when the CPU_ON is performed. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
* sunxi: psci: save context id in cpu_on commandPatrick Delaunay2018-05-071-3/+4
| | | | | | | Replace the psci_save_target_pc call by the new function psci_save(cpu, pc,context_id) Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
* uniphier: psci: save context id in cpu_on commandPatrick Delaunay2018-05-071-2/+5
| | | | | | | | Replace the psci_save_target_pc call by the new function psci_save(cpu, pc,context_id) Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* tegra: psci: save context id in cpu_on commandPatrick Delaunay2018-05-071-1/+2
| | | | | | | | Replace the psci_save_target_pc call by the new function psci_save(cpu, pc,context_id) Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
* imx7: psci: save context id in cpu_on commandPatrick Delaunay2018-05-071-1/+2
| | | | | | | Replace the psci_save_target_pc call by the new function psci_save(cpu, pc,context_id) Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
* ls102xa: psci: save context id in cpu_on commandPatrick Delaunay2018-05-071-1/+2
| | | | | | | Replace the psci_save_target_pc call by the new function psci_save(cpu, pc,context_id) Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
* arm: stm32mp1: add PSCI supportPatrick Delaunay2018-05-075-0/+191
| | | | | | | | | | | | | | | | | | Add PSCI v1.0 support for Linux and manage PSCI state for each CPU (affinity 0 level) with all mandatory functions: - PSCI_VERSION - CPU_SUSPEND - CPU_OFF - CPU_ON - AFFINITY_INFO - SYSTEM_OFF - SYSTEM_RESET - PSCI_FEATURES and 1 optional to avoid Linux warning - MIGRATE_INFO_TYPE Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: CITOOLS <smet-aci-reviews@lists.codex.cro.st.com>
* arm: psci: add a weak function psci_arch_cpu_entryPatrick Delaunay2018-05-071-0/+7
| | | | | | | | | | The added function psci_arch_cpu_entry() is called during psci_cpu_entry() and can be used by arch to handle PSCI state transition from ON_PENDING to ON. The default weak function is empty: not behavior change. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
* arm: psci: save context id for cpu_on PSCI commandPatrick Delaunay2018-05-073-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | Save and use the 3rd parameter of PSCI CPU_ON request: context_id. The context_id parameter is only meaningful to the caller. U-Boot PSCI preserves a copy of the value passed in this parameter. Following wakeup from a powerdown state, U-BOOT PSCI places this value in R0 when it first enters the OS. NB: this context id is not (yet?) used by Linux but it is mandatory to be PSCI compliant. update armv7 psci functions: - psci_save_target_pc(): keep for backward compatibility with current platform (only save PC and force context id to 0) => should be removed when all platform migrate to the new API - psci_save(): new API to use by ARMv7 platform with PSCI, save pc (= entry_point_address) and context_id Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* Prepare v2018.05Tom Rini2018-05-071-1/+1
| | | | Signed-off-by: Tom Rini <trini@konsulko.com>
* git-mailrc: Update some addresses and aliasesTom Rini2018-05-071-27/+12
| | | | | | | | - Based on commit 08ae21af9671 ("MAINTAINERS: Switch nxp.com domain") update or drop some formerly Freescale addresses. - Update a few aliases to reflect current custodians Signed-off-by: Tom Rini <trini@konsulko.com>
* SPDX: Convert all of our multiple license tags to Linux Kernel styleTom Rini2018-05-07121-239/+121
| | | | | | | | | | | | | | | | | | | | | | | When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have multiple licenses (in these cases, dual license) declared in the SPDX-License-Identifier tag. In this case we change from listing "LICENSE-A LICENSE-B" or "LICENSE-A or LICENSE-B" or "(LICENSE-A OR LICENSE-B)" to "LICENSE-A OR LICENSE-B" as per the Linux Kernel style document. Note that parenthesis are allowed so when they were used before we continue to use them. Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com>
* SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini2018-05-078175-17163/+8207
| | | | | | | | | | | | | | | | | | | | When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
* arm: mach-omap2: cache: Explicitly enable I cacheLokesh Vutla2018-05-061-1/+5
| | | | | | | | | | | | | omap-common cache enabling sequence relies on cpu_init_cp15() (inside start.S) for enabling I-caches. But cpu_init_cp15() can be skipped if CONFIG_SKIP_LOWLEVEL_INIT is defined. So enable I-caches if not enabled already. Debugged-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Tested-by: Steve Kipisz <s-kipisz2@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Tested-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* Kconfig: Add dependency on HASH to verified bootKelvin Cheung2018-05-061-0/+1
| | | | | | | | | | | | | | | | Building with verified boot support requires hash, add that dependency here. Otherwise the following build error will come out without crc command. LD u-boot lib/built-in.o: In function `hash_calculate': lib/rsa/rsa-checksum.c:29: undefined reference to `hash_progressive_lookup_algo' ... make[1]: *** [u-boot] Error 1 Signed-off-by: Kelvin Cheung <keguang.zhang@gmail.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* board: ti: am43: Fix DCDC3 voltage for epos-evmKeerthy2018-05-062-3/+8
| | | | | | | | | | A common voltage of 1.35V was being programmed for all am43 board versions. EPOS-EVM Needs 1.20V for LPDDR2. Fixes: fc69d472621b5 (“board: ti: AM43XX: Add ddr voltage rail configuration”) Reported-by: James Doublesin <doublesin@ti.com> Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* README.sandbox: small typosTrevor Woerner2018-05-061-4/+4
| | | | Signed-off-by: Trevor Woerner <twoerner@gmail.com>
* stdio_names: Ensure MAX_NAMES is defined before use, don't use 3 directlyTom Rini2018-05-062-2/+3
| | | | | | | | | | | With tighter build flags the fact that <stdio_dev.h> doesn't have a reference back to MAX_NAMES causes an error. Include <stdio.h> here and then in common/console.c use MAX_NAMES rather than 3 when working with stdio_names. Reported-by: Peter Robinson <pbrobinson@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com> Tested-by: Peter Robinson <pbrobinson@gmail.com>
* stdio_dev.h: Drop the video section as it is unusedTom Rini2018-05-061-18/+0
| | | | | | | | | | | With tighter build flags the fact that this header referenced uchar/ushort without including what typedefs it causes an error. Rather than add another include here, drop the section in question as it is unused. Reported-by: Peter Robinson <pbrobinson@gmail.com> Tested-by: Peter Robinson <pbrobinson@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge git://git.denx.de/u-boot-usbTom Rini2018-05-032-2/+2
|\
| * usb: f_mass_storage: simplify logical expressionHeinrich Schuchardt2018-04-301-1/+1
| | | | | | | | | | | | An unsigned int is always >= 0. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * usb: gadget: remove duplicate assignment.Heinrich Schuchardt2018-04-301-1/+1
| | | | | | | | | | | | We should not make the same assignement twice. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | Merge git://git.denx.de/u-boot-shTom Rini2018-05-0340-133/+48
|\ \
| * | ARM: rmobile: Zap #undef DEBUGMarek Vasut2018-05-0214-27/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The DEBUG macro is never defined unless explicitly enabled. Drop useless #undef DEBUG in the board configs so it won't spread any further. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | ARM: rmobile: Contain CONFIG_ARCH_RMOBILE_BOARD_STRINGMarek Vasut2018-05-0212-48/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull the symbol from the boards and zap struct rmobile_sysinfo as they are rather useless. The entire purpose of that whole machinery was to print board name in the CONFIG_ARCH_RMOBILE_BOARD_STRING. Do that in a far simpler and more contained manner. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | ARM: rmobile: Convert CONFIG_ARCH_RMOBILE_BOARD_STRING to KconfigMarek Vasut2018-05-0222-11/+14
| | | | | | | | | | | | | | | | | | | | | Convert the symbol to Kconfig, no functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | ARM: rmobile: Fix CONFIG_RMOBILE_BOARD_STRINGMarek Vasut2018-05-023-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | Rename CONFIG_RMOBILE_BOARD_STRING to CONFIG_ARCH_RMOBILE_BOARD_STRING to make things consistent, no functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | doc: rmobile: Update the READMEMarek Vasut2018-05-021-44/+32
| | | | | | | | | | | | | | | | | | | | | | | | Synchronize the README with the current state of U-Boot, unify the build instructions to avoid duplication. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | clk: renesas: Drop USB extal from the R8A7792 clock driverMarek Vasut2018-05-021-2/+0
| | | | | | | | | | | | | | | | | | | | | The R8A7792 does not have the USB extal, so drop it. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
* | | Merge git://git.denx.de/u-boot-mmcTom Rini2018-05-016-5/+19
|\ \ \
| * | | drivers:power:max77693: remove redundant logical constraintHeinrich Schuchardt2018-05-021-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As ret is not set when calling max77693_get_vcell() there is no need to check ret again. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | | mmc: zynq_sdhci: use correct quirk if CONFIG_ZYNQ_HISPD_BROKEN is definedHannes Schmelzer2018-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'SDHCI_QUIRK_NO_HISPD_BIT' is used wrong here. The purpose of this quirk is to tell the sdhci-driver that the IP-core doesn't have a "high- speed-enable" bit in its registers. With this commit we change this to the correct quirk: SDHCI_QUIRK_BROKEN_HISPD_MODE Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>