From: Florent Kermarrec Date: Mon, 18 May 2020 21:09:31 +0000 (+0200) Subject: software/bios: move hw flags definitions to respective libs, remove hw/flags.h. X-Git-Tag: 24jan2021_ls180~328^2~3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=33f6ce74314a01ef4d11a89030d47c78f49be52d;p=litex.git software/bios: move hw flags definitions to respective libs, remove hw/flags.h. --- diff --git a/litex/soc/software/include/base/uart.h b/litex/soc/software/include/base/uart.h index 3d8a4fcf..bda2dd29 100644 --- a/litex/soc/software/include/base/uart.h +++ b/litex/soc/software/include/base/uart.h @@ -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 index 911a1b68..00000000 --- a/litex/soc/software/include/hw/flags.h +++ /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 */ diff --git a/litex/soc/software/libbase/exception.c b/litex/soc/software/libbase/exception.c index 09b26399..0ac91727 100644 --- a/litex/soc/software/libbase/exception.c +++ b/litex/soc/software/libbase/exception.c @@ -6,8 +6,6 @@ void isr(void); #ifdef __or1k__ -#include - #define EXTERNAL_IRQ 0x8 static void emerg_printf(const char *fmt, ...) diff --git a/litex/soc/software/libbase/uart.c b/litex/soc/software/libbase/uart.c index 4fac827f..81aa128b 100644 --- a/litex/soc/software/libbase/uart.c +++ b/litex/soc/software/libbase/uart.c @@ -1,7 +1,6 @@ #include #include #include -#include /* * Buffer sizes must be a power of 2 so that modulos can be computed diff --git a/litex/soc/software/liblitedram/sdram.c b/litex/soc/software/liblitedram/sdram.c index 81b169cf..44cab02f 100644 --- a/litex/soc/software/liblitedram/sdram.c +++ b/litex/soc/software/liblitedram/sdram.c @@ -17,7 +17,6 @@ #include #endif #include -#include #include #include "sdram.h" diff --git a/litex/soc/software/libliteeth/udp.c b/litex/soc/software/libliteeth/udp.c index d8696213..486a2efa 100644 --- a/litex/soc/software/libliteeth/udp.c +++ b/litex/soc/software/libliteeth/udp.c @@ -14,7 +14,6 @@ #include #include #include -#include #include "udp.h" diff --git a/litex/soc/software/libliteeth/udp.h b/litex/soc/software/libliteeth/udp.h index 132ef76d..47e844b8 100644 --- a/litex/soc/software/libliteeth/udp.h +++ b/litex/soc/software/libliteeth/udp.h @@ -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) diff --git a/litex/soc/software/liblitesdcard/sdcard.c b/litex/soc/software/liblitesdcard/sdcard.c index 274f3cfa..f21f53c6 100644 --- a/litex/soc/software/liblitesdcard/sdcard.c +++ b/litex/soc/software/liblitesdcard/sdcard.c @@ -10,7 +10,6 @@ #include #include -#include #include #include "sdcard.h" diff --git a/litex/soc/software/liblitesdcard/sdcard.h b/litex/soc/software/liblitesdcard/sdcard.h index 690d85bc..10973534 100644 --- a/litex/soc/software/liblitesdcard/sdcard.h +++ b/litex/soc/software/liblitesdcard/sdcard.h @@ -6,6 +6,10 @@ #include +#define CLKGEN_STATUS_BUSY 0x1 +#define CLKGEN_STATUS_PROGDONE 0x2 +#define CLKGEN_STATUS_LOCKED 0x4 + #ifdef CSR_SDCORE_BASE #define SD_OK 0