9
0
Fork 0
Commit Graph

63 Commits

Author SHA1 Message Date
Sascha Hauer b3a667cd84 remove unused boot-menu-add-entry
The boot-menu-add-entry script no longer exists. Remove it from
boot scripts.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-23 09:19:52 +02:00
Lucas Stach 4f381b1aaa ARM: change signature of barebox_arm_entry
Mostly to make it clear that boarddata needs to be
something we can dereference.

As this is a pretty invasive change, use the opportunity
to make the signature 64bit safe.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-05 15:09:09 +02:00
Sascha Hauer cee2a60c56 ARM: remove armlinux_set_bootparams() calls from boards
As the place for the atags now is determined automatically the call
from the boards can be removed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-06 14:25:05 +01:00
Sascha Hauer 7f6b6d25d8 Merge branch 'for-next/omap'
Conflicts:
	arch/arm/boards/pcm051/env/config
2013-09-05 10:40:04 +02:00
Sascha Hauer 1729b1798e Merge branch 'for-next/boardinfo'
Conflicts:
	arch/mips/boards/qemu-malta/init.c
	commands/bootm.c
	drivers/of/base.c
2013-09-05 10:39:22 +02:00
Sascha Hauer 65504828dd ARM: omap: fix omap_save_bootinfo
omap_save_bootinfo derefences the argument passed to barebox without
checking it for validity. This breaks 2nd stage booting where r0
is undefined. The best we can do is to check whether the pointer is
somewhere in SRAM and is word aligned. This at least makes sure that
we do not oops. This introduces SoC specific xxx_save_bootinfo variants
since the SRAM addresses/sizes differ between SoCs.

Additionally fix the prototype for omap_save_bootinfo. It uses r0, so
it must be passed this variable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-27 07:12:33 +02:00
Sascha Hauer 1081856788 ARM: include <gpio.h> instead of <mach/gpio.h>
The gpio api should be used from <gpio.h>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-16 15:58:33 +02:00
Sascha Hauer 068bed22a6 Set model and hostname at boardlevel
With multiboard support the compiletime generated BOARDINFO string
gets more and more meaningless. This removes it from Kconfig and
replaces it with a variable that can be set at boardlevel.

Also many boards have a standard setting for the hostname in the
environment. This patch also moves the standard to C code by calling
barebox_set_hostname().

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-16 08:40:55 +02: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 Weitzel 88796b1a99 omap4: set voltage according to mpu freq
For OMAP4460 omap4_scale_vcores must set the voltage according to mpu freq.

OPP100  700MHz 1210mV
OPPTB   920MHz 1320mV
OPPNT  1200MHz 1380mV

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-18 21:33:55 +02:00
Alexander Shiyan 90c94f4483 Remove unused config.h
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-09 08:42:52 +02:00
Teresa Gámez c1bea6f4ed OMAP: Add option to use environment from MMC
Make loading environment from MMC generic for all OMAP.

Tested on AM335x, OMAP4.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Tested-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-03 09:21:13 +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
Jean-Christophe PLAGNIOL-VILLARD 0d8ce86780 switch boards to lwl-y
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-21 14:42:51 +01:00
Sascha Hauer e55f9d10b4 defenv2: move config-board out of /env/init
Having the board config file in /env/init has the problem that
the settings in /env/config are overwritten in the init sequence.

This moves the config-board files to /env/ and sources them explicitly
from /env/bin/init before sourcing /env/config

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 08:50:43 +01:00
Jean-Christophe PLAGNIOL-VILLARD c49819d903 arm: rename reset and common_reset to barebox_arm_reset_vector and 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>
2013-02-08 09:35:40 +01:00
Sascha Hauer 1c240cd234 ARM OMAP boards: switch to barebox_arm_entry
All boards use hardcoded SDRAM addresses, copied from the board init file.
OMAP3 boards are a bit special, they had a SoC specific reset() function. This
is renamed to omap3_invalidate_dcache() and called from the board lowlevel init
code now.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:39 +01:00
Sascha Hauer 0c97dd0061 move prototypes for envfs_* to envfs.h
environment.h is for environment variables, not for the environment
storage (envfs), so move the prototypes to envfs.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-20 16:31:51 +01:00
Sascha Hauer 958eaf4c9d ARM panda: do not set gpio direction of heartbeat LED
We now have gpio_request. When we call gpio_direction_output before
registering a led_gpio the gpio will be implicitely requested by the
gpio core. gpio_request in the led core will then fail resulting in
an unregistered LED.
Fix this by removing the call to gpio_direction_output. The LED core
will do this anyway.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-14 13:40:52 +01:00
Teresa Gámez 8eb8f4f77e ARM OMAP: Apply EHCI device register functions
Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-21 08:31:19 +01:00
Teresa Gámez fb5dcbefe7 ARM OMAP: Apply RAM device register functions to boards
Apply RAM and SRAM register functions to all OMAP boards.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-21 08:30:37 +01:00
Sascha Hauer 5536071392 ARM omap4: Use device register functions in boards
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-19 21:52:36 +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
Vicente beff13a41c omap4: add rename definitions to match datasheet
Signed-off-by: Vicente <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-16 15:31:51 +01:00
Sascha Hauer 154496f736 Merge branch 'for-next/omap' 2012-11-16 14:02:49 +01:00
Sascha Hauer 663c466794 ARM OMAP4 panda: switch to new environment
Switch to new environment and add the bootscripts needed for mmc. Also,
update defconfig for new environment.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-02 22:15:15 +01:00
Sascha Hauer 8b609af14c ARM: introduce arm_setup_stack function and use it
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>
2012-10-13 14:17:31 +02:00
vicencb@gmail.com 9cb32d1d58 regression: reset can not return
Signed-off-by: vj <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-07 11:40:07 +02:00
Sascha Hauer 638e059aba Merge branch 'for-next/arm-board-reset'
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
2012-10-03 21:19:30 +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
Jean-Christophe PLAGNIOL-VILLARD 8166603baa defaultenv: switch hostname to global.hostname
Udpate dhcp with it too.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-02 08:57:07 +02:00
Jan Luebbe faf7b7af6e ARM: give boards control of the reset entry point
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>
2012-09-27 19:30:04 +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
Sascha Hauer bed1a6ffab Merge branch 'for-next/pbl' 2012-09-05 12:59:29 +02:00
Sascha Hauer b40aeb00d3 Merge branch 'for-next/omap' 2012-09-05 12:59:29 +02:00
Jan Weitzel 4d5850ff9e OMAP4460: clock init
Change clock init to allow early gpio access. Add support for 4460 clocks.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-14 22:01:33 +02:00
Jan Weitzel d1d6369a56 Add support for OMAP4460 TPS62361
based on: [U-Boot] [PATCH v 4/5] omap4: support TPS programming
TPS62361 is the new power supply used in OMAP4460 that
supplies vdd_mpu.

VCORE1 from Phoenix supplies vdd_core and VCORE2 supplies
vdd_iva. VCORE3 is not used in OMAP4460.

Signed-off-by: F. Gasnier fabrice.gasnier@cenosys.com
Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-14 22:01:33 +02:00
Sascha Hauer 95423f8af2 ARM boards: Make boards pbl safe
With pbl support enabled most boards need a pbl-y for their lowlevel
stuff.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-12 22:23:22 +02:00
Jean-Christophe PLAGNIOL-VILLARD a231dcdf78 devices: fix missing conversion to DEVICE_ID_DYNAMIC
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-12 14:48:28 +02:00
Sascha Hauer 497d1c49f4 Merge branch 'next' 2012-06-06 14:11:57 +02:00
Anand Gadiyar b53c3e5c4a panda: add LED support
Register GPIO7 as heartbeat LED, same as in the linux kernel.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-21 21:40:33 +02:00
Anand Gadiyar 0da6a0f064 panda: add i2c and twlcore to panda
Add i2c-omap and twlcore driver to panda board.
(Based on similar patch for pcm049).

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-21 21:40:33 +02:00
Anand Gadiyar 310a19bf68 panda: fix crash when not using barebox as second stage
If barebox is not used as the MLO, then it crashes during boot
with the below error message:

Board: Texas Instrument's Panda
PandaBoard Revision: 003
omap-hsmmc@mci0: registered as mci0
unable to handle paging request at address 0x4a064010
pc : [<8f01e820>]    lr : [<8f0049a0>]
sp : 8cffff80  ip : 00000016  fp : 00100103
r10: 00000000  r9 : 00000ae7  r8 : 4030b76c
r7 : 40300200  r6 : e28f8028  r5 : 0000003e  r4 : 00000000
r3 : 4a064000  r2 : 00000014  r1 : 00000001  r0 : 00000001
Flags: nzCv  IRQs off  FIQs off  Mode SVC_32
[<8f01e820>] (panda_devices_init+0x17c/0x1e0) from [<8f006300>] (start_barebox+0x18/0x10c)
[<8f006300>] (start_barebox+0x18/0x10c) from [<8200006c>] (0x8200006c)

[<8f021248>] (unwind_backtrace+0x0/0x98) from [<8f011a00>] (panic+0x28/0x3c)
[<8f011a00>] (panic+0x28/0x3c) from [<8f02171c>] (do_exception+0x10/0x14)
[<8f02171c>] (do_exception+0x10/0x14) from [<8f021784>] (do_data_abort+0x2c/0x38)
[<8f021784>] (do_data_abort+0x2c/0x38) from [<8f021470>] (data_abort+0x50/0x60)

This is because the USBHOST module is not enabled. The module enable
is is normally done in mach-omap/xload.c which never gets called.

Since we're configuring the USBHOST CLKCTRL register in the board file
anyway, we might as well explicitly enable the module in the same place.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-21 21:39:38 +02:00
Jean-Christophe PLAGNIOL-VILLARD a2d2e8868f config: switch machine to hostname
So we can use it for dhcp request too.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-18 12:03:58 +02:00
Sascha Hauer abe4560c8a Use DEVICE_ID_DYNAMIC where applicable
We now have DEVICE_ID_DYNAMIC for dynamic allocation of device ids,
Use it where applicable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-16 09:43:02 +02:00
Jan Weitzel 4cf35a6c6d omap: move do_set_mux to omap4_generic
do_set_mux is used by two boards.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-03-07 09:55:45 +01:00
Jan Weitzel f3ef74832a omap: move scale_vcores to omap4_generic
scale_vcores is used by two boards.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-03-07 09:55:45 +01:00
Sascha Hauer 52fac4b1ff defaultenv: simplify boot
Now that we have a bootm command which boots everything we can
simplify the defaultenvironment. We can call bootm on every
image type and can remove the kernelimage_type variables.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-15 11:07:15 +01:00
Sanjeev Premi b2e9356130 omap: Unify run_shell() in xload configuration
Currently, there are multiple definitions of run_shell()
for each board that can be build in "xload" configuration.
Now there is only one function used by all boards.

The functions defined in xload.c are used only when "xload"
configuration used; but it gets compiled unconditionally.
This has been fixed as well.

Signed-off-by: Sanjeev Premi <premi@ti.com>
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 12:07:14 +01:00
Sascha Hauer 597da1b76e Merge branch 'next' 2011-10-09 03:58:49 +02:00