A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd

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

+54 -353
+3
firmware/export/as3525.h
··· 497 497 /* PCM addresses for obtaining buffers will be what DMA is using (physical) */ 498 498 #define HAVE_PCM_DMA_ADDRESS 499 499 500 + /* Timer frequency */ 501 + #define TIMER_FREQ (24000000 / 16) 502 + 500 503 #endif /*__AS3525_H__*/
+4
firmware/export/at91sam9260.h
··· 676 676 #define AT91C_EBI_SDRAM_32BIT (0x20000000) /* SDRAM on EBI Chip Select 1 677 677 base address */ 678 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)
+4
firmware/export/dm320.h
··· 1016 1016 #define VENC_DCLKCTL_DCKIH (1 << 8) 1017 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 1023 #endif
+4
firmware/export/imx31l.h
··· 1754 1754 #define UART_FIFO_CTRL 0x881 1755 1755 #define TIMEOUT 1000 1756 1756 1757 + /* Timer frequency */ 1758 + /* timer is based on ipg_clk */ 1759 + #define TIMER_FREQ (66000000) 1760 + 1757 1761 #endif /* __IMX31L_H__ */
+3
firmware/export/jz4740.h
··· 5209 5209 #define USB_NUM_ENDPOINTS 3 5210 5210 #define USB_DEVBSS_ATTR IBSS_ATTR 5211 5211 5212 + /* Timer frequency */ 5213 + #define TIMER_FREQ (CFG_EXTAL) /* For full precision! */ 5214 + 5212 5215 #endif /* __JZ4740_H__ */
+3
firmware/export/mcf5249.h
··· 279 279 #define DMA1_REQ_AUDIO_1 0x8000 280 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 286 #endif
+3
firmware/export/pnx0101.h
··· 262 262 263 263 #endif /* ASM */ 264 264 265 + /* Timer frequency */ 266 + #define TIMER_FREQ 3000000 267 + 265 268 #endif
+4
firmware/export/pp5002.h
··· 248 248 #define MMAP3_LOGICAL (*(volatile unsigned long *)(0xf000f018)) 249 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 255 #endif
+4
firmware/export/pp5020.h
··· 690 690 #define DMA_INCR_WIDTH_32BIT (0x2 << 28) 691 691 /* All other values reserved? */ 692 692 693 + /* Timer frequency */ 694 + /* Portalplayer chips use a microsecond timer. */ 695 + #define TIMER_FREQ 1000000 696 + 693 697 #endif /* __PP5020_H__ */
+7
firmware/export/s3c2440.h
··· 550 550 #define DRAM1 0x31000000 551 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 560 #endif /* __S3C2440_H__ */
+3
firmware/export/sh7034.h
··· 370 370 #define SCI_MPB 0x02 /* Multiprocessor bit */ 371 371 #define SCI_MPBT 0x01 /* Multiprocessor bit transfer */ 372 372 373 + /* Timer frequency */ 374 + #define TIMER_FREQ CPU_FREQ 375 + 373 376 #endif
+4
firmware/export/tcc77x.h
··· 261 261 #define USB_NUM_ENDPOINTS 3 262 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 268 #endif
+4
firmware/export/tcc780x.h
··· 249 249 #define USB_NUM_ENDPOINTS 3 250 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 256 #endif
+2 -13
firmware/export/timer.h
··· 24 24 25 25 #include <stdbool.h> 26 26 #include "config.h" 27 + #include "cpu.h" 27 28 28 29 #if defined(SIMULATOR) 29 - #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 30 + #define TIMER_FREQ 1000000 42 31 #endif 43 32 44 33 bool timer_register(int reg_prio, void (*unregister_callback)(void),
+1 -1
firmware/target/arm/as3525/kernel-as3525.c
··· 22 22 #include "system.h" 23 23 #include "kernel.h" 24 24 #include "panic.h" 25 - #include "timer-target.h" 25 + #include "timer.h" 26 26 27 27 #ifdef HAVE_SCROLLWHEEL 28 28 /* let the timer interrupt twice as often for the scrollwheel polling */
-26
firmware/target/arm/as3525/timer-target.h
··· 1 - /*************************************************************************** 2 - * __________ __ ___. 3 - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 - * \/ \/ \/ \/ \/ 8 - * $Id$ 9 - * 10 - * Copyright (C) 2008 Rafaël Carré 11 - * 12 - * This program is free software; you can redistribute it and/or 13 - * modify it under the terms of the GNU General Public License 14 - * as published by the Free Software Foundation; either version 2 15 - * of the License, or (at your option) any later version. 16 - * 17 - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 - * KIND, either express or implied. 19 - * 20 - ****************************************************************************/ 21 - #ifndef TIMER_TARGET_H 22 - #define TIMER_TARGET_H 23 - 24 - #define TIMER_FREQ (24000000 / 16) 25 - 26 - #endif /* TIMER_TARGET_H */
-28
firmware/target/arm/at91sam/lyre_proto1/timer-target.h
··· 1 - /*************************************************************************** 2 - * __________ __ ___. 3 - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 - * \/ \/ \/ \/ \/ 8 - * 9 - * 10 - * Copyright (C) 2009 by Jorge Pinto 11 - * 12 - * This program is free software; you can redistribute it and/or 13 - * modify it under the terms of the GNU General Public License 14 - * as published by the Free Software Foundation; either version 2 15 - * of the License, or (at your option) any later version. 16 - * 17 - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 - * KIND, either express or implied. 19 - * 20 - ****************************************************************************/ 21 - 22 - #ifndef TIMER_TARGET_H 23 - #define TIMER_TARGET_H 24 - 25 - /* timer is based on PCLK and minimum division is 2 */ 26 - #define TIMER_FREQ (49156800/2) 27 - 28 - #endif /* TIMER_TARGET_H */
-27
firmware/target/arm/imx31/gigabeat-s/timer-target.h
··· 1 - /*************************************************************************** 2 - * __________ __ ___. 3 - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 - * \/ \/ \/ \/ \/ 8 - * $Id$ 9 - * 10 - * Copyright (C) 2009 by Michael Sevakis 11 - * 12 - * This program is free software; you can redistribute it and/or 13 - * modify it under the terms of the GNU General Public License 14 - * as published by the Free Software Foundation; either version 2 15 - * of the License, or (at your option) any later version. 16 - * 17 - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 - * KIND, either express or implied. 19 - * 20 - ****************************************************************************/ 21 - #ifndef TIMER_TARGET_H 22 - #define TIMER_TARGET_H 23 - 24 - /* timer is based on ipg_clk */ 25 - #define TIMER_FREQ (66000000) 26 - 27 - #endif /* TIMER_TARGET_H */
-1
firmware/target/arm/pnx0101/timer-pnx0101.c
··· 19 19 * 20 20 ****************************************************************************/ 21 21 22 - #include "timer-target.h" 23 22 #include "system.h" 24 23 #include "timer.h" 25 24
-26
firmware/target/arm/pnx0101/timer-target.h
··· 1 - /*************************************************************************** 2 - * __________ __ ___. 3 - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 - * \/ \/ \/ \/ \/ 8 - * $Id$ 9 - * 10 - * Copyright (C) 2007 Tomasz Malesinski 11 - * 12 - * This program is free software; you can redistribute it and/or 13 - * modify it under the terms of the GNU General Public License 14 - * as published by the Free Software Foundation; either version 2 15 - * of the License, or (at your option) any later version. 16 - * 17 - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 - * KIND, either express or implied. 19 - * 20 - ****************************************************************************/ 21 - #ifndef TIMER_TARGET_H 22 - #define TIMER_TARGET_H 23 - 24 - #define TIMER_FREQ 3000000 25 - 26 - #endif /* TIMER_TARGET_H */
-28
firmware/target/arm/s3c2440/gigabeat-fx/timer-target.h
··· 1 - /*************************************************************************** 2 - * __________ __ ___. 3 - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 - * \/ \/ \/ \/ \/ 8 - * $Id$ 9 - * 10 - * Copyright (C) 2007 by Michael Sevakis 11 - * 12 - * This program is free software; you can redistribute it and/or 13 - * modify it under the terms of the GNU General Public License 14 - * as published by the Free Software Foundation; either version 2 15 - * of the License, or (at your option) any later version. 16 - * 17 - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 - * KIND, either express or implied. 19 - * 20 - ****************************************************************************/ 21 - #ifndef TIMER_TARGET_H 22 - #define TIMER_TARGET_H 23 - 24 - /* timer is based on PCLK and minimum division is 2 */ 25 - #define TIMER_FREQ (49156800/2) 26 - #define TIMER234_PRESCALE 21 27 - 28 - #endif /* TIMER_TARGET_H */
+1 -1
firmware/target/arm/s3c2440/gigabeat-fx/wmcodec-meg-fx.c
··· 30 30 #include "sound.h" 31 31 #include "i2c-meg-fx.h" 32 32 #include "system-target.h" 33 - #include "timer-target.h" 33 + #include "timer.h" 34 34 #include "wmcodec.h" 35 35 36 36 #ifdef HAVE_HARDWARE_BEEP
-27
firmware/target/arm/tcc77x/timer-target.h
··· 1 - /*************************************************************************** 2 - * __________ __ ___. 3 - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 - * \/ \/ \/ \/ \/ 8 - * $Id$ 9 - * 10 - * Copyright (C) 2007 by Karl Kurbjun 11 - * 12 - * This program is free software; you can redistribute it and/or 13 - * modify it under the terms of the GNU General Public License 14 - * as published by the Free Software Foundation; either version 2 15 - * of the License, or (at your option) any later version. 16 - * 17 - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 - * KIND, either express or implied. 19 - * 20 - ****************************************************************************/ 21 - #ifndef TIMER_TARGET_H 22 - #define TIMER_TARGET_H 23 - 24 - /* timers are based on XIN (12Mhz) */ 25 - #define TIMER_FREQ (12000000) 26 - 27 - #endif /* TIMER_TARGET_H */
-27
firmware/target/arm/tcc780x/timer-target.h
··· 1 - /*************************************************************************** 2 - * __________ __ ___. 3 - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 - * \/ \/ \/ \/ \/ 8 - * $Id$ 9 - * 10 - * Copyright (C) 2007 by Karl Kurbjun 11 - * 12 - * This program is free software; you can redistribute it and/or 13 - * modify it under the terms of the GNU General Public License 14 - * as published by the Free Software Foundation; either version 2 15 - * of the License, or (at your option) any later version. 16 - * 17 - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 - * KIND, either express or implied. 19 - * 20 - ****************************************************************************/ 21 - #ifndef TIMER_TARGET_H 22 - #define TIMER_TARGET_H 23 - 24 - /* Timer is based on PCK_TCT (set to 2Mhz in system.c) */ 25 - #define TIMER_FREQ (2000000) 26 - 27 - #endif /* TIMER_TARGET_H */
-1
firmware/target/arm/timer-pp.c
··· 22 22 #include "cpu.h" 23 23 #include "system.h" 24 24 #include "timer.h" 25 - #include "timer-target.h" 26 25 27 26 static long SHAREDBSS_ATTR cycles_new = 0; 28 27
-34
firmware/target/arm/timer-target.h
··· 1 - /*************************************************************************** 2 - * __________ __ ___. 3 - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 - * \/ \/ \/ \/ \/ 8 - * $Id$ 9 - * 10 - * Copyright (C) 2006 Thom Johansen 11 - * 12 - * This program is free software; you can redistribute it and/or 13 - * modify it under the terms of the GNU General Public License 14 - * as published by the Free Software Foundation; either version 2 15 - * of the License, or (at your option) any later version. 16 - * 17 - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 - * KIND, either express or implied. 19 - * 20 - ****************************************************************************/ 21 - #ifndef TIMER_TARGET_H 22 - #define TIMER_TARGET_H 23 - 24 - #include "config.h" 25 - 26 - /* FIXME : this header is PP specific */ 27 - #ifndef CPU_PP 28 - #error "PP specific header" 29 - #endif 30 - 31 - /* Portalplayer chips use a microsecond timer. */ 32 - #define TIMER_FREQ 1000000 33 - 34 - #endif /* TIMER_TARGET_H */
-27
firmware/target/arm/tms320dm320/timer-target.h
··· 1 - /*************************************************************************** 2 - * __________ __ ___. 3 - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 - * \/ \/ \/ \/ \/ 8 - * $Id$ 9 - * 10 - * Copyright (C) 2007 by Karl Kurbjun 11 - * 12 - * This program is free software; you can redistribute it and/or 13 - * modify it under the terms of the GNU General Public License 14 - * as published by the Free Software Foundation; either version 2 15 - * of the License, or (at your option) any later version. 16 - * 17 - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 - * KIND, either express or implied. 19 - * 20 - ****************************************************************************/ 21 - #ifndef TIMER_TARGET_H 22 - #define TIMER_TARGET_H 23 - 24 - /* timer is based on PCLK and minimum division is 2 */ 25 - #define TIMER_FREQ (27000000) 26 - 27 - #endif /* TIMER_TARGET_H */
-1
firmware/target/coldfire/timer-coldfire.c
··· 25 25 #include "system.h" 26 26 #include "cpu.h" 27 27 #include "timer.h" 28 - #include "timer-target.h" 29 28 30 29 static int base_prescale; 31 30
-27
firmware/target/coldfire/timer-target.h
··· 1 - /*************************************************************************** 2 - * __________ __ ___. 3 - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 - * \/ \/ \/ \/ \/ 8 - * $Id$ 9 - * 10 - * Copyright (C) 2005 Jens Arnold 11 - * 12 - * This program is free software; you can redistribute it and/or 13 - * modify it under the terms of the GNU General Public License 14 - * as published by the Free Software Foundation; either version 2 15 - * of the License, or (at your option) any later version. 16 - * 17 - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 - * KIND, either express or implied. 19 - * 20 - ****************************************************************************/ 21 - #ifndef TIMER_TARGET_H 22 - #define TIMER_TARGET_H 23 - 24 - /* timer is based on busclk == cpuclk/2 */ 25 - #define TIMER_FREQ (CPU_FREQ/2) 26 - 27 - #endif /* TIMER_TARGET_H */
-29
firmware/target/mips/ingenic_jz47xx/timer-target.h
··· 1 - /*************************************************************************** 2 - * __________ __ ___. 3 - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 - * \/ \/ \/ \/ \/ 8 - * $Id$ 9 - * 10 - * Copyright (C) 2008 by Maurus Cuelenaere 11 - * 12 - * This program is free software; you can redistribute it and/or 13 - * modify it under the terms of the GNU General Public License 14 - * as published by the Free Software Foundation; either version 2 15 - * of the License, or (at your option) any later version. 16 - * 17 - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 - * KIND, either express or implied. 19 - * 20 - ****************************************************************************/ 21 - 22 - #ifndef __TIMER_H_ 23 - #define __TIMER_H_ 24 - 25 - #include "config.h" 26 - 27 - #define TIMER_FREQ (CFG_EXTAL) /* For full precision! */ 28 - 29 - #endif /* __TIMER_H_ */
-1
firmware/target/sh/archos/timer-archos.c
··· 22 22 #include "cpu.h" 23 23 #include "system.h" 24 24 #include "timer.h" 25 - #include "timer-target.h" 26 25 27 26 void IMIA4(void) __attribute__((interrupt_handler)); 28 27 void IMIA4(void)
-28
firmware/target/sh/archos/timer-target.h
··· 1 - /*************************************************************************** 2 - * __________ __ ___. 3 - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 - * \/ \/ \/ \/ \/ 8 - * $Id$ 9 - * 10 - * Copyright (C) 2005 Jens Arnold 11 - * 12 - * This program is free software; you can redistribute it and/or 13 - * modify it under the terms of the GNU General Public License 14 - * as published by the Free Software Foundation; either version 2 15 - * of the License, or (at your option) any later version. 16 - * 17 - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 - * KIND, either express or implied. 19 - * 20 - ****************************************************************************/ 21 - #ifndef TIMER_TARGET_H 22 - #define TIMER_TARGET_H 23 - 24 - #include "config.h" 25 - 26 - #define TIMER_FREQ CPU_FREQ 27 - 28 - #endif /* TIMER_TARGET_H */