summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/configs/bcm_ns3.h12
-rw-r--r--include/configs/ib62x0.h28
-rw-r--r--include/configs/sama7d65_curiosity.h20
-rw-r--r--include/configs/socfpga_soc64_common.h24
-rw-r--r--include/net/tcp.h2
-rw-r--r--include/wdt.h9
6 files changed, 76 insertions, 19 deletions
diff --git a/include/configs/bcm_ns3.h b/include/configs/bcm_ns3.h
index 7c6e0725a6c..8584b2b99c6 100644
--- a/include/configs/bcm_ns3.h
+++ b/include/configs/bcm_ns3.h
@@ -44,20 +44,11 @@
#define PCIE_ARGS "pcie_args=pci=pcie_bus_safe pcie_ports=native vfio_pci.disable_idle_d3=1\0"
-#ifdef CONFIG_BCM_SF2_ETH
-#define BCM_ETH_ADDR "ethaddr=00:0A:F7:95:65:A4\0"
-#define NET_ARGS "bgmac_platform.ethaddr=${ethaddr} " \
- "ip=${ipaddr}::${gatewayip}:${netmask}::${ethif}:off"
-#else
-#define BMC_ETH_ADDR
-#define NET_ARGS
-#endif
-
#define RESERVED_MEM "reserved_mem=memmap=0xff000000$0x1000000\0"
#define BASE_ARGS "${console_args} ${extra_args} ${pcie_args}" \
" ${max_cpus} ${log_level} ${reserved_mem}"
-#define SETBOOTARGS "setbootargs=setenv bootargs " BASE_ARGS " " NET_ARGS "\0"
+#define SETBOOTARGS "setbootargs=setenv bootargs " BASE_ARGS "\0"
#define UPDATEME_FLASH_PARAMS "bcm_compat_level=4\0" \
"bcm_need_recovery_rootfs=0\0" \
@@ -749,7 +740,6 @@
OS_LOG_LEVEL \
EXTRA_ARGS \
PCIE_ARGS \
- BMC_ETH_ADDR \
RESERVED_MEM \
SETBOOTARGS \
UPDATEME_FLASH_PARAMS \
diff --git a/include/configs/ib62x0.h b/include/configs/ib62x0.h
index e1b62f78b21..01ab6edb05f 100644
--- a/include/configs/ib62x0.h
+++ b/include/configs/ib62x0.h
@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
+ * Copyright (C) 2025 Tony Dinh <mibodhi@gmail.com>
* Copyright (C) 2011-2012
* Gerald Kerma <dreagle@doukki.net>
* Luka Perkov <luka@openwrt.org>
@@ -11,19 +12,34 @@
#include "mv-common.h"
/*
- * Environment variables configuration
- */
-
-/*
- * Default environment variables
+ * mv-common.h should be defined after CMD configs since it used them
+ * to enable certain macros
*/
+#include "mv-common.h"
-#define CFG_EXTRA_ENV_SETTINGS \
+#define EXTRA_ENV_SETTINGS_LEGACY \
"console=console=ttyS0,115200\0" \
"kernel=/boot/zImage\0" \
"fdt=/boot/ib62x0.dtb\0" \
"bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs rw\0"
+#define KERNEL_ADDR_R __stringify(0x800000)
+#define FDT_ADDR_R __stringify(0x2c00000)
+#define RAMDISK_ADDR_R __stringify(0x01100000)
+#define SCRIPT_ADDR_R __stringify(0x200000)
+
+#define LOAD_ADDRESS_ENV_SETTINGS \
+ "kernel_addr_r=" KERNEL_ADDR_R "\0" \
+ "fdt_addr_r=" FDT_ADDR_R "\0" \
+ "ramdisk_addr_r=" RAMDISK_ADDR_R "\0" \
+ "scriptaddr=" SCRIPT_ADDR_R "\0"
+
+#define CFG_EXTRA_ENV_SETTINGS \
+ EXTRA_ENV_SETTINGS_LEGACY \
+ LOAD_ADDRESS_ENV_SETTINGS \
+ "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
+ "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0"
+
/*
* SATA driver configuration
*/
diff --git a/include/configs/sama7d65_curiosity.h b/include/configs/sama7d65_curiosity.h
new file mode 100644
index 00000000000..9316b104ee3
--- /dev/null
+++ b/include/configs/sama7d65_curiosity.h
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Configuration file for the SAMA7D65 Curiosity Board.
+ *
+ * Copyright (C) 2024 Microchip Technology Inc. and its subsidiaries
+ *
+ * Author: Ryan Wanner <ryan.wanner@microchip.com>
+ *
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#define CFG_SYS_AT91_SLOW_CLOCK 32768
+#define CFG_SYS_AT91_MAIN_CLOCK 24000000 /* from 24 MHz crystal */
+/* SDRAM */
+#define CFG_SYS_SDRAM_BASE 0x60000000
+#define CFG_SYS_SDRAM_SIZE 0x40000000
+
+#endif
diff --git a/include/configs/socfpga_soc64_common.h b/include/configs/socfpga_soc64_common.h
index 5ed17671f79..83b600c7fcc 100644
--- a/include/configs/socfpga_soc64_common.h
+++ b/include/configs/socfpga_soc64_common.h
@@ -73,9 +73,31 @@
#define BOOTENV_DEV_NAME_QSPI(devtypeu, devtypel, instance) \
"qspi "
+#if IS_ENABLED(CONFIG_CMD_NAND)
+#define BOOT_TARGET_DEVICES_NAND(func) func(NAND, nand, na)
+#else
+#define BOOT_TARGET_DEVICES_NAND(func)
+#endif
+
+#define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \
+ "bootcmd_nand=ubi detach && " \
+ "setenv mtdids 'nor0=nor0,nand0=nand.0' && " \
+ "setenv mtdparts 'mtdparts=nor0:66m(qspi_uboot),190m(qspi_root);" \
+ "nand.0:2m(u-boot),500m(root)' && " \
+ "env select UBI; saveenv && " \
+ "ubi part root && " \
+ "ubi readvol ${scriptaddr} script && " \
+ "echo NAND: Trying to boot script at ${scriptaddr} && " \
+ "source ${scriptaddr}; " \
+ "echo NAND: SCRIPT FAILED: continuing...; ubi detach;\0"
+
+#define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
+ "nand "
+
#define BOOT_TARGET_DEVICES(func) \
BOOT_TARGET_DEVICES_MMC(func) \
- BOOT_TARGET_DEVICES_QSPI(func)
+ BOOT_TARGET_DEVICES_QSPI(func) \
+ BOOT_TARGET_DEVICES_NAND(func)
#include <config_distro_bootcmd.h>
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 5022fa9dc1b..6f4d58a1234 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -235,7 +235,7 @@ struct pseudo_hdr {
u16 len;
} __packed;
-#define PSEUDO_HDR_SIZE (sizeof(struct pseudo_hdr)) - PSEUDO_PAD_SIZE
+#define PSEUDO_HDR_SIZE ((sizeof(struct pseudo_hdr)) - PSEUDO_PAD_SIZE)
/**
* union tcp_build_pkt - union for building TCP/IP packet.
diff --git a/include/wdt.h b/include/wdt.h
index 5026f5a6db4..1ef656585c4 100644
--- a/include/wdt.h
+++ b/include/wdt.h
@@ -19,6 +19,15 @@ struct udevice;
*/
/*
+ * Force watchdog start during init. Called by driver's probe when the watchdog
+ * is detected as already started.
+ *
+ * @dev: WDT Device
+ * @return: 0 if OK, -ve on error
+ */
+int wdt_set_force_autostart(struct udevice *dev);
+
+/*
* Start the timer
*
* @dev: WDT Device