9
0
Fork 0
Commit Graph

236 Commits

Author SHA1 Message Date
Sascha Hauer 2e368eec07 ARM lowlevel: Use get_runtime_offset
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>
2012-09-09 18:25:49 +02:00
Sascha Hauer f680f893b4 ARM lowlevel: Update function documentation
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-09 11:42:18 +02:00
Sascha Hauer d5b6012ac1 create a common ARM flush_icache function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-13 20:27:43 +02:00
Sascha Hauer bdb4093d3d ARM pbl: enable MMU during decompression
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-13 20:27:39 +02:00
Sascha Hauer a3a103c95c ARM MMU: call __mmu_cache_* as regular C functions
Now that __mmu_cache_* restore the registers they can be called
as regular C functions. Create a header file for them and use
C functions rather than inline assembly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-13 20:27:38 +02:00
Sascha Hauer 8377958958 ARM __mmu_cache_*: Do not clobber registers
Save/restore the registers used in __mmu_cache_* so that they can
be called as regular C functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-13 20:27:38 +02:00
Jean-Christophe PLAGNIOL-VILLARD 104c39fe82 compressed image: add gzip support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-03 18:09:15 +08:00
Jean-Christophe PLAGNIOL-VILLARD 8d29296240 ARM: add early malloc support needed by the decompressor
This is not needed by lzo but by gunzip, xz and others.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-03 18:09:15 +08:00
Jean-Christophe PLAGNIOL-VILLARD 5c3db111da Add compressed image support
This allows for creating a lzo compressed binary unsing the pbl.

Only copy the piggydata if needed.

Add CONFIG_PBL_FORCE_PIGGYDATA_COPY option
In some case we need to copy the PIGGYDATA as the link address
as example we run from SRAM and shutdown the SDRAM/DDR for
reconfiguration but most of the time we just need to copy the
executable code.

based on Sascha Hauer
Add compressed image support

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-03 18:09:15 +08:00
Jean-Christophe PLAGNIOL-VILLARD 78867e2bbd Add pre-bootloader (pbl) image support
This allows for creating a pre-bootloader binary for
 - nand boot
 - mmc boot
 - compressed image

The pbl will be incharge of the lowlevel init if needed.
The barebox will skip it.

Import string functions from linux 3.4 (arch/arm/boot/compressed/string.c) and
implement a dummy panic.

For now on introduce dummy zbarebox* targets and c code that will contain later
the decompressor. This only implemeted on ARM.

This patch is based on Sascha Hauer <s.hauer@pengutronix.de>
Add compressed image support patch

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-03 18:09:13 +08:00
Sascha Hauer 91b632acbf ARM: move exception vector table to exceptions.S
start.c has nothing to do with the exception vector table anymore,
so move it next to the exception handling code in exceptions.S

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-24 08:21:26 +02:00
Sascha Hauer 7c3e50c83d ARM: Separate assembler functions into their own section
To let the linker remove unused functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-23 23:57:44 +02:00
Sascha Hauer a5dd9f8eca ARM startup: calculate offset instead of runtime address
Calculating the offset between runtime and linked address makes the
intention of the binary copy function a bit more clear.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-23 23:57:44 +02:00
Sascha Hauer 75821bdef5 ARM: Enable unaligned accesses on armv6 and later
We have the following in the tree:

|commit af42feb9d2
|Author: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
|Date:   Mon Jan 2 11:49:17 2012 +0100
|
|    ARM: set SCTRL[A] only when architecture does not support unaligned access
|
|    Recent gcc generates code with unaligned access when architecture
|    supports it. Setting A bit unconditionally causes data-aborts on such
|    code rendering barebox unusable.
|
|    Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
|    Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

What the patch tried is correct: We should set the A bit only when the architecture
does not support unaligned accesses. To figure out whether the architecture supports
unaligned accesses the patch tested for the U bit which is wrong. The U bit may be
0 after a reset, so instead of testing for the U bit we have to set it. This can
be done on armv6 and later. All others have the A bit set to trap unaligned accesses.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-10 19:07:15 +02:00
Sascha Hauer cca17e25bf ARM mmu: flush page tables in arm_mmu_remap_sdram()
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-03 20:07:03 +02:00
Sascha Hauer 008d2ba8bf Merge branch 'for-next/mmuinfo' 2012-07-02 11:02:52 +02:00
Jan Luebbe 490867bbc3 mmuinfo: add a command do display the result of virtual to physical translation
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:06:21 +02:00
Marc Kleine-Budde 76df95bde1 ARM mmu: don't use CONFIG_MMU to disable mmu code, there are static inline versions
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:46:24 +02:00
Sascha Hauer f6c6b1503c Merge branch 'pu/cache' into next 2012-05-24 10:24:22 +02:00
Sascha Hauer 023e9f01c7 ARM startup: Do call __mmu_cache_flush during startup
Traditionally we call __mmu_cache_flush in early startup. There
is a problem with armv7 and hierarchical caches though, on these
systems __mmu_cache_flush uses the stack. Appearantly this was
seldomly a problem, because most of these systems have a ROM
bootloader which sets up some stack, but on a special i.MX6 system
this failed badly. We should not have to flush caches here. Every
sane system should pass control to the bootloader without stale
entries in the caches *), so it should be a safe assumption that the
cache flush can be removed.

Since __mmu_cache_flush is not called from early code anymore we can
also move it to the regular text section.

Be brave and give it a try.

*) omap3 seems to be a exception to this, but this has a cache flush
in arch_init_lowlevel already

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-23 22:28:11 +02:00
Antony Pavlov f9b932fed9 fix typo funtion -> function
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 22:00:54 +02:00
Jean-Christophe PLAGNIOL-VILLARD 8e6f45f54f complete: add empty complete support
for cpuinfo, clear, dhcp, false, login, lsmod, meminfo, passwd, pwd, reginfo,
reset, true, usb, version

for mach-imx and mach-mxs: dump_clocks
for u_serial: mycdev

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-30 20:37:40 +08:00
Sascha Hauer 2c2f657092 ARM startup: invalidate I-cache before jumping to relocated binary
barebox can startup with I-cache enabled, so to be on the safe
side we should invalidate the I-cache before jumping to a binary
we just copied in place.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-13 17:34:52 +02:00
Sascha Hauer beb36c510b Merge branch 'work/thumb2' into next 2012-03-06 09:39:59 +01:00
Sascha Hauer 276252a559 ARM: use unconditional branch in exception vectors
If we want to trap the processer in the exception vectors
we have to use unconditional branch instructions. I don't
know what I thought when using bne :-/

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-03-06 09:38:41 +01:00
Sascha Hauer 104a6a7ccf ARM: Allow to compile in thumb-2 mode
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>
2012-03-06 09:37:59 +01:00
Sascha Hauer cb1bd905dc ARM: get runtime offset of board_init_lowlevel_return by using separate section
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>
2012-02-28 09:55:04 +01:00
Sascha Hauer 2c2d00a281 ARM: move exception vectors away from start of binary
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>
2012-02-28 09:55:02 +01:00
Sascha Hauer 33d1cc4bf2 commands: remove struct command pointer from commands
This is unused in all commands and thus can be removed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 20:28:07 +01:00
Sascha Hauer c1e62ef1b7 ARM: Add missing ifdef around dump_stack()
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-27 12:18:08 +01:00
Sascha Hauer 192d6fe9be Merge branch 'pu/debug' into next 2012-01-27 09:31:13 +01:00
Sascha Hauer 79c2f03aee Add dump_stack function
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>
2012-01-26 14:12:08 +01:00
Sascha Hauer 0073723f15 ARM cache-armv7: Add additional ISB
At least OMAP3 needs this to properly work with MMU.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-17 18:50:55 +01:00
Sascha Hauer 0d22025084 Merge branch 'next' 2012-01-05 10:25:17 +01:00
Sascha Hauer e9557be0c1 ARM cache-armv7: use thumb-2 instructions where necessary
Copied from the Kernel

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 15:00:28 +01:00
Enrico Scholz af42feb9d2 ARM: set SCTRL[A] only when architecture does not support unaligned access
Recent gcc generates code with unaligned access when architecture
supports it. Setting A bit unconditionally causes data-aborts on such
code rendering barebox unusable.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 13:07:08 +01:00
Enrico Scholz b936cd4d68 ARM: mark 'lr' as clobbered by inline assembler
When executing 'bl' in inline assembler, the 'lr' register must be
marked as clobbered too.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 13:07:08 +01:00
Robert Jarzmik 0a9083d929 arch/arm: mmu: add map_io_range()
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>
2011-12-21 11:15:31 +01:00
Sascha Hauer c95f81b36a ARM: remove unused icache command
The icache command is unused. Instead of adding it to compilation
again, remove it as the cpuinfo command provides the same information.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-15 11:46:50 +01:00
Sascha Hauer ccc25627e5 ARM cpuinfo: decode more bits, use ARRAY_SIZE
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-15 11:46:50 +01:00
Marc Kleine-Budde 36c47ce426 arm/mach-pxa: Initial Intel/Marvell PXA support
The core support was brought by Marc and Sascha.
The cache choice was fixed by Luotao Fu.
Some gpio and devices addons were provided by Robert.

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-05 09:30:27 +01:00
Sascha Hauer 38884dabbe remove irq support fragments
We never had interrupt support in barebox and we have no plans to
add interrupt support. Even if we do I doubt the current fragments
of irq support are helpful, so remove them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-28 11:41:33 +01:00
Robert Jarzmik 77fe6dce51 arm: trivial renaming create_sections
Rename create_section into create_sections, as the function
is used to create multiple sections, and in particular it
creates the 4096 sections of 1MBytes to have a 1:1 flat
mapping of the 4GBytes address space.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-27 12:17:34 +01:00
Antony Pavlov 44b3571591 arm: cpuinfo: import ARM architecture detection code from Linux
This code correctly detects architecture (v7) for Cortex-A9.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-15 16:28:21 +02:00
Sascha Hauer deef916d9c ARM: switch to generic memory banks
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-23 16:32:49 +02:00
Sascha Hauer b4e4684958 ARM mmu: find second level descriptors by walking the page table
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>
2011-09-23 16:32:48 +02:00
Sascha Hauer 3ee7877a48 introduce io.h
To allow for some generic io accessors introduce io.h and use
this instead of asm/io.h throughout the tree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-22 19:03:05 +02:00
Sascha Hauer fde45de735 ARM: some cleanup in interrupts.c
- Don't call panic with "resetting CPU...". Depending on the
  configuration the system might also hang.
- panic does not return, so no need to call reset_cpu afterwards
- bundle show_regs and panic into a seperate functions to not have
  to call both functions from each exception handler

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-07 19:36:30 +02:00
Sascha Hauer 8ec0f55506 ARM: fix comments in interrupts.c
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-07 19:34:43 +02:00
Sascha Hauer 20fbf2a0e2 ARM: remove unused irq enable/disable functions
We do not have irq support in barebox, so remove the unused interrupt
functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-07 19:30:08 +02:00
Sascha Hauer 613e7ffd4e ARM: exceptions: remove unnecessary function declarations
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-07 19:18:00 +02:00
Sascha Hauer 9fc98211ef ARM: remove unused exception
The exception vector at 0x14 is not used on arm, so no need
to bind this address to a exception handler. Remove the
corresponding code

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-07 19:17:02 +02:00
Sascha Hauer abcf935ee6 ARM mmu: use high vectors if possible
Using high vectors allows us to map a faulting zero page to
catch NULL pointer dereferences.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-07 19:00:59 +02:00
Sascha Hauer 606bd7d9ce ARM mmu: fix arm_create_pte
Each section is 1MiB, so we have to shift by 20 to get the ttb
entry corresponding to a section.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-07 18:54:31 +02:00
Sascha Hauer 56c379160b ARM mmu: Fix arm_create_pte
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-03 09:11:25 +02:00
Sascha Hauer a6c333c7f2 ARM boards: remove now unnecessary mmu calls
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-08-03 09:11:16 +02:00
Sascha Hauer 3100ea1466 ARM: rework MMU support
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>
2011-08-03 09:11:10 +02:00
Sascha Hauer 8ba794abd4 ARM: pass size to dma_free_coherent
We'll need it later once we remap dma memory.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-01 21:49:34 +08:00
Sascha Hauer 5f56079cd5 ARM: move armlinux_add_dram to location which is always compiled
We want to use the memory banks later in the MMU which is
independent of Linux, so move this to a location which is
always compiled.

Also, make the memory bank list global and add an iterator
for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-01 21:49:33 +08:00
Sascha Hauer aab32057b3 ARM cache l2x0: depend on MMU
l2x0 cache support does not work without MMU, so depend
on it in Kconfig.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-01 21:49:33 +08:00
Sascha Hauer 64476d2177 ARM: compile in image size and magic into barebox image
This is useful to detect a barebox image and to be able
to copy only the image size if barebox is stored on
raw partitions which are bigger than the image.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-05-06 08:53:26 +02:00
Sascha Hauer d332597c7c ARM: make exception handling optional
On several boards without MMU support the vectors cannot be mapped
to 0x0 and exception support is nonfunctional anyway, so make this
configurable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-11 15:58:21 +02:00
Sascha Hauer 4bfc4b4458 arm: compile icache command only when command support is present
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-11 15:57:51 +02:00
Sascha Hauer 084df155d3 ARM: Add stack unwinding support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-10 14:50:07 +01:00
Sascha Hauer cad14480bf ARM: create a second level page table entry for the exception vectors
Often enough the exception vectors are not on TEXT_BASE (for example
on i.MX SoCs in internal boot mode), so the board specific code did
not map the exception vectors to 0x0 but whatever happens to be on
TEXT_BASE. Also, the current section-only mapping requires the
exception vectors to be on a 1MB boundary.
Instead, create the possibility to create second level tables and
use this to map a copy of the exception vectors in a board
independent way.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-10 14:49:47 +01:00
Sascha Hauer 1c33aacf8a ARM: use memalign to allocate page table
We have the proper function for getting aligned memory, so use it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-08 12:33:20 +01:00
Sascha Hauer acc033704c ARM v7: Fix typos in cache-armv7.S
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-08 12:33:16 +01:00
Sascha Hauer 4b74753cce ARM v7: Fix broken mmu initialization
The armv7 specific __mmu_cache_on function accidently sets
the page table pointer with the unitialized value of r3. It seems
that often enough r3 still held the correct value from a previous
call to mmu_init allowing this bug to remain uncovered for longer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-08 12:33:12 +01:00
Sascha Hauer 420dab954c ARM start.c: use sections.h header file for linker variables
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-17 11:05:14 +01:00
Krzysztof Halasa ffcdb2796a ARM: support big/little endian switching in "bootX".
Currently implemented only in "bootz".

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-07 10:21:22 +01:00
Krzysztof Halasa c5baa0edc4 Fix error handling with malloc, memalign etc. Introduce xmemalign().
The idea is to panic() when there is no memory available for normal
operation. Exception: code which can consume arbitrary amount of RAM
(example: files allocated in ramfs) must report error instead of panic().

This patch also fixes code which didn't check for NULL from malloc() etc.

Usage: malloc(), memalign() return NULL when out of RAM.
xmalloc(), xmemalign() always return non-NULL or panic().

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-07 10:21:22 +01:00
Krzysztof Halasa fdf5768a1b ARM: support big-endian processors.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-12-21 09:02:40 +01:00
Sascha Hauer fd37f613a5 arm interrupts.c: sparse fixes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-21 22:21:42 +02:00
Sascha Hauer 12c101bcfd cache-l2x0: sparse fixes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-21 22:21:24 +02:00
Sascha Hauer 3205f09674 arch/arm/cpu/cpu.c: sparse fixes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-21 22:21:23 +02:00
Sascha Hauer cdd5db42ef ARM mmu: Call __mmu_cache_flush instead of hardcoded v4/v5 only function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-11 13:22:14 +02:00
Jean-Christophe PLAGNIOL-VILLARD e34c1d4fcc init: introduce __BARE_INIT for .section ".text_bare_init.text"
and make init.h availlable for assembly too

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-09-20 08:56:37 +02:00
Sascha Hauer 3aa5c839eb ARM: add missing call to arch_init_lowlevel
This got lost during the switch to implement the lowlevel
stuff in C.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-06-23 08:37:34 +02:00
Sascha Hauer 6d4ffe499f arch/arm/cpu/cpu.c: remove unused variable
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-06-17 08:46:27 +02:00
Sascha Hauer c21a7fb9f1 arm start.c: Make runtime function address calculation tolerant for more compilers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-06-13 13:07:12 +02:00
Sascha Hauer ce971c2367 arm: use processor specififc functions to turn off MMU
The way it was done before does not work on Cortex processors.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Orjan Friberg <of@flatfrog.com>
Tested-by: Luca Ceresoli <list@lucaceresoli.net>
2010-06-10 14:20:39 +02:00
Sascha Hauer 78104ae181 arm: reimplement startup code in C
Lets translate the startup code to a language we all understand better.
Tested on pcm038 (arm v5) and pcm043 (arm v6).

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-05-03 15:05:38 +02:00
Sascha Hauer bd9e5ca89e arm: move __mmu_cache_flush to bare_init section
Instead of having seperate cache flush functions in the startup code
we want to call the generic functions. To accomplish this they have
to be in the bare_init section.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-05-03 15:05:38 +02:00
Sascha Hauer acbeeab989 ARM: update icache functions to use get_cr/set_cr
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-05-03 15:02:03 +02:00
Sascha Hauer 51b4009f3c ARM: use memalign in dma_alloc_coherent to assure alignment
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-05-03 15:02:03 +02:00
Sascha Hauer be00ed538c add l2x0 cache support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-30 14:15:04 +02:00
Sascha Hauer bcaabae0f6 ARM: Add a wrapper around dma_* functions
This is a preparation to add second level cache support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-30 14:15:04 +02:00
Sascha Hauer cf2703a6fb ARM: replace cleanup_before_linux with the generic shutdown_barebox function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-30 14:15:03 +02:00
Sascha Hauer 78127b0a97 remove unused file arch/arm/cpu/cache.S
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-18 08:14:03 +01:00
Sascha Hauer a5189af297 armv5: use proper cache flush function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-18 08:12:19 +01:00
Marc Kleine-Budde 75478b15bf start-arm: cleanup: proper indention
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2010-02-16 21:49:29 +01:00
Marc Kleine-Budde d6f04bf3c8 arm/cpu/Makefile: cleanup: proper indention
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2010-02-16 21:49:18 +01:00
Sascha Hauer e304879aba add armv6 support to the konfig system
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-01 17:25:32 +01:00
Sascha Hauer 922bb41a47 remove typedef cmd_tbl_t and replace it with struct command
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-01 17:25:32 +01:00
Sascha Hauer 3f1bf1f058 Use cache functions from kernel
These cache functions have been extracted from
arch/arm/boot/compressed/head.S. The old code only worked
properly on ARMv4. Tested on ARMv4, ARMv5, ARMv6 hardware.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-01 17:23:40 +01:00
Juergen Beisert dac84c7b9d documentation updates
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-15 11:32:02 +01:00
Sascha Hauer a3ffa97f40 rename U-Boot-v2 project to barebox
This has been done with the following script:

find -path ./.git -prune -o -type f -print0 | xargs -0 -r sed -i \
	-e 's/u2boot/barebox/g' \
	-e 's/U2Boot/barebox/g' \
	-e 's/U-boot V2/barebox/g' \
	-e 's/u-boot v2/barebox/g' \
	-e 's/U-Boot V2/barebox/g' \
	-e 's/U-Boot-v2/barebox/g' \
	-e 's/U_BOOT/BAREBOX/g' \
	-e 's/UBOOT/BAREBOX/g' \
	-e 's/uboot/barebox/g' \
	-e 's/u-boot/barebox/g' \
	-e 's/u_boot/barebox/g' \
	-e 's/U-Boot/barebox/g' \
	-e 's/U-boot/barebox/g' \
	-e 's/U-BOOT/barebox/g'

find -path ./.git -prune -o \( -name "*u-boot*" -o -name "*uboot*" -o -name "*u_boot*" \) -print0 | \
	xargs -0 -r rename 's/u[-_]?boot/barebox/'

It needs some manual fixup following in the next patch

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-15 10:18:30 +01:00
Juergen Beisert f522d42597 Some doxygen related fixes
Nishanth Menon wrote:
> no signed off by and no diffstat?

Ups.

> can you use git-format-patch to send please? it is easier to review.

Sure. Here it comes:

jbe

------8<---------8<---------8<---------8<---------8<---------8<----

Subject: [PATCH] Some doxygen related fixes:
  - fix a few doxygen comments that are used in a wrong way
  - move some pages and their content to a better place in the
    generated documentation

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-14 09:43:02 +01:00
Jean-Christophe PLAGNIOL-VILLARD a4292fe7cf arm: add endian config support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-11-03 09:47:32 +01:00
Jean-Christophe PLAGNIOL-VILLARD bab3a3b976 arm: introduce CPU CONFIG from linux
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-11-03 09:45:55 +01:00
Sascha Hauer 420a3173f0 commands: remove maxargs
No need to check for maximum argument counts. The commands are
safe to be called with more arguments, so lets safe some bytes.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-19 16:18:33 +02:00
Sascha Hauer 3820307eb0 rename dma macros
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-09-25 13:34:57 +02:00
Sascha Hauer fd18bc87c2 use _stext instead of TEXT_BASE
When checking if we have to relocate ourselves, use _stext instead
of TEXT_BASE. TEXT_BASE might be the location of a pre image header.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-09-08 12:42:55 +02:00
Sascha Hauer e2c8e8a180 Add MMU support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-08-19 10:51:30 +02:00
Sascha Hauer 66457f42e4 return is not a function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-08-18 15:44:53 +02:00
Sascha Hauer 0b5a776c1e Shutdown U-Boot before starting an OS
Some devices, especially the ones doing DMA should be disabled before
giving control to an OS. We take the simple approach here: Just shutdown
the devices in the reverse order they were activated.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-03-19 12:21:18 +01:00
Sascha Hauer a03d8b82df Fix Exception handling
Uh, oh, some copy paste bug which existed for nearly 2 years now

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-02-20 18:24:36 +01:00
Sascha Hauer 8d62c1f629 ARM: Add simple icache enable/disable command
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-02-06 14:44:46 +01:00
Sascha Hauer bee65f0d3f [ARM] Add MX35 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-02-06 14:44:46 +01:00
Sascha Hauer b07e9e3194 ARM: Add cpuinfo command
This command is useful to show some information about
cp15 registers

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-01-13 14:32:22 +01:00
Sascha Hauer 3f65e8a398 ARM startup code: Whitespace changes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-13 16:52:13 +02:00
Sascha Hauer c3be23d9a3 ARM startup: move exception handler to extra file
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-08-13 16:52:13 +02:00
Sascha Hauer 5fef327aaf remove start-intcm.S. it is currently unused and broken 2008-06-06 09:30:47 +02:00
Nishanth Menon 053034d182 010-OMAP-addbase
[Patch 10/17] U-Boot-V2:ARM:OMAP3: Add support for OMAP and Cortex A8

This patch adds support for OMAP3 platforms. Mainly to setup the infrastructure.
ARMV7 requires a different I/D cache cleanup code which is introduced in this patch

Signed-off-by: Nishanth Menon<x0nishan@ti.com>
2008-06-05 19:45:28 +02:00
Nishanth Menon 9a364f5157 001-arch-config
[Patch 01/17][Try 3] U-Boot-V2: ARM: Add ARCH lowlevel Init

This Patch adds CONFIG_ARCH_HAS_LOWLEVEL_INIT as discussed in thread
http://www.nabble.com/-Patch--U-Boot-V2%3A-Introduce-CONFIG_ARCH_HAS_INIT_LOWLEVEL-to17134638.html#a17188894

Signed-off-by: Nishanth Menon<x0nishan@ti.com>
2008-06-05 19:45:03 +02:00
Sascha Hauer 596c845072 [memory layout]: streamline memory layout
Memory layout can now be specified via kconfig options. Two
possibilities exist: default layout means the layout is stack
/ malloc heap / U-Boot. The user can also specify fixed addresses
for each TEXT_BASE / stack / malloc heap.
2008-06-04 11:54:03 +02:00
Menon, Nishanth cb73b0c227 Change CONFIG_SKIP_LOWLEVEL_INIT to CONFIG_MACH_DO_LOWLEVEL_INIT
as we rather use positive logic. Make it dependent on boards that
have it rather than on ARM

Signed-off-by: Nishanth Menon <x0nishan@ti.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-05-12 11:35:15 +02:00
Sascha Hauer d5a9d7dc1d start-arm.S is not thought to be ARM920 specific. reflect this in the comment. 2008-05-07 16:25:46 +02:00
Nishanth Menon 3b94eca260 Replace start-arm920t.S with start-arm.S
Replace start-arm920t.S with start-arm.S. This will allow for a common logic
to handle 

Signed-off-by: Nishanth Menon <x0nishan@ti.com>

--
2008-05-07 16:24:51 +02:00
Robert Schwebel 0fb3ec4e7e remove warnings
This patch fixes the following warnings:

arch/arm/cpu/cpu.c:176:4: warning: no newline at end of file
commands/bootm.c:872:4: warning: no newline at end of file

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
2007-11-27 21:32:33 +01:00
Juergen Beisert 4cd877a840 saving added docu 2007-11-05 14:39:07 +01:00
Juergen Beisert 3be8ed2fa1 adding i.MX31 CPU support 2007-10-17 17:57:55 +02:00
sascha 825ad81490 arm: use text_entry for reset vector instead of hardcoded filename
(once again)
2007-10-17 11:10:57 +02:00
sascha 520e857b20 no need to have CONFIG_SKIP_RELOCATE_UBOOT 2007-10-16 14:46:53 +02:00
sascha 0d26cc5df1 remove s3c24x0 specific stuff from arm start file, add
arch_init_lowlevel for this stuff instead.
2007-10-16 11:39:15 +02:00
Sascha Hauer 1cdc2fe996 consolidate arch/arm/cpu/start-arm920t.S and arch/arm/cpu/start-arm926ejs.S 2007-09-05 12:50:28 +02:00
Sascha Hauer 7989a989b9 arm: use linker section for reset vector
Put the reset vector at the beginning of the binary by creating
its own section in the linker script rather than specifying the
file.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Acked-by:      Sascha Hauer <s.hauer@pengutronix.de>
2007-07-25 12:34:06 +02:00
Sascha Hauer 3b4647f772 _armboot_start -> _u_boot_start 2007-07-12 11:52:12 +02:00
Sascha Hauer 862486e6d4 svn_rev_705 2007-07-05 18:02:19 +02:00
Sascha Hauer 9afd20bdb0 svn_rev_693
remove do_reset
2007-07-05 18:02:18 +02:00
Sascha Hauer 3b4bad17b3 svn_rev_664 2007-07-05 18:02:15 +02:00
Sascha Hauer bb0ad146b5 svn_rev_631 2007-07-05 18:02:11 +02:00
Sascha Hauer d0778154ed svn_rev_630 2007-07-05 18:02:11 +02:00
Sascha Hauer f445d20103 svn_rev_496 2007-07-05 18:01:59 +02:00
Sascha Hauer 209ebd63fd svn_rev_495 2007-07-05 18:01:59 +02:00
Sascha Hauer 9a958adf07 svn_rev_494 2007-07-05 18:01:58 +02:00