Commit 8e4e9093 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

compile Etherbone support only on request

parent 74fe6b23
Pipeline #292 failed with stages
in 11 seconds
......@@ -195,6 +195,11 @@ config PUTS_SYSLOG
Unfortunately, "stat" will reach syslog as several short strings,
and "gui" is full of escape sequences.
config ETHERBONE
depends on IP && !HOST_PROCESS
default n
boolean "Etherbone support"
config SNMP
depends on IP && !HOST_PROCESS
default y
......
......@@ -71,7 +71,11 @@
#define HAS_ABSCAL 0
#endif
#ifdef CONFIG_ETHERBONE
#define HAS_EB 1
#else
#define HAS_EB 0
#endif
#define CONFIG_DISALLOW_LONG_DIVISION
......
......@@ -47,6 +47,8 @@ obj-$(CONFIG_W1) += dev/temp-w1.o
obj-$(CONFIG_FAKE_TEMPERATURES) += dev/fake-temp.o
obj-$(CONFIG_ETHERBONE) += dev/etherbone.o
# Filter rules are selected according to configuration, but we may
# have more than one. Note: the filename is reflected in symbol names,
# so they are hardwired in ../Makefile (and ../tools/pfilter-builder too)
......
......@@ -192,18 +192,11 @@ void getIP(unsigned char *IP)
void setIP(unsigned char *IP)
{
volatile unsigned int *eb_ip =
(unsigned int *)(BASE_ETHERBONE_CFG + EB_IPV4);
unsigned int ip;
memcpy(myIP, IP, 4);
ip = (myIP[0] << 24) | (myIP[1] << 16) | (myIP[2] << 8) | (myIP[3]);
if (HAS_EB) {
while (*eb_ip != ip)
*eb_ip = ip;
}
if (ip == 0)
ip_status = IP_TRAINING;
bootp_retry = 0;
......
......@@ -14,6 +14,7 @@
#include "softpll_ng.h"
#include "shell.h"
#include "dev/etherbone.h"
void decode_ip(const char *str, unsigned char *ip)
{
......@@ -46,6 +47,9 @@ static int cmd_ip(const char *args[])
ip_status = IP_OK_STATIC;
decode_ip(args[1], ip);
setIP(ip);
#if HAS_EB
eb_setIP(ip);
#endif
} else {
return -EINVAL;
}
......
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