Commit e954eb8028d7085fc8d0737c8e637ab940f7f147

Authored by Bernhard Nortmann
Committed by Hans de Goede
1 parent cb42d63554

sunxi: move SPL-related definitions to platform-specific include

The sunxi platform currently doesn't seem to make any use of the
asm/arch-sunxi/spl.h file. This patch moves some declarations from
tools/mksunxiboot.c into it.

This enables us to reuse those definitions when extending the
sunxi board code (boards/sunxi/boards.c).

Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Showing 2 changed files with 21 additions and 28 deletions Side-by-side Diff

arch/arm/include/asm/arch-sunxi/spl.h
1 1 /*
2   - * This is a copy of omap3/spl.h:
  2 + * (C) Copyright 2007-2011
  3 + * Allwinner Technology Co., Ltd. <www.allwinnertech.com>
  4 + * Tom Cubie <tangliang@allwinnertech.com>
3 5 *
4   - * (C) Copyright 2012
5   - * Texas Instruments, <www.ti.com>
6   - *
7 6 * SPDX-License-Identifier: GPL-2.0+
8 7 */
9 8 #ifndef _ASM_ARCH_SPL_H_
10 9 #define _ASM_ARCH_SPL_H_
11 10  
12   -#define BOOT_DEVICE_NONE 0
13   -#define BOOT_DEVICE_XIP 1
14   -#define BOOT_DEVICE_NAND 2
15   -#define BOOT_DEVICE_ONE_NAND 3
16   -#define BOOT_DEVICE_MMC2 5 /*emmc*/
17   -#define BOOT_DEVICE_MMC1 6
18   -#define BOOT_DEVICE_XIPWAIT 7
19   -#define BOOT_DEVICE_MMC2_2 0xff
  11 +#define BOOT0_MAGIC "eGON.BT0"
  12 +
  13 +/* boot head definition from sun4i boot code */
  14 +struct boot_file_head {
  15 + uint32_t b_instruction; /* one intruction jumping to real code */
  16 + uint8_t magic[8]; /* ="eGON.BT0" or "eGON.BT1", not C-style str */
  17 + uint32_t check_sum; /* generated by PC */
  18 + uint32_t length; /* generated by PC */
  19 + /*
  20 + * We use a simplified header, only filling in what is needed
  21 + * by the boot ROM. To be compatible with Allwinner tools we
  22 + * would need to implement the proper fields here instead of
  23 + * padding.
  24 + */
  25 + uint8_t pad[12]; /* align to 32 bytes */
  26 +};
  27 +
20 28 #endif
... ... @@ -15,23 +15,8 @@
15 15 #include <errno.h>
16 16 #include <sys/types.h>
17 17 #include <sys/stat.h>
  18 +#include "asm/arch/spl.h"
18 19  
19   -/* boot head definition from sun4i boot code */
20   -struct boot_file_head {
21   - uint32_t b_instruction; /* one intruction jumping to real code */
22   - uint8_t magic[8]; /* ="eGON.BT0" or "eGON.BT1", not C-style str */
23   - uint32_t check_sum; /* generated by PC */
24   - uint32_t length; /* generated by PC */
25   - /*
26   - * We use a simplified header, only filling in what is needed
27   - * by the boot ROM. To be compatible with Allwinner tools we
28   - * would need to implement the proper fields here instead of
29   - * padding.
30   - */
31   - uint8_t pad[12]; /* align to 32 bytes */
32   -};
33   -
34   -#define BOOT0_MAGIC "eGON.BT0"
35 20 #define STAMP_VALUE 0x5F0A6C39
36 21  
37 22 /* check sum functon from sun4i boot code */