diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2019-02-20 23:57:46 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2019-04-19 07:28:33 +0200 |
commit | d7916060c33c9fb8283914a43fbeeda4ef030a61 (patch) | |
tree | 33c52025b2b4f44cb7a0160b81878067defde1a3 | |
parent | d11fdbc908f46805f9d7ba5d28ca273468edef14 (diff) | |
download | openfirmware-d7916060c33c9fb8283914a43fbeeda4ef030a61.tar.gz |
mmp2/clk: move my-clock-on/off from pmua.fth to clk.fth
-rw-r--r-- | cpu/arm/mmp2/clk.fth | 15 | ||||
-rw-r--r-- | cpu/arm/mmp2/pmua.fth | 15 |
2 files changed, 15 insertions, 15 deletions
diff --git a/cpu/arm/mmp2/clk.fth b/cpu/arm/mmp2/clk.fth index a2250e17..fb6409f7 100644 --- a/cpu/arm/mmp2/clk.fth +++ b/cpu/arm/mmp2/clk.fth @@ -213,6 +213,21 @@ h# 240 constant audio-sram-pwr end-package +\ This is a general-purpose mechanism for enabling/disabling a clock +\ that is described by a "clocks" property in the device node. The +\ property value is a phandle and an index, as used in Linux. + +: my-clock-on/off ( on? -- ) + " clocks" get-my-property abort" No clocks property" ( on? propval$ ) + decode-int >r ( on? propval$ r: phandle ) + get-encoded-int ( on? clock# r: phandle ) + r> push-package ( on? clock# ) + " on/off" package-execute ( ) + pop-package ( ) +; +: my-clock-off ( -- ) false my-clock-on/off ; +: my-clock-on ( -- ) true my-clock-on/off ; + \ LICENSE_BEGIN \ Copyright (c) 2019 Lubomir Rintel <lkundrak@v3.sk> \ Parts based on cpu/arm/mmp2/pmua.fth file diff --git a/cpu/arm/mmp2/pmua.fth b/cpu/arm/mmp2/pmua.fth index 77412785..490d8dce 100644 --- a/cpu/arm/mmp2/pmua.fth +++ b/cpu/arm/mmp2/pmua.fth @@ -277,18 +277,3 @@ h# 240 constant audio-sram-pwr ; end-package - -\ This is a general-purpose mechanism for enabling/disabling a clock -\ that is described by a "clocks" property in the device node. The -\ property value is a phandle and an index, as used in Linux. - -: my-clock-on/off ( on? -- ) - " clocks" get-my-property abort" No clocks property" ( on? propval$ ) - decode-int >r ( on? propval$ r: phandle ) - get-encoded-int ( on? clock# r: phandle ) - r> push-package ( on? clock# ) - " on/off" package-execute ( ) - pop-package ( ) -; -: my-clock-off ( -- ) false my-clock-on/off ; -: my-clock-on ( -- ) true my-clock-on/off ; |