/[gxemul]/trunk/src/devices/dev_pcic.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/devices/dev_pcic.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 13 by dpavlin, Mon Oct 8 16:18:00 2007 UTC revision 14 by dpavlin, Mon Oct 8 16:18:51 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_pcic.c,v 1.10 2005/04/06 23:13:36 debug Exp $   *  $Id: dev_pcic.c,v 1.12 2005/09/11 10:37:38 debug Exp $
29   *   *
30   *  Intel 82365SL PC Card Interface Controller (called "pcic" by NetBSD).   *  Intel 82365SL PC Card Interface Controller (called "pcic" by NetBSD).
31   *   *
32   *  TODO: Lots of stuff.   *  TODO: Lots of stuff. This is just a quick hack. Don't rely on it.
33   */   */
34    
35  #include <stdio.h>  #include <stdio.h>
# Line 38  Line 38 
38    
39  #include "cpu.h"  #include "cpu.h"
40  #include "device.h"  #include "device.h"
 #include "devices.h"  
41  #include "emul.h"  #include "emul.h"
42  #include "machine.h"  #include "machine.h"
43  #include "memory.h"  #include "memory.h"
# Line 132  int dev_pcic_cis_access(struct cpu *cpu, Line 131  int dev_pcic_cis_access(struct cpu *cpu,
131          if (relative_addr < sizeof(x))          if (relative_addr < sizeof(x))
132                  odata = x[relative_addr];                  odata = x[relative_addr];
133    
134          debug("[ dev_pcic_cis_access: blah blah ]\n");          debug("[ dev_pcic_cis_access: blah blah: addr=0x%x ]\n",
135                (int)relative_addr);
136  }  }
137    
138          if (writeflag == MEM_READ)          if (writeflag == MEM_READ)
# Line 185  int dev_pcic_access(struct cpu *cpu, str Line 185  int dev_pcic_access(struct cpu *cpu, str
185                          odata = PCIC_CSC_GPI;                          odata = PCIC_CSC_GPI;
186                          break;                          break;
187                  case PCIC_IF_STATUS:                  case PCIC_IF_STATUS:
188                          odata = PCIC_IF_STATUS_READY;                          odata = PCIC_IF_STATUS_READY
189                                | PCIC_IF_STATUS_POWERACTIVE;
190                          if (controller_nr == 0 && socket_nr == 0)                          if (controller_nr == 0 && socket_nr == 0)
191                                  odata |= PCIC_IF_STATUS_CARDDETECT_PRESENT;                                  odata |= PCIC_IF_STATUS_CARDDETECT_PRESENT;
192                          break;                          break;
# Line 236  int devinit_pcic(struct devinit *devinit Line 237  int devinit_pcic(struct devinit *devinit
237              MEM_DEFAULT, NULL);              MEM_DEFAULT, NULL);
238    
239          /*  TODO: find out a good way to specify the address, and the IRQ!  */          /*  TODO: find out a good way to specify the address, and the IRQ!  */
240          dev_wdc_init(devinit->machine, devinit->machine->memory,          /*  IRQ 8 + 32 + 9  */
241              0x14000180, 8 + 32 + 9, 0);          device_add(devinit->machine, "wdc addr=0x14000180 irq=49");
242    
243          /*  TODO: Linux/MobilePro looks at 0x14000170 and 0x1f0...  */          /*  TODO: Linux/MobilePro looks at 0x14000170 and 0x1f0...  */
244          /*  Yuck. Now there are two. How should this be solved nicely?  */          /*  Yuck. Now there are two. How should this be solved nicely?  */
245          dev_wdc_init(devinit->machine, devinit->machine->memory,          device_add(devinit->machine, "wdc addr=0x140001f0 irq=49");
             0x140001f0, 8 + 32 + 9, 0);  
246    
247          return 1;          return 1;
248  }  }

Legend:
Removed from v.13  
changed lines
  Added in v.14

  ViewVC Help
Powered by ViewVC 1.1.26