aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc
AgeCommit message (Collapse)AuthorFilesLines
2018-07-30Kconfig: Sort bool, default, select and imply optionsMichal Simek1-1/+1
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>
2018-07-30dm: Change CMD_DM enablingMichal Simek1-0/+1
CMD_DM is used for debug purpose and it shouldn't be enabled by default via Kconfig. Unfortunately this is in the tree for quite a long time that's why solution is to use imply DM for all targets which are enabling DM. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-30Kconfig: Sort bool, default, select and imply optionsMichal Simek1-3/+3
Fix Kconfig bool, default, select and imply options to be alphabetically sorted. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-07-10configs: Remove empty #ifdef/#ifndef blocks from configsAlex Kiernan1-3/+0
Remove empty #ifdef/#ifndef..#endif blocks where the configuration they guarded has been completely removed. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
2018-06-19common: Fix cpu nr type which is always unsigned typeMichal Simek2-9/+9
cpu_cmd() is reading cpu number via simple_strtoul() which is always unsigned type. Platform code implementations are not expecting that nr can be negative and there is not checking in the code for that too. This patch is using u32 type for cpu number to make sure that platform code get proper value range. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-05-09powerpc: mpc85xx: Improve Work-around for Erratum A005125Takuma Ueba1-0/+7
Work-around for Erratum A005125 must be applied to all cores. Signed-off-by: Yoshihisa Morizumi <yoshi.morizumi@jp.fujitsu.com> Signed-off-by: Takuma Ueba <ueba.takuma@jp.fujitsu.com> Reviewed-by: York Sun <york.sun@nxp.com>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini165-340/+165
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>
2018-04-28powerpc: fix typo in kgdb.cHeinrich Schuchardt1-1/+1
%s/alingment/alignment/ Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-04-27Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTRTom Rini4-8/+0
We have a large number of places where while we historically referenced gd in the code we no longer do, as well as cases where the code added that line "just in case" during development and never dropped it. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-08net: Move enetaddr env access code to env config instead of net configAlex Kiernan1-0/+1
In order that we can use eth_env_* even when CONFIG_NET isn't set, move these functions to environment code from net code. This fixes failures such as: board/ti/am335x/built-in.o: In function `board_late_init': board/ti/am335x/board.c:752: undefined reference to `eth_env_set_enetaddr' u-boot/board/ti/am335x/board.c:766: undefined reference to `eth_env_set_enetaddr' which caters for use cases such as: commit f411b5cca48f ("board: am335x: Always set eth/eth1addr environment variable") when Ethernet is required in Linux, but not U-Boot. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
2018-04-06powerpc: mpc8xx: move watchdog into drivers/watchdogChristophe Leroy3-13/+5
In preparation of DM watchdog, move basic actions into drivers/watchdog Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2018-04-06powerpc: mpc8xx: cleaning up watchdogChristophe Leroy3-20/+9
In preparation of migration to DM watchdog, clean up a bit. The 8xx watchdog really is a HW watchdog, so declare it as is then it goes through Kconfig And the watchdog reset doesn't mind getting interrupted, so no need to disable interrupts Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2018-04-06powerpc: mpc8xx: refactorise reginfoChristophe Leroy3-72/+20
reginfo is redundant with some of the commands in immap.c, so move reginfo into that file and remove duplicated info. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2018-04-06board: MCR3000: cleanup configChristophe Leroy1-0/+1
Some config is redundant with Kconfig. Fix it. Also remove unused configs Move SDRAM_MAX_SIZE in the only place it is used include/environment.h already defines CONFIG_ENV_SIZE from CONFIG_ENV_SECT_SIZE and defines CONFIG_ENV_ADDR as (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET) remove BOOTARGS as bootargs is set by the different boot commands Fix CONFIG_SYS_INIT_RAM_ADDR and CONFIG_SYS_INIT_RAM_SIZE to be in line with CPM DPRAM organisation Remove CONFIG_SYS_GBL_DATA_SIZE, CONFIG_SYS_GBL_DATA_OFFSET and CONFIG_SYS_INIT_SP_OFFSET which are unused Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2018-04-06powerpc: mpc8xx: initialisation of initial RAMChristophe Leroy1-7/+20
u-boot requires some RAM at startup, to store global data structure. RAM is also needed when we migrate to DM for some initial malloc This patch implements the proper init of that RAM by calling board_init_f_alloc_reserve() and board_init_f_init_reserve() Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2018-04-06powerpc: mpc8xx: redistribute data in CPM dpramChristophe Leroy1-8/+8
Some malloc memory is needed at startup for DM model. Lets reorganise the use of the CPM dpram. The MPC866/885 dpram, we have 8kbytes dual port RAM, which is usable as: IMMR + 0x2000..0x2800: BD/Data/Microcode IMMR + 0x2800..0x2e00: BD/Data IMMR + 0x2e00..0x3800: BD/Data/Microcode IMMR + 0x3800..0x3a00: BD/Data IMMR + 0x3a00..0x3c00: BD/Data/Microcode IMMR + 0x3c00..0x4000: Parameters for the Peripheral Controllers Lets reallocate all BDs in the 3800..3a00 area and give the full 2800..2e00 for dynamic RAM allocation including global data That way, the microcode areas remain available if needed one day. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2018-04-06powercp: mpc8xx: move commproc.hChristophe Leroy5-4/+691
include/commproc.h is dedicated to the 8xx, rename it cpm_8xx.h and move it into arch/powerpc/include/asm Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2018-04-06powerpc: mpc8xx: Change CONFIG_8xx to CONFIG_MPC8xxChristophe Leroy8-10/+10
CONFIG_8xx doesn't mean much outside of arch/powerpc/ This patch renames it CONFIG_MPC8xx just like CONFIG_MPC85xx etc ... It also renames 8xx_immap.h to immap_8xx.h to be consistent with other file names. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2018-04-06powerpc: mpc8xx: remove get_immr() argumentChristophe Leroy3-6/+4
get_immr() is always called with 0 as an argument, so it is useless. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2018-04-06powerpc: mpc8xx: make get_immr() independent of CONFIG_8xxChristophe Leroy1-2/+1
SPRN_IMMR is defined regardless of the CPU. Therefore, there is no point in enclosing get_immr() inside a #ifdef CONFIG_8xx As it a static inline function, it will in any case only be compiled in functons using it. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2018-04-06powerpc: mpc8xx: get rid of the multiple PVR_ valuesChristophe Leroy2-5/+3
Avoid hardcoding the PVR values in C since they are defined in processor.h At the same time, remove those multiple PVR values for 8xx and keep only one that we call PVR_8xx Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2018-04-06powerpc: mpc8xx: harmonise initialisation of the immap local pointerChristophe Leroy2-5/+3
In most places, immap local pointer is defined as immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; In a few places, it is defined as immap_t __iomem *immap = (immap_t __iomem *)(immr & 0xFFFF0000); This patch replaces the few of the latest form by the other one. The two are fully equivalent since SPRN_IMMR is set with CONFIG_SYS_IMMR very early in start.S Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2018-03-16ppc: Remove orphan xilinx_irq.h fileMichal Simek1-25/+0
This file is completely unused and it should be removed as the part of ppc405/ppc440 xilinx platform removal. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-03-05libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h>Masahiro Yamada11-11/+11
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>
2018-02-18fdt: Implement weak arch_fixup_fdt()Alexey Brodkin1-5/+0
Only ARM and in some configs MIPS really implement arch_fixup_fdt(). Others just use the same boilerplate which is not good by itself, but what's worse if we try to build with disabled CONFIG_CMD_BOOTM and enabled CONFIG_OF_LIBFDT we'll hit an unknown symbol which was apparently implemented in arch/xxx/lib/bootm.c. Now with weak arch_fixup_fdt() right in image-fdt.c where it is used we get both items highlighted above fixed. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: York Sun <york.sun@nxp.com> Cc: Stefan Roese <sr@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2018-02-09PowerPC: phy: enable all phylib drivers when use phylib and tsec enetZhao Qiang1-3/+1
config_phylib_all_drivers.h should be included when CONFIG_PHYLIB and CONFIG_TSEC_ENET are defined. Fixes: 3146f0c017 ("Move PHYLIB to Kconfig") Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
2018-01-30Convert CONFIG_SYS_BOOT_GET_{CMDLINE, KBD} to KconfigDerald D. Woods1-2/+0
This converts the following to Kconfig: CONFIG_SYS_BOOT_GET_CMDLINE CONFIG_SYS_BOOT_GET_KBD Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
2018-01-28powerpc: Drop CONFIG_WALNUT and other related dead codeTuomas Tynkkynen1-14/+0
CONFIG_WALNUT was dropped in June 2017 in: commit 98f705c9cefdfd ("powerpc: remove 4xx support") While at it, the related CONFIG_MACH_SPECIFIC and the have_of and _machine variables are unused as well, so drop them too. Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
2018-01-28gpio: mpc8xxx: Rename Kconfig option, structures, and functionsMario Six1-1/+1
Rename the Kconfig option, structures (and their members), as well as functions of the mpc85xx driver to include mpc8xxx to reflect the more generic usage. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-01-10drivers/misc: Share qbman init between archsAhmed Mansour6-348/+8
This patch adds changes necessary to move functionality present in PowerPC folders with ARM architectures that have DPAA1 QBMan hardware - Create new board/freescale/common/fsl_portals.c to house shared device tree fixups for DPAA1 devices with ARM and PowerPC cores - Add new header file to top includes directory to allow files in both architectures to grab the function prototypes - Port inhibit_portals() from PowerPC to ARM. This function is used in setup to disable interrupts on all QMan and BMan portals. It is needed because the interrupts are enabled by default for all portals including unused/uninitialised portals. When the kernel attempts to go to deep sleep the unused portals prevent it from doing so Signed-off-by: Ahmed Mansour <ahmed.mansour@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
2017-12-26Move CONFIG_PANIC_HANG to KconfigMasahiro Yamada1-0/+33
Freescale (NXP) boards have lots of defconfig files per board. I used "imply PANIC_HANG" for them. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: York Sun <york.sun@nxp.com>
2017-12-12ata: Migrate CONFIG_FSL_SATA to KconfigTuomas Tynkkynen2-0/+14
Use 'imply' here liberally to avoid the combinatorial explosion of defconfig changes in the PowerPC boards. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-12-12ata: Migrate CONFIG_SATA_SIL to KconfigTuomas Tynkkynen1-0/+6
Use 'imply' here liberally to avoid the combinatorial explosion of defconfig changes in the PowerPC boards. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-10-23powerpc: mpc85xx: Implement CPU erratum A-007907 for secondary coresYork Sun1-0/+6
Commit 06ad970b53a3 ("powerpc: mpc85xx: Implemente workaround for CPU erratum A-007907") clears L1CSR2 for the boot core, but other cores don't run through the workaround. Add similar code for secondary cores to clear DCSTASHID field in L1CSR2 register. Signed-off-by: York Sun <york.sun@nxp.com>
2017-10-02powerpc: Use asm-generic/io.hPaul Burton1-20/+5
Convert the powerpc architecture to make use of the new asm-generic/io.h to provide address mapping functions. As powerpc can actually perform non-identity mapping between physical & virtual addresses we can't simply make use of the generic phys_to_virt() & virt_to_phys() functions. However since map_physmem() already effectively implemented the same thing as virt_to_phys() we can simply implement virt_to_phys() instead of map_physmem() & use the generic map_physmem(). We also drop the no-op unmap_physmem(). This has only been build-tested, feedback from architecture maintainers is welcome. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Wolfgang Denk <wd@denx.de>
2017-08-26powerpc: Rework interrupt_init_cpu()Tom Rini6-19/+6
The function interrupt_init_cpu() is given an int return type but does not return anything but 0. Rework this to be a void function. Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Mario Six <mario.six@gdsys.cc>
2017-08-16env: Rename some other getenv()-related functionsSimon Glass1-4/+4
We are now using an env_ prefix for environment functions. Rename these other functions as well, for consistency: getenv_vlan() getenv_bootm_size() getenv_bootm_low() getenv_bootm_mapsize() env_get_default() Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16env: Rename eth_getenv_enetaddr() to eth_env_get_enetaddr()Simon Glass1-1/+1
Rename this function for consistency with env_get(). Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16env: Rename getenv_hex(), getenv_yesno(), getenv_ulong()Simon Glass1-1/+1
We are now using an env_ prefix for environment functions. Rename these for consistency. Also add function comments in common.h. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16env: Rename getenv/_f() to env_get()Simon Glass4-8/+9
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>
2017-08-15env: Convert CONFIG_ENV_IS_IN... to a choiceSimon Glass4-12/+0
At present we support multiple environment drivers but there is not way to select between them at run time. Also settings related to the position and size of the environment area are global (i.e. apply to all locations). Until these limitations are removed we cannot really support more than one environment location. Adjust the location to be a choice so that only one can be selected. By default the environment is 'nowhere', meaning that the environment exists only in memory and cannot be saved. Also expand the help for the 'nowhere' option and move it to the top since it is the default. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Move all of the imply logic to default X if Y so it works again] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-11Convert CONFIG_CMD_REGINFO to KconfigChristophe Leroy2-0/+28
This patch converts CONFIG_CMD_REGINFO to Kconfig Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11Convert CONFIG_CMD_PCI to KconfigSimon Glass1-0/+6
This converts the following to Kconfig: CONFIG_CMD_PCI Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11Convert CONFIG_CMD_PCA953X to KconfigSimon Glass1-0/+1
This converts the following to Kconfig: CONFIG_CMD_PCA953X Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-07Move PHYLIB to KconfigAlexandru Gagniuc1-5/+0
Signed-off-by: Alexandru Gagniuc <alex.g@adaptrum.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-08-03PowerPC: mpc85xx: Update ft_verify_fdtTom Rini1-2/+9
With the changes to fdt_get_base_address() we need to modify the logic in ft_verify_fdt() for how we check the validity of the CCSR address. Tested-on: qemu-ppce500 -M mpc8544ds Fixes: 336a44877af8 ("fdt: Correct fdt_get_base_address()") Cc: York Sun <york.sun@nxp.com> Cc: Wolfgang Denk <wd@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-07-31configs: Migrate CMD_NAND*Tom Rini1-0/+23
Migrate all remaining instances of CMD_NAND, CMD_NAND_TRIMFFS CMD_NAND_LOCK_UNLOCK and CMD_NAND_TORTURE from the headers into the defconfig files. Tested-by: Adam Ford <aford173@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-27powerpc: spl: configure SYS_MALLOC_F_LEN independently for SPL and full U-BootAndy Yan2-10/+9
Some platforms have very limited SRAM to run SPL code, so there may not be the same amount space for a malloc pool before relocation in the SPL stage as the normal U-Boot stage. Make SPL and (the full) U-Boot stage use independent SYS_MALLOC_F_LEN, so the size of pre-relocation malloc pool can be configured memory space independently. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> [fixed up commit-message:] Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-07-25Convert CONFIG_ENV_IS_IN_FLASH to KconfigSimon Glass4-0/+12
This converts the following to Kconfig: CONFIG_ENV_IS_IN_FLASH Signed-off-by: Simon Glass <sjg@chromium.org>
2017-07-24configs: Migrate RBTREE, LZO, CMD_MTDPARTS, CMD_UBI and CMD_UBIFSTom Rini1-0/+5
The above CONFIG options are in Kconfig, and now have correct depends and inter-dependencies. Migrate these to configs/ from include/configs/. In the case of CMD_UBIFS also change it to be a default y if CMD_UBI. Signed-off-by: Tom Rini <trini@konsulko.com>