From f37b5a834967eb273c14d532de43bf31ccb51c3a Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Sun, 7 Jul 2024 12:28:05 -0400 Subject: Fix the remaining red in red from ea80d1cc9ca Notably: * double-paste in ihifi760 config.h * jz4740 ATA & SD drivers used MULTIVOLUME instead of MULTIDRIVE * Simulators implicitly rely on HAVE_HOTSWAP Change-Id: I44fc7f98f0f6df366f016567c330f87e9f3ca6a6 --- firmware/export/config/ihifi760.h | 2 +- firmware/export/config/sim.h | 5 +++++ firmware/target/mips/ingenic_jz47xx/ata-nand-jz4740.c | 12 ++++++------ firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c | 10 +++++----- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/firmware/export/config/ihifi760.h b/firmware/export/config/ihifi760.h index 5ba19a55c3..ca62948bd2 100644 --- a/firmware/export/config/ihifi760.h +++ b/firmware/export/config/ihifi760.h @@ -49,7 +49,7 @@ #define HAVE_FLASH_STORAGE #define CONFIG_STORAGE (STORAGE_SD | STORAGE_NAND) -#define NUM_DRIVES 1 /* NAND doesn't work yet */#define NUM_DRIVES 1 /* NAND doesn't work yet */ +#define NUM_DRIVES 1 /* NAND doesn't work yet */ #define CONFIG_NAND NAND_RK27XX #define HAVE_SW_TONE_CONTROLS diff --git a/firmware/export/config/sim.h b/firmware/export/config/sim.h index 0aeca695f0..89a0f12b6a 100644 --- a/firmware/export/config/sim.h +++ b/firmware/export/config/sim.h @@ -25,6 +25,11 @@ #undef AMS_OF_SIZE +/* Simulator core requires hotswap */ +#ifndef HAVE_HOTSWAP +#define HAVE_HOTSWAP +#endif + #undef HAVE_HOTSWAP_STORAGE_AS_MAIN #undef HAVE_STORAGE_FLUSH diff --git a/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4740.c b/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4740.c index 5f320f8e9b..0c9ee98eb9 100644 --- a/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4740.c +++ b/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4740.c @@ -627,9 +627,9 @@ static inline int read_sector(unsigned long start, unsigned int count, return ret; } -int nand_read_sectors(IF_MV(int drive,) unsigned long start, int count, void* buf) +int nand_read_sectors(IF_MD(int drive,) unsigned long start, int count, void* buf) { -#ifdef HAVE_MULTIVOLUME +#ifdef HAVE_MULTIDRIVE (void)drive; #endif int ret = 0; @@ -670,12 +670,12 @@ int nand_read_sectors(IF_MV(int drive,) unsigned long start, int count, void* bu } /* TODO */ -int nand_write_sectors(IF_MV(int drive,) unsigned long start, int count, const void* buf) +int nand_write_sectors(IF_MD(int drive,) unsigned long start, int count, const void* buf) { (void)start; (void)count; (void)buf; -#ifdef HAVE_MULTIVOLUME +#ifdef HAVE_MULTIDRIVE (void)drive; #endif @@ -727,9 +727,9 @@ void nand_sleepnow(void) } #ifdef STORAGE_GET_INFO -void nand_get_info(IF_MV(int drive,) struct storage_info *info) +void nand_get_info(IF_MD(int drive,) struct storage_info *info) { -#ifdef HAVE_MULTIVOLUME +#ifdef HAVE_MULTIDRIVE (void)drive; #endif diff --git a/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c b/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c index 56dd50814a..ce8a3d7479 100644 --- a/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c +++ b/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c @@ -1252,7 +1252,7 @@ static inline void sd_stop_transfer(void) int sd_read_sectors(IF_MD(int drive,) unsigned long start, int count, void* buf) { -#ifdef HAVE_MULTIVOLUME +#ifdef HAVE_MULTIDRIVE (void)drive; #endif sd_start_transfer(); @@ -1304,9 +1304,9 @@ err: return retval; } -int sd_write_sectors(IF_MV(int drive,) unsigned long start, int count, const void* buf) +int sd_write_sectors(IF_MD(int drive,) unsigned long start, int count, const void* buf) { -#ifdef HAVE_MULTIVOLUME +#ifdef HAVE_MULTIDRIVE (void)drive; #endif sd_start_transfer(); @@ -1387,7 +1387,7 @@ int sd_soft_reset(void) #ifdef HAVE_HOTSWAP bool sd_removable(IF_MD_NONVOID(int drive)) { -#ifdef HAVE_MULTIVOLUME +#ifdef HAVE_MULTIDRIVE (void)drive; #endif return true; @@ -1415,7 +1415,7 @@ void MMC_CD_IRQ(void) } #endif -bool sd_present(IF_MV_NONVOID(int drive)) +bool sd_present(IF_MD_NONVOID(int drive)) { #ifdef HAVE_MULTIDRIVE (void)drive; -- cgit v1.2.3