Advertisement
Guest User

Untitled

a guest
Mar 18th, 2011
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.05 KB | None | 0 0
  1. Index: ../firmware/target/arm/as3525/sd-as3525v2.c
  2. ===================================================================
  3. --- ../firmware/target/arm/as3525/sd-as3525v2.c (revision 29587)
  4. +++ ../firmware/target/arm/as3525/sd-as3525v2.c (working copy)
  5. @@ -1038,10 +1038,16 @@
  6.  {
  7.      if (on)
  8.      {
  9. +        int hcon_numcards = ((MCI_HCON>>1) & 0x1F) + 1;
  10. +        
  11.          bitset32(&CGU_PERI, CGU_MCI_CLOCK_ENABLE);
  12.          CGU_IDE |= (1<<7);                  /* AHB interface enable */
  13.          CGU_MEMSTICK |= (1<<7);             /* interface enable */
  14.          CGU_SDSLOT |= (1<<7);               /* interface enable */
  15. +        
  16. +        MCI_CLKENA = (1 << hcon_numcards) - 1;
  17. +        MCI_CLKENA |= 1<<( 16);
  18. +        MCI_CLKENA |= 1<<( 1+16);
  19.      }
  20.      else
  21.      {
  22. @@ -1049,6 +1055,9 @@
  23.          CGU_MEMSTICK &= ~(1<<7);            /* interface enable */
  24.          CGU_IDE &= ~(1<<7);                 /* AHB interface enable */
  25.          bitclr32(&CGU_PERI, CGU_MCI_CLOCK_ENABLE);
  26. +        
  27. +        MCI_CLKENA = 0;
  28. +        
  29.      }
  30.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement