diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2019-08-18 21:16:50 +0100 |
---|---|---|
committer | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2019-08-18 21:16:50 +0100 |
commit | 6daabf01f569ab4a7e3f58b9f44a99f5b2840760 (patch) | |
tree | 14b4bc1e4c15bcb04479965fa14d20f7ad56af4a /drivers | |
parent | 5b3f2c7c7d5ea79ce3fd2f9d335014059d1c31cf (diff) | |
download | qemu-openbios-6daabf01f569ab4a7e3f58b9f44a99f5b2840760.tar.gz |
nvram: convert to use BIND_NODE_METHODS() macro
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/macio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/macio.c b/drivers/macio.c index eb2af04a..5a94252c 100644 --- a/drivers/macio.c +++ b/drivers/macio.c @@ -91,9 +91,8 @@ void macio_nvram_init(const char *path, phys_addr_t addr) nvram_size = macio_nvram_size(); nvram = (char*)addr + nvram_offset; - snprintf(buf, sizeof(buf), "%s/nvram", path); - nvram_init(buf); - dnode = find_dev(buf); + snprintf(buf, sizeof(buf), "%s", path); + dnode = nvram_init(buf); set_int_property(dnode, "#bytes", arch_nvram_size() ); props[0] = __cpu_to_be32(nvram_offset); props[1] = __cpu_to_be32(nvram_size); @@ -102,6 +101,7 @@ void macio_nvram_init(const char *path, phys_addr_t addr) NEWWORLD(set_property(dnode, "compatible", "nvram,flash", 12)); chosen = find_dev("/chosen"); + snprintf(buf, sizeof(buf), "%s", get_path_from_ph(dnode)); push_str(buf); fword("open-dev"); set_int_property(chosen, "nvram", POP()); @@ -395,7 +395,7 @@ ob_macio_keylargo_init(const char *path, phys_addr_t addr) } /* The NewWorld NVRAM is not located in the MacIO device */ - macio_nvram_init("", 0); + macio_nvram_init("/", 0); escc_init(path, addr); macio_ide_init(path, addr, 2); openpic_init(path, addr); |