software/bios: move hw flags definitions to respective libs, remove hw/flags.h.
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 18 May 2020 21:09:31 +0000 (23:09 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 18 May 2020 21:09:31 +0000 (23:09 +0200)
litex/soc/software/include/base/uart.h
litex/soc/software/include/hw/flags.h [deleted file]
litex/soc/software/libbase/exception.c
litex/soc/software/libbase/uart.c
litex/soc/software/liblitedram/sdram.c
litex/soc/software/libliteeth/udp.c
litex/soc/software/libliteeth/udp.h
litex/soc/software/liblitesdcard/sdcard.c
litex/soc/software/liblitesdcard/sdcard.h

index 3d8a4fcf4d104ef1bbe16a406fea288cf69d76a1..bda2dd296d5ad3ab247665728061f4fb8f68e11b 100644 (file)
@@ -5,6 +5,9 @@
 extern "C" {
 #endif
 
+#define UART_EV_TX     0x1
+#define UART_EV_RX     0x2
+
 void uart_init(void);
 void uart_isr(void);
 void uart_sync(void);
diff --git a/litex/soc/software/include/hw/flags.h b/litex/soc/software/include/hw/flags.h
deleted file mode 100644 (file)
index 911a1b6..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef __HW_FLAGS_H
-#define __HW_FLAGS_H
-
-#define UART_EV_TX     0x1
-#define UART_EV_RX     0x2
-
-#define DFII_CONTROL_SEL               0x01
-#define DFII_CONTROL_CKE               0x02
-#define DFII_CONTROL_ODT               0x04
-#define DFII_CONTROL_RESET_N   0x08
-
-#define DFII_COMMAND_CS                0x01
-#define DFII_COMMAND_WE                0x02
-#define DFII_COMMAND_CAS       0x04
-#define DFII_COMMAND_RAS       0x08
-#define DFII_COMMAND_WRDATA    0x10
-#define DFII_COMMAND_RDDATA    0x20
-
-#define ETHMAC_EV_SRAM_WRITER  0x1
-#define ETHMAC_EV_SRAM_READER  0x1
-
-#define CLKGEN_STATUS_BUSY             0x1
-#define CLKGEN_STATUS_PROGDONE 0x2
-#define CLKGEN_STATUS_LOCKED   0x4
-
-#define DVISAMPLER_TOO_LATE            0x1
-#define DVISAMPLER_TOO_EARLY   0x2
-
-#define DVISAMPLER_DELAY_MASTER_CAL    0x01
-#define DVISAMPLER_DELAY_MASTER_RST    0x02
-#define DVISAMPLER_DELAY_SLAVE_CAL     0x04
-#define DVISAMPLER_DELAY_SLAVE_RST     0x08
-#define DVISAMPLER_DELAY_INC           0x10
-#define DVISAMPLER_DELAY_DEC           0x20
-
-#define DVISAMPLER_SLOT_EMPTY  0
-#define DVISAMPLER_SLOT_LOADED 1
-#define DVISAMPLER_SLOT_PENDING        2
-
-#endif /* __HW_FLAGS_H */
index 09b26399ae4f26faa186bc442984e9999ef875e1..0ac917272932e8b856e7c19349e78690b0fbf66f 100644 (file)
@@ -6,8 +6,6 @@ void isr(void);
 
 #ifdef __or1k__
 
-#include <hw/flags.h>
-
 #define EXTERNAL_IRQ 0x8
 
 static void emerg_printf(const char *fmt, ...)
index 4fac827fa0e17793a0b8fb9494a6619c591c7eba..81aa128b457094da6d2a9891bfb5d0f87535babf 100644 (file)
@@ -1,7 +1,6 @@
 #include <uart.h>
 #include <irq.h>
 #include <generated/csr.h>
-#include <hw/flags.h>
 
 /*
  * Buffer sizes must be a power of 2 so that modulos can be computed
index 81b169cf89988fc98a95a0260e426780b489c396..44cab02faf0785a725f08a46d0e19e83426e4d15 100644 (file)
@@ -17,7 +17,6 @@
 #include <generated/sdram_phy.h>
 #endif
 #include <generated/mem.h>
-#include <hw/flags.h>
 #include <system.h>
 
 #include "sdram.h"
index d86962132583d73b77d8351121fa4a50b54b776c..486a2efa666caf004b398e8c6025b29e54db525d 100644 (file)
@@ -14,7 +14,6 @@
 #include <inet.h>
 #include <system.h>
 #include <crc.h>
-#include <hw/flags.h>
 
 #include "udp.h"
 
index 132ef76d3589fd1451fb82fc76bc82683e4a720f..47e844b8ab8f2ad35aaaadacc0c80789a5d01b8c 100644 (file)
@@ -1,6 +1,9 @@
 #ifndef __UDP_H
 #define __UDP_H
 
+#define ETHMAC_EV_SRAM_WRITER  0x1
+#define ETHMAC_EV_SRAM_READER  0x1
+
 #define IPTOINT(a, b, c, d) ((a << 24)|(b << 16)|(c << 8)|d)
 
 #define UDP_BUFSIZE (5*1532)
index 274f3cfacad0284bd16cfca8495f3a168951be59..f21f53c6edbcc326492f8428fc4a855a495e2cd0 100644 (file)
@@ -10,7 +10,6 @@
 
 #include <generated/csr.h>
 #include <generated/mem.h>
-#include <hw/flags.h>
 #include <system.h>
 
 #include "sdcard.h"
index 690d85bc626e71a6b4d27e784bef9fa8fac2539c..10973534173bc623ca82ac79da529c9795d92820 100644 (file)
@@ -6,6 +6,10 @@
 
 #include <generated/csr.h>
 
+#define CLKGEN_STATUS_BUSY             0x1
+#define CLKGEN_STATUS_PROGDONE 0x2
+#define CLKGEN_STATUS_LOCKED   0x4
+
 #ifdef CSR_SDCORE_BASE
 
 #define SD_OK         0