]>
git.ipfire.org Git - people/ms/u-boot.git/blob - arch/arm/mach-at91/spl.c
2 * Copyright (C) 2013 Atmel Corporation
3 * Bo Shen <voice.shen@atmel.com>
5 * SPDX-License-Identifier: GPL-2.0+
10 #include <asm/arch/at91_common.h>
11 #include <asm/arch/at91_wdt.h>
12 #include <asm/arch/clk.h>
15 #if defined(CONFIG_AT91SAM9_WATCHDOG)
16 void at91_disable_wdt(void) { }
18 void at91_disable_wdt(void)
20 struct at91_wdt
*wdt
= (struct at91_wdt
*)ATMEL_BASE_WDT
;
22 writel(AT91_WDT_MR_WDDIS
, &wdt
->mr
);
26 u32
spl_boot_device(void)
28 #ifdef CONFIG_SYS_USE_MMC
29 return BOOT_DEVICE_MMC1
;
30 #elif CONFIG_SYS_USE_NANDFLASH
31 return BOOT_DEVICE_NAND
;
32 #elif CONFIG_SYS_USE_SERIALFLASH
33 return BOOT_DEVICE_SPI
;
35 return BOOT_DEVICE_NONE
;
38 u32
spl_boot_mode(void)
40 switch (spl_boot_device()) {
41 #ifdef CONFIG_SYS_USE_MMC
42 case BOOT_DEVICE_MMC1
:
46 case BOOT_DEVICE_NONE
: