From 3ec66893e377b088c1284d2d23adb2aeea6d7965 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sat, 27 Feb 2021 22:08:58 +0000 Subject: New port: FiiO M3K on bare metal Change-Id: I7517e7d5459e129dcfc9465c6fbd708619888fbe --- firmware/target/mips/ingenic_x1000/x1000/wdt.h | 74 ++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 firmware/target/mips/ingenic_x1000/x1000/wdt.h (limited to 'firmware/target/mips/ingenic_x1000/x1000/wdt.h') diff --git a/firmware/target/mips/ingenic_x1000/x1000/wdt.h b/firmware/target/mips/ingenic_x1000/x1000/wdt.h new file mode 100644 index 0000000000..53225e3d7c --- /dev/null +++ b/firmware/target/mips/ingenic_x1000/x1000/wdt.h @@ -0,0 +1,74 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * This file was automatically generated by headergen, DO NOT EDIT it. + * headergen version: 3.0.0 + * x1000 version: 1.0 + * x1000 authors: Aidan MacDonald + * + * Copyright (C) 2015 by the authors + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#ifndef __HEADERGEN_WDT_H__ +#define __HEADERGEN_WDT_H__ + +#include "macro.h" + +#define REG_WDT_DATA jz_reg(WDT_DATA) +#define JA_WDT_DATA (0xb0002000 + 0x0) +#define JT_WDT_DATA JIO_32_RW +#define JN_WDT_DATA WDT_DATA +#define JI_WDT_DATA + +#define REG_WDT_ENABLE jz_reg(WDT_ENABLE) +#define JA_WDT_ENABLE (0xb0002000 + 0x4) +#define JT_WDT_ENABLE JIO_32_RW +#define JN_WDT_ENABLE WDT_ENABLE +#define JI_WDT_ENABLE + +#define REG_WDT_COUNT jz_reg(WDT_COUNT) +#define JA_WDT_COUNT (0xb0002000 + 0x8) +#define JT_WDT_COUNT JIO_32_RW +#define JN_WDT_COUNT WDT_COUNT +#define JI_WDT_COUNT + +#define REG_WDT_CTRL jz_reg(WDT_CTRL) +#define JA_WDT_CTRL (0xb0002000 + 0xc) +#define JT_WDT_CTRL JIO_32_RW +#define JN_WDT_CTRL WDT_CTRL +#define JI_WDT_CTRL +#define BP_WDT_CTRL_PRESCALE 3 +#define BM_WDT_CTRL_PRESCALE 0x38 +#define BV_WDT_CTRL_PRESCALE__BY_1 0x0 +#define BV_WDT_CTRL_PRESCALE__BY_4 0x1 +#define BV_WDT_CTRL_PRESCALE__BY_16 0x2 +#define BV_WDT_CTRL_PRESCALE__BY_64 0x3 +#define BV_WDT_CTRL_PRESCALE__BY_256 0x4 +#define BV_WDT_CTRL_PRESCALE__BY_1024 0x5 +#define BF_WDT_CTRL_PRESCALE(v) (((v) & 0x7) << 3) +#define BFM_WDT_CTRL_PRESCALE(v) BM_WDT_CTRL_PRESCALE +#define BF_WDT_CTRL_PRESCALE_V(e) BF_WDT_CTRL_PRESCALE(BV_WDT_CTRL_PRESCALE__##e) +#define BFM_WDT_CTRL_PRESCALE_V(v) BM_WDT_CTRL_PRESCALE +#define BP_WDT_CTRL_SOURCE 0 +#define BM_WDT_CTRL_SOURCE 0x7 +#define BV_WDT_CTRL_SOURCE__EXT 0x4 +#define BV_WDT_CTRL_SOURCE__RTC 0x2 +#define BV_WDT_CTRL_SOURCE__PLCK 0x1 +#define BF_WDT_CTRL_SOURCE(v) (((v) & 0x7) << 0) +#define BFM_WDT_CTRL_SOURCE(v) BM_WDT_CTRL_SOURCE +#define BF_WDT_CTRL_SOURCE_V(e) BF_WDT_CTRL_SOURCE(BV_WDT_CTRL_SOURCE__##e) +#define BFM_WDT_CTRL_SOURCE_V(v) BM_WDT_CTRL_SOURCE + +#endif /* __HEADERGEN_WDT_H__*/ -- cgit v1.2.3