Skip to content

Commit 005e2d6

Browse files
author
Sean Cross
committed
Merge branch 'master' of github.com:xobs/fernly
2 parents 41511b7 + 9e9bab1 commit 005e2d6

4 files changed

Lines changed: 16 additions & 4 deletions

File tree

cmd-peekpoke.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ int cmd_peek(int argc, char **argv)
1515

1616
offset = strtoul(argv[0], NULL, 0);
1717

18+
#pragma GCC diagnostic ignored "-Wformat"
1819
printf("Value at 0x%08x: ", offset);
1920
printf("0x%08x\n", *((volatile uint32_t *)offset));
21+
#pragma GCC diagnostic pop
2022
return 0;
2123
}
2224

@@ -33,8 +35,10 @@ int cmd_poke(int argc, char **argv)
3335
offset = strtoul(argv[0], NULL, 0);
3436
val = strtoul(argv[1], NULL, 0);
3537

38+
#pragma GCC diagnostic ignored "-Wformat"
3639
printf("Setting value at 0x%08x to 0x%08x: ", offset, val);
37-
writel(val, offset);
40+
#pragma GCC diagnostic pop
41+
writel(val, offset);
3842
printf("Ok\n");
3943

4044
return 0;

fernly-usb-loader.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include "sha1.h"
1616

17-
#define BAUDRATE B921600
17+
#define BAUDRATE B115200
1818
#define STAGE_2_WRITE_ALL_AT_ONCE 1 /* Write stage 2 in one write() */
1919
#define STAGE_2_WRITE_SIZE 1
2020
#define STAGE_3_WRITE_ALL_AT_ONCE 1 /* Write stage 3 in one write() */
@@ -1173,7 +1173,10 @@ static int fernvale_write_stage3(int serfd, int binfd)
11731173
}
11741174

11751175
static void cmd_begin(const char *msg) {
1176+
#pragma GCC diagnostic push
1177+
#pragma GCC diagnostic ignored "-Wformat-security"
11761178
printf(msg);
1179+
#pragma GCC diagnostic pop
11771180
printf("... ");
11781181
fflush(stdout);
11791182
}

irq.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,20 @@ void irq_dispatch(void)
130130
printf("Dispatching IRQs...\n");
131131
reg = IRQ_BASE + IRQ_STATUS_OFF;
132132
val = readl(reg);
133+
#pragma GCC diagnostic ignored "-Wformat"
133134
printf("Lower Mask: 0x%08x\n", val);
135+
#pragma GCC diagnostic pop
134136

135137
for (i = 0; i < 32; i++)
136138
if (val & (1 << i))
137139
irq_dispatch_one(i);
138140

139141
reg += IRQ_BASE + IRQ_STATUS_OFF + 4;
140142
val = readl(reg);
141-
printf("Upper Mask: 0x%08x\n", val);
143+
#pragma GCC diagnostic ignored "-Wformat"
144+
printf("Upper Mask: 0x%08x\n", val);
145+
#pragma GCC diagnostic pop
146+
142147
for (i = 0; i < (__irq_max__ - 32); i++)
143148
if (val & (1 << i))
144149
irq_dispatch_one(32 + i);

lcd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ static void lcd_cmd_slot(uint16_t cmd, uint8_t slot)
2929
{
3030
writel(cmd | 0x800000, LCD_CMD_LIST_ADDR + (slot * 4));
3131
}
32+
#pragma GCC diagnostic ignored "-Wunused-function"
3233
static void lcd_dat_slot(uint16_t dat, uint8_t slot)
3334
{
3435
writel(dat, LCD_CMD_LIST_ADDR + (slot * 4));
3536
}
36-
3737
static void lcd_setup_gpio(void)
3838
{
3939
/* LPCE0, LPTE0, LPRSTB */

0 commit comments

Comments
 (0)