From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 2/2] x86/generic_pc: fix missing switch to resource
Date: Sun, 14 Aug 2011 16:59:52 +0200 [thread overview]
Message-ID: <1313333992-27572-2-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1313333992-27572-1-git-send-email-plagnioj@jcrosoft.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
arch/x86/boards/x86_generic/generic_pc.c | 14 +++-----------
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 7a93d9b..0ddf883 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",
--
1.7.5.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2011-08-14 15:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-14 14:59 [PATCH 1/2] disk_drive: fix x86 support Jean-Christophe PLAGNIOL-VILLARD
2011-08-14 14:59 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1313333992-27572-2-git-send-email-plagnioj@jcrosoft.com \
--to=plagnioj@jcrosoft.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox