Author: wmb Date: Sat Jul 7 04:18:02 2012 New Revision: 3040 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3040
Log: OLPC - revert the SD node rearrangement portion of revision 3023, to fix Linux booting on older kernels (OLPC trac #11998).
Modified: cpu/arm/olpc/build-fw.fth cpu/arm/olpc/sdhci.fth cpu/arm/olpc/sdregs.fth
Modified: cpu/arm/olpc/build-fw.fth ============================================================================== --- cpu/arm/olpc/build-fw.fth Fri Jul 6 09:46:38 2012 (r3039) +++ cpu/arm/olpc/build-fw.fth Sat Jul 7 04:18:02 2012 (r3040) @@ -357,8 +357,8 @@ fload ${BP}/cpu/arm/olpc/emmc.fth [then]
-devalias int /sd/sdhci@d4281000/disk -devalias ext /sd/sdhci@d4280000/disk +devalias int /sd/disk@3 +devalias ext /sd/disk@1 devalias net /wlan \ XXX should report-net in case of USB Ethernet
fload ${BP}/dev/olpc/kb3700/spicmd.fth \ EC SPI Command Protocol
Modified: cpu/arm/olpc/sdhci.fth ============================================================================== --- cpu/arm/olpc/sdhci.fth Fri Jul 6 09:46:38 2012 (r3039) +++ cpu/arm/olpc/sdhci.fth Sat Jul 7 04:18:02 2012 (r3040) @@ -1,22 +1,16 @@ purpose: Load file for SDHCI (Secure Digital Host Controller Interface)
-0 0 " " " /" begin-package +0 0 " d4280000" " /" begin-package
fload ${BP}/cpu/arm/olpc/sdregs.fth fload ${BP}/dev/mmc/sdhci/sdhci.fth
- " simple-bus" +compatible - h# d4280000 encode-int h# d4280000 encode-int encode+ h# 2000 encode-int encode+ " ranges" property - 1 " #address-cells" integer-property - 1 " #size-cells" integer-property - d# 1 to power-off-time \ A2 and A3 have turn-off clamps \ true to avoid-high-speed?
hex - : slot# ( -- n ) slot h# d4280000 - h# 800 / 1+ ; : olpc-card-inserted? ( -- flag ) - slot# 1 = if d# 31 gpio-pin@ 0= else true then + slot 1 = if d# 31 gpio-pin@ 0= else true then ; ' olpc-card-inserted? to card-inserted?
@@ -24,72 +18,35 @@ : gpio-power-on ( -- ) sdhci-card-power-on \ The CL3 version below actually works for CL2 >= B1 -+ olpc-cl2 d# 36 slot# - gpio-set -+ olpc-cl3 slot# 2 = if d# 34 gpio-set then ++ olpc-cl2 d# 36 slot - gpio-set ++ olpc-cl3 slot 2 = if d# 34 gpio-set then ; ' gpio-power-on to card-power-on
: gpio-power-off ( -- ) -+ olpc-cl2 d# 36 slot# - gpio-clr -+ olpc-cl3 slot# 2 = if d# 34 gpio-clr then ++ olpc-cl2 d# 36 slot - gpio-clr ++ olpc-cl3 slot 2 = if d# 34 gpio-clr then sdhci-card-power-off ; ' gpio-power-off to card-power-off
+ olpc-cl2 new-device -+ olpc-cl2 h# d428.0000 h# 800 reg -+ olpc-cl2 8 encode-int " bus-width" property -+ olpc-cl2 " mrvl,pxav3-mmc" encode-string " compatible" property -+ olpc-cl2 d# 31 encode-int " clk-delay-cycles" property -+ olpc-cl2 fload ${BP}/dev/mmc/sdhci/slot.fth -+ olpc-cl2 d# 39 " interrupts" integer-property - -+ olpc-cl2 " /pmua" encode-phandle 3 encode-int encode+ " clocks" property -+ olpc-cl2 " PXA-SDHCLK" " clock-names" string-property - -+ olpc-cl2 new-device -+ olpc-cl2 fload ${BP}/dev/mmc/sdhci/sdmmc.fth -+ olpc-cl2 fload ${BP}/dev/mmc/sdhci/selftest.fth -+ olpc-cl2 " external" " slot-name" string-property -+ olpc-cl2 finish-device ++ olpc-cl2 1 encode-int " reg" property ++ olpc-cl2 fload ${BP}/dev/mmc/sdhci/sdmmc.fth ++ olpc-cl2 fload ${BP}/dev/mmc/sdhci/selftest.fth ++ olpc-cl2 " external" " slot-name" string-property + olpc-cl2 finish-device
new-device - h# d428.0800 h# 800 reg - 8 encode-int " bus-width" property - " sdhci-pxav3" +compatible - " mrvl,pxav3-mmc" +compatible - d# 31 encode-int " clk-delay-cycles" property - 0 0 " non-removable" property - d# 52 " interrupts" integer-property - - " /pmua" encode-phandle 4 encode-int encode+ " clocks" property - " PXA-SDHCLK" " clock-names" string-property - - fload ${BP}/dev/mmc/sdhci/slot.fth - new-device - fload ${BP}/dev/mmc/sdhci/mv8686/loadpkg.fth - finish-device + 2 encode-int " reg" property + fload ${BP}/dev/mmc/sdhci/mv8686/loadpkg.fth finish-device
new-device - h# d428.1000 h# 800 reg - 0 0 " non-removable" property - 8 encode-int " bus-width" property - " sdhci-pxav3" +compatible - " mrvl,pxav3-mmc" +compatible - d# 31 encode-int " clk-delay-cycles" property - d# 53 " interrupts" integer-property - - " /pmua" encode-phandle d# 14 encode-int encode+ " clocks" property - " PXA-SDHCLK" " clock-names" string-property - - fload ${BP}/dev/mmc/sdhci/slot.fth - new-device - fload ${BP}/dev/mmc/sdhci/sdmmc.fth - fload ${BP}/dev/mmc/sdhci/selftest.fth - " internal" " slot-name" string-property - finish-device + 3 encode-int " reg" property + fload ${BP}/dev/mmc/sdhci/sdmmc.fth + fload ${BP}/dev/mmc/sdhci/selftest.fth + " internal" " slot-name" string-property finish-device
end-package
Modified: cpu/arm/olpc/sdregs.fth ============================================================================== --- cpu/arm/olpc/sdregs.fth Fri Jul 6 09:46:38 2012 (r3039) +++ cpu/arm/olpc/sdregs.fth Sat Jul 7 04:18:02 2012 (r3040) @@ -4,11 +4,11 @@ 0 instance value slot 0 instance value chip
-\ my-space /regs reg +my-space /regs reg
: map-regs ( -- ) chip if exit then - slot /regs " map-in" $call-parent + slot 1- h# 800 * my-space + /regs " map-in" $call-parent to chip ; : unmap-regs ( -- )