Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/amarkovic/tags/mips-queue-dec-1…
Browse files Browse the repository at this point in the history
…6-2019' into staging

MIPS queue for December 16th, 2019

# gpg: Signature made Mon 16 Dec 2019 12:29:24 GMT
# gpg:                using RSA key D4972A8967F75A65
# gpg: Good signature from "Aleksandar Markovic <amarkovic@wavecomp.com>" [full]
# Primary key fingerprint: 8526 FBF1 5DA3 811F 4A01  DD75 D497 2A89 67F7 5A65

* remotes/amarkovic/tags/mips-queue-dec-16-2019:
  MAINTAINERS: Add a file to MIPS section
  MAINTAINERS: Add three files to Malta section
  MAINTAINERS: Adjust maintainership for Malta board
  MAINTAINERS: Adjust maintainership for Fulong 2E board
  MAINTAINERS: Add a section on UI translation
  hw/mips: Deprecate the r4k machine
  mips: fulong 2e: Renovate coding style
  mips: r4000: Renovate coding style
  mips: mipssim: Renovate coding style
  mips: malta: Renovate coding style
  mips: jazz: Renovate coding style

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
pm215 committed Dec 16, 2019
2 parents 856ffa6 + 5d480dd commit cb88904
Show file tree
Hide file tree
Showing 11 changed files with 300 additions and 248 deletions.
17 changes: 13 additions & 4 deletions MAINTAINERS
Expand Up @@ -221,6 +221,7 @@ F: include/hw/intc/mips_gic.h
F: include/hw/mips/
F: include/hw/misc/mips_*
F: include/hw/timer/mips_gictimer.h
F: tests/acceptance/linux_ssh_mips_malta.py
F: tests/tcg/mips/
K: ^Subject:.*(?i)mips

Expand Down Expand Up @@ -955,11 +956,15 @@ F: hw/display/jazz_led.c
F: hw/dma/rc4030.c

Malta
M: Aurelien Jarno <aurelien@aurel32.net>
R: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>
M: Aleksandar Markovic <amarkovic@wavecomp.com>
M: Philippe Mathieu-Daudé <f4bug@amsat.org>
R: Aurelien Jarno <aurelien@aurel32.net>
S: Maintained
F: hw/isa/piix4.c
F: hw/acpi/piix4.c
F: hw/mips/mips_malta.c
F: hw/mips/gt64xxx_pci.c
F: include/hw/southbridge/piix.h
F: tests/acceptance/linux_ssh_mips_malta.py

Mipssim
Expand All @@ -972,12 +977,12 @@ F: hw/net/mipsnet.c
R4000
M: Aurelien Jarno <aurelien@aurel32.net>
R: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>
S: Maintained
S: Obsolete
F: hw/mips/mips_r4k.c

Fulong 2E
M: Philippe Mathieu-Daudé <f4bug@amsat.org>
M: Aleksandar Markovic <amarkovic@wavecomp.com>
R: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>
S: Odd Fixes
F: hw/mips/mips_fulong2e.c
F: hw/isa/vt82c686.c
Expand Down Expand Up @@ -2715,6 +2720,10 @@ M: Daniel P. Berrange <berrange@redhat.com>
S: Odd Fixes
F: scripts/git-submodule.sh

UI translations
M: Aleksandar Markovic <aleksandar.m.mail@gmail.com>
F: po/*.po

Sphinx documentation configuration and build machinery
M: Peter Maydell <peter.maydell@linaro.org>
S: Maintained
Expand Down
123 changes: 62 additions & 61 deletions hw/display/jazz_led.c
Expand Up @@ -90,25 +90,25 @@ static void draw_horizontal_line(DisplaySurface *ds,

bpp = (surface_bits_per_pixel(ds) + 7) >> 3;
d = surface_data(ds) + surface_stride(ds) * posy + bpp * posx1;
switch(bpp) {
case 1:
for (x = posx1; x <= posx2; x++) {
*((uint8_t *)d) = color;
d++;
}
break;
case 2:
for (x = posx1; x <= posx2; x++) {
*((uint16_t *)d) = color;
d += 2;
}
break;
case 4:
for (x = posx1; x <= posx2; x++) {
*((uint32_t *)d) = color;
d += 4;
}
break;
switch (bpp) {
case 1:
for (x = posx1; x <= posx2; x++) {
*((uint8_t *)d) = color;
d++;
}
break;
case 2:
for (x = posx1; x <= posx2; x++) {
*((uint16_t *)d) = color;
d += 2;
}
break;
case 4:
for (x = posx1; x <= posx2; x++) {
*((uint32_t *)d) = color;
d += 4;
}
break;
}
}

Expand All @@ -121,25 +121,25 @@ static void draw_vertical_line(DisplaySurface *ds,

bpp = (surface_bits_per_pixel(ds) + 7) >> 3;
d = surface_data(ds) + surface_stride(ds) * posy1 + bpp * posx;
switch(bpp) {
case 1:
for (y = posy1; y <= posy2; y++) {
*((uint8_t *)d) = color;
d += surface_stride(ds);
}
break;
case 2:
for (y = posy1; y <= posy2; y++) {
*((uint16_t *)d) = color;
d += surface_stride(ds);
}
break;
case 4:
for (y = posy1; y <= posy2; y++) {
*((uint32_t *)d) = color;
d += surface_stride(ds);
}
break;
switch (bpp) {
case 1:
for (y = posy1; y <= posy2; y++) {
*((uint8_t *)d) = color;
d += surface_stride(ds);
}
break;
case 2:
for (y = posy1; y <= posy2; y++) {
*((uint16_t *)d) = color;
d += surface_stride(ds);
}
break;
case 4:
for (y = posy1; y <= posy2; y++) {
*((uint32_t *)d) = color;
d += surface_stride(ds);
}
break;
}
}

Expand All @@ -164,28 +164,28 @@ static void jazz_led_update_display(void *opaque)
if (s->state & REDRAW_SEGMENTS) {
/* set colors according to bpp */
switch (surface_bits_per_pixel(surface)) {
case 8:
color_segment = rgb_to_pixel8(0xaa, 0xaa, 0xaa);
color_led = rgb_to_pixel8(0x00, 0xff, 0x00);
break;
case 15:
color_segment = rgb_to_pixel15(0xaa, 0xaa, 0xaa);
color_led = rgb_to_pixel15(0x00, 0xff, 0x00);
break;
case 16:
color_segment = rgb_to_pixel16(0xaa, 0xaa, 0xaa);
color_led = rgb_to_pixel16(0x00, 0xff, 0x00);
break;
case 24:
color_segment = rgb_to_pixel24(0xaa, 0xaa, 0xaa);
color_led = rgb_to_pixel24(0x00, 0xff, 0x00);
break;
case 32:
color_segment = rgb_to_pixel32(0xaa, 0xaa, 0xaa);
color_led = rgb_to_pixel32(0x00, 0xff, 0x00);
break;
default:
return;
case 8:
color_segment = rgb_to_pixel8(0xaa, 0xaa, 0xaa);
color_led = rgb_to_pixel8(0x00, 0xff, 0x00);
break;
case 15:
color_segment = rgb_to_pixel15(0xaa, 0xaa, 0xaa);
color_led = rgb_to_pixel15(0x00, 0xff, 0x00);
break;
case 16:
color_segment = rgb_to_pixel16(0xaa, 0xaa, 0xaa);
color_led = rgb_to_pixel16(0x00, 0xff, 0x00);
break;
case 24:
color_segment = rgb_to_pixel24(0xaa, 0xaa, 0xaa);
color_led = rgb_to_pixel24(0x00, 0xff, 0x00);
break;
case 32:
color_segment = rgb_to_pixel32(0xaa, 0xaa, 0xaa);
color_led = rgb_to_pixel32(0x00, 0xff, 0x00);
break;
default:
return;
}

/* display segments */
Expand All @@ -205,8 +205,9 @@ static void jazz_led_update_display(void *opaque)
(s->segments & 0x80) ? color_segment : 0);

/* display led */
if (!(s->segments & 0x01))
if (!(s->segments & 0x01)) {
color_led = 0; /* black */
}
draw_horizontal_line(surface, 68, 50, 50, color_led);
draw_horizontal_line(surface, 69, 49, 51, color_led);
draw_horizontal_line(surface, 70, 48, 52, color_led);
Expand Down
12 changes: 7 additions & 5 deletions hw/dma/rc4030.c
Expand Up @@ -397,10 +397,11 @@ static void update_jazz_irq(rc4030State *s)

pending = s->isr_jazz & s->imr_jazz;

if (pending != 0)
if (pending != 0) {
qemu_irq_raise(s->jazz_bus_irq);
else
} else {
qemu_irq_lower(s->jazz_bus_irq);
}
}

static void rc4030_irq_jazz_request(void *opaque, int irq, int level)
Expand Down Expand Up @@ -588,7 +589,8 @@ static const VMStateDescription vmstate_rc4030 = {
}
};

static void rc4030_do_dma(void *opaque, int n, uint8_t *buf, int len, int is_write)
static void rc4030_do_dma(void *opaque, int n, uint8_t *buf,
int len, int is_write)
{
rc4030State *s = opaque;
hwaddr dma_addr;
Expand Down Expand Up @@ -643,8 +645,8 @@ static rc4030_dma *rc4030_allocate_dmas(void *opaque, int n)
struct rc4030DMAState *p;
int i;

s = (rc4030_dma *)g_malloc0(sizeof(rc4030_dma) * n);
p = (struct rc4030DMAState *)g_malloc0(sizeof(struct rc4030DMAState) * n);
s = (rc4030_dma *)g_new0(rc4030_dma, n);
p = (struct rc4030DMAState *)g_new0(struct rc4030DMAState, n);
for (i = 0; i < n; i++) {
p->opaque = opaque;
p->n = i;
Expand Down
23 changes: 12 additions & 11 deletions hw/isa/vt82c686.c
Expand Up @@ -27,16 +27,15 @@
#include "qemu/timer.h"
#include "exec/address-spaces.h"

//#define DEBUG_VT82C686B
/* #define DEBUG_VT82C686B */

#ifdef DEBUG_VT82C686B
#define DPRINTF(fmt, ...) fprintf(stderr, "%s: " fmt, __func__, ##__VA_ARGS__)
#else
#define DPRINTF(fmt, ...)
#endif

typedef struct SuperIOConfig
{
typedef struct SuperIOConfig {
uint8_t config[0x100];
uint8_t index;
uint8_t data;
Expand Down Expand Up @@ -102,7 +101,7 @@ static uint64_t superio_ioport_readb(void *opaque, hwaddr addr, unsigned size)
SuperIOConfig *superio_conf = opaque;

DPRINTF("superio_ioport_readb address 0x%x\n", addr);
return (superio_conf->config[superio_conf->index]);
return superio_conf->config[superio_conf->index];
}

static const MemoryRegionOps superio_ops = {
Expand Down Expand Up @@ -143,7 +142,7 @@ static void vt82c686b_isa_reset(DeviceState *dev)
}

/* write config pci function0 registers. PCI-ISA bridge */
static void vt82c686b_write_config(PCIDevice * d, uint32_t address,
static void vt82c686b_write_config(PCIDevice *d, uint32_t address,
uint32_t val, int len)
{
VT82C686BState *vt686 = VT82C686B_DEVICE(d);
Expand Down Expand Up @@ -365,7 +364,7 @@ static void vt82c686b_pm_realize(PCIDevice *dev, Error **errp)
pci_set_long(pci_conf + 0x48, 0x00000001);

/* SMB ports:0xeee0~0xeeef */
s->smb_io_base =((s->smb_io_base & 0xfff0) + 0x0);
s->smb_io_base = ((s->smb_io_base & 0xfff0) + 0x0);
pci_conf[0x90] = s->smb_io_base | 1;
pci_conf[0x91] = s->smb_io_base >> 8;
pci_conf[0xd2] = 0x90;
Expand Down Expand Up @@ -462,16 +461,18 @@ static void vt82c686b_realize(PCIDevice *d, Error **errp)

wmask = d->wmask;
for (i = 0x00; i < 0xff; i++) {
if (i<=0x03 || (i>=0x08 && i<=0x3f)) {
wmask[i] = 0x00;
}
if (i <= 0x03 || (i >= 0x08 && i <= 0x3f)) {
wmask[i] = 0x00;
}
}

memory_region_init_io(&vt82c->superio, OBJECT(d), &superio_ops,
&vt82c->superio_conf, "superio", 2);
memory_region_set_enabled(&vt82c->superio, false);
/* The floppy also uses 0x3f0 and 0x3f1.
* But we do not emulate a floppy, so just set it here. */
/*
* The floppy also uses 0x3f0 and 0x3f1.
* But we do not emulate a floppy, so just set it here.
*/
memory_region_add_subregion(isa_bus->address_space_io, 0x3f0,
&vt82c->superio);
}
Expand Down

0 comments on commit cb88904

Please sign in to comment.