Patchwork [U-Boot,11/11] DM: switch sandbox to DM blockdev

login
register
mail settings
Submitter Pavel Herrmann
Date Sept. 20, 2012, 7:37 p.m.
Message ID <1348169867-2917-12-git-send-email-morpheus.ibis@gmail.com>
Download mbox | patch
Permalink /patch/185458/
State Superseded
Delegated to: Marek Vasut
Headers show

Comments

Pavel Herrmann - Sept. 20, 2012, 7:37 p.m.
add CONFIG_DM_BLOCK to include/configs/sandbox.h to enable it all

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
---
 arch/sandbox/lib/board.c  | 8 ++++++++
 include/configs/sandbox.h | 4 ++++
 2 files changed, 12 insertions(+)

Patch

diff --git a/arch/sandbox/lib/board.c b/arch/sandbox/lib/board.c
index c79cc62..a6fc67d 100644
--- a/arch/sandbox/lib/board.c
+++ b/arch/sandbox/lib/board.c
@@ -243,6 +243,10 @@  void board_init_r(gd_t *id, ulong dest_addr)
 		.name = "gpio_sandbox",
 		.platform_data = NULL
 	};
+	static const struct driver_info sata_info = {
+		.name = "sata_legacy",
+		.platform_data = NULL
+	};
 
 	struct instance *root = get_root_instance();
 	struct instance *demo1, *demo2, *demo3;
@@ -254,8 +258,12 @@  void board_init_r(gd_t *id, ulong dest_addr)
 				demo3 = driver_bind(demo2, &info);
 	driver_bind(demo2, &info);
 	driver_bind(root, &gs_info);
+	driver_bind(root, &sata_info);
 
 	demo_hello(demo2);
+	void *startram = os_malloc(1024*1024*16);
+	void *endram = startram + (1024*1024*16);
+	printf("scratch memory from %p to %p\n", startram, endram);
 
 	/* initialize environment */
 	env_relocate();
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index a713430..70ae37b 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -99,6 +99,10 @@ 
 #define CONFIG_SYS_SATA_MAX_DEVICE 2
 #define CONFIG_DOS_PARTITION
 #define CONFIG_CMD_FAT
+#define CONFIG_FAT_WRITE
 #define CONFIG_CMD_EXT2
 
+#define CONFIG_DM_BLOCK
+#define CONFIG_BLOCK_SATA_LEGACY
+
 #endif