summaryrefslogtreecommitdiffstats
path: root/arch/ppc
Commit message (Collapse)AuthorAgeFilesLines
* ppc: rename arch/ppc/ to arch/powerpc/Masahiro Yamada2020-05-04158-18854/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In old days, Linux supported PowerPC with two arch directories, arch/ppc/ and arch/ppc64/. Linux commit 564ee7a5668e ("[PATCH] powerpc: Move arch/ppc*/kernel/vecemu.c to arch/powerpc") started the migration to arch/powerpc/, and commit 917f0af9e5a9 ("powerpc: Remove arch/ppc and include/asm-ppc") finished it. This commit aligns the directory name with the current Linux. I did 'git mv arch/ppc/ arch/powerpc/', and fixed up some hard-coded arch/ppc paths. Barebox has stuck to arch/ppc/ for a long time. To keep the backward compatibility, I added the following to the top Makefile. # Support ARCH=ppc for backward compatibility ifeq ($(ARCH),ppc) SRCARCH := powerpc endif Both ARCH=ppc and ARCH=powerpc work in the same way. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc: add arch/ppc/KbuildMasahiro Yamada2020-05-042-10/+3
| | | | | | | | | | | | | | Add arch/ppc/Kbuild to clean up arch/ppc/Makefile. The variable, CPU is used only for determining if Kbuild should descend to cpu-85xx/. obj-$(CONFIG_ARCH_MPC85XX) += cpu-85xx/ is preferred. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc: remove unneeded -D CONFIG_PPCMasahiro Yamada2020-05-041-1/+1
| | | | | | | | | CONFIG_PPC is defined by arch/ppc/Kconfig. There is no need to define it explicitly. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* kbuild: prefix compiler flag variables with KBUILD_Masahiro Yamada2020-04-271-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | In old days, Linux also used to use well-known variables such CFLAGS, CPPFLAGS, etc. They were prefixed with KBUILD_ presumably for preventing users from overriding them accidentally. Rename as follows: CFLAGS -> KBUILD_CFLAGS AFLAGS -> KBUILD_AFLAGS CPPFLAGS -> KBUILD_CPPFLAGS LDFLAGS -> KBUILD_LDFLAGS HOSTCFLAGS -> KBUILD_HOSTCFLAGS HOSTCXXFLAGS -> KBUILD_HOSTCXXFLAGS HOSTLDFLAGS -> KBUILD_HOSTLDFLAGS HOST_LOADLIBES -> KBUILD_HOSTLDLIBS HOSTCFLAGS, HOSTCXXFLAGS, HOSTLDFLAGS, HOSTLDLIBS are re-used to allow users to pass-in additional flags to the host compiler. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc: Test for compiler optionsSascha Hauer2020-04-271-1/+4
| | | | | | | The -mno-spe and -mspe=no options are not available on all compilers. Call cc-option to set them only when they exist. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc,riscv: set something to KBUILD_DEFCONFIGMasahiro Yamada2020-04-151-0/+1
| | | | | | | | | | | | | | | | | 'make ARCH=riscv defconfig' ends up with endless recursion. Users may get upset with it. In Linux, every architecture does something for 'make defconfig'. Set something to KBUILD_DEFCONFIG to make it work for riscv and ppc. There is only one file in arch/riscv/configs/, so there is no choice but erizo_generic_defconfig for riscv. There are some choices for ppc, but I am not sure what is appropriate. I just picked something. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* lds: Add and use RO_DATA_SECTION macroSascha Hauer2019-10-142-15/+2
| | | | | | | | | We have many different pointer arrays which we put into linker sections and each time there's one added we have to adjust all linker scripts. This adds a common RO_DATA_SECTION define and uses it for all architectures. This makes it easier to add a new linker array. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* lds: Move start/end address variables into definesSascha Hauer2019-10-142-35/+4
| | | | | | | | | | | For the older section defines we specify the start and end addresses outside the macro which means we have to repeat them in each linker script. Make the start/end addresses part of the define to simplify things. While at it, add a BAREBOX_ prefix to the INITCALLS and EXITCALLS macros for consistency to the other defines. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Sam Ravnborg <sam@ravnborg.org>
* ppc: remove unused variables from linker scriptsSascha Hauer2019-10-142-4/+0
| | | | | | __initcall_entries and __exitcall_entries are unused. Remove them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Kconfig: retire empty <asm/barebox.h>Ahmad Fatoum2019-08-302-29/+0
| | | | | | | With the latest changes, this file is empty on all archs. Drop it. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* owc: remove references to GE.Barbier, Renaud2019-05-085-16/+19
| | | | | | | | As per contactual requirement, remove references to GE in the code. Signed-off-by: Renaud Barbier <renaud.barbier@abaco.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* owc: directories and files renamingBarbier, Renaud2019-05-0814-1/+1
| | | | | | | | | As the company changed name to Abaco Systems Inc, we have a contractual requirement to remove GE references. Start by renaming files and directories using a neutral name. Signed-off-by: Renaud Barbier <renaud.barbier@abaco.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: surround Kconfig file paths with double quotesMasahiro Yamada2019-03-211-2/+2
| | | | | | | | | Based on Linux commit 8636a1f9677db4f883f29a072f401303acfc2edd This will be needed when you sync Kconfig with Linux 5.0 or later. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ddr_spd: Update from U-BootSascha Hauer2019-03-043-10/+10
| | | | | | | | | | | This updates the ddr_spd.h header file from U-Boot-2019.01 with some small changes: - typedefs are removed - "_s" suffix from struct types removed - remove unnecessary "extern" from function declarations Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* PPC: delete unused asm/mc146818rtc.hAlexander Shiyan2019-01-211-27/+0
| | | | | | | This removes the stale asm/mc146818rtc.h include as there is no user of it. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* PPC: delete unused asm/e300.hAlexander Shiyan2019-01-211-130/+0
| | | | | | | This removes the stale asm/e300.h include as there is no user of it. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* move umode_t typedef from asm/types.h to linux/types.hAntony Pavlov2019-01-181-2/+0
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* kconfig: include common Kconfig files from top-level KconfigAntony Pavlov2018-12-031-7/+0
| | | | | | | | | | | | | Based on this linux kernel commit: > commit 1572497cb0e6d2016078bc9d5a95786bb878389f > Author: Christoph Hellwig <hch@lst.de> > Date: Tue Jul 31 13:39:30 2018 +0200 > > kconfig: include common Kconfig files from top-level Kconfig Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc: bootm: Drop usage of data->oftreeSascha Hauer2018-06-151-18/+17
| | | | | | | The ppc bootm code uses data->oftree to store its private data pointers. Drop this and use a local variable instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc: bootm: remove unnecessary parameterSascha Hauer2018-06-151-4/+3
| | | | | | | bootm_relocate_fdt takes the os address as parameter, but this can be extracted from struct image_data, so drop the parameter. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc: bootm: rename variablesSascha Hauer2018-06-151-12/+14
| | | | | | | | In bootm_relocate_fdt 'addr' is used for two different purposes, once for the os address and once for the new fdt. Make the code more readable by using two variables describing their meaning, 'os' and 'newfdt'. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ratp: implement generic command supportAleksander Morgado2018-03-012-0/+8
| | | | | | | | | | | | | | | | | | | The RATP implementation now allows executing generic commands with a binary interface: binary requests are received and binary responses are returned. Each command can define its own RATP request contents (e.g. to specify command-specific options) as well as its own RATP response contents (if any data is to be returned). Each command is associated with a pair of numeric unique request and response IDs, and for easy reference these IDs are maintained in the common ratp_bb header. Modules may override generic implemented commands or include their own new ones (as long as the numeric IDs introduced are unique). Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* asm-generic: partially sync io.h with linux kernelOleksij Rempel2017-09-081-0/+2
| | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Revert "globalvar: make globalvar functions more consistent"Sascha Hauer2017-06-131-2/+2
| | | | This reverts commit 1b4a05c9263ae26083526acfabdea1ef96531a1d.
* PPC: request a consistent memory layoutJuergen Borleis2017-05-112-1/+18
| | | | | | | | | | | | | Using the memory test command will crash barebox, because it tests the area where the stack is located for the PPC architecture. On PPC the stack is below the barebox binary. Below the stack the malloc area is located. Until this change some routines used the macros from 'memory_layout.h', some other calculated their values by their own - which resulted into an unrequested and unprotected stack area. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* globalvar: make globalvar functions more consistentSascha Hauer2017-04-111-2/+2
| | | | | | | | | Similar to the device parameter functions also make the globalvar functions more consistent. This also adds support for readonly globalvars and changes several existing globalvars which should really be readonly to readonly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arch: refresh defconfigsSascha Hauer2016-10-125-161/+108
| | | | | | | | | | | | | | | | | | | | | | The defconfig files are long untouched and a make xy_defconfig; make savedefconfig usually generates quite a different looking file. Refresh them to make it easier to generate patches against the configs using make xy_defconfig; make menuconfig; make savedefconfig This has been done with the following script. for a in arch/*; do arch=$(basename $a) for c in $a/configs/*; do config=$(basename $c) export ARCH=$arch make $config && make savedefconfig && mv defconfig $c done done Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/defenv'Sascha Hauer2016-10-1021-5/+21
|\
| * defaultenv: add defaultenv-1 in boards via defaultenv_append_directory()Sascha Hauer2016-10-1021-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently it's hardcoded for each board which defaultenv version is used. This is unfortunate since some people like the other defaultenv version better and may want to select it. This patch removes the board specific environment path CONFIG_DEFAULT_ENVIRONMENT_PATH and instead adds it via: if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) defaultenv_append_directory(defaultenv_<board>); This way we can make sure that the defaultenv-1 board specific bits are only compiled in when defaultenv-1 is actually in use. The next step is to make the defaultenv version selection a user visible choice. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | defaultenv-2: remove unused *-menu-add-entry callsSascha Hauer2016-08-261-5/+0
|/ | | | | | | The *-menu-add-entry functions no longer exist in defaultenv-2, so remove the calls to these functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* include: Move bulk of boot.h to bootm.hSascha Hauer2016-07-261-0/+1
| | | | | | | | The majority of the stuff currently in include/boot.h is about bootm code implemented common/bootm.c. To be more consistent move it to a new file include/bootm.h. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc: fix USPRG0 defineJ. Tang2016-06-231-1/+1
| | | | | | | | The #define USPRG0 aliases SPRN_USPRG, but it should refer to SPRN_USPRG0. There is no register SPRN_USPRG on PowerPC. Signed-off-by: Jason Tang <tang@jtang.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/bootm'Sascha Hauer2016-06-143-3/+3
|\
| * bootm: Move bootm options to common/KconfigSascha Hauer2016-05-103-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | bootm has a C API, so the bootm options have to depend on the option providing the bootm code (CONFIG_BOOTM), not on the option providing the command (CONFIG_CMD_BOOTM). Fixing the dependencies makes it possible to fully use bootm from C without enabling the bootm command support. This also removes the CMD_ prefix from the options which means we have to update the defconfigs aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | PPC/MPC5200: enable a useful command by defaultJuergen Borleis2016-05-301-0/+1
| | | | | | | | | | Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | PPC/MPC5XXX/reginfo: fix a bunch of compiler warningsJuergen Borleis2016-05-301-38/+39
| | | | | | | | | | | | | | | | | | | | | | | | This change fixes a bunch of compiler warnings of this type: arch/ppc/mach-mpc5xxx/reginfo.c: In function 'reginfo': arch/ppc/mach-mpc5xxx/reginfo.c:14:3: warning: format '%X' expects argument of type 'unsigned int', but argument 2 has type 'ulong' [-Wformat=] (*(volatile ulong*)MPC5XXX_ADDECR & 0x00010000) ? 1 : 0); ^ Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | PPC: clean compiler warningJuergen Borleis2016-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This change fixes the following compiler warning: arch/ppc/mach-mpc5xxx/cpu.c: In function 'restart_register_feature': arch/ppc/mach-mpc5xxx/cpu.c:81:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | PPC: fix size optimisationJuergen Borleis2016-05-302-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since patch e92abad36307d the linker discards sections which seems not used to make the image smaller. But this change will discard the whole init and exception code from start.S which renders the final image useless. From 'barebox.map' without this patch: Discarded input sections .text 0x0000000000000000 0x358c arch/ppc/mach-mpc5xxx/start.o .data 0x0000000000000000 0x0 arch/ppc/mach-mpc5xxx/start.o .bss 0x0000000000000000 0x0 arch/ppc/mach-mpc5xxx/start.o .got2 0x0000000000000000 0x24 arch/ppc/mach-mpc5xxx/start.o [...] So, define the entry point to mark the init and exception used. From 'barebox.map' with this patch applied: Discarded input sections .data 0x0000000000000000 0x0 arch/ppc/mach-mpc5xxx/start.o .bss 0x0000000000000000 0x0 arch/ppc/mach-mpc5xxx/start.o [...] Note: tested on MPC5200 at run time, for MPC85XX compile time only Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2016-05-091-10/+10
|\
| * whole tree: remove trailing whitespacesDu Huanpeng2016-04-211-10/+10
| | | | | | | | | | Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/include-pdata'Sascha Hauer2016-05-095-5/+5
|\ \
| * | include: Move ns16550 serial platform_data to include/platform_dataSascha Hauer2016-04-154-4/+4
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | include: Move fec eth platform_data to include/platform_dataSascha Hauer2016-04-151-1/+1
| |/ | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / include: move crc specific stuff to crc.hSascha Hauer2016-04-151-0/+1
|/ | | | | | | We have a crc.h, so move our crc function prototypes there to further cleanup common.h. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* PPC: atomic: remove non existing header includeSascha Hauer2016-04-081-2/+0
| | | | | | linux/config.h does not exist. Remove its inclusion. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* PPC: discard unused functionsSascha Hauer2016-04-081-0/+1
| | | | | | | Use --gc-sections to discard unused functions. This makes the image smaller. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: Push dryrun to handlersSascha Hauer2016-01-261-0/+3
| | | | | | | We can make the dryrun option more useful by calling into the handlers. With this we can detect more cases that can go wrong during boot. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rework remap_rangeSascha Hauer2015-11-032-29/+21
| | | | | | | | | | | | | | | | | | remap_range is for remapping regions with different cache attributes. It is implemented for ARM and PowerPC only, the other architectures only provide stubs. Currently the new cache attributes are passed in an architecture specific way and the attributes have to be retrieved by calls to mmu_get_pte_cached_flags() and mmu_get_pte_uncached_flags(). Make this simpler by providing architecture independent flags which can be directly passed to remap_range() Also provide a MAP_ARCH_DEFAULT flag and a arch_can_remap() function. The MAP_ARCH_DEFAULT defaults to whatever caching type the architecture has as default. the arch_can_remap() function returns true if the architecture can change the cache attributes, false otherwise. This allows the memtest code to better find out what it has to do. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/restart'Sascha Hauer2015-09-013-6/+22
|\
| * restart: replace reset_cpu with registered restart handlersSascha Hauer2015-08-273-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces the reset_cpu() function which every SoC or board must provide with registered handlers. This makes it possible to have multiple reset functions for boards which have multiple ways to reset the machine. Also boards which have no way at all to reset the machine no longer have to provide a dummy reset_cpu() function. The problem this solves is that some machines have external PMICs or similar to reset the system which have to be preferred over the internal SoC reset, because the PMIC can reset not only the SoC but also the external devices. To pick the right way to reset a machine each handler has a priority. The default priority is 100 and all currently existing restart handlers are registered with this priority. of_get_restart_priority() allows to retrieve the priority from the device tree which makes it possible for boards to give certain restart handlers a higher priority in order to use this one instead of the default one. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>