]> git.ipfire.org Git - people/ms/u-boot.git/blob - include/configs/sc_sps_1.h
Move setexpr to Kconfig
[people/ms/u-boot.git] / include / configs / sc_sps_1.h
1 /*
2 * SchulerControl GmbH, SC_SPS_1 module config
3 *
4 * Copyright (C) 2012 Marek Vasut <marex@denx.de>
5 * on behalf of DENX Software Engineering GmbH
6 *
7 * SPDX-License-Identifier: GPL-2.0+
8 */
9 #ifndef __CONFIGS_SC_SPS_1_H__
10 #define __CONFIGS_SC_SPS_1_H__
11
12 /* System configuration */
13 #define CONFIG_MX28 /* i.MX28 SoC */
14 #define MACH_TYPE_SC_SPS_1 4172
15 #define CONFIG_MACH_TYPE MACH_TYPE_SC_SPS_1
16
17 /* U-Boot Commands */
18 #define CONFIG_SYS_NO_FLASH
19 #include <config_cmd_default.h>
20 #define CONFIG_DISPLAY_CPUINFO
21 #define CONFIG_DOS_PARTITION
22
23 #define CONFIG_CMD_CACHE
24 #define CONFIG_CMD_DHCP
25 #define CONFIG_CMD_EXT2
26 #define CONFIG_CMD_FAT
27 #define CONFIG_CMD_GPIO
28 #define CONFIG_CMD_MII
29 #define CONFIG_CMD_MMC
30 #define CONFIG_CMD_NET
31 #define CONFIG_CMD_NFS
32 #define CONFIG_CMD_PING
33 #define CONFIG_CMD_USB
34
35 /* Memory configuration */
36 #define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */
37 #define PHYS_SDRAM_1 0x40000000 /* Base address */
38 #define PHYS_SDRAM_1_SIZE 0x40000000 /* Max 1 GB RAM */
39 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
40
41 /* Environment */
42 #define CONFIG_ENV_SIZE (16 * 1024)
43 #define CONFIG_ENV_IS_IN_MMC
44
45 /* Environment is in MMC */
46 #if defined(CONFIG_CMD_MMC) && defined(CONFIG_ENV_IS_IN_MMC)
47 #define CONFIG_ENV_OFFSET (256 * 1024)
48 #define CONFIG_SYS_MMC_ENV_DEV 0
49 #else
50 #define CONFIG_ENV_IS_NOWHERE
51 #endif
52
53 /* FEC Ethernet on SoC */
54 #ifdef CONFIG_CMD_NET
55 #define CONFIG_FEC_MXC
56 #define CONFIG_PHYLIB
57 #define CONFIG_PHY_SMSC
58 #endif
59
60 /* USB */
61 #ifdef CONFIG_CMD_USB
62 #define CONFIG_EHCI_MXS_PORT0
63 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
64 #define CONFIG_USB_STORAGE
65 #endif
66
67 /* Booting Linux */
68 #define CONFIG_BOOTDELAY 3
69 #define CONFIG_BOOTFILE "uImage"
70 #define CONFIG_BOOTARGS "console=ttyAMA0,115200"
71 #define CONFIG_BOOTCOMMAND "bootm"
72 #define CONFIG_LOADADDR 0x42000000
73 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
74
75 /* Extra Environment */
76 #define CONFIG_EXTRA_ENV_SETTINGS \
77 "update_sd_firmware_filename=u-boot.sd\0" \
78 "update_sd_firmware=" /* Update the SD firmware partition */ \
79 "if mmc rescan ; then " \
80 "if tftp ${update_sd_firmware_filename} ; then " \
81 "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block size */ \
82 "setexpr fw_sz ${fw_sz} + 1 ; " \
83 "mmc write ${loadaddr} 0x800 ${fw_sz} ; " \
84 "fi ; " \
85 "fi\0"
86
87 /* The rest of the configuration is shared */
88 #include <configs/mxs.h>
89
90 #endif /* __CONFIGS_SC_SPS_1_H__ */