9
0
Fork 0
Commit Graph

6130 Commits

Author SHA1 Message Date
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
Franck Jullien 2aad209b78 mci: Add MCI over SPI support
This patch adds MMC over SPI support to mci-core.c and
mci_spi.c driver.

This driver is useful when SOC doesn't have built-in MCI
component. Tested with nios, 2Go SD-CARD and FAT file system.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-25 12:38:29 +01:00
Franck Jullien 52ef4af579 crypto: Add crc7 function
This function in used by the MCI over SPI driver.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-25 12:37:25 +01:00
Franck Jullien 739f9105cc nios2: Include asm/unaligned.h
drivers/ata/disk_drive.c needs it....

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-24 10:36:17 +01:00
Jan Weitzel 6df16cb90d readkey: force return from while true
If read_key is feeded by STRG + KEY_LEFT you run into the while(1)
loop and corrupt memory through esc array.
Force return if index gets too high.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-22 21:14:28 +01:00
Hubert Feurstein 7bb009c744 commands/cp: add verbose mode which displays progress bar
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-22 21:13:05 +01:00
Jean-Christophe PLAGNIOL-VILLARD a59471d133 sandbox: move ELFCLASS detection to asm/elf.h
now we can detect the host build from gcc macro
and cross compile the sandbox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Loïc Minier <loic.minier@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-22 21:09:26 +01:00
Sascha Hauer 41ee1923e6 Merge branch 'pu/imx53-nand-warning' 2011-11-22 21:09:01 +01:00
Sascha Hauer cf0599f933 Merge branch 'pu/unlzo' 2011-11-22 21:08:45 +01:00
Jean-Christophe PLAGNIOL-VILLARD 03d4554577 password: remove not used variable 'second'
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-22 21:04:32 +01:00
Sascha Hauer 82c6ac9e07 Merge branch 'sent/assorted-fixes' 2011-11-17 22:59:47 +01:00
Sascha Hauer 2c0e3bb53a ARM i.MX53: silence compiler warning in nand.c
nand.c issues a warning when imx_nand_set_layout is
empty. We don't need this function on i.MX53, so
silence the warning.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-17 22:38:04 +01:00
Sascha Hauer 689d9762bb fix unlzo support
unlzo support is broken for files > 256k (more than one block)
since commit a3463cc128
(lib/decompress_unlzo: use fill and full to read and write data)
This patch updates unlzo support to the latest version of the kernel
plus a small buffer free fix.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-17 22:31:56 +01:00
Franck Jullien 186d926c23 fs/fat: Initialize local variable finfo
fat_stat in fs/fat.c declares finfo but doesn't initialize it.
When get_fileinfo is called, fno->lfname and fno->lfsize are
tested but haven't been zeroed...This can lead to a wrong
behavior.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-17 16:59:29 +01:00
Juergen Beisert 77e8188269 Mini2440: Everything's now present to provide USB host feature
The S3C2440 CPU comes with an internal OHCI the generic part of
Barebox already supports. Just add the missing part.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-17 16:52:06 +01:00
Sascha Hauer 1533f6b7b3 fix fprintf prototype and return value
The puts functions now properly return the number of characters
written. With this we can also fix fprintf.
Also, remove never reached return in fputs.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 16:19:48 +01:00
Sascha Hauer e3920f1c2f Merge branch 'pu/mci/multiblock-write' into next 2011-11-11 16:18:34 +01:00
Sascha Hauer 115320526c ARM i.MX53: enable l2 cache
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 14:57:18 +01:00
Sascha Hauer 50a62491c5 mci: remove unnecessary loops
We used to loop around the sectors in mci_sd_write/mci_sd_read.
Now that we have multi block read and write this is not necessary
anymore.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 12:58:24 +01:00
Sascha Hauer a2ca100344 mci: implement multi block write
This speeds up writes to MMC/SD cards significantly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 12:58:18 +01:00
Lucas De Marchi e57f57a3d0 x86: fix symbol size calculation
The size is being calculated after changing to another section, which
gives error with gcc 4.6:

  AS      arch/x86/lib/traveler.o
/tmp/ccP0z8xx.s: Assembler messages:
/tmp/ccP0z8xx.s: Error: .size expression for real_to_prot does not evaluate to a constant
/tmp/ccP0z8xx.s: Error: .size expression for prot_to_real does not evaluate to a constant
make[1]: *** [arch/x86/lib/traveler.o] Error 1

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 12:28:35 +01:00
Lucas De Marchi 8d6d5d43dd x86: fix build error because of missing header
Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 12:28:35 +01:00
Lucas De Marchi bf25fb065a Add setupmbr to gitignore
Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 12:28:35 +01:00
Sascha Hauer 8fe1e8fd41 console: fix return values of puts functions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 12:20:21 +01:00
Franck Jullien 84b222987e mount: Fix the printing of device name
Mount without argument always print a "none" as device name mounted
because entry->parent_device is always NULL.

The problem is the mount function in fs/fs.c. parent_device is
initialized to NULL and never updated. With this patch,
parent_device is set with the mounted device name.

Moreover, the mount function has been modified to print the device
name plus device id using the dev_name function.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 12:13:34 +01:00
Franck Jullien 21d6ca2092 ata: Add dev ref to blockdevice during probe
Add missing reference to dev when register the blockdevice.
This prevent the creation of a cdev with a NULL reference to dev in
blockdevice_register.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 12:13:20 +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
Fabio Estevam a8a50ffba1 ARM: mx53-loco: Remove duplicate call to loco_fec_reset()
Remove duplicate call to loco_fec_reset().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 10:27:11 +01:00