~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to roms/u-boot/arch/arm/cpu/armv7/zynq/spl.c

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * (C) Copyright 2014 Xilinx, Inc. Michal Simek
 
3
 *
 
4
 * SPDX-License-Identifier:     GPL-2.0+
 
5
 */
 
6
#include <common.h>
 
7
#include <spl.h>
 
8
 
 
9
#include <asm/io.h>
 
10
#include <asm/arch/hardware.h>
 
11
#include <asm/arch/spl.h>
 
12
#include <asm/arch/sys_proto.h>
 
13
 
 
14
DECLARE_GLOBAL_DATA_PTR;
 
15
 
 
16
void board_init_f(ulong dummy)
 
17
{
 
18
        ps7_init();
 
19
 
 
20
        /* Clear the BSS. */
 
21
        memset(__bss_start, 0, __bss_end - __bss_start);
 
22
 
 
23
        /* Set global data pointer. */
 
24
        gd = &gdata;
 
25
 
 
26
        preloader_console_init();
 
27
        arch_cpu_init();
 
28
        board_init_r(NULL, 0);
 
29
}
 
30
 
 
31
u32 spl_boot_device(void)
 
32
{
 
33
        u32 mode;
 
34
 
 
35
        switch ((zynq_slcr_get_boot_mode()) & ZYNQ_BM_MASK) {
 
36
#ifdef CONFIG_SPL_SPI_SUPPORT
 
37
        case ZYNQ_BM_QSPI:
 
38
                puts("qspi boot\n");
 
39
                mode = BOOT_DEVICE_SPI;
 
40
                break;
 
41
#endif
 
42
#ifdef CONFIG_SPL_MMC_SUPPORT
 
43
        case ZYNQ_BM_SD:
 
44
                puts("mmc boot\n");
 
45
                mode = BOOT_DEVICE_MMC1;
 
46
                break;
 
47
#endif
 
48
        default:
 
49
                puts("Unsupported boot mode selected\n");
 
50
                hang();
 
51
        }
 
52
 
 
53
        return mode;
 
54
}
 
55
 
 
56
#ifdef CONFIG_SPL_MMC_SUPPORT
 
57
u32 spl_boot_mode(void)
 
58
{
 
59
        return MMCSD_MODE_FAT;
 
60
}
 
61
#endif
 
62
 
 
63
#ifdef CONFIG_SPL_OS_BOOT
 
64
int spl_start_uboot(void)
 
65
{
 
66
        /* boot linux */
 
67
        return 0;
 
68
}
 
69
#endif