Suneel Garapati | 03c2288 | 2019-10-19 18:37:55 -0700 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 |
| 2 | * |
| 3 | * Copyright (C) 2018 Marvell International Ltd. |
| 4 | * |
| 5 | * https://spdx.org/licenses |
| 6 | */ |
| 7 | |
| 8 | #ifndef __OCTEONTX_COMMON_H__ |
| 9 | #define __OCTEONTX_COMMON_H__ |
| 10 | |
Tim Harvey | 8bb5a66 | 2021-03-25 17:07:33 -0700 | [diff] [blame] | 11 | #ifdef CONFIG_DISTRO_DEFAULTS |
| 12 | #define BOOT_TARGET_DEVICES(func) \ |
| 13 | func(MMC, mmc, 0) \ |
| 14 | func(MMC, mmc, 1) \ |
| 15 | func(USB, usb, 0) \ |
| 16 | func(SCSI, scsi, 0) |
| 17 | |
| 18 | #include <config_distro_bootcmd.h> |
| 19 | /* Extra environment variables */ |
| 20 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 21 | "autoload=0\0" \ |
| 22 | "loadaddr=0x20080000\0" \ |
| 23 | "kernel_addr_r=0x02000000\0" \ |
| 24 | "ramdisk_addr_r=0x03000000\0" \ |
| 25 | "scriptaddr=0x04000000\0" \ |
| 26 | BOOTENV |
| 27 | |
| 28 | #else |
| 29 | |
| 30 | /** Extra environment settings */ |
| 31 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 32 | "loadaddr=20080000\0" \ |
| 33 | "autoload=0\0" |
| 34 | |
| 35 | #endif /* ifdef CONFIG_DISTRO_DEFAULTS*/ |
| 36 | |
Suneel Garapati | 03c2288 | 2019-10-19 18:37:55 -0700 | [diff] [blame] | 37 | /** Maximum size of image supported for bootm (and bootable FIT images) */ |
| 38 | #define CONFIG_SYS_BOOTM_LEN (256 << 20) |
| 39 | |
| 40 | /** Memory base address */ |
| 41 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_TEXT_BASE |
| 42 | |
| 43 | /** Stack starting address */ |
| 44 | #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0xffff0) |
| 45 | |
| 46 | /** Heap size for U-Boot */ |
| 47 | #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 64 * 1024 * 1024) |
| 48 | |
| 49 | #define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE |
| 50 | |
| 51 | /* Allow environment variable to be overwritten */ |
| 52 | #define CONFIG_ENV_OVERWRITE |
| 53 | |
| 54 | /** Reduce hashes printed out */ |
| 55 | #define CONFIG_TFTP_TSIZE |
| 56 | |
| 57 | /* Autoboot options */ |
| 58 | #define CONFIG_RESET_TO_RETRY |
| 59 | #define CONFIG_BOOT_RETRY_TIME -1 |
| 60 | #define CONFIG_BOOT_RETRY_MIN 30 |
| 61 | |
| 62 | /* BOOTP options */ |
| 63 | #define CONFIG_BOOTP_BOOTFILESIZE |
| 64 | |
| 65 | /* AHCI support Definitions */ |
| 66 | #ifdef CONFIG_DM_SCSI |
| 67 | /** Enable 48-bit SATA addressing */ |
| 68 | # define CONFIG_LBA48 |
| 69 | /** Enable 64-bit addressing */ |
| 70 | # define CONFIG_SYS_64BIT_LBA |
| 71 | #endif |
| 72 | |
| 73 | /***** SPI Defines *********/ |
| 74 | #ifdef CONFIG_DM_SPI_FLASH |
| 75 | # define CONFIG_SF_DEFAULT_BUS 0 |
| 76 | # define CONFIG_SF_DEFAULT_CS 0 |
| 77 | #endif |
| 78 | |
Suneel Garapati | 03c2288 | 2019-10-19 18:37:55 -0700 | [diff] [blame] | 79 | /** Environment defines */ |
| 80 | #if defined(CONFIG_ENV_IS_IN_MMC) |
| 81 | #define CONFIG_SYS_MMC_ENV_DEV 0 |
| 82 | #endif |
| 83 | |
| 84 | /* Monitor Command Prompt */ |
| 85 | #define CONFIG_SYS_CBSIZE 1024 /** Console I/O Buffer Size */ |
| 86 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
| 87 | |
| 88 | #define CONFIG_SYS_MAXARGS 64 /** max command args */ |
| 89 | |
| 90 | #define CONFIG_SYS_MMC_MAX_BLK_COUNT 8192 |
| 91 | |
| 92 | #undef CONFIG_SYS_PROMPT |
| 93 | #define CONFIG_SYS_PROMPT env_get("prompt") |
| 94 | |
| 95 | /** EMMC specific defines */ |
| 96 | #if defined(CONFIG_MMC_OCTEONTX) |
| 97 | #define CONFIG_SUPPORT_EMMC_BOOT |
| 98 | #define CONFIG_SUPPORT_EMMC_RPMB |
Suneel Garapati | 03c2288 | 2019-10-19 18:37:55 -0700 | [diff] [blame] | 99 | #endif |
| 100 | |
| 101 | #if defined(CONFIG_NAND_OCTEONTX) |
| 102 | /*#define CONFIG_MTD_CONCAT */ |
| 103 | #define CONFIG_SYS_MAX_NAND_DEVICE 8 |
| 104 | #define CONFIG_SYS_NAND_ONFI_DETECTION |
| 105 | #endif |
| 106 | |
| 107 | #endif /* __OCTEONTX_COMMON_H__ */ |