filename | test/asic.c |
changeset | 815:866c103d72cd |
prev | 753:1fe39c3a9bbc |
author | nkeynes |
date | Tue Mar 24 11:15:57 2009 +0000 (15 years ago) |
permissions | -rw-r--r-- |
last change | Add preliminary implementation of the GDB remote debugging server - attaches to either or both the SH4 and ARM |
file | annotate | diff | log | raw |
1.1 --- a/test/asic.c Sun Jul 20 11:36:48 2008 +00001.2 +++ b/test/asic.c Tue Mar 24 11:15:57 2009 +00001.3 @@ -23,6 +23,7 @@1.4 #define ASIC_IRQA(n) (ASIC_BASE + 0x910 + (n<<2))1.5 #define ASIC_IRQB(n) (ASIC_BASE + 0x920 + (n<<2))1.6 #define ASIC_IRQC(n) (ASIC_BASE + 0x930 + (n<<2))1.7 +#define G2_FIFO (ASIC_BASE + 0x88C)1.8 #define TIMEOUT 100000001.10 /**1.11 @@ -111,3 +112,18 @@1.12 }1.13 fprintf( f, "\n" );1.14 }1.15 +1.16 +/**1.17 + * Wait until the g2 fifo is clear to write more data.1.18 + */1.19 +int g2_fifo_wait()1.20 +{1.21 + int i;1.22 + for (i=0; i<0x1800; i++) {1.23 + if (!(long_read(G2_FIFO) & 0x11)) {1.24 + return 0;1.25 + }1.26 +1.27 + }1.28 + return -1;1.29 +}1.30 \ No newline at end of file
.