[parisc-linux] byte-mode STI sync-up with word-mode STI
Helge Deller
deller@gmx.de
Wed, 14 Feb 2001 00:25:36 +0100
--------------Boundary-00=_OEYPOZ9VOG491GDHLIGZ
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Hi,
I've just checked in a large patch (see attachment), which mostly syncs
byte-mode STI up with word-mode STI.
You should note, that I can't currently test any of theese changes, since I
don't have such a machine. If your machine has byte-mode STI ROM and you test
this code, please send me some feedback.
The other parts of this patch just remove an unused parameter from
sti_rom_copy() and fixes a compiler-warning in stifb.c.
btw, stifb will still not work :-(
Greetings,
Helge
--------------Boundary-00=_OEYPOZ9VOG491GDHLIGZ
Content-Type: text/x-c;
charset="iso-8859-1";
name="xxx"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="xxx"
PyB4eHgKSW5kZXg6IHN0aWNvbi1ibW9kZS5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9ob21lL2N2
cy9wYXJpc2MvbGludXgvZHJpdmVycy92aWRlby9zdGkvc3RpY29uLWJtb2RlLmMsdgpyZXRyaWV2
aW5nIHJldmlzaW9uIDEuMwpkaWZmIC11IC1yMS4zIHN0aWNvbi1ibW9kZS5jCi0tLSBzdGljb24t
Ym1vZGUuYwkyMDAxLzAyLzAzIDAxOjI0OjU1CTEuMworKysgc3RpY29uLWJtb2RlLmMJMjAwMS8w
Mi8xMyAyMzowNzowOQpAQCAtMTA2LDYyICsxMDYsNjcgQEAKIAlyZXR1cm4gdmlydF90b19waHlz
KHJldCk7CiB9CiAKKworc3RhdGljIGludCBfX2luaXQgCitibW9kZV9zdGlfc2VhcmNoX2ZvbnQo
c3RydWN0IHN0aV9jb29rZWRfcm9tICpyb20sIGludCBoZWlnaHQsIGludCB3aWR0aCkKK3sKKwlz
dHJ1Y3Qgc3RpX2Nvb2tlZF9mb250ICpmb250OworCWludCBpID0gM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