Diff for /qemu/hw/parallel.c between versions 1.1.1.10 and 1.1.1.11

version 1.1.1.10, 2018/04/24 19:27:52 version 1.1.1.11, 2018/04/24 19:47:37
Line 65 Line 65
 #define PARA_CTR_SIGNAL (PARA_CTR_SELECT|PARA_CTR_INIT|PARA_CTR_AUTOLF|PARA_CTR_STROBE)  #define PARA_CTR_SIGNAL (PARA_CTR_SELECT|PARA_CTR_INIT|PARA_CTR_AUTOLF|PARA_CTR_STROBE)
   
 typedef struct ParallelState {  typedef struct ParallelState {
       MemoryRegion iomem;
     uint8_t dataw;      uint8_t dataw;
     uint8_t datar;      uint8_t datar;
     uint8_t status;      uint8_t status;
Line 555  static void parallel_mm_writel (void *op Line 556  static void parallel_mm_writel (void *op
     parallel_ioport_write_sw(s, addr >> s->it_shift, value);      parallel_ioport_write_sw(s, addr >> s->it_shift, value);
 }  }
   
 static CPUReadMemoryFunc * const parallel_mm_read_sw[] = {  static const MemoryRegionOps parallel_mm_ops = {
     &parallel_mm_readb,      .old_mmio = {
     &parallel_mm_readw,          .read = { parallel_mm_readb, parallel_mm_readw, parallel_mm_readl },
     &parallel_mm_readl,          .write = { parallel_mm_writeb, parallel_mm_writew, parallel_mm_writel },
 };      },
       .endianness = DEVICE_NATIVE_ENDIAN,
 static CPUWriteMemoryFunc * const parallel_mm_write_sw[] = {  
     &parallel_mm_writeb,  
     &parallel_mm_writew,  
     &parallel_mm_writel,  
 };  };
   
 /* If fd is zero, it means that the parallel device uses the console */  /* If fd is zero, it means that the parallel device uses the console */
 bool parallel_mm_init(target_phys_addr_t base, int it_shift, qemu_irq irq,  bool parallel_mm_init(MemoryRegion *address_space,
                         target_phys_addr_t base, int it_shift, qemu_irq irq,
                       CharDriverState *chr)                        CharDriverState *chr)
 {  {
     ParallelState *s;      ParallelState *s;
     int io_sw;  
   
     s = g_malloc0(sizeof(ParallelState));      s = g_malloc0(sizeof(ParallelState));
     s->irq = irq;      s->irq = irq;
Line 580  bool parallel_mm_init(target_phys_addr_t Line 577  bool parallel_mm_init(target_phys_addr_t
     s->it_shift = it_shift;      s->it_shift = it_shift;
     qemu_register_reset(parallel_reset, s);      qemu_register_reset(parallel_reset, s);
   
     io_sw = cpu_register_io_memory(parallel_mm_read_sw, parallel_mm_write_sw,      memory_region_init_io(&s->iomem, &parallel_mm_ops, s,
                                    s, DEVICE_NATIVE_ENDIAN);                            "parallel", 8 << it_shift);
     cpu_register_physical_memory(base, 8 << it_shift, io_sw);      memory_region_add_subregion(address_space, base, &s->iomem);
     return true;      return true;
 }  }
   
 static ISADeviceInfo parallel_isa_info = {  static Property parallel_isa_properties[] = {
     .qdev.name  = "isa-parallel",      DEFINE_PROP_UINT32("index", ISAParallelState, index,   -1),
     .qdev.size  = sizeof(ISAParallelState),      DEFINE_PROP_HEX32("iobase", ISAParallelState, iobase,  -1),
     .init       = parallel_isa_initfn,      DEFINE_PROP_UINT32("irq",   ISAParallelState, isairq,  7),
     .qdev.props = (Property[]) {      DEFINE_PROP_CHR("chardev",  ISAParallelState, state.chr),
         DEFINE_PROP_UINT32("index", ISAParallelState, index,   -1),      DEFINE_PROP_END_OF_LIST(),
         DEFINE_PROP_HEX32("iobase", ISAParallelState, iobase,  -1),  };
         DEFINE_PROP_UINT32("irq",   ISAParallelState, isairq,  7),  
         DEFINE_PROP_CHR("chardev",  ISAParallelState, state.chr),  static void parallel_isa_class_initfn(ObjectClass *klass, void *data)
         DEFINE_PROP_END_OF_LIST(),  {
     },      DeviceClass *dc = DEVICE_CLASS(klass);
       ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
       ic->init = parallel_isa_initfn;
       dc->props = parallel_isa_properties;
   }
   
   static TypeInfo parallel_isa_info = {
       .name          = "isa-parallel",
       .parent        = TYPE_ISA_DEVICE,
       .instance_size = sizeof(ISAParallelState),
       .class_init    = parallel_isa_class_initfn,
 };  };
   
 static void parallel_register_devices(void)  static void parallel_register_types(void)
 {  {
     isa_qdev_register(&parallel_isa_info);      type_register_static(&parallel_isa_info);
 }  }
   
 device_init(parallel_register_devices)  type_init(parallel_register_types)

Removed from v.1.1.1.10  
changed lines
  Added in v.1.1.1.11


unix.superglobalmegacorp.com