blob: fc0e9fddffab8c714c28e09fba49f126a5320189 [file] [log] [blame]
Hadi Asyrafi616da772019-06-27 11:34:03 +08001/*
2 * Copyright (c) 2019, ARM Limited and Contributors. All rights reserved.
3 * Copyright (c) 2019, Intel Corporation. All rights reserved.
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7
8#ifndef AGX_PRIVATE_H
9#define AGX_PRIVATE_H
10
11#define AGX_MMC_REG_BASE 0xff808000
12
13#define EMMC_DESC_SIZE (1<<20)
Hadi Asyrafia813fed2019-08-14 13:49:00 +080014#define EMMC_INIT_PARAMS(base, clk) \
Hadi Asyrafi616da772019-06-27 11:34:03 +080015 { .bus_width = MMC_BUS_WIDTH_4, \
Hadi Asyrafia813fed2019-08-14 13:49:00 +080016 .clk_rate = (clk), \
Hadi Asyrafi616da772019-06-27 11:34:03 +080017 .desc_base = (base), \
18 .desc_size = EMMC_DESC_SIZE, \
19 .flags = 0, \
Hadi Asyrafia813fed2019-08-14 13:49:00 +080020 .reg_base = AGX_MMC_REG_BASE \
Hadi Asyrafi616da772019-06-27 11:34:03 +080021 }
22
23typedef enum {
24 BOOT_SOURCE_FPGA = 0,
25 BOOT_SOURCE_SDMMC,
26 BOOT_SOURCE_NAND,
27 BOOT_SOURCE_RSVD,
Hadi Asyrafia813fed2019-08-14 13:49:00 +080028 BOOT_SOURCE_QSPI
Hadi Asyrafi616da772019-06-27 11:34:03 +080029} boot_source_type;
30
31void enable_nonsecure_access(void);
32void socfpga_io_setup(int boot_source);
33
34#endif