uboot-lantiq: update to v2013.10
[openwrt.git] / package / boot / uboot-lantiq / patches / 0022-MIPS-lantiq-easy80920-add-support-for-NAND-SPL.patch
1 From 6fa1c350fa19a054371eccef84e4885cfdd6a2d7 Mon Sep 17 00:00:00 2001
2 From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
3 Date: Mon, 19 Aug 2013 18:11:31 +0200
4 Subject: MIPS: lantiq: easy80920: add support for NAND SPL
5
6 Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
7
8 diff --git a/boards.cfg b/boards.cfg
9 index f090726..394ede7 100644
10 --- a/boards.cfg
11 +++ b/boards.cfg
12 @@ -509,6 +509,7 @@ Active  mips        mips32         incaip      -               incaip
13  Active  mips        mips32         incaip      -               incaip              incaip_100MHz                        incaip:CPU_CLOCK_RATE=100000000                                                                                                   Wolfgang Denk <wd@denx.de>
14  Active  mips        mips32         incaip      -               incaip              incaip_133MHz                        incaip:CPU_CLOCK_RATE=133000000                                                                                                   Wolfgang Denk <wd@denx.de>
15  Active  mips        mips32         incaip      -               incaip              incaip_150MHz                        incaip:CPU_CLOCK_RATE=150000000                                                                                                   Wolfgang Denk <wd@denx.de>
16 +Active  mips        mips32         vrx200      lantiq          easy80920           easy80920_nandspl                    easy80920:SYS_BOOT_NANDSPL                                                                                                        Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
17  Active  mips        mips32         vrx200      lantiq          easy80920           easy80920_nor                        easy80920:SYS_BOOT_NOR                                                                                                            Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
18  Active  mips        mips32         vrx200      lantiq          easy80920           easy80920_norspl                     easy80920:SYS_BOOT_NORSPL                                                                                                         Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
19  Active  mips        mips32         vrx200      lantiq          easy80920           easy80920_ram                        easy80920:SYS_BOOT_RAM                                                                                                            Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
20 diff --git a/include/configs/easy80920.h b/include/configs/easy80920.h
21 index ad69bc2..56ceedb 100644
22 --- a/include/configs/easy80920.h
23 +++ b/include/configs/easy80920.h
24 @@ -31,6 +31,14 @@
25  
26  #define CONFIG_LTQ_SUPPORT_SPL_NOR_FLASH       /* Build NOR flash SPL */
27  
28 +#define CONFIG_LTQ_SUPPORT_SPL_NAND_FLASH      /* Build NAND flash SPL */
29 +#define CONFIG_SYS_NAND_PAGE_COUNT     128
30 +#define CONFIG_SYS_NAND_PAGE_SIZE      2048
31 +#define CONFIG_SYS_NAND_OOBSIZE                64
32 +#define CONFIG_SYS_NAND_BLOCK_SIZE     (256 * 1024)
33 +#define CONFIG_SYS_NAND_BAD_BLOCK_POS  NAND_LARGE_BADBLOCK_POS
34 +#define CONFIG_SYS_NAND_U_BOOT_OFFS    0x4000
35 +
36  #define CONFIG_LTQ_SPL_COMP_LZO
37  #define CONFIG_LTQ_SPL_CONSOLE
38  
39 @@ -57,6 +65,11 @@
40  #define CONFIG_ENV_OVERWRITE
41  #define CONFIG_ENV_OFFSET              (192 * 1024)
42  #define CONFIG_ENV_SECT_SIZE           (64 * 1024)
43 +#elif defined(CONFIG_SYS_BOOT_NANDSPL)
44 +#define CONFIG_ENV_IS_IN_NAND
45 +#define CONFIG_ENV_OVERWRITE
46 +#define CONFIG_ENV_OFFSET              (256 * 1024)
47 +#define CONFIG_ENV_SECT_SIZE           (256 * 1024)
48  #else
49  #define CONFIG_ENV_IS_NOWHERE
50  #endif
51 @@ -84,9 +97,13 @@
52  #define CONFIG_ENV_UPDATE_UBOOT_SF                                     \
53         "update-uboot-sf=run load-uboot-sfspl-lzo write-uboot-sf\0"
54  
55 +#define CONFIG_ENV_UPDATE_UBOOT_NAND                                   \
56 +       "update-uboot-nand=run load-uboot-nandspl-lzo write-uboot-nand\0"
57 +
58  #define CONFIG_EXTRA_ENV_SETTINGS      \
59         CONFIG_ENV_LANTIQ_DEFAULTS      \
60         CONFIG_ENV_UPDATE_UBOOT_NOR     \
61 -       CONFIG_ENV_UPDATE_UBOOT_SF
62 +       CONFIG_ENV_UPDATE_UBOOT_SF      \
63 +       CONFIG_ENV_UPDATE_UBOOT_NAND
64  
65  #endif /* __CONFIG_H */
66 -- 
67 1.8.3.2
68