Changeset 3023
- Timestamp:
- Jun 29, 2012 11:04:07 PM (11 months ago)
- Files:
-
- 2 added
- 19 edited
-
cpu/arm/linux.fth (modified) (1 diff)
-
cpu/arm/mmp2/apbc.fth (added)
-
cpu/arm/mmp2/devices.fth (modified) (1 diff)
-
cpu/arm/mmp2/gpio.fth (modified) (1 diff)
-
cpu/arm/mmp2/irq.fth (modified) (3 diffs)
-
cpu/arm/mmp2/mfpr.fth (modified) (1 diff)
-
cpu/arm/mmp2/pmua.fth (added)
-
cpu/arm/mmp2/spimaster.fth (modified) (1 diff)
-
cpu/arm/mmp2/timer.fth (modified) (1 diff)
-
cpu/arm/mmp2/twsi.fth (modified) (1 diff)
-
cpu/arm/mmp2/uart.fth (modified) (1 diff)
-
cpu/arm/olpc/1.75/usb.fth (modified) (1 diff)
-
cpu/arm/olpc/build-fw.fth (modified) (21 diffs)
-
cpu/arm/olpc/rtc.fth (modified) (1 diff)
-
cpu/arm/olpc/sdhci.fth (modified) (4 diffs)
-
cpu/arm/olpc/sdregs.fth (modified) (1 diff)
-
cpu/arm/olpc/sound.fth (modified) (1 diff)
-
cpu/arm/olpc/spcmd.fth (modified) (1 diff)
-
dev/olpc/kb3700/spicmd.fth (modified) (1 diff)
-
dev/olpc/mmp2camera/loadpkg.fth (modified) (1 diff)
-
ofw/core/fdt.fth (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cpu/arm/linux.fth
r2917 r3023 105 105 [ifdef] flatten-device-tree 106 106 use-fdt? if 107 load-base h# 40000 - to linux-params 107 108 linux-params h# 40000 flatten-device-tree 108 109 else -
cpu/arm/mmp2/devices.fth
r2570 r3023 71 71 0 0 " d4018000" " /" begin-package \ UART3 72 72 fload ${BP}/cpu/arm/mmp2/uart.fth 73 d# 24 " interrupts" integer-property 73 74 end-package 74 75 devalias com1 /uart -
cpu/arm/mmp2/gpio.fth
r2550 r3023 40 40 : gpio-set-xmsk ( gpio# -- ) >gpio-xmsk tuck io@ or swap io! ; 41 41 : gpio-clr-xmsk ( gpio# -- ) >gpio-xmsk tuck io@ swap invert and swap io! ; 42 43 \ See <Linux> Documentation/devicetree/bindings/gpio/mrvl-gpio.txt 44 0 0 " d4019000" " /" begin-package 45 " gpio" name 46 47 " mrvl,mmp-gpio" encode-string 48 " mrvl,pxa-gpio" encode-string encode+ " compatible" property 49 50 my-address my-space h# 1000 reg 51 52 d# 49 encode-int " interrupts" property 53 " gpio_mux" " interrupt-names" string-property 54 " " " gpio-controller" property 55 3 " #gpio-cells" integer-property 56 " " " interrupt-controller" property 57 1 " #interrupt-cells" integer-property 58 59 " /apbc" encode-phandle d# 13 encode-int encode+ " clocks" property 60 " GPIO" " clock-names" string-property 61 62 63 1 " #address-cells" integer-property 64 1 " #size-cells" integer-property 65 : encode-unit ( phys.. -- str ) push-hex (u.) pop-base ; 66 : decode-unit ( str -- phys.. ) push-hex $number if 0 then pop-base ; 67 68 : make-gpio-mux-node ( offset -- ) 69 new-device 70 " gpio" name 71 4 reg 72 finish-device 73 ; 74 h# 00 make-gpio-mux-node 75 h# 04 make-gpio-mux-node 76 h# 08 make-gpio-mux-node 77 h# 100 make-gpio-mux-node 78 h# 104 make-gpio-mux-node 79 h# 108 make-gpio-mux-node 80 end-package -
cpu/arm/mmp2/irq.fth
r2551 r3023 5 5 6 6 " interrupt-controller" device-name 7 my-address my-space h# 400 reg 7 \ my-address my-space h# 400 reg 8 my-address my-space h# 1000 reg 8 9 9 10 0 value base-adr … … 36 37 37 38 : open ( -- flag ) 38 my-unit h# 400 " map-in" $call-parent to base-adr39 my-unit h# 1000 " map-in" $call-parent to base-adr 39 40 \ Leave the IRQ table alone so as not to steal interrupts from the SP 40 41 \ block-irqs … … 44 45 ; 45 46 : close ( -- ) ; 47 48 " mrvl,mmp2-intc" " compatible" string-property 49 1 " #address-cells" integer-property 50 1 " #size-cells" integer-property 51 : encode-unit ( phys.. -- str ) push-hex (u.) pop-base ; 52 : decode-unit ( str -- phys.. ) push-hex $number if 0 then pop-base ; 53 54 0 0 " interrupt-controller" property 55 1 " #interrupt-cells" integer-property 56 \ d# 64 " mrvl,intc-numbers" integer-property 57 d# 64 " mrvl,intc-nr-irqs" integer-property 58 \ h# 20 " mrvl,intc-enable-mask" integer-property 59 60 : make-mux-node ( statreg maskreg irq# #irqs ) 61 new-device 62 " interrupt-controller" name ( maskreg statreg irq# #irqs ) 63 " mrvl,intc-nr-irqs" integer-property ( maskreg statreg irq# ) 64 " interrupts" integer-property ( maskreg statreg ) 65 >r 4 encode-reg r> 4 encode-reg encode+ " reg" property ( ) 66 " mrvl,mmp2-mux-intc" +compatible 67 0 0 " interrupt-controller" property 68 1 " #interrupt-cells" integer-property 69 " mux status" encode-string " mux mask" encode-string encode+ " reg-names" property 70 finish-device 71 ; 72 73 h# 150 h# 168 4 2 make-mux-node \ intcmux4 74 h# 154 h# 16c 5 2 make-mux-node \ intcmux5 75 h# 180 h# 17c 9 3 make-mux-node \ intcmux9 76 h# 158 h# 170 d# 17 5 make-mux-node \ intcmux17 77 h# 15c h# 174 d# 35 d# 15 make-mux-node \ intcmux35 78 h# 160 h# 178 d# 51 2 make-mux-node \ intcmux51 79 h# 188 h# 184 d# 55 2 make-mux-node \ intcmux55 80 81 0 [if] 82 new-device 83 " interrupt-controller" name 84 " mrvl,mmp2-mux-intc" +compatible 85 86 0 0 87 h# 150 encode-int encode+ 4 encode-int encode+ 88 h# 168 encode-int encode+ 4 encode-int encode+ " reg" property 89 \ h# 150 " mrvl,intc-status" integer-property 90 \ h# 168 " mrvl,intc-mask" integer-property 91 92 4 " interrupts" integer-property 93 d# 2 " mrvl,intc-nr-irqs" integer-property 94 \ 0: USB_CHARGER 1: PMIC 95 finish-device 96 97 new-device 98 " interrupt-controller" name 99 " mrvl,mmp2-mux-intc" +compatible 100 101 0 0 102 h# 154 encode-int encode+ 4 encode-int encode+ 103 h# 16c encode-int encode+ 4 encode-int encode+ " reg" property 104 105 5 " interrupts" integer-property 106 d# 2 " mrvl,intc-numbers" integer-property 107 d# 1 " mrvl,clr-mfp-irq" integer-property 108 \ 0: RTC_ALARM 1: RTC 109 finish-device 110 111 new-device 112 " interrupt-controller" name 113 114 " mrvl,mmp2-mux-intc" +compatible 115 116 0 0 117 h# 180 encode-int encode+ 4 encode-int encode+ 118 h# 17c encode-int encode+ 4 encode-int encode+ " reg" property 119 120 d# 9 " interrupts" integer-property 121 d# 3 " mrvl,intc-numbers" integer-property 122 \ 0:KPC (keypad) 1:ROT (rotary) 2: TBALL (trackball) 123 \ h# 15c " mrvl,intc-status" integer-property 124 \ h# 174 " mrvl,intc-mask" integer-property 125 finish-device 126 127 new-device 128 " interrupt-controller" name 129 " mrvl,mmp2-mux-intc" +compatible 130 131 0 0 132 h# 158 encode-int encode+ 4 encode-int encode+ 133 h# 170 encode-int encode+ 4 encode-int encode+ " reg" property 134 135 d# 17 " interrupts" integer-property 136 d# 5 " mrvl,intc-numbers" integer-property 137 \ 0: TWSI2 1: TWSI3 2: TWSI4 3: TWSI5 4: TWSI6 138 finish-device 139 140 new-device 141 " interrupt-controller" name 142 143 " mrvl,mmp2-mux-intc" +compatible 144 145 0 0 146 h# 15c encode-int encode+ 4 encode-int encode+ 147 h# 174 encode-int encode+ 4 encode-int encode+ " reg" property 148 \ h# 15c " mrvl,intc-status" integer-property 149 \ h# 174 " mrvl,intc-mask" integer-property 150 151 d# 35 " interrupts" integer-property 152 d# 15 " mrvl,intc-numbers" integer-property 153 \ 0: PERF 1: L2_PA_ECC 2: L2_ECC 3: L2_UECC 4: DDR 154 \ 5: FABRIC0_TO 6: FABRIC1_TO 7: FABRIC2_TO 8: resv 9: THERMAL 155 \ 10: MAIN_PMU 11: WDT2 12: CORESIGHT 13: COMMTX 14: COMMRX 156 finish-device 157 158 new-device 159 " interrupt-controller" name 160 0 0 " interrupt-controller" property 161 " mrvl,mmp2-mux-intc" +compatible 162 163 0 0 164 h# 160 encode-int encode+ 4 encode-int encode+ 165 h# 178 encode-int encode+ 4 encode-int encode+ " reg" property 166 167 d# 51 " interrupts" integer-property 168 d# 2 " mrvl,intc-numbers" integer-property 169 \ 0:HSI_CAWAKE 1:MIPI_HSI_INT1 170 \ h# 15c " mrvl,intc-status" integer-property 171 \ h# 174 " mrvl,intc-mask" integer-property 172 finish-device 173 [then] 46 174 47 175 end-package -
cpu/arm/mmp2/mfpr.fth
r2640 r3023 65 65 : sleep1 ( n -- n' ) h# 0100 or ; 66 66 : sleepi ( n -- n' ) h# 0080 or ; 67 68 0 0 " d401e000" " /" begin-package \ MFPR 69 " mfpr" name 70 my-address my-space h# 1000 reg 71 " mrvl,pxa-mfpr" +compatible 72 73 \ These are for generating a table in a form used by arch/arm/plat-pxa/mfp.c 74 : +int ( adr len n -- adr len' ) encode-int encode+ ; 75 : +mfpr ( adr len gpio# reg-offset -- adr len' ) >r +int -1 +int r> +int ; 76 : +mfpr-range ( adr len gpio#-start gpio#-end reg-offset -- adr len' ) 77 >r >r +int r> +int r> +int 78 ; 79 : +mfpr-end ( adr len -- adr len' ) -1 +int -1 +int -1 +int ; 80 81 82 0 0 encode-bytes 83 d# 0 d# 58 h# 54 +mfpr-range 84 d# 59 d# 73 h# 280 +mfpr-range 85 d# 74 d# 101 h# 170 +mfpr-range 86 d# 102 d# 103 h# 00 +mfpr-range 87 d# 104 h# 1fc +mfpr 88 d# 105 h# 1f8 +mfpr 89 d# 106 h# 1f4 +mfpr 90 d# 107 h# 1f0 +mfpr 91 d# 108 h# 21c +mfpr 92 d# 109 h# 218 +mfpr 93 d# 110 h# 214 +mfpr 94 d# 111 h# 200 +mfpr 95 d# 112 h# 244 +mfpr 96 d# 113 h# 25c +mfpr 97 d# 114 h# 164 +mfpr 98 d# 115 d# 122 h# 260 +mfpr-range 99 d# 123 h# 148 +mfpr 100 d# 124 d# 141 h# 00c +mfpr-range 101 d# 142 h# 008 +mfpr 102 d# 143 d# 151 h# 220 +mfpr-range 103 d# 152 d# 152 h# 248 +mfpr-range 104 d# 154 d# 155 h# 254 +mfpr-range 105 d# 156 d# 159 h# 14c +mfpr-range 106 107 d# 160 h# 250 +mfpr 108 d# 161 h# 210 +mfpr 109 d# 162 h# 20c +mfpr 110 d# 163 h# 208 +mfpr 111 d# 164 h# 204 +mfpr 112 d# 165 h# 1ec +mfpr 113 d# 166 h# 1e8 +mfpr 114 d# 167 h# 1e4 +mfpr 115 d# 168 h# 1e0 +mfpr 116 d# 171 h# 2c8 +mfpr \ PXA2128 only 117 h# 15b h# 15c h# 140 +mfpr-range \ MFPR_PIN_TWSI1_SCL - MFPR_PIN_TWSI1_SDA 118 h# 15d h# 15e h# 2bc +mfpr-range \ MFPR_PIN_TWSI4_SCL - MFPR_PIN_TWSI4_SDA 119 h# 159 h# 2c4 +mfpr \ MFPR_PIN_PMIC_INT 120 h# 15f h# 160 +mfpr \ MFPR_PIN_CLK_REQ 121 +mfpr-end 122 " mrvl,pin-map" property 123 124 end-package -
cpu/arm/mmp2/spimaster.fth
r2570 r3023 9 9 10 10 0 0 encode-bytes 11 " Marvell,ssp-spi" encode-string encode+11 " mrvl,ssp-spi" encode-string encode+ 12 12 " compatible" property 13 " /abpc" encode-phandle d# 19 encode-int encode+ " clocks" property 13 14 14 15 my-address my-space h# 1000 encode-reg -
cpu/arm/mmp2/timer.fth
r2895 r3023 189 189 ; 190 190 ' safe-idle to stdin-idle 191 192 0 0 " d4014000" " /" begin-package 193 " timer" name 194 " mrvl,mmp-timer" +compatible 195 my-address my-space h# 100 reg 196 d# 13 " interrupts" integer-property 197 " /apbc" encode-phandle 9 encode-int encode+ " clocks" property 198 end-package -
cpu/arm/mmp2/twsi.fth
r2678 r3023 157 157 158 158 [ifdef] begin-package 159 : make-twsi-node ( baseadr clock# irq# muxed-irq? fast? unit# -- ) 160 root-device 161 new-device 162 " linux,unit#" integer-property 163 " i2c" name 164 " mrvl,mmp-twsi" +compatible ( baseadr clock# irq# muxed-irq? fast? ) 165 if 0 0 " mrvl,i2c-fast-mode" property then ( baseadr clock# irq# muxed-irq? ) 166 if 167 " /interrupt-controller/interrupt-controller@158" encode-phandle " interrupt-parent" property 168 then ( baseadr clock# irq# ) 169 " interrupts" integer-property ( baseadr clock# ) 170 " /apbc" encode-phandle rot encode-int encode+ " clocks" property 171 172 h# 1000 reg ( ) 173 1 " #address-cells" integer-property 174 1 " #size-cells" integer-property 175 " : open true ; : close ;" evaluate 176 " : encode-unit ( phys.. -- str ) push-hex (u.) pop-base ;" evaluate 177 " : decode-unit ( str -- phys.. ) push-hex $number if 0 then pop-base ;" evaluate 178 finish-device 179 device-end 180 ; 181 182 \ baseadr clk irq mux? fast? unit# 183 \ h# d4011000 1 7 false true N make-twsi-node \ TWSI1 184 \ h# d4031000 2 0 true true N make-twsi-node \ TWSI2 185 \ h# d4032000 3 1 true true N make-twsi-node \ TWSI3 186 h# d4033000 4 2 true true 0 make-twsi-node \ TWSI4 187 \ h# d4038000 d# 30 3 true true N make-twsi-node \ TWSI5 188 h# d4034000 d# 31 4 true true 1 make-twsi-node \ TWSI6 189 190 0 0 " 30" " /i2c@d4033000" begin-package \ TWSI 191 " touchscreen" name 192 " raydium_ts" +compatible 193 my-address my-space 1 reg 194 end-package 195 196 0 0 " 19" " /i2c@d4034000" begin-package 197 " accelerometer" name 198 " lis3lv02d" +compatible 199 my-address my-space 1 reg 200 end-package 201 159 202 0 0 " " " /" begin-package 160 203 " twsi" name -
cpu/arm/mmp2/uart.fth
r1987 r3023 1 1 " uart" name 2 " mrvl,mmp-uart" +compatible 2 3 my-space h# 20 reg 3 4 -
cpu/arm/olpc/1.75/usb.fth
r2985 r3023 9 9 ; 10 10 : my-map-out ( adr len -- ) swap h# 100 - swap " map-out" $call-parent ; 11 " /pmua" encode-phandle 5 encode-int encode+ " clocks" property 12 d# 44 " interrupts" integer-property 13 11 14 false constant has-dbgp-regs? 12 15 false constant needs-dummy-qh? -
cpu/arm/olpc/build-fw.fth
r3005 r3023 82 82 83 83 84 fload ${BP}/cpu/arm/mmp2/pmua.fth 85 fload ${BP}/cpu/arm/mmp2/apbc.fth 86 fload ${BP}/cpu/arm/mmp2/irq.fth 84 87 fload ${BP}/cpu/arm/mmp2/timer.fth 85 88 fload ${BP}/cpu/arm/mmp2/twsi.fth … … 99 102 warning ! 100 103 101 fload ${BP}/cpu/arm/mmp2/irq.fth102 103 104 fload ${BP}/cpu/arm/mmp2/watchdog.fth \ reset-all using watchdog timer 104 105 105 106 0 0 " d4018000" " /" begin-package \ UART3 106 107 fload ${BP}/cpu/arm/mmp2/uart.fth 108 " /apbc" encode-phandle d# 12 encode-int encode+ " clocks" property 109 d# 24 " interrupts" integer-property 110 1 " linux,unit#" integer-property 107 111 end-package 108 112 devalias com1 /uart … … 112 116 0 0 " d4030000" " /" begin-package \ UART1 113 117 fload ${BP}/cpu/arm/mmp2/uart.fth 118 d# 27 " interrupts" integer-property 119 " /apbc" encode-phandle d# 10 encode-int encode+ " clocks" property 120 0 " linux,unit#" integer-property 114 121 end-package 115 122 devalias com2 /uart … … 132 139 " flash" device-name 133 140 141 " /apbc" encode-phandle d# 19 encode-int encode+ " clocks" property 142 d# 0 " interrupts" integer-property 134 143 h# 10.0000 value /device 135 144 my-address my-space h# 100 reg … … 178 187 : hdd-led-on ( -- ) ; 179 188 : hdd-led-toggle ( -- ) ; 180 [then] 181 [ifdef] olpc-cl2 189 [else] 182 190 : hdd-led-off ( -- ) d# 10 gpio-clr ; 183 191 : hdd-led-on ( -- ) d# 10 gpio-set ; … … 220 228 ' ofw-fw-filename$ to fw-filename$ 221 229 230 0 0 " f0400000" " /" begin-package 231 " vmeta" name 232 my-address my-space h# 1000 reg 233 234 " mrvl,mmp2-vmeta" +compatible 235 236 " /pmua" encode-phandle d# 10 encode-int encode+ " clocks" property 237 d# 26 " interrupts" integer-property 238 end-package 239 222 240 0 0 " d420b000" " /" begin-package 223 241 " display" name 224 \+ olpc-cl2 fload ${BP}/cpu/arm/olpc/1.75/lcdcfg.fth 225 \+ olpc-cl3 fload ${BP}/cpu/arm/olpc/3.0/lcdcfg.fth 242 my-address my-space h# 1000 reg 243 244 " /pmua" encode-phandle 1 encode-int encode+ " clocks" property 245 d# 41 " interrupts" integer-property 246 247 [ifdef] olpc-cl3 248 fload ${BP}/cpu/arm/olpc/3.0/lcdcfg.fth 249 [else] 250 fload ${BP}/cpu/arm/olpc/1.75/lcdcfg.fth 251 [then] 226 252 227 253 fload ${BP}/cpu/arm/olpc/lcd.fth 228 \+ olpc-cl2 fload ${BP}/dev/olpc/dcon/mmp2dcon.fth \ DCON control 254 [ifndef] olpc-cl3 255 fload ${BP}/dev/olpc/dcon/mmp2dcon.fth \ DCON control 256 [then] 229 257 defer convert-color ' noop to convert-color 230 258 defer pixel* … … 300 328 devalias screen /display 301 329 302 \- olpc-cl3 devalias keyboard /keyboard 303 304 \+ olpc-cl2 create 15x30pc " ${BP}/ofw/termemu/15x30pc.psf" $file, 305 \+ olpc-cl2 ' 15x30pc to romfont 306 \+ olpc-cl3 create cp881-16 " ${BP}/ofw/termemu/cp881-16.obf" $file, 307 \+ olpc-cl3 ' cp881-16 to romfont 330 [ifdef] olpc-cl3 331 create cp881-16 " ${BP}/ofw/termemu/cp881-16.obf" $file, 332 ' cp881-16 to romfont 333 [else] 334 devalias keyboard /keyboard 335 336 create 15x30pc " ${BP}/ofw/termemu/15x30pc.psf" $file, 337 ' 15x30pc to romfont 338 [then] 308 339 309 340 fload ${BP}/cpu/arm/olpc/sdhci.fth 310 341 \- cl2-a1 fload ${BP}/cpu/arm/olpc/emmc.fth 311 342 312 devalias int /sd/ disk@3313 devalias ext /sd/ disk@1343 devalias int /sd/sdhci@d4281000/disk 344 devalias ext /sd/sdhci@d4280000/disk 314 345 devalias net /wlan \ XXX should report-net in case of USB Ethernet 315 346 … … 371 402 \+ olpc-cl3 fload ${BP}/cpu/arm/mmp2/ulpiphy.fth 372 403 \+ olpc-cl3 fload ${BP}/cpu/arm/olpc/3.0/usb.fth 404 \+ olpc-cl4 fload ${BP}/cpu/arm/olpc/cl4/usb.fth 373 405 374 406 fload ${BP}/dev/olpc/mmp2camera/loadpkg.fth … … 394 426 \+ olpc-cl2 " olpc,xo-1.75" " compatible" string-property 395 427 \+ olpc-cl3 " olpc,xo-3.0" " compatible" string-property 428 \+ olpc-cl4 " olpc,xo-cl4" " compatible" string-property 396 429 397 430 \ The "1-" removes the null byte … … 403 436 ['] ec-date$ catch 0= if " ec-date" string-property then 404 437 ['] ec-user$ catch 0= if " ec-user" string-property then 438 " /interrupt-controller" encode-phandle " interrupt-parent" property 439 \ " /interrupt-controller" find-package if 440 \ " interrupt-parent" integer-property 441 \ then 442 0 0 " ranges" property 405 443 dend 406 444 … … 421 459 fload ${BP}/cpu/arm/mmp2/thermal.fth 422 460 fload ${BP}/cpu/arm/mmp2/fuse.fth 461 fload ${BP}/cpu/arm/olpc/bsl.fth 423 462 424 463 [ifndef] virtual-mode … … 510 549 ; 511 550 512 \+ olpc-cl2 : rotate-button? ( -- flag ) d# 15 gpio-pin@ 0= ; 513 \+ olpc-cl3 false value rotate-button? 551 [ifdef] olpc-cl3 552 false value rotate-button? 553 [else] 554 : rotate-button? ( -- flag ) d# 15 gpio-pin@ 0= ; 555 [then] 556 514 557 warning @ warning off 515 558 : init … … 626 669 code halt ( -- ) wfi c; 627 670 671 \+ olpc-cl2 fload ${BP}/cpu/arm/olpc/1.75/switches.fth \ Lid and ebook switches 628 672 \+ olpc-cl3 fload ${BP}/cpu/arm/olpc/3.0/switches.fth \ Switches 629 \+ olpc-cl2 fload ${BP}/cpu/arm/olpc/1.75/switches.fth \ Lid and ebook switches 673 \+ olpc-cl4 fload ${BP}/cpu/arm/olpc/cl4/switches.fth \ Lid and ebook switches 674 630 675 fload ${BP}/cpu/arm/mmp2/rtc.fth \ Internal RTC, used for wakeups 631 \+ olpc-cl3 fload ${BP}/cpu/arm/olpc/3.0/leds.fth \ LEDs 676 632 677 \+ olpc-cl2 fload ${BP}/cpu/arm/olpc/1.75/leds.fth \ LEDs 678 \+ olpc-cl3 fload ${BP}/cpu/arm/olpc/3.0/leds.fth \ LEDs 679 \+ olpc-cl4 fload ${BP}/cpu/arm/olpc/cl4/leds.fth \ LEDs 680 633 681 fload ${BP}/cpu/x86/pc/olpc/via/factory.fth \ Manufacturing tools 634 682 635 683 fload ${BP}/cpu/arm/olpc/accelerometer.fth 636 \+ olpc-cl2 fload ${BP}/cpu/arm/olpc/1.75/compass.fth 684 685 [ifndef] olpc-cl3 686 fload ${BP}/cpu/arm/olpc/1.75/compass.fth 687 [then] 637 688 638 689 \ Suppress long memory test at final test stage … … 701 752 fload ${BP}/cpu/x86/pc/olpc/gamekeynames.fth 702 753 754 [ifdef] cl2-a1 703 755 : game-key@ ( -- n ) 704 756 0 ( n ) 705 [ifdef] cl2-a1706 757 d# 16 gpio-pin@ 0= if h# 80 or then \ O 707 758 d# 17 gpio-pin@ 0= if h# 02 or then \ Check … … 709 760 d# 19 gpio-pin@ 0= if h# 01 or then \ Square 710 761 d# 20 gpio-pin@ 0= if h# 40 or then \ Rotate 711 [then] 712 [ifdef] olpc-cl2 713 [ifdef] use_mmp2_keypad_control 762 ; 763 [then] 764 765 defined? olpc-cl2 defined? olpc-cl4 or [if] 766 767 [ifdef] use_mmp2_keypad_control 768 : game-key@ ( -- n ) 769 0 ( n ) 714 770 d# 15 gpio-pin@ 0= if button-rotate or then ( n ) 715 771 scan-keypad ( n keypad ) … … 723 779 rocker-left h# 80 keypad-bit ( n' keypad ) 724 780 drop ( n ) 725 [else] 781 ; 782 [else] 783 : game-key@ ( -- n ) 784 0 ( n ) 726 785 d# 15 gpio-pin@ 0= if button-rotate or then 727 786 d# 16 gpio-pin@ 0= if button-o or then … … 733 792 d# 22 gpio-pin@ 0= if rocker-down or then 734 793 d# 23 gpio-pin@ 0= if rocker-left or then 735 [then] 736 [then] 737 ; 794 ; 795 [then] 796 797 [then] 738 798 739 799 fload ${BP}/cpu/x86/pc/olpc/gamekeys.fth … … 757 817 fload ${BP}/cpu/x86/pc/olpc/gridmap.fth \ Gridded display tools 758 818 fload ${BP}/cpu/x86/pc/olpc/via/copynand.fth 819 820 \+ olpc-cl2 fload ${BP}/cpu/arm/olpc/rm3150-touchscreen.fth \ Touchscreen driver and diagnostic 759 821 \+ olpc-cl3 fload ${BP}/cpu/arm/olpc/exc7200-touchscreen.fth \ Touchscreen driver and diagnostic 760 822 \+ olpc-cl3 fload ${BP}/dev/softkeyboard.fth \ On-screen keyboard 761 \+ olpc-cl 2 fload ${BP}/cpu/arm/olpc/rm3150-touchscreen.fth\ Touchscreen driver and diagnostic823 \+ olpc-cl4 fload ${BP}/cpu/arm/olpc/nn-touchscreen.fth \ Touchscreen driver and diagnostic 762 824 fload ${BP}/cpu/arm/olpc/roller.fth \ Accelerometer test 763 825 … … 829 891 830 892 \ create pong-use-touchscreen 831 fload ${BP}/ofw/gui/ofpong.fth 832 fload ${BP}/cpu/x86/pc/olpc/life.fth 893 \ fload ${BP}/ofw/gui/ofpong.fth 833 894 834 895 d# 999 ' screen-#rows set-config-int-default \ Expand the terminal emulator to fill the screen … … 898 959 rocker-right game-key? if 899 960 protect-fw 900 time&date 5drop 1 and if 901 ['] pong guarded 902 else 903 ['] life-demo guarded 904 then 961 \ ['] pong guarded 905 962 power-off 906 963 then … … 965 1022 966 1023 fload ${BP}/cpu/arm/olpc/testitems.fth 1024 \+ olpc-cl2 fload ${BP}/cpu/arm/olpc/1.75/testinstructions.fth 967 1025 \+ olpc-cl3 fload ${BP}/cpu/arm/olpc/3.0/testinstructions.fth 968 \+ olpc-cl 2 fload ${BP}/cpu/arm/olpc/1.75/testinstructions.fth1026 \+ olpc-cl4 fload ${BP}/cpu/arm/olpc/cl4/testinstructions.fth 969 1027 970 1028 : startup ( -- ) -
cpu/arm/olpc/rtc.fth
r2977 r3023 1 1 purpose: Driver for external IDT1338 RTC chip on XO-1.75 2 2 3 0 0 " " " /" begin-package 4 " rtc" name 3 0 0 " d4010000" " /" begin-package 4 " rtc" name 5 " mrvl,mmp-rtc" +compatible 6 my-address my-space h# 1000 reg 7 8 d# 1 encode-int 0 encode-int encode+ " interrupts" property 9 " /interrupt-controller/interrupt-controller@154" encode-phandle " interrupt-parent" property 10 11 " rtc 1Hz" encode-string " rtc alarm" encode-string encode+ " interrupt-names" property 12 13 14 " /apbc" encode-phandle 0 encode-int encode+ " clocks" property 5 15 6 16 [ifdef] cl2-a1 -
cpu/arm/olpc/sdhci.fth
r2748 r3023 1 1 purpose: Load file for SDHCI (Secure Digital Host Controller Interface) 2 2 3 0 0 " d4280000" " /" begin-package3 0 0 " " " /" begin-package 4 4 5 5 fload ${BP}/cpu/arm/olpc/sdregs.fth 6 6 fload ${BP}/dev/mmc/sdhci/sdhci.fth 7 8 " simple-bus" +compatible 9 h# d4280000 encode-int h# d4280000 encode-int encode+ h# 2000 encode-int encode+ " ranges" property 10 1 " #address-cells" integer-property 11 1 " #size-cells" integer-property 7 12 8 13 d# 1 to power-off-time \ A2 and A3 have turn-off clamps … … 10 15 11 16 hex 17 : slot# ( -- n ) slot h# d4280000 - h# 800 / 1+ ; 12 18 : olpc-card-inserted? ( -- flag ) 13 slot 1 = if d# 31 gpio-pin@ 0= else true then19 slot# 1 = if d# 31 gpio-pin@ 0= else true then 14 20 ; 15 21 ' olpc-card-inserted? to card-inserted? … … 19 25 sdhci-card-power-on 20 26 \ The CL3 version below actually works for CL2 >= B1 21 \+ olpc-cl2 d# 36 slot - gpio-set22 \+ olpc-cl3 slot 2 = if d# 34 gpio-set then27 \+ olpc-cl2 d# 36 slot# - gpio-set 28 \+ olpc-cl3 slot# 2 = if d# 34 gpio-set then 23 29 ; 24 30 ' gpio-power-on to card-power-on 25 31 26 32 : gpio-power-off ( -- ) 27 \+ olpc-cl2 d# 36 slot - gpio-clr28 \+ olpc-cl3 slot 2 = if d# 34 gpio-clr then33 \+ olpc-cl2 d# 36 slot# - gpio-clr 34 \+ olpc-cl3 slot# 2 = if d# 34 gpio-clr then 29 35 sdhci-card-power-off 30 36 ; … … 32 38 33 39 \+ olpc-cl2 new-device 34 \+ olpc-cl2 1 encode-int " reg" property 35 \+ olpc-cl2 fload ${BP}/dev/mmc/sdhci/sdmmc.fth 36 \+ olpc-cl2 fload ${BP}/dev/mmc/sdhci/selftest.fth 37 \+ olpc-cl2 " external" " slot-name" string-property 40 \+ olpc-cl2 h# d428.0000 h# 800 reg 41 \+ olpc-cl2 8 encode-int " bus-width" property 42 \+ olpc-cl2 " mrvl,pxav3-mmc" encode-string " compatible" property 43 \+ olpc-cl2 d# 31 encode-int " clk-delay-cycles" property 44 \+ olpc-cl2 fload ${BP}/dev/mmc/sdhci/slot.fth 45 \+ olpc-cl2 d# 39 " interrupts" integer-property 46 47 \+ olpc-cl2 " /pmua" encode-phandle 3 encode-int encode+ " clocks" property 48 \+ olpc-cl2 " PXA-SDHCLK" " clock-names" string-property 49 50 \+ olpc-cl2 new-device 51 \+ olpc-cl2 fload ${BP}/dev/mmc/sdhci/sdmmc.fth 52 \+ olpc-cl2 fload ${BP}/dev/mmc/sdhci/selftest.fth 53 \+ olpc-cl2 " external" " slot-name" string-property 54 \+ olpc-cl2 finish-device 38 55 \+ olpc-cl2 finish-device 39 56 40 57 new-device 41 2 encode-int " reg" property 42 fload ${BP}/dev/mmc/sdhci/mv8686/loadpkg.fth 58 h# d428.0800 h# 800 reg 59 8 encode-int " bus-width" property 60 " sdhci-pxav3" +compatible 61 " mrvl,pxav3-mmc" +compatible 62 d# 31 encode-int " clk-delay-cycles" property 63 0 0 " non-removable" property 64 d# 52 " interrupts" integer-property 65 66 " /pmua" encode-phandle 4 encode-int encode+ " clocks" property 67 " PXA-SDHCLK" " clock-names" string-property 68 69 fload ${BP}/dev/mmc/sdhci/slot.fth 70 new-device 71 fload ${BP}/dev/mmc/sdhci/mv8686/loadpkg.fth 72 finish-device 43 73 finish-device 44 74 45 75 new-device 46 3 encode-int " reg" property 47 fload ${BP}/dev/mmc/sdhci/sdmmc.fth 48 fload ${BP}/dev/mmc/sdhci/selftest.fth 49 " internal" " slot-name" string-property 76 h# d428.1000 h# 800 reg 77 0 0 " non-removable" property 78 8 encode-int " bus-width" property 79 " sdhci-pxav3" +compatible 80 " mrvl,pxav3-mmc" +compatible 81 d# 31 encode-int " clk-delay-cycles" property 82 d# 53 " interrupts" integer-property 83 84 " /pmua" encode-phandle d# 14 encode-int encode+ " clocks" property 85 " PXA-SDHCLK" " clock-names" string-property 86 87 fload ${BP}/dev/mmc/sdhci/slot.fth 88 new-device 89 fload ${BP}/dev/mmc/sdhci/sdmmc.fth 90 fload ${BP}/dev/mmc/sdhci/selftest.fth 91 " internal" " slot-name" string-property 92 finish-device 50 93 finish-device 51 94 -
cpu/arm/olpc/sdregs.fth
r2726 r3023 5 5 0 instance value chip 6 6 7 my-space /regs reg7 \ my-space /regs reg 8 8 9 9 : map-regs ( -- ) 10 10 chip if exit then 11 slot 1- h# 800 * my-space +/regs " map-in" $call-parent11 slot /regs " map-in" $call-parent 12 12 to chip 13 13 ; -
cpu/arm/olpc/sound.fth
r2814 r3023 2 2 " audio" name 3 3 my-space h# 800 reg 4 5 " /pmua" encode-phandle d# 20 encode-int encode+ " clocks" property 6 d# 2 " interrupts" integer-property 4 7 5 8 0 value sspa-base \ E.g. h# 2a.0c00 +io -
cpu/arm/olpc/spcmd.fth
r2582 r3023 25 25 " olpc,ap-sp" encode-string encode+ 26 26 " compatible" property 27 d# 40 " interrupts" integer-property 28 " /pmua" encode-phandle 8 encode-int encode+ " clocks" property 27 29 28 30 my-address my-space h# 1000 encode-reg -
dev/olpc/kb3700/spicmd.fth
r2574 r3023 35 35 1 " #address-cells" integer-property 36 36 0 " #size-cells" integer-property 37 38 d# 20 " interrupts" integer-property 39 " /apbc" encode-phandle d# 21 encode-int encode+ " clocks" property 40 37 41 38 42 : encode-unit ( phys -- adr len ) push-hex (u.) pop-base ; -
dev/olpc/mmp2camera/loadpkg.fth
r2880 r3023 1 1 " " " d420a000" " /" begin-package 2 2 " camera" device-name 3 0 0 reg \ A reg property makes "test-all" consider this device 3 my-address my-space h# 800 reg 4 " /pmua" encode-phandle 2 encode-int encode+ " clocks" property 5 d# 42 " interrupts" integer-property 4 6 5 7 0 [if] -
ofw/core/fdt.fth
r2917 r3023 53 53 ; 54 54 55 also client-services56 55 : flatten-path ( -- ) 57 56 the-node phandle>devname ( adr len ) … … 177 176 \ Test for unprintable characters 178 177 2dup -null text? if 179 to-display-column -null type exit178 to-display-column -null type cr exit 180 179 then ( adr,len ) 181 180 … … 213 212 again 214 213 ; 215 216 previous217 214 218 215 \ LICENSE_BEGIN
Note: See TracChangeset
for help on using the changeset viewer.
