Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Disable USB checks when dualboot
Thursday, December 30th, 2010 at 5:34:06pm UTC 

  1. Index: rbutil/mkamsboot/dualboot/dualboot.S
  2. ===================================================================
  3. --- rbutil/mkamsboot/dualboot/dualboot.S        (revision 28932)
  4. +++ rbutil/mkamsboot/dualboot/dualboot.S        (working copy)
  5. @@ -90,14 +90,15 @@
  6.          str     r1, [r0]
  7.  
  8.  
  9. -#ifdef SANSA_CLIPV2 /* TODO : remove this check when we'll have an USB driver */
  10. +/*Removed by the power of the Kyle!*?
  11. +/*#ifdef SANSA_CLIPV2
  12.          ldr     r0, =GPIOA
  13.          mov     r1, #0
  14.          str     r1, [r0, #0x400]
  15.          ldr     r1, [r0, #(4*(1<<6))]
  16.          cmp     r1, #0
  17.          bne     boot_of
  18. -#endif
  19. +#endif*/
  20.          /* Here are model specific tests for dual boot */
  21.          /* All models but c200v2 use left button */
  22.          /* TODO: Left button for c200v2 too (needs DBOP code) */
  23. @@ -247,12 +248,12 @@
  24.          #error No target-specific key check defined!
  25.  #endif
  26.  
  27. -#if defined(SANSA_CLIPPLUS) || defined(SANSA_FUZEV2)
  28. -        /* Check for USB after buttons because I trust more the GPIO code than
  29. +/* Removed by the power of the Kyle!*?
  30. +/*#if defined(SANSA_CLIPPLUS) || defined(SANSA_FUZEV2)
  31. +        * Check for USB after buttons because I trust more the GPIO code than
  32.           * the i2c code.
  33.           * Also it seems we need to wait a bit before detecting USB connection
  34.           * on those models, but not on c200v2
  35. -         */
  36.  
  37.  
  38.          ldr     r0, =CGU_PROC
  39. @@ -261,39 +262,39 @@
  40.  
  41.          ldr     r0, =CGU_PERI
  42.          ldr     r1, [r0]
  43. -        /* enable i2c audio master clock */
  44. +        * enable i2c audio master clock *
  45.          orr     r1, r1, #(1<<17)
  46. -        /* pclk = fclk = 24MHz */
  47. +        * pclk = fclk = 24MHz *
  48.          bic     r1, r1, #0x7f
  49.          str     r1, [r0]
  50.  
  51.          ldr     r0, =I2C_BASE
  52. -        /* disable i2c interrupts */
  53. +        * disable i2c interrupts *
  54.          mov     r1, #0
  55.          str     r1, [r0, #I2C_IMR]
  56. -        /* setup prescaler */
  57. +        * setup prescaler *
  58.          mov     r1, #I2C_PRESCALER_LOW
  59.          str     r1, [r0, #I2C_CPSR0]
  60.          mov     r1, #I2C_PRESCALER_HIGH
  61.          str     r1, [r0, #I2C_CPSR1]
  62. -        /* setup i2c slave address */
  63. +        * setup i2c slave address *
  64.          mov     r1, #(AS3514_I2C_ADDR << 1)
  65.          str     r1, [r0, #I2C_SLAD0]
  66.          mov     r2, #0x51
  67.          str     r2, [r0, #I2C_CNTRL]
  68.  
  69. -        /* wait for not busy */
  70. +        * wait for not busy *
  71.  1:
  72.          ldr     r1, [r0, #I2C_SR]
  73.          tst     r1, #1
  74.          bne 1b
  75.  
  76. -        /* wait a bit (~100ms) else detection fails */
  77. +        * wait a bit (~100ms) else detection fails *
  78.          mov     r1, #0x80000
  79.  1:      subs    r1, r1, #1
  80.          bne 1b
  81.  
  82. -        /* start read of irq_enrd0 */
  83. +        * start read of irq_enrd0 *
  84.          mov     r1, #AS3514_IRQ_ENRD0
  85.          str     r1, [r0, #I2C_SADDR]
  86.          orr     r2, r2, #(1 << 1)
  87. @@ -301,19 +302,19 @@
  88.          mov     r1, #1
  89.          str     r1, [r0, #I2C_DACNT]
  90.  
  91. -        /* wait for transfer to finish */
  92. +        * wait for transfer to finish *
  93.  1:
  94.          ldr     r1, [r0, #I2C_DACNT]
  95.          cmp     r1, #0
  96.          bne     1b
  97.  
  98. -        /* load result and test USB_STATUS bit */
  99. +        * load result and test USB_STATUS bit *
  100.          ldr     r1, [r0, #I2C_DATA]
  101.          tst     r1, #(1 << 3)
  102. -        bne     boot_of
  103. +                bne     boot_of
  104.  
  105.  
  106. -#endif
  107. +#endif */
  108.  
  109.  
  110.          /* The dualboot button was not held, so we boot rockbox */

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus
worth-right
worth-right