Hadi Asyrafi | 616da77 | 2019-06-27 11:34:03 +0800 | [diff] [blame] | 1 | /* |
| 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 Asyrafi | a813fed | 2019-08-14 13:49:00 +0800 | [diff] [blame] | 14 | #define EMMC_INIT_PARAMS(base, clk) \ |
Hadi Asyrafi | 616da77 | 2019-06-27 11:34:03 +0800 | [diff] [blame] | 15 | { .bus_width = MMC_BUS_WIDTH_4, \ |
Hadi Asyrafi | a813fed | 2019-08-14 13:49:00 +0800 | [diff] [blame] | 16 | .clk_rate = (clk), \ |
Hadi Asyrafi | 616da77 | 2019-06-27 11:34:03 +0800 | [diff] [blame] | 17 | .desc_base = (base), \ |
| 18 | .desc_size = EMMC_DESC_SIZE, \ |
| 19 | .flags = 0, \ |
Hadi Asyrafi | a813fed | 2019-08-14 13:49:00 +0800 | [diff] [blame] | 20 | .reg_base = AGX_MMC_REG_BASE \ |
Hadi Asyrafi | 616da77 | 2019-06-27 11:34:03 +0800 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | typedef enum { |
| 24 | BOOT_SOURCE_FPGA = 0, |
| 25 | BOOT_SOURCE_SDMMC, |
| 26 | BOOT_SOURCE_NAND, |
| 27 | BOOT_SOURCE_RSVD, |
Hadi Asyrafi | a813fed | 2019-08-14 13:49:00 +0800 | [diff] [blame] | 28 | BOOT_SOURCE_QSPI |
Hadi Asyrafi | 616da77 | 2019-06-27 11:34:03 +0800 | [diff] [blame] | 29 | } boot_source_type; |
| 30 | |
| 31 | void enable_nonsecure_access(void); |
| 32 | void socfpga_io_setup(int boot_source); |
| 33 | |
| 34 | #endif |