9
0
Fork 0
Commit Graph

23 Commits

Author SHA1 Message Date
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 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 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
Fabian van der Werf 97f3cc022c Fixed unaligned access
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-09 11:31:31 +02:00
Jean-Christophe PLAGNIOL-VILLARD feb4e2c0c5 disk_drive: fix x86 support
switch to resource

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-15 08:57:28 +02:00
Jean-Christophe PLAGNIOL-VILLARD b1be292352 ata: switch to resource
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-07-30 02:05:27 +08:00
Jean-Christophe PLAGNIOL-VILLARD 75a31ab8de ata/bios: convert to struct resource
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-07-23 13:52:18 +08:00
Sascha Hauer c1bcb052dd ata: guessing disk sizes is only needed on X86
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-05-06 08:36:04 +02:00
Sascha Hauer 99b9ca240d ata: make write support optional
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-11 15:57:51 +02:00
Sascha Hauer ec441a536e ata: use block support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-11 15:57:51 +02:00
Juergen Beisert 3b4859163d x86 ATA: Don't touch the size entry for the BIOS disk based device
Only the platform sets this entry to setup the correct size or
signals the driver to guess the size of the attached disk.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2011-03-10 11:14:52 +01:00
Juergen Beisert 63690cc406 Don't try to guess the size of a disk if its size value is already given
Guessing the size of an attached harddisk (access via x86 BIOS) was needed
due to the fact, barebox can't query this information from the BIOS easily.

But with the SD/MMC cards, there will be a second user of the generic disk
handling routines. And with this media it is very easy to know its size.

This patch provides a workaround to keep the guessing feature if the size of
the registered disk is 0. If it is not 0, the given value will be used instead.

Note: This is in preparation to add MCI card support, which can be handled
like a disk drive.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-11 13:08:27 +02:00
Juergen Beisert 5340589afc Don't use a sector buffer on stack
Using a temp. buffer for a disk sector on the stack, seems not work. Doing so
lets the system run crazy (the stack seems to be destroyd). Don't know the
correct stack handling on ARM, but (IMHO) I also can exclude any writing across
the buffer boundaries.

Using a temp. buffer via malloc() runs also on ARM.

Note: This patch was required to add MCI card support, which can be handled
like a disk drive.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-11 13:08:26 +02:00
Juergen Beisert 0a3b615151 Make the disk driver less noisy
In real life this output is only a "nice to have", but most of the time
its useless and confusing. So, make it a debug feature for the interested
developer.

Note: This is in preparation to add MCI card support, which mostly come with
a partition table and can be handled like a disk drive.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-11 13:08:26 +02:00
Juergen Beisert 19b485abbe x-functions do not return in case of failure.
Remove error handling, because in case of failure the xzalloc() function
does not return.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-11 13:08:26 +02:00
Juergen Beisert 835aa6b599 Add a low level disk drive access driver
This is a low level disk drive communication driver. It uses the real mode
BIOS found on most x86 platforms, to read and write sectors. Used by the
generic disk driver.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-01-14 10:06:16 +01:00
Juergen Beisert bb0d24d5b4 Add the main disk driver
This is the generic disk driver. It does not know how to access the drives.
Other low level drivers are required for this.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-01-14 10:06:16 +01:00
Juergen Beisert 2264ac8e65 Start to add ATA support to barebox
Add the basic files, declarations and folders to bring in ATA support.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-01-14 10:06:16 +01:00