19 #include <linux/kernel.h>
21 #include <asm/bootinfo.h>
28 #define JZ4740_EMC_SDRAM_CTRL 0x80
31 static void __init jz4740_detect_mem(
void)
39 bus = 2 - ((ctrl >> 31) & 1);
40 bank = 1 + ((ctrl >> 19) & 1);
41 cols = 8 + ((ctrl >> 26) & 7);
42 rows = 11 + ((ctrl >> 20) & 3);
44 "SDRAM preconfigured: bus:%u bank:%u rows:%u cols:%u\n",
45 bus, bank, rows, cols);
48 size = 1 << (bus + bank + cols +
rows);