Diff for /qemu/hw/omap_uart.c between versions 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2018/04/24 18:38:55 version 1.1.1.3, 2018/04/24 19:28:41
Line 22 Line 22
 #include "omap.h"  #include "omap.h"
 /* We use pc-style serial ports.  */  /* We use pc-style serial ports.  */
 #include "pc.h"  #include "pc.h"
   #include "exec-memory.h"
   
 /* UARTs */  /* UARTs */
 struct omap_uart_s {  struct omap_uart_s {
Line 55  struct omap_uart_s *omap_uart_init(targe Line 56  struct omap_uart_s *omap_uart_init(targe
                 const char *label, CharDriverState *chr)                  const char *label, CharDriverState *chr)
 {  {
     struct omap_uart_s *s = (struct omap_uart_s *)      struct omap_uart_s *s = (struct omap_uart_s *)
             qemu_mallocz(sizeof(struct omap_uart_s));              g_malloc0(sizeof(struct omap_uart_s));
   
     s->base = base;      s->base = base;
     s->fclk = fclk;      s->fclk = fclk;
     s->irq = irq;      s->irq = irq;
 #ifdef TARGET_WORDS_BIGENDIAN      s->serial = serial_mm_init(get_system_memory(), base, 2, irq,
     s->serial = serial_mm_init(base, 2, irq, omap_clk_getrate(fclk)/16,                                 omap_clk_getrate(fclk)/16,
                                chr ?: qemu_chr_open(label, "null", NULL), 1,                                 chr ?: qemu_chr_new(label, "null", NULL),
                                1);                                 DEVICE_NATIVE_ENDIAN);
 #else  
     s->serial = serial_mm_init(base, 2, irq, omap_clk_getrate(fclk)/16,  
                                chr ?: qemu_chr_open(label, "null", NULL), 1,  
                                0);  
 #endif  
     return s;      return s;
 }  }
   
Line 182  struct omap_uart_s *omap2_uart_init(stru Line 178  struct omap_uart_s *omap2_uart_init(stru
 void omap_uart_attach(struct omap_uart_s *s, CharDriverState *chr)  void omap_uart_attach(struct omap_uart_s *s, CharDriverState *chr)
 {  {
     /* TODO: Should reuse or destroy current s->serial */      /* TODO: Should reuse or destroy current s->serial */
 #ifdef TARGET_WORDS_BIGENDIAN      s->serial = serial_mm_init(get_system_memory(), s->base, 2, s->irq,
     s->serial = serial_mm_init(s->base, 2, s->irq,  
                                omap_clk_getrate(s->fclk) / 16,                                 omap_clk_getrate(s->fclk) / 16,
                                chr ?: qemu_chr_open("null", "null", NULL), 1,                                 chr ?: qemu_chr_new("null", "null", NULL),
                                1);                                 DEVICE_NATIVE_ENDIAN);
 #else  
     s->serial = serial_mm_init(s->base, 2, s->irq,  
                                omap_clk_getrate(s->fclk) / 16,  
                                chr ?: qemu_chr_open("null", "null", NULL), 1,  
                                0);  
 #endif  
 }  }

Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3


unix.superglobalmegacorp.com