summaryrefslogtreecommitdiffstats
path: root/arch/arm/include
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/vexpress'Sascha Hauer2013-03-043-0/+136
|\
| * arm: add vexpress board supportJean-Christophe PLAGNIOL-VILLARD2013-02-122-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | detect the cpu model to dynamise the periphs mapping currently only tested on qemu but should work on real hardware Cortex-A9 if you use 1GiB of ram you can run the same barebox on Cortex-A15 or Cortex-A9 otherwise use vexpress_ca9_defconfig where the TEXT_BASE is at 0x63f00000 when we will add the relocation support this defconfig will be drop qemu/arm-softmmu/qemu-system-arm -M vexpress-a9 -m 1024 -smp 1 -kernel build/vexpress/barebox -pflash build/vexpress/flash0 -nographic Cortex-A15 qemu/arm-softmmu/qemu-system-arm -M vexpress-a15 -m 1024 -smp 1 -kernel build/vexpress/barebox -pflash build/vexpress/flash0 -nographic Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * arm: add macro cpu_is_xxxJean-Christophe PLAGNIOL-VILLARD2013-02-111-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | so we can detect ARM920 ARM926 ARM1176 PXA250 PXA255 PXA270 Cortex-A8 Cortex-A5 Cortex-A7 Cortex-A9 Cortex-A15 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-28/+80
|/ | | | | | | 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: rename reset and common_reset to barebox_arm_reset_vector and ↵Jean-Christophe PLAGNIOL-VILLARD2013-02-081-4/+4
| | | | | | | | | 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: Setup stack at end of SDRAMSascha Hauer2013-02-041-0/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM start: pickup parameters from pblSascha Hauer2013-02-041-1/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: add __noreturn to board_init_lowlevel_returnSascha Hauer2013-02-041-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Add new entry point for bareboxSascha Hauer2013-02-041-0/+1
| | | | | | | | | | 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/omap'Sascha Hauer2013-02-041-0/+9
|\
| * feature_list: a way to pass hardware info to the kernelVicente Bergas2013-01-211-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi Sascha, I've made the changes you suggested in this resent patch. Everything related to custom ATAGs has been moved to the board directory. The generic code does not make any references to feature lists or bootloader versions. About the setup_feature_list prototype: it has been renamed to atag_appender it's not a function, it's a pointer to a function. Can it have a prototype other than it's own declaration? All non-related changes has been dropped. They were checkpatch.pl warnings unrelated to this patch. Regards, Vicente. Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | remap_range: make function 'remap_range' globalAlexander Aring2013-01-181-0/+17
|/ | | | | | | | | | | | 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 startup: Ensure CR_A flag is cleared on architectures >= ARMv6Sascha Hauer2012-12-081-0/+2
| | | | | | | We allow unaligned accesses on ARMv6 onwards, make sure the CR_A flag is cleared so that unaligned accesses do not trap. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/arm-start' into for-next/armSascha Hauer2012-10-171-0/+2
|\
| * ARM: add assembly function for setting up C environmentSascha Hauer2012-10-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | 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: add rename PSR bits to match linux namesVicente Bergas2012-10-151-25/+31
| | | | | | | | | | 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-131-0/+5
| | | | | | | | | | | | | | 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-131-0/+2
| | | | | | | | | | | | | | 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: Add cpu_architecture() functionSascha Hauer2012-10-102-0/+160
|/ | | | | | | 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>
* Merge branch 'for-next/arm-board-reset'Sascha Hauer2012-10-032-0/+72
|\ | | | | | | | | | | | | | | 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-272-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+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-1/+0
|\ \ | | | | | | | | | | | | Conflicts: arch/arm/include/asm/barebox-arm.h
| * | ARM: remove ARCH_HAS_LOWLEVEL_INITSascha Hauer2012-09-251-1/+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/remove-fsf-address'Sascha Hauer2012-10-034-13/+0
|\ \ | | | | | | | | | | | | | | | Conflicts: drivers/net/miidev.c include/miidev.h
| * | Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-174-13/+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>
* | ARM lowlevel: Use get_runtime_offsetSascha Hauer2012-09-091-1/+0
| | | | | | | | | | | | | | | | The current approach to get the offset between link and runtime address is fragile. It requires a big fat comment to put no code above it and it requires an extra linker section. Instead use a small assembler function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: Add assembler function to get runtime offsetSascha Hauer2012-09-091-0/+1
|/ | | | | | | This function returns the offset between the address barebox is linked at and the address barebox is currently running at. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/pbl'Sascha Hauer2012-09-051-0/+9
|\
| * create a common ARM flush_icache functionSascha Hauer2012-08-131-0/+9
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | arm introduce CONFIG_MACH_ARM_HEAD option to allow custom headJean-Christophe PLAGNIOL-VILLARD2012-08-031-0/+4
|/ | | | | | | | This is needed by at91 to specify the size of the binary to load from the bootrom when booting for non nor flash. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: let armlinux_set_* depend on the correct optionSascha Hauer2012-07-251-2/+1
| | | | | | | | We need inline versions of armlinux_set* exactly when CONFIG_ARM_LINUX is not set, because this is the symbol used to compile the non inline versions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM mmu: add dma_allocMarc Kleine-Budde2012-06-302-2/+19
| | | | | | | | | dma_alloc() allocates memory aligned to cache lines. We have to use cache line aligned buffers if a driver calls dma_inv_range on the buffer. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: put a valid "barebox" signature in the header on big-endian systems.Krzysztof Halasa2012-05-101-2/+1
| | | | | Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: remove unused struct param_struct and related info.Krzysztof Halasa2012-05-061-53/+0
| | | | | Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Allow to compile in thumb-2 modeSascha Hauer2012-03-062-4/+16
| | | | | | | | | This shrinks the resulting binary size by ~25%. Exceptions are still handled in arm mode, so we have to explicitely put .arm directives into the exception code. Thumb-2 mode has been tested on i.MX51 Babbage board. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: get runtime offset of board_init_lowlevel_return by using separate sectionSascha Hauer2012-02-281-0/+1
| | | | | | | | We used to get the runtime offset of the board_init_lowlevel_return by doing a &board_init_lowlevel_return. This does not work in thumb-2 mode, so use a separate linker section for this function instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: move exception vectors away from start of binarySascha Hauer2012-02-282-0/+26
| | | | | | | | | | | | | | | | Traditionally U-Boot and barebox have the exception vectors at the start of the binary. There is no real reason in doing so, because in the majority of cases this data will not be at 0x0 where it could be used as vectors directly anyway. This patch puts the vectors into a separate linker section and defines an head function which is placed at the start of the image instead. Putting this in a separate function also has the advantage that it can be placed at the start of images which require an additional header like several Freescale i.MX images. As the head function contains the barebox arm magic those images can now also be detected as barebox images. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add dump_stack functionSascha Hauer2012-01-261-36/+3
| | | | | | | | | | At least ARM allows us to dump the stack, but we currently have no prototype for this. Add a dump_stack prototype and provide a static inline function for architectures without stack dump support. Also, call dump_stack() in panic() to provide more information in the case of a panic. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: import memcpy_from/toio and memset_io from linuxJean-Christophe PLAGNIOL-VILLARD2012-01-021-0/+7
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arch/arm: mmu: add map_io_range()Robert Jarzmik2011-12-211-0/+6
| | | | | | | | | Add a function to remap an IO range into a virtual addresses range. This is particulary usefull for the few devices mapped at physical address 0, as the MTD boot devices. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: call start_linux directly with initrd start/size and oftreeSascha Hauer2011-12-151-1/+2
| | | | | | | whoever calls this function is not necessarily aware of a struct image_data, so remove the dependency from the function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: switch to generic memory banksSascha Hauer2011-09-232-14/+6
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM mmu: find second level descriptors by walking the page tableSascha Hauer2011-09-231-1/+0
| | | | | | | By doing this we can remove the ptes field in struct arm_memory which won't be present in a generic memory bank structure anymore. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: use asm-generic/io.hSascha Hauer2011-09-221-48/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: add missing volatile in get_cr()Sascha Hauer2011-08-071-1/+1
| | | | | | | Without it, the compiler optimizes away subsequent reads of the control register. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'pu-mmu' into nextSascha Hauer2011-08-041-10/+13
|\
| * ARM boards: remove now unnecessary mmu callsSascha Hauer2011-08-031-7/+0
| | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * ARM: rework MMU supportSascha Hauer2011-08-031-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In barebox we used 1MiB sections to map our SDRAM cachable. This has the drawback that we have to map our sdram twice: cached for normal sdram and uncached for DMA operations. As address space gets sparse on newer systems we are sometines unable to find a suitably big enough area for the dma coherent space. This patch changes the MMU code to use second level page tables. With it we can implement dma_alloc_coherent as normal malloc, we just have to remap the allocated area uncached afterwards and map it cached again after free(). This makes arm_create_section(), setup_dma_coherent() and mmu_enable() noops. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'pu-remove-gd_t' into nextSascha Hauer2011-08-031-30/+0
|\ \ | |/ |/|