[parisc-linux-cvs] ioremap() and really working framebuffer
Helge Deller
deller@gmx.de
Sat, 16 Jun 2001 19:20:18 +0200
--------------Boundary-00=_UH91EI82GDW2OM72245K
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Subject:
Hi,
The following patch will
- activate the new ioremap() and iounmap() functions from arch/mm/ioremap.c
- make /dev/fb0 a _real_ framebuffer device, which is directly accessible via
memory reads/writes (expample: dd if=/dev/zero of=/dev/fb0 bs=2048 count=100)
- add more functionality for other graphic chips than just Artist(unfinished!)
The main question is now, if I oversight anything with ioremap() or does it
just works and I may commit my changes ?
Greetings,
Helge
--------------Boundary-00=_UH91EI82GDW2OM72245K
Content-Type: text/x-c;
charset="iso-8859-1";
name="LOG10"
Content-Transfer-Encoding: base64
Content-Description: patch
Content-Disposition: attachment; filename="LOG10"
SW5kZXg6IGFyY2gvcGFyaXNjL21tL01ha2VmaWxlCj09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9ob21l
L2N2cy9wYXJpc2MvbGludXgvYXJjaC9wYXJpc2MvbW0vTWFrZWZpbGUsdgpyZXRyaWV2aW5nIHJl
dmlzaW9uIDEuNQpkaWZmIC11IC1yMS41IE1ha2VmaWxlCi0tLSBNYWtlZmlsZQkyMDAxLzAxLzI4
IDA0OjE2OjQwCTEuNQorKysgTWFrZWZpbGUJMjAwMS8wNi8xNiAxNjo1OToyNwpAQCAtOCw2ICs4
LDYgQEAKICMgTm90ZSAyISBUaGUgQ0ZMQUdTIGRlZmluaXRpb24gaXMgbm93IGluIHRoZSBtYWlu
IG1ha2VmaWxlLi4uCiAKIE9fVEFSR0VUIDo9IG1tLm8KLW9iai15CSA6PSBpbml0Lm8gZmF1bHQu
byBleHRhYmxlLm8KK29iai15CSA6PSBpbml0Lm8gZmF1bHQubyBleHRhYmxlLm8gaW9yZW1hcC5v
CiAKIGluY2x1ZGUgJChU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