diff --git a/litex/soc/software/bios/boot.c b/litex/soc/software/bios/boot.c index 6bf970dda..cc0521855 100644 --- a/litex/soc/software/bios/boot.c +++ b/litex/soc/software/bios/boot.c @@ -681,11 +681,11 @@ static int copy_file_from_sdcard_to_ram(const char * filename, unsigned long ram } length = f_size(&file); - printf("Copying %s to 0x%08lx (%d bytes)...\n", filename, ram_address, length); + printf("Copying %s to 0x%08lx (%ld bytes)...\n", filename, ram_address, length); init_progression_bar(length); offset = 0; for (;;) { - fr = f_read(&file, (void*) ram_address + offset, 0x8000, &br); + fr = f_read(&file, (void*) ram_address + offset, 0x8000, (UINT *)&br); if (fr != FR_OK) { printf("file read error.\n"); f_close(&file); @@ -741,7 +741,7 @@ static void sdcardboot_from_json(const char * filename) return; } - fr = f_read(&file, json_buffer, sizeof(json_buffer), &length); + fr = f_read(&file, json_buffer, sizeof(json_buffer), (UINT *) &length); /* Close JSON file */ f_close(&file); @@ -856,11 +856,11 @@ static int copy_file_from_sata_to_ram(const char * filename, unsigned long ram_a } length = f_size(&file); - printf("Copying %s to 0x%08lx (%d bytes)...\n", filename, ram_address, length); + printf("Copying %s to 0x%08lx (%ld bytes)...\n", filename, ram_address, length); init_progression_bar(length); offset = 0; for (;;) { - fr = f_read(&file, (void*) ram_address + offset, 0x8000, &br); + fr = f_read(&file, (void*) ram_address + offset, 0x8000, (UINT *) &br); if (fr != FR_OK) { printf("file read error.\n"); f_close(&file); @@ -916,7 +916,7 @@ static void sataboot_from_json(const char * filename) return; } - fr = f_read(&file, json_buffer, sizeof(json_buffer), &length); + fr = f_read(&file, json_buffer, sizeof(json_buffer), (UINT *) &length); /* Close JSON file */ f_close(&file); diff --git a/litex/soc/software/bios/cmds/cmd_litesata.c b/litex/soc/software/bios/cmds/cmd_litesata.c index fcb96b9e9..27c75e78d 100644 --- a/litex/soc/software/bios/cmds/cmd_litesata.c +++ b/litex/soc/software/bios/cmds/cmd_litesata.c @@ -54,7 +54,7 @@ static void sata_read_handler(int nb_params, char **params) } sata_read(sector, 1, buf); - dump_bytes((uint32_t *)buf, 512, (unsigned long) buf); + dump_bytes((unsigned int *)buf, 512, (unsigned long) buf); } define_command(sata_read, sata_read_handler, "Read SATA sector", LITESATA_CMDS); @@ -94,7 +94,7 @@ static void sata_write_handler(int nb_params, char **params) } } } - dump_bytes((uint32_t *)buf, 512, (unsigned long) buf); + dump_bytes((unsigned int *)buf, 512, (unsigned long) buf); sata_write(sector, 1, buf); } diff --git a/litex/soc/software/bios/cmds/cmd_litesdcard.c b/litex/soc/software/bios/cmds/cmd_litesdcard.c index c22bab608..a206c7c52 100644 --- a/litex/soc/software/bios/cmds/cmd_litesdcard.c +++ b/litex/soc/software/bios/cmds/cmd_litesdcard.c @@ -98,7 +98,7 @@ static void sdcard_read_handler(int nb_params, char **params) } sdcard_read(block, 1, buf); - dump_bytes((uint32_t *)buf, 512, (unsigned long) buf); + dump_bytes((unsigned int *)buf, 512, (unsigned long) buf); } define_command(sdcard_read, sdcard_read_handler, "Read SDCard block", LITESDCARD_CMDS); @@ -138,7 +138,7 @@ static void sdcard_write_handler(int nb_params, char **params) } } } - dump_bytes((uint32_t *)buf, 512, (unsigned long) buf); + dump_bytes((unsigned int *)buf, 512, (unsigned long) buf); sdcard_write(block, 1, buf); } diff --git a/litex/soc/software/liblitesdcard/sdcard.c b/litex/soc/software/liblitesdcard/sdcard.c index 4631c1366..e866e4f19 100644 --- a/litex/soc/software/liblitesdcard/sdcard.c +++ b/litex/soc/software/liblitesdcard/sdcard.c @@ -117,9 +117,9 @@ void sdcard_set_clk_freq(uint32_t clk_freq, int show) { clk_freq = CONFIG_CLOCK_FREQUENCY/divider; printf("Setting SDCard clk freq to "); if (clk_freq > 1000000) - printf("%d MHz\n", clk_freq/1000000); + printf("%ld MHz\n", clk_freq/1000000); else - printf("%d KHz\n", clk_freq/1000); + printf("%ld KHz\n", clk_freq/1000); } sdphy_clocker_divider_write(divider); }