[OpenBIOS] r264 - in openbios-devel: arch/ppc/briq arch/ppc/mol arch/ppc/pearpc modules
svn at openbios.org
svn at openbios.org
Tue Nov 25 20:50:53 CET 2008
Author: blueswirl
Date: 2008-11-25 20:50:53 +0100 (Tue, 25 Nov 2008)
New Revision: 264
Modified:
openbios-devel/arch/ppc/briq/init.c
openbios-devel/arch/ppc/mol/init.c
openbios-devel/arch/ppc/pearpc/init.c
openbios-devel/modules/nvram.c
Log:
Add some debug macros and correct nvram_init() call for other PPC
architectures (Laurent Vivier).
Modified: openbios-devel/arch/ppc/briq/init.c
===================================================================
--- openbios-devel/arch/ppc/briq/init.c 2008-11-25 19:41:41 UTC (rev 263)
+++ openbios-devel/arch/ppc/briq/init.c 2008-11-25 19:50:53 UTC (rev 264)
@@ -91,7 +91,7 @@
devtree_init();
node_methods_init();
- nvram_init();
+ nvram_init("/pci/mac-io/nvram");
modules_init();
#ifdef CONFIG_DRIVER_PCI
ob_pci_init();
Modified: openbios-devel/arch/ppc/mol/init.c
===================================================================
--- openbios-devel/arch/ppc/mol/init.c 2008-11-25 19:41:41 UTC (rev 263)
+++ openbios-devel/arch/ppc/mol/init.c 2008-11-25 19:50:53 UTC (rev 264)
@@ -84,7 +84,7 @@
devtree_init();
node_methods_init();
- nvram_init();
+ nvram_init("/pci/mac-io/nvram");
modules_init();
pseudodisk_init();
osiblk_init();
Modified: openbios-devel/arch/ppc/pearpc/init.c
===================================================================
--- openbios-devel/arch/ppc/pearpc/init.c 2008-11-25 19:41:41 UTC (rev 263)
+++ openbios-devel/arch/ppc/pearpc/init.c 2008-11-25 19:50:53 UTC (rev 264)
@@ -93,7 +93,7 @@
int autoboot;
devtree_init();
- nvram_init();
+ nvram_init("/pci/mac-io/nvram");
modules_init();
#ifdef CONFIG_DRIVER_PCI
ob_pci_init();
Modified: openbios-devel/modules/nvram.c
===================================================================
--- openbios-devel/modules/nvram.c 2008-11-25 19:41:41 UTC (rev 263)
+++ openbios-devel/modules/nvram.c 2008-11-25 19:50:53 UTC (rev 264)
@@ -18,6 +18,13 @@
#include "openbios/bindings.h"
#include "openbios/nvram.h"
+#ifdef CONFIG_DEBUG_NVRAM
+#define DPRINTF(fmt, args...) \
+do { printk("NVRAM: " fmt , ##args); } while (0)
+#else
+#define DPRINTF(fmt, args...) do {} while(0)
+#endif
+
#define DEF_SYSTEM_SIZE 0xc10
#define NV_SIG_SYSTEM 0x70
@@ -228,7 +235,7 @@
int pos_hi = POP();
int pos_lo = POP();
- /* printk("NVRAM: seek %08x %08x\n", pos_hi, pos_lo ); */
+ DPRINTF("seek %08x %08x\n", pos_hi, pos_lo );
nd->mark_lo = pos_lo;
nd->mark_hi = pos_hi;
@@ -254,7 +261,7 @@
n++;
}
PUSH(n);
- /* printk("NVRAM: read %08x %x -- %x\n", (int)p, len, n); */
+ DPRINTF("read %08x %x -- %x\n", (int)p, len, n);
}
/* ( addr len -- actual ) */
@@ -270,13 +277,14 @@
n++;
}
PUSH(n);
- /* printk("NVRAM: write %08x %x -- %x\n", (int)p, len, n ); */
+ DPRINTF("write %08x %x -- %x\n", (int)p, len, n );
}
/* ( -- size ) */
static void
nvram_size( __attribute__((unused)) nvram_ibuf_t *nd )
{
+ DPRINTF("nvram_size %d\n", nvram.size);
PUSH( nvram.size );
}
More information about the OpenBIOS
mailing list