summaryrefslogtreecommitdiff
path: root/arch/powerpc
AgeCommit message (Collapse)AuthorFilesLines
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-24powerpc: 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-03powerpc: 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-16env: 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-26Convert 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-25configs: 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>
2017-07-23powerpc: Remove 8260 remaindersChristophe Leroy1-14/+0
commit 2eb48ff7a210d ("powerpc, 8260: remove support for mpc8260") removed support for 8260 CPU. This patch remove some remainders. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-23powerpc, 8xx: fix missing function declarations.Christophe Leroy7-13/+17
Add missing .h and add missing declarations in .h Declare local functions as static. Make interrupt_init_cpu function signatures consistent with how decrementer_count is declared. Based on warnings reported by 'make C=2' Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> [trini: drop cpu_init_f as 8xx/83xx are different from the rest, rework interrupt_init_cpu/decrementer_count] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-07-23powerpc: move get_pvr() and get_svr() into CChristophe Leroy5-37/+9
Avoid unnecessary assembly functions when they can easily be written in C. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-23powerpc, 8xx: move cache helper into CChristophe Leroy3-38/+32
Avoid unnecessary assembly functions when they can easily be written in C. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-23powerpc, 8xx: move get_immr() into CChristophe Leroy2-16/+8
Avoid unnecessary assembly functions when they can easily be written in C. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-23powerpc, 8xx: Move cache function into C filesChristophe Leroy3-56/+50
Avoid unnecessary assembly functions when they can easily be written in C. Also remove dc_read() as it is nowhere referenced Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-23powerpc, 8xx: Simplifying check_CPU()Christophe Leroy1-32/+7
All complex case have been removed and we now only support MPC866 and MPC885 families. So check_CPU() can be made a lot simpler. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-23powerpc: Remove unneccessary #ifdefs in reginfoChristophe Leroy4-3/+10
reginfo command is calling mpc8xx_reginfo(), mpc85xx_reginfo() or mpc86xx_reginfo() based on CONFIG_ symbol. As those 3 functions can't me defined at the same time, let's rename them print_reginfo() to avoid the #ifdefs The name is kept generic as it is not at all dependent on powerpc arch and any other arch could want to also print such information. In addition, as the Makefile compiles cmd/reginfo.c only when CONFIG_CMD_REGINFO is set, there is no need to enclose the U_BOOT_CMD definition inside a #ifdef CONFIG_CMD_REGINFO Lets all remove the #ifdefs around the U_BOOT_CMD as this file is only compiled when CONFIG_CMD_REGINFO is defined Finally, this is a PowerPC-only command, disable it on a number of non-PowerPC platforms. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-07-23powerpc: move set_msr() and get_msr() into .hChristophe Leroy3-28/+14
set_msr() and get_msr() are defined and used twice. This patch moves them into ppc.h Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-23power, timer: reset TBL before TBUChristophe Leroy1-1/+1
In order to avoid TBU increment due to TBL reaching its max and wrapping, reset TBL before resetting TBU Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-23powerpc, timer: Does 8xx specific actions in 8xx cpu_initChristophe Leroy2-12/+4
The actions inside #ifdef CONFIG_8xx in arch/powerpc/lib/time.c can be performed before, in a 8xx dedicated function. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-23powerpc: get rid of addr_probe()Christophe Leroy4-53/+0
This function has never been used, at least since the beginning of the git repository Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-23powerpc, 8xx: Simplify brgclk calculation and remove get_brgclk()Christophe Leroy1-22/+3
divider is calculated based on SCCR_DFBRG, with: SCCR_DFBRG 00 => divider 1 = 1 << 0 SCCR_DFBRG 01 => divider 4 = 1 << 2 SCCR_DFBRG 10 => divider 16 = 1 << 4 SCCR_DFBRG 11 => divider 64 = 1 << 6 This can be easily converted to a single shift operation: divider = 1 << (SCCR_DFBRG * 2) Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-11sata: Move drivers into new drivers/ata directorySimon Glass1-1/+1
At present we have the SATA and PATA drivers mixed up in the drivers/block directory. It is better to split them out into their own place. Use drivers/ata which is what Linux does. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11Kconfig: Add CONFIG_SATA to enable SATASimon Glass1-1/+1
At present CONFIG_CMD_SATA enables the 'sata' command which also brings in SATA support. Some boards may wish to enable SATA without the command. Add a separate CONFIG to permit this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11Convert CONFIG_CMD_SATA to KconfigSimon Glass2-0/+46
This converts the following to Kconfig: CONFIG_CMD_SATA Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11Convert CONFIG_SCSI to KconfigSimon Glass2-0/+2
This converts the following to Kconfig: CONFIG_SCSI Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-08powerpc, 8xx: Add support for MCR3000 board from CSSIChristophe Leroy1-0/+5
CS Systemes d'Information (CSSI) manufactures two boards, named MCR3000 and CMPC885 which are respectively based on MPC866 and MPC885 processors. This patch adds support for the first board. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-08powerpc, 8xx: move Serial driver to drivers/serial/Christophe Leroy2-280/+0
At the same time, move to Kconfig Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-08powerpc, 8xx: move SPI driver to drivers/spi/Christophe Leroy2-340/+0
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-08powerpc, 8xx: move FEC Ethernet driver in drivers/netChristophe Leroy3-852/+1
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-08powerpc, 8xx: Migrate to KconfigChristophe Leroy4-10/+153
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Reviewed-by: Heiko Schocher <hs@denx.de>
2017-07-08powerpc, 8xx: Properly set CPM frequency in the device treeChristophe Leroy1-0/+2
For processors whose core runs at twice the bus frequency, the fallback frequency calculation in Linux provides a wrong result. Therefore, U-boot needs to pass the correct value. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Reviewed-by: Heiko Schocher <hs@denx.de>
2017-07-08powerpc, 8xx: Handle checkpatch errors and some of the warnings/checksChristophe Leroy12-335/+277
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Reviewed-by: Heiko Schocher <hs@denx.de>
2017-07-08powerpc, 8xx: Implement GLL2 ERRATAChristophe Leroy1-0/+20
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Acked-by: Wolfgang Denk <wd@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de>
2017-07-08powerpc, 8xx: Use IO accessors to access IO memoryChristophe Leroy11-664/+738
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Reviewed-by: Heiko Schocher <hs@denx.de>