Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Mar 18th, 2011  |  syntax: C  |  size: 1.05 KB  |  views: 204  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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.  }