mirror of
https://github.com/CTCaer/hekate
synced 2024-11-16 08:59:26 +00:00
Utilize hekate's BDK for hekate main and Nyx
This commit is contained in:
parent
185526d134
commit
6e256d29c7
186 changed files with 1138 additions and 1016 deletions
9
Makefile
9
Makefile
|
@ -16,7 +16,10 @@ TARGET := hekate
|
||||||
BUILDDIR := build
|
BUILDDIR := build
|
||||||
OUTPUTDIR := output
|
OUTPUTDIR := output
|
||||||
SOURCEDIR = bootloader
|
SOURCEDIR = bootloader
|
||||||
|
BDKDIR := bdk
|
||||||
|
BDKINC := -I./$(BDKDIR)
|
||||||
VPATH = $(dir ./$(SOURCEDIR)/) $(dir $(wildcard ./$(SOURCEDIR)/*/)) $(dir $(wildcard ./$(SOURCEDIR)/*/*/))
|
VPATH = $(dir ./$(SOURCEDIR)/) $(dir $(wildcard ./$(SOURCEDIR)/*/)) $(dir $(wildcard ./$(SOURCEDIR)/*/*/))
|
||||||
|
VPATH += $(dir $(wildcard ./$(BDKDIR)/*/)) $(dir $(wildcard ./$(BDKDIR)/*/*/))
|
||||||
|
|
||||||
# Main and graphics.
|
# Main and graphics.
|
||||||
OBJS = $(addprefix $(BUILDDIR)/$(TARGET)/, \
|
OBJS = $(addprefix $(BUILDDIR)/$(TARGET)/, \
|
||||||
|
@ -54,11 +57,15 @@ OBJS += $(addprefix $(BUILDDIR)/$(TARGET)/, \
|
||||||
elfload.o elfreloc_arm.o \
|
elfload.o elfreloc_arm.o \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
GFX_INC := '"../$(SOURCEDIR)/gfx/gfx.h"'
|
||||||
|
FFCFG_INC := '"../$(SOURCEDIR)/libs/fatfs/ffconf.h"'
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
CUSTOMDEFINES := -DIPL_LOAD_ADDR=$(IPL_LOAD_ADDR) -DBL_MAGIC=$(IPL_MAGIC)
|
CUSTOMDEFINES := -DIPL_LOAD_ADDR=$(IPL_LOAD_ADDR) -DBL_MAGIC=$(IPL_MAGIC)
|
||||||
CUSTOMDEFINES += -DBL_VER_MJ=$(BLVERSION_MAJOR) -DBL_VER_MN=$(BLVERSION_MINOR) -DBL_VER_HF=$(BLVERSION_HOTFX) -DBL_RESERVED=$(BLVERSION_RSVD)
|
CUSTOMDEFINES += -DBL_VER_MJ=$(BLVERSION_MAJOR) -DBL_VER_MN=$(BLVERSION_MINOR) -DBL_VER_HF=$(BLVERSION_HOTFX) -DBL_RESERVED=$(BLVERSION_RSVD)
|
||||||
CUSTOMDEFINES += -DNYX_VER_MJ=$(NYXVERSION_MAJOR) -DNYX_VER_MN=$(NYXVERSION_MINOR) -DNYX_VER_HF=$(NYXVERSION_HOTFX) -DNYX_RESERVED=$(NYXVERSION_RSVD)
|
CUSTOMDEFINES += -DNYX_VER_MJ=$(NYXVERSION_MAJOR) -DNYX_VER_MN=$(NYXVERSION_MINOR) -DNYX_VER_HF=$(NYXVERSION_HOTFX) -DNYX_RESERVED=$(NYXVERSION_RSVD)
|
||||||
|
CUSTOMDEFINES += -DGFX_INC=$(GFX_INC) -DFFCFG_INC=$(FFCFG_INC)
|
||||||
|
|
||||||
# 0: UART_A, 1: UART_B.
|
# 0: UART_A, 1: UART_B.
|
||||||
#CUSTOMDEFINES += -DDEBUG_UART_PORT=0
|
#CUSTOMDEFINES += -DDEBUG_UART_PORT=0
|
||||||
|
@ -104,7 +111,7 @@ $(BUILDDIR)/$(TARGET)/$(TARGET).elf: $(OBJS)
|
||||||
|
|
||||||
$(BUILDDIR)/$(TARGET)/%.o: %.c
|
$(BUILDDIR)/$(TARGET)/%.o: %.c
|
||||||
@echo Building $@
|
@echo Building $@
|
||||||
@$(CC) $(CFLAGS) -c $< -o $@
|
@$(CC) $(CFLAGS) $(BDKINC) -c $< -o $@
|
||||||
|
|
||||||
$(BUILDDIR)/$(TARGET)/%.o: %.S
|
$(BUILDDIR)/$(TARGET)/%.o: %.S
|
||||||
@echo Building $@
|
@echo Building $@
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2018 naehrwert
|
* Copyright (c) 2020 CTCaer
|
||||||
* Copyright (c) 2018 M4xw
|
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms and conditions of the GNU General Public License,
|
* under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -13,29 +12,13 @@
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#ifndef _FATFS_CFG_H_
|
||||||
//TODO: Move it to BDK
|
#define _FATFS_CFG_H_
|
||||||
#include "../bootloader/utils/types.h"
|
|
||||||
|
|
||||||
typedef struct _hnode
|
#ifdef FFCFG_INC
|
||||||
{
|
#include FFCFG_INC
|
||||||
int used;
|
#endif
|
||||||
u32 size;
|
|
||||||
struct _hnode *prev;
|
|
||||||
struct _hnode *next;
|
|
||||||
u32 align[4]; // Align to arch cache line size.
|
|
||||||
} hnode_t;
|
|
||||||
|
|
||||||
typedef struct _heap
|
#endif
|
||||||
{
|
|
||||||
u32 start;
|
|
||||||
hnode_t *first;
|
|
||||||
} heap_t;
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
u32 total;
|
|
||||||
u32 used;
|
|
||||||
} heap_monitor_t;
|
|
19
bdk/gfx/di.c
19
bdk/gfx/di.c
|
@ -18,16 +18,15 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "di.h"
|
#include "di.h"
|
||||||
#include "../gfx/gfx.h"
|
#include <power/max77620.h>
|
||||||
#include "../power/max77620.h"
|
#include <power/max7762x.h>
|
||||||
#include "../power/max7762x.h"
|
#include <soc/clock.h>
|
||||||
#include "../soc/clock.h"
|
#include <soc/gpio.h>
|
||||||
#include "../soc/gpio.h"
|
#include <soc/i2c.h>
|
||||||
#include "../soc/i2c.h"
|
#include <soc/pinmux.h>
|
||||||
#include "../soc/pinmux.h"
|
#include <soc/pmc.h>
|
||||||
#include "../soc/pmc.h"
|
#include <soc/t210.h>
|
||||||
#include "../soc/t210.h"
|
#include <utils/util.h>
|
||||||
#include "../utils/util.h"
|
|
||||||
|
|
||||||
#include "di.inl"
|
#include "di.inl"
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
#ifndef _DI_H_
|
#ifndef _DI_H_
|
||||||
#define _DI_H_
|
#define _DI_H_
|
||||||
|
|
||||||
#include "../../common/memory_map.h"
|
#include <memory_map.h>
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
/*! Display registers. */
|
/*! Display registers. */
|
||||||
#define _DIREG(reg) ((reg) * 4)
|
#define _DIREG(reg) ((reg) * 4)
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Common Gfx Header
|
* Copyright (c) 2020 CTCaer
|
||||||
* Copyright (c) 2018 naehrwert
|
|
||||||
* Copyright (c) 2018 CTCaer
|
|
||||||
* Copyright (c) 2018 M4xw
|
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms and conditions of the GNU General Public License,
|
* under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -15,30 +12,13 @@
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#ifndef _GFX_UTILS_H_
|
||||||
//TODO: Move it to BDK
|
#define _GFX_UTILS_H_
|
||||||
#include "../bootloader/utils/types.h"
|
|
||||||
|
|
||||||
typedef struct _gfx_ctxt_t
|
#ifdef GFX_INC
|
||||||
{
|
#include GFX_INC
|
||||||
u32 *fb;
|
#endif
|
||||||
u32 width;
|
|
||||||
u32 height;
|
|
||||||
u32 stride;
|
|
||||||
} gfx_ctxt_t;
|
|
||||||
|
|
||||||
typedef struct _gfx_con_t
|
#endif
|
||||||
{
|
|
||||||
gfx_ctxt_t *gfx_ctxt;
|
|
||||||
u32 fntsz;
|
|
||||||
u32 x;
|
|
||||||
u32 y;
|
|
||||||
u32 savedx;
|
|
||||||
u32 savedy;
|
|
||||||
u32 fgcol;
|
|
||||||
int fillbg;
|
|
||||||
u32 bgcol;
|
|
||||||
bool mute;
|
|
||||||
} gfx_con_t;
|
|
|
@ -22,10 +22,10 @@
|
||||||
#include "elfarch.h"
|
#include "elfarch.h"
|
||||||
#include "elf.h"
|
#include "elf.h"
|
||||||
|
|
||||||
#include "../../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#include "../../gfx/gfx.h"
|
#include <gfx_utils.h>
|
||||||
#define EL_DEBUG(format, ...) \
|
#define EL_DEBUG(format, ...) \
|
||||||
gfx_printf(format __VA_OPT__(, ) __VA_ARGS__)
|
gfx_printf(format __VA_OPT__(, ) __VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -18,12 +18,13 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "ianos.h"
|
#include "ianos.h"
|
||||||
#include "../../common/common_module.h"
|
#include "elfload/elfload.h"
|
||||||
#include "../gfx/gfx.h"
|
#include <module.h>
|
||||||
#include "../libs/elfload/elfload.h"
|
#include <mem/heap.h>
|
||||||
#include "../mem/heap.h"
|
#include <storage/nx_sd.h>
|
||||||
#include "../storage/nx_sd.h"
|
#include <utils/types.h>
|
||||||
#include "../utils/types.h"
|
|
||||||
|
#include <gfx_utils.h>
|
||||||
|
|
||||||
#define IRAM_LIB_ADDR 0x4002B000
|
#define IRAM_LIB_ADDR 0x4002B000
|
||||||
#define DRAM_LIB_ADDR 0xE0000000
|
#define DRAM_LIB_ADDR 0xE0000000
|
||||||
|
@ -36,8 +37,8 @@ void *fileBuf = NULL;
|
||||||
static void _ianos_call_ep(moduleEntrypoint_t entrypoint, void *moduleConfig)
|
static void _ianos_call_ep(moduleEntrypoint_t entrypoint, void *moduleConfig)
|
||||||
{
|
{
|
||||||
bdkParams_t bdkParameters = (bdkParams_t)malloc(sizeof(struct _bdkParams_t));
|
bdkParams_t bdkParameters = (bdkParams_t)malloc(sizeof(struct _bdkParams_t));
|
||||||
bdkParameters->gfxCon = &gfx_con;
|
bdkParameters->gfxCon = (void *)&gfx_con;
|
||||||
bdkParameters->gfxCtx = &gfx_ctxt;
|
bdkParameters->gfxCtx = (void *)&gfx_ctxt;
|
||||||
bdkParameters->memcpy = (memcpy_t)&memcpy;
|
bdkParameters->memcpy = (memcpy_t)&memcpy;
|
||||||
bdkParameters->memset = (memset_t)&memset;
|
bdkParameters->memset = (memset_t)&memset;
|
||||||
bdkParameters->sharedHeap = &_heap;
|
bdkParameters->sharedHeap = &_heap;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#ifndef IANOS_H
|
#ifndef IANOS_H
|
||||||
#define IANOS_H
|
#define IANOS_H
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,11 +17,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "als.h"
|
#include "als.h"
|
||||||
#include "../power/max77620.h"
|
#include <power/max77620.h>
|
||||||
#include "../soc/clock.h"
|
#include <soc/clock.h>
|
||||||
#include "../soc/i2c.h"
|
#include <soc/i2c.h>
|
||||||
#include "../soc/pinmux.h"
|
#include <soc/pinmux.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
|
|
||||||
#define HOS_GAIN BH1730_GAIN_64X
|
#define HOS_GAIN BH1730_GAIN_64X
|
||||||
#define HOS_ITIME 38
|
#define HOS_ITIME 38
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef __ALS_H_
|
#ifndef __ALS_H_
|
||||||
#define __ALS_H_
|
#define __ALS_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
#define BH1730_I2C_ADDR 0x29
|
#define BH1730_I2C_ADDR 0x29
|
||||||
|
|
||||||
|
|
|
@ -19,19 +19,19 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "joycon.h"
|
#include "joycon.h"
|
||||||
#include "../gfx/gfx.h"
|
#include <gfx_utils.h>
|
||||||
#include "../power/max17050.h"
|
#include <power/max17050.h>
|
||||||
#include "../power/regulator_5v.h"
|
#include <power/regulator_5v.h>
|
||||||
#include "../soc/bpmp.h"
|
#include <soc/bpmp.h>
|
||||||
#include "../soc/clock.h"
|
#include <soc/clock.h>
|
||||||
#include "../soc/gpio.h"
|
#include <soc/gpio.h>
|
||||||
#include "../soc/pinmux.h"
|
#include <soc/pinmux.h>
|
||||||
#include "../soc/uart.h"
|
#include <soc/uart.h>
|
||||||
#include "../soc/t210.h"
|
#include <soc/t210.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
|
|
||||||
// For disabling driver when logging is enabled.
|
// For disabling driver when logging is enabled.
|
||||||
#include "../libs/lvgl/lvgl.h"
|
#include <libs/lv_conf.h>
|
||||||
|
|
||||||
#define JC_WIRED_CMD 0x91
|
#define JC_WIRED_CMD 0x91
|
||||||
#define JC_WIRED_HID 0x92
|
#define JC_WIRED_HID 0x92
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef __JOYCON_H_
|
#ifndef __JOYCON_H_
|
||||||
#define __JOYCON_H_
|
#define __JOYCON_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
#define JC_BTNS_DIRECTION_PAD 0xF0000
|
#define JC_BTNS_DIRECTION_PAD 0xF0000
|
||||||
#define JC_BTNS_PREV_NEXT 0x800080
|
#define JC_BTNS_PREV_NEXT 0x800080
|
||||||
|
|
|
@ -19,19 +19,19 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "../soc/clock.h"
|
#include <soc/clock.h>
|
||||||
#include "../soc/i2c.h"
|
#include <soc/i2c.h>
|
||||||
#include "../soc/pinmux.h"
|
#include <soc/pinmux.h>
|
||||||
#include "../power/max7762x.h"
|
#include <power/max7762x.h>
|
||||||
#include "../power/max77620.h"
|
#include <power/max77620.h>
|
||||||
#include "../soc/gpio.h"
|
#include <soc/gpio.h>
|
||||||
#include "../soc/t210.h"
|
#include <soc/t210.h>
|
||||||
#include "../utils/btn.h"
|
#include <utils/btn.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
#include "touch.h"
|
#include "touch.h"
|
||||||
|
|
||||||
|
|
||||||
#include "../gfx/gfx.h"
|
#include <gfx_utils.h>
|
||||||
#define DPRINTF(...) gfx_printf(__VA_ARGS__)
|
#define DPRINTF(...) gfx_printf(__VA_ARGS__)
|
||||||
|
|
||||||
static int touch_command(u8 cmd, u8 *buf, u8 size)
|
static int touch_command(u8 cmd, u8 *buf, u8 size)
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#ifndef __TOUCH_H_
|
#ifndef __TOUCH_H_
|
||||||
#define __TOUCH_H_
|
#define __TOUCH_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
#define STMFTS_I2C_ADDR 0x49
|
#define STMFTS_I2C_ADDR 0x49
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#ifndef _BLZ_H_
|
#ifndef _BLZ_H_
|
||||||
#define _BLZ_H_
|
#define _BLZ_H_
|
||||||
|
|
||||||
#include "../../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
typedef struct _blz_footer
|
typedef struct _blz_footer
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
/* Status of Disk Functions */
|
/* Status of Disk Functions */
|
||||||
typedef BYTE DSTATUS;
|
typedef BYTE DSTATUS;
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
#include "ff.h" /* Declarations of FatFs API */
|
#include "ff.h" /* Declarations of FatFs API */
|
||||||
#include "diskio.h" /* Declarations of device I/O functions */
|
#include "diskio.h" /* Declarations of device I/O functions */
|
||||||
#include "../../gfx/gfx.h"
|
#include <gfx_utils.h>
|
||||||
|
|
||||||
#define EFSPRINTF(text, ...) print_error(); gfx_printf("%k"text"%k\n", 0xFFFFFF00, 0xFFFFFFFF);
|
#define EFSPRINTF(text, ...) print_error(); gfx_printf("%k"text"%k\n", 0xFFFFFF00, 0xFFFFFFFF);
|
||||||
//#define EFSPRINTF(...)
|
//#define EFSPRINTF(...)
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../../utils/types.h" /* Basic integer types */
|
#include <utils/types.h> /* Basic integer types */
|
||||||
#include "ffconf.h" /* FatFs configuration options */
|
#include <fatfs_cfg.h> /* FatFs configuration options */
|
||||||
|
|
||||||
#if FF_DEFINED != FFCONF_DEF
|
#if FF_DEFINED != FFCONF_DEF
|
||||||
#error Wrong configuration file (ffconf.h).
|
#error Wrong configuration file (ffconf.h).
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
#ifndef LV_CONF_H
|
#ifndef LV_CONF_H
|
||||||
#define LV_CONF_H
|
#define LV_CONF_H
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
#include "../../../common/memory_map.h"
|
#include <memory_map.h>
|
||||||
/*===================
|
/*===================
|
||||||
Dynamic memory
|
Dynamic memory
|
||||||
*===================*/
|
*===================*/
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
# define LV_MEM_ADR NYX_LV_MEM_ADR /*Set an address for memory pool instead of allocation it as an array. Can be in external SRAM too.*/
|
# define LV_MEM_ADR NYX_LV_MEM_ADR /*Set an address for memory pool instead of allocation it as an array. Can be in external SRAM too.*/
|
||||||
# define LV_MEM_AUTO_DEFRAG 1 /*Automatically defrag on free*/
|
# define LV_MEM_AUTO_DEFRAG 1 /*Automatically defrag on free*/
|
||||||
#else /*LV_MEM_CUSTOM*/
|
#else /*LV_MEM_CUSTOM*/
|
||||||
# define LV_MEM_CUSTOM_INCLUDE "../../../mem/heap.h" /*Header for the dynamic memory function*/
|
# define LV_MEM_CUSTOM_INCLUDE <mem/heap.h> /*Header for the dynamic memory function*/
|
||||||
# define LV_MEM_CUSTOM_ALLOC malloc /*Wrapper to malloc*/
|
# define LV_MEM_CUSTOM_ALLOC malloc /*Wrapper to malloc*/
|
||||||
# define LV_MEM_CUSTOM_FREE free /*Wrapper to free*/
|
# define LV_MEM_CUSTOM_FREE free /*Wrapper to free*/
|
||||||
#endif /*LV_MEM_CUSTOM*/
|
#endif /*LV_MEM_CUSTOM*/
|
||||||
|
@ -149,7 +149,7 @@
|
||||||
/*HAL settings*/
|
/*HAL settings*/
|
||||||
#define LV_TICK_CUSTOM 1 /*1: use a custom tick source (removing the need to manually update the tick with `lv_tick_inc`) */
|
#define LV_TICK_CUSTOM 1 /*1: use a custom tick source (removing the need to manually update the tick with `lv_tick_inc`) */
|
||||||
#if LV_TICK_CUSTOM == 1
|
#if LV_TICK_CUSTOM == 1
|
||||||
#define LV_TICK_CUSTOM_INCLUDE "../../../utils/util.h" /*Header for the sys time function*/
|
#define LV_TICK_CUSTOM_INCLUDE <utils/util.h> /*Header for the sys time function*/
|
||||||
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (get_tmr_ms()) /*Expression evaluating to current systime in ms*/
|
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (get_tmr_ms()) /*Expression evaluating to current systime in ms*/
|
||||||
#endif /*LV_TICK_CUSTOM*/
|
#endif /*LV_TICK_CUSTOM*/
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "../lv_misc/lv_font.h"
|
#include "../lv_misc/lv_font.h"
|
||||||
|
|
||||||
#include "../../../../../common/memory_map.h"
|
#include <memory_map.h>
|
||||||
|
|
||||||
#if USE_HEKATE_SYMBOL_120 != 0 /*Can be enabled in lv_conf.h*/
|
#if USE_HEKATE_SYMBOL_120 != 0 /*Can be enabled in lv_conf.h*/
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "../lv_misc/lv_font.h"
|
#include "../lv_misc/lv_font.h"
|
||||||
|
|
||||||
#include "../../../../../common/memory_map.h"
|
#include <memory_map.h>
|
||||||
|
|
||||||
#if USE_HEKATE_SYMBOL_20 != 0 /*Can be enabled in lv_conf.h*/
|
#if USE_HEKATE_SYMBOL_20 != 0 /*Can be enabled in lv_conf.h*/
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "../lv_misc/lv_font.h"
|
#include "../lv_misc/lv_font.h"
|
||||||
|
|
||||||
#include "../../../../../common/memory_map.h"
|
#include <memory_map.h>
|
||||||
|
|
||||||
#if USE_HEKATE_SYMBOL_30 != 0 /*Can be enabled in lv_conf.h*/
|
#if USE_HEKATE_SYMBOL_30 != 0 /*Can be enabled in lv_conf.h*/
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "../lv_misc/lv_font.h"
|
#include "../lv_misc/lv_font.h"
|
||||||
|
|
||||||
#include "../../../../../common/memory_map.h"
|
#include <memory_map.h>
|
||||||
|
|
||||||
#if USE_INTERUI_20 != 0 /*Can be enabled in lv_conf.h*/
|
#if USE_INTERUI_20 != 0 /*Can be enabled in lv_conf.h*/
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "../lv_misc/lv_font.h"
|
#include "../lv_misc/lv_font.h"
|
||||||
|
|
||||||
#include "../../../../../common/memory_map.h"
|
#include <memory_map.h>
|
||||||
|
|
||||||
#if USE_INTERUI_30 != 0 /*Can be enabled in lv_conf.h*/
|
#if USE_INTERUI_30 != 0 /*Can be enabled in lv_conf.h*/
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#include "../lv_misc/lv_font.h"
|
#include "../lv_misc/lv_font.h"
|
||||||
|
|
||||||
#include "../../../../../common/memory_map.h"
|
#include <memory_map.h>
|
||||||
|
|
||||||
#if USE_UBUNTU_MONO != 0 /*Can be enabled in lv_conf.h*/
|
#if USE_UBUNTU_MONO != 0 /*Can be enabled in lv_conf.h*/
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ extern "C" {
|
||||||
*********************/
|
*********************/
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "lv_hal.h"
|
#include "lv_hal.h"
|
||||||
#include "../../../utils/types.h"
|
#include <utils/types.h>
|
||||||
#include "../lv_misc/lv_area.h"
|
#include "../lv_misc/lv_area.h"
|
||||||
#include "../lv_core/lv_obj.h"
|
#include "../lv_core/lv_obj.h"
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ extern "C" {
|
||||||
* INCLUDES
|
* INCLUDES
|
||||||
*********************/
|
*********************/
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "../../../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
/*********************
|
/*********************
|
||||||
* DEFINES
|
* DEFINES
|
||||||
|
|
|
@ -16,7 +16,7 @@ extern "C" {
|
||||||
*********************/
|
*********************/
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include "lv_area.h"
|
#include "lv_area.h"
|
||||||
#include "../../../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
/*********************
|
/*********************
|
||||||
* DEFINES
|
* DEFINES
|
||||||
|
|
|
@ -11,9 +11,9 @@
|
||||||
|
|
||||||
#if LV_LOG_PRINTF
|
#if LV_LOG_PRINTF
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "../../../mem/heap.h"
|
#include <mem/heap.h>
|
||||||
#include "../../../soc/uart.h"
|
#include <soc/uart.h>
|
||||||
#include "../../../utils/sprintf.h"
|
#include <utils/sprintf.h>
|
||||||
#endif
|
#endif
|
||||||
/*********************
|
/*********************
|
||||||
* DEFINES
|
* DEFINES
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2018 naehrwert
|
* Copyright (c) 2018 naehrwert
|
||||||
* Copyright (c) 2018-2020 CTCaer
|
* Copyright (c) 2018-2020 CTCaer
|
||||||
* Copyright (c) 2018 M4xw
|
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms and conditions of the GNU General Public License,
|
* under the terms and conditions of the GNU General Public License,
|
||||||
|
@ -18,8 +17,7 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "heap.h"
|
#include "heap.h"
|
||||||
#include "../gfx/gfx.h"
|
#include <gfx_utils.h>
|
||||||
#include "../../common/common_heap.h"
|
|
||||||
|
|
||||||
static void _heap_create(heap_t *heap, u32 start)
|
static void _heap_create(heap_t *heap, u32 start)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,8 +18,28 @@
|
||||||
#ifndef _HEAP_H_
|
#ifndef _HEAP_H_
|
||||||
#define _HEAP_H_
|
#define _HEAP_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
#include "../../common/common_heap.h"
|
|
||||||
|
typedef struct _hnode
|
||||||
|
{
|
||||||
|
int used;
|
||||||
|
u32 size;
|
||||||
|
struct _hnode *prev;
|
||||||
|
struct _hnode *next;
|
||||||
|
u32 align[4]; // Align to arch cache line size.
|
||||||
|
} hnode_t;
|
||||||
|
|
||||||
|
typedef struct _heap
|
||||||
|
{
|
||||||
|
u32 start;
|
||||||
|
hnode_t *first;
|
||||||
|
} heap_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
u32 total;
|
||||||
|
u32 used;
|
||||||
|
} heap_monitor_t;
|
||||||
|
|
||||||
void heap_init(u32 base);
|
void heap_init(u32 base);
|
||||||
void heap_copy(heap_t *heap);
|
void heap_copy(heap_t *heap);
|
||||||
|
|
25
bdk/mem/mc.c
25
bdk/mem/mc.c
|
@ -1,7 +1,24 @@
|
||||||
#include "../mem/mc.h"
|
/*
|
||||||
#include "../soc/t210.h"
|
* Copyright (c) 2018 naehrwert
|
||||||
#include "../soc/clock.h"
|
* Copyright (c) 2018 CTCaer
|
||||||
#include "../utils/util.h"
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms and conditions of the GNU General Public License,
|
||||||
|
* version 2, as published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <mem/mc.h>
|
||||||
|
#include <soc/t210.h>
|
||||||
|
#include <soc/clock.h>
|
||||||
|
#include <utils/util.h>
|
||||||
|
|
||||||
void mc_config_tsec_carveout(u32 bom, u32 size1mb, bool lock)
|
void mc_config_tsec_carveout(u32 bom, u32 size1mb, bool lock)
|
||||||
{
|
{
|
||||||
|
|
20
bdk/mem/mc.h
20
bdk/mem/mc.h
|
@ -1,8 +1,24 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2018 naehrwert
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms and conditions of the GNU General Public License,
|
||||||
|
* version 2, as published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef _MC_H_
|
#ifndef _MC_H_
|
||||||
#define _MC_H_
|
#define _MC_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
#include "../mem/mc_t210.h"
|
#include <mem/mc_t210.h>
|
||||||
|
|
||||||
void mc_config_tsec_carveout(u32 bom, u32 size1mb, bool lock);
|
void mc_config_tsec_carveout(u32 bom, u32 size1mb, bool lock);
|
||||||
void mc_config_carveout();
|
void mc_config_carveout();
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "minerva.h"
|
#include "minerva.h"
|
||||||
#include "../soc/fuse.h"
|
|
||||||
#include "../utils/util.h"
|
|
||||||
|
|
||||||
#include "../soc/clock.h"
|
#include <soc/clock.h>
|
||||||
#include "../ianos/ianos.h"
|
#include <ianos/ianos.h>
|
||||||
#include "../soc/fuse.h"
|
#include <soc/clock.h>
|
||||||
#include "../soc/t210.h"
|
#include <soc/fuse.h>
|
||||||
|
#include <soc/t210.h>
|
||||||
|
#include <utils/util.h>
|
||||||
|
|
||||||
extern volatile nyx_storage_t *nyx_str;
|
extern volatile nyx_storage_t *nyx_str;
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#define _FE_MINERVA_H_
|
#define _FE_MINERVA_H_
|
||||||
|
|
||||||
#include "mtc_table.h"
|
#include "mtc_table.h"
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
#define MTC_INIT_MAGIC 0x3043544D
|
#define MTC_INIT_MAGIC 0x3043544D
|
||||||
#define MTC_NEW_MAGIC 0x5243544D
|
#define MTC_NEW_MAGIC 0x5243544D
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#ifndef _MTC_TABLE_H_
|
#ifndef _MTC_TABLE_H_
|
||||||
#define _MTC_TABLE_H_
|
#define _MTC_TABLE_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,23 +18,23 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "mc.h"
|
#include <mem/mc.h>
|
||||||
#include "emc.h"
|
#include <mem/emc.h>
|
||||||
#include "sdram_param_t210.h"
|
#include <mem/sdram_param_t210.h>
|
||||||
#include "../../common/memory_map.h"
|
#include <memory_map.h>
|
||||||
#include "../power/max77620.h"
|
#include <power/max77620.h>
|
||||||
#include "../power/max7762x.h"
|
#include <power/max7762x.h>
|
||||||
#include "../soc/clock.h"
|
#include <soc/clock.h>
|
||||||
#include "../soc/fuse.h"
|
#include <soc/fuse.h>
|
||||||
#include "../soc/i2c.h"
|
#include <soc/i2c.h>
|
||||||
#include "../soc/pmc.h"
|
#include <soc/pmc.h>
|
||||||
#include "../soc/t210.h"
|
#include <soc/t210.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
|
|
||||||
#define CONFIG_SDRAM_KEEP_ALIVE
|
#define CONFIG_SDRAM_KEEP_ALIVE
|
||||||
|
|
||||||
#ifdef CONFIG_SDRAM_COMPRESS_CFG
|
#ifdef CONFIG_SDRAM_COMPRESS_CFG
|
||||||
#include "../libs/compr/lz.h"
|
#include <libs/compr/lz.h>
|
||||||
#include "sdram_config_lz.inl"
|
#include "sdram_config_lz.inl"
|
||||||
#else
|
#else
|
||||||
#include "sdram_config.inl"
|
#include "sdram_config.inl"
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
#ifndef _SDRAM_H_
|
#ifndef _SDRAM_H_
|
||||||
#define _SDRAM_H_
|
#define _SDRAM_H_
|
||||||
|
|
||||||
#include "emc.h"
|
#include <mem/emc.h>
|
||||||
#include "sdram_param_t210.h"
|
#include <mem/sdram_param_t210.h>
|
||||||
|
|
||||||
void sdram_init();
|
void sdram_init();
|
||||||
sdram_params_t *sdram_get_params();
|
sdram_params_t *sdram_get_params();
|
||||||
|
|
|
@ -14,9 +14,9 @@
|
||||||
* more details.
|
* more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../soc/t210.h"
|
#include <soc/t210.h>
|
||||||
#include "../soc/pmc_lp0_t210.h"
|
#include <soc/pmc_lp0_t210.h>
|
||||||
#include "sdram_lp0_param_t210.h"
|
#include <mem/sdram_lp0_param_t210.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function reads SDRAM parameters from the common BCT format and
|
* This function reads SDRAM parameters from the common BCT format and
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#ifndef __SOC_NVIDIA_TEGRA210_SDRAM_PARAM_H__
|
#ifndef __SOC_NVIDIA_TEGRA210_SDRAM_PARAM_H__
|
||||||
#define __SOC_NVIDIA_TEGRA210_SDRAM_PARAM_H__
|
#define __SOC_NVIDIA_TEGRA210_SDRAM_PARAM_H__
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,12 +17,12 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "smmu.h"
|
#include <soc/ccplex.h>
|
||||||
#include "../soc/ccplex.h"
|
#include <soc/t210.h>
|
||||||
#include "../soc/t210.h"
|
#include <mem/mc_t210.h>
|
||||||
#include "../mem/mc_t210.h"
|
#include <mem/smmu.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
#include "../utils/aarch64_util.h"
|
#include <utils/aarch64_util.h>
|
||||||
|
|
||||||
bool smmu_used = false;
|
bool smmu_used = false;
|
||||||
u8 *_pageheap = (u8 *)SMMU_HEAP_ADDR;
|
u8 *_pageheap = (u8 *)SMMU_HEAP_ADDR;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
#define SMMU_HEAP_ADDR 0xA0000000
|
#define SMMU_HEAP_ADDR 0xA0000000
|
||||||
|
|
||||||
|
|
14
bdk/module.h
14
bdk/module.h
|
@ -15,11 +15,11 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#ifndef _MODULE_H_
|
||||||
|
#define _MODULE_H_
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
//TODO: Move it to BDK
|
#include <mem/heap.h>
|
||||||
#include "common_gfx.h"
|
|
||||||
#include "common_heap.h"
|
|
||||||
|
|
||||||
// Module Callback
|
// Module Callback
|
||||||
typedef void (*cbMainModule_t)(const char *s);
|
typedef void (*cbMainModule_t)(const char *s);
|
||||||
|
@ -28,8 +28,8 @@ typedef void (*memset_t)(void *, int, size_t);
|
||||||
|
|
||||||
typedef struct _bdkParams_t
|
typedef struct _bdkParams_t
|
||||||
{
|
{
|
||||||
gfx_con_t *gfxCon;
|
void *gfxCon;
|
||||||
gfx_ctxt_t *gfxCtx;
|
void *gfxCtx;
|
||||||
heap_t *sharedHeap;
|
heap_t *sharedHeap;
|
||||||
memcpy_t memcpy;
|
memcpy_t memcpy;
|
||||||
memset_t memset;
|
memset_t memset;
|
||||||
|
@ -37,3 +37,5 @@ typedef struct _bdkParams_t
|
||||||
|
|
||||||
// Module Entrypoint
|
// Module Entrypoint
|
||||||
typedef void (*moduleEntrypoint_t)(void *, bdkParams_t);
|
typedef void (*moduleEntrypoint_t)(void *, bdkParams_t);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "bq24193.h"
|
#include "bq24193.h"
|
||||||
#include "../soc/i2c.h"
|
#include <soc/i2c.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
|
|
||||||
static u8 bq24193_get_reg(u8 reg)
|
static u8 bq24193_get_reg(u8 reg)
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "max17050.h"
|
#include "max17050.h"
|
||||||
#include "../soc/i2c.h"
|
#include <soc/i2c.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
|
|
||||||
/* Status register bits */
|
/* Status register bits */
|
||||||
#define STATUS_POR_BIT (1 << 1)
|
#define STATUS_POR_BIT (1 << 1)
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#ifndef __MAX17050_H_
|
#ifndef __MAX17050_H_
|
||||||
#define __MAX17050_H_
|
#define __MAX17050_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
#define MAX17050_STATUS_BattAbsent (1 << 3)
|
#define MAX17050_STATUS_BattAbsent (1 << 3)
|
||||||
#define MAX17050_DEFAULT_SNS_RESISTOR 10000
|
#define MAX17050_DEFAULT_SNS_RESISTOR 10000
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "max7762x.h"
|
#include <power/max7762x.h>
|
||||||
#include "max77620.h"
|
#include <power/max77620.h>
|
||||||
#include "../soc/i2c.h"
|
#include <soc/i2c.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
|
|
||||||
#define REGULATOR_SD 0
|
#define REGULATOR_SD 0
|
||||||
#define REGULATOR_LDO 1
|
#define REGULATOR_LDO 1
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#ifndef _MAX7762X_H_
|
#ifndef _MAX7762X_H_
|
||||||
#define _MAX7762X_H_
|
#define _MAX7762X_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Switch Power domains (max77620):
|
* Switch Power domains (max77620):
|
||||||
|
|
|
@ -14,11 +14,11 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../soc/gpio.h"
|
#include <soc/gpio.h>
|
||||||
#include "../soc/pinmux.h"
|
#include <soc/pinmux.h>
|
||||||
#include "../soc/pmc.h"
|
#include <soc/pmc.h>
|
||||||
#include "../soc/t210.h"
|
#include <soc/t210.h>
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
static u8 reg_5v_dev = 0;
|
static u8 reg_5v_dev = 0;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#ifndef _REGULATOR_5V_H_
|
#ifndef _REGULATOR_5V_H_
|
||||||
#define _REGULATOR_5V_H_
|
#define _REGULATOR_5V_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "max77620-rtc.h"
|
#include <rtc/max77620-rtc.h>
|
||||||
#include "../soc/i2c.h"
|
#include <soc/i2c.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
|
|
||||||
void max77620_rtc_get_time(rtc_time_t *time)
|
void max77620_rtc_get_time(rtc_time_t *time)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef _MFD_MAX77620_RTC_H_
|
#ifndef _MFD_MAX77620_RTC_H_
|
||||||
#define _MFD_MAX77620_RTC_H_
|
#define _MFD_MAX77620_RTC_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
#define MAX77620_RTC_I2C_ADDR 0x68
|
#define MAX77620_RTC_I2C_ADDR 0x68
|
||||||
|
|
||||||
|
|
12
bdk/sec/se.c
12
bdk/sec/se.c
|
@ -17,12 +17,12 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "../sec/se.h"
|
#include "se.h"
|
||||||
#include "../mem/heap.h"
|
#include "se_t210.h"
|
||||||
#include "../soc/bpmp.h"
|
#include <mem/heap.h>
|
||||||
#include "../soc/t210.h"
|
#include <soc/bpmp.h>
|
||||||
#include "../sec/se_t210.h"
|
#include <soc/t210.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
|
|
||||||
typedef struct _se_ll_t
|
typedef struct _se_ll_t
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#ifndef _SE_H_
|
#ifndef _SE_H_
|
||||||
#define _SE_H_
|
#define _SE_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
void se_rsa_acc_ctrl(u32 rs, u32 flags);
|
void se_rsa_acc_ctrl(u32 rs, u32 flags);
|
||||||
void se_key_acc_ctrl(u32 ks, u32 flags);
|
void se_key_acc_ctrl(u32 ks, u32 flags);
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#ifndef _CRYPTO_TEGRA_SE_H
|
#ifndef _CRYPTO_TEGRA_SE_H
|
||||||
#define _CRYPTO_TEGRA_SE_H
|
#define _CRYPTO_TEGRA_SE_H
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
#define TEGRA_SE_CRA_PRIORITY 300
|
#define TEGRA_SE_CRA_PRIORITY 300
|
||||||
#define TEGRA_SE_COMPOSITE_PRIORITY 400
|
#define TEGRA_SE_COMPOSITE_PRIORITY 400
|
||||||
|
|
|
@ -18,19 +18,19 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "../sec/tsec.h"
|
#include "tsec.h"
|
||||||
#include "../sec/tsec_t210.h"
|
#include "tsec_t210.h"
|
||||||
#include "../sec/se_t210.h"
|
#include <sec/se_t210.h>
|
||||||
#include "../soc/bpmp.h"
|
#include <soc/bpmp.h>
|
||||||
#include "../soc/clock.h"
|
#include <soc/clock.h>
|
||||||
#include "../soc/kfuse.h"
|
#include <soc/kfuse.h>
|
||||||
#include "../soc/smmu.h"
|
#include <soc/t210.h>
|
||||||
#include "../soc/t210.h"
|
#include <mem/heap.h>
|
||||||
#include "../mem/heap.h"
|
#include <mem/mc.h>
|
||||||
#include "../mem/mc.h"
|
#include <mem/smmu.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
|
|
||||||
// #include "../gfx/gfx.h"
|
// #include <gfx_utils.h>
|
||||||
|
|
||||||
#define PKG11_MAGIC 0x31314B50
|
#define PKG11_MAGIC 0x31314B50
|
||||||
#define KB_TSEC_FW_EMU_COMPAT 6 // KB ID for HOS 6.2.0.
|
#define KB_TSEC_FW_EMU_COMPAT 6 // KB ID for HOS 6.2.0.
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#ifndef _TSEC_H_
|
#ifndef _TSEC_H_
|
||||||
#define _TSEC_H_
|
#define _TSEC_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
typedef struct _tsec_ctxt_t
|
typedef struct _tsec_ctxt_t
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,11 +16,11 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "bpmp.h"
|
#include <soc/bpmp.h>
|
||||||
#include "clock.h"
|
#include <soc/clock.h>
|
||||||
#include "t210.h"
|
#include <soc/t210.h>
|
||||||
#include "../../common/memory_map.h"
|
#include <memory_map.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
|
|
||||||
#define BPMP_MMU_CACHE_LINE_SIZE 0x20
|
#define BPMP_MMU_CACHE_LINE_SIZE 0x20
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef _BPMP_H_
|
#ifndef _BPMP_H_
|
||||||
#define _BPMP_H_
|
#define _BPMP_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,14 +14,14 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../soc/ccplex.h"
|
#include <soc/ccplex.h>
|
||||||
#include "../soc/i2c.h"
|
#include <soc/i2c.h>
|
||||||
#include "../soc/clock.h"
|
#include <soc/clock.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
#include "../soc/pmc.h"
|
#include <soc/pmc.h>
|
||||||
#include "../soc/t210.h"
|
#include <soc/t210.h>
|
||||||
#include "../power/max77620.h"
|
#include <power/max77620.h>
|
||||||
#include "../power/max7762x.h"
|
#include <power/max7762x.h>
|
||||||
|
|
||||||
void _ccplex_enable_power()
|
void _ccplex_enable_power()
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#ifndef _CCPLEX_H_
|
#ifndef _CCPLEX_H_
|
||||||
#define _CCPLEX_H_
|
#define _CCPLEX_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
void ccplex_boot_cpu0(u32 entry);
|
void ccplex_boot_cpu0(u32 entry);
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../soc/clock.h"
|
#include <soc/clock.h>
|
||||||
#include "../soc/t210.h"
|
#include <soc/t210.h>
|
||||||
#include "../utils/util.h"
|
#include <storage/sdmmc.h>
|
||||||
#include "../storage/sdmmc.h"
|
#include <utils/util.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CLOCK Peripherals:
|
* CLOCK Peripherals:
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#ifndef _CLOCK_H_
|
#ifndef _CLOCK_H_
|
||||||
#define _CLOCK_H_
|
#define _CLOCK_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
/*! Clock registers. */
|
/*! Clock registers. */
|
||||||
#define CLK_RST_CONTROLLER_RST_SOURCE 0x0
|
#define CLK_RST_CONTROLLER_RST_SOURCE 0x0
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "../soc/fuse.h"
|
#include <soc/fuse.h>
|
||||||
#include "../soc/t210.h"
|
#include <soc/t210.h>
|
||||||
|
|
||||||
#define ARRAYSIZE(x) (sizeof(x) / sizeof(*x))
|
#define ARRAYSIZE(x) (sizeof(x) / sizeof(*x))
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef _FUSE_H_
|
#ifndef _FUSE_H_
|
||||||
#define _FUSE_H_
|
#define _FUSE_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
/*! Fuse registers. */
|
/*! Fuse registers. */
|
||||||
#define FUSE_CTRL 0x0
|
#define FUSE_CTRL 0x0
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gpio.h"
|
#include <soc/gpio.h>
|
||||||
#include "t210.h"
|
#include <soc/t210.h>
|
||||||
|
|
||||||
#define GPIO_BANK_IDX(port) (port >> 2)
|
#define GPIO_BANK_IDX(port) (port >> 2)
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#ifndef _GPIO_H_
|
#ifndef _GPIO_H_
|
||||||
#define _GPIO_H_
|
#define _GPIO_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
#define GPIO_MODE_SPIO 0
|
#define GPIO_MODE_SPIO 0
|
||||||
#define GPIO_MODE_GPIO 1
|
#define GPIO_MODE_GPIO 1
|
||||||
|
|
|
@ -17,32 +17,32 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "hw_init.h"
|
#include <soc/hw_init.h>
|
||||||
#include "bpmp.h"
|
#include <gfx/di.h>
|
||||||
#include "clock.h"
|
#include <input/joycon.h>
|
||||||
#include "fuse.h"
|
#include <input/touch.h>
|
||||||
#include "gpio.h"
|
#include <sec/se.h>
|
||||||
#include "i2c.h"
|
#include <sec/se_t210.h>
|
||||||
#include "pinmux.h"
|
#include <soc/bpmp.h>
|
||||||
#include "pmc.h"
|
#include <soc/clock.h>
|
||||||
#include "uart.h"
|
#include <soc/fuse.h>
|
||||||
#include "t210.h"
|
#include <soc/gpio.h>
|
||||||
#include "../input/joycon.h"
|
#include <soc/i2c.h>
|
||||||
#include "../input/touch.h"
|
#include <soc/pinmux.h>
|
||||||
#include "../gfx/di.h"
|
#include <soc/pmc.h>
|
||||||
#include "../mem/mc.h"
|
#include <soc/uart.h>
|
||||||
#include "../mem/minerva.h"
|
#include <soc/t210.h>
|
||||||
#include "../mem/sdram.h"
|
#include <mem/mc.h>
|
||||||
#include "../sec/se.h"
|
#include <mem/minerva.h>
|
||||||
#include "../sec/se_t210.h"
|
#include <mem/sdram.h>
|
||||||
#include "../power/max77620.h"
|
#include <power/bq24193.h>
|
||||||
#include "../power/max7762x.h"
|
#include <power/max77620.h>
|
||||||
#include "../gfx/di.h"
|
#include <power/max7762x.h>
|
||||||
#include "../power/regulator_5v.h"
|
#include <power/regulator_5v.h>
|
||||||
#include "../storage/nx_sd.h"
|
#include <storage/nx_sd.h>
|
||||||
#include "../storage/sdmmc.h"
|
#include <storage/sdmmc.h>
|
||||||
#include "../thermal/fan.h"
|
#include <thermal/fan.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
|
|
||||||
extern boot_cfg_t b_cfg;
|
extern boot_cfg_t b_cfg;
|
||||||
extern volatile nyx_storage_t *nyx_str;
|
extern volatile nyx_storage_t *nyx_str;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#ifndef _HW_INIT_H_
|
#ifndef _HW_INIT_H_
|
||||||
#define _HW_INIT_H_
|
#define _HW_INIT_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
void config_hw();
|
void config_hw();
|
||||||
void reconfig_hw_workaround(bool extra_reconfig, u32 magic);
|
void reconfig_hw_workaround(bool extra_reconfig, u32 magic);
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "i2c.h"
|
#include <soc/i2c.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
|
|
||||||
static const u32 i2c_addrs[] = {
|
static const u32 i2c_addrs[] = {
|
||||||
0x7000C000, 0x7000C400, 0x7000C500,
|
0x7000C000, 0x7000C400, 0x7000C500,
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#ifndef _I2C_H_
|
#ifndef _I2C_H_
|
||||||
#define _I2C_H_
|
#define _I2C_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
#define I2C_1 0
|
#define I2C_1 0
|
||||||
#define I2C_2 1
|
#define I2C_2 1
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "irq.h"
|
#include "irq.h"
|
||||||
#include "t210.h"
|
#include <soc/t210.h>
|
||||||
#include "../gfx/gfx.h"
|
#include <gfx_utils.h>
|
||||||
#include "../mem/heap.h"
|
#include <mem/heap.h>
|
||||||
|
|
||||||
//#define DPRINTF(...) gfx_printf(__VA_ARGS__)
|
//#define DPRINTF(...) gfx_printf(__VA_ARGS__)
|
||||||
#define DPRINTF(...)
|
#define DPRINTF(...)
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef IRQ_H
|
#ifndef IRQ_H
|
||||||
#define IRQ_H
|
#define IRQ_H
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
#define IRQ_MAX_HANDLERS 16
|
#define IRQ_MAX_HANDLERS 16
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../soc/kfuse.h"
|
#include <soc/kfuse.h>
|
||||||
#include "../soc/clock.h"
|
#include <soc/clock.h>
|
||||||
#include "../soc/t210.h"
|
#include <soc/t210.h>
|
||||||
|
|
||||||
int kfuse_wait_ready()
|
int kfuse_wait_ready()
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#ifndef _KFUSE_H_
|
#ifndef _KFUSE_H_
|
||||||
#define _KFUSE_H_
|
#define _KFUSE_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
#define KFUSE_STATE_SOFTRESET (1 << 31)
|
#define KFUSE_STATE_SOFTRESET (1 << 31)
|
||||||
#define KFUSE_STATE_STOP (1 << 25)
|
#define KFUSE_STATE_STOP (1 << 25)
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../soc/pinmux.h"
|
#include <soc/pinmux.h>
|
||||||
#include "../soc/t210.h"
|
#include <soc/t210.h>
|
||||||
|
|
||||||
void pinmux_config_uart(u32 idx)
|
void pinmux_config_uart(u32 idx)
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#ifndef _PINMUX_H_
|
#ifndef _PINMUX_H_
|
||||||
#define _PINMUX_H_
|
#define _PINMUX_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
/*! APB MISC registers. */
|
/*! APB MISC registers. */
|
||||||
#define APB_MISC_GP_SDMMC1_CLK_LPBK_CONTROL 0x8D4
|
#define APB_MISC_GP_SDMMC1_CLK_LPBK_CONTROL 0x8D4
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#ifndef _TEGRA210_PMC_H_
|
#ifndef _TEGRA210_PMC_H_
|
||||||
#define _TEGRA210_PMC_H_
|
#define _TEGRA210_PMC_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
struct tegra_pmc_regs
|
struct tegra_pmc_regs
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#ifndef _T210_H_
|
#ifndef _T210_H_
|
||||||
#define _T210_H_
|
#define _T210_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
#define BOOTROM_BASE 0x100000
|
#define BOOTROM_BASE 0x100000
|
||||||
#define IRAM_BASE 0x40000000
|
#define IRAM_BASE 0x40000000
|
||||||
|
@ -162,6 +162,8 @@
|
||||||
#define APB_MISC_PP_STRAPPING_OPT_A 0x08
|
#define APB_MISC_PP_STRAPPING_OPT_A 0x08
|
||||||
#define APB_MISC_PP_PINMUX_GLOBAL 0x40
|
#define APB_MISC_PP_PINMUX_GLOBAL 0x40
|
||||||
#define APB_MISC_GP_HIDREV 0x804
|
#define APB_MISC_GP_HIDREV 0x804
|
||||||
|
#define GP_HIDREV_MAJOR_T210 0x1
|
||||||
|
#define GP_HIDREV_MAJOR_T210B01 0x2
|
||||||
#define APB_MISC_GP_AUD_MCLK_CFGPADCTRL 0x8F4
|
#define APB_MISC_GP_AUD_MCLK_CFGPADCTRL 0x8F4
|
||||||
#define APB_MISC_GP_LCD_BL_PWM_CFGPADCTRL 0xA34
|
#define APB_MISC_GP_LCD_BL_PWM_CFGPADCTRL 0xA34
|
||||||
#define APB_MISC_GP_SDMMC1_PAD_CFGPADCTRL 0xA98
|
#define APB_MISC_GP_SDMMC1_PAD_CFGPADCTRL 0xA98
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../soc/uart.h"
|
#include <soc/uart.h>
|
||||||
#include "../soc/clock.h"
|
#include <soc/clock.h>
|
||||||
#include "../soc/t210.h"
|
#include <soc/t210.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
|
|
||||||
/* UART A, B, C, D and E. */
|
/* UART A, B, C, D and E. */
|
||||||
static const u32 uart_baseoff[5] = { 0, 0x40, 0x200, 0x300, 0x400 };
|
static const u32 uart_baseoff[5] = { 0, 0x40, 0x200, 0x300, 0x400 };
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#ifndef _UART_H_
|
#ifndef _UART_H_
|
||||||
#define _UART_H_
|
#define _UART_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
#define UART_A 0
|
#define UART_A 0
|
||||||
#define UART_B 1
|
#define UART_B 1
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#ifndef MBR_GPT_H
|
#ifndef MBR_GPT_H
|
||||||
#define MBR_GPT_H
|
#define MBR_GPT_H
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
typedef struct _mbr_chs_t
|
typedef struct _mbr_chs_t
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
#ifndef NX_SD_H
|
#ifndef NX_SD_H
|
||||||
#define NX_SD_H
|
#define NX_SD_H
|
||||||
|
|
||||||
#include "sdmmc.h"
|
#include <storage/sdmmc.h>
|
||||||
#include "sdmmc_driver.h"
|
#include <storage/sdmmc_driver.h>
|
||||||
#include "../libs/fatfs/ff.h"
|
#include <libs/fatfs/ff.h>
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,10 +19,10 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "ramdisk.h"
|
#include "ramdisk.h"
|
||||||
#include "../mem/heap.h"
|
#include <mem/heap.h>
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
#include "../../../common/memory_map.h"
|
#include <memory_map.h>
|
||||||
|
|
||||||
int ram_disk_init(FATFS *ram_fs)
|
int ram_disk_init(FATFS *ram_fs)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef RAM_DISK_H
|
#ifndef RAM_DISK_H
|
||||||
#define RAM_DISK_H
|
#define RAM_DISK_H
|
||||||
|
|
||||||
#include "../libs/fatfs/ff.h"
|
#include <libs/fatfs/ff.h>
|
||||||
|
|
||||||
#define RAMDISK_CLUSTER_SZ 32768
|
#define RAMDISK_CLUSTER_SZ 32768
|
||||||
|
|
||||||
|
|
|
@ -16,14 +16,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "sdmmc.h"
|
#include <storage/sdmmc.h>
|
||||||
#include "mmc.h"
|
#include <storage/mmc.h>
|
||||||
#include "nx_sd.h"
|
#include <storage/nx_sd.h>
|
||||||
#include "sd.h"
|
#include <storage/sd.h>
|
||||||
#include "../../common/memory_map.h"
|
#include <memory_map.h>
|
||||||
#include "../gfx/gfx.h"
|
#include <gfx_utils.h>
|
||||||
#include "../mem/heap.h"
|
#include <mem/heap.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
|
|
||||||
//#define DPRINTF(...) gfx_printf(__VA_ARGS__)
|
//#define DPRINTF(...) gfx_printf(__VA_ARGS__)
|
||||||
#define DPRINTF(...)
|
#define DPRINTF(...)
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
#ifndef _SDMMC_H_
|
#ifndef _SDMMC_H_
|
||||||
#define _SDMMC_H_
|
#define _SDMMC_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
#include "sdmmc_driver.h"
|
#include <storage/sdmmc_driver.h>
|
||||||
|
|
||||||
extern u32 sd_power_cycle_time_start;
|
extern u32 sd_power_cycle_time_start;
|
||||||
|
|
||||||
|
|
|
@ -17,17 +17,17 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "mmc.h"
|
#include <storage/mmc.h>
|
||||||
#include "sdmmc.h"
|
#include <storage/sdmmc.h>
|
||||||
#include "../gfx/gfx.h"
|
#include <gfx_utils.h>
|
||||||
#include "../power/max7762x.h"
|
#include <power/max7762x.h>
|
||||||
#include "../soc/bpmp.h"
|
#include <soc/bpmp.h>
|
||||||
#include "../soc/clock.h"
|
#include <soc/clock.h>
|
||||||
#include "../soc/gpio.h"
|
#include <soc/gpio.h>
|
||||||
#include "../soc/pinmux.h"
|
#include <soc/pinmux.h>
|
||||||
#include "../soc/pmc.h"
|
#include <soc/pmc.h>
|
||||||
#include "../soc/t210.h"
|
#include <soc/t210.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
|
|
||||||
//#define DPRINTF(...) gfx_printf(__VA_ARGS__)
|
//#define DPRINTF(...) gfx_printf(__VA_ARGS__)
|
||||||
//#define ERROR_EXTRA_PRINTING
|
//#define ERROR_EXTRA_PRINTING
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
#ifndef _SDMMC_DRIVER_H_
|
#ifndef _SDMMC_DRIVER_H_
|
||||||
#define _SDMMC_DRIVER_H_
|
#define _SDMMC_DRIVER_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
#include "sdmmc_t210.h"
|
#include <storage/sdmmc_t210.h>
|
||||||
|
|
||||||
/*! SDMMC controller IDs. */
|
/*! SDMMC controller IDs. */
|
||||||
#define SDMMC_1 0
|
#define SDMMC_1 0
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#ifndef _SDMMC_T210_H_
|
#ifndef _SDMMC_T210_H_
|
||||||
#define _SDMMC_T210_H_
|
#define _SDMMC_T210_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
#define TEGRA_MMC_VNDR_TUN_CTRL0_TAP_VAL_UPDATED_BY_HW 0x20000
|
#define TEGRA_MMC_VNDR_TUN_CTRL0_TAP_VAL_UPDATED_BY_HW 0x20000
|
||||||
#define TEGRA_MMC_DLLCAL_CFG_EN_CALIBRATE 0x80000000
|
#define TEGRA_MMC_DLLCAL_CFG_EN_CALIBRATE 0x80000000
|
||||||
|
|
|
@ -16,12 +16,12 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "fan.h"
|
#include <thermal/fan.h>
|
||||||
#include "../power/regulator_5v.h"
|
#include <power/regulator_5v.h>
|
||||||
#include "../soc/gpio.h"
|
#include <soc/gpio.h>
|
||||||
#include "../soc/pinmux.h"
|
#include <soc/pinmux.h>
|
||||||
#include "../soc/t210.h"
|
#include <soc/t210.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
|
|
||||||
void set_fan_duty(u32 duty)
|
void set_fan_duty(u32 duty)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef __FAN_H_
|
#ifndef __FAN_H_
|
||||||
#define __FAN_H_
|
#define __FAN_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
// Disable: 0 (0 RPM), min duty: 1 (960 RPM), max duty 235 (11000 RPM).
|
// Disable: 0 (0 RPM), min duty: 1 (960 RPM), max duty 235 (11000 RPM).
|
||||||
void set_fan_duty(u32 duty);
|
void set_fan_duty(u32 duty);
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "tmp451.h"
|
#include <soc/i2c.h>
|
||||||
#include "../soc/i2c.h"
|
#include <thermal/tmp451.h>
|
||||||
|
|
||||||
u16 tmp451_get_soc_temp(bool intenger)
|
u16 tmp451_get_soc_temp(bool intenger)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef __TMP451_H_
|
#ifndef __TMP451_H_
|
||||||
#define __TMP451_H_
|
#define __TMP451_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
#define TMP451_I2C_ADDR 0x4C
|
#define TMP451_I2C_ADDR 0x4C
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef _USB_DESCRIPTORS_H_
|
#ifndef _USB_DESCRIPTORS_H_
|
||||||
#define _USB_DESCRIPTORS_H_
|
#define _USB_DESCRIPTORS_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
USB_DESCRIPTOR_DEVICE = 1,
|
USB_DESCRIPTOR_DEVICE = 1,
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "usbd.h"
|
#include <usb/usbd.h>
|
||||||
#include "../gfx/gfx.h"
|
#include <gfx_utils.h>
|
||||||
#include "../input/joycon.h"
|
#include <input/joycon.h>
|
||||||
#include "../input/touch.h"
|
#include <input/touch.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
|
|
||||||
#include "../../../common/memory_map.h"
|
#include <memory_map.h>
|
||||||
|
|
||||||
//#define DPRINTF(...) gfx_printf(__VA_ARGS__)
|
//#define DPRINTF(...) gfx_printf(__VA_ARGS__)
|
||||||
#define DPRINTF(...)
|
#define DPRINTF(...)
|
||||||
|
|
|
@ -21,16 +21,16 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "usbd.h"
|
#include <usb/usbd.h>
|
||||||
#include "../gfx/gfx.h"
|
#include <gfx_utils.h>
|
||||||
#include "../storage/nx_sd.h"
|
#include <storage/nx_sd.h>
|
||||||
#include "../storage/sdmmc.h"
|
#include <storage/sdmmc.h>
|
||||||
#include "../storage/sdmmc_driver.h"
|
#include <storage/sdmmc_driver.h>
|
||||||
#include "../utils/btn.h"
|
#include <utils/btn.h>
|
||||||
#include "../utils/sprintf.h"
|
#include <utils/sprintf.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
|
|
||||||
#include "../../../common/memory_map.h"
|
#include <memory_map.h>
|
||||||
|
|
||||||
//#define DPRINTF(...) gfx_printf(__VA_ARGS__)
|
//#define DPRINTF(...) gfx_printf(__VA_ARGS__)
|
||||||
#define DPRINTF(...)
|
#define DPRINTF(...)
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef _USB_T210_H_
|
#ifndef _USB_T210_H_
|
||||||
#define _USB_T210_H_
|
#define _USB_T210_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
/* General USB registers */
|
/* General USB registers */
|
||||||
#define USB1_IF_USB_SUSP_CTRL 0x400
|
#define USB1_IF_USB_SUSP_CTRL 0x400
|
||||||
|
|
|
@ -19,22 +19,22 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "usbd.h"
|
#include <usb/usbd.h>
|
||||||
#include "usb_descriptors.h"
|
#include <usb/usb_descriptors.h>
|
||||||
#include "usb_t210.h"
|
#include <usb/usb_t210.h>
|
||||||
|
|
||||||
#include "../gfx/gfx.h"
|
#include <gfx_utils.h>
|
||||||
#include "../soc/bpmp.h"
|
#include <soc/bpmp.h>
|
||||||
#include "../soc/clock.h"
|
#include <soc/clock.h>
|
||||||
#include "../soc/fuse.h"
|
#include <soc/fuse.h>
|
||||||
#include "../soc/gpio.h"
|
#include <soc/gpio.h>
|
||||||
#include "../soc/pinmux.h"
|
#include <soc/pinmux.h>
|
||||||
#include "../soc/pmc.h"
|
#include <soc/pmc.h>
|
||||||
#include "../soc/t210.h"
|
#include <soc/t210.h>
|
||||||
#include "../utils/btn.h"
|
#include <utils/btn.h>
|
||||||
#include "../utils/util.h"
|
#include <utils/util.h>
|
||||||
|
|
||||||
#include "../../../common/memory_map.h"
|
#include <memory_map.h>
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef _USB_H_
|
#ifndef _USB_H_
|
||||||
#define _USB_H_
|
#define _USB_H_
|
||||||
|
|
||||||
#include "../utils/types.h"
|
#include <utils/types.h>
|
||||||
|
|
||||||
#define USB_TD_BUFFER_PAGE_SIZE 0x1000
|
#define USB_TD_BUFFER_PAGE_SIZE 0x1000
|
||||||
#define USB_TD_BUFFER_MAX_SIZE (USB_TD_BUFFER_PAGE_SIZE * 4)
|
#define USB_TD_BUFFER_MAX_SIZE (USB_TD_BUFFER_PAGE_SIZE * 4)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue