fusee: Complete re-write of the hardware initialization code:

- Updated code to match hekate's;
- Improved nxboot (now boots firmwares 2.x successfully);
- Temporarily disabled built-in boot system module support;
- Fixed multiple bugs.
This commit is contained in:
hexkyz
2018-08-18 17:59:33 +01:00
parent d9f83ce368
commit 320ec38be1
150 changed files with 12667 additions and 9359 deletions

View File

@@ -1,39 +1,9 @@
#ifndef FUSEE_HWINIT_H
#define FUSEE_HWINIT_H
#ifndef FUSEE_HWINIT_H_
#define FUSEE_HWINIT_H_
/* Symbols from hwinit that we're using, but w/o importing macro definitions that may clash with ours */
#define I2S_BASE 0x702D1000
#define MAKE_I2S_REG(n) MAKE_REG32(I2S_BASE + n)
#include "hwinit/types.h"
#include "hwinit/hwinit.h"
#include "hwinit/i2c.h"
void nx_hwinit();
#include <stdbool.h>
#define UART_A 0
#define UART_B 1
#define UART_C 2
#define BAUD_115200 115200
void uart_init(u32 idx, u32 baud);
void uart_wait_idle(u32 idx, u32 which);
void uart_send(u32 idx, u8 *buf, u32 len);
void uart_recv(u32 idx, u8 *buf, u32 len);
void display_init();
void display_end();
void clock_enable_fuse(u32 enable);
/*! Show one single color on the display. */
void display_color_screen(u32 color);
/*! Init display in full 1280x720 resolution (32bpp, line stride 768, framebuffer size = 1280*768*4 bytes). */
u32 *display_init_framebuffer(void *address);
/*! Enable or disable the backlight. Should only be called when the screen is completely set up, to avoid flickering. */
void display_enable_backlight(bool on);
void cluster_enable_cpu0(u64 entry, u32 ns_disable);
void mc_enable_ahb_redirect();
#endif