]>
Commit | Line | Data |
---|---|---|
83d290c5 | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
ad9bc8e5 | 2 | /* |
741de266 SP |
3 | * Configuration settings for the TI OMAP3 EVM board. |
4 | * | |
5 | * Copyright (C) 2006-2011 Texas Instruments Incorporated - http://www.ti.com/ | |
6 | * | |
ad9bc8e5 DB |
7 | * Author : |
8 | * Manikandan Pillai <[email protected]> | |
9 | * Derived from Beagle Board and 3430 SDP code by | |
10 | * Richard Woodruff <[email protected]> | |
11 | * Syed Mohammed Khasim <[email protected]> | |
12 | * | |
13 | * Manikandan Pillai <[email protected]> | |
ad9bc8e5 DB |
14 | */ |
15 | ||
0d43fded DW |
16 | #ifndef __CONFIG_H |
17 | #define __CONFIG_H | |
741de266 | 18 | |
0d43fded | 19 | #include <configs/ti_omap3_common.h> |
584550d7 TR |
20 | |
21 | /* | |
0d43fded DW |
22 | * We are only ever GP parts and will utilize all of the "downloaded image" |
23 | * area in SRAM which starts at 0x40200000 and ends at 0x4020FFFF (64KB). | |
584550d7 | 24 | */ |
584550d7 | 25 | |
0d43fded | 26 | /* NAND */ |
88718be3 | 27 | #if defined(CONFIG_MTD_RAW_NAND) |
584550d7 | 28 | #define CONFIG_SYS_FLASH_BASE NAND_BASE |
0d43fded | 29 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
0d43fded | 30 | #define CONFIG_SYS_NAND_5_ADDR_CYCLE |
0d43fded DW |
31 | #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS |
32 | #define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9,\ | |
33 | 10, 11, 12, 13} | |
34 | #define CONFIG_SYS_NAND_ECCSIZE 512 | |
35 | #define CONFIG_SYS_NAND_ECCBYTES 3 | |
36 | #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW | |
b6e2543c | 37 | #define CONFIG_SYS_ENV_SECT_SIZE SZ_128K |
c257c96d DW |
38 | /* NAND: SPL falcon mode configs */ |
39 | #if defined(CONFIG_SPL_OS_BOOT) | |
b6e2543c | 40 | #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x2a0000 |
c257c96d | 41 | #endif /* CONFIG_SPL_OS_BOOT */ |
88718be3 | 42 | #endif /* CONFIG_MTD_RAW_NAND */ |
584550d7 | 43 | |
56d1dded | 44 | #define BOOTENV_DEV_LEGACY_MMC(devtypeu, devtypel, instance) \ |
a47ca2cf | 45 | "bootcmd_" #devtypel #instance "=" \ |
56d1dded | 46 | "setenv mmcdev " #instance "; " \ |
56d1dded DW |
47 | "run mmcboot\0" |
48 | #define BOOTENV_DEV_NAME_LEGACY_MMC(devtypeu, devtypel, instance) \ | |
8a3556ed DW |
49 | #devtypel #instance " " |
50 | ||
88718be3 | 51 | #if defined(CONFIG_MTD_RAW_NAND) |
b6e2543c DW |
52 | |
53 | #define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \ | |
54 | "bootcmd_" #devtypel #instance "=" \ | |
55 | "if test ${mtdids} = '' || test ${mtdparts} = '' ; then " \ | |
56 | "echo NAND boot disabled: No mtdids and/or mtdparts; " \ | |
57 | "else " \ | |
58 | "run nandboot; " \ | |
59 | "fi\0" | |
60 | #define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \ | |
61 | #devtypel #instance " " | |
62 | ||
8a3556ed DW |
63 | #define BOOT_TARGET_DEVICES(func) \ |
64 | func(MMC, mmc, 0) \ | |
56d1dded DW |
65 | func(LEGACY_MMC, legacy_mmc, 0) \ |
66 | func(UBIFS, ubifs, 0) \ | |
8a3556ed DW |
67 | func(NAND, nand, 0) |
68 | ||
88718be3 | 69 | #else /* !CONFIG_MTD_RAW_NAND */ |
b6e2543c DW |
70 | |
71 | #define BOOT_TARGET_DEVICES(func) \ | |
72 | func(MMC, mmc, 0) \ | |
73 | func(LEGACY_MMC, legacy_mmc, 0) | |
74 | ||
88718be3 | 75 | #endif /* CONFIG_MTD_RAW_NAND */ |
b6e2543c | 76 | |
8a3556ed DW |
77 | #include <config_distro_bootcmd.h> |
78 | ||
11e2ab3f DW |
79 | #include <environment/ti/mmc.h> |
80 | ||
ad9bc8e5 | 81 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
11e2ab3f DW |
82 | DEFAULT_LINUX_BOOT_ENV \ |
83 | DEFAULT_MMC_TI_ARGS \ | |
84 | DEFAULT_FIT_TI_ARGS \ | |
8a3556ed | 85 | "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ |
c257c96d | 86 | "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ |
0d43fded | 87 | "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ |
2d28ba18 | 88 | "fdt_high=0xffffffff\0" \ |
b6e2543c | 89 | "console=ttyO0,115200n8\0" \ |
a47ca2cf | 90 | "bootdir=/boot\0" \ |
c257c96d | 91 | "bootenv=uEnv.txt\0" \ |
56d1dded | 92 | "bootfile=zImage\0" \ |
b6e2543c | 93 | "bootpart=0:2\0" \ |
56d1dded DW |
94 | "bootubivol=rootfs\0" \ |
95 | "bootubipart=rootfs\0" \ | |
c257c96d | 96 | "optargs=\0" \ |
b6e2543c DW |
97 | "nandroot=ubi0:rootfs ubi.mtd=rootfs rw noinitrd\0" \ |
98 | "nandrootfstype=ubifs rootwait\0" \ | |
99 | "nandargs=setenv bootargs console=${console} " \ | |
100 | "${mtdparts} " \ | |
101 | "${optargs} " \ | |
102 | "root=${nandroot} " \ | |
103 | "rootfstype=${nandrootfstype}\0" \ | |
104 | "nandboot=if nand read ${loadaddr} kernel && nand read ${fdtaddr} dtb; then " \ | |
56d1dded | 105 | "echo Booting uImage from NAND MTD 'kernel' partition ...; " \ |
a47ca2cf | 106 | "run nandargs; " \ |
56d1dded | 107 | "bootm ${loadaddr} - ${fdtaddr}; " \ |
a47ca2cf | 108 | "fi\0" \ |
8a3556ed | 109 | BOOTENV |
ad9bc8e5 | 110 | |
0d43fded | 111 | #endif /* __CONFIG_H */ |