9
0
Fork 0
Commit Graph

7741 Commits

Author SHA1 Message Date
Jean-Christophe PLAGNIOL-VILLARD 4676721b30 defaultenv: enable glovalvar support
This will allow to do not have 2 set of var for defaultenv and the new
defaultenv-2.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-02 08:57:07 +02:00
Sascha Hauer 47d0240b9c ARM i.MX pca100: Fix nand boot
The following missed to add a jump to board_init_lowlevel_return for the
phycard pca100 board:

| commit 244198ea8b
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date:   Sun Jul 8 18:30:42 2012 +0200
|
|     ARM boards: Use _text rather than TEXT_BASE
|
|     With compressed image support TEXT_BASE will become the base
|     address of the uncompressed image. What the boards want instead
|     is the base address of the decompressor code or, if not compressed,
|     the base address of the uncompressed image. Use _text which is
|     the correct one for both cases.
|
|     Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

This fixes it by adding the jump. Also imx_nand_load_image is directly
called from lowlevel_init.S which fixes compilation with pbl support
enabled.

Tested with both compression enabled and disabled.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-02 08:42:03 +02:00
Jan Luebbe 93ca711e64 scripts: add tool to create image for SPI boot on AM35xx
Booting from SPI on an AM35xx (and possibly other TI SOCs) requires
a special format:

- 32 bit image size in big-endian
- 32 bit load address in big-endian
- binary image converted from little- to big-endian

The mk-am35xx-spi-image tool converts barebox.bin to
this format.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-02 08:22:30 +02:00
Jan Luebbe 46bf132f15 Makefile: add target to produce a SPL compatible uImage
This is mostly useful during the initial port of barebox to a new
board which is supported by u-boot. It also allows starting barebox
from a SRAM-based u-boot SPL.

A different load address can be set like this:
make barebox.uimage UIMAGE_BASE=0x80000000

Also add barebox.ubl to CLEAN_FILES.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-29 13:08:01 +02:00
Sascha Hauer 77fcad6c44 net: remove unused miidev.h
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-29 12:59:36 +02:00
Jan Luebbe 81b5356215 davinci_emac: get rid of mdio wrapper functions
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-29 12:58:18 +02:00
Jan Luebbe 419ae85d44 davinci_emac: adjust to new phylib framework
Also pass flags using platform_data and remove useless casts from void*.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-29 12:58:12 +02:00
Jan Luebbe 76c4c9e48f davinci_emac: return 0 on successful transmit
The _send function should not return the length of the transmitted packet.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-29 12:57:59 +02:00
Sascha Hauer 4062e094db mci imx-esdhc: increase write timeout
The timeout for wating for the bus to be idle is too short when the
card does internal garbage collection. This was triggered with filling
an SD card under Linux with /dev/urandom, then doing a saveenv under
barebox afterwards.
Linux has timeouts here up to 300ms. Use a second to be safe.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-29 12:55:07 +02:00
Jan Luebbe 3fc5a75457 gpio: reduce verbosity while probing
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-28 16:35:10 +02:00
Jan Luebbe bdc3be380f gpio: reduce verbosity while probing
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-28 16:34:21 +02:00
Maxime Ripard 65708cdb04 arm: cfa10036: Add the OCOTP device
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-28 16:31:45 +02:00
Maxime Ripard b987b18435 arm: cfa10036: Add proper resource length
The cfa10036 board file were missing the length parameter when adding
devices. This made barebox crash early in the boot, in the mxs-mci
driver.

Provide the resources lengths in a consistent format.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-28 16:30:07 +02:00
Sascha Hauer 838d48cef4 net: remove old tftp support
The old tftp suppoer has been replaced with filesystem based tftp
support, so remove the old code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-28 16:24:02 +02:00
Sascha Hauer b51a11be84 defconfig: Switch all defconfig to new tftp command
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-28 16:23:55 +02:00
Sascha Hauer 4183b9ab58 net: Add tftp command which uses the new tftp code
Traditionally tftp is a command of its own. Since we can
mount tftp as a filesystem we have duplicated the tftp code, the old
code is used by the tftp command, the new by the filesystem support.
This adds a tftp command based on the filesystem support to preserve
backward compatibility. This allows us to remove the old tftp support
in the next step.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-28 16:23:43 +02:00
Sascha Hauer be6e93dbdf kconfig: remove autogenerated file
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-28 16:22:01 +02:00
Sascha Hauer c8c49c14ae environment generation: Fix dependencies
The dependencies for generating the environment do not work properly:

- If files are removed from the defaultenv, a subsequent make will not
  update the default environment.
- If CONFIG_DEFAULT_ENVIRONMENT_PATH changes, the default environment
  also will not be regenerated.

This patch fixes this by introducing a cmd_env which has the content of
$(ENV_FILES) in the command so that the if_changed mechanism recognizes
a change when $(ENV_FILE) changes. This also results in a nice "  ENV "
string in the build process.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-28 16:21:44 +02:00
Sascha Hauer 1bc0a26188 environment generation: remove unused CLEAN_FILES
The CLEAN_FILES in common/Makefile are unused. All generated files
are removed from the toplevel Makefile.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-28 16:21:38 +02:00
Sascha Hauer c861e4cab6 scripts/bareboxenv: Only print information if -v is given
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-28 16:21:30 +02:00
Sascha Hauer ba8c0a47ae ARM i.MX: add debug for iomux-v3
iomux setup often is the source of great fun. Add some debug printf
for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-28 16:20:13 +02:00
Sascha Hauer b5f4213be6 net: remove unused prototypes for eth_[open|halt]
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-27 23:55:16 +02:00
Sascha Hauer 0dc9de2efd net/eth: fix link handling
Check link status on eth device open time and then periodically
every 5 seconds.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-27 23:55:12 +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 cc1602604d ARM: remove ARCH_HAS_LOWLEVEL_INIT
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>
2012-09-27 19:30:04 +02:00
Sascha Hauer 47940bbe44 ARM OMAP3: rename arch_init_lowlevel to board_init_lowlevel
OMAP3 is the only architecture which has a arch_init_lowlevel in
which it invalidates the dcache. This can easily be done in
board_init_lowlevel aswell. Since on OMAP3 we are always executed
in SRAM we'll never need a board specific lowlevel_init. So the
easiest way of getting rid of this special handling is to just
rename the function.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-27 19:30:04 +02:00
Sascha Hauer 3b455c441a ARM OMAP: remove SRAM stack
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-27 19:30:04 +02:00
Jan Luebbe 0f77ca3c49 spi: switch from printf back to debug
Commit 5888a3b5c9 accidentally changed
this to printf.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-27 07:17:52 +02:00
Jean-Christophe PLAGNIOL-VILLARD 9d73b518fc sandbox: add sdl video support
This will allow speed up the dev on framebuffer.

By default the resolution is VGA but this can be changed via cmdline.

We use a pthread to Flip the screen every 100ms as we can not detect when
barebox update it as barebox simpliy write in a buffer.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-25 10:15:29 +02:00
Sascha Hauer fd5cd6084a ARM: remove ARCH_HAS_LOWLEVEL_INIT
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>
2012-09-25 09:40:55 +02:00
Sascha Hauer be123bd696 ARM OMAP3: rename arch_init_lowlevel to board_init_lowlevel
OMAP3 is the only architecture which has a arch_init_lowlevel in
which it invalidates the dcache. This can easily be done in
board_init_lowlevel aswell. Since on OMAP3 we are always executed
in SRAM we'll never need a board specific lowlevel_init. So the
easiest way of getting rid of this special handling is to just
rename the function.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-25 09:40:55 +02:00
Sascha Hauer 77cbe0a9cf ARM OMAP: remove SRAM stack
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-25 09:40:55 +02:00
Jean-Christophe PLAGNIOL-VILLARD 2263e27814 net: introduce phylib
Adapt phylib from linux

switch all the driver to it
reimplement mii bus

This will allow to have
 - phy drivers
 - to only connect the phy at then opening of the device
 - if the phy is not ready or not up fail on open

Same behaviour as in linux and will allow to share code and simplify porting.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-25 08:18:58 +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
Jean-Christophe PLAGNIOL-VILLARD 31a1e46873 fb: add it's own bus for fb devices
This is need for oftree device probing

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-23 21:15:13 +02:00
Jean-Christophe PLAGNIOL-VILLARD ed942bc085 driver: search device and driver based on the bus instead of all
This will allow reduce the number of driver and device to search on.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-23 21:15:13 +02:00
Jean-Christophe PLAGNIOL-VILLARD 72b0a6503f driver: register bus
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-23 21:15:13 +02:00
Sascha Hauer 33a8fa16c6 ARM i.MX: Add devicetree support for clocksource driver
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-23 21:15:13 +02:00
Sascha Hauer 01bd66c9a2 ARM i.MX: add devicetree support for gpio driver
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-23 21:15:12 +02:00
Sascha Hauer c6fb692a92 mci i.MX esdhc: Add oftree support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-23 21:15:12 +02:00
Sascha Hauer 2790d29b58 cfi-flash: Add devicetree probe support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-23 21:15:12 +02:00
Sascha Hauer 6158ddb716 mfd mc13xxx: Add devicetree support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-23 21:15:12 +02:00
Sascha Hauer 86dcc1754e spi imx: dt support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-23 21:15:12 +02:00
Sascha Hauer 26eab97b41 net fec_mpc5200: Use same platform_data as i.MX fec driver
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-23 20:35:20 +02:00
Sascha Hauer 1af6fdcd03 ARM i.MX51 babbage: update defconfig
Reenable DEFAULT_ENVIRONMENT_GENERIC_NEW which got lost somewhere.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-21 10:33:52 +02:00
Sascha Hauer bf3b7c6a8f mtd mtdraw: fix fixing partial page read
toread is unitialized. We have to use count instead.

| commit 992c291e95
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date:   Sat Sep 15 16:54:47 2012 +0200
|
|    mtd mtdraw: Fix partial page read
|
|    When reading parts of a page we have to limit the maximum bytes copied
|    to the remaining bytes of a page.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-20 09:01:03 +02:00
Franck Jullien 466e505fd9 fs/fat: Handle MBR on the first sector
Use filetype to detect FAT boot sector.
Add support for disk with MBR on the first sector.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-20 08:58:00 +02:00
Franck Jullien 010ee209b7 filetype: Improve FAT detection
We may have some disk with MBR as a first sector. In this case, the
current FAT check returns an error. However, the FAT sector exist and
the MBR can tell us where it is.

This patch add to file_name_detect_type function the ability to find
the FAT boot sector on the first sector of the first partition in case
it is not on sector 0.

It also introduce is_fat_or_mbr to check if a buffer is a FAT boot
or MBR sector

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-20 08:57:58 +02:00
Jean-Christophe PLAGNIOL-VILLARD 660809446f net/tap: use xzalloc to allocate data
this will ensure the data are set to 0 (list as example)

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-20 08:50:59 +02:00
Jean-Christophe PLAGNIOL-VILLARD fc5caa43a8 sandbox: do not register device before barebox is started
This will crash when use registered bus with device registered to it.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-20 08:50:59 +02:00