Skip to content

Commit

Permalink
Clean up. Tested OK
Browse files Browse the repository at this point in the history
  • Loading branch information
lupyuen committed Dec 10, 2023
1 parent 2012a8f commit 95bbb85
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 41 deletions.
2 changes: 1 addition & 1 deletion arch/risc-v/src/bl808/bl808_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ void bl808_clear_bss(void)
* TODO
*
* Input Parameters:
* TODO - TODO
* mhartid - Hart ID
*
****************************************************************************/

Expand Down
3 changes: 2 additions & 1 deletion arch/risc-v/src/bl808/hardware/bl808_memorymap.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

/* Register Base Address ****************************************************/

#define BL808_PLIC_BASE 0xe0000000
#define BL808_UART3_BASE 0x30002000ul
#define BL808_PLIC_BASE 0xe0000000ul

#endif /* __ARCH_RISCV_SRC_BL808_HARDWARE_BL808_MEMORYMAP_H */
40 changes: 1 addition & 39 deletions arch/risc-v/src/bl808/hardware/bl808_uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
****************************************************************************/

#include <nuttx/config.h>
////#include "bl808_memorymap.h"

#define BL808_UART3_BASE 0x30002000ul ////
#include "bl808_memorymap.h"

/****************************************************************************
* Pre-processor Definitions
Expand Down Expand Up @@ -78,42 +76,6 @@
#define BL808_UART_FIFO_WDATA(n) (BL808_UART_BASE(n) + BL808_UART_FIFO_WDATA_OFFSET)
#define BL808_UART_FIFO_RDATA(n) (BL808_UART_BASE(n) + BL808_UART_FIFO_RDATA_OFFSET)

#define BL808_UART0_UTX_CONFIG (BL808_UART_UTX_CONFIG(0))
#define BL808_UART0_URX_CONFIG (BL808_UART_URX_CONFIG(0))
#define BL808_UART0_UART_BIT_PRD (BL808_UART_BIT_PRD(0))
#define BL808_UART0_DATA_CONFIG (BL808_UART_DATA_CONFIG(0))
#define BL808_UART0_UTX_IR_POSITION (BL808_UART_UTX_IR_POSITION(0))
#define BL808_UART0_URX_IR_POSITION (BL808_UART_URX_IR_POSITION(0))
#define BL808_UART0_URX_RTO_TIMER (BL808_UART_URX_RTO_TIMER(0))
#define BL808_UART0_UART_INT_STS (BL808_UART_INT_STS(0))
#define BL808_UART0_UART_INT_MASK (BL808_UART_INT_MASK(0))
#define BL808_UART0_UART_INT_CLEAR (BL808_UART_INT_CLEAR(0))
#define BL808_UART0_UART_INT_EN (BL808_UART_INT_EN(0))
#define BL808_UART0_UART_STATUS (BL808_UART_STATUS(0))
#define BL808_UART0_STS_URX_ABR_PRD (BL808_UART_STS_URX_ABR_PRD(0))
#define BL808_UART0_UART_FIFO_CONFIG_0 (BL808_UART_FIFO_CONFIG_0(0))
#define BL808_UART0_UART_FIFO_CONFIG_1 (BL808_UART_FIFO_CONFIG_1(0))
#define BL808_UART0_UART_FIFO_WDATA (BL808_UART_FIFO_WDATA(0))
#define BL808_UART0_UART_FIFO_RDATA (BL808_UART_FIFO_RDATA(0))

#define BL808_UART1_UTX_CONFIG (BL808_UART_UTX_CONFIG(1))
#define BL808_UART1_URX_CONFIG (BL808_UART_URX_CONFIG(1))
#define BL808_UART1_UART_BIT_PRD (BL808_UART_BIT_PRD(1))
#define BL808_UART1_DATA_CONFIG (BL808_UART_DATA_CONFIG(1))
#define BL808_UART1_UTX_IR_POSITION (BL808_UART_UTX_IR_POSITION(1))
#define BL808_UART1_URX_IR_POSITION (BL808_UART_URX_IR_POSITION(1))
#define BL808_UART1_URX_RTO_TIMER (BL808_UART_URX_RTO_TIMER(1))
#define BL808_UART1_UART_INT_STS (BL808_UART_INT_STS(1))
#define BL808_UART1_UART_INT_MASK (BL808_UART_INT_MASK(1))
#define BL808_UART1_UART_INT_CLEAR (BL808_UART_INT_CLEAR(1))
#define BL808_UART1_UART_INT_EN (BL808_UART_INT_EN(1))
#define BL808_UART1_UART_STATUS (BL808_UART_STATUS(1))
#define BL808_UART1_STS_URX_ABR_PRD (BL808_UART_STS_URX_ABR_PRD(1))
#define BL808_UART1_UART_FIFO_CONFIG_0 (BL808_UART_FIFO_CONFIG_0(1))
#define BL808_UART1_UART_FIFO_CONFIG_1 (BL808_UART_FIFO_CONFIG_1(1))
#define BL808_UART1_UART_FIFO_WDATA (BL808_UART_FIFO_WDATA(1))
#define BL808_UART1_UART_FIFO_RDATA (BL808_UART_FIFO_RDATA(1))

/* Register bit definitions *************************************************/

#define UART_UTX_CONFIG_CR_LEN_SHIFT (16)
Expand Down

0 comments on commit 95bbb85

Please sign in to comment.