mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-10 01:34:12 +00:00
Configure early debug features by SoC type
To build a version with early UART support, set it in config.h Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
b15be6bcd7
commit
38fc7a0780
5 changed files with 27 additions and 6 deletions
3
config.h
3
config.h
|
@ -5,4 +5,7 @@
|
|||
|
||||
#define USE_FB
|
||||
|
||||
// Target for device-specific debug builds
|
||||
//#define TARGET T8103
|
||||
|
||||
#endif
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "cpufreq.h"
|
||||
#include "adt.h"
|
||||
#include "soc.h"
|
||||
#include "utils.h"
|
||||
|
||||
#define CLUSTER_PSTATE 0x20
|
||||
|
|
21
src/soc.h
Normal file
21
src/soc.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
#ifndef __SOC_H__
|
||||
#define __SOC_H__
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#define T8103 0x8103
|
||||
#define T6000 0x6000
|
||||
#define T6001 0x6001
|
||||
|
||||
#ifdef TARGET
|
||||
|
||||
#if TARGET == T8103
|
||||
#define EARLY_UART_BASE 0x235200000
|
||||
#elif TARGET == T6000 || TARGET == T6001
|
||||
#define EARLY_UART_BASE 0x39b200000
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -1,8 +1,6 @@
|
|||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
#if defined(EARLY_UART) && !defined(EARLY_UART_BASE)
|
||||
#error EARLY_UART_BASE must be defined to the UART base address
|
||||
#endif
|
||||
#include "soc.h"
|
||||
|
||||
#define UTRSTAT 0x010
|
||||
#define UTXH 0x020
|
||||
|
@ -153,7 +151,7 @@ cpu_reset:
|
|||
.globl debug_putc
|
||||
.type debug_putc, @function
|
||||
debug_putc:
|
||||
#ifdef EARLY_UART
|
||||
#ifdef EARLY_UART_BASE
|
||||
ldr x1, =EARLY_UART_BASE
|
||||
|
||||
1:
|
||||
|
|
|
@ -406,8 +406,6 @@ struct vector_args {
|
|||
|
||||
extern u32 board_id, chip_id;
|
||||
|
||||
#define T8103 0x8103
|
||||
|
||||
extern struct vector_args next_stage;
|
||||
|
||||
void deep_wfi(void);
|
||||
|
|
Loading…
Reference in a new issue