4 * Copyright (C) 2015 Paul Kocialkowski <contact@paulk.fr>
6 * SPDX-License-Identifier: GPL-2.0+
11 #include <asm/omap_common.h>
14 static u32 boot_devices[] = {
15 #if defined(CONFIG_DRA7XX)
35 u32 omap_sys_boot_device(void)
39 /* Grab the first 4 bits of the status register for SYS_BOOT. */
40 sys_boot = readl((u32 *) (*ctrl)->control_status) & ((1 << 4) - 1);
42 if (sys_boot >= (sizeof(boot_devices) / sizeof(u32)))
43 return BOOT_DEVICE_NONE;
45 return boot_devices[sys_boot];