Author: wmb Date: Mon Jul 30 09:08:16 2012 New Revision: 3089 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3089
Log: OLPC CL4 - Changed names of EDI GPIO pins to match new naming schema.
Modified: cpu/arm/olpc/1.75/gpiopins.fth cpu/arm/olpc/3.0/gpiopins.fth cpu/arm/olpc/bbedi.fth cpu/arm/olpc/cl4/gpiopins.fth
Modified: cpu/arm/olpc/1.75/gpiopins.fth ============================================================================== --- cpu/arm/olpc/1.75/gpiopins.fth Mon Jul 30 01:16:14 2012 (r3088) +++ cpu/arm/olpc/1.75/gpiopins.fth Mon Jul 30 09:08:16 2012 (r3089) @@ -30,6 +30,7 @@ d# 53 constant rtc-scl-gpio# d# 54 constant rtc-sda-gpio#
+d# 103 constant ec-edi-miso-gpio# d# 104 constant ec-edi-cs-gpio# d# 105 constant ec-edi-mosi-gpio# d# 106 constant ec-edi-clk-gpio#
Modified: cpu/arm/olpc/3.0/gpiopins.fth ============================================================================== --- cpu/arm/olpc/3.0/gpiopins.fth Mon Jul 30 01:16:14 2012 (r3088) +++ cpu/arm/olpc/3.0/gpiopins.fth Mon Jul 30 09:08:16 2012 (r3089) @@ -27,6 +27,7 @@ d# 53 constant rtc-scl-gpio# d# 54 constant rtc-sda-gpio#
+d# 103 constant ec-edi-miso-gpio# d# 104 constant ec-edi-cs-gpio# d# 105 constant ec-edi-mosi-gpio# d# 106 constant ec-edi-clk-gpio#
Modified: cpu/arm/olpc/bbedi.fth ============================================================================== --- cpu/arm/olpc/bbedi.fth Mon Jul 30 01:16:14 2012 (r3088) +++ cpu/arm/olpc/bbedi.fth Mon Jul 30 09:08:16 2012 (r3089) @@ -1,16 +1,11 @@ \ See license at end of file purpose: Bit-banged SPI bus driver for KB3731 EC "EDI" interface
-d# 103 constant edi-miso-gpio# -d# 104 constant edi-cs-gpio# -d# 105 constant edi-mosi-gpio# -d# 106 constant edi-clk-gpio# +: edi-cs-on ( -- ) ec-edi-cs-gpio# gpio-clr ; +: edi-cs-off ( -- ) ec-edi-cs-gpio# gpio-set ;
-: edi-cs-on ( -- ) edi-cs-gpio# gpio-clr ; -: edi-cs-off ( -- ) edi-cs-gpio# gpio-set ; - -: edi-clk-lo ( -- ) edi-clk-gpio# gpio-clr ; -: edi-clk-hi ( -- ) edi-clk-gpio# gpio-set ; +: edi-clk-lo ( -- ) ec-edi-clk-gpio# gpio-clr ; +: edi-clk-hi ( -- ) ec-edi-clk-gpio# gpio-set ;
0 [if] \ All this timing stuff is pointless because the GPIOs are so slow @@ -60,7 +55,7 @@
[ifndef] edi-bit! : edi-bit! ( flag -- ) - edi-mosi-gpio# swap if gpio-set else gpio-clr then + ec-edi-mosi-gpio# swap if gpio-set else gpio-clr then edi-clk-hi edi-dly edi-clk-lo @@ -71,13 +66,13 @@ [ifndef] edi-bit! : edi-bit! ( flag -- ) if - [ edi-mosi-gpio# >gpio-pin h# 18 + ] dliteral io! \ Fast gpio-set + [ ec-edi-mosi-gpio# >gpio-pin h# 18 + ] dliteral io! \ Fast gpio-set else - [ edi-mosi-gpio# >gpio-pin h# 24 + ] dliteral io! \ Fast gpio-clr + [ ec-edi-mosi-gpio# >gpio-pin h# 24 + ] dliteral io! \ Fast gpio-clr then - [ edi-clk-gpio# >gpio-pin h# 18 + ] dliteral io! \ Fast gpio-set + [ ec-edi-clk-gpio# >gpio-pin h# 18 + ] dliteral io! \ Fast gpio-set \ edi-dly - [ edi-clk-gpio# >gpio-pin h# 24 + ] dliteral io! \ Fast gpio-set + [ ec-edi-clk-gpio# >gpio-pin h# 24 + ] dliteral io! \ Fast gpio-set \ edi-dly ; [then] @@ -92,7 +87,7 @@ : edi-bit@ ( -- flag ) edi-clk-hi edi-dly - edi-miso-gpio# gpio-pin@ + ec-edi-miso-gpio# gpio-pin@ edi-clk-lo edi-dly ;
Modified: cpu/arm/olpc/cl4/gpiopins.fth ============================================================================== --- cpu/arm/olpc/cl4/gpiopins.fth Mon Jul 30 01:16:14 2012 (r3088) +++ cpu/arm/olpc/cl4/gpiopins.fth Mon Jul 30 09:08:16 2012 (r3089) @@ -31,6 +31,7 @@ d# 53 constant rtc-scl-gpio# d# 54 constant rtc-sda-gpio#
+d# 103 constant ec-edi-miso-gpio# d# 104 constant ec-edi-cs-gpio# d# 105 constant ec-edi-mosi-gpio# d# 106 constant ec-edi-clk-gpio#
openfirmware@openfirmware.info