Commit 9ff25f86 authored by Alessandro Rubini's avatar Alessandro Rubini

memlayout.h: define variables as extern

I personally dislike "common" variables, as they hid bugs a few times
for me. Thus, ppsi has "-fno-common" by now.  This commit adds
extern to memlayout.h and creates the variables in dev/sdb.c .
This builds whether or not -fno-common is there and has no effect
on a ptp-noposix build.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent fc1c9384
......@@ -10,6 +10,15 @@
#include <wrc.h>
#include "hw/memlayout.h"
unsigned char *BASE_MINIC;
unsigned char *BASE_EP;
unsigned char *BASE_SOFTPLL;
unsigned char *BASE_PPS_GEN;
unsigned char *BASE_SYSCON;
unsigned char *BASE_UART;
unsigned char *BASE_ONEWIRE;
unsigned char *BASE_ETHERBONE_CFG;
#define SDB_INTERCONNET 0x00
#define SDB_DEVICE 0x01
#define SDB_BRIDGE 0x02
......
......@@ -3,14 +3,14 @@
#define SDB_ADDRESS 0x30000
unsigned char *BASE_MINIC;
unsigned char *BASE_EP;
unsigned char *BASE_SOFTPLL;
unsigned char *BASE_PPS_GEN;
unsigned char *BASE_SYSCON;
unsigned char *BASE_UART;
unsigned char *BASE_ONEWIRE;
unsigned char *BASE_ETHERBONE_CFG;
extern unsigned char *BASE_MINIC;
extern unsigned char *BASE_EP;
extern unsigned char *BASE_SOFTPLL;
extern unsigned char *BASE_PPS_GEN;
extern unsigned char *BASE_SYSCON;
extern unsigned char *BASE_UART;
extern unsigned char *BASE_ONEWIRE;
extern unsigned char *BASE_ETHERBONE_CFG;
#define FMC_EEPROM_ADR 0x50
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment