diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2009-06-29 14:30:12 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2009-06-29 14:30:12 +0000 |
commit | ffefe0c08bdeeab725ce5fc054b3add4e05a1f7f (patch) | |
tree | dfc702293ed4218f62c57b8d3ba29e5ae49dc263 /firmware/target | |
parent | c5dedd7d762f48e940ecc0bd17dd2173d59a92e1 (diff) |
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
Diffstat (limited to 'firmware/target')
18 files changed, 2 insertions, 340 deletions
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 */ |