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

mark some functions as init functions (discarded after init() has run)

tick_start, fmradio_i2c_init, pcm_init, pcm_postinit, pcm_play_dma_init

Also add some as3525 target specific functions
Make as3525v2 use this attribute

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26328 a1c6a512-1295-4272-9138-f99709370657

+10 -8
+1 -1
firmware/export/config.h
··· 753 753 #define IBSS_ATTR 754 754 #define STATICIRAM static 755 755 #endif 756 - #if (defined(CPU_PP) || (CONFIG_CPU == AS3525)) \ 756 + #if (defined(CPU_PP) || (CONFIG_CPU == AS3525) || (CONFIG_CPU == AS3525v2)) \ 757 757 && !defined(SIMULATOR) && !defined(BOOTLOADER) 758 758 /* Functions that have INIT_ATTR attached are NOT guaranteed to survive after 759 759 * root_menu() has been called. Their code may be overwritten by other data or
+2 -1
firmware/export/fmradio_i2c.h
··· 22 22 #ifndef FMRADIO_I2C_H 23 23 #define FMRADIO_I2C_H 24 24 25 + #include "config.h" /* for INIT_ATTR */ 25 26 #include <stdbool.h> 26 27 27 - void fmradio_i2c_init(void); 28 + void fmradio_i2c_init(void) INIT_ATTR; 28 29 void fmradio_i2c_enable(bool enable); 29 30 int fmradio_i2c_write(unsigned char address, const unsigned char* buf, int count); 30 31 int fmradio_i2c_read(unsigned char address, unsigned char* buf, int count);
+1 -1
firmware/export/kernel.h
··· 211 211 extern void sleep(int ticks); 212 212 int tick_add_task(void (*f)(void)); 213 213 int tick_remove_task(void (*f)(void)); 214 - extern void tick_start(unsigned int interval_in_ms); 214 + extern void tick_start(unsigned int interval_in_ms) INIT_ATTR; 215 215 216 216 #ifdef INCLUDE_TIMEOUT_API 217 217 struct timeout;
+3 -3
firmware/export/pcm.h
··· 67 67 void pcm_play_lock(void); 68 68 void pcm_play_unlock(void); 69 69 70 - void pcm_init(void); 71 - void pcm_postinit(void); 70 + void pcm_init(void) INIT_ATTR; 71 + void pcm_postinit(void) INIT_ATTR; 72 72 73 73 /* This is for playing "raw" PCM data */ 74 74 void pcm_play_data(pcm_play_callback_type get_more, ··· 104 104 105 105 void pcm_play_dma_lock(void); 106 106 void pcm_play_dma_unlock(void); 107 - void pcm_play_dma_init(void); 107 + void pcm_play_dma_init(void) INIT_ATTR; 108 108 void pcm_play_dma_start(const void *addr, size_t size); 109 109 void pcm_play_dma_stop(void); 110 110 void pcm_play_dma_pause(bool pause);
+1 -1
firmware/target/arm/as3525/ascodec-target.h
··· 70 70 struct ascodec_request *next; 71 71 }; 72 72 73 - void ascodec_init(void); 73 + void ascodec_init(void) INIT_ATTR; 74 74 75 75 int ascodec_write(unsigned int index, unsigned int value); 76 76
+2 -1
firmware/target/arm/as3525/dma-target.h
··· 19 19 * 20 20 ****************************************************************************/ 21 21 22 + #include "config.h" /* for INIT_ATTR */ 22 23 #include <stdbool.h> 23 24 #include <stdlib.h> 24 25 ··· 32 33 #define DMA_PERI_SD 5 /* embedded storage */ 33 34 #define DMA_PERI_DBOP 8 34 35 35 - void dma_init(void); 36 + void dma_init(void) INIT_ATTR; 36 37 void dma_enable_channel(int channel, void *src, void *dst, int peri, 37 38 int flow_controller, bool src_inc, bool dst_inc, 38 39 size_t size, int nwords, void (*callback)(void));