9
0
Fork 0
Commit Graph

5957 Commits

Author SHA1 Message Date
Sascha Hauer 5930f100aa use kernel bunzip implementation
The kernel uncompression functions have a unified API. Switch
to the kernel implementation to unify the different uncompression
APIs. As a bonus the kernel implementation is much smaller.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 21:12:27 +01:00
Sascha Hauer f400980638 scripts/mkimage.c: remove unnecessary include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 21:07:10 +01:00
Sascha Hauer a5f5945c79 arm bootm: remove unnecessary include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 21:07:10 +01:00
Sascha Hauer 42a691328e armlinux: remove unnecessary include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 21:07:10 +01:00
Sascha Hauer d4950552f5 bootm: use initrd_address and initrd_size
Make these fields in struct image_data the reference for image handlers

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 21:03:17 +01:00
Sascha Hauer 351058fa51 bootm: push relocate_image up to the generic command
All handlers used to just relocate the image without any checks, so
we are doomed if we write outside of SDRAM or will overwrite ourselves.
Move the relocation up to the generic part where we have a chance
of catching these issues.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:59:56 +01:00
Sascha Hauer ec4ee82ca9 bootm relocate_image: honour load_address
the uImage should be relocated to load_address. This is handled correctly
in gzip/bzip2 compressed images, but not in uncompressed images. fix this.
Also, when a variable is not used once without casting to another type it
probably means that its type is wrong.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:59:54 +01:00
Sascha Hauer 6dbe704263 bootm: fix typo, update help str
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:59:21 +01:00
Sascha Hauer 19a0c370aa bootm: do not require -L after -r
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:55:50 +01:00
Sascha Hauer 72bdddcca3 bootm: fix various memory leaks
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:55:50 +01:00
Sascha Hauer 479c6e9506 bootm: remove image handler options
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:55:50 +01:00
Sascha Hauer 05b1167099 bootm: handle initrds inline
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:55:50 +01:00
Sascha Hauer d1595f140f ARM bootm: remove now obsolete args
Now that the arch_number and system_rev variables can be set from
the environment we don't need the old bootm command line switch
mechanism anymore.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:55:50 +01:00
Sascha Hauer 06656eb05e armlinux: cleanup linux vars
arch_number is currently exported to the environment but not read back
on boot time which is rather confusing. system_rev and system_serial
are not exported to the environment but can be set in board specific
code.
This patch exports all these variables to the environment and reads them
back on boot time. All variables get a armlinux_ prefix, so the
arch_number environment variable gets renamed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:55:50 +01:00
Sascha Hauer a94db01cdc introduce some env helpers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:55:50 +01:00
Sascha Hauer 248e5f1cbe compile in simple_strtoull
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:55:50 +01:00
Sascha Hauer ac4854be5e factor out iminfo command
The rests of U-Boots iminfo command are sitting in commands/bootm.c and
are in a nonusable state. Factor it out to its own file and make it work
again.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:55:50 +01:00
Sascha Hauer 88611e7448 bootm: remove dead code
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:54:55 +01:00
Sascha Hauer 7631e76c0b Merge branch 'work/magicvars' into next 2011-11-29 20:52:03 +01:00
Sascha Hauer 7766c288ff dhcp: Add magicvars
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:51:32 +01:00
Sascha Hauer 76dca8279e hush: Add magicvars
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:51:32 +01:00
Sascha Hauer 51845b0ce0 ARM i.MX boot: Add barebox_loc magicvar
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:51:32 +01:00
Sascha Hauer f84fb129c7 bootm: Add bootargs magicvar
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:51:32 +01:00
Sascha Hauer 020a30be0d add magicvar command
The magicvar command gives an overview about all environment variables
with a special meaning.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:51:31 +01:00
Sascha Hauer e0f4fb2c98 Merge branch 'master' into next
Conflicts:
	drivers/ata/disk_drive.c

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:45:23 +01:00
Sascha Hauer 97e0b488a9 Merge branch 'pu/mmc-spi' into next 2011-11-28 11:42:08 +01:00
Sascha Hauer ad9ef4c148 MAKEALL: use '.' instead of 'source'
'source' is not available on dash.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-28 11:41:37 +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
Sascha Hauer 3db0a1e7fe mmc spi: compile fix
Without CRC support the mmc spi driver fails to compile with
the following:

drivers/mci/mci_spi.c:74:18: error: static declaration of 'crc7' follows non-static declaration

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-28 09:38:16 +01:00
Sascha Hauer 81dbc7421e mmc spi: add missing dependency on SPI
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-28 09:34:31 +01:00
Juergen Beisert 55ebf18c66 Add driver for IDE like interfaces
This simple driver enables a generic driver for ATA type of devices to get
access to the so called 'register file' of an ATA drive.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-28 09:23:24 +01:00
Juergen Beisert 16db801f4d ATA Disk Support: Add support for native ATA type drives
This changed patch removes more of the u-boot like code and replace it with
kernel like code.

commit 2a8966936af6b54573483ade559d0633e489b515
Author: Juergen Beisert <jbe@pengutronix.de>
Date:   Fri Sep 30 15:06:26 2011 +0200

    ATA Disk Support: Add support for native ATA type drives

    Signed-off-by: Juergen Beisert <jbe@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-28 09:23:24 +01:00
Juergen Beisert fb491506ad ATA/DISK: Remove the now unused header <ata.h>
This file is obsolete now.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-28 09:23:24 +01:00
Juergen Beisert 1e56da922b Remove 'disk_drive.c' as it is now replaced by generic partition handling
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-28 09:23:24 +01:00
Juergen Beisert 82db23d3f4 Use generic block layer to access the drives and do partition parsing
Change all relevant blockdevice users to the simplified interface.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-28 09:23:24 +01:00
Juergen Beisert 967a2675ba DISK: Add common partition handling for disk like media
This covers disk like media like SD card, CF cards, regular hard disks and also
USB mass storage devices. Most common used partition table is still of DOS type.
This implementation is prepared to support more partition types in the future.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-28 09:23:24 +01:00
Juergen Beisert 0748a120fb ATA/DISK: Share important constants and structures
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-28 09:23:24 +01:00
Juergen Beisert 0084116bcc ATA/DISK: The BIOS based disk driver is not an interface
Using the BIOS to access attached hard disks means a full disk driver, not only
an interface to the drives.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-28 09:23:24 +01:00
Juergen Beisert bda834847d ATA/DISK: Reorganize file structure and names for future updates
'ATA' means more an interface than a disk drive. Change the names to reflect
their real meaning.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-28 09:23:24 +01:00
Juergen Beisert 092366c1a9 ATA/DISK: Enabling write support does not belong to 'drive types'
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-28 09:23:24 +01:00
Juergen Beisert 6a3bdfdbad ATA/DISK: Add generic disk support when enabling the BIOS disk driver
The BIOS based disk driver makes no sense without the generic disk support.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-28 09:23:24 +01:00
Juergen Beisert 3ca9f1812f Create a unique cdev number for on demand devices
For disk like devices attached to MCI, ATA or USB it depends on the order they
will be recognized. So an unique number for all disk like devices is required.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-28 09:23:24 +01:00
Juergen Beisert 0c871d19dd USB Mass Storage driver: Fix compile time warning
drivers/usb/storage/usb.c: In function 'usb_stor_blk_io':
drivers/usb/storage/usb.c:257:16: warning: comparison of distinct pointer types lacks a cast

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-28 09:23:24 +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
Juergen Beisert 6fa8c93a5e S3C24XX: Fix wrong RTS behaviour
Enabling AUTOSYNC means enabling the auto sync feature, not rising the RTS

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-27 12:16:55 +01:00
Juergen Beisert 68284282be Mini2440: Fix leftover from A9M2440 copy
These symbols where defined for the A9M2440 platform. Rename them to the
platform they now belong to.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-27 12:16:55 +01:00
Jan Weitzel e26c1c52ba readkey: Use ARRAY_SIZE
Update to commit:

6df16cb readkey: force return from while true

Use ARRAY_SIZE instead of hardcoded value

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-25 13:50:20 +01:00
Michael Grzeschik a2b6da5e66 m25p80: set the correct erasesize when we use OPCODE_BE_4K
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-25 12:41:18 +01:00
Michael Grzeschik 5da11da840 atmel_spi: add mesg->actual_length, so devices can use it for read/write
Without this i.e. the m25p driver is not working properly.

Its used to calculate the return value of the read/write function of
some devices. If the value is missing, barebox would always
miscalculate the next transfer sizes.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-25 12:41:18 +01:00
Franck Jullien 146bea9b9b spi/altera_spi: Add cs_change support
The Linux kernel says (spi.h) :

* All SPI transfers start with the relevant chipselect active.  Normally
* it stays selected until after the last transfer in a message.  Drivers
* can affect the chipselect signal using cs_change.
*
* (i) If the transfer isn't the last one in the message, this flag is
* used to make the chipselect briefly go inactive in the middle of the
* message.  Toggling chipselect in this way may be needed to terminate
* a chip command, letting a single spi_message perform all of group of
* chip transactions together.
*
* (ii) When the transfer is the last one in the message, the chip may
* stay selected until the next transfer.  On multi-device SPI busses
* with nothing blocking messages going to other devices, this is just
* a performance hint; starting a message to another device deselects
* this one.  But in other cases, this can be used to ensure correctness.
* Some devices need protocol transactions to be built from a series of
* spi_message submissions, where the content of one message is
* determined by the results of previous messages and where the whole
* transaction
* ends when the chipselect goes intactive.

In other words, cs_change changes the default chipselect *behavior*.

Support of cs_change is necessary to implement the mci spi driver.

This patch also fix few things:

Passing the bus number to the brand new master device.
Disable chipselect during master->setup.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-25 12:38:34 +01:00