summaryrefslogtreecommitdiffstats
path: root/arch/ppc
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | gpio: Drop asm-generic/gpio.hSascha Hauer2015-08-203-3/+2
|/ | | | | | | | | | Since we no longer have custom gpio function prototypes we can drop the prototypes from asm-generic/gpio.h can add them to include/gpio.h instead. While at it add static inline dummy wrappers for !CONFIG_GENERIC_GPIO so that code using gpios can compile without gpio support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/spd'Sascha Hauer2015-08-062-5/+2
|\
| * common: move DDR_SPD to common/KconfigAlexander Smirnov2015-07-062-5/+2
| | | | | | | | | | | | | | | | This patch makes it possible to use ddr_spd-related routines in any arch not only in ppc. Signed-off-by: Alexander Smirnov <alllecs@yandex.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/ppc'Sascha Hauer2015-08-068-14/+150
|\ \
| * | PPC/PCM030: provide EEPROM support to read factory settingsJuergen Borleis2015-08-034-1/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | Above the 0x800 offset the manufacturer provides the board type, a serial number and the MAC as three simple strings. Extract these strings, provide their value as global variables and set the MAC into the ethernet unit. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PPC/MPC5200: re-use the IMX I2C master driver for MPC5200Juergen Borleis2015-08-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | This IP core is shared between many FSL SoCs. The MPC5200 provides this core as well. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PPC/MPC52xx: unify header file name for clock APIJuergen Borleis2015-08-033-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | In preparation to re-use the i.MX I2C driver for the MPC5200 SoC use clock.h instead of clocks.h for the clock API. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PPC/PCM030: enable USB/OHCI pin supportJuergen Borleis2015-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This change in the port config register enables the USB/OHCI support and makes USB work on the PCM030's regular development baseboard. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PPC/PCM030: fix reference clockJuergen Borleis2015-08-032-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to enable and use USB/OHCI on the MPC5200 the USB PLL register must be set. It's not easy to find a correct value for this register, it seems it depends on the used external reference frequency and some other 'magic' things. There are some values out in the wild for the 33,333333 MHz and 33,333000 MHz reference frequency case, but they are not consistent over the boards. The value used here in this change for the USB PLL register is from the first days of support for this platform and works at least on the reference baseboard. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PPC/PCM030: remove nowhere used definitionsJuergen Borleis2015-08-031-9/+0
| | | | | | | | | | | | | | | Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/exitcall'Sascha Hauer2015-08-062-0/+10
|\ \ \ | |/ / |/| |
| * | exitcall: Add exitcall infrastructureHerve Codina2015-07-132-0/+10
| |/ | | | | | | | | | | | | | | exitcall infrastructure is based on initcall infrastructure. It allows to have and use exit call hooks on barebox shutdown. Signed-off-by: Herve Codina <Herve.CODINA@celad.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / Devicetree/PPC: fix devicetree's fixupJuergen Borleis2015-07-271-4/+8
|/ | | | | | | | | | | | | | | | | | Currently Barebox fails to boot a kernel/devicetree pair on PowerPC. With of_find_node_by_path() the framework uses a global variable to find the root node and fails. With of_find_node_by_path_from() and forwarding the 'root' parameter it works again as expected. This fixes the following error message at run-time: Loading U-Boot uImage '/tmp/tftpcmd/kernel' Loading devicetree from '/tmp/tftpcmd/oftree' bootm: No devicetree given. handler failed with: Invalid argument Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: replace __inline__ with inlineSascha Hauer2015-07-022-5/+5
| | | | | | inline is preferred over __inline__ Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc: replace extern inline with static inlineSascha Hauer2015-07-023-23/+23
| | | | | | Replaced in the kernel a long time ago, not compatible with gcc5. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* PPC: asm/bitops.h: drop unused ext2* and minix* stuffAntony Pavlov2015-06-041-63/+0
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc: use generic posix_types.hSascha Hauer2015-06-031-108/+1
| | | | | | | Use generic asm-generic/posix_types.h instead of repeating the typedefs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* introduce bitsperlong.h for remaining architecturesSascha Hauer2015-06-032-1/+2
| | | | | | | | This introduces the bitsperlong.h file for the remaining architectures. It's purpose is to define BITS_PER_LONG which in the next step can be used by a generic posix_types.h file. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* dma: Use generic place for dma_addr_t typedefSascha Hauer2015-05-221-3/+0
| | | | | | | | | Instead of letting all architectures define their own dma_addr_t use a common place in include/linux/types.h and use a Kconfig symbol that architectures can select to define the width of dma_addr_t. The same is done in the Kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Use linux.bootargs.console for specifying the consoleSascha Hauer2015-03-091-0/+0
| | | | | | | | Use linux.bootargs.console to specify the console since this is the variable the console code uses for automatically assigning a console. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* phyCORE-MPC5200-Tiny: switch to the new environment templateJuergen Borleis2015-03-013-21/+33
| | | | | Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* powerpc: include <linux/stringify.h> to avoid dupulicated definesMasahiro Yamada2015-01-131-3/+1
| | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>