aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2019-10-12 17:59:35 +0200
committerJames Cameron <quozl@laptop.org>2020-03-12 14:17:55 +1100
commit9e6c4e8303839dcc029c202dbdb1318714dc5be1 (patch)
tree82f148ac267260eac05fb11831757f19d832459a
parent30485265b2c14c07041c139ce28a8bb52e455270 (diff)
downloadopenfirmware-9e6c4e8303839dcc029c202dbdb1318714dc5be1.tar.gz
geode/gpio: make /isa node a gpio-controller
The LPC node provides the GPIO functionality. Add properties specified by the Documentation/devicetree/bindings/common-properties.txt bindings.
-rw-r--r--cpu/x86/pc/lxdevel/devices.fth1
-rw-r--r--cpu/x86/pc/lxdevel/fw.bth1
-rw-r--r--cpu/x86/pc/neptune/devices.fth1
-rw-r--r--cpu/x86/pc/neptune/fw.bth1
-rw-r--r--cpu/x86/pc/olpc/devices.fth1
-rw-r--r--cpu/x86/pc/olpc/fw.bth1
-rw-r--r--dev/geode/gpio.fth5
7 files changed, 8 insertions, 3 deletions
diff --git a/cpu/x86/pc/lxdevel/devices.fth b/cpu/x86/pc/lxdevel/devices.fth
index c1652a16..942b444b 100644
--- a/cpu/x86/pc/lxdevel/devices.fth
+++ b/cpu/x86/pc/lxdevel/devices.fth
@@ -285,6 +285,7 @@ fload ${BP}/ofw/termemu/fb16.fth
end-package
devalias screen /display
+fload ${BP}/dev/geode/gpio.fth \ Rudimentary GPIO driver
\ fload ${BP}/dev/geode/acpi.fth \ Power management
\ LICENSE_BEGIN
diff --git a/cpu/x86/pc/lxdevel/fw.bth b/cpu/x86/pc/lxdevel/fw.bth
index 7aed486b..b544c34d 100644
--- a/cpu/x86/pc/lxdevel/fw.bth
+++ b/cpu/x86/pc/lxdevel/fw.bth
@@ -83,7 +83,6 @@ dev /
alias lmove lmove \ Needed by CS5536 NAND FLASH driver
dend
-fload ${BP}/dev/geode/gpio.fth \ Rudimentary GPIO driver
fload ${BP}/cpu/x86/pc/lxdevel/probemem.fth \ Memory probing
[ifdef] virtual-mode
diff --git a/cpu/x86/pc/neptune/devices.fth b/cpu/x86/pc/neptune/devices.fth
index 18ff2c63..60d511d0 100644
--- a/cpu/x86/pc/neptune/devices.fth
+++ b/cpu/x86/pc/neptune/devices.fth
@@ -288,6 +288,7 @@ fload ${BP}/ofw/core/muxdev.fth \ I/O collection/distribution device
\needs md5init fload ${BP}/ofw/ppp/md5.fth \ MD5 hash
+fload ${BP}/dev/geode/gpio.fth \ Rudimentary GPIO driver
fload ${BP}/dev/geode/acpi.fth \ Power management
\ warning @ warning off
\ : stand-init-io stand-init-io h# fff0.0000 to flash-base ;
diff --git a/cpu/x86/pc/neptune/fw.bth b/cpu/x86/pc/neptune/fw.bth
index 8b9c2f97..b0b6f583 100644
--- a/cpu/x86/pc/neptune/fw.bth
+++ b/cpu/x86/pc/neptune/fw.bth
@@ -88,7 +88,6 @@ dev /
alias lmove lmove \ Needed by CS5536 NAND FLASH driver
dend
-fload ${BP}/dev/geode/gpio.fth \ Rudimentary GPIO driver
fload ${BP}/cpu/x86/pc/neptune/probemem.fth \ Memory probing
[ifdef] virtual-mode
diff --git a/cpu/x86/pc/olpc/devices.fth b/cpu/x86/pc/olpc/devices.fth
index ab66edf5..aa7d8c00 100644
--- a/cpu/x86/pc/olpc/devices.fth
+++ b/cpu/x86/pc/olpc/devices.fth
@@ -256,6 +256,7 @@ fload ${BP}/ofw/core/muxdev.fth \ I/O collection/distribution device
\needs md5init fload ${BP}/ofw/ppp/md5.fth \ MD5 hash
+fload ${BP}/dev/geode/gpio.fth \ Rudimentary GPIO driver
fload ${BP}/dev/geode/acpi.fth \ Power management
fload ${BP}/dev/olpc/spiflash/memflash.fth \ Memory-mapped FLASH access
diff --git a/cpu/x86/pc/olpc/fw.bth b/cpu/x86/pc/olpc/fw.bth
index 80d65d7e..7db6865a 100644
--- a/cpu/x86/pc/olpc/fw.bth
+++ b/cpu/x86/pc/olpc/fw.bth
@@ -91,7 +91,6 @@ dend
fload ${BP}/cpu/x86/pc/olpc/port80.fth \ Port 80 debug messages
-fload ${BP}/dev/geode/gpio.fth \ Rudimentary GPIO driver
fload ${BP}/cpu/x86/pc/olpc/probemem.fth \ Memory probing
[ifdef] virtual-mode
diff --git a/dev/geode/gpio.fth b/dev/geode/gpio.fth
index c6f5a76f..7b44b392 100644
--- a/dev/geode/gpio.fth
+++ b/dev/geode/gpio.fth
@@ -31,6 +31,11 @@ alias >set noop ( mask -- mask' )
h# 5140000C constant MSR_LBAR_GPIO
+dev /isa
+ " " " gpio-controller" property
+ 2 " #gpio-cells" integer-property
+device-end
+
stand-init: gpio
MSR_LBAR_GPIO rdmsr ( lo hi )
h# 0000f001 <> abort" GPIO not enabled"