Changeset 3237


Ignore:
Timestamp:
Aug 29, 2012, 2:50:52 AM (20 months ago)
Author:
wmb
Message:

OLPC ARM - Camera driver - use the new "my-clocks-on/off" facility to move the clock enabling code out of this file into the PMUA driver.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dev/olpc/mmp2camera/ccic.fth

    r3116 r3237  
    8080; 
    8181 
    82 [ifdef] mmp3 
    83 : isp-island-power-on  
    84    \ set ISP regs to the default value 
    85    0 h#  50 pmua! 
    86    0 h# 1fc pmua! 
    87  
    88    \ Turn on the CCIC/ISP power switch 
    89    h# 200 h# 1fc pmua! 
    90    d# 10 ms 
    91    h# 600 h# 1fc pmua! 
    92    d# 10 ms 
    93    \ Disable isp isolation\n" 
    94    h# 700 h# 1fc pmua! 
    95  
    96    \ Start memory redundacy repair 
    97    4 h# 224 pmua-set   \ PMUA_ISP_CLK_RES_CTRL 
    98    begin  d# 10 ms h# 224 pmua@  4 and  0=  until 
    99          
    100    \ Enable dummy clocks to the SRAMS 
    101    h# 10 h# 1e0 pmua-set   \ PMUA_ISLD_CI_PDWN_CTRL 
    102    d# 200 ms 
    103    h# 10 h# 1e0 pmua-clr 
    104  
    105    \ Enable ISP clocks here if you want to use the ISP 
    106    \ 8 h# 224 pmua-set  \ Enable AXI clock in PMUA_ISP_CLK_RES_CTRL 
    107    \ h# f00 h# 200 h# 224 pmua-fld \ Clock divider 
    108    \ h#  c0 h#  40 h# 224 pmua-fld \ CLock source 
    109    \ h# 10 h# 224 pmua-set 
    110  
    111    \ enable CCIC clocks 
    112    h# 8238 h# 50 pmua-set 
    113          
    114    \ Deassert ISP clocks here if you want to use the ISP 
    115    \ XXX should these be pmua-clr ? 
    116    \ 1 h# 224 pmua-set  \ AXI reset 
    117    \ 2 h# 224 pmua-set  \ ISP SW reset 
    118    \ h# 10000 h# 50 pmua-set  \ CCIC1 AXI Arbiter reset 
    119     
    120    \ De-assert CCIC Resets 
    121    h# 10107 h# 50 pmua-set \ XXX change to 107 
    122 ; 
    123 [then] 
    12482: power-on  ( -- ) 
    125    [ifdef] mmp3  isp-island-power-on  [then] 
    126  
    127    \ Enable clocks 
    128    h# 3f h# 28 pmua!  \ Clock gating - AHB, Internal PIXCLK, AXI clock always on 
    129    h# 0003.805b h# 50 pmua!  \ PMUA clock config for CCIC - /1, PLL1/16, AXI arb, AXI, perip on 
     83   my-clock-on 
    13084 
    13185\  h# 0000.0002 h# 88 cl!   \ Clock select - PIXMCLK, 797/2 (PLL1/16) / 2 -> 24.9 MHz 
     
    14498   h# 40 cl@  h# 1000.0000 or  h# 40 cl!  \ Disable pads 
    14599   sensor-power-off 
     100 
     101   my-clock-off 
    146102; 
    147103 
     
    207163   ctlr-stop 
    208164   interrupts-off 
     165   free-dma-bufs 
    209166   power-off 
    210    free-dma-bufs 
    211167   camera-base h# 1000 " map-out" $call-parent 
    212168; 
Note: See TracChangeset for help on using the changeset viewer.