Author: afaerber Date: Sat Aug 24 22:00:36 2013 New Revision: 1224 URL: http://tracker.coreboot.org/trac/openbios/changeset/1224
Log: macio: Rename arch_nvram_{put,get,size}()
PReP does not have MacIO, so don't call its functions arch_*. Instead, dispatch from arch_* functions to macio_* functions via is_apple().
Signed-off-by: Andreas Färber andreas.faerber@web.de
Modified: trunk/openbios-devel/arch/ppc/qemu/qemu.c trunk/openbios-devel/drivers/macio.c trunk/openbios-devel/include/drivers/drivers.h
Modified: trunk/openbios-devel/arch/ppc/qemu/qemu.c ============================================================================== --- trunk/openbios-devel/arch/ppc/qemu/qemu.c Mon Aug 19 14:58:12 2013 (r1223) +++ trunk/openbios-devel/arch/ppc/qemu/qemu.c Sat Aug 24 22:00:36 2013 (r1224) @@ -76,3 +76,31 @@ } return i; } + +int arch_nvram_size(void) +{ + if (is_apple()) { + return macio_get_nvram_size(); + } else { + // not implemented + } + return 0; +} + +void arch_nvram_put(char *buf) +{ + if (is_apple()) { + macio_nvram_put(buf); + } else { + // not implemented + } +} + +void arch_nvram_get(char *buf) +{ + if (is_apple()) { + macio_nvram_get(buf); + } else { + // not implemented + } +}
Modified: trunk/openbios-devel/drivers/macio.c ============================================================================== --- trunk/openbios-devel/drivers/macio.c Mon Aug 19 14:58:12 2013 (r1223) +++ trunk/openbios-devel/drivers/macio.c Sat Aug 24 22:00:36 2013 (r1224) @@ -35,7 +35,7 @@ static char *nvram;
int -arch_nvram_size( void ) +macio_get_nvram_size(void) { if (is_oldworld()) return OW_IO_NVRAM_SIZE >> OW_IO_NVRAM_SHIFT; @@ -120,7 +120,7 @@
void -arch_nvram_put( char *buf ) +macio_nvram_put(char *buf) { int i; unsigned int it_shift; @@ -139,7 +139,7 @@ }
void -arch_nvram_get( char *buf ) +macio_nvram_get(char *buf) { int i; unsigned int it_shift;
Modified: trunk/openbios-devel/include/drivers/drivers.h ============================================================================== --- trunk/openbios-devel/include/drivers/drivers.h Mon Aug 19 14:58:12 2013 (r1223) +++ trunk/openbios-devel/include/drivers/drivers.h Sat Aug 24 22:00:36 2013 (r1224) @@ -122,6 +122,9 @@ unsigned char keyboard_readdata(void); #endif #endif +int macio_get_nvram_size(void); +void macio_nvram_put(char *buf); +void macio_nvram_get(char *buf);
/* drivers/timer.c */ void setup_timers(void);