blob: be8f439e475d7abb7fe711b75464910d80585433 [file] [log] [blame]
stroese56b9e4f2004-12-16 18:43:13 +00001/*
2 * (C) Copyright 2004
3 * Stefan Roese, esd gmbh germany, stefan.roese@esd-electronics.com
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
stroese56b9e4f2004-12-16 18:43:13 +00006 */
7
8#ifndef _AUTO_UPDATE_H_
9#define _AUTO_UPDATE_H_
10
11#define MBR_MAGIC 0x07081967
12#define MBR_MAGIC_ADDR 0x100 /* offset 0x100 should be free space */
13
14#define AU_MAGIC_FILE "__auto_update"
15
Matthias Fuchs17dc7612008-04-21 14:42:06 +020016#define AU_TYPEMASK 0x000000ff
17#define AU_FLAGMASK 0xffff0000
18
19#define AU_PROTECT 0x80000000
20
21#define AU_SCRIPT 0x01
22#define AU_FIRMWARE (0x02 | AU_PROTECT)
23#define AU_NOR 0x03
24#define AU_NAND 0x04
stroese56b9e4f2004-12-16 18:43:13 +000025
26struct au_image_s {
27 char name[80];
28 ulong start;
29 ulong size;
Matthias Fuchs17dc7612008-04-21 14:42:06 +020030 ulong type;
stroese56b9e4f2004-12-16 18:43:13 +000031};
32
33typedef struct au_image_s au_image_t;
34
35int do_auto_update(void);
36#ifdef CONFIG_AUTO_UPDATE_SHOW
37void board_auto_update_show(int au_active);
38#endif
39
40#endif /* #ifndef _AUTO_UPDATE_H_ */