···3737 */
3838bool ata_disk_is_active(void);
3939int ata_soft_reset(void);
4040-int ata_init(void);
4040+int ata_init(void) STORAGE_INIT_ATTR;
4141void ata_close(void);
4242int ata_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf);
4343int ata_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf);
+10
firmware/export/config.h
···908908#define INITDATA_ATTR
909909#endif
910910911911+/* We need to call storage_init more than once only if USB storage mode is
912912+ * handled in hardware:
913913+ * Deinit storage -> let hardware handle USB mode -> storage_init() again
914914+ */
915915+#if defined(HAVE_USBSTACK) || defined(USB_NONE)
916916+#define STORAGE_INIT_ATTR INIT_ATTR
917917+#else
918918+#define STORAGE_INIT_ATTR
919919+#endif
920920+911921#if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__)
912922#define DATA_ATTR __attribute__ ((section("__DATA, .data")))
913923#else
+1-1
firmware/export/mmc.h
···3333void mmc_sleepnow(void);
3434bool mmc_disk_is_active(void);
3535int mmc_soft_reset(void);
3636-int mmc_init(void);
3636+int mmc_init(void) STORAGE_INIT_ATTR;
3737void mmc_close(void);
3838int mmc_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf);
3939int mmc_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf);
+1-1
firmware/export/nand.h
···3333void nand_sleepnow(void);
3434bool nand_disk_is_active(void);
3535int nand_soft_reset(void);
3636-int nand_init(void);
3636+int nand_init(void) STORAGE_INIT_ATTR;
3737void nand_close(void);
3838int nand_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf);
3939int nand_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf);
+1-1
firmware/export/ramdisk.h
···3232void ramdisk_sleep(void);
3333bool ramdisk_disk_is_active(void);
3434int ramdisk_soft_reset(void);
3535-int ramdisk_init(void);
3535+int ramdisk_init(void) STORAGE_INIT_ATTR;
3636void ramdisk_close(void);
3737int ramdisk_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf);
3838int ramdisk_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf);
+1-1
firmware/export/sd.h
···3939void sd_sleepnow(void);
4040bool sd_disk_is_active(void);
4141int sd_soft_reset(void);
4242-int sd_init(void);
4242+int sd_init(void) STORAGE_INIT_ATTR;
4343void sd_close(void);
4444int sd_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf);
4545int sd_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf);