Commit 54c961d5 authored by Tristan Gingold's avatar Tristan Gingold

Remove dev/devicelist.c (was not used)

clean-up after this removal
parent c1e2ac72
......@@ -95,8 +95,6 @@ int board_update(void);
#define CONSOLE_UART_BAUDRATE 115200
#define SDB_ADDRESS 0x30000
#define FMC_EEPROM_ADR 0x50
#define SDBFS_REC 5
......
......@@ -82,8 +82,6 @@ int board_update(void);
extern unsigned char *BASE_MINIC;
extern unsigned char *BASE_EP;
#define SDB_ADDRESS 0x50000
#define FMC_EEPROM_ADR 0x50
#define SDBFS_REC 5
......
......@@ -76,8 +76,6 @@
#define CONSOLE_UART_BAUDRATE 115200
#define SDB_ADDRESS 0x30000
#define FMC_EEPROM_ADR 0x50
#define SDBFS_REC 5
......
......@@ -57,8 +57,6 @@
#define CONSOLE_UART_BAUDRATE 115200
#define SDB_ADDRESS 0x30000
#define CFG_EEPROM_ADR 0x50
#define MAC_CHIP_ADR 0x51
......
......@@ -62,8 +62,6 @@
#define CONSOLE_UART_BAUDRATE 115200
#define SDB_ADDRESS 0x30000
#define FMC_EEPROM_ADR 0x50
#define SDBFS_REC 6
......
......@@ -57,8 +57,6 @@ int board_update(void);
#define ERTM14_MAX_CONFIGS 8
#define SDB_ADDRESS 0x50000
#define FMC_EEPROM_ADR 0x50
#define SDBFS_REC 5
......
......@@ -13,7 +13,6 @@ obj-$(CONFIG_EMBEDDED_NODE) += \
dev/minic.o \
dev/syscon.o \
dev/sfp.o \
dev/devicelist.o \
dev/rxts_calibrator.o \
dev/flash.o \
dev/gpio.o \
......
/*
* This work is part of the White Rabbit project
*
* Copyright (C) 2014 CERN (www.cern.ch)
* Author: Alessandro Rubini <rubini@gnudd.com>
*
* Released according to the GNU GPL, version 2 or any later version.
*/
#ifdef BOARD_USE_SDB
#include <wrc.h>
#include <libsdbfs.h>
/* The following pointers are exported */
unsigned char *BASE_MINIC;
unsigned char *BASE_EP;
unsigned char *BASE_SYSCON;
unsigned char *BASE_UART;
unsigned char *BASE_ONEWIRE;
unsigned char *BASE_ETHERBONE_CFG;
/* The sdb filesystem itself */
static struct sdbfs wrc_fpga_sdb = {
.name = "fpga-area",
.blocksize = 1, /* Not currently used */
.entrypoint = SDB_ADDRESS,
.data = 0,
.flags = SDBFS_F_ZEROBASED,
};
/* called by outside, at boot time */
void sdb_print_devices(void)
{
struct sdb_device *d;
int new = 1;
while ( (d = sdbfs_scan(&wrc_fpga_sdb, new)) != NULL) {
/*
* "%.19s" is not working for XINT printf, and zeroing
* d->sdb_component.product.record_type won't work, as
* the device is read straight from fpga ROM registers
*/
const int namesize = sizeof(d->sdb_component.product.name);
char name[namesize + 1];
memcpy(name, d->sdb_component.product.name, sizeof(name));
name[namesize] = '\0';
pp_printf("dev 0x%08lx @ %06lx, %s\n",
(long)(d->sdb_component.product.device_id),
wrc_fpga_sdb.f_offset, name);
new = 0;
}
}
/* To save a little size, we enumerate our vendors */
#define VID_CERN 0x0000ce42LL
#define VID_GSI 0x00000651LL
struct wrc_device {
unsigned char **base;
uint64_t vid;
uint32_t did;
};
struct wrc_device devs[] = {
{&BASE_MINIC, VID_CERN, 0xab28633a},
{&BASE_EP, VID_CERN, 0x650c2d4f},
{&BASE_SYSCON, VID_CERN, 0xff07fc47},
{&BASE_UART, VID_CERN, 0xe2d13d04},
{&BASE_ONEWIRE, VID_CERN, 0x779c5443},
{&BASE_ETHERBONE_CFG, VID_GSI, 0x68202b22},
};
void sdb_find_devices(void)
{
struct wrc_device *d;
static int done;
int i;
if (!done) {
sdbfs_dev_create(&wrc_fpga_sdb);
done++;
}
for (d = devs, i = 0; i < ARRAY_SIZE(devs); d++, i++) {
*(d->base) = (void *)sdbfs_find_id(&wrc_fpga_sdb,
d->vid, d->did);
}
}
#endif
......@@ -101,10 +101,6 @@ char *wrc_hw_name = wrc_global.wrc_hw_name;
static void wrc_initialize(void)
{
#ifdef CONFIG_USE_SDB
sdb_find_devices();
#endif
console_init();
timer_init(1);
spll_very_init();
......@@ -214,9 +210,6 @@ static int ui_update(void)
void init_hw_after_reset(void)
{
/* Ok, now init the devices so we can printf and delay */
#ifdef CONFIG_USE_SDB
sdb_find_devices();
#endif
console_init();
timer_init(1);
}
......
......@@ -77,27 +77,6 @@ static void wrc_sim_initialize(void)
{
uint8_t mac_addr[6];
/* Define addresses only when board uses the sdb
* NOTE: AW: BOARD_USE_SDB is not implemented */
#ifdef BOARD_USE_SDB
// Search SDB for devices takes too long, hard-coded offsets
// should work for most WR-PTP core implementations
// (unless you add/remove/move peripherals), in which case
// you should comment out all the hard-coded offsets and
// uncomment the following line to perform a dynamic search
// at runtime.
//sdb_find_devices();
BASE_MINIC = (void *)0x20000;
BASE_EP = (void *)0x20100;
BASE_SOFTPLL = (void *)0x20200;
BASE_PPS_GEN = (void *)0x20300;
BASE_SYSCON = (void *)0x20400;
BASE_UART = (void *)0x20500;
BASE_ONEWIRE = (void *)0x20600;
BASE_ETHERBONE_CFG = (void *)0x20700;
#endif
timer_init(1);
/* Source MAC used by WRPC's Endpoint */
......
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