summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu
Commit message (Collapse)AuthorAgeFilesLines
* arm: move outercase to cpu.c as some SoC as the ux500 always need to flush ↵Jean-Christophe PLAGNIOL-VILLARD2013-02-113-17/+26
| | | | | | | the l2x0 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: cache-l2x0 update sync define with Linux 3.5Jean-Christophe PLAGNIOL-VILLARD2013-02-111-31/+1
| | | | | | | Drop copy in cache-l2x0 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: mmu: Clear unpredictable bits for translation tableAlexander Shiyan2013-02-111-0/+3
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: rename reset and common_reset to barebox_arm_reset_vector and ↵Jean-Christophe PLAGNIOL-VILLARD2013-02-081-1/+1
| | | | | | | | | arm_cpu_lowlevel_init reset is confusing with the cpu reset and impossible to grep Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM pbl: inline decompress functionSascha Hauer2013-02-041-8/+3
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Automatically determine malloc sizeSascha Hauer2013-02-041-0/+28
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Enable mmu earlySascha Hauer2013-02-042-1/+19
| | | | | | | | | This optionally enabled the MMU in the PBL or during early startup for the non PBL case. The regular MMU init code will pickup the already enabled MMU later. This might complicate debugging early code, so this has been made optional. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Factor out early mmu codeSascha Hauer2013-02-044-74/+61
| | | | | | | | | Move early mmu code to a separate file so that it can be used from the pbl and the regular image. Disabling the mmu can be dropped since the regular mmu code is now able to pickup an enabled mmu. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM mmu: pickup already enabled mmuSascha Hauer2013-02-041-1/+8
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM pbl: Use dynamic parameters for early malloc spaceSascha Hauer2013-02-041-4/+7
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Setup stack at end of SDRAMSascha Hauer2013-02-043-4/+30
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM start: pickup parameters from pblSascha Hauer2013-02-041-21/+23
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM start-pbl: call uncompressed binary with argumentsSascha Hauer2013-02-041-9/+9
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM start-pbl: make board_init_lowlevel_return staticSascha Hauer2013-02-041-9/+5
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: remove now unused MACH_[HAS|DO]_LOWLEVEL_INITSascha Hauer2013-02-042-24/+0
| | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* ARM i.MX: Add i.MX specific entry point for bareboxSascha Hauer2013-02-041-0/+12
| | | | | | | | Additionally to the generic entry point the i.MX specific ones calculate the SDRAM size automatically so the boards do not have to care. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: add __noreturn to board_init_lowlevel_returnSascha Hauer2013-02-042-4/+4
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Add new entry point for bareboxSascha Hauer2013-02-042-0/+26
| | | | | | | | | | Memory is a precious resource, so it makes sense to make it available as early as possible. By definition the lowlevel init code already knows where to find memory because it's the lowlevel init code which sets up the memory. Until all boards are converted this new entry is just a fallback to the old entry point. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/pbl'Sascha Hauer2013-02-041-19/+2
|\
| * pbl: factorise decompressorJean-Christophe PLAGNIOL-VILLARD2013-01-301-19/+2
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2013-02-041-15/+28
|\ \
| * | arm-mmu: switch pte flags vars to lower caseAlexander Aring2013-01-251-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Old cache/uncache pte flags were declared as defines. Since these flags are determine at runtime they are static variables. This patch switch the naming style of these variables to lower case which is typically used for variables. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | arm-mmu: move PAGE_ALIGN macro to common.hAlexander Aring2013-01-181-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PAGE_ALIGN macro is needed to align addresses to page boundaries. Move this macro to another PAGE_* defines. Commands which uses remap_range function needs this macro. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | remap_range: make function 'remap_range' globalAlexander Aring2013-01-181-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ARM mmu: Use pr_debugSascha Hauer2013-01-271-3/+24
| |/ |/| | | | | | | | | Also, specify a pr_fmt and add missing GPL header. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM v7: Fix register corruption in v7_mmu_cache_offSascha Hauer2013-01-231-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v7_mmu_cache_flush stores registers on the stack and restores them afterwards. Additionally v7_mmu_cache_flush is called from v7_mmu_cache_off *after* disabling the MMU. With this the following can happen: - v7_mmu_cache_off disables the MMU. From now on no new values go to the data cache. - v7_mmu_cache_off calls v7_mmu_cache_flush which in turn puts registers on the stack. Due to the MMU being disabled they do not go into the data cache. - In v7_mmu_cache_flush the memory the stack is pointing to is overwritten with the values currently being in the cache. - v7_mmu_cache_flush restores the registers from the stack with values from the cache and not the memory where the values have previously been written to. Fix this by storing the registers on the stack *before* we disable the MMU and restore them after we have called v7_mmu_cache_flush. This way v7_mmu_cache_flush still restores corrupt register values for the case when the MMU has been disabled, but we will restore correct values afterwards. This has been first observed when switching to gcc-4.7.2 when compiling in Thumb2 mode, but could explain earlier problems also. The result here was that the register holding the kernel address in start_linux() was corrupted so that the kernel could not be started. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm-mmu: remove semicolon in arm mmu.cAlexander Aring2013-01-141-1/+1
| | | | | | | Remove semicolon in PAGE_ALIGN macro. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Cleanup Kconfig filesAlexander Shiyan2012-12-081-4/+3
| | | | | | | | | This patch provides a global cleanup barebox Kconfig files. This includes replacing spaces to tabs, formatting in accordance format, removing extraneous lines and spaces. No functional changes. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: start-pbl.c: unifify path to lib/decompress_*.cAntony Pavlov2012-11-201-1/+1
| | | | | | | It's three levels up, not four. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: start-pbl.c: make errorfn() staticAntony Pavlov2012-11-191-1/+1
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/bcm2835'Sascha Hauer2012-11-161-0/+5
|\ | | | | | | | | Conflicts: arch/arm/configs/versatilepb_defconfig
| * ARM1176: add supportCarlo Caione2012-10-211-0/+5
| | | | | | | | | | Signed-off-by: Carlo Caione <carlo.caione@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/arm-start' into for-next/armSascha Hauer2012-10-174-75/+53
|\ \
| * | ARM: simplify start.cSascha Hauer2012-10-081-18/+4
| | | | | | | | | | | | | | | | | | | | | start() for the PBL case is a duplicate of board_init_lowlevel_return(). Instead of duplicating it just call it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: cleanup piggydata copy checkSascha Hauer2012-10-051-20/+8
| | | | | | | | | | | | | | | | | | Replace to gotos with a single if(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM: add assembly function for setting up C environmentSascha Hauer2012-10-054-37/+43
| |/ | | | | | | | | | | | | | | | | | | | | Sometimes Assembler beats C. In this case a small assembler function called without parameters can: - copy a binary to its link address - clear the bss - return to the same position in the copied binary Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: ensure irqs are disabled at barebox exitVicente Bergas2012-10-151-0/+11
| | | | | | | | | | Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: add rename PSR bits to match linux namesVicente Bergas2012-10-152-4/+3
| | | | | | | | | | Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: introduce arm_setup_stack function and use itSascha Hauer2012-10-132-5/+2
| | | | | | | | | | | | | | We have enough places which setup0 a stack to justify a static inline function for it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: Support multiple ARM architecturesSascha Hauer2012-10-137-73/+191
| | | | | | | | | | | | | | The different ARM architectures need different cache functions. This patch makes them selectable during runtime. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: no need to call cache functions when MMU is disabledSascha Hauer2012-10-121-11/+2
| | | | | | | | | | | | | | | | Without MMU enabled we do not need to call __mmu_cache_* as the caches are not enabled. Calling flush_icache() before jumping to new code is enough. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM exceptions: Do not use hardcoded STACK_BASESascha Hauer2012-10-121-8/+7
| | | | | | | | | | | | | | | | | | The exception handlers need some space to write to. Traditionally this has been some stack space. This is not necessary at all, so just use some variable and get rid of the compile time fixed stack address. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: Add cpu_architecture() functionSascha Hauer2012-10-101-0/+47
|/ | | | | | | Once we run on multiple SoCs we must know which arm architecture we are on. Add cpu_architecture() from the kernel to detect it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Fix Kconfig link for Cirrus Logic EP9312 CPU.Alexander Shiyan2012-10-051-1/+1
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM pbl: actually create cached mappings in the decompressorSascha Hauer2012-10-041-4/+3
| | | | | | | | | We called create_sections with 4096MB as size argument, but create_sections expected the argument in bytes, so create sections was completely optimized away due to the size >>= 20. This patch changes the size argument to be in megabytes and adjusts map_cachable to pass the argument in megabytes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM pbl: Provide a dummy error function for the decompressorSascha Hauer2012-10-041-1/+6
| | | | | | | | | We can't do anything useful in the error function, so we just hang. This has the advantage that at least when a JTAG debugger is connected we can see what happens. Otherwise the code just jumps to NULL in case of an error. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/arm-board-reset'Sascha Hauer2012-10-034-68/+26
|\ | | | | | | | | | | | | | | Conflicts: arch/arm/cpu/start-reset.c arch/arm/include/asm/barebox-arm.h arch/arm/mach-omap/Kconfig arch/arm/mach-omap/omap3_core.S
| * ARM: give boards control of the reset entry pointJan Luebbe2012-09-274-65/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On some SoCs (for example AM35xx), the ROM bootloader passes useful information in r0 when jumping to barebox. To avoid overwriting this in the generic reset code, we introduce common_reset as a C function and as an assembler macro. This is then called form the reset entry point (either in common or in board code). This patch is based on code by Sascha Hauer <s.hauer@pengutronix.de>. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: remove ARCH_HAS_LOWLEVEL_INITSascha Hauer2012-09-271-4/+0
| | | | | | | | | | | | | | | | This is unused now and not needed. We have a board_init_lowlevel. If a board needs some architecture setup it can always call it from its board_init_lowlevel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/arm-remove-arch-init-ll'Sascha Hauer2012-10-031-4/+0
|\ \ | | | | | | | | | | | | Conflicts: arch/arm/include/asm/barebox-arm.h