summaryrefslogtreecommitdiff
path: root/arch/powerpc
AgeCommit message (Collapse)Author
2018-09-27powerpc: dts: Enable device tree support for T2080QDSJagdish Gediya
Add device tree for T2080QDS board and enable CONFIG_OF_CONTROL so that device tree can be compiled. Update board README for device tree usage. Signed-off-by: Jagdish Gediya <jagdish.gediya@nxp.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <york.sun@nxp.com>
2018-09-27powerpc: dts: Add u-boot.dtsi to use binman for MPC85xx boardsJagdish Gediya
Signed-off-by: Jagdish Gediya <jagdish.gediya@nxp.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <york.sun@nxp.com>
2018-09-27powerpc: mpc85xx: Use binman to embed dtb inside U-BootJagdish Gediya
Below is the sequence to embed dtb inside U-Boot, 1. Remove bootpg and resetvec section if needed 2. Append dtb 3. Append bootpg and resetvec section back if removed in step 1 Above procedure is required only when CONFIG_MPC85xx and CONFIG_OF_SEPARATE are defined. Add new config CONFIG_MPC85XX_HAVE_RESET_VECTOR to indicate that image has resetvec section. Step 1 and step 3 described above are required only if this config is y. Signed-off-by: Jagdish Gediya <jagdish.gediya@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <york.sun@nxp.com>
2018-09-27powerpc: mpc85xx: Select BINMAN by defaultJagdish Gediya
Signed-off-by: Jagdish Gediya <jagdish.gediya@nxp.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <york.sun@nxp.com>
2018-09-27powerpc/dts: Makefile changes to clean and build dtsJagdish Gediya
Signed-off-by: Jagdish Gediya <jagdish.gediya@nxp.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <york.sun@nxp.com>
2018-09-27powerpc/dts: Define '_end' symbol in mpc85xx U-Boot lds filesJagdish Gediya
'board_fdt_blob_setup' function sets up fdt blob at '&_end' so define '_end' symbol in mpc85xx lds files. Signed-off-by: Jagdish Gediya <jagdish.gediya@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: York Sun <york.sun@nxp.com>
2018-09-18misc: Add MPC83xx serdes driverMario Six
Add a driver to configure the SerDes (Serializer/Deserializer) lanes on the MPC83xx architecture. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-09-18cpu: Add MPC83xx CPU driverMario Six
Add a CPU driver for the MPC83xx architecture. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-09-18timer: Add MPC83xx timer driverMario Six
Add a timer driver for the MPC83xx architecture. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-09-18clk: Add MPC83xx clock driverMario Six
Add a clock driver for the MPC83xx architecture. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-09-18mpc83xx: Add sysreset driverMario Six
Add a sysreset driver for the MPC83xx platform. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-09-18powerpc: Add read*_*/write*_* macrosMario Six
Define the read*_*/write*_* macros for the PowerPC platform to be able to use the macros in wait_bit.h. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-09-18ram: Add driver for MPC83xxMario Six
Add a RAM driver for the MPC83xx architecture. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-09-10arch: types.h: factor out fixed width typedefs to int-ll64.hMasahiro Yamada
All architectures have the same definition for s8/16/32/64 and u8/16/32/64. Factor out the duplicated code into <asm-generic/int-ll64.h>. BTW, Linux unified the kernel space definition into int-ll64.h a few years ago as you see in Linux commit 0c79a8e29b5f ("asm/types.h: Remove include/asm-generic/int-l64.h"). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-07-30Kconfig: Sort bool, default, select and imply optionsMichal Simek
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 Simek
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 Simek
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 Kiernan
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 Simek
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 Ueba
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 Rini
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 Schuchardt
%s/alingment/alignment/ Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-04-27Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTRTom Rini
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 Kiernan
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 Leroy
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 Leroy
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 Leroy
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 Leroy
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 Leroy
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 Leroy
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 Leroy
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 Leroy
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 Leroy
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 Leroy
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 Leroy
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 Leroy
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 Simek
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 Yamada
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 Brodkin
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 Qiang
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. Woods
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 Tynkkynen
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 Six
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 Mansour
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 Yamada
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 Tynkkynen
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 Tynkkynen
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 Sun
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 Burton
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 Rini
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>