高田です。
NET_BOOT時に、ATAの初期化を行うかどうかを指定するようにしてみました。
(M32700UT, Mappi3)
conf-machine.hにて DO_ATA_INITを defineすると、ata_init()が実行されます。
パッチを添付します。
ipl.c | 10 ++++++++++
machine/m32700ut/conf-machine.h | 12 ++++++++++--
machine/m3a-za/conf-machine.h | 10 +++++++++-
machine/mappi3/conf-machine.h | 7 +++++++
machine/oaks32r/conf-machine.h | 4 ++++
5 files changed, 40 insertions(+), 3 deletions(-)
Index: m32r-g00ff-20050623.mappi3/ipl.c
===================================================================
--- m32r-g00ff-20050623.mappi3.orig/ipl.c 2005-06-28 10:15:59.000000000 +0900
+++ m32r-g00ff-20050623.mappi3/ipl.c 2005-06-28 10:16:14.000000000 +0900
@@ -150,6 +150,14 @@ net_boot(void)
u32 proxy_addr = 0;
u16 proxy_port = 0;
+#if defined(DO_ATA_INIT)
+ if (ata_init () < 0)
+ {
+ put_string ("*** ATA initialization failed.\n");
+ return 0;
+ }
+#endif
+
if (eth_init (p) < 0)
{
put_string ("*** Ethernet initialization failed.\n");
@@ -342,11 +350,13 @@ ata_boot(void)
{
static int x; /* This is in the BSS segment */
unsigned short data = x + 1; /* We can check BSS is zero-ed out or not */
+#if defined(DO_ATA_INIT) && !defined(NET_BOOT)
if (ata_init () < 0)
{
put_string ("*** ATA initialization failed.\n");
return 0;
}
+#endif
ata_read_sectors (0, 0, buf, 1);
#if 0
Index: m32r-g00ff-20050623.mappi3/machine/m32700ut/conf-machine.h
===================================================================
--- m32r-g00ff-20050623.mappi3.orig/machine/m32700ut/conf-machine.h 2005-06-28 10:15:59.000000000 +0900
+++ m32r-g00ff-20050623.mappi3/machine/m32700ut/conf-machine.h 2005-06-28 10:16:14.000000000 +0900
@@ -1,3 +1,11 @@
+/* Boot method */
#define ATA_BOOT 1
-//#define NET_BOOT 1
-//#define DHCP_SETUP 1
+#define NET_BOOT 1
+
+/* Network boot option */
+#define DHCP_SETUP 1
+// #define PROXY 1
+
+/* ATA initialization option */
+/* If you use M32R_CFC driver, please comment out the following line. */
+#define DO_ATA_INIT 1
Index: m32r-g00ff-20050623.mappi3/machine/m3a-za/conf-machine.h
===================================================================
--- m32r-g00ff-20050623.mappi3.orig/machine/m3a-za/conf-machine.h 2005-06-28 10:15:59.000000000 +0900
+++ m32r-g00ff-20050623.mappi3/machine/m3a-za/conf-machine.h 2005-06-28 10:18:40.000000000 +0900
@@ -1,3 +1,11 @@
+/* Boot method */
+#define ATA_BOOT 0
#define NET_BOOT 1
+
+/* Network boot option */
#define DHCP_SETUP 1
-#define ATA_BOOT 0
+// #define PROXY 1
+
+/* ATA initialization option */
+/* If you use M32R_CFC driver, please comment out the following line. */
+#define DO_ATA_INIT 1
Index: m32r-g00ff-20050623.mappi3/machine/mappi3/conf-machine.h
===================================================================
--- m32r-g00ff-20050623.mappi3.orig/machine/mappi3/conf-machine.h 2005-06-28 10:15:59.000000000 +0900
+++ m32r-g00ff-20050623.mappi3/machine/mappi3/conf-machine.h 2005-06-28 10:16:14.000000000 +0900
@@ -1,4 +1,11 @@
+/* Boot method */
#define ATA_BOOT 1
#define NET_BOOT 1
+
+/* Network boot option */
#define DHCP_SETUP 1
+// #define PROXY 1
+/* ATA initialization option */
+/* If you use M32R_CFC driver, please comment out the following line. */
+#define DO_ATA_INIT 1
Index: m32r-g00ff-20050623.mappi3/machine/oaks32r/conf-machine.h
===================================================================
--- m32r-g00ff-20050623.mappi3.orig/machine/oaks32r/conf-machine.h 2005-06-28 10:15:59.000000000 +0900
+++ m32r-g00ff-20050623.mappi3/machine/oaks32r/conf-machine.h 2005-06-28 10:16:51.000000000 +0900
@@ -1,3 +1,7 @@
+/* Boot method */
+#define ATA_BOOT 0
#define NET_BOOT 1
+
+/* Network boot option */
#define DHCP_SETUP 1
/*#define PROXY 1*/