mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-23 15:13:02 +00:00
b15be6bcd7
The M1 Pro/Max Macs use a different base address for the UART and the WDT than earlier models. Remove hardcoded base addresses constants and replace them with loads from the ADT. - The base address of the WDT is already retrieved in wdt_disable; also use this address when triggering a reboot. - Retrieve the base address of uart0 in uart_init. If the operation fails, the error will be signaled on the early uart (if not disabled). - The early debug UART can’t use the ADT (or shouldn’t) so it is now disabled by default. To enable it, add -DEARLY_UART -DEARLY_UART_BASE=0xuart_address to the CFLAGS. Signed-off-by: Vincent Duvert <vincent@duvert.net>
9 lines
128 B
C
9 lines
128 B
C
/* SPDX-License-Identifier: MIT */
|
|
|
|
#ifndef __WDT_H__
|
|
#define __WDT_H__
|
|
|
|
void wdt_disable(void);
|
|
void wdt_reboot(void);
|
|
|
|
#endif
|