agilex_private.h 734 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
/*
 * Copyright (c) 2019, ARM Limited and Contributors. All rights reserved.
 * Copyright (c) 2019, Intel Corporation. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#ifndef AGX_PRIVATE_H
#define AGX_PRIVATE_H

#define AGX_MMC_REG_BASE	0xff808000

#define EMMC_DESC_SIZE		(1<<20)
14
#define EMMC_INIT_PARAMS(base, clk)		\
15
	{	.bus_width = MMC_BUS_WIDTH_4,	\
16
		.clk_rate = (clk),		\
17
18
19
		.desc_base = (base),		\
		.desc_size = EMMC_DESC_SIZE,	\
		.flags = 0,			\
20
		.reg_base = AGX_MMC_REG_BASE	\
21
22
23
24
25
26
27
	}

typedef enum {
	BOOT_SOURCE_FPGA = 0,
	BOOT_SOURCE_SDMMC,
	BOOT_SOURCE_NAND,
	BOOT_SOURCE_RSVD,
28
	BOOT_SOURCE_QSPI
29
30
31
32
33
34
} boot_source_type;

void enable_nonsecure_access(void);
void socfpga_io_setup(int boot_source);

#endif