freemyipod r372 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r371‎ | r372 | r373 >
Date:21:42, 21 December 2010
Author:theseven
Status:new
Tags:
Comment:
UMSboot: Fix backlight on iPod Classic
Modified paths:
  • /umsboot/target/ipodclassic/i2c.c (modified) (history)
  • /umsboot/target/ipodclassic/ls.x (modified) (history)

Diff [purge]

Index: umsboot/target/ipodclassic/ls.x
@@ -71,8 +71,6 @@
7272 . = ALIGN(4);
7373 *(.ibss*)
7474 . = ALIGN(4);
75 - *(COMMON)
76 - . = ALIGN(4);
7775 _bssend = .;
7876 } > SRAM
7977
@@ -82,6 +80,8 @@
8381 . = ALIGN(4);
8482 *(.bss*)
8583 . = ALIGN(4);
 84+ *(COMMON)
 85+ . = ALIGN(4);
8686 _mainstackstart = .;
8787 . += 0x1000;
8888 _mainstackend = .;
Index: umsboot/target/ipodclassic/i2c.c
@@ -35,6 +35,7 @@
3636 IICDS(bus) = device & ~1;
3737 IICSTAT(bus) = 0xF0;
3838 IICCON(bus) = 0xB7;
 39+ asm volatile("nop\n\t");
3940 while ((IICCON(bus) & 0x10) == 0);
4041 if (address >= 0)
4142 {
@@ -41,6 +42,7 @@
4243 /* write address */
4344 IICDS(bus) = address;
4445 IICCON(bus) = 0xB7;
 46+ asm volatile("nop\n\t");
4547 while ((IICCON(bus) & 0x10) == 0);
4648 }
4749 /* write data */
@@ -48,11 +50,13 @@
4951 {
5052 IICDS(bus) = *data++;
5153 IICCON(bus) = 0xB7;
 54+ asm volatile("nop\n\t");
5255 while ((IICCON(bus) & 0x10) == 0);
5356 }
5457 /* STOP */
5558 IICSTAT(bus) = 0xD0;
5659 IICCON(bus) = 0xB7;
 60+ asm volatile("nop\n\t");
5761 while ((IICSTAT(bus) & (1 << 5)) != 0);
5862 }
5963