
As part of this separation we can also move "update-nvram" directly to the NVRAM node bindings. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> --- drivers/macio.c | 1 + packages/nvram.c | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/macio.c b/drivers/macio.c index 5a94252..33f29f1 100644 --- a/drivers/macio.c +++ b/drivers/macio.c @@ -91,6 +91,7 @@ void macio_nvram_init(const char *path, phys_addr_t addr) nvram_size = macio_nvram_size(); nvram = (char*)addr + nvram_offset; + nvconf_init(); snprintf(buf, sizeof(buf), "%s", path); dnode = nvram_init(buf); set_int_property(dnode, "#bytes", arch_nvram_size() ); diff --git a/packages/nvram.c b/packages/nvram.c index 6fd39b1..a402f00 100644 --- a/packages/nvram.c +++ b/packages/nvram.c @@ -186,8 +186,6 @@ nvconf_init( void ) nvram.data = malloc( nvram.size ); arch_nvram_get( nvram.data ); - bind_func( "update-nvram", update_nvram ); - for( ;; ) { nvpart_t *p = NULL; int err; @@ -309,6 +307,7 @@ NODE_METHODS( nvram ) = { { "read", (void*)nvram_read }, { "write", (void*)nvram_write }, { "seek", (void*)nvram_seek }, + { "update-nvram", (void*)update_nvram }, }; @@ -322,8 +321,6 @@ nvram_init( const char *path ) fword("new-device"); - nvconf_init(); - ph = get_cur_dev(); push_str("nvram"); -- 2.20.1