9
0
Fork 0
Commit Graph

40 Commits

Author SHA1 Message Date
Sascha Hauer ee7f5d5d50 ARM: OMAP: Safe boot info in fixed SRAM address
Storing the boot information in the image itself and passing a pointer
around between images is cumbersome and doesn't fit well with multiimage
support where the pointer we pass around is already occupied by the
devicetree.
Do the same as U-Boot does and store the boot information at the bottom
of the SRAM public stack.
To maintain the compatibility between new xloaders and older barebox
binaries we still pass the boot information to the next stage via pointer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-10 14:35:34 +01:00
Sascha Hauer e0fbce20e6 ARM: OMAP: centralize omap startup
This introduces a single omap_init function which detects the
SoC and does all further SoC initialization. This is done to get
rid of initcalls without proper SoC protection. The same has been
done for i.MX already.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 21:34:06 +01:00
Sascha Hauer f56a48471a ARM: OMAP: select correct reset_cpu function at runtime
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 11:25:01 +01:00
Sascha Hauer f6b399ef9b ARM: OMAP: Add SoC prefix to running_in_* functions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 11:24:42 +01:00
Teresa Gámez c5c875ab7f arm: omap: store boot source info from ROM loader
The ROM loader passes the address of a buffer to the MLO in
register 0. Store this data so we can find the boot source later.
On the same way the bootinformation are passed to the barebox,
then. It has to be enshured that r0 contains always the
buffer or the boot source detection will not work.

Applied this on all OMAPs. This patch is based on work of
Jan Luebbe <jlu@pengutronix.de>.

Compile tested on all OMAP boards.
Tested on pcm049, phyCARD-A-L1 and pcm051.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Tested-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-10 23:30:42 +02:00
Jan Luebbe d7a913469c omap: move to common bootsource framework
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Folded fix into this patch:

[PATCH] omap4 regression: set correct boot source

Signed-off-by: Vicente Bergas <vicencb@gmail.com>
2013-04-18 08:01:26 +02:00
Teresa Gámez c61cc98091 OMAP: Move bootsource functions
The bootsource functions are not specific to the first stage
bootloader. They may also be used for detecting the
bootsource to decide where to load the environment from.

Also clean up includes in board files.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-03 09:21:12 +02:00
Sascha Hauer b7451329b5 ARM: OMAP3: invalidate L2 cache using ROM API
Code taken from U-Boot. This makes the beagle board much more
reliable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-04 17:00:23 +01:00
Sascha Hauer 95f4112191 ARM omap3: Add change OMAP_ prefix to OMAP3_ for registers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-20 11:43:05 +01:00
Sascha Hauer 19b6121a56 ARM omap: include individual SoC files
- remove mach/silicon.h and include omap?-silicon.h directly
- include mach/omap?-clock.h directly where needed

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-19 21:51:49 +01:00
Sascha Hauer fa96d920a5 ARM omap3: make PRM defines SoC specific
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-19 21:51:49 +01:00
Sascha Hauer 91a13beea9 ARM omap: remove unused function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-19 21:51:48 +01:00
Sascha Hauer 759946809a Merge branch 'for-next/omap' 2012-12-07 16:43:16 +01:00
Robert P. J. Day c7f45d762d Remove old, inaccurate "FileName:" cruft from ARM files
In addition, collapse adjacent comment blocks into one and remove
extraneous blank lines.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-05 19:51:14 +01:00
Robert P. J. Day b11f70db16 OMAP3: Replace magic GPIO numbers in omap3_generic.c with macros.
Based on following lines in omap3-silicon.h:

#define OMAP_L4_WKUP_BASE       0x48300000
#define OMAP_L4_PER_BASE        0x49000000
... snip ...
#define OMAP_GPIO1_BASE         (OMAP_L4_WKUP_BASE + 0x10000)
#define OMAP_GPIO2_BASE         (OMAP_L4_PER_BASE + 0x50000)
#define OMAP_GPIO3_BASE         (OMAP_L4_PER_BASE + 0x52000)
#define OMAP_GPIO4_BASE         (OMAP_L4_PER_BASE + 0x54000)
#define OMAP_GPIO5_BASE         (OMAP_L4_PER_BASE + 0x56000)
#define OMAP_GPIO6_BASE         (OMAP_L4_PER_BASE + 0x58000)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-05 10:37:35 +01:00
Sascha Hauer 89d6164660 ARM omap: pbl fixes
Omap3 pbl build may need omap3_clock.c. Also, do not use add_generic_device
in pbl

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:56:12 +02:00
Teresa Gámez 7764b1faca ARM OMAP: change region size for gpio banks
- increased the region size for OMAP3, as it was not correct
- decrease region size for OMAP4 to prevent overlapping.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-09 20:36:21 +02:00
Sascha Hauer d1e65d2a7b Merge branch 'for-next/remove-fsf-address'
Conflicts:
	drivers/net/miidev.c
	include/miidev.h
2012-10-03 21:12:48 +02:00
Teresa Gámez 29e4031b46 ARM OMAP: switch to gpiolib support
Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-24 21:29:09 +02:00
Sascha Hauer 77322aa896 Treewide: remove address of the Free Software Foundation
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>
2012-09-17 10:57:41 +02:00
Teresa Gámez 1bdce4699f devices-gpmc-nand: Add OMAP4 gpmc nand timings
Add a OMAP4 specific GMPC nand config for pcm049 and phyCARD-A-XL2 to increase
performance. Also add the possiblility to pass a board GPMC nand config.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-03-15 20:55:07 +01:00
Sascha Hauer 8b99fe8956 ARM omap3: reimplement setup_auxcr in pure asm
This function consists of only inline asm statements, so
use assembly in the first place. Also makes sure that the
function is compiled in arm mode.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Sanjeev Premi <premi@ti.com>
2012-01-17 18:50:50 +01:00
Sascha Hauer ae2ac15105 ARM omap3: call a_init from board code
There is no need to call a_init before relocation, so rename
the function to omap3_core_init and call it from board code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Sanjeev Premi <premi@ti.com>
2012-01-17 18:50:36 +01: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
Juergen Kilb 801c667d8c Added helper function to get CS1 base address.
This helper function can be used for automatic
SDDR configuration based on register settings
made by a previously first stage bootloader
i.e. x-loader.

Signed-off-by: Juergen Kilb <J.Kilb@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-12 12:31:08 +02:00
Juergen Kilb 9c2a525398 Add Reset Support for omap3.
Inspired from reset_cpu in omap4_generic.c.

Signed-off-by: Juergen Kilb <j.kilb@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-12 12:31:08 +02:00
Sascha Hauer 1cf3936829 ARM omap: add xload helper functions
Add some common xload helper functions to determine the boot source
on omap3/4 and to load images from mmc and nand.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-12 09:54:57 +02:00
Sascha Hauer bd29dfd5f7 ARM omap: move uart access functions to a more generic place
These functions can be used on omap4 aswell, so move them to
omap.c

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-04 15:10:15 +02:00
Sanjeev Premi 82884c2b31 omap36x: Detect silicon revisions
This patch adds support to detect the different
OMAP36XX silicon revisions.

Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-05 11:05:25 +01:00
Sanjeev Premi 752fd26153 omap36x: Add support for dynamic detection
This patch adds the support to detect OMAP3630.

It also re-organizes the CPU_xxxx definitions in sys_info.h
to ascending order so that newer silicons can be added at
bottom.

Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-05 11:05:25 +01:00
Sanjeev Premi 0bb8b98624 omap3: Update method to detect si revision
This patch ensures that all silicon revisions
are detected. (Current implementation cannot
detect ES1.0).

In the process, the 'seemingly' hardcoded macros
identifying cpu revision (e.g. CPU_ES1P1) have
been updated to include the CPU name as well.
(The mapping of IDCODE value to silicon revision
may not be same across different OMAP families).

Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-03 12:45:42 +01:00
Sanjeev Premi 0c49e7056c omap3: Detect cpu based on hawkeye
This patch sets the cpu type based on the hawkeye value
read from the IDCODE register. So far, cpu type was
hardcoded.

Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-03 12:45:42 +01:00
Sanjeev Premi 7e4e7b0d01 omap3: Add macros to extract hawkeye and version
This patch adds macros to extract the hawkeye
and version number from IDCODE value.

Updated function get_cpu_rev() to use new macro.

Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-03 12:45:42 +01:00
Robert Schwebel 724d3d8672 reset_cpu: unify declaration
include/common.h declares this as "unsigned long addr", so we unify it.
This also silences a doxygen warning.

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-22 20:47:02 +02:00
Sascha Hauer e11c07c339 make reset_cpu a __noreturn function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-30 14:15:03 +02:00
Sascha Hauer 9491ec7800 Cleanup colleteral damage from renaming
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-15 10:19:08 +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
Jean-Christophe PLAGNIOL-VILLARD f6a579da9c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-10-22 14:21:25 +02:00
Juergen Beisert cd175ec7d2 Remove all ARM __raw_* functions. They are mixed all over
the place. This clean up all ARM architectures to use only one set
of io functions.

Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
2009-07-01 14:35:35 +02:00
Nishanth Menon 5e4390fef3 011-OMAP-add-silicon
[Patch 11/17] U-Boot-V2:ARM:OMAP3: Add support for OMAP3 Silicon files

This patch introduces support for OMAP3430 - provides for generic OMAP3 files.

Signed-off-by: Nishanth Menon<x0nishan@ti.com>
2008-06-05 19:45:32 +02:00