summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-uniphier
Commit message (Collapse)AuthorAgeFilesLines
* ARM: uniphier: remove ad-hoc clock enabling for EHCIMasahiro Yamada2018-09-114-15/+0
| | | | | | | | The MIO clock is enabled by default, and the STDMAC clock is enabled by the clk driver. The ad-hoc way to enable the clock is no longer needed. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* Kconfig: Sort bool, default, select and imply optionsMichal Simek2018-07-301-3/+4
| | | | | | | | | Another round of sorting Kconfig entries aplhabetically. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Alexey Brodkin <abrodkin@synopsys.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* ARM: uniphier: enable distro bootMasahiro Yamada2018-07-251-4/+4
| | | | | | | | | | | | | | | | | | | | Switch to the distro boot for UniPhier platform. - Remove the environment vairalbes used to load images from raw block devices. - Keep the command to download images via tftp. This will be useful to boot the kernel when no valid kernel image is ready yet in the file system. - Use root.cpio.gz instead of root.cpio.uboot because we always know the file size of the init ramdisk; it is loaded via either a file system or network. - Rename fit_addr_r to kernel_addr_r, which the distro command checks to get the load address of FIT image. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: support fdt_fixup_mtdpartsMasahiro Yamada2018-07-251-0/+8
| | | | | | | Propagate the "mtdparts" environment variable to the DT passed in to OS. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: split ft_board_setup() out to a separate fileMasahiro Yamada2018-07-254-36/+57
| | | | | | Prepare to add more fdt fixup code. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: clean-up ft_board_setup()Masahiro Yamada2018-07-251-3/+3
| | | | | | | The 'bd' is passed in ft_board_setup() as the second argument. Replace 'gd->bd' with 'bd'. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: rename environment variable fdt_file to fdtfileMasahiro Yamada2018-05-231-2/+2
| | | | | | | | | For booting Linux in the generic distro mechanism, cmd/pxe.c retrieves the FDT file name from "fdtfile" environment variable. Rename "fdt_file" to "fdtfile" for easier migration to distro boot. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* arm: v7: Kconfig: Rename CPU_V7 as CPU_V7ALokesh Vutla2018-05-072-2/+2
| | | | | | | | | | | | | | | | | 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>
* 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>
* SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini2018-05-0798-205/+98
| | | | | | | | | | | | | | | | | | | | 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>
* libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h>Masahiro Yamada2018-03-052-2/+2
| | | | | | | | | | | | | | | | | Thomas reported U-Boot failed to build host tools if libfdt-devel package is installed because tools include libfdt headers from /usr/include/ instead of using internal ones. This commit moves the header code: include/libfdt.h -> include/linux/libfdt.h include/libfdt_env.h -> include/linux/libfdt_env.h and replaces include directives: #include <libfdt.h> -> #include <linux/libfdt.h> #include <libfdt_env.h> -> #include <linux/libfdt_env.h> Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: hide memory top by platform hook instead of CONFIGMasahiro Yamada2018-01-091-0/+7
| | | | | | | I do not see a good reason to do this by a CONFIG option that affects all SoCs. The ram_size can be adjusted by dram_init() at run-time. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: do not use RAM that exceeds 32 bit address rangeMasahiro Yamada2018-01-091-0/+17
| | | | | | | | | | | | | | | | | | | | | LD20 / PXs3 boards are equipped with a large amount of memory beyond the 32 bit address range. U-Boot relocates itself to the end of the available RAM. This is a problem for DMA engines that only support 32 bit physical address, like the SDMA of SDHCI controllers. In fact, U-Boot does not need to run at the very end of RAM. It is rather troublesome for drivers with DMA engines because U-Boot does not have API like dma_set_mask(), so DMA silently fails, making the driver debugging difficult. Hide the memory region that exceeds the 32 bit address range. It can be done by simply carving out gd->ram_size. It would also possible to override get_effective_memsize() or to define CONFIG_MAX_MEM_MAPPED, but dram_init() is a good enough place to do this job. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: use FIELD_PREP for PLL settingsMasahiro Yamada2017-12-121-6/+8
| | | | | | | | It is tedious to define both mask and bit-shift. <linux/bitfield.h> provides a convenient way to get access to register fields with a single shifted mask. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: compute SSCPLL values more preciselyMasahiro Yamada2017-12-121-2/+4
| | | | | | | Use DIV_ROUND_CLOSEST(). To make the JK value even more precise, I used a bigger coefficient, then divide it by 512. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: fix SSCPLL init code for LD11 SoCDai Okamura2017-12-121-0/+1
| | | | | | | | | Commit 682e09ff9f35 ("ARM: uniphier: add PLL init code for LD20 SoC") missed to write the computed value to the SSCPLLCTRL2 register. Fixes: 682e09ff9f35 ("ARM: uniphier: add PLL init code for LD20 SoC") Signed-off-by: Dai Okamura <okamura.dai@socionext.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: compile pll-base-ld20.c for PXs3Masahiro Yamada2017-12-121-0/+1
| | | | | | | | | Fix the link error for the combination of CONFIG_ARCH_UNIPHIER_LD11=n CONFIG_ARCH_UNIPHIER_LD20=n CONFIG_ARCH_UNIPHIER_PXS3=y Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: clean up board_initMasahiro Yamada2017-12-041-5/+2
| | | | | | | | Remove unnecessary DECLARE_GLOBAL_DATA_PTR and header includes. <common.h> has been replaced with <linux/errno.h> and <linux/printk.h>. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: dts: uniphier: Sync with Linux 4.15-rc1Masahiro Yamada2017-11-292-2/+2
| | | | Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: remove XIRQ pin settingsMasahiro Yamada2017-11-291-16/+0
| | | | | | The XIRQ pins are now set up on the Linux side by the GPIO hogging. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: remove IRQ settingsMasahiro Yamada2017-11-291-35/+0
| | | | | | | | | | This work-around has been here in U-Boot because the AIDET and GPIO drivers were missing in the upstream Linux. Both are now available in Linus' tree: - drivers/irqchip/irq-uniphier-aidet.c - drivers/gpio/gpio-uniphier.c Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: use pr_*() more where appropriateMasahiro Yamada2017-10-231-8/+10
| | | | | | | Commit dd74b945af2e ("ARM: uniphier: use pr_() instead of printf() where appropriate"), but I missed to update this file for some reason. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: split u-boot,dm-pre-reloc out to uniphier-v7-u-boot.dtsiMasahiro Yamada2017-10-231-0/+2
| | | | | | | | | | | | | | UniPhier 32-bit SoCs use CONFIG_SPL_OF_CONTROL. So, many nodes must be marked as dm-pre-reloc to prevent fdtgrep from stripping them off. Sprinkling U-Boot-specific properties all over the place is painful because DT files are synced with Linux from time to time. Split u-boot,dm-pre-reloc out to uniphier-v7-u-boot.dtsi, which is appended to UniPhier V7 DTS before the build. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
* ARM: uniphier: remove CONFIG_UNIPHIER_ETHMasahiro Yamada2017-10-233-18/+0
| | | | | | | | | | The option is never enabled by anyone. Remove the code surrounded by its ifdef. This should be handled by the clock/reset drivers. CONFIG_UNIPHIER_ETH in scripts/config_whitelist.txt will be dropped by the next resync. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: adjust ifdefs for new UniPhier DWC3 CONFIGMasahiro Yamada2017-10-153-9/+9
| | | | | | Now USB 3.0 feature is enabled/disabled by CONFIG_USB_DWC3_UNIPHIER. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: change the default of SoC select to UNIPHIER_V7_MULTIMasahiro Yamada2017-10-151-1/+1
| | | | | | | ARCH_UNIPHIER_V8_MULTI depends on !SPL, so the default may be hidden. Use a clearer default. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: use pr_() instead of printf() where appropriateMasahiro Yamada2017-10-159-19/+35
| | | | | | Replace printf() with pr_() to specify proper loglevel. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* printk: collect printk stuff into <linux/printk.h> with loglevel supportMasahiro Yamada2017-10-042-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we import code from Linux, with regular re-sync planned, we want to use printk() and pr_*(). U-Boot does not support them in a clean way. So, people end up with local macros, or compat headers here and there, then we occasionally see build errors of definition conflicts. We have include/linux/compat.h, but putting all sorts of unrelated things into a single header is just a temporal workaround. Hence this patch, to find the best home for all printk variants. If you want to use printk() and friends, please include <linux/printk.h>. This header is self-contained, and pulls in only a few headers. When I was testing this clean-up, I noticed the image size exceeded its platform limit on some boards. This is because all pr_*() that were previously defined as no-op in include/linux/mtd/mtd.h (unless CONFIG_MTD_DEBUG is set), are now enabled. To make such boards happy, this commit also implements CONFIG_LOGLEVEL. The concept is similar to the kernel parameter "loglevel". (Actually, the Kconfig help message was taken from kernel-paremeter.txt of Linux) Messages with a loglevel smaller than console loglevel will be printed. The difference is the loglevel is build-time determined. To save the image size, lower priority pr_*() are compiled out. I set the default of CONFIG_LOGLEVEL to 6, i.e. pr_notice and higher priority messages are compiled in. I adjusted CONFIG_LOGLEVEL to avoid build error for some boards. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> [trini: Add in SPL_LOGLEVEL that is the same as LOGLEVEL] Signed-off-by: Tom Rini <trini@konsulko.com>
* ARM: uniphier: add GPU(Mali) reset deassert and clk enableMasahiro Yamada2017-09-182-0/+24
| | | | | | | The driver for Linux is out of control of Socionext, so set up reset / clock in here. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: remove bit field macros from sc64-regs.hMasahiro Yamada2017-09-182-19/+1
| | | | | | | | Starting from PXs3, the bit fields of RSTCTRL, CLKCTRL registers will change every SoC. There is no more point to define bitfields in the common header file. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: merge two defconfig files into uniphier_v7_defconfigMasahiro Yamada2017-09-181-10/+11
| | | | | | | | | | The main difference between Pro4 and PXs2/LD6b is the Denali NAND IP version. This is now distinguished by DT. Merge the two defconfig files into uniphier_v7_defconfig. Update the README.uniphier too. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: set system bus pinmux for PXs3Masahiro Yamada2017-08-301-0/+2
| | | | | | | The system bus is not enabled by default for NAND, eMMC boot etc. of PXs3. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: move CONFIG_NAND to defconfigMasahiro Yamada2017-08-301-1/+0
| | | | | | | This imply was added when the option was moved by the moveconfig tool, but the intention is not clear. Move it to defconfig. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: fix DSPLL init code for LD20 SoCDai Okamura2017-08-301-3/+3
| | | | | Signed-off-by: Dai Okamura <okamura.dai@socionext.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: remove ad-hoc pin settings for NANDMasahiro Yamada2017-08-301-24/+4
| | | | | | | This is now set up by the pinctrl driver when the NAND driver is probed. Remove the legacy code. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: add PLL settings for PXs3Masahiro Yamada2017-08-301-0/+55
| | | | Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: move PLLCTRL register macros to each SoC .c fileMasahiro Yamada2017-08-303-21/+30
| | | | | | | | The new SoC PXs3 changed the address of PLL, but still uses the same PLL name. We can not define SC_*PLLCTRL in the common header. Move them to per-SoC .c file. Also, fix some PLL comments. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: replace <common.h> with <linux/delay.h> in pll settingsMasahiro Yamada2017-08-302-2/+2
| | | | | | | | | | The #include <common.h> was added for mdelay(). Later, the declaration of mdelay was moved to <linux/delay.h> by commit 5bc516ed661a ("delay: collect {m, n, u}delay declarations to include/linux/delay.h"). There is no need to include <common.h> now. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* Revert "ARM: uniphier: fix ROM boot mode for PH1-sLD3"Masahiro Yamada2017-08-201-5/+0
| | | | | | | | | | | This reverts commit 82d075e79fa509ffb8ecd8dd2dc216929d6e8289. Commit 82d075e79fa5 ("ARM: uniphier: fix ROM boot mode for PH1-sLD3") was a workaround for sLD3. Now the sLD3 SoC support has been removed. Revert it to allow to simplify the init code. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* Revert "ARM: uniphier: move lowlevel debug init code after page table switch"Masahiro Yamada2017-08-201-4/+4
| | | | | | | | | | | | This reverts commit bcc51c1512a3deb6a9fdd37362c6dde32ad3da23. Commit bcc51c1512a3 ("ARM: uniphier: move lowlevel debug init code after page table switch") was intended to support lowlevel debug for sLD3. Now the sLD3 SoC support has been removed. Revert it to allow to enable lowlevel debug earlier. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: remove sLD3 SoC supportMasahiro Yamada2017-08-2032-338/+26
| | | | | | This SoC is too old. It is difficult to maintain any longer. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* env: Rename getenv/_f() to env_get()Simon Glass2017-08-161-1/+1
| | | | | | | | | | | We are now using an env_ prefix for environment functions. Rename these two functions for consistency. Also add function comments in common.h. Quite a few places use getenv() in a condition context, provoking a warning from checkpatch. These are fixed up in this patch also. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
* env: Rename common functions related to setenv()Simon Glass2017-08-161-1/+1
| | | | | | | | | We are now using an env_ prefix for environment functions. Rename these commonly used functions, for consistency. Also add function comments in common.h. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
* env: Rename setenv() to env_set()Simon Glass2017-08-161-5/+5
| | | | | | | | We are now using an env_ prefix for environment functions. Rename setenv() for consistency. Also add function comments in common.h. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
* Convert CONFIG_NAND to KconfigAdam Ford2017-08-121-0/+1
| | | | | | | | | This converts the following to Kconfig: CONFIG_NAND Signed-off-by: Adam Ford <aford173@gmail.com> [trini: Sync up a few more, add imply's] Signed-off-by: Tom Rini <trini@konsulko.com>
* ARM: uniphier: remove part number info from the boot logMasahiro Yamada2017-07-261-11/+11
| | | | | | | | | | As is often the case with SoC development, slightly different products (i.e. different part number) are developed based on the same silicon-die. Such fine grained information is unmaintainable. Also, "SoC:" is a better fit that "CPU:". Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: remove SPL support for ARMv8 SoCsMasahiro Yamada2017-07-2623-1953/+6
| | | | | | | | | | | It has been a while since ARM Trusted Firmware supported UniPhier SoC family. U-Boot SPL was intended as a temporary loader that runs in secure world. It is a maintenance headache to support two different boot mechanisms. Secure firmware is realm of ARM Trusted Firmware and now U-Boot only serves as a non-secure boot loader for UniPhier ARMv8 SoCs. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: uniphier: fix various sparse warningsMasahiro Yamada2017-06-258-10/+17
| | | | | | | | | | Fix warnings reported by sparse: - ... was not declared. Should it be static?" - cast to restricted __be32 While fixing those, the type conflict of cci500_init() was found. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* dm: Fix up inclusion of common.hSimon Glass2017-06-011-0/+1
| | | | | | | | | | | | | | It is good practice to include common.h as the first header. This ensures that required features like the DECLARE_GLOBAL_DATA_PTR macro, configuration options and common types are available. Fix up some files which currently don't do this. This is necessary because driver model will soon start using global data and configuration in the dm/read.h header file, included via dm.h. The gd->fdt_blob value will be used to access the device tree and CONFIG options will be used to determine whether to support inline functions in the header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: Use dm.h header when driver mode is usedSimon Glass2017-06-011-2/+1
| | | | | | | | This header includes things that are needed to make driver build. Adjust existing users to include that always, even if other dm/ includes are present Signed-off-by: Simon Glass <sjg@chromium.org>