0022-MIPS-lantiq-easy80920-add-support-for-NAND-SPL.patch 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
  6. --- a/boards.cfg
  7. +++ b/boards.cfg
  8. @@ -509,6 +509,7 @@ Active mips mips32 incai
  9. Active mips mips32 incaip - incaip incaip_100MHz incaip:CPU_CLOCK_RATE=100000000 Wolfgang Denk <wd@denx.de>
  10. Active mips mips32 incaip - incaip incaip_133MHz incaip:CPU_CLOCK_RATE=133000000 Wolfgang Denk <wd@denx.de>
  11. Active mips mips32 incaip - incaip incaip_150MHz incaip:CPU_CLOCK_RATE=150000000 Wolfgang Denk <wd@denx.de>
  12. +Active mips mips32 vrx200 lantiq easy80920 easy80920_nandspl easy80920:SYS_BOOT_NANDSPL Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
  13. Active mips mips32 vrx200 lantiq easy80920 easy80920_nor easy80920:SYS_BOOT_NOR Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
  14. Active mips mips32 vrx200 lantiq easy80920 easy80920_norspl easy80920:SYS_BOOT_NORSPL Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
  15. Active mips mips32 vrx200 lantiq easy80920 easy80920_ram easy80920:SYS_BOOT_RAM Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
  16. --- a/include/configs/easy80920.h
  17. +++ b/include/configs/easy80920.h
  18. @@ -31,6 +31,14 @@
  19. #define CONFIG_LTQ_SUPPORT_SPL_NOR_FLASH /* Build NOR flash SPL */
  20. +#define CONFIG_LTQ_SUPPORT_SPL_NAND_FLASH /* Build NAND flash SPL */
  21. +#define CONFIG_SYS_NAND_PAGE_COUNT 128
  22. +#define CONFIG_SYS_NAND_PAGE_SIZE 2048
  23. +#define CONFIG_SYS_NAND_OOBSIZE 64
  24. +#define CONFIG_SYS_NAND_BLOCK_SIZE (256 * 1024)
  25. +#define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
  26. +#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x4000
  27. +
  28. #define CONFIG_LTQ_SPL_COMP_LZO
  29. #define CONFIG_LTQ_SPL_CONSOLE
  30. @@ -57,6 +65,11 @@
  31. #define CONFIG_ENV_OVERWRITE
  32. #define CONFIG_ENV_OFFSET (192 * 1024)
  33. #define CONFIG_ENV_SECT_SIZE (64 * 1024)
  34. +#elif defined(CONFIG_SYS_BOOT_NANDSPL)
  35. +#define CONFIG_ENV_IS_IN_NAND
  36. +#define CONFIG_ENV_OVERWRITE
  37. +#define CONFIG_ENV_OFFSET (256 * 1024)
  38. +#define CONFIG_ENV_SECT_SIZE (256 * 1024)
  39. #else
  40. #define CONFIG_ENV_IS_NOWHERE
  41. #endif
  42. @@ -84,9 +97,13 @@
  43. #define CONFIG_ENV_UPDATE_UBOOT_SF \
  44. "update-uboot-sf=run load-uboot-sfspl-lzo write-uboot-sf\0"
  45. +#define CONFIG_ENV_UPDATE_UBOOT_NAND \
  46. + "update-uboot-nand=run load-uboot-nandspl-lzo write-uboot-nand\0"
  47. +
  48. #define CONFIG_EXTRA_ENV_SETTINGS \
  49. CONFIG_ENV_LANTIQ_DEFAULTS \
  50. CONFIG_ENV_UPDATE_UBOOT_NOR \
  51. - CONFIG_ENV_UPDATE_UBOOT_SF
  52. + CONFIG_ENV_UPDATE_UBOOT_SF \
  53. + CONFIG_ENV_UPDATE_UBOOT_NAND
  54. #endif /* __CONFIG_H */