summaryrefslogtreecommitdiffstats
path: root/arch/ppc
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | 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>