Commit a7b00a7bf6d92648827d94f4f1dcdb0b5336fe0e

Authored by Linus Walleij
Committed by Tom Rini
1 parent 10d1491b3d

integrator: consolidate flash info

This consolidates the flash settings for the Integrator
and activates the new ARM flash image support for them
so images can be loaded by name from flash.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Showing 3 changed files with 27 additions and 33 deletions Side-by-side Diff

include/configs/integrator-common.h
... ... @@ -86,4 +86,26 @@
86 86 CONFIG_SYS_INIT_RAM_SIZE - \
87 87 GENERATED_GBL_DATA_SIZE)
88 88 #define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_GBL_DATA_OFFSET
  89 +
  90 +/*
  91 + * FLASH and environment organization
  92 + * Top varies according to amount fitted
  93 + * Reserve top 4 blocks of flash
  94 + * - ARM Boot Monitor
  95 + * - Unused
  96 + * - SIB block
  97 + * - U-Boot environment
  98 + */
  99 +#define CONFIG_CMD_FLASH
  100 +#define CONFIG_CMD_ARMFLASH
  101 +#define CONFIG_SYS_FLASH_CFI 1
  102 +#define CONFIG_FLASH_CFI_DRIVER 1
  103 +#define CONFIG_SYS_FLASH_BASE 0x24000000
  104 +#define CONFIG_SYS_MAX_FLASH_BANKS 1
  105 +
  106 +/* Timeout values in ticks */
  107 +#define CONFIG_SYS_FLASH_ERASE_TOUT (2 * CONFIG_SYS_HZ) /* Erase Timeout */
  108 +#define CONFIG_SYS_FLASH_WRITE_TOUT (2 * CONFIG_SYS_HZ) /* Write Timeout */
  109 +#define CONFIG_SYS_FLASH_PROTECTION /* The devices have real protection */
  110 +#define CONFIG_SYS_FLASH_EMPTY_INFO /* flinfo indicates empty blocks */
include/configs/integratorap.h
... ... @@ -55,21 +55,11 @@
55 55 */
56 56 #define CONFIG_SYS_PROMPT "Integrator-AP # " /* Monitor Command Prompt */
57 57  
58   -#define CONFIG_SYS_FLASH_BASE 0x24000000
59   -
60   -/*-----------------------------------------------------------------------
61   - * FLASH and environment organization
62   - */
63   -#define CONFIG_SYS_FLASH_CFI 1
64   -#define CONFIG_FLASH_CFI_DRIVER 1
65   -#define CONFIG_ENV_IS_NOWHERE
66   -#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
67   -/* timeout values are in ticks */
68   -#define CONFIG_SYS_FLASH_ERASE_TOUT (2*CONFIG_SYS_HZ) /* Timeout for Flash Erase */
69   -#define CONFIG_SYS_FLASH_WRITE_TOUT (2*CONFIG_SYS_HZ) /* Timeout for Flash Write */
  58 +/* Flash settings */
  59 +#define CONFIG_SYS_FLASH_SIZE 0x02000000 /* 32 MiB */
70 60 #define CONFIG_SYS_MAX_FLASH_SECT 128
  61 +#define CONFIG_ENV_IS_NOWHERE 1
71 62 #define CONFIG_ENV_SIZE 32768
72   -
73 63  
74 64 /*-----------------------------------------------------------------------
75 65 * PCI definitions
include/configs/integratorcp.h
... ... @@ -55,28 +55,10 @@
55 55 */
56 56 #define CONFIG_SYS_PROMPT "Integrator-CP # " /* Monitor Command Prompt */
57 57  
58   -/*
59   - * FLASH and environment organization
60   - * Top varies according to amount fitted
61   - * Reserve top 4 blocks of flash
62   - * - ARM Boot Monitor
63   - * - Unused
64   - * - SIB block
65   - * - U-Boot environment
66   - *
67   - * Base is always 0x24000000
68   - */
69   -#define CONFIG_SYS_FLASH_BASE 0x24000000
70   -#define CONFIG_SYS_FLASH_CFI 1
71   -#define CONFIG_FLASH_CFI_DRIVER 1
72   -#define CONFIG_SYS_MAX_FLASH_SECT 64
73   -#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
74 58 #define PHYS_FLASH_SIZE 0x01000000 /* 16MB */
75   -#define CONFIG_SYS_FLASH_ERASE_TOUT (2*CONFIG_SYS_HZ) /* Timeout for Flash Erase */
76   -#define CONFIG_SYS_FLASH_WRITE_TOUT (2*CONFIG_SYS_HZ) /* Timeout for Flash Write */
77   -
78   -#define CONFIG_SYS_MONITOR_LEN 0x00100000
  59 +#define CONFIG_SYS_MAX_FLASH_SECT 64
79 60 #define CONFIG_ENV_IS_IN_FLASH 1
  61 +#define CONFIG_SYS_MONITOR_LEN 0x00100000
80 62  
81 63 /*
82 64 * Move up the U-Boot & monitor area if more flash is fitted.