1 /* Print a friendly message to the serial console. */
2 
3 #include "spimconsreg.h"
4 
5 #define IOBASE 0xa2000000
6 #define IS_READY(ctrl) (((*(ctrl)) & CTL_RDY) != 0)
7 
entry(void)8 void entry(void)
9 {
10 	char *p = "Hello, world!\n";
11 	volatile long *data_reg = (long *)(IOBASE+DISPLAY_1_DATA);
12 	volatile long *control_reg = (long *)(IOBASE+DISPLAY_1_CONTROL);
13 
14 	while (*p != '\0') {
15 		do { 0; } while (! IS_READY(control_reg));
16 		*data_reg = (long) *p++;
17 	}
18 }
19