diff options
author | Juergen Beisert <jbe@pengutronix.de> | 2010-10-08 18:30:52 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-10-11 13:08:27 +0200 |
commit | 63690cc4061719813c3d271b993f04ffe98ba0e5 (patch) | |
tree | 509c4d5305b295a36adb15aa56d8103886a4acdd /arch/x86 | |
parent | 5340589afcec8fad6df708b60888c45a8a6d08f9 (diff) | |
download | barebox-63690cc4061719813c3d271b993f04ffe98ba0e5.tar.gz barebox-63690cc4061719813c3d271b993f04ffe98ba0e5.tar.xz |
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>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/boards/x86_generic/generic_pc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/boards/x86_generic/generic_pc.c b/arch/x86/boards/x86_generic/generic_pc.c index a6cd7e0de3..b9c31aa61f 100644 --- a/arch/x86/boards/x86_generic/generic_pc.c +++ b/arch/x86/boards/x86_generic/generic_pc.c @@ -46,7 +46,7 @@ static struct device_d sdram_dev = { static struct device_d bios_disk_dev = { .id = -1, .name = "biosdrive", - .size = 1, + .size = 0, /* auto guess */ }; /* |