[OpenBIOS] [PATCH 2/2] SPARC64: add an eeprom node to the device tree
Mark Cave-Ayland
mark.cave-ayland at ilande.co.uk
Mon Jan 19 14:09:03 CET 2015
From: Artyom Tarasenko <atar4qemu at gmail.com>
Add eeprom node to the device tree to make device visible for
the guest OS.
Signed-off-by: Artyom Tarasenko <atar4qemu at gmail.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
openbios-devel/drivers/pci.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/openbios-devel/drivers/pci.c b/openbios-devel/drivers/pci.c
index 3260354..366f4a1 100644
--- a/openbios-devel/drivers/pci.c
+++ b/openbios-devel/drivers/pci.c
@@ -831,6 +831,26 @@ int ebus_config_cb(const pci_config_t *config)
set_property(dev, "ranges", (char *)props, ncells * sizeof(props[0]));
+ /* Build eeprom node */
+ fword("new-device");
+ PUSH(0x14);
+ fword("encode-int");
+ PUSH(0x2000);
+ fword("encode-int");
+ fword("encode+");
+ PUSH(0x2000);
+ fword("encode-int");
+ fword("encode+");
+ push_str("reg");
+ fword("property");
+
+ push_str("mk48t59");
+ fword("model");
+
+ push_str("eeprom");
+ fword("device-name");
+ fword("finish-device");
+
#ifdef CONFIG_DRIVER_FLOPPY
ob_floppy_init(config->path, "fdthree", 0x3f0ULL, 0);
#endif
--
1.7.10.4
More information about the OpenBIOS
mailing list