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