/[gxemul]/trunk/src/devices/dev_vr41xx.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_vr41xx.c

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

revision 12 by dpavlin, Mon Oct 8 16:18:38 2007 UTC revision 44 by dpavlin, Mon Oct 8 16:22:56 2007 UTC
# Line 1  Line 1 
1  /*  /*
2   *  Copyright (C) 2004-2005  Anders Gavare.  All rights reserved.   *  Copyright (C) 2004-2007  Anders Gavare.  All rights reserved.
3   *   *
4   *  Redistribution and use in source and binary forms, with or without   *  Redistribution and use in source and binary forms, with or without
5   *  modification, are permitted provided that the following conditions are met:   *  modification, are permitted provided that the following conditions are met:
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_vr41xx.c,v 1.30 2005/08/05 09:11:48 debug Exp $   *  $Id: dev_vr41xx.c,v 1.47 2007/08/29 20:36:49 debug Exp $
29   *     *  
30   *  VR41xx (actually, VR4122 and VR4131) misc functions.   *  COMMENT: VR41xx (VR4122 and VR4131) misc functions
31   *   *
32   *  This is just a big hack. TODO: Fix.   *  This is just a big hack.
33     *
34     *  TODO: Implement more functionality some day.
35   */   */
36    
37  #include <stdio.h>  #include <stdio.h>
# Line 40  Line 42 
42  #include "cpu.h"  #include "cpu.h"
43  #include "device.h"  #include "device.h"
44  #include "devices.h"  #include "devices.h"
45    #include "interrupt.h"
46  #include "machine.h"  #include "machine.h"
47  #include "memory.h"  #include "memory.h"
48  #include "misc.h"  #include "misc.h"
49    #include "timer.h"
50    
51  #include "bcureg.h"  #include "bcureg.h"
52  #include "vripreg.h"  #include "vripreg.h"
53  #include "vrkiureg.h"  #include "vrkiureg.h"
54    #include "vr_rtcreg.h"
55    
56    
 #define DEV_VR41XX_TICKSHIFT            15  
   
57  /*  #define debug fatal  */  /*  #define debug fatal  */
58    
59    #define DEV_VR41XX_TICKSHIFT            14
60    
61  static void recalc_kiu_int_assert(struct cpu *cpu, struct vr41xx_data *d)  #define DEV_VR41XX_LENGTH               0x800   /*  TODO?  */
62    struct vr41xx_data {
63            struct interrupt cpu_irq;               /*  Connected to MIPS irq 2  */
64            int             cpumodel;               /*  Model nr, e.g. 4121  */
65    
66            /*  KIU:  */
67            int             kiu_console_handle;
68            uint32_t        kiu_offset;
69            struct interrupt kiu_irq;
70            int             kiu_int_assert;
71            int             old_kiu_int_assert;
72    
73            int             d0, d1, d2, d3, d4, d5;
74            int             dont_clear_next;
75            int             escape_state;
76    
77            /*  Timer:  */
78            int             pending_timer_interrupts;
79            struct interrupt timer_irq;
80            struct timer    *timer;
81    
82            /*  See icureg.h in NetBSD for more info.  */
83            uint16_t        sysint1;
84            uint16_t        msysint1;
85            uint16_t        giuint;
86            uint16_t        giumask;
87            uint16_t        sysint2;
88            uint16_t        msysint2;
89            struct interrupt giu_irq;
90    };
91    
92    
93    /*
94     *  vr41xx_vrip_interrupt_assert():
95     *  vr41xx_vrip_interrupt_deassert():
96     */
97    void vr41xx_vrip_interrupt_assert(struct interrupt *interrupt)
98  {  {
99          if (d->kiu_int_assert != 0)          struct vr41xx_data *d = interrupt->extra;
100                  cpu_interrupt(cpu, 8 + d->kiu_irq_nr);          int line = interrupt->line;
101            if (line < 16)
102                    d->sysint1 |= (1 << line);
103          else          else
104                  cpu_interrupt_ack(cpu, 8 + d->kiu_irq_nr);                  d->sysint2 |= (1 << (line-16));
105            if ((d->sysint1 & d->msysint1) | (d->sysint2 & d->msysint2))
106                    INTERRUPT_ASSERT(d->cpu_irq);
107    }
108    void vr41xx_vrip_interrupt_deassert(struct interrupt *interrupt)
109    {
110            struct vr41xx_data *d = interrupt->extra;
111            int line = interrupt->line;
112            if (line < 16)
113                    d->sysint1 &= ~(1 << line);
114            else
115                    d->sysint2 &= ~(1 << (line-16));
116            if (!(d->sysint1 & d->msysint1) && !(d->sysint2 & d->msysint2))
117                    INTERRUPT_DEASSERT(d->cpu_irq);
118    }
119    
120    
121    /*
122     *  vr41xx_giu_interrupt_assert():
123     *  vr41xx_giu_interrupt_deassert():
124     */
125    void vr41xx_giu_interrupt_assert(struct interrupt *interrupt)
126    {
127            struct vr41xx_data *d = interrupt->extra;
128            int line = interrupt->line;
129            d->giuint |= (1 << line);
130            if (d->giuint & d->giumask)
131                    INTERRUPT_ASSERT(d->giu_irq);
132    }
133    void vr41xx_giu_interrupt_deassert(struct interrupt *interrupt)
134    {
135            struct vr41xx_data *d = interrupt->extra;
136            int line = interrupt->line;
137            d->giuint &= ~(1 << line);
138            if (!(d->giuint & d->giumask))
139                    INTERRUPT_DEASSERT(d->giu_irq);
140    }
141    
142    
143    static void recalc_kiu_int_assert(struct cpu *cpu, struct vr41xx_data *d)
144    {
145            if (d->kiu_int_assert != d->old_kiu_int_assert) {
146                    d->old_kiu_int_assert = d->kiu_int_assert;
147                    if (d->kiu_int_assert != 0)
148                            INTERRUPT_ASSERT(d->kiu_irq);
149                    else
150                            INTERRUPT_DEASSERT(d->kiu_irq);
151            }
152  }  }
153    
154    
# Line 73  static void vr41xx_keytick(struct cpu *c Line 162  static void vr41xx_keytick(struct cpu *c
162          /*          /*
163           *  Keyboard input:           *  Keyboard input:
164           *           *
165           *  Hardcoded for MobilePro 780. (See NetBSD's hpckbdkeymap.h for           *  Hardcoded for MobilePro. (See NetBSD's hpckbdkeymap.h for
166           *  info on other keyboard layouts. mobilepro780_keytrans is the           *  info on other keyboard layouts. mobilepro780_keytrans is the
167           *  one used here.)           *  one used here.)
168           *           *
169           *  TODO: Make this work with "any" keyboard layout.           *  TODO: Make this work with "any" keyboard layout.
170           *           *
          *  (Even MobilePro 770 seems to be different? Hm. TODO)  
          *  
171           *  ofs 0:           *  ofs 0:
172           *      8000='o' 4000='.' 2000=DOWN  1000=UP           *      8000='o' 4000='.' 2000=DOWN  1000=UP
173           *       800=';'  400='''  200='['    100=?           *       800=';'  400='''  200='['    100=?
# Line 147  static void vr41xx_keytick(struct cpu *c Line 234  static void vr41xx_keytick(struct cpu *c
234                                          d->escape_state = 2;                                          d->escape_state = 2;
235                                  break;                                  break;
236                          case 2: /*  cursor keys etc:  */                          case 2: /*  cursor keys etc:  */
237                                  switch (ch) {                                  /*  Ugly hack for Mobilepro770:  */
238                                  case 'A':       d->d0 = 0x1000; break;                                  if (cpu->machine->machine_subtype ==
239                                  case 'B':       d->d0 = 0x2000; break;                                      MACHINE_HPCMIPS_NEC_MOBILEPRO_770) {
240                                  case 'C':       d->d0 = 0x20; break;                                          switch (ch) {
241                                  case 'D':       d->d0 = 0x10; break;                                          case 'A': d->d0 = 0x2000; break;
242                                  default:        fatal("[ vr41xx kiu: "                                          case 'B': d->d0 = 0x20; break;
243                                      "unimplemented escape 0x%02 ]\n", ch);                                          case 'C': d->d0 = 0x1000; break;
244                                            case 'D': d->d0 = 0x10; break;
245                                            default:  fatal("[ vr41xx kiu: unimpl"
246                                                "emented escape 0x%02 ]\n", ch);
247                                            }
248                                    } else {
249                                            switch (ch) {
250                                            case 'A': d->d0 = 0x1000; break;
251                                            case 'B': d->d0 = 0x2000; break;
252                                            case 'C': d->d0 = 0x20; break;
253                                            case 'D': d->d0 = 0x10; break;
254                                            default:  fatal("[ vr41xx kiu: unimpl"
255                                                "emented escape 0x%02 ]\n", ch);
256                                            }
257                                  }                                  }
258                                  d->escape_state = 0;                                  d->escape_state = 0;
259                          }                          }
# Line 290  static void vr41xx_keytick(struct cpu *c Line 390  static void vr41xx_keytick(struct cpu *c
390    
391    
392  /*  /*
393   *  dev_vr41xx_tick():   *  timer_tick():
394   */   */
395  void dev_vr41xx_tick(struct cpu *cpu, void *extra)  static void timer_tick(struct timer *timer, void *extra)
396  {  {
397          struct vr41xx_data *d = extra;          struct vr41xx_data *d = extra;
398            d->pending_timer_interrupts ++;
399    }
400    
         /*  
          *  UGLY! TODO: fix this.  
          *  
          *  Interrupts should be triggered if the corresponding unit (for  
          *  example the RTC unit) is activated.  
          */  
         {  
                 static unsigned int x = 0;  
                 x++;  
   
                 if (x > 100 && (x&3)==0) {  
                         if (d->cpumodel == 4121 || d->cpumodel == 4181)  
                                 cpu_interrupt(cpu, 3);  
                         else  
                                 cpu_interrupt(cpu, 8 + VRIP_INTR_ETIMER);  
                 }  
         }  
401    
402          if (cpu->machine->use_x11)  DEVICE_TICK(vr41xx)
403    {
404            struct vr41xx_data *d = extra;
405    
406            if (d->pending_timer_interrupts > 0)
407                    INTERRUPT_ASSERT(d->timer_irq);
408    
409            if (cpu->machine->x11_md.in_use)
410                  vr41xx_keytick(cpu, d);                  vr41xx_keytick(cpu, d);
411  }  }
412    
# Line 376  static uint64_t vr41xx_kiu(struct cpu *c Line 468  static uint64_t vr41xx_kiu(struct cpu *c
468          default:          default:
469                  if (writeflag == MEM_WRITE)                  if (writeflag == MEM_WRITE)
470                          debug("[ vr41xx KIU: unimplemented write to offset "                          debug("[ vr41xx KIU: unimplemented write to offset "
471                              "0x%x, data=0x%016llx ]\n", ofs, (long long)idata);                              "0x%x, data=0x%016"PRIx64" ]\n", ofs,
472                                (uint64_t) idata);
473                  else                  else
474                          debug("[ vr41xx KIU: unimplemented read from offset "                          debug("[ vr41xx KIU: unimplemented read from offset "
475                              "0x%x ]\n", ofs);                              "0x%x ]\n", ofs);
# Line 386  static uint64_t vr41xx_kiu(struct cpu *c Line 479  static uint64_t vr41xx_kiu(struct cpu *c
479  }  }
480    
481    
482  /*  DEVICE_ACCESS(vr41xx)
  *  dev_vr41xx_access():  
  */  
 int dev_vr41xx_access(struct cpu *cpu, struct memory *mem,  
         uint64_t relative_addr, unsigned char *data, size_t len,  
         int writeflag, void *extra)  
483  {  {
484          struct vr41xx_data *d = (struct vr41xx_data *) extra;          struct vr41xx_data *d = extra;
485          uint64_t idata = 0, odata = 0;          uint64_t idata = 0, odata = 0;
486          int regnr;          int regnr;
487          int revision = 0;          int revision = 0;
488    
489          idata = memory_readmax64(cpu, data, len);          if (writeflag == MEM_WRITE)
490                    idata = memory_readmax64(cpu, data, len);
491    
492          regnr = relative_addr / sizeof(uint64_t);          regnr = relative_addr / sizeof(uint64_t);
493    
494          /*  KIU ("Keyboard Interface Unit") is handled separately.  */          /*  KIU ("Keyboard Interface Unit") is handled separately.  */
# Line 412  int dev_vr41xx_access(struct cpu *cpu, s Line 502  int dev_vr41xx_access(struct cpu *cpu, s
502          /*  TODO: Maybe these should be handled separately as well?  */          /*  TODO: Maybe these should be handled separately as well?  */
503    
504          switch (relative_addr) {          switch (relative_addr) {
505    
506          /*  BCU:  0x00 .. 0x1c  */          /*  BCU:  0x00 .. 0x1c  */
507          case BCUREVID_REG_W:    /*  0x010  */          case BCUREVID_REG_W:    /*  0x010  */
508          case BCU81REVID_REG_W:  /*  0x014  */          case BCU81REVID_REG_W:  /*  0x014  */
# Line 488  int dev_vr41xx_access(struct cpu *cpu, s Line 579  int dev_vr41xx_access(struct cpu *cpu, s
579                          d->msysint2 = idata;                          d->msysint2 = idata;
580                  break;                  break;
581    
582          /*  PMU:  0xc0 .. 0xfc  */          /*  RTC:  */
583          /*  RTC:  0x100 .. ?  */          case 0xc0:
584            case 0xc2:
585            case 0xc4:
586                    {
587                            struct timeval tv;
588                            gettimeofday(&tv, NULL);
589                            /*  Adjust time by 120 years and 29 days.  */
590                            tv.tv_sec += (int64_t) (120*365 + 29) * 24*60*60;
591    
592                            switch (relative_addr) {
593                            case 0xc0:
594                                    odata = (tv.tv_sec & 1) << 15;
595                                    break;
596                            case 0xc2:
597                                    odata = (tv.tv_sec >> 1) & 0xffff;
598                                    break;
599                            case 0xc4:
600                                    odata = (tv.tv_sec >> 17) & 0xffff;
601                                    break;
602                            }
603                    }
604                    break;
605    
606            case 0xd0:      /*  RTCL1_L_REG_W  */
607                    if (writeflag == MEM_WRITE && idata != 0) {
608                            int hz = RTCL1_L_HZ / idata;
609                            debug("[ vr41xx: rtc interrupts at %i Hz ]\n", hz);
610                            if (d->timer == NULL)
611                                    d->timer = timer_add(hz, timer_tick, d);
612                            else
613                                    timer_update_frequency(d->timer, hz);
614                    }
615                    break;
616            case 0xd2:      /*  RTCL1_H_REG_W  */
617                    break;
618    
619          case 0x108:          case 0x108:
620                  if (writeflag == MEM_READ)                  if (writeflag == MEM_READ)
# Line 503  int dev_vr41xx_access(struct cpu *cpu, s Line 628  int dev_vr41xx_access(struct cpu *cpu, s
628          */          */
629    
630          case 0x13e:     /*  on 4181?  */          case 0x13e:     /*  on 4181?  */
                 /*  RTC interrupt register...  */  
                 /*  Ack. timer interrupts?  */  
                 cpu_interrupt_ack(cpu, 8 + VRIP_INTR_ETIMER);  
                 break;  
   
631          case 0x1de:     /*  on 4121?  */          case 0x1de:     /*  on 4121?  */
632                  /*  RTC interrupt register...  */                  /*  RTC interrupt register...  */
633                  /*  Ack. timer interrupts?  */                  /*  Ack. timer interrupts?  */
634                  cpu_interrupt_ack(cpu, 3);                  INTERRUPT_DEASSERT(d->timer_irq);
635                    if (d->pending_timer_interrupts > 0)
636                            d->pending_timer_interrupts --;
637                  break;                  break;
638    
639          default:          default:
640                  if (writeflag == MEM_WRITE)                  if (writeflag == MEM_WRITE)
641                          debug("[ vr41xx: unimplemented write to address "                          debug("[ vr41xx: unimplemented write to address "
642                              "0x%llx, data=0x%016llx ]\n",                              "0x%"PRIx64", data=0x%016"PRIx64" ]\n",
643                              (long long)relative_addr, (long long)idata);                              (uint64_t) relative_addr, (uint64_t) idata);
644                  else                  else
645                          debug("[ vr41xx: unimplemented read from address "                          debug("[ vr41xx: unimplemented read from address "
646                              "0x%llx ]\n", (long long)relative_addr);                              "0x%"PRIx64" ]\n", (uint64_t) relative_addr);
647          }          }
648    
649  ret:  ret:
650          /*  Recalculate interrupt assertions:  */          /*
651          cpu_interrupt_ack(cpu, 8 + 31);         /*  TODO: hopefully nothing           *  Recalculate interrupt assertions:
652                                                  useful at irq 15 in           */
653                                                  sysint2  */          if (d->giuint & d->giumask)
654                    INTERRUPT_ASSERT(d->giu_irq);
655            else
656                    INTERRUPT_DEASSERT(d->giu_irq);
657            if ((d->sysint1 & d->msysint1) | (d->sysint2 & d->msysint2))
658                    INTERRUPT_ASSERT(d->cpu_irq);
659            else
660                    INTERRUPT_DEASSERT(d->cpu_irq);
661    
662          if (writeflag == MEM_READ)          if (writeflag == MEM_READ)
663                  memory_writemax64(cpu, data, len, odata);                  memory_writemax64(cpu, data, len, odata);
# Line 539  ret: Line 668  ret:
668    
669  /*  /*
670   *  dev_vr41xx_init():   *  dev_vr41xx_init():
671     *
672     *  machine->path is something like "machine[0]".
673   */   */
674  struct vr41xx_data *dev_vr41xx_init(struct machine *machine,  struct vr41xx_data *dev_vr41xx_init(struct machine *machine,
675          struct memory *mem, int cpumodel)          struct memory *mem, int cpumodel)
676  {  {
677            struct vr41xx_data *d;
678          uint64_t baseaddr = 0;          uint64_t baseaddr = 0;
679          char tmps[100];          char tmps[300];
680          struct vr41xx_data *d = malloc(sizeof(struct vr41xx_data));          int i;
681    
682          if (d == NULL) {          CHECK_ALLOCATION(d = malloc(sizeof(struct vr41xx_data)));
                 fprintf(stderr, "out of memory\n");  
                 exit(1);  
         }  
683          memset(d, 0, sizeof(struct vr41xx_data));          memset(d, 0, sizeof(struct vr41xx_data));
684    
685            /*  Connect to MIPS irq 2:  */
686            snprintf(tmps, sizeof(tmps), "%s.cpu[%i].2",
687                machine->path, machine->bootstrap_cpu);
688            INTERRUPT_CONNECT(tmps, d->cpu_irq);
689    
690            /*
691             *  Register VRIP interrupt lines 0..25:
692             */
693            for (i=0; i<=25; i++) {
694                    struct interrupt template;
695                    snprintf(tmps, sizeof(tmps), "%s.cpu[%i].vrip.%i",
696                        machine->path, machine->bootstrap_cpu, i);
697                    memset(&template, 0, sizeof(template));
698                    template.line = i;
699                    template.name = tmps;
700                    template.extra = d;
701                    template.interrupt_assert = vr41xx_vrip_interrupt_assert;
702                    template.interrupt_deassert = vr41xx_vrip_interrupt_deassert;
703                    interrupt_handler_register(&template);
704            }
705    
706            /*
707             *  Register GIU interrupt lines 0..31:
708             */
709            for (i=0; i<32; i++) {
710                    struct interrupt template;
711                    snprintf(tmps, sizeof(tmps), "%s.cpu[%i].vrip.%i.giu.%i",
712                        machine->path, machine->bootstrap_cpu, VRIP_INTR_GIU, i);
713                    memset(&template, 0, sizeof(template));
714                    template.line = i;
715                    template.name = tmps;
716                    template.extra = d;
717                    template.interrupt_assert = vr41xx_giu_interrupt_assert;
718                    template.interrupt_deassert = vr41xx_giu_interrupt_deassert;
719                    interrupt_handler_register(&template);
720            }
721    
722          d->cpumodel = cpumodel;          d->cpumodel = cpumodel;
723    
724          /*  TODO: VRC4173 has the KIU at offset 0x100?  */          /*  TODO: VRC4173 has the KIU at offset 0x100?  */
725          d->kiu_offset = 0x180;          d->kiu_offset = 0x180;
726          d->kiu_console_handle = console_start_slave_inputonly(machine, "kiu");          d->kiu_console_handle = console_start_slave_inputonly(
727          d->kiu_irq_nr = VRIP_INTR_KIU;              machine, "kiu", 1);
728    
729            /*  Connect to the KIU and GIU interrupts:  */
730            snprintf(tmps, sizeof(tmps), "%s.cpu[%i].vrip.%i",
731                machine->path, machine->bootstrap_cpu, VRIP_INTR_GIU);
732            INTERRUPT_CONNECT(tmps, d->giu_irq);
733            snprintf(tmps, sizeof(tmps), "%s.cpu[%i].vrip.%i",
734                machine->path, machine->bootstrap_cpu, VRIP_INTR_KIU);
735            INTERRUPT_CONNECT(tmps, d->kiu_irq);
736    
737            if (machine->x11_md.in_use)
738                    machine->main_console_handle = d->kiu_console_handle;  
739    
740          switch (cpumodel) {          switch (cpumodel) {
741          case 4101:          case 4101:
# Line 569  struct vr41xx_data *dev_vr41xx_init(stru Line 746  struct vr41xx_data *dev_vr41xx_init(stru
746                  break;                  break;
747          case 4181:          case 4181:
748                  baseaddr = 0xa000000;                  baseaddr = 0xa000000;
749                  dev_ram_init(mem, 0xb000000, 0x1000000, DEV_RAM_MIRROR,                  dev_ram_init(machine, 0xb000000, 0x1000000, DEV_RAM_MIRROR,
750                      0xa000000);                      0xa000000);
751                  break;                  break;
752          case 4122:          case 4122:
# Line 581  struct vr41xx_data *dev_vr41xx_init(stru Line 758  struct vr41xx_data *dev_vr41xx_init(stru
758                  exit(1);                  exit(1);
759          }          }
760    
761            if (d->cpumodel == 4121 || d->cpumodel == 4181)
762                    snprintf(tmps, sizeof(tmps), "%s.cpu[%i].3",
763                        machine->path, machine->bootstrap_cpu);
764            else
765                    snprintf(tmps, sizeof(tmps), "%s.cpu[%i].vrip.%i",
766                        machine->path, machine->bootstrap_cpu, VRIP_INTR_ETIMER);
767            INTERRUPT_CONNECT(tmps, d->timer_irq);
768    
769          memory_device_register(mem, "vr41xx", baseaddr, DEV_VR41XX_LENGTH,          memory_device_register(mem, "vr41xx", baseaddr, DEV_VR41XX_LENGTH,
770              dev_vr41xx_access, (void *)d, MEM_DEFAULT, NULL);              dev_vr41xx_access, (void *)d, DM_DEFAULT, NULL);
771    
772          /*          /*
773           *  TODO: Find out which controllers are at which addresses on           *  TODO: Find out which controllers are at which addresses on
774           *  which chips.           *  which chips.
775           */           */
776          if (cpumodel == 4131) {          if (cpumodel == 4131) {
777                  snprintf(tmps, sizeof(tmps), "ns16550 irq=%i addr=0x%llx "                  snprintf(tmps, sizeof(tmps), "ns16550 irq=%s.cpu[%i].vrip.%i "
778                      "name2=siu", 8+VRIP_INTR_SIU, (long long)(baseaddr+0x800));                      "addr=0x%"PRIx64" name2=siu", machine->path,
779                        machine->bootstrap_cpu, VRIP_INTR_SIU,
780                        (uint64_t) (baseaddr+0x800));
781                  device_add(machine, tmps);                  device_add(machine, tmps);
782          } else {          } else {
783                  /*  This is used by Linux and NetBSD:  */                  /*  This is used by Linux and NetBSD:  */
784                  snprintf(tmps, sizeof(tmps), "ns16550 irq=%i addr=0x%x "                  snprintf(tmps, sizeof(tmps), "ns16550 irq=%s.cpu[%i]."
785                      "name2=serial", 8+VRIP_INTR_SIU, 0xc000000);                      "vrip.%i addr=0x%x name2=serial", machine->path,
786                        machine->bootstrap_cpu, VRIP_INTR_SIU, 0xc000000);
787                  device_add(machine, tmps);                  device_add(machine, tmps);
788          }          }
789    
790          /*  Hm... maybe this should not be here.  TODO  */          /*  Hm... maybe this should not be here.  TODO  */
791          device_add(machine, "pcic addr=0x140003e0");          snprintf(tmps, sizeof(tmps), "pcic irq=%s.cpu[%i].vrip.%i addr="
792                "0x140003e0", machine->path, machine->bootstrap_cpu,
793                VRIP_INTR_GIU);
794            device_add(machine, tmps);
795    
796          machine_add_tickfunction(machine, dev_vr41xx_tick, d,          machine_add_tickfunction(machine, dev_vr41xx_tick, d,
797              DEV_VR41XX_TICKSHIFT);              DEV_VR41XX_TICKSHIFT);
798    
799          /*  Some machines (?) use ISA space at 0x15000000 instead of          /*  Some machines (?) use ISA space at 0x15000000 instead of
800              0x14000000, eg IBM WorkPad Z50.  */              0x14000000, eg IBM WorkPad Z50.  */
801          dev_ram_init(mem, 0x15000000, 0x1000000, DEV_RAM_MIRROR, 0x14000000);          dev_ram_init(machine, 0x15000000, 0x1000000, DEV_RAM_MIRROR,
802                0x14000000);
803    
804          return d;          return d;
805  }  }

Legend:
Removed from v.12  
changed lines
  Added in v.44

  ViewVC Help
Powered by ViewVC 1.1.26