Diff for /qemu/hw/nseries.c between versions 1.1.1.7 and 1.1.1.8

version 1.1.1.7, 2018/04/24 19:27:16 version 1.1.1.8, 2018/04/24 19:47:02
Line 33 Line 33
 #include "loader.h"  #include "loader.h"
 #include "blockdev.h"  #include "blockdev.h"
 #include "sysbus.h"  #include "sysbus.h"
   #include "exec-memory.h"
   
 /* Nokia N8x0 support */  /* Nokia N8x0 support */
 struct n800_s {  struct n800_s {
Line 44  struct n800_s { Line 45  struct n800_s {
         uint32_t (*txrx)(void *opaque, uint32_t value, int len);          uint32_t (*txrx)(void *opaque, uint32_t value, int len);
         uWireSlave *chip;          uWireSlave *chip;
     } ts;      } ts;
     i2c_bus *i2c;  
   
     int keymap[0x80];      int keymap[0x80];
     DeviceState *kbd;      DeviceState *kbd;
Line 193  static void n8x0_i2c_setup(struct n800_s Line 193  static void n8x0_i2c_setup(struct n800_s
 {  {
     DeviceState *dev;      DeviceState *dev;
     qemu_irq tmp_irq = qdev_get_gpio_in(s->cpu->gpio, N8X0_TMP105_GPIO);      qemu_irq tmp_irq = qdev_get_gpio_in(s->cpu->gpio, N8X0_TMP105_GPIO);
       i2c_bus *i2c = omap_i2c_bus(s->cpu->i2c[0]);
     /* Attach the CPU on one end of our I2C bus.  */  
     s->i2c = omap_i2c_bus(s->cpu->i2c[0]);  
   
     /* Attach a menelaus PM chip */      /* Attach a menelaus PM chip */
     dev = i2c_create_slave(s->i2c, "twl92230", N8X0_MENELAUS_ADDR);      dev = i2c_create_slave(i2c, "twl92230", N8X0_MENELAUS_ADDR);
     qdev_connect_gpio_out(dev, 3,      qdev_connect_gpio_out(dev, 3,
                           qdev_get_gpio_in(s->cpu->ih[0],                            qdev_get_gpio_in(s->cpu->ih[0],
                                            OMAP_INT_24XX_SYS_NIRQ));                                             OMAP_INT_24XX_SYS_NIRQ));
   
       qemu_system_powerdown = qdev_get_gpio_in(dev, 3);
   
     /* Attach a TMP105 PM chip (A0 wired to ground) */      /* Attach a TMP105 PM chip (A0 wired to ground) */
     dev = i2c_create_slave(s->i2c, "tmp105", N8X0_TMP105_ADDR);      dev = i2c_create_slave(i2c, "tmp105", N8X0_TMP105_ADDR);
     qdev_connect_gpio_out(dev, 0, tmp_irq);      qdev_connect_gpio_out(dev, 0, tmp_irq);
 }  }
   
Line 388  static void n810_kbd_setup(struct n800_s Line 388  static void n810_kbd_setup(struct n800_s
   
     /* Attach the LM8322 keyboard to the I2C bus,      /* Attach the LM8322 keyboard to the I2C bus,
      * should happen in n8x0_i2c_setup and s->kbd be initialised here.  */       * should happen in n8x0_i2c_setup and s->kbd be initialised here.  */
     s->kbd = i2c_create_slave(s->i2c, "lm8323", N810_LM8323_ADDR);      s->kbd = i2c_create_slave(omap_i2c_bus(s->cpu->i2c[0]),
                              "lm8323", N810_LM8323_ADDR);
     qdev_connect_gpio_out(s->kbd, 0, kbd_irq);      qdev_connect_gpio_out(s->kbd, 0, kbd_irq);
 }  }
   
Line 1275  static void n8x0_init(ram_addr_t ram_siz Line 1276  static void n8x0_init(ram_addr_t ram_siz
                 const char *kernel_cmdline, const char *initrd_filename,                  const char *kernel_cmdline, const char *initrd_filename,
                 const char *cpu_model, struct arm_boot_info *binfo, int model)                  const char *cpu_model, struct arm_boot_info *binfo, int model)
 {  {
       MemoryRegion *sysmem = get_system_memory();
     struct n800_s *s = (struct n800_s *) g_malloc0(sizeof(*s));      struct n800_s *s = (struct n800_s *) g_malloc0(sizeof(*s));
     int sdram_size = binfo->ram_size;      int sdram_size = binfo->ram_size;
     DisplayState *ds;      DisplayState *ds;
   
     s->cpu = omap2420_mpu_init(sdram_size, cpu_model);      s->cpu = omap2420_mpu_init(sysmem, sdram_size, cpu_model);
   
     /* Setup peripherals      /* Setup peripherals
      *       *

Removed from v.1.1.1.7  
changed lines
  Added in v.1.1.1.8


unix.superglobalmegacorp.com