aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2019-09-10 22:02:22 +0200
committerJames Cameron <quozl@laptop.org>2020-03-12 14:17:55 +1100
commitf949c79cf0a32a1b717e46883e3d0115110f8cd6 (patch)
tree8d16e1f7016a6d308212ba8d41e5d240d9315598
parentece494ecf39a156671f92fd5ee03157632e1f5fe (diff)
downloadopenfirmware-f949c79cf0a32a1b717e46883e3d0115110f8cd6.tar.gz
gxfb: move maybe-set-cmos from dcon
It ir concerned with configuration of the Geode CRTC and is only used from the CRTC code itself.
-rw-r--r--cpu/x86/pc/olpc/devices.fth9
-rw-r--r--dev/geode/display/gxfb.fth6
-rw-r--r--dev/olpc/dcon/dcon.fth18
3 files changed, 15 insertions, 18 deletions
diff --git a/cpu/x86/pc/olpc/devices.fth b/cpu/x86/pc/olpc/devices.fth
index 94bc9a4b..d7289964 100644
--- a/cpu/x86/pc/olpc/devices.fth
+++ b/cpu/x86/pc/olpc/devices.fth
@@ -4,6 +4,15 @@ purpose: Load device drivers according to configuration definitions
: gx? ( -- flag ) h# 4c000017 msr@ drop 4 rshift 2 = ;
: lx? ( -- flag ) h# 4c000017 msr@ drop 4 rshift 3 = ;
+\ This depends on a jumper on the board
+: tft-mode? ( -- flag )
+ gx? if
+ h# c000.2001 msr@ drop h# 40 and 0<>
+ else
+ true
+ then
+;
+
fload ${BP}/dev/geode/msr.fth
fload ${BP}/cpu/x86/pc/isaio.fth
diff --git a/dev/geode/display/gxfb.fth b/dev/geode/display/gxfb.fth
index 5f091011..9845d078 100644
--- a/dev/geode/display/gxfb.fth
+++ b/dev/geode/display/gxfb.fth
@@ -474,6 +474,12 @@ d# 12,000 constant scanline-spins
set-mode
;
+d# 440 8 / constant dcon-flag
+
+: maybe-set-cmos ( -- )
+ tft-mode? 1 and dcon-flag cmos!
+;
+
: probe-dcon ( -- )
true to dcon? set-mode
dcon-gpio-init \ GPIO stuff
diff --git a/dev/olpc/dcon/dcon.fth b/dev/olpc/dcon/dcon.fth
index f68844b3..3cfb1e16 100644
--- a/dev/olpc/dcon/dcon.fth
+++ b/dev/olpc/dcon/dcon.fth
@@ -234,24 +234,6 @@ dconload constant out-gpios
\ ['] dcon-interrupt 5 request_irq
;
-d# 440 8 / constant dcon-flag
-
-: msr@ ( l -- d ) " rdmsr" eval ;
-: msr! ( d l -- ) " wrmsr" eval ;
-
-\ This depends on a jumper on the board
-: tft-mode? ( -- flag )
- gx? if
- h# c000.2001 msr@ drop h# 40 and 0<>
- else
- true
- then
-;
-
-: maybe-set-cmos ( -- )
- tft-mode? 1 and dcon-flag cmos!
-;
-
\ LICENSE_BEGIN
\ Copyright (c) 2006 FirmWorks
\