Tony Dinh | 6e36f66 | 2022-01-23 22:17:12 -0800 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright (C) 2014-2022 Tony Dinh <mibodhi@gmail.com> |
| 4 | * |
| 5 | * Based on |
| 6 | * Copyright (C) 2012 |
| 7 | * David Purdy <david.c.purdy@gmail.com> |
| 8 | * |
| 9 | * Based on Kirkwood support: |
| 10 | * (C) Copyright 2009 |
| 11 | * Marvell Semiconductor <www.marvell.com> |
| 12 | * Written-by: Prafulla Wadaskar <prafulla@marvell.com> |
| 13 | */ |
| 14 | |
| 15 | #ifndef _CONFIG_POGO_V4_H |
| 16 | #define _CONFIG_POGO_V4_H |
| 17 | |
| 18 | /* |
| 19 | * mv-common.h should be defined after CMD configs since it used them |
| 20 | * to enable certain macros |
| 21 | */ |
| 22 | #include "mv-common.h" |
| 23 | |
Tony Dinh | 07e5fcf | 2022-08-08 20:01:34 -0700 | [diff] [blame] | 24 | /* Include the common distro boot environment */ |
| 25 | #ifndef CONFIG_SPL_BUILD |
| 26 | |
| 27 | #ifdef CONFIG_MMC |
| 28 | #define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) |
| 29 | #else |
| 30 | #define BOOT_TARGET_DEVICES_MMC(func) |
| 31 | #endif |
| 32 | |
| 33 | #ifdef CONFIG_SATA |
| 34 | #define BOOT_TARGET_DEVICES_SATA(func) func(SATA, sata, 0) |
| 35 | #else |
| 36 | #define BOOT_TARGET_DEVICES_SATA(func) |
| 37 | #endif |
| 38 | |
| 39 | #ifdef CONFIG_USB_STORAGE |
| 40 | #define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0) |
| 41 | #else |
| 42 | #define BOOT_TARGET_DEVICES_USB(func) |
| 43 | #endif |
| 44 | |
| 45 | #define BOOT_TARGET_DEVICES(func) \ |
| 46 | BOOT_TARGET_DEVICES_MMC(func) \ |
| 47 | BOOT_TARGET_DEVICES_USB(func) \ |
| 48 | BOOT_TARGET_DEVICES_SATA(func) \ |
| 49 | func(DHCP, dhcp, na) |
| 50 | |
| 51 | #define KERNEL_ADDR_R __stringify(0x800000) |
| 52 | #define FDT_ADDR_R __stringify(0x2c00000) |
| 53 | #define RAMDISK_ADDR_R __stringify(0x01100000) |
| 54 | #define SCRIPT_ADDR_R __stringify(0x200000) |
| 55 | |
| 56 | #define LOAD_ADDRESS_ENV_SETTINGS \ |
| 57 | "kernel_addr_r=" KERNEL_ADDR_R "\0" \ |
| 58 | "fdt_addr_r=" FDT_ADDR_R "\0" \ |
| 59 | "ramdisk_addr_r=" RAMDISK_ADDR_R "\0" \ |
| 60 | "scriptaddr=" SCRIPT_ADDR_R "\0" |
| 61 | |
| 62 | #include <config_distro_bootcmd.h> |
| 63 | |
Tom Rini | c9edebe | 2022-12-04 10:03:50 -0500 | [diff] [blame] | 64 | #define CFG_EXTRA_ENV_SETTINGS \ |
Tony Dinh | 07e5fcf | 2022-08-08 20:01:34 -0700 | [diff] [blame] | 65 | LOAD_ADDRESS_ENV_SETTINGS \ |
| 66 | "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ |
| 67 | "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ |
| 68 | "console=ttyS0,115200\0" \ |
| 69 | BOOTENV |
| 70 | #endif /* CONFIG_SPL_BUILD */ |
Tony Dinh | 6e36f66 | 2022-01-23 22:17:12 -0800 | [diff] [blame] | 71 | |
Tony Dinh | 6e36f66 | 2022-01-23 22:17:12 -0800 | [diff] [blame] | 72 | #endif /* _CONFIG_POGO_V4_H */ |