Przeglądaj źródła

fw, console: add flush function

Explicitly flush the console before reset instead of an arbitrary
delay.
H. Peter Anvin 3 lat temu
rodzic
commit
dce6ed79e1

Plik diff jest za duży
+ 1688 - 1686
fpga/output_files/max80.jam


BIN
fpga/output_files/max80.jbc


BIN
fpga/output_files/max80.jic


+ 1 - 1
fpga/output_files/max80.map

@@ -11,7 +11,7 @@ Quad-Serial configuration device dummy clock cycle: 8
 
 Notes:
 
-- Data checksum for this conversion is 0xF385C8C0
+- Data checksum for this conversion is 0xF385CAC4
 
 - All the addresses in this file are byte addresses
 

BIN
fpga/output_files/max80.pof


BIN
fpga/output_files/max80.sof


Plik diff jest za duży
+ 997 - 997
fw/boot.mif


+ 7 - 0
fw/console.h

@@ -2,6 +2,7 @@
 #define CONSOLE_H
 
 #include <stdarg.h>
+#include "io.h"
 
 void con_set_baudrate(uint32_t);
 void con_putc(char c);
@@ -9,4 +10,10 @@ void con_puts(const char *);
 void con_vprintf(const char *, va_list);
 void con_printf(const char *, ...);
 
+static inline void con_flush(void)
+{
+    while (!(CON_STATUS & 1))
+	/* wait */;
+}
+
 #endif /* CONSOLE_H */

+ 1 - 1
fw/hello.c

@@ -153,7 +153,7 @@ void main(void)
 
     udelay(4000000);
     con_puts("*** Doing reset ***\r\n\n");
-    udelay(100000);
+    con_flush();
     while ( 1 )
       RESET_CMD = 1;
 }

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików