Beispiel #1
0
int dram_init(void)
{
	immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
	memctl8260_t *memctl = &immap->im_memctl;

	long psize;

	out_8(&memctl->memc_psrt, CONFIG_SYS_PSRT);
	out_be16(&memctl->memc_mptpr, CONFIG_SYS_MPTPR);

	/* 60x SDRAM setup:
	 */
	psize = probe_sdram(memctl);

	icache_enable();

	gd->ram_size = psize;

	return 0;
}
Beispiel #2
0
phys_size_t initdram(int board_type)
{
	immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
	memctl8260_t *memctl = &immap->im_memctl;

	long psize;

	out_8(&memctl->memc_psrt, CONFIG_SYS_PSRT);
	out_be16(&memctl->memc_mptpr, CONFIG_SYS_MPTPR);

#ifndef CONFIG_SYS_RAMBOOT
	/* 60x SDRAM setup:
	 */
	psize = probe_sdram(memctl);
#endif /* CONFIG_SYS_RAMBOOT */

	icache_enable();

	return psize;
}