filename | test/asic.c |
changeset | 815:866c103d72cd |
prev | 753:1fe39c3a9bbc |
author | nkeynes |
date | Sat Dec 27 02:59:35 2008 +0000 (15 years ago) |
branch | lxdream-mem |
permissions | -rw-r--r-- |
last change | Replace fpscr_mask/fpscr flags in xlat_cache_block with a single xlat_sh4_mode, which tracks the field of the same name in sh4r - actually a little faster this way. Now depends on SR.MD, FPSCR.PR and FPSCR.SZ (although it doesn't benefit from the SR flag yet). Also fixed the failure to check the flags in the common case (code address returned by previous block) which took away the performance benefits, but oh well. |
file | annotate | diff | log | raw |
1.1 --- a/test/asic.c Sun Jul 20 11:36:48 2008 +00001.2 +++ b/test/asic.c Sat Dec 27 02:59:35 2008 +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
.