summaryrefslogtreecommitdiffstats
path: root/arch/x86/boards/x86_generic/generic_pc.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-08-14 16:59:52 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-08-15 08:57:28 +0200
commit90c83d13d24c14b6682e428d44693ad4b58a9298 (patch)
tree18cda665d8027fd5cb30f09ab41db6193ea9bd54 /arch/x86/boards/x86_generic/generic_pc.c
parentfeb4e2c0c51561a6823b2a81a6b978ce09e6f9c4 (diff)
downloadbarebox-90c83d13d24c14b6682e428d44693ad4b58a9298.tar.gz
barebox-90c83d13d24c14b6682e428d44693ad4b58a9298.tar.xz
x86/generic_pc: fix missing switch to resource
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/x86/boards/x86_generic/generic_pc.c')
-rw-r--r--arch/x86/boards/x86_generic/generic_pc.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/arch/x86/boards/x86_generic/generic_pc.c b/arch/x86/boards/x86_generic/generic_pc.c
index 7a93d9bc31..0ddf88361e 100644
--- a/arch/x86/boards/x86_generic/generic_pc.c
+++ b/arch/x86/boards/x86_generic/generic_pc.c
@@ -30,12 +30,6 @@
#include <asm/syslib.h>
#include <ns16550.h>
-static struct device_d bios_disk_dev = {
- .id = -1,
- .name = "biosdrive",
- .size = 0, /* auto guess */
-};
-
/*
* These datas are from the MBR, created by the linker and filled by the
* setup tool while installing barebox on the disk drive
@@ -54,12 +48,10 @@ static int devices_init(void)
{
int rc;
- sdram_dev.size = bios_get_memsize(); /* extended memory only */
- sdram_dev.size <<= 10;
-
- add_mem_device("ram0", 0x0, 16 * 1024 * 1024,
+ /* extended memory only */
+ add_mem_device("ram0", 0x0, bios_get_memsize() << 10,
IORESOURCE_MEM_WRITEABLE);
- register_device(&bios_disk_dev);
+ add_generic_device("biosdrive", -1, NULL, 0, 0, IORESOURCE_MEM, NULL);
if (pers_env_size != PATCH_AREA_PERS_SIZE_UNUSED) {
rc = devfs_add_partition("biosdisk0",