summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233/dualboot-imx233.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx233/dualboot-imx233.h')
-rw-r--r--firmware/target/arm/imx233/dualboot-imx233.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/dualboot-imx233.h b/firmware/target/arm/imx233/dualboot-imx233.h
new file mode 100644
index 0000000000..59b6b2f93c
--- /dev/null
+++ b/firmware/target/arm/imx233/dualboot-imx233.h
@@ -0,0 +1,53 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright © 2011 by Amaury Pouly
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21#ifndef DUALBOOT_IMX233_H
22#define DUALBOOT_IMX233_H
23
24#include "config.h"
25
26/* IMPORTANT NOTE This file is used by both Rockbox (firmware and bootloader)
27 * and the dualboot stub. The stub #include this file directly with
28 * COMPILE_DUALBOOT_STUB defined, so make sure this file is independent and does
29 * not requires anything from the firmware */
30#ifndef COMPILE_DUALBOOT_STUB
31#include "stdint.h"
32#endif
33
34#ifdef HAVE_DUALBOOT_STUB
35/* See dualboot-imx233.c for documentation */
36
37enum imx233_dualboot_field_t
38{
39 DUALBOOT_CAP_BOOT, /* boot capability: 1 => BOOT field supports OF and UPDATER */
40 DUALBOOT_BOOT, /* boot mode: IMX23_BOOT_x */
41};
42
43#define IMX233_BOOT_NORMAL 0 /* boot Rockbox (or OF if magic button) */
44#define IMX233_BOOT_OF 1 /* boot OF */
45#define IMX233_BOOT_UPDATER 2 /* boot updater */
46
47/* get field value (or 0 if not present) */
48unsigned imx233_dualboot_get_field(enum imx233_dualboot_field_t field);
49/* write field value */
50void imx233_dualboot_set_field(enum imx233_dualboot_field_t field, unsigned val);
51#endif /* HAVE_DUALBOOT_STUB */
52
53#endif /* DUALBOOT_IMX233_H */