9
0
Fork 0
Commit Graph

7713 Commits

Author SHA1 Message Date
Sascha Hauer bed8fb6de1 Add in-system barebox update infrastructure
Currently in-system update means to write an arbitrary file to
an arbitrary device. There is no sanity check if the flashed image
is of the right type or will fit onto the device. Furthermore some
SoCs need a special preparation step for their images before
flashing them.

This adds a barebox in-system update infrastructure. Boards can
register update handlers which know how to make the board bootable.
The available handlers can be listed to be able to select one,
different force levels give the user the chance to know it better.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:23:41 +02:00
Sascha Hauer 73e56c3489 ARM i.MX Karo tx53: Add env depending on bootsource
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:58 +02:00
Sascha Hauer 7b84676763 ARM i.MX53: set bootsource location
To be able to set the environment location based on the
bootsource.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:58 +02:00
Sascha Hauer 3bbe8a9ea4 ARM i.MX tx53: Add rev xx30 board support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:58 +02:00
Sascha Hauer 4ad34853f1 ARM i.MX53: enable imx53_init_lowlevel for pbl
The KARO Tx53 board in the revision 8030 has an instable SDRAM
setup. It works as long as the MMU is disabled, but the board
crashes at arbitrary places once the MMU gets enabled. So we
need the PLL setup early. Enable it for pbl.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:58 +02:00
Sascha Hauer b1b76f6027 ARM i.MX: get rid of imx-regs.h
- remove now unused __REG definitions
- include individual SoC register files instead of imx-regs.h
- move IMX_GPIO_NR to generic.h
- finally remove imx-regs.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02:00
Sascha Hauer ee372b8f28 ARM i.MX27: remove duplicate ESDCTL registers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02:00
Sascha Hauer 86d9ed1cc5 ARM i.MX27: move PCCR gate registers to its only user
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02:00
Sascha Hauer 6a9d37e579 ARM i.MX27: Cleanup remaining unprefixed registers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02:00
Sascha Hauer 11b1757937 ARM i.MX21: Cleanup remaining unprefixed registers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02:00
Sascha Hauer 926cccc9d5 ARM i.MX1: Cleanup remaining unprefixed registers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02:00
Sascha Hauer 4c53af062b ARM i.MX: remove unused improperly prefixed register defines
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02:00
Sascha Hauer d089e3caa5 ARM i.MX external nand boot: Use SoC specific base addresses
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02:00
Sascha Hauer dc9d70e239 ARM i.MX35: Cleanup remaining unprefixed registers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02:00
Sascha Hauer 1092bde80c ARM i.MX25: Cleanup remaining unprefixed registers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:01 +02:00
Sascha Hauer a8c6359667 ARM i.MX31: Cleanup remaining unprefixed registers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:01 +02:00
Sascha Hauer 632b04f8a6 ARM i.MX nand layout: make multisoc safe
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:01 +02:00
Sascha Hauer 7a334ccdec ARM i.MX: Use SoC specific base to access sdram controller registers
This redefines the sdram controller registers as offsets to the base
rather than as absolute addresses. All users are fixed to use the
SoC specific base address.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:01 +02:00
Sascha Hauer aaad5cbad7 Merge branch 'for-next/clk' into for-next/imx
Conflicts:
	drivers/net/fec_imx.c
2012-10-17 20:21:46 +02:00
Sascha Hauer 09efce4ad3 Merge branch 'for-next/imx-work' into for-next/imx
Conflicts:
	arch/arm/mach-imx/imx1.c

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 08:49:18 +02:00
Sascha Hauer e6f224a553 Merge branch 'for-next/imx-watchdog' into for-next/imx 2012-10-17 08:49:00 +02:00
Sascha Hauer f393758c53 Merge branch 'for-next/imx-dt' into for-next/imx 2012-10-17 08:48:54 +02:00
Sascha Hauer f99ea5c9d8 ARM samsung S5P: Enable board support
This was once disabled because we had no board support. This has
changed, so enable the S5P board support in the config so that
the friendlyarm_tiny210_defconfig actually builds for the correct
machine.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-15 19:47:01 +02:00
Sascha Hauer c65edd657d ARM a9m2440: Fix lowlevel init
board_init_lowlevel is no longer called from generic code, so we can't
just return from in. Instead we have to jump to board_init_lowlevel_return
manually. For the a9m2440 board one case was missed to convert. This
is broken since:

| commit faf7b7af6e
| Author: Jan Luebbe <jlu@pengutronix.de>
| Date:   Mon Sep 24 10:18:34 2012 +0200
|
|     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: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-15 19:46:56 +02:00
Sascha Hauer f36c792109 ARM i.MX: Print silicon revision in common place
Rather than doing this in the SoC specific code just print
it in imx_set_silicon_revision. This saves some lines of code
and also results in i.MX27 now also having the silicon revision
printed during startup.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-15 19:44:36 +02:00
Sascha Hauer a029e32d7f ARM i.MX: rework bootsource setting
This moves the known i.MX bootsource settings to a single file
so that the code can be shared. Also we add a enum for the different
boot sources so that it can be used in C Code and not only on the shell.
The pcm038 board is changed to use it instead of digging in the registers
manually.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-15 19:44:36 +02:00
Jean-Christophe PLAGNIOL-VILLARD 840d4858d0 designware: fix 100mps phy support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-15 08:54:14 +02:00
Carlo Caione 7423f13ff7 cosmetic: extra new line in automount usage command
Signed-off-by: Carlo Caione <carlo.caione@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-13 20:20:17 +02:00
Alexander Aring 461e7d7aef mtd-core: add writesize in MEMGETINFO ioctl
Add writesize in MEMGETINFO ioctl.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-13 14:30:50 +02:00
Alexander Aring 8ce5311b20 documentation: add sandbox malloc argument
Add malloc argument in doxygen comment.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-13 14:29:50 +02:00
Alexander Aring 9322d469a5 sandbox: fix malloc argument string
Fix malloc argument string.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-13 14:29:18 +02:00
Alexander Aring ade31926f4 sandbox: move add_image for env in second getopt
Function add_image needs a allocated malloc space.
This is only available in the second getopt loop.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-13 14:29:18 +02:00
Sascha Hauer 501ca464e2 platform driver: Drop check for resource conflicts
The check is wrong since it would have to check whether the
new iomem region overlaps with an existing region. Checking
for the base address only is not enough.
Currently this is not possible because every device conflicts
with the top iomem region which covers the whole address space.

This at least fixes the regression that devices whose memory region
begins at 0x0 can no longer be succesfully registered.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Alexander Shiyan <shc_work@mail.ru>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-13 14:19:35 +02:00
Sascha Hauer 68e3e14a64 defaultenv: dependencies fixes
When a build with a compressed default environment is done and then
environment compression is disabled, barebox_default_env.h is not
regenerated because its dependency (now barebox_default_env) is still
up to date. This results in a corrupt default environment.

This patch fixes this by adding a cmd_env_h and changing barebox_default_env.h
to FORCE. As a side effect barebox_default_env.h is no longer generated in
include/generated/ but in common/ as we have to add barebox_default_env.h to
$(targets) (extra-y).

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-12 18:40:02 +02:00
Sascha Hauer ca2520ed55 Makefile: Add missing force for barebox-flash-image
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-12 18:39:25 +02:00
Franck Jullien cbe3457dd8 common/paritions.c: force little endian reads
When reading values from a DOS disk, we need to force a little endian
reading.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-12 10:07:23 +02:00
Jan Luebbe 0502e3db73 defaultenv-2: boot: add missing space in error message
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-12 10:03:56 +02:00
Jan Luebbe 0b78902b01 parameter: fix memory leak
In __dev_add_param, the name string is allocated using strdup.
Free it when removing the parameter.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-12 10:01:27 +02:00
Alexander Shiyan f9df22b002 Add more generated files to .gitignore
This patch adds at least one more generated file to .gitignore list:

shc@shc /home/git/bb_clps3 $ git status
# On branch my
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       barebox-flash-image

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 11:34:15 +02:00
Sascha Hauer a4c8692240 ARM i.MX: Enable clocks in common place
On i.MX we enable all necessary clocks during startup of the clock
controller driver, so we do not need the register hacking in the drivers
anymore.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:51 +02:00
Sascha Hauer 0ea2ee7866 video i.MX: Use regular clk_[en|dis]able functions
This controller has no enable bit. It is always on once the
pixel clock is provided. This patch switches the driver to use
regular clk functions instead of SoC specific register hacking.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:51 +02:00
Sascha Hauer beda98485c ARM i.MX25: Add lcdc per gate
This gate is used to enable/disable the lcd controller, hence we
need a gate for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:51 +02:00
Sascha Hauer c1cc2c2f55 ARM i.MX27: Add lcdc per gate
This gate is used to enable/disable the lcd controller, hence we
need a gate for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:51 +02:00
Sascha Hauer 1563d42c42 ARM i.MX21: Add lcdc per gate
This gate is used to enable/disable the lcd controller, hence we
need a gate for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:51 +02:00
Sascha Hauer 71ca72c4e4 ARM i.MX21: Enable all needed clocks during startup
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:51 +02:00
Sascha Hauer aab96efadc ARM i.MX21: Fix CSPI parent clock
It's perclk2, not perclk3

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:51 +02:00
Sascha Hauer 0b177de1a4 ARM i.MX: Add clk_gate inline function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:51 +02:00
Sascha Hauer 477b665671 clk: Add clk gate support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:51 +02:00
Sascha Hauer cec48e77b8 ARM i.MX25: Enable all needed clocks during startup
This enables the following clocks on i.MX25:

PER: esdhc1, esdhc2, i2c, nfc, owire, pwm, uart
AHB: emi, esdhc1, esdhc2, fec, lcdc, usbotg
IPG: cspi1, cspi2, cspi3, esdhc1, esdhc2, fec, gpt1, gpt2, gpt3, gpt4,
iim, LCDC_EN, pwm1, pwm2, pwm3, pwm4, spba, tsc, uart1, uart2, uart3,
uart4, uart5

These are hopefully all the clocks we need for barebox.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:38 +02:00
Vicente 8083e2e024 bootm: close open files
Signed-off-by: Vicente <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:29:58 +02:00