]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - patches/0121-ENGR00124391-mx35-update-mfg-config-file.patch
imported Ka-Ro specific additions to U-Boot 2009.08 for TX28
[karo-tx-uboot.git] / patches / 0121-ENGR00124391-mx35-update-mfg-config-file.patch
1 From 6fa1a0ea0c589b327e8106d13ffff115d2553284 Mon Sep 17 00:00:00 2001
2 From: Peter Chen <b29397@freescale.com>
3 Date: Sun, 13 Jun 2010 10:30:56 +0800
4 Subject: [PATCH] ENGR00124391 mx35: update mfg config file
5
6 The old config has big env size, and the u-boot.bin will larger than 1MB,
7 the new one will less than 500KB
8
9 Signed-off-by: Peter Chen <b29397@freescale.com>
10 ---
11  include/configs/mx35_3stack_mfg.h |   97 ++++++++++++++++++-------------------
12  1 files changed, 47 insertions(+), 50 deletions(-)
13
14 diff --git a/include/configs/mx35_3stack_mfg.h b/include/configs/mx35_3stack_mfg.h
15 index 98f37c0..c056521 100644
16 --- a/include/configs/mx35_3stack_mfg.h
17 +++ b/include/configs/mx35_3stack_mfg.h
18 @@ -3,7 +3,7 @@
19   *
20   * (C) Copyright 2008-2010 Freescale Semiconductor, Inc.
21   *
22 - * Configuration settings for the MX35 3stack Freescale board.
23 + * Configuration settings for the MX31ADS Freescale board.
24   *
25   * This program is free software; you can redistribute it and/or
26   * modify it under the terms of the GNU General Public License as
27 @@ -25,21 +25,29 @@
28  #define __CONFIG_H
29  
30  #include <asm/arch/mx35.h>
31 -
32 +/* for mfg firmware */
33 +#define CONFIG_MFG
34 +#define CONFIG_BOOTARGS "console=ttymxc0,115200 rdinit=/linuxrc"
35 +#define CONFIG_ENV_IS_NOWHERE
36   /* High Level Configuration Options */
37  #define CONFIG_ARM1136         1       /* This is an arm1136 CPU core */
38  #define CONFIG_MXC             1
39  #define CONFIG_MX35            1       /* in a mx31 */
40  #define CONFIG_MX35_HCLK_FREQ  24000000        /* RedBoot says 26MHz */
41 -#define CONFIG_MFG              1
42 +
43 +#define CONFIG_ARCH_CPU_INIT
44 +#define CONFIG_ARCH_MMU
45  
46  #define CONFIG_DISPLAY_CPUINFO
47  #define CONFIG_DISPLAY_BOARDINFO
48  
49 +#define CONFIG_SYS_64BIT_VSPRINTF
50 +
51  #define BOARD_LATE_INIT
52  /*
53 - * Disabled for now due to build problems under Debian and a significant
54 - * increase in the final file size: 144260 vs. 109536 Bytes.
55 + * Disabled for now due to build problems under Debian
56 + * and a significant increase
57 + * in the final file size: 144260 vs. 109536 Bytes.
58   */
59  #if 0
60  #define CONFIG_OF_LIBFDT               1
61 @@ -56,7 +64,8 @@
62   * Size of malloc() pool
63   */
64  #define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 512 * 1024)
65 -#define CONFIG_SYS_GBL_DATA_SIZE       128 /* size in bytes reserved for initial data */
66 +/* size in bytes reserved for initial data */
67 +#define CONFIG_SYS_GBL_DATA_SIZE       128
68  
69  /*
70   * Hardware drivers
71 @@ -83,10 +92,14 @@
72  
73  #define CONFIG_CMD_PING
74  #define CONFIG_CMD_DHCP
75 +#define CONFIG_BOOTP_SUBNETMASK
76 +#define CONFIG_BOOTP_GATEWAY
77 +#define CONFIG_BOOTP_DNS
78  /*#define CONFIG_CMD_SPI*/
79  /*#define CONFIG_CMD_DATE*/
80 -#define CONFIG_CMD_NAND
81 -#define CONFIG_MXC_NAND
82 +/*#define CONFIG_CMD_NAND*/
83 +#define CONFIG_CMD_ENV
84 +/* #define CONFIG_CMD_MMC */
85  
86  #define CONFIG_CMD_I2C
87  #define CONFIG_CMD_MII
88 @@ -96,35 +109,9 @@
89  #define CONFIG_BOOTDELAY       0
90  
91  #define CONFIG_LOADADDR                0x80100000      /* loadaddr env var */
92 -
93 -#define CONFIG_BOOTARGS         "console=ttymxc0,115200 "\
94 -                               "rdinit=/linuxrc"
95 -
96 -#define CONFIG_BOOTCOMMAND      "bootm ${loadaddr}  0x80800000"
97 -
98 -#define CONFIG_ENV_IS_EMBEDDED
99 -
100 -#define        CONFIG_EXTRA_ENV_SETTINGS                                       \
101 -               "netdev=eth0\0"                                         \
102 -               "ethprime=smc911x\0"                                    \
103 -               "uboot_addr=0xa0000000\0"                               \
104 -               "uboot=u-boot.bin\0"                    \
105 -               "kernel=uImage\0"                               \
106 -               "nfsroot=/opt/eldk/arm\0"                               \
107 -               "bootargs_base=setenv bootargs console=ttymxc0,115200\0"\
108 -               "bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs "\
109 -                       "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0"\
110 -               "bootcmd=run bootcmd_net\0"                             \
111 -               "bootcmd_net=run bootargs_base bootargs_nfs; "          \
112 -                       "tftpboot ${loadaddr} ${kernel}; bootm\0"       \
113 -               "prg_uboot=tftpboot ${loadaddr} ${uboot}; "             \
114 -                       "protect off ${uboot_addr} 0xa003ffff; "        \
115 -                       "erase ${uboot_addr} 0xa003ffff; "              \
116 -                       "cp.b ${loadaddr} ${uboot_addr} ${filesize}; "  \
117 -                       "setenv filesize; saveenv\0"
118 -
119 +#define CONFIG_BOOTCOMMAND      "bootm ${loadaddr} 0x80800000"
120  /*Support LAN9217*/
121 -#define CONFIG_SMC911X         1
122 +#define CONFIG_SMC911X 1
123  #define CONFIG_SMC911X_16_BIT 1
124  #define CONFIG_SMC911X_BASE CS5_BASE_ADDR
125  
126 @@ -157,8 +144,6 @@
127   */
128  #define CONFIG_SYS_LONGHELP    /* undef to save memory */
129  #define CONFIG_SYS_PROMPT      "MX35 U-Boot > "
130 -#define CONFIG_ARCH_CPU_INIT
131 -#define CONFIG_ARCH_MMU
132  #define CONFIG_AUTO_COMPLETE
133  #define CONFIG_SYS_CBSIZE      256     /* Console I/O Buffer Size */
134  /* Print Buffer Size */
135 @@ -193,6 +178,23 @@
136  #define iomem_valid_addr(addr, size) \
137         (addr >= PHYS_SDRAM_1 && addr <= (PHYS_SDRAM_1 + PHYS_SDRAM_1_SIZE))
138  
139 +/*
140 + * MMC Configs
141 + * */
142 +#ifdef CONFIG_CMD_MMC
143 +       #define CONFIG_MMC                              1
144 +       #define CONFIG_GENERIC_MMC
145 +       #define CONFIG_IMX_MMC
146 +       #define CONFIG_SYS_FSL_ESDHC_NUM        2
147 +       #define CONFIG_SYS_FSL_ESDHC_ADDR       0
148 +       #define CONFIG_SYS_MMC_ENV_DEV          0
149 +       #define CONFIG_DOS_PARTITION    1
150 +       #define CONFIG_CMD_FAT          1
151 +#endif
152 +
153 +#define CONFIG_DOS_PARTITION    1
154 +#define CONFIG_CMD_FAT          1
155 +
156  /*-----------------------------------------------------------------------
157   * FLASH and environment organization
158   */
159 @@ -207,11 +209,9 @@
160  #define CONFIG_ENV_SIZE                CONFIG_ENV_SECT_SIZE
161  
162  /* Address and size of Redundant Environment Sector    */
163 -#define CONFIG_ENV_OFFSET_REDUND (2 * 1024 * 1024)
164 +#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
165  #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
166  
167 -#define CONFIG_ENV_IS_NOWHERE
168 -
169  /*
170   * S29WS256N NOR flash has 4 32KiB small sectors at the beginning and at the
171   * end. The rest of 32MiB is in 128KiB big sectors. U-Boot occupies the low
172 @@ -220,16 +220,13 @@
173   */
174  #define CONFIG_ENV_ADDR                (CONFIG_SYS_MONITOR_BASE + CONFIG_ENV_SECT_SIZE)
175  
176 -#if defined(CONFIG_CMD_NAND)
177 -       #define CONFIG_FSL_ENV_IN_NAND
178 -#else
179 -       #define CONFIG_ENV_IS_IN_FLASH  1
180 -#endif
181 -
182 -#if defined(CONFIG_FSL_ENV_IN_NAND)
183 +#if defined(CONFIG_CMD_MMC)
184 +       #define CONFIG_ENV_IS_IN_MMC    1
185 +       #define CONFIG_ENV_OFFSET       (768 * 1024)
186 +#elif defined(CONFIG_CMD_NAND)
187         #define CONFIG_ENV_IS_IN_NAND 1
188 -       #define CONFIG_ENV_OFFSET       (1024 * 1024)
189 -#elif defined(CONFIG_FSL_ENV_IS_IN_FLASH)
190 +       #define CONFIG_ENV_OFFSET       0x100000
191 +#else
192         #define CONFIG_ENV_IS_IN_FLASH  1
193  #endif
194  
195 -- 
196 1.5.4.4
197