GTA04 U-Boot

GTA04 U-Boot Commit Details

Date:2008-03-07 08:13:41 (5 years 2 months ago)
Author:Heiko Schocher
Branch:gta04
Commit:e492c90c26215e459aec0fdf0f8ef1fd204988f5
Parents: bd4458cb47abecabd406b1210457be96c69fc49d
Message:mgcoge: update board configuration

add support for the config Flash.
initialize the UPIOx controller.

Signed-off-by: Heiko Schocher <hs@denx.de>
Changes:
Mboard/mgcoge/mgcoge.c (4 diffs)
Minclude/configs/mgcoge.h (4 diffs)

File differences

board/mgcoge/mgcoge.c
278278
279279
280280
281
282
283
284
285
286
287
288
289
290
291
281292
282293
283294
......
286297
287298
288299
289
300
290301
291302
292303
......
304315
305316
306317
307
308
309
318
319
320
321
322
323
324
310325
311326
312327
......
331346
332347
333348
334
349
335350
336351
337352
return 0;
}
/*
* Early board initalization.
*/
int board_early_init_r(void)
{
/* setup the UPIOx */
*(char *)(CFG_PIGGY_BASE + 0x02) = 0xc0;
*(char *)(CFG_PIGGY_BASE + 0x03) = 0x15;
return 0;
}
#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
/*
* update "memory" property in the blob
{
int ret, nodeoffset = 0;
ulong memory_data[2] = {0};
ulong flash_data[4] = {0};
ulong flash_data[8] = {0};
memory_data[0] = cpu_to_be32(bd->bi_memstart);
memory_data[1] = cpu_to_be32(bd->bi_memsize);
printf("ft_blob_update(): cannot find /memory node "
"err:%s\n", fdt_strerror(nodeoffset));
}
/* update Flash size */
flash_data[2] = cpu_to_be32(bd->bi_flashstart);
flash_data[3] = cpu_to_be32(bd->bi_flashsize);
/* update Flash addr, size */
flash_data[2] = cpu_to_be32(CFG_FLASH_BASE);
flash_data[3] = cpu_to_be32(CFG_FLASH_SIZE);
flash_data[4] = cpu_to_be32(1);
flash_data[5] = cpu_to_be32(0);
flash_data[6] = cpu_to_be32(CFG_FLASH_BASE_1);
flash_data[7] = cpu_to_be32(CFG_FLASH_SIZE_1);
nodeoffset = fdt_path_offset (blob, "/localbus");
if (nodeoffset >= 0) {
ret = fdt_setprop(blob, nodeoffset, "ranges", flash_data,
}
else {
/* memory node is required in dts */
printf("ft_blob_update(): cannot find /localbus node "
printf("ft_blob_update(): cannot find /soc/cpm/ethernet node "
"err:%s\n", fdt_strerror(nodeoffset));
}
include/configs/mgcoge.h
3535
3636
3737
38
39
40
3841
3942
4043
......
152155
153156
154157
155
156
158
159
160
161
162
163
164
157165
158166
159167
......
246254
247255
248256
257
258
249259
250260
251261
......
301311
302312
303313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
304335
305336
306337
#define CONFIG_CPM21/* Has a CPM2 */
/* Do boardspecific init */
#define CONFIG_BOARD_EARLY_INIT_R 1
/*
* Select serial console configuration
*
#define CFG_FLASH_SIZE32
#define CFG_FLASH_CFI
#define CFG_FLASH_CFI_DRIVER
#define CFG_MAX_FLASH_BANKS1/* max num of flash banks*/
#define CFG_MAX_FLASH_SECT256/* max num of sects on one chip */
#define CFG_MAX_FLASH_BANKS2/* max num of flash banks*/
#define CFG_MAX_FLASH_SECT512/* max num of sects on one chip */
#define CFG_FLASH_BASE_10x50000000
#define CFG_FLASH_SIZE_164
#define CFG_FLASH_BANKS_LIST { CFG_FLASH_BASE, CFG_FLASH_BASE_1 }
#define CFG_MONITOR_BASETEXT_BASE
#if (CFG_MONITOR_BASE < CFG_FLASH_BASE)
* ---- --- ------- ------ ------
* 0 60x GPCM 8 bit FLASH
* 1 60x SDRAM 32 bit SDRAM
* 3 60x GPCM 8 bit GPIO/PIGGY
* 5 60x GPCM 16 bit CFG-Flash
*
*/
/* Bank 0 - FLASH
PSDMR_WRC_1C |\
PSDMR_CL_2)
/* GPIO/PIGGY on CS3 initialization values
*/
#define CFG_PIGGY_BASE0x30000000
#define CFG_PIGGY_SIZE128
#define CFG_BR3_PRELIM((CFG_PIGGY_BASE & BRx_BA_MSK) |\
BRx_PS_8 | BRx_MS_GPCM_P | BRx_V)
#define CFG_OR3_PRELIM(MEG_TO_AM(CFG_PIGGY_SIZE) |\
ORxG_CSNT | ORxG_ACS_DIV2 |\
ORxG_SCY_3_CLK | ORxG_TRLX )
/* CFG-Flash on CS5 initialization values
*/
#define CFG_BR5_PRELIM((CFG_FLASH_BASE_1 & BRx_BA_MSK) |\
BRx_PS_16 | BRx_MS_GPCM_P | BRx_V)
#define CFG_OR5_PRELIM(MEG_TO_AM(CFG_FLASH_SIZE_1) |\
ORxG_CSNT | ORxG_ACS_DIV2 |\
ORxG_SCY_5_CLK | ORxG_TRLX )
#defineCFG_RESET_ADDRESS 0xFDFFFFFC/* "bad" address*/
/* pass open firmware flat tree */

Archive Download the corresponding diff file

Branches

Tags