freemyipod r303 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r302‎ | r303 | r304 >
Date:22:34, 1 December 2010
Author:theseven
Status:new
Tags:
Comment:
emBIOS: iPod Nano 3G / iPod Classic click wheel driver
Modified paths:
  • /embios/trunk/SOURCES (modified) (history)
  • /embios/trunk/target/ipodclassic/target.h (modified) (history)
  • /embios/trunk/target/ipodnano3g/interrupt.c (modified) (history)
  • /embios/trunk/target/ipodnano3g/s5l8702.h (modified) (history)
  • /embios/trunk/target/ipodnano3g/target.h (modified) (history)

Diff [purge]

Index: embios/trunk/target/ipodnano3g/s5l8702.h
@@ -277,6 +277,8 @@
278278 /////GPIO/////
279279 #define PCON(i) (*((uint32_t volatile*)(0x3cf00000 + ((i) << 5))))
280280 #define PDAT(i) (*((uint32_t volatile*)(0x3cf00004 + ((i) << 5))))
 281+#define PUNA(i) (*((uint32_t volatile*)(0x3cf00008 + ((i) << 5))))
 282+#define PUNB(i) (*((uint32_t volatile*)(0x3cf0000c + ((i) << 5))))
281283 #define PCON0 (*((uint32_t volatile*)(0x3cf00000)))
282284 #define PDAT0 (*((uint32_t volatile*)(0x3cf00004)))
283285 #define PCON1 (*((uint32_t volatile*)(0x3cf00020)))
@@ -568,6 +570,17 @@
569571 #define ATA_DMA_ADDR (*((void* volatile*)(0x38700088)))
570572
571573
 574+/////CLICKWHEEL/////
 575+#define WHEEL00 (*((uint32_t volatile*)(0x3C200000)))
 576+#define WHEEL04 (*((uint32_t volatile*)(0x3C200004)))
 577+#define WHEEL08 (*((uint32_t volatile*)(0x3C200008)))
 578+#define WHEEL0C (*((uint32_t volatile*)(0x3C20000C)))
 579+#define WHEEL10 (*((uint32_t volatile*)(0x3C200010)))
 580+#define WHEELINT (*((uint32_t volatile*)(0x3C200014)))
 581+#define WHEELRX (*((uint32_t volatile*)(0x3C200018)))
 582+#define WHEELTX (*((uint32_t volatile*)(0x3C20001C)))
 583+
 584+
572585 /////CLOCK GATES/////
573586 #define CLOCKGATE_USB_1 2
574587 #define CLOCKGATE_USB_2 35
@@ -579,6 +592,7 @@
580593 #define IRQ_DMAC(d) 16 + d
581594 #define IRQ_DMAC0 16
582595 #define IRQ_DMAC1 17
 596+#define IRQ_WHEEL 23
583597 #define IRQ_ATA 29
584598
585599
Index: embios/trunk/target/ipodnano3g/target.h
@@ -55,8 +55,8 @@
5656
5757 #define HAVE_HWKEYAES
5858
59 -//#define HAVE_BUTTON
60 -//#define HAVE_CLICKWHEEL
 59+#define HAVE_BUTTON
 60+#define HAVE_CLICKWHEEL
6161
6262 #define HAVE_BOOTFLASH
6363
@@ -67,7 +67,7 @@
6868 //#define CONFIG_STORAGE STORAGE_NAND
6969 //#define SECTOR_SIZE 4096
7070
71 -//#define HAVE_TARGETINIT_LATE
 71+#define HAVE_TARGETINIT_LATE
7272
7373
7474 #endif
Index: embios/trunk/target/ipodnano3g/interrupt.c
@@ -72,7 +72,7 @@
7373 default_interrupt(INT_IRQ20);
7474 default_interrupt(INT_IRQ21);
7575 default_interrupt(INT_IRQ22);
76 -default_interrupt(INT_IRQ23);
 76+default_interrupt(INT_WHEEL);
7777 default_interrupt(INT_IRQ24);
7878 default_interrupt(INT_IRQ25);
7979 default_interrupt(INT_IRQ26);
@@ -178,7 +178,7 @@
179179 {
180180 INT_IRQ0,INT_IRQ1,INT_IRQ2,INT_IRQ3,INT_IRQ4,INT_IRQ5,INT_IRQ6,INT_IRQ7,
181181 INT_TIMER,INT_IRQ9,INT_IRQ10,INT_IRQ11,INT_IRQ12,INT_IRQ13,INT_IRQ14,INT_IRQ15,
182 - INT_DMAC0,INT_DMAC1,INT_IRQ18,INT_USB_FUNC,INT_IRQ20,INT_IRQ21,INT_IRQ22,INT_IRQ23,
 182+ INT_DMAC0,INT_DMAC1,INT_IRQ18,INT_USB_FUNC,INT_IRQ20,INT_IRQ21,INT_IRQ22,INT_WHEEL,
183183 INT_IRQ24,INT_IRQ25,INT_IRQ26,INT_IRQ27,INT_IRQ28,INT_ATA,INT_IRQ30,INT_IRQ31,
184184 INT_IRQ32,INT_IRQ33,INT_IRQ34,INT_IRQ35,INT_IRQ36,INT_IRQ37,INT_IRQ38,INT_IRQ39,
185185 INT_IRQ40,INT_IRQ41,INT_IRQ42,INT_IRQ43,INT_IRQ55,INT_IRQ56,INT_IRQ57,INT_IRQ58,
Index: embios/trunk/target/ipodclassic/target.h
@@ -55,8 +55,8 @@
5656
5757 #define HAVE_HWKEYAES
5858
59 -//#define HAVE_BUTTON
60 -//#define HAVE_CLICKWHEEL
 59+#define HAVE_BUTTON
 60+#define HAVE_CLICKWHEEL
6161
6262 #define HAVE_BOOTFLASH
6363
@@ -67,7 +67,7 @@
6868 #define CONFIG_STORAGE STORAGE_ATA
6969 #define SECTOR_SIZE 4096
7070
71 -//#define HAVE_TARGETINIT_LATE
 71+#define HAVE_TARGETINIT_LATE
7272
7373
7474 #endif
Index: embios/trunk/SOURCES
@@ -47,7 +47,9 @@
4848 target/ipodnano3g/bootflash.c
4949 target/ipodnano3g/backlight.c
5050 target/ipodnano3g/hwkeyaes.c
 51+target/ipodnano3g/clickwheel.c
5152 target/ipodnano3g/spi.c
 53+target/ipodnano3g/targetinit.c
5254 usb/synopsysotg.c
5355 #endif
5456