blob: 85aff3aa7998ffab0cbfe877f4a8f94939ac2593 [file] [log] [blame]
Loh Tien Hock59400a42019-02-04 16:17:24 +08001/*
2 * Copyright (c) 2019, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef __S10_PRIVATE_H__
8#define __S10_PRIVATE_H__
9
10#define S10_MMC_REG_BASE 0xff808000
11
12#define EMMC_DESC_SIZE (1<<20)
Hadi Asyrafi78fee352019-07-30 22:18:17 +080013#define EMMC_INIT_PARAMS(base, clk) \
Loh Tien Hock59400a42019-02-04 16:17:24 +080014 { .bus_width = MMC_BUS_WIDTH_4, \
Hadi Asyrafi78fee352019-07-30 22:18:17 +080015 .clk_rate = (clk), \
Loh Tien Hock59400a42019-02-04 16:17:24 +080016 .desc_base = (base), \
17 .desc_size = EMMC_DESC_SIZE, \
18 .flags = 0, \
19 .reg_base = S10_MMC_REG_BASE, \
20 \
21 }
22
23typedef enum {
24 BOOT_SOURCE_FPGA = 0,
25 BOOT_SOURCE_SDMMC,
26 BOOT_SOURCE_NAND,
27 BOOT_SOURCE_RSVD,
28 BOOT_SOURCE_QSPI,
29} boot_source_type;
30
31void enable_nonsecure_access(void);
Muhammad Hadi Asyrafi Abdul Halim2444bfa2019-03-08 19:02:33 +080032void stratix10_io_setup(int boot_source);
Loh Tien Hock59400a42019-02-04 16:17:24 +080033
34#endif