summaryrefslogtreecommitdiffstats
path: root/arch/ppc/include
Commit message (Collapse)AuthorAgeFilesLines
* ddr_spd: Update from U-BootSascha Hauer2019-03-041-2/+2
| | | | | | | | | | | 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>
* 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>
* 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>
* 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>
* 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>
* rework remap_rangeSascha Hauer2015-11-031-18/+6
| | | | | | | | | | | | | | | | | | 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>
* 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>
* Merge branch 'for-next/ppc'Sascha Hauer2014-08-073-1/+270
|\
| * ppc: Freescale P1010 headersRenaud Barbier2014-07-283-1/+270
| | | | | | | | | | | | | | | | Add a minimal Integrated Flash Controller header file and new definitions to support the P1010 SOC. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ppc: Use generic find_*_bit functionsSascha Hauer2014-07-171-43/+6
|/ | | | | | | | The ppc implementation is identical to the generic implementation, so use the generic one instead. Also add the missing __ffs function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* PPC: FSL DDR: Fix compiler warningSascha Hauer2014-06-051-1/+1
| | | | | | | | | Fixes: arch/ppc/boards/freescale-p1022ds/ddr.c: In function 'fsl_ddr_board_info': arch/ppc/boards/freescale-p1022ds/ddr.c:39:21: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc: io: Add _IO_BASE defineSascha Hauer2014-04-091-0/+1
| | | | | | To make inb/outb and friends work. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc: mpc8xxx: add DDR3 supportRenaud Barbier2014-03-192-1/+41
| | | | | | | | | | | | | | | | Add DDR3 support into the MPC8xxx DDR driver. To avoid confusion, the function set_ddr_sdram_mode is renamed set_ddr2_sdram_mode. Checking for errors is simplified in the DDR2 DIMM parameters computation to be consistent with DDR3. This code is derived from the files found in directory drivers/ddr/fsl from U-Boot version git-be937b5. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc: add SoC support for Freescale P1022Renaud Barbier2014-03-182-0/+4
| | | | | | | CPU, DDR, and LBC definitions are added to support the Freescale P1022. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc: add support for memtest with cache disabledRenaud Barbier2014-03-031-0/+6
| | | | | | | | | Add support to enable caching on a memory region during the memory test. Tested on P2020RDB and DA923RC. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ppc'Sascha Hauer2014-02-033-14/+35
|\
| * ppc: cpu-85xx: import U-Boot start-up codeRenaud Barbier2014-01-162-0/+5
| | | | | | | | | | | | | | | | | | Import U-Boot start-up code from version git-9407c3fc to include the latest CPUs errata and make future U-Boot code inclusion easier. The code import is limited to the currently supported CPUs P2020/MPC8544. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ppc: cpu-85xx: upgrade MMU support to v2 pages sizesRenaud Barbier2014-01-163-14/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | TLB support for the 85xx CPUs has been upgraded to support the MMUv2 page size definitions. This has been imported from U-Boot version git-9407c3fc. This allows for future CPUs to make use of the new MMU support. Also the definition of MAX_MEM_MAPPED has been changed to avoid type casting with "min" macro. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ppc: remove bit operation headers file conflictRenaud Barbier2014-01-301-44/+2
|/ | | | | | | | | | | | | Removed the ppc bit operation functions and definitions in the ppc file asm/bitops.h since these are already defined in the asm-generic header files. Moved ffs64 definition to the mpc85xx header files because the function requires the inclusion of linux/log2.h which also includes asm/bitops.h. The conflict was noted when UBIFS was enabled in barebox. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc: mpc85xx: mpc8544 supportRenaud Barbier2013-11-062-0/+14
| | | | | | | | | | | | Definitions are added to support the mpc8544 sOC. The function returning the I2C bus frequency is updated to take into account the mpc8544 specific clock ratio. A mininal GPIO API is added to enable and set the GPIO out pins. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc: bootm: relocate fdt to valid boot memoryRenaud Barbier2013-09-091-0/+3
| | | | | | | | | | | | | | For the MPC85xx family of SOCs Linux expects any boot firmware information to be passed in the first 64MiB of memory. This adds support to ensure that the device tree is relocated to a valid location if it is outside that address range. For the other SOC family currently present in the ppc architecture, the default is not to relocate as at Linux startup the virtual address equals the physical address. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc: add and update device tree fixup functionsRenaud Barbier2013-09-051-0/+1
| | | | | | | | | | | This adds support for populating derived properties of the mpc85xx SOC which are not typically included in the dtb directly. This update is based on U-Boot code from common/fdt_support.c and arch/powerpc/cpu/mpc85xx/fdt.c - version git-2b26201. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mpc85xx: remove local bus initialisationRenaud Barbier2013-08-051-2/+0
| | | | | | | | | | | | | The early initialisation of chip select 0 (boot flash) is removed from cpu initialisation. This removes the dependency on board base address definition. Consequently, cpu_init_f is not called in the start-up code but added to the init call list as cpu_init_r. Also the file arch/ppc/mach-mpc85xx/fsl_lbc.c is deleted. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next-manual/oftree-linux-sync'Sascha Hauer2013-07-021-2/+0
|\
| * ppc: remove strcasecmp/strncasecmp prototypesSascha Hauer2013-06-201-2/+0
| | | | | | | | | | | | | | ppc does not implement these, so remove the prototypes and use the ones from include/linux/string.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ppc asm: DDR headersRenaud Barbier2013-06-272-4/+187
|/ | | | | | | | | | | Definitions and structures have been added to record DIMM parameters and configure memory options. The code is based on the equivalent files in the directory arch/powerpc/include/asm from U-boot version git-a71d45d. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc: update I/O accessorsRenaud Barbier2013-05-311-29/+32
| | | | | | | | | | | The I/O accessors in_bexx, out_bexx, in_lexx and out_lexx are updated to the latest Linux version. The patch is tested on a MPC8544 based board and solved I/O access issues on I2C devices. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc io.h: fix indentationRenaud Barbier2013-05-311-24/+24
| | | | | | | | To prepare for an update of the I/O functions to the latest Linux version, the indentation is fixed. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remap_range: make function 'remap_range' globalAlexander Aring2013-01-181-0/+18
| | | | | | | | | | | | Change function remap_range in arm architecture to make it global accessable. For example command 'memtest' can change pte flags to enable or disable cache. Add dummy function for others architectures that doesn't have mmu or pte support. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-174-16/+0
| | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/i2c'Sascha Hauer2012-09-051-86/+0
|\
| * ppc/asm/fsl_i2c.h is removedRenaud Barbier2012-09-031-86/+0
| | | | | | | | | | | | | | | | | | The i2c-imx driver is able to support the I2C bus on the 85xx machines with minor modifications. It already defines register offsets. Therefore, this header file is no longer needed. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ppc: add unaligned supportRenaud Barbier2012-09-041-0/+16
|/ | | | | | | | This file is copied from Linux 2.6.39. It is added so that the P2020RDB can still build. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* blackfin, mips, openrisc, ppc, sandbox, x86: add generic dma_alloc, dma_free ↵Marc Kleine-Budde2012-06-301-0/+13
| | | | | | | | | | | | | | | | | inlines Some drivers call dma_inv_range() on buffers, on arm these buffers must be cache line aligned. This patch introduces a generic dma_alloc, dma_free. Archs can implement in their own functions in "asm/dma.h" and add a: #define dma_alloc dma_alloc #define dma_free dma_free On all other archs the generic versions, which translate into xmalloc and free are used. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Initial e500v2 start up codeRenaud Barbier2012-05-171-0/+2
| | | | | | | | | | | This is the first part of the start-up code. The source code origin is U-boot and is slightly modified to have e500v2 CPU support in 32-bit mode only. It includes the power-up entry point, CPU initialization code and exports definition for D-cache flush and I-cache invalidate. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Initial Freescale 85xx Headers.Renaud Barbier2012-05-174-0/+229
| | | | | | | | These header files are added to provide a minimal support to the Freescale 85xx cpu to boot on a P2020RDB platform. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc io.h: update following MMIO primitives fixRenaud Barbier2012-05-111-0/+28
| | | | | | | | Following the MMIO primitives fix, the definitions of __raw_* function is sourced from Linux and added. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Preparation stage to support multiple PPC architecturesRenaud Barbier2012-05-023-167/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arch/ppc/Kconfig is reworked to make the configuration environment architecture neutral. All MPC5200 configuration is moved to the MPC5200 architecture specific configuration file. These modifications are reflected in the PCM030 board support. arch/ppc/Makefile compilation directives are updated in preparation for the introduction of future cpus/machines. lib/time.c is moved to the architecture specific directory and the building instructions updated in the Make files. The file is cleaned up of unused code. The definition of L1_CACHE_... is updated and CACHELINE_SIZE is defined in ppc/include/asm/cache.h for future use by the mpc85xx. The file mach-mpc5xxx/pci_mpc5200.c and mach-mpc5xxx/start.S are updated accordingly. The declaration of search_exception_table is moved in include/asm/common.h because it is used across architectures. mach-mpc5xxx/traps.c is also updated to reflect this change. The definition of exception in asm/ppc_asm.tmpl is updated for future use by the mpc85xx. The file starts.S in mach-mpc5xxx is updated accordingly. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc mmu.h: update for future mpc85xx supportSascha Hauer2012-05-021-8/+27
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc processor.h: Update for future mpc85xx supportSascha Hauer2012-05-021-0/+44
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc: add clr/setbits operationsSascha Hauer2012-05-021-0/+20
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc: Add fls, fls64, __ilog2_u64 and ffs64 bitopsSascha Hauer2012-05-021-0/+42
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>