Advertising
- Disable USB checks when dualboot
- Thursday, December 30th, 2010 at 10:34:06am MST
- Index: rbutil/mkamsboot/dualboot/dualboot.S
- ===================================================================
- --- rbutil/mkamsboot/dualboot/dualboot.S (revision 28932)
- +++ rbutil/mkamsboot/dualboot/dualboot.S (working copy)
- @@ -90,14 +90,15 @@
- str r1, [r0]
- -#ifdef SANSA_CLIPV2 /* TODO : remove this check when we'll have an USB driver */
- +/*Removed by the power of the Kyle!*?
- +/*#ifdef SANSA_CLIPV2
- ldr r0, =GPIOA
- mov r1, #0
- str r1, [r0, #0x400]
- ldr r1, [r0, #(4*(1<<6))]
- cmp r1, #0
- bne boot_of
- -#endif
- +#endif*/
- /* Here are model specific tests for dual boot */
- /* All models but c200v2 use left button */
- /* TODO: Left button for c200v2 too (needs DBOP code) */
- @@ -247,12 +248,12 @@
- #error No target-specific key check defined!
- #endif
- -#if defined(SANSA_CLIPPLUS) || defined(SANSA_FUZEV2)
- - /* Check for USB after buttons because I trust more the GPIO code than
- +/* Removed by the power of the Kyle!*?
- +/*#if defined(SANSA_CLIPPLUS) || defined(SANSA_FUZEV2)
- + * Check for USB after buttons because I trust more the GPIO code than
- * the i2c code.
- * Also it seems we need to wait a bit before detecting USB connection
- * on those models, but not on c200v2
- - */
- ldr r0, =CGU_PROC
- @@ -261,39 +262,39 @@
- ldr r0, =CGU_PERI
- ldr r1, [r0]
- - /* enable i2c audio master clock */
- + * enable i2c audio master clock *
- orr r1, r1, #(1<<17)
- - /* pclk = fclk = 24MHz */
- + * pclk = fclk = 24MHz *
- bic r1, r1, #0x7f
- str r1, [r0]
- ldr r0, =I2C_BASE
- - /* disable i2c interrupts */
- + * disable i2c interrupts *
- mov r1, #0
- str r1, [r0, #I2C_IMR]
- - /* setup prescaler */
- + * setup prescaler *
- mov r1, #I2C_PRESCALER_LOW
- str r1, [r0, #I2C_CPSR0]
- mov r1, #I2C_PRESCALER_HIGH
- str r1, [r0, #I2C_CPSR1]
- - /* setup i2c slave address */
- + * setup i2c slave address *
- mov r1, #(AS3514_I2C_ADDR << 1)
- str r1, [r0, #I2C_SLAD0]
- mov r2, #0x51
- str r2, [r0, #I2C_CNTRL]
- - /* wait for not busy */
- + * wait for not busy *
- 1:
- ldr r1, [r0, #I2C_SR]
- tst r1, #1
- bne 1b
- - /* wait a bit (~100ms) else detection fails */
- + * wait a bit (~100ms) else detection fails *
- mov r1, #0x80000
- 1: subs r1, r1, #1
- bne 1b
- - /* start read of irq_enrd0 */
- + * start read of irq_enrd0 *
- mov r1, #AS3514_IRQ_ENRD0
- str r1, [r0, #I2C_SADDR]
- orr r2, r2, #(1 << 1)
- @@ -301,19 +302,19 @@
- mov r1, #1
- str r1, [r0, #I2C_DACNT]
- - /* wait for transfer to finish */
- + * wait for transfer to finish *
- 1:
- ldr r1, [r0, #I2C_DACNT]
- cmp r1, #0
- bne 1b
- - /* load result and test USB_STATUS bit */
- + * load result and test USB_STATUS bit *
- ldr r1, [r0, #I2C_DATA]
- tst r1, #(1 << 3)
- - bne boot_of
- + bne boot_of
- -#endif
- +#endif */
- /* The dualboot button was not held, so we boot rockbox */
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
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.