summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* powerpc: remove 4xx supportHeiko Schocher2017-07-0386-28455/+6
| | | | | | | | | There was for long time no activity in the 4xx area. We need to go further and convert to Kconfig, but it turned out, nobody is interested anymore in 4xx, so remove it. Signed-off-by: Heiko Schocher <hs@denx.de>
* powerpc, 5xxx, 512x: remove support for mpc5xxx and mpc512xHeiko Schocher2017-06-1649-9301/+0
| | | | | | | | | There was for long time no activity in the mpx5xxx area. We need to go further and convert to Kconfig, but it turned out, nobody is interested anymore in mpc5xxx, so remove it. Signed-off-by: Heiko Schocher <hs@denx.de>
* treewide: remove unneeded semicolonsMasahiro Yamada2017-06-161-1/+1
| | | | Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* Merge git://git.denx.de/u-boot-mpc85xxTom Rini2017-06-141-10/+0
|\
| * powerpc: mpc8540ads: mpc8560ads: Drop support for MPC8540/60ADSYork Sun2017-06-121-10/+0
| | | | | | | | | | | | Drop support for these two legacy boards. Signed-off-by: York Sun <york.sun@nxp.com>
* | powerpc, 5xx: remove support for 5xxHeiko Schocher2017-06-1217-2474/+1
| | | | | | | | | | | | | | | | | | There was for long time no activity in the 5xx area. We need to go further and convert to Kconfig, but it turned out, nobody is interested anymore in 5xx, so remove it. Signed-off-by: Heiko Schocher <hs@denx.de>
* | powerpc, 8260: remove support for mpc8260Heiko Schocher2017-06-1232-8510/+2
| | | | | | | | | | | | | | | | | | There was for long time no activity in the 8260 area. We need to go further and convert to Kconfig, but it turned out, nobody is interested anymore in 8260, so remove it. Signed-off-by: Heiko Schocher <hs@denx.de>
* | powerpc, 8xx: remove support for 8xxHeiko Schocher2017-06-1238-8167/+23
|/ | | | | | | | | | There was for long time no activity in the 8xx area. We need to go further and convert to Kconfig, but it turned out, nobody is interested anymore in 8xx, so remove it (with a heavy heart, knowing that I remove here the root of U-Boot). Signed-off-by: Heiko Schocher <hs@denx.de>
* common: freescale: Move arch-specific declarationsSimon Glass2017-06-051-0/+97
| | | | | | | | | The declarations should not be in common.h. Move them to the arch-specific headers. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Fixup thinko defined(FSL_LSCH3) -> defined(CONFIG_FSL_LSCH3)] Signed-off-by: Tom Rini <trini@konsulko.com>
* common: powerpc: Move arch-specific headersSimon Glass2017-06-055-0/+71
| | | | | | | | Set up a new asm/ppc.h header file to hold this arch-specific stuff. It should not be in common.h. It probably should be refactored to use asm/arch instead, but that is a job for the maintainer. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move PPC4xx_SYS_INFO() et al to arch-specific headerSimon Glass2017-06-051-0/+4
| | | | | | | These definitions should not be in common.h. Move them to an arch-specific header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move get_OPB_freq() and get_PCI_freq() to PPC headerSimon Glass2017-06-051-0/+3
| | | | | | These should not be in common.h. Move the to an arch-specific header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move pcie_setup_hoses() to PPC headerSimon Glass2017-06-051-0/+1
| | | | | | Only one board needs this definition. Move it to an arch-specific header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Move pci_target_init() to PPC headerSimon Glass2017-06-051-0/+1
| | | | | | Only one boards needs this definition. Move it to an arch-specific header. Signed-off-by: Simon Glass <sjg@chromium.org>
* Convert CONFIG_CMD_IRQ to KconfigSimon Glass2017-05-223-0/+4
| | | | | | | | This converts the following to Kconfig: CONFIG_CMD_IRQ Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* Convert CONFIG_CMD_IMMAP to KconfigSimon Glass2017-05-224-0/+714
| | | | | | | | | | This converts the following to Kconfig: CONFIG_CMD_IMMAP Also move this command out of the cmd/ directory since it is PowerPC-specific. Signed-off-by: Simon Glass <sjg@chromium.org>
* Kconfig: Add a CONFIG_IDE optionSimon Glass2017-05-222-2/+2
| | | | | | | | | | | At present IDE support is controlled by CONFIG_CMD_IDE. Add a separate CONFIG_IDE option so that IDE support can be enabled without requiring the 'ide' command. Update existing users and move the ide driver into drivers/block since it should not be in common/. Signed-off-by: Simon Glass <sjg@chromium.org>
* Convert CONFIG_CMD_HASH to KconfigSimon Glass2017-05-221-0/+1
| | | | | | | | | | This converts the following to Kconfig: CONFIG_CMD_HASH Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> [trini: Rework slightly, enable on some boards again] Signed-off-by: Tom Rini <trini@konsulko.com>
* Convert CONFIG_CMD_ESBC_VALIDATE to KconfigSimon Glass2017-05-221-1/+0
| | | | | | | | This converts the following to Kconfig: CONFIG_CMD_ESBC_VALIDATE Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* Convert CONFIG_CMD_ERRATA to KconfigSimon Glass2017-05-221-0/+8
| | | | | | | | This converts the following to Kconfig: CONFIG_CMD_ERRATA Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* Convert CONFIG_CMD_EEPROM et al to KconfigSimon Glass2017-05-221-0/+24
| | | | | | | | | | | | | This converts the following to Kconfig: CONFIG_CMD_EEPROM CONFIG_CMD_EEPROM_LAYOUT CONFIG_EEPROM_LAYOUT_HELP_STRING Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> [trini: Rework Kconfig logic slightly, define EEPROM location on TI eval platforms] Signed-off-by: Tom Rini <trini@konsulko.com>
* Convert CONFIG_CMD_ECCTEST to KconfigSimon Glass2017-05-221-0/+6
| | | | | | | This converts the following to Kconfig: CONFIG_CMD_ECCTEST Signed-off-by: Simon Glass <sjg@chromium.org>
* lib: move hash CONFIG options to KconfigTom Rini2017-05-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 94e3c8c4fd7b ("crypto/fsl - Add progressive hashing support using hardware acceleration.") created entries for CONFIG_SHA1, CONFIG_SHA256, CONFIG_SHA_HW_ACCEL, and CONFIG_SHA_PROG_HW_ACCEL. However, no defconfig has migrated to it. Complete the move by first adding additional logic to various Kconfig files to select this when required and then use the moveconfig tool. In many cases we can select these because they are required to implement other drivers. We also correct how we include the various hashing algorithms in SPL. This commit was generated as follows (after Kconfig additions): [1] tools/moveconfig.py -y SHA1 SHA256 SHA_HW_ACCEL [2] tools/moveconfig.py -y SHA_PROG_HW_ACCEL Note: We cannot move SHA_HW_ACCEL and SHA_PROG_HW_ACCEL simultaneously because there is dependency between them. Cc: Poonam Aggrwal <poonam.aggrwal@freescale.com> Cc: Naveen Burmi <NaveenBurmi@freescale.com> Cc: Po Liu <po.liu@freescale.com> Cc: Shengzhou Liu <Shengzhou.Liu@freescale.com> Cc: Priyanka Jain <Priyanka.Jain@freescale.com> Cc: Shaohui Xie <Shaohui.Xie@freescale.com> Cc: Chunhe Lan <Chunhe.Lan@freescale.com> Cc: Chander Kashyap <k.chander@samsung.com> Cc: Steve Rae <steve.rae@raedomain.com> Cc: Dirk Eibach <eibach@gdsys.de> Cc: Feng Li <feng.li_2@nxp.com> Cc: Alison Wang <alison.wang@freescale.com> Cc: Sumit Garg <sumit.garg@nxp.com> Cc: Mingkai Hu <Mingkai.Hu@freescale.com> Cc: York Sun <york.sun@nxp.com> Cc: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Akshay Saraswat <akshay.s@samsung.com> Cc: Heiko Schocher <hs@denx.de> Cc: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge git://git.denx.de/u-boot-mpc85xxTom Rini2017-05-162-2/+6
|\
| * powerpc: t1024: Fix SRDS_MAX_LANES valuePaulo Zaneti2017-05-152-2/+6
| | | | | | | | | | | | | | | | T1023 and T1024 have 4 SerDes lanes. Fix macro SRDS_MAX_LANES and use this macro instead of hard-coded value in t1024_serdes.c. Signed-off-by: Paulo Zaneti <paulo.zaneti@datacom.ind.br> Signed-off-by: York Sun <york.sun@nxp.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-i2cTom Rini2017-05-159-2263/+1
|\ \