zunq: add sdram driver
This commit is contained in:
parent
4971db9e32
commit
0763dd4279
3 changed files with 8 additions and 4 deletions
|
@ -60,7 +60,6 @@ enum
|
|||
struct Confmem
|
||||
{
|
||||
uintptr base;
|
||||
uintptr limit;
|
||||
usize npage;
|
||||
uintptr kbase;
|
||||
uintptr klimit;
|
||||
|
@ -70,7 +69,7 @@ struct Conf
|
|||
{
|
||||
ulong nmach; /* processors */
|
||||
ulong nproc; /* processes */
|
||||
Confmem mem[1]; /* physical memory */
|
||||
Confmem mem[2]; /* physical memory */
|
||||
ulong npage; /* total physical pages of memory */
|
||||
usize upages; /* user page pool */
|
||||
ulong copymode; /* 0 is copy on write, 1 is copy on reference */
|
||||
|
|
|
@ -177,10 +177,14 @@ confinit(void)
|
|||
conf.ialloc = 16*1024*1024;
|
||||
conf.nimage = 200;
|
||||
conf.mem[0].base = PGROUND((ulong)end - KZERO);
|
||||
conf.mem[0].limit = 1024*1024*1024;
|
||||
conf.mem[0].npage = (1024*1024*1024 - conf.mem[0].base) >> PGSHIFT;
|
||||
|
||||
ramdiskinit();
|
||||
|
||||
conf.npage = 0;
|
||||
for(i = 0; i < nelem(conf.mem); i++)
|
||||
conf.npage += conf.mem[i].npage = (conf.mem[i].limit - conf.mem[i].base) >> PGSHIFT;
|
||||
conf.npage += conf.mem[i].npage;
|
||||
|
||||
kmem = 200*1024*1024;
|
||||
conf.upages = conf.npage - kmem/BY2PG;
|
||||
kmem -= conf.upages*sizeof(Page)
|
||||
|
|
|
@ -34,6 +34,7 @@ link
|
|||
misc
|
||||
uartzynq
|
||||
sdmmc emmc
|
||||
sdram
|
||||
|
||||
ip
|
||||
tcp
|
||||
|
|
Loading…
Reference in a new issue