diff options
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/as3525.h | 3 | ||||
-rw-r--r-- | firmware/export/at91sam9260.h | 4 | ||||
-rw-r--r-- | firmware/export/dm320.h | 4 | ||||
-rwxr-xr-x | firmware/export/imx31l.h | 4 | ||||
-rw-r--r-- | firmware/export/jz4740.h | 3 | ||||
-rw-r--r-- | firmware/export/mcf5249.h | 3 | ||||
-rw-r--r-- | firmware/export/pnx0101.h | 3 | ||||
-rw-r--r-- | firmware/export/pp5002.h | 4 | ||||
-rw-r--r-- | firmware/export/pp5020.h | 4 | ||||
-rw-r--r-- | firmware/export/s3c2440.h | 7 | ||||
-rw-r--r-- | firmware/export/sh7034.h | 3 | ||||
-rw-r--r-- | firmware/export/tcc77x.h | 4 | ||||
-rw-r--r-- | firmware/export/tcc780x.h | 4 | ||||
-rw-r--r-- | firmware/export/timer.h | 15 |
14 files changed, 52 insertions, 13 deletions
diff --git a/firmware/export/as3525.h b/firmware/export/as3525.h index 31bbeedc1e..39e0706637 100644 --- a/firmware/export/as3525.h +++ b/firmware/export/as3525.h | |||
@@ -497,4 +497,7 @@ interface */ | |||
497 | /* PCM addresses for obtaining buffers will be what DMA is using (physical) */ | 497 | /* PCM addresses for obtaining buffers will be what DMA is using (physical) */ |
498 | #define HAVE_PCM_DMA_ADDRESS | 498 | #define HAVE_PCM_DMA_ADDRESS |
499 | 499 | ||
500 | /* Timer frequency */ | ||
501 | #define TIMER_FREQ (24000000 / 16) | ||
502 | |||
500 | #endif /*__AS3525_H__*/ | 503 | #endif /*__AS3525_H__*/ |
diff --git a/firmware/export/at91sam9260.h b/firmware/export/at91sam9260.h index fa0b9d2d4f..87826d4d4d 100644 --- a/firmware/export/at91sam9260.h +++ b/firmware/export/at91sam9260.h | |||
@@ -676,3 +676,7 @@ base address */ | |||
676 | #define AT91C_EBI_SDRAM_32BIT (0x20000000) /* SDRAM on EBI Chip Select 1 | 676 | #define AT91C_EBI_SDRAM_32BIT (0x20000000) /* SDRAM on EBI Chip Select 1 |
677 | base address */ | 677 | base address */ |
678 | #define AT91C_BASE_AIC 0xFFFFF000 /* (AIC) Base Address */ | 678 | #define AT91C_BASE_AIC 0xFFFFF000 /* (AIC) Base Address */ |
679 | |||
680 | /* Timer frequency */ | ||
681 | /* timer is based on PCLK and minimum division is 2 */ | ||
682 | #define TIMER_FREQ (49156800/2) | ||
diff --git a/firmware/export/dm320.h b/firmware/export/dm320.h index a1bbc3cd30..619a77fb9a 100644 --- a/firmware/export/dm320.h +++ b/firmware/export/dm320.h | |||
@@ -1016,4 +1016,8 @@ extern unsigned long _ttbstart; | |||
1016 | #define VENC_DCLKCTL_DCKIH (1 << 8) | 1016 | #define VENC_DCLKCTL_DCKIH (1 << 8) |
1017 | #define VENC_DCLKCTL_DCKPW(x) (x << 0) | 1017 | #define VENC_DCLKCTL_DCKPW(x) (x << 0) |
1018 | 1018 | ||
1019 | /* Timer frequency */ | ||
1020 | /* timer is based on PCLK and minimum division is 2 */ | ||
1021 | #define TIMER_FREQ (27000000) | ||
1022 | |||
1019 | #endif | 1023 | #endif |
diff --git a/firmware/export/imx31l.h b/firmware/export/imx31l.h index 2c1e93e528..dea5588e59 100755 --- a/firmware/export/imx31l.h +++ b/firmware/export/imx31l.h | |||
@@ -1754,4 +1754,8 @@ | |||
1754 | #define UART_FIFO_CTRL 0x881 | 1754 | #define UART_FIFO_CTRL 0x881 |
1755 | #define TIMEOUT 1000 | 1755 | #define TIMEOUT 1000 |
1756 | 1756 | ||
1757 | /* Timer frequency */ | ||
1758 | /* timer is based on ipg_clk */ | ||
1759 | #define TIMER_FREQ (66000000) | ||
1760 | |||
1757 | #endif /* __IMX31L_H__ */ | 1761 | #endif /* __IMX31L_H__ */ |
diff --git a/firmware/export/jz4740.h b/firmware/export/jz4740.h index 3bf34bd342..a29266ab90 100644 --- a/firmware/export/jz4740.h +++ b/firmware/export/jz4740.h | |||
@@ -5209,4 +5209,7 @@ struct Ration2m | |||
5209 | #define USB_NUM_ENDPOINTS 3 | 5209 | #define USB_NUM_ENDPOINTS 3 |
5210 | #define USB_DEVBSS_ATTR IBSS_ATTR | 5210 | #define USB_DEVBSS_ATTR IBSS_ATTR |
5211 | 5211 | ||
5212 | /* Timer frequency */ | ||
5213 | #define TIMER_FREQ (CFG_EXTAL) /* For full precision! */ | ||
5214 | |||
5212 | #endif /* __JZ4740_H__ */ | 5215 | #endif /* __JZ4740_H__ */ |
diff --git a/firmware/export/mcf5249.h b/firmware/export/mcf5249.h index 006391323b..ed4f4d1915 100644 --- a/firmware/export/mcf5249.h +++ b/firmware/export/mcf5249.h | |||
@@ -279,5 +279,8 @@ | |||
279 | #define DMA1_REQ_AUDIO_1 0x8000 | 279 | #define DMA1_REQ_AUDIO_1 0x8000 |
280 | #define DMA1_REQ_AUDIO_2 0x8100 | 280 | #define DMA1_REQ_AUDIO_2 0x8100 |
281 | 281 | ||
282 | /* Timer frequency */ | ||
283 | /* timer is based on busclk == cpuclk/2 */ | ||
284 | #define TIMER_FREQ (CPU_FREQ/2) | ||
282 | 285 | ||
283 | #endif | 286 | #endif |
diff --git a/firmware/export/pnx0101.h b/firmware/export/pnx0101.h index a70d4309d9..1df48f5f6a 100644 --- a/firmware/export/pnx0101.h +++ b/firmware/export/pnx0101.h | |||
@@ -262,4 +262,7 @@ struct pnx0101_audio { | |||
262 | 262 | ||
263 | #endif /* ASM */ | 263 | #endif /* ASM */ |
264 | 264 | ||
265 | /* Timer frequency */ | ||
266 | #define TIMER_FREQ 3000000 | ||
267 | |||
265 | #endif | 268 | #endif |
diff --git a/firmware/export/pp5002.h b/firmware/export/pp5002.h index 9fab86bf21..cdf0318e55 100644 --- a/firmware/export/pp5002.h +++ b/firmware/export/pp5002.h | |||
@@ -248,4 +248,8 @@ | |||
248 | #define MMAP3_LOGICAL (*(volatile unsigned long *)(0xf000f018)) | 248 | #define MMAP3_LOGICAL (*(volatile unsigned long *)(0xf000f018)) |
249 | #define MMAP3_PHYSICAL (*(volatile unsigned long *)(0xf000f01c)) | 249 | #define MMAP3_PHYSICAL (*(volatile unsigned long *)(0xf000f01c)) |
250 | 250 | ||
251 | /* Timer frequency */ | ||
252 | /* Portalplayer chips use a microsecond timer. */ | ||
253 | #define TIMER_FREQ 1000000 | ||
254 | |||
251 | #endif | 255 | #endif |
diff --git a/firmware/export/pp5020.h b/firmware/export/pp5020.h index 35fe09c1e4..2d8d0e1802 100644 --- a/firmware/export/pp5020.h +++ b/firmware/export/pp5020.h | |||
@@ -690,4 +690,8 @@ | |||
690 | #define DMA_INCR_WIDTH_32BIT (0x2 << 28) | 690 | #define DMA_INCR_WIDTH_32BIT (0x2 << 28) |
691 | /* All other values reserved? */ | 691 | /* All other values reserved? */ |
692 | 692 | ||
693 | /* Timer frequency */ | ||
694 | /* Portalplayer chips use a microsecond timer. */ | ||
695 | #define TIMER_FREQ 1000000 | ||
696 | |||
693 | #endif /* __PP5020_H__ */ | 697 | #endif /* __PP5020_H__ */ |
diff --git a/firmware/export/s3c2440.h b/firmware/export/s3c2440.h index a7da64f688..2682660b45 100644 --- a/firmware/export/s3c2440.h +++ b/firmware/export/s3c2440.h | |||
@@ -550,4 +550,11 @@ | |||
550 | #define DRAM1 0x31000000 | 550 | #define DRAM1 0x31000000 |
551 | #define BOOTRAM 0x40000000 | 551 | #define BOOTRAM 0x40000000 |
552 | 552 | ||
553 | /* Timer frequency */ | ||
554 | |||
555 | /* timer is based on PCLK and minimum division is 2 */ | ||
556 | #define TIMER_FREQ (49156800/2) | ||
557 | #define TIMER234_PRESCALE 21 | ||
558 | |||
559 | |||
553 | #endif /* __S3C2440_H__ */ | 560 | #endif /* __S3C2440_H__ */ |
diff --git a/firmware/export/sh7034.h b/firmware/export/sh7034.h index 717ba66690..2695acbc00 100644 --- a/firmware/export/sh7034.h +++ b/firmware/export/sh7034.h | |||
@@ -370,4 +370,7 @@ | |||
370 | #define SCI_MPB 0x02 /* Multiprocessor bit */ | 370 | #define SCI_MPB 0x02 /* Multiprocessor bit */ |
371 | #define SCI_MPBT 0x01 /* Multiprocessor bit transfer */ | 371 | #define SCI_MPBT 0x01 /* Multiprocessor bit transfer */ |
372 | 372 | ||
373 | /* Timer frequency */ | ||
374 | #define TIMER_FREQ CPU_FREQ | ||
375 | |||
373 | #endif | 376 | #endif |
diff --git a/firmware/export/tcc77x.h b/firmware/export/tcc77x.h index 5346e585aa..ad1a8a17aa 100644 --- a/firmware/export/tcc77x.h +++ b/firmware/export/tcc77x.h | |||
@@ -261,4 +261,8 @@ | |||
261 | #define USB_NUM_ENDPOINTS 3 | 261 | #define USB_NUM_ENDPOINTS 3 |
262 | #define USB_DEVBSS_ATTR IBSS_ATTR | 262 | #define USB_DEVBSS_ATTR IBSS_ATTR |
263 | 263 | ||
264 | /* Timer frequency */ | ||
265 | /* timers are based on XIN (12Mhz) */ | ||
266 | #define TIMER_FREQ (12000000) | ||
267 | |||
264 | #endif | 268 | #endif |
diff --git a/firmware/export/tcc780x.h b/firmware/export/tcc780x.h index 3ff910fce7..5b37b40526 100644 --- a/firmware/export/tcc780x.h +++ b/firmware/export/tcc780x.h | |||
@@ -249,4 +249,8 @@ | |||
249 | #define USB_NUM_ENDPOINTS 3 | 249 | #define USB_NUM_ENDPOINTS 3 |
250 | #define USB_DEVBSS_ATTR IBSS_ATTR | 250 | #define USB_DEVBSS_ATTR IBSS_ATTR |
251 | 251 | ||
252 | /* Timer frequency */ | ||
253 | /* Timer is based on PCK_TCT (set to 2Mhz in system.c) */ | ||
254 | #define TIMER_FREQ (2000000) | ||
255 | |||
252 | #endif | 256 | #endif |
diff --git a/firmware/export/timer.h b/firmware/export/timer.h index 230c0ae4dc..b070acae31 100644 --- a/firmware/export/timer.h +++ b/firmware/export/timer.h | |||
@@ -24,21 +24,10 @@ | |||
24 | 24 | ||
25 | #include <stdbool.h> | 25 | #include <stdbool.h> |
26 | #include "config.h" | 26 | #include "config.h" |
27 | #include "cpu.h" | ||
27 | 28 | ||
28 | #if defined(SIMULATOR) | 29 | #if defined(SIMULATOR) |
29 | #define TIMER_FREQ 1000000 | 30 | #define TIMER_FREQ 1000000 |
30 | #elif CONFIG_CPU == S3C2440 || CONFIG_CPU == DM320 || CONFIG_CPU == TCC7801 \ | ||
31 | || defined(CPU_TCC77X) || CONFIG_CPU == AS3525 || CONFIG_CPU == IMX31L \ | ||
32 | || CONFIG_CPU == JZ4732 || CONFIG_CPU == PNX0101 \ | ||
33 | || defined(CPU_COLDFIRE) || CONFIG_CPU == SH7034 || defined(CPU_PP) | ||
34 | #include "timer-target.h" | ||
35 | #else | ||
36 | #warning "Target without timer-target.h" | ||
37 | #endif | ||
38 | |||
39 | #ifndef TIMER_FREQ | ||
40 | #warning "TIMER_FREQ not defined" | ||
41 | #define TIMER_FREQ CPU_FREQ | ||
42 | #endif | 31 | #endif |
43 | 32 | ||
44 | bool timer_register(int reg_prio, void (*unregister_callback)(void), | 33 | bool timer_register(int reg_prio, void (*unregister_callback)(void), |