[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: MMapping the SRAM into user space


One possible approach is (example maps 1 MB):

1. ioremap the memory in the kernel e.g.
sram = ioremap(MEM_CSR0_START, 1024*1024);
2. Transfer the address to userspace through an ioctl or similar
3. Map the area through /dev/mem from userspace. e.g:
fd = open( "/dev/mem", O_RDWR );
addr = (unsigned long)mmap( (void *)0, 1024*1024, 

Another approach is to set up a static MMU mapping
that maps e.g. 0xA0000000 to SRAM but that requires
modification in more places.


-----Original Message-----
From: owner-dev-etrax@xxxxxxx.com]On">mailto:owner-dev-etrax@xxxxxxx.com]On
Behalf Of Arne Bockholdt
Sent: Friday, March 21, 2003 1:30 PM
To: dev-etrax
Subject: MMapping the SRAM into user space


ist there any possibility to mmap SRAM connected to csr0 + csr1 to user
space without writing a new driver ? 

Thanks in advance,

	Arne Bockholdt

Dipl. Inform. Arne Bockholdt
REA Elektronik GmbH
Teichwiesenstr. 1
64367 Mühltal-Waschenbach
Tel. +49 (0) 6154 / 638-115, Fax -195