Search
lxdream.org :: lxdream/test/asic.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename test/asic.c
changeset 815:866c103d72cd
prev753:1fe39c3a9bbc
author nkeynes
date Tue Feb 28 18:22:52 2012 +1000 (12 years ago)
permissions -rw-r--r--
last change Add a GL-only video driver for android usage (since the Java code is
responsible for creating the context)
file annotate diff log raw
1.1 --- a/test/asic.c Sun Jul 20 11:36:48 2008 +0000
1.2 +++ b/test/asic.c Tue Feb 28 18:22:52 2012 +1000
1.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 10000000
1.9
1.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
.