From ffefe0c08bdeeab725ce5fc054b3add4e05a1f7f Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Mon, 29 Jun 2009 14:30:12 +0000 Subject: Put TIMER_FREQ definition in CPU-specific config, and remove timer-target.h Note : SH has TIMER_FREQ defined to CPU_FREQ, so any code wanting it must include #config.h before #cpu.h git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21560 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/as3525.h | 3 ++ firmware/export/at91sam9260.h | 4 +++ firmware/export/dm320.h | 4 +++ firmware/export/imx31l.h | 4 +++ firmware/export/jz4740.h | 3 ++ firmware/export/mcf5249.h | 3 ++ firmware/export/pnx0101.h | 3 ++ firmware/export/pp5002.h | 4 +++ firmware/export/pp5020.h | 4 +++ firmware/export/s3c2440.h | 7 +++++ firmware/export/sh7034.h | 3 ++ firmware/export/tcc77x.h | 4 +++ firmware/export/tcc780x.h | 4 +++ firmware/export/timer.h | 15 ++-------- firmware/target/arm/as3525/kernel-as3525.c | 2 +- firmware/target/arm/as3525/timer-target.h | 26 ----------------- .../target/arm/at91sam/lyre_proto1/timer-target.h | 28 ------------------ .../target/arm/imx31/gigabeat-s/timer-target.h | 27 ----------------- firmware/target/arm/pnx0101/timer-pnx0101.c | 1 - firmware/target/arm/pnx0101/timer-target.h | 26 ----------------- .../target/arm/s3c2440/gigabeat-fx/timer-target.h | 28 ------------------ .../arm/s3c2440/gigabeat-fx/wmcodec-meg-fx.c | 2 +- firmware/target/arm/tcc77x/timer-target.h | 27 ----------------- firmware/target/arm/tcc780x/timer-target.h | 27 ----------------- firmware/target/arm/timer-pp.c | 1 - firmware/target/arm/timer-target.h | 34 ---------------------- firmware/target/arm/tms320dm320/timer-target.h | 27 ----------------- firmware/target/coldfire/timer-coldfire.c | 1 - firmware/target/coldfire/timer-target.h | 27 ----------------- firmware/target/mips/ingenic_jz47xx/timer-target.h | 29 ------------------ firmware/target/sh/archos/timer-archos.c | 1 - firmware/target/sh/archos/timer-target.h | 28 ------------------ 32 files changed, 54 insertions(+), 353 deletions(-) delete mode 100644 firmware/target/arm/as3525/timer-target.h delete mode 100644 firmware/target/arm/at91sam/lyre_proto1/timer-target.h delete mode 100644 firmware/target/arm/imx31/gigabeat-s/timer-target.h delete mode 100644 firmware/target/arm/pnx0101/timer-target.h delete mode 100644 firmware/target/arm/s3c2440/gigabeat-fx/timer-target.h delete mode 100644 firmware/target/arm/tcc77x/timer-target.h delete mode 100644 firmware/target/arm/tcc780x/timer-target.h delete mode 100644 firmware/target/arm/timer-target.h delete mode 100644 firmware/target/arm/tms320dm320/timer-target.h delete mode 100644 firmware/target/coldfire/timer-target.h delete mode 100644 firmware/target/mips/ingenic_jz47xx/timer-target.h delete mode 100644 firmware/target/sh/archos/timer-target.h 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 */ /* PCM addresses for obtaining buffers will be what DMA is using (physical) */ #define HAVE_PCM_DMA_ADDRESS +/* Timer frequency */ +#define TIMER_FREQ (24000000 / 16) + #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 */ #define AT91C_EBI_SDRAM_32BIT (0x20000000) /* SDRAM on EBI Chip Select 1 base address */ #define AT91C_BASE_AIC 0xFFFFF000 /* (AIC) Base Address */ + +/* Timer frequency */ +/* timer is based on PCLK and minimum division is 2 */ +#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; #define VENC_DCLKCTL_DCKIH (1 << 8) #define VENC_DCLKCTL_DCKPW(x) (x << 0) +/* Timer frequency */ +/* timer is based on PCLK and minimum division is 2 */ +#define TIMER_FREQ (27000000) + #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 @@ #define UART_FIFO_CTRL 0x881 #define TIMEOUT 1000 +/* Timer frequency */ +/* timer is based on ipg_clk */ +#define TIMER_FREQ (66000000) + #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 #define USB_NUM_ENDPOINTS 3 #define USB_DEVBSS_ATTR IBSS_ATTR +/* Timer frequency */ +#define TIMER_FREQ (CFG_EXTAL) /* For full precision! */ + #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 @@ #define DMA1_REQ_AUDIO_1 0x8000 #define DMA1_REQ_AUDIO_2 0x8100 +/* Timer frequency */ +/* timer is based on busclk == cpuclk/2 */ +#define TIMER_FREQ (CPU_FREQ/2) #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 { #endif /* ASM */ +/* Timer frequency */ +#define TIMER_FREQ 3000000 + #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 @@ #define MMAP3_LOGICAL (*(volatile unsigned long *)(0xf000f018)) #define MMAP3_PHYSICAL (*(volatile unsigned long *)(0xf000f01c)) +/* Timer frequency */ +/* Portalplayer chips use a microsecond timer. */ +#define TIMER_FREQ 1000000 + #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 @@ #define DMA_INCR_WIDTH_32BIT (0x2 << 28) /* All other values reserved? */ +/* Timer frequency */ +/* Portalplayer chips use a microsecond timer. */ +#define TIMER_FREQ 1000000 + #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 @@ #define DRAM1 0x31000000 #define BOOTRAM 0x40000000 +/* Timer frequency */ + +/* timer is based on PCLK and minimum division is 2 */ +#define TIMER_FREQ (49156800/2) +#define TIMER234_PRESCALE 21 + + #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 @@ #define SCI_MPB 0x02 /* Multiprocessor bit */ #define SCI_MPBT 0x01 /* Multiprocessor bit transfer */ +/* Timer frequency */ +#define TIMER_FREQ CPU_FREQ + #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 @@ #define USB_NUM_ENDPOINTS 3 #define USB_DEVBSS_ATTR IBSS_ATTR +/* Timer frequency */ +/* timers are based on XIN (12Mhz) */ +#define TIMER_FREQ (12000000) + #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 @@ #define USB_NUM_ENDPOINTS 3 #define USB_DEVBSS_ATTR IBSS_ATTR +/* Timer frequency */ +/* Timer is based on PCK_TCT (set to 2Mhz in system.c) */ +#define TIMER_FREQ (2000000) + #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 @@ #include #include "config.h" +#include "cpu.h" #if defined(SIMULATOR) - #define TIMER_FREQ 1000000 -#elif CONFIG_CPU == S3C2440 || CONFIG_CPU == DM320 || CONFIG_CPU == TCC7801 \ - || defined(CPU_TCC77X) || CONFIG_CPU == AS3525 || CONFIG_CPU == IMX31L \ - || CONFIG_CPU == JZ4732 || CONFIG_CPU == PNX0101 \ - || defined(CPU_COLDFIRE) || CONFIG_CPU == SH7034 || defined(CPU_PP) - #include "timer-target.h" -#else - #warning "Target without timer-target.h" -#endif - -#ifndef TIMER_FREQ - #warning "TIMER_FREQ not defined" - #define TIMER_FREQ CPU_FREQ +#define TIMER_FREQ 1000000 #endif bool timer_register(int reg_prio, void (*unregister_callback)(void), diff --git a/firmware/target/arm/as3525/kernel-as3525.c b/firmware/target/arm/as3525/kernel-as3525.c index 966d3bf349..cb7622aef1 100644 --- a/firmware/target/arm/as3525/kernel-as3525.c +++ b/firmware/target/arm/as3525/kernel-as3525.c @@ -22,7 +22,7 @@ #include "system.h" #include "kernel.h" #include "panic.h" -#include "timer-target.h" +#include "timer.h" #ifdef HAVE_SCROLLWHEEL /* let the timer interrupt twice as often for the scrollwheel polling */ diff --git a/firmware/target/arm/as3525/timer-target.h b/firmware/target/arm/as3525/timer-target.h deleted file mode 100644 index f6b4fae370..0000000000 --- a/firmware/target/arm/as3525/timer-target.h +++ /dev/null @@ -1,26 +0,0 @@ -/*************************************************************************** -* __________ __ ___. -* Open \______ \ ____ ____ | | _\_ |__ _______ ___ -* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / -* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < -* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ -* \/ \/ \/ \/ \/ -* $Id$ -* -* Copyright (C) 2008 Rafaël Carré -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -* KIND, either express or implied. -* -****************************************************************************/ -#ifndef TIMER_TARGET_H -#define TIMER_TARGET_H - -#define TIMER_FREQ (24000000 / 16) - -#endif /* TIMER_TARGET_H */ diff --git a/firmware/target/arm/at91sam/lyre_proto1/timer-target.h b/firmware/target/arm/at91sam/lyre_proto1/timer-target.h deleted file mode 100644 index d0773130bf..0000000000 --- a/firmware/target/arm/at91sam/lyre_proto1/timer-target.h +++ /dev/null @@ -1,28 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * - * - * Copyright (C) 2009 by Jorge Pinto - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#ifndef TIMER_TARGET_H -#define TIMER_TARGET_H - -/* timer is based on PCLK and minimum division is 2 */ -#define TIMER_FREQ (49156800/2) - -#endif /* TIMER_TARGET_H */ diff --git a/firmware/target/arm/imx31/gigabeat-s/timer-target.h b/firmware/target/arm/imx31/gigabeat-s/timer-target.h deleted file mode 100644 index 9d5520aa6d..0000000000 --- a/firmware/target/arm/imx31/gigabeat-s/timer-target.h +++ /dev/null @@ -1,27 +0,0 @@ -/*************************************************************************** -* __________ __ ___. -* Open \______ \ ____ ____ | | _\_ |__ _______ ___ -* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / -* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < -* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ -* \/ \/ \/ \/ \/ -* $Id$ -* -* Copyright (C) 2009 by Michael Sevakis -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -* KIND, either express or implied. -* -****************************************************************************/ -#ifndef TIMER_TARGET_H -#define TIMER_TARGET_H - -/* timer is based on ipg_clk */ -#define TIMER_FREQ (66000000) - -#endif /* TIMER_TARGET_H */ diff --git a/firmware/target/arm/pnx0101/timer-pnx0101.c b/firmware/target/arm/pnx0101/timer-pnx0101.c index d54cfe84d5..1ec1d2871f 100644 --- a/firmware/target/arm/pnx0101/timer-pnx0101.c +++ b/firmware/target/arm/pnx0101/timer-pnx0101.c @@ -19,7 +19,6 @@ * ****************************************************************************/ -#include "timer-target.h" #include "system.h" #include "timer.h" diff --git a/firmware/target/arm/pnx0101/timer-target.h b/firmware/target/arm/pnx0101/timer-target.h deleted file mode 100644 index 3bfdb8986d..0000000000 --- a/firmware/target/arm/pnx0101/timer-target.h +++ /dev/null @@ -1,26 +0,0 @@ -/*************************************************************************** -* __________ __ ___. -* Open \______ \ ____ ____ | | _\_ |__ _______ ___ -* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / -* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < -* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ -* \/ \/ \/ \/ \/ -* $Id$ -* -* Copyright (C) 2007 Tomasz Malesinski -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -* KIND, either express or implied. -* -****************************************************************************/ -#ifndef TIMER_TARGET_H -#define TIMER_TARGET_H - -#define TIMER_FREQ 3000000 - -#endif /* TIMER_TARGET_H */ diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/timer-target.h b/firmware/target/arm/s3c2440/gigabeat-fx/timer-target.h deleted file mode 100644 index 215477a806..0000000000 --- a/firmware/target/arm/s3c2440/gigabeat-fx/timer-target.h +++ /dev/null @@ -1,28 +0,0 @@ -/*************************************************************************** -* __________ __ ___. -* Open \______ \ ____ ____ | | _\_ |__ _______ ___ -* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / -* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < -* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ -* \/ \/ \/ \/ \/ -* $Id$ -* -* Copyright (C) 2007 by Michael Sevakis -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -* KIND, either express or implied. -* -****************************************************************************/ -#ifndef TIMER_TARGET_H -#define TIMER_TARGET_H - -/* timer is based on PCLK and minimum division is 2 */ -#define TIMER_FREQ (49156800/2) -#define TIMER234_PRESCALE 21 - -#endif /* TIMER_TARGET_H */ diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/wmcodec-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/wmcodec-meg-fx.c index de965f0750..52c26b898d 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/wmcodec-meg-fx.c +++ b/firmware/target/arm/s3c2440/gigabeat-fx/wmcodec-meg-fx.c @@ -30,7 +30,7 @@ #include "sound.h" #include "i2c-meg-fx.h" #include "system-target.h" -#include "timer-target.h" +#include "timer.h" #include "wmcodec.h" #ifdef HAVE_HARDWARE_BEEP diff --git a/firmware/target/arm/tcc77x/timer-target.h b/firmware/target/arm/tcc77x/timer-target.h deleted file mode 100644 index a4d869067a..0000000000 --- a/firmware/target/arm/tcc77x/timer-target.h +++ /dev/null @@ -1,27 +0,0 @@ -/*************************************************************************** -* __________ __ ___. -* Open \______ \ ____ ____ | | _\_ |__ _______ ___ -* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / -* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < -* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ -* \/ \/ \/ \/ \/ -* $Id$ -* -* Copyright (C) 2007 by Karl Kurbjun -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -* KIND, either express or implied. -* -****************************************************************************/ -#ifndef TIMER_TARGET_H -#define TIMER_TARGET_H - -/* timers are based on XIN (12Mhz) */ -#define TIMER_FREQ (12000000) - -#endif /* TIMER_TARGET_H */ diff --git a/firmware/target/arm/tcc780x/timer-target.h b/firmware/target/arm/tcc780x/timer-target.h deleted file mode 100644 index 91a623a713..0000000000 --- a/firmware/target/arm/tcc780x/timer-target.h +++ /dev/null @@ -1,27 +0,0 @@ -/*************************************************************************** -* __________ __ ___. -* Open \______ \ ____ ____ | | _\_ |__ _______ ___ -* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / -* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < -* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ -* \/ \/ \/ \/ \/ -* $Id$ -* -* Copyright (C) 2007 by Karl Kurbjun -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -* KIND, either express or implied. -* -****************************************************************************/ -#ifndef TIMER_TARGET_H -#define TIMER_TARGET_H - -/* Timer is based on PCK_TCT (set to 2Mhz in system.c) */ -#define TIMER_FREQ (2000000) - -#endif /* TIMER_TARGET_H */ diff --git a/firmware/target/arm/timer-pp.c b/firmware/target/arm/timer-pp.c index a8879b1824..db859f6b88 100644 --- a/firmware/target/arm/timer-pp.c +++ b/firmware/target/arm/timer-pp.c @@ -22,7 +22,6 @@ #include "cpu.h" #include "system.h" #include "timer.h" -#include "timer-target.h" static long SHAREDBSS_ATTR cycles_new = 0; diff --git a/firmware/target/arm/timer-target.h b/firmware/target/arm/timer-target.h deleted file mode 100644 index 65867ab64b..0000000000 --- a/firmware/target/arm/timer-target.h +++ /dev/null @@ -1,34 +0,0 @@ -/*************************************************************************** -* __________ __ ___. -* Open \______ \ ____ ____ | | _\_ |__ _______ ___ -* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / -* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < -* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ -* \/ \/ \/ \/ \/ -* $Id$ -* -* Copyright (C) 2006 Thom Johansen -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -* KIND, either express or implied. -* -****************************************************************************/ -#ifndef TIMER_TARGET_H -#define TIMER_TARGET_H - -#include "config.h" - -/* FIXME : this header is PP specific */ -#ifndef CPU_PP -#error "PP specific header" -#endif - -/* Portalplayer chips use a microsecond timer. */ -#define TIMER_FREQ 1000000 - -#endif /* TIMER_TARGET_H */ diff --git a/firmware/target/arm/tms320dm320/timer-target.h b/firmware/target/arm/tms320dm320/timer-target.h deleted file mode 100644 index c1cf9796de..0000000000 --- a/firmware/target/arm/tms320dm320/timer-target.h +++ /dev/null @@ -1,27 +0,0 @@ -/*************************************************************************** -* __________ __ ___. -* Open \______ \ ____ ____ | | _\_ |__ _______ ___ -* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / -* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < -* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ -* \/ \/ \/ \/ \/ -* $Id$ -* -* Copyright (C) 2007 by Karl Kurbjun -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -* KIND, either express or implied. -* -****************************************************************************/ -#ifndef TIMER_TARGET_H -#define TIMER_TARGET_H - -/* timer is based on PCLK and minimum division is 2 */ -#define TIMER_FREQ (27000000) - -#endif /* TIMER_TARGET_H */ diff --git a/firmware/target/coldfire/timer-coldfire.c b/firmware/target/coldfire/timer-coldfire.c index 0916ebedf7..49d22bb5fa 100644 --- a/firmware/target/coldfire/timer-coldfire.c +++ b/firmware/target/coldfire/timer-coldfire.c @@ -25,7 +25,6 @@ #include "system.h" #include "cpu.h" #include "timer.h" -#include "timer-target.h" static int base_prescale; diff --git a/firmware/target/coldfire/timer-target.h b/firmware/target/coldfire/timer-target.h deleted file mode 100644 index 3aff57de9e..0000000000 --- a/firmware/target/coldfire/timer-target.h +++ /dev/null @@ -1,27 +0,0 @@ -/*************************************************************************** -* __________ __ ___. -* Open \______ \ ____ ____ | | _\_ |__ _______ ___ -* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / -* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < -* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ -* \/ \/ \/ \/ \/ -* $Id$ -* -* Copyright (C) 2005 Jens Arnold -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -* KIND, either express or implied. -* -****************************************************************************/ -#ifndef TIMER_TARGET_H -#define TIMER_TARGET_H - -/* timer is based on busclk == cpuclk/2 */ -#define TIMER_FREQ (CPU_FREQ/2) - -#endif /* TIMER_TARGET_H */ diff --git a/firmware/target/mips/ingenic_jz47xx/timer-target.h b/firmware/target/mips/ingenic_jz47xx/timer-target.h deleted file mode 100644 index a305afaf8b..0000000000 --- a/firmware/target/mips/ingenic_jz47xx/timer-target.h +++ /dev/null @@ -1,29 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2008 by Maurus Cuelenaere - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#ifndef __TIMER_H_ -#define __TIMER_H_ - -#include "config.h" - -#define TIMER_FREQ (CFG_EXTAL) /* For full precision! */ - -#endif /* __TIMER_H_ */ diff --git a/firmware/target/sh/archos/timer-archos.c b/firmware/target/sh/archos/timer-archos.c index 07d63ed3a8..98a3afb4b6 100644 --- a/firmware/target/sh/archos/timer-archos.c +++ b/firmware/target/sh/archos/timer-archos.c @@ -22,7 +22,6 @@ #include "cpu.h" #include "system.h" #include "timer.h" -#include "timer-target.h" void IMIA4(void) __attribute__((interrupt_handler)); void IMIA4(void) diff --git a/firmware/target/sh/archos/timer-target.h b/firmware/target/sh/archos/timer-target.h deleted file mode 100644 index 6cdd442917..0000000000 --- a/firmware/target/sh/archos/timer-target.h +++ /dev/null @@ -1,28 +0,0 @@ -/*************************************************************************** -* __________ __ ___. -* Open \______ \ ____ ____ | | _\_ |__ _______ ___ -* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / -* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < -* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ -* \/ \/ \/ \/ \/ -* $Id$ -* -* Copyright (C) 2005 Jens Arnold -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -* KIND, either express or implied. -* -****************************************************************************/ -#ifndef TIMER_TARGET_H -#define TIMER_TARGET_H - -#include "config.h" - -#define TIMER_FREQ CPU_FREQ - -#endif /* TIMER_TARGET_H */ -- cgit v1.2.3