summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
Commit message (Collapse)AuthorAgeFilesLines
* drivers/misc: Share qbman init between archsAhmed Mansour2018-01-106-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>
* Move CONFIG_PANIC_HANG to KconfigMasahiro Yamada2017-12-261-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>
* ata: Migrate CONFIG_FSL_SATA to KconfigTuomas Tynkkynen2017-12-122-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>
* ata: Migrate CONFIG_SATA_SIL to KconfigTuomas Tynkkynen2017-12-121-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>
* powerpc: mpc85xx: Implement CPU erratum A-007907 for secondary coresYork Sun2017-10-231-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>
* powerpc: Use asm-generic/io.hPaul Burton2017-10-021-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>
* powerpc: Rework interrupt_init_cpu()Tom Rini2017-08-266-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>
* env: Rename some other getenv()-related functionsSimon Glass2017-08-161-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>
* env: Rename eth_getenv_enetaddr() to eth_env_get_enetaddr()Simon Glass2017-08-161-1/+1
| | | | | | Rename this function for consistency with env_get(). Signed-off-by: Simon Glass <sjg@chromium.org>
* env: Rename getenv_hex(), getenv_yesno(), getenv_ulong()Simon Glass2017-08-161-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>
* env: Rename getenv/_f() to env_get()Simon Glass2017-08-164-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>
* env: Convert CONFIG_ENV_IS_IN... to a choiceSimon Glass2017-08-154-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>
* Convert CONFIG_CMD_REGINFO to KconfigChristophe Leroy2017-08-112-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>
* Convert CONFIG_CMD_PCI to KconfigSimon Glass2017-08-111-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>
* Convert CONFIG_CMD_PCA953X to KconfigSimon Glass2017-08-111-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>
* Move PHYLIB to KconfigAlexandru Gagniuc2017-08-071-5/+0
| | | | | Signed-off-by: Alexandru Gagniuc <alex.g@adaptrum.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* PowerPC: mpc85xx: Update ft_verify_fdtTom Rini2017-08-031-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>
* configs: Migrate CMD_NAND*Tom Rini2017-07-311-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>
* powerpc: spl: configure SYS_MALLOC_F_LEN independently for SPL and full U-BootAndy Yan2017-07-272-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>
* Convert CONFIG_ENV_IS_IN_FLASH to KconfigSimon Glass2017-07-254-0/+12
| | | | | | | This converts the following to Kconfig: CONFIG_ENV_IS_IN_FLASH Signed-off-by: Simon Glass <sjg@chromium.org>
* configs: Migrate RBTREE, LZO, CMD_MTDPARTS, CMD_UBI and CMD_UBIFSTom Rini2017-07-241-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>
* powerpc: Remove 8260 remaindersChristophe Leroy2017-07-231-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>
* powerpc, 8xx: fix missing function declarations.Christophe Leroy2017-07-237-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>
* powerpc: move get_pvr() and get_svr() into CChristophe Leroy2017-07-225-37/+9
| | | | | | | Avoid unnecessary assembly functions when they can easily be written in C. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
* powerpc, 8xx: move cache helper into CChristophe Leroy2017-07-223-38/+32
| | | | | | | Avoid unnecessary assembly functions when they can easily be written in C. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
* powerpc, 8xx: move get_immr() into CChristophe Leroy2017-07-222-16/+8
| | | | | | | Avoid unnecessary assembly functions when they can easily be written in C. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
* powerpc, 8xx: Move cache function into C filesChristophe Leroy2017-07-223-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>
* powerpc, 8xx: Simplifying check_CPU()Christophe Leroy2017-07-221-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>
* powerpc: Remove unneccessary #ifdefs in reginfoChristophe Leroy2017-07-224-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>
* powerpc: move set_msr() and get_msr() into .hChristophe Leroy2017-07-223-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>
* power, timer: reset TBL before TBUChristophe Leroy2017-07-221-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>
* powerpc, timer: Does 8xx specific actions in 8xx cpu_initChristophe Leroy2017-07-222-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>
* powerpc: get rid of addr_probe()Christophe Leroy2017-07-224-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>
* powerpc, 8xx: Simplify brgclk calculation and remove get_brgclk()Christophe Leroy2017-07-221-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>
* sata: Move drivers into new drivers/ata directorySimon Glass2017-07-111-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>
* Kconfig: Add CONFIG_SATA to enable SATASimon Glass2017-07-111-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>
* Convert CONFIG_CMD_SATA to KconfigSimon Glass2017-07-112-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>
* Convert CONFIG_SCSI to KconfigSimon Glass2017-07-112-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>
* powerpc, 8xx: Add support for MCR3000 board from CSSIChristophe Leroy2017-07-081-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>
* powerpc, 8xx: move Serial driver to drivers/serial/Christophe Leroy2017-07-082-280/+0
| | | | | | At the same time, move to Kconfig Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
* powerpc, 8xx: move SPI driver to drivers/spi/Christophe Leroy2017-07-082-340/+0
| | | | Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
* powerpc, 8xx: move FEC Ethernet driver in drivers/netChristophe Leroy2017-07-083-852/+1
| | | | Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
* powerpc, 8xx: Migrate to KconfigChristophe Leroy2017-07-084-10/+153
| | | | | Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Reviewed-by: Heiko Schocher <hs@denx.de>
* powerpc, 8xx: Properly set CPM frequency in the device treeChristophe Leroy2017-07-081-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>
* powerpc, 8xx: Handle checkpatch errors and some of the warnings/checksChristophe Leroy2017-07-0812-335/+277
| | | | | Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Reviewed-by: Heiko Schocher <hs@denx.de>
* powerpc, 8xx: Implement GLL2 ERRATAChristophe Leroy2017-07-081-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>
* powerpc, 8xx: Use IO accessors to access IO memoryChristophe Leroy2017-07-0811-664/+738
| | | | | Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Reviewed-by: Heiko Schocher <hs@denx.de>
* powerpc, 8xx: move specific reginfoChristophe Leroy2017-07-082-0/+65
| | | | | Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Reviewed-by: Heiko Schocher <hs@denx.de>
* powerpc, 8xx: move immap.c in arch/powerpc/cpu/mpc8xx/Christophe Leroy2017-07-086-13/+10
| | | | | | | | | immap.c used to be common to several CPUs. It is now only linked to the 8xx, so this patch moves it into arch/powerpc/cpu/mpc8xx/ Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Reviewed-by: Heiko Schocher <hs@denx.de>
* powerpc: Partialy restore core of mpc8xxChristophe Leroy2017-07-0823-1/+4540
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CS Systemes d'Information (CSSI) manufactures 8xx boards for critical communication systems. Those boards have been running U-Boot since 2010 and will have to be maintained until at least 2027. commit 5b8e76c35ec312a3f73126bd1a2d2c0965b98a9f ("powerpc, 8xx: remove support for 8xx") orphaned those boards by removing support for the mpc8xx CPU. This commit partially restores support for the 8xx, with the following limitations: - Restores support for MPC866 and MPC885 only - Does not restore IDE, PCMCIA, I2C, USB - Does not restore examples - Does not restore POST - Does not restore Ethernet on SCC - Does not restore console on SCC - Does not restore bedbug and kgdb support As the 866 and 885 do not support the following features, they are not restored either: - VIDEO / LCD - RTC clock The CPM uCODE patch is not restored either, because: - 866 and 885 already have support for I2C and SPI relocation without a uCODE patch - relocation of SMC, I2C or SPI is only needed for using SCCs for Ethernet or QMC The dynamic setup/calculation of clocks is removed, we expect the target being use with the clock and PLPRCR register defined in the configuration. All the clock settings for 8xx prior to 866 is removed as well as we now only support 866 and 885. This code is mature and addresses mature boards. Therefore all code enclosed in '#if 0/#endif' and '#if XX_DEBUG/#endif' is unneeded. The following files are not restored by this patch: - arch/powerpc/cpu/mpc8xx/bedbug_860.c - arch/powerpc/cpu/mpc8xx/fec.h - arch/powerpc/cpu/mpc8xx/kgdb.S - arch/powerpc/cpu/mpc8xx/plprcr_write.S - arch/powerpc/cpu/mpc8xx/scc.c - arch/powerpc/cpu/mpc8xx/upatch.c - arch/powerpc/cpu/mpc8xx/video.c - arch/powerpc/include/asm/status_led.h - arch/powerpc/lib/ide.c - arch/powerpc/lib/ide.h - doc/README.MPC866 - drivers/pcmcia/mpc8xx_pcmcia.c - drivers/rtc/mpc8xx.c - drivers/usb/gadget/mpc8xx_udc.c - drivers/video/mpc8xx_lcd.c - examples/standalone/test_burst.c - examples/standalone/test_burst.h - examples/standalone/test_burst_lib.S - examples/standalone/timer.c - include/mpc823_lcd.h - include/usb/mpc8xx_udc.h - post/cpu/mpc8xx/Makefile - post/cpu/mpc8xx/cache.c - post/cpu/mpc8xx/cache_8xx.S - post/cpu/mpc8xx/ether.c - post/cpu/mpc8xx/spr.c - post/cpu/mpc8xx/uart.c - post/cpu/mpc8xx/usb.c - post/cpu/mpc8xx/watchdog.c Some of the restored files are not located in a proper location. In order to keep traceability of the changes, they will be moved to their correct location and moved to Kconfig in a followup patch. This patch also declares CSSI as point of contact for the update of the 8xx platform, as those boards are the only ones still being maintained on the 8xx area. A later patch will add those boards to the tree. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>