Skip to content

Commit

Permalink
feat(platform/imx8mp-verdin): add platform
Browse files Browse the repository at this point in the history
Signed-off-by: David Cerdeira <[email protected]>
  • Loading branch information
DavidMCerdeira committed Sep 27, 2024
1 parent bdc8c50 commit a9ecdb9
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/platform/imx8mp-verdin/imx8m.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include <plat.h>
#include <imx_uart.h>

volatile struct imx_uart * const uart = UART_ADDR;

void uart_init(){
imx_uart_init(uart);
}

void uart_putc(char c){
imx_uart_putc(uart, c);
}

char uart_getchar(){
return imx_uart_getchar(uart);
}

void uart_enable_rxirq(){
imx_uart_enable_rxirq(uart);
}

void uart_clear_rxirq(){
imx_uart_clear_rxirq(uart);
}
13 changes: 13 additions & 0 deletions src/platform/imx8mp-verdin/inc/plat.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifndef PLAT_H
#define PLAT_H

#define PLAT_MEM_BASE 0x80200000
#define PLAT_MEM_SIZE 0x8000000

#define PLAT_GICD_BASE_ADDR (0x38800000)
#define PLAT_GICR_BASE_ADDR (0x38880000)

#define PLAT_UART_ADDR (0x30880000UL)
#define UART_IRQ_ID (60)

#endif
3 changes: 3 additions & 0 deletions src/platform/imx8mp-verdin/plat.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ARCH:=armv8
GIC_VERSION:=GICV3
drivers:=imx_uart
2 changes: 2 additions & 0 deletions src/platform/imx8mp-verdin/sources.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
plat_c_srcs:=imx8m.c
plat_s_srcs:=

0 comments on commit a9ecdb9

Please sign in to comment.