stroese | 0621f6f | 2004-12-16 18:43:13 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2004 |
| 3 | * Stefan Roese, esd gmbh germany, stefan.roese@esd-electronics.com |
| 4 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
stroese | 0621f6f | 2004-12-16 18:43:13 +0000 | [diff] [blame] | 6 | */ |
| 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 Fuchs | 83975d0 | 2008-04-21 14:42:06 +0200 | [diff] [blame] | 16 | #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 |
stroese | 0621f6f | 2004-12-16 18:43:13 +0000 | [diff] [blame] | 25 | |
| 26 | struct au_image_s { |
| 27 | char name[80]; |
| 28 | ulong start; |
| 29 | ulong size; |
Matthias Fuchs | 83975d0 | 2008-04-21 14:42:06 +0200 | [diff] [blame] | 30 | ulong type; |
stroese | 0621f6f | 2004-12-16 18:43:13 +0000 | [diff] [blame] | 31 | }; |
| 32 | |
| 33 | typedef struct au_image_s au_image_t; |
| 34 | |
| 35 | int do_auto_update(void); |
| 36 | #ifdef CONFIG_AUTO_UPDATE_SHOW |
| 37 | void board_auto_update_show(int au_active); |
| 38 | #endif |
| 39 | |
| 40 | #endif /* #ifndef _AUTO_UPDATE_H_ */ |