blob: a8239f2f7a51c78ca8240d6883fca04b61c807d1 [file] [log] [blame]
Troy Kisky0ca618c2012-08-15 10:31:20 +00001/*
2 * Copyright (C) 2012 Boundary Devices Inc.
3 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02004 * SPDX-License-Identifier: GPL-2.0+
Troy Kisky0ca618c2012-08-15 10:31:20 +00005 */
6
7#ifndef _ASM_BOOT_MODE_H
8#define _ASM_BOOT_MODE_H
9#define MAKE_CFGVAL(cfg1, cfg2, cfg3, cfg4) \
10 ((cfg4) << 24) | ((cfg3) << 16) | ((cfg2) << 8) | (cfg1)
11
Adrian Alonso2b3d9612015-09-02 13:54:19 -050012enum boot_device {
13 WEIM_NOR_BOOT,
14 ONE_NAND_BOOT,
15 PATA_BOOT,
16 SATA_BOOT,
17 I2C_BOOT,
18 SPI_NOR_BOOT,
19 SD1_BOOT,
20 SD2_BOOT,
21 SD3_BOOT,
22 SD4_BOOT,
23 MMC1_BOOT,
24 MMC2_BOOT,
25 MMC3_BOOT,
26 MMC4_BOOT,
27 NAND_BOOT,
28 QSPI_BOOT,
29 UNKNOWN_BOOT,
30 BOOT_DEV_NUM = UNKNOWN_BOOT,
31};
32
Troy Kisky0ca618c2012-08-15 10:31:20 +000033struct boot_mode {
34 const char *name;
35 unsigned cfg_val;
36};
37
38void add_board_boot_modes(const struct boot_mode *p);
39void boot_mode_apply(unsigned cfg_val);
40extern const struct boot_mode soc_boot_modes[];
41#endif