blob: 73f84922288091b62852a62bed26e908b11883be [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Michal Simek952d5142007-03-11 13:42:58 +01002/*
Michal Simek04c379f2010-08-02 14:20:28 +02003 * (C) Copyright 2007-2010 Michal Simek
Michal Simek952d5142007-03-11 13:42:58 +01004 *
Michal Simekd83d07e2007-09-24 00:30:42 +02005 * Michal SIMEK <monstr@monstr.eu>
Michal Simek952d5142007-03-11 13:42:58 +01006 */
7
8#ifndef __CONFIG_H
9#define __CONFIG_H
10
Michal Simekb1395032020-11-04 16:00:38 +010011/* Microblaze is microblaze_0 */
12#define XILINX_FSL_NUMBER 3
13
Michal Simek952d5142007-03-11 13:42:58 +010014/* uart */
Michal Simekc7ff40a2015-12-09 12:42:16 +010015/* The following table includes the supported baudrates */
16# define CONFIG_SYS_BAUDRATE_TABLE \
17 {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400}
18
Michal Simekf3e2c9d2020-11-04 16:14:06 +010019#ifdef CONFIG_CFI_FLASH
Michal Simek04c379f2010-08-02 14:20:28 +020020/* ?empty sector */
21# define CONFIG_SYS_FLASH_EMPTY_INFO 1
22/* max number of memory banks */
Michal Simek04c379f2010-08-02 14:20:28 +020023/* max number of sectors on one chip */
Michal Simekf3e2c9d2020-11-04 16:14:06 +010024# define CONFIG_SYS_MAX_FLASH_SECT 2048
25#endif
Michal Simek952d5142007-03-11 13:42:58 +010026
Mario Six790d8442018-03-28 14:38:20 +020027#define CONFIG_HOSTNAME "microblaze-generic"
Michal Simek952d5142007-03-11 13:42:58 +010028
29/* architecture dependent code */
T Karthik Reddye539c262020-09-22 05:18:55 -060030#if defined(CONFIG_CMD_PXE) && defined(CONFIG_CMD_DHCP)
31#define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na)
32#else
33#define BOOT_TARGET_DEVICES_PXE(func)
34#endif
35
36#if defined(CONFIG_CMD_DHCP)
37#define BOOT_TARGET_DEVICES_DHCP(func) func(DHCP, dhcp, na)
38#else
39#define BOOT_TARGET_DEVICES_DHCP(func)
40#endif
41
42#if defined(CONFIG_SPI_FLASH)
43# define BOOT_TARGET_DEVICES_QSPI(func) func(QSPI, qspi, na)
44#else
45# define BOOT_TARGET_DEVICES_QSPI(func)
46#endif
47
T Karthik Reddy885f2312020-12-17 03:15:56 -070048#if defined(CONFIG_MTD_NOR_FLASH)
49# define BOOT_TARGET_DEVICES_NOR(func) func(NOR, nor, na)
50#else
51# define BOOT_TARGET_DEVICES_NOR(func)
52#endif
53
54#define BOOTENV_DEV_NOR(devtypeu, devtypel, instance) \
55 "bootcmd_nor=cp.b ${script_offset_nor} ${scriptaddr} ${script_size_f} && " \
56 "echo NOR: Trying to boot script at ${scriptaddr} && " \
57 "source ${scriptaddr}; echo NOR: SCRIPT FAILED: continuing...;\0"
58
59#define BOOTENV_DEV_NAME_NOR(devtypeu, devtypel, instance) \
60 "nor "
61
T Karthik Reddye539c262020-09-22 05:18:55 -060062#define BOOTENV_DEV_QSPI(devtypeu, devtypel, instance) \
63 "bootcmd_qspi=sf probe 0 0 0 && " \
64 "sf read ${scriptaddr} ${script_offset_f} ${script_size_f} && " \
65 "echo QSPI: Trying to boot script at ${scriptaddr} && " \
66 "source ${scriptaddr}; echo QSPI: SCRIPT FAILED: continuing...;\0"
67
68#define BOOTENV_DEV_NAME_QSPI(devtypeu, devtypel, instance) \
69 "qspi "
70
71#define BOOT_TARGET_DEVICES_JTAG(func) func(JTAG, jtag, na)
72
73#define BOOTENV_DEV_JTAG(devtypeu, devtypel, instance) \
74 "bootcmd_jtag=echo JTAG: Trying to boot script at ${scriptaddr} && " \
75 "source ${scriptaddr}; echo JTAG: SCRIPT FAILED: continuing...;\0"
76
77#define BOOTENV_DEV_NAME_JTAG(devtypeu, devtypel, instance) \
78 "jtag "
79
80#define BOOT_TARGET_DEVICES(func) \
81 BOOT_TARGET_DEVICES_JTAG(func) \
T Karthik Reddy885f2312020-12-17 03:15:56 -070082 BOOT_TARGET_DEVICES_QSPI(func) \
83 BOOT_TARGET_DEVICES_NOR(func) \
T Karthik Reddye539c262020-09-22 05:18:55 -060084 BOOT_TARGET_DEVICES_DHCP(func) \
85 BOOT_TARGET_DEVICES_PXE(func)
86
87#include <config_distro_bootcmd.h>
88
Michal Simek31caa372016-05-10 13:11:19 +020089#ifndef CONFIG_EXTRA_ENV_SETTINGS
T Karthik Reddya3627ee2020-09-22 05:18:52 -060090#define CONFIG_EXTRA_ENV_SETTINGS \
91 "unlock=yes\0"\
92 "nor0=flash-0\0"\
93 "mtdparts=mtdparts=flash-0:"\
94 "256k(u-boot),256k(env),3m(kernel),"\
95 "1m(romfs),1m(cramfs),-(jffs2)\0"\
96 "nc=setenv stdout nc;"\
97 "setenv stdin nc\0" \
98 "serial=setenv stdout serial;"\
T Karthik Reddye539c262020-09-22 05:18:55 -060099 "setenv stdin serial\0"\
100 "script_size_f=0x40000\0"\
101 BOOTENV
Michal Simek31caa372016-05-10 13:11:19 +0200102#endif
Michal Simekab340232007-04-24 23:01:02 +0200103
Michal Simek26acb3e2014-01-21 07:30:37 +0100104/* SPL part */
Michal Simek26acb3e2014-01-21 07:30:37 +0100105
Michal Simek736c1e642020-11-04 16:12:20 +0100106#define CONFIG_SYS_UBOOT_BASE CONFIG_SYS_TEXT_BASE
Michal Simek26acb3e2014-01-21 07:30:37 +0100107
Michal Simek26acb3e2014-01-21 07:30:37 +0100108/* SP location before relocation, must use scratch RAM */
109/* BRAM start */
110#define CONFIG_SYS_INIT_RAM_ADDR 0x0
111/* BRAM size - will be generated */
Michal Simekfb8e3842015-02-03 16:24:48 +0100112#define CONFIG_SYS_INIT_RAM_SIZE 0x100000
Michal Simek26acb3e2014-01-21 07:30:37 +0100113
Michal Simek952d5142007-03-11 13:42:58 +0100114#endif /* __CONFIG_H */