mips: fulong 2e: Renovate coding style
The script checkpatch.pl located in scripts folder was used to detect all errors and warrnings in files: hw/mips/mips_fulong2e.c hw/isa/vt82c686.c hw/pci-host/bonito.c include/hw/isa/vt82c686.h These mips Fulong 2E machine files were edited and all the errors and warrings generated by the checkpatch.pl script were corrected and then the script was ran again to make sure there are no more errors and warnings. Signed-off-by: Filip Bozuta <Filip.Bozuta@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1575640687-20744-6-git-send-email-Filip.Bozuta@rt-rk.com>
This commit is contained in:
parent
f48eefa202
commit
f3db354ca4
@ -27,7 +27,7 @@
|
||||
#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__)
|
||||
@ -35,8 +35,7 @@
|
||||
#define DPRINTF(fmt, ...)
|
||||
#endif
|
||||
|
||||
typedef struct SuperIOConfig
|
||||
{
|
||||
typedef struct SuperIOConfig {
|
||||
uint8_t config[0x100];
|
||||
uint8_t index;
|
||||
uint8_t data;
|
||||
@ -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 = {
|
||||
@ -470,8 +469,10 @@ static void vt82c686b_realize(PCIDevice *d, Error **errp)
|
||||
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);
|
||||
}
|
||||
|
@ -14,7 +14,8 @@
|
||||
* fulong 2e mini pc has a bonito north bridge.
|
||||
*/
|
||||
|
||||
/* what is the meaning of devfn in qemu and IDSEL in bonito northbridge?
|
||||
/*
|
||||
* what is the meaning of devfn in qemu and IDSEL in bonito northbridge?
|
||||
*
|
||||
* devfn pci_slot<<3 + funno
|
||||
* one pci bus can have 32 devices and each device can have 8 functions.
|
||||
@ -49,7 +50,7 @@
|
||||
#include "sysemu/runstate.h"
|
||||
#include "exec/address-spaces.h"
|
||||
|
||||
//#define DEBUG_BONITO
|
||||
/* #define DEBUG_BONITO */
|
||||
|
||||
#ifdef DEBUG_BONITO
|
||||
#define DPRINTF(fmt, ...) fprintf(stderr, "%s: " fmt, __func__, ##__VA_ARGS__)
|
||||
@ -180,12 +181,12 @@
|
||||
#define PCI_IDSEL_VIA686B (1 << PCI_IDSEL_VIA686B_BIT)
|
||||
|
||||
#define PCI_ADDR(busno , devno , funno , regno) \
|
||||
((((busno)<<16)&0xff0000) + (((devno)<<11)&0xf800) + (((funno)<<8)&0x700) + (regno))
|
||||
((((busno) << 16) & 0xff0000) + (((devno) << 11) & 0xf800) + \
|
||||
(((funno) << 8) & 0x700) + (regno))
|
||||
|
||||
typedef struct BonitoState BonitoState;
|
||||
|
||||
typedef struct PCIBonitoState
|
||||
{
|
||||
typedef struct PCIBonitoState {
|
||||
PCIDevice dev;
|
||||
|
||||
BonitoState *pcihost;
|
||||
@ -239,7 +240,8 @@ static void bonito_writel(void *opaque, hwaddr addr,
|
||||
|
||||
saddr = addr >> 2;
|
||||
|
||||
DPRINTF("bonito_writel "TARGET_FMT_plx" val %x saddr %x\n", addr, val, saddr);
|
||||
DPRINTF("bonito_writel "TARGET_FMT_plx" val %x saddr %x\n",
|
||||
addr, val, saddr);
|
||||
switch (saddr) {
|
||||
case BONITO_BONPONCFG:
|
||||
case BONITO_IODEVCFG:
|
||||
@ -446,7 +448,8 @@ static uint32_t bonito_sbridge_pciaddr(void *opaque, hwaddr addr)
|
||||
cfgaddr = addr & 0xffff;
|
||||
cfgaddr |= (s->regs[BONITO_PCIMAP_CFG] & 0xffff) << 16;
|
||||
|
||||
idsel = (cfgaddr & BONITO_PCICONF_IDSEL_MASK) >> BONITO_PCICONF_IDSEL_OFFSET;
|
||||
idsel = (cfgaddr & BONITO_PCICONF_IDSEL_MASK) >>
|
||||
BONITO_PCICONF_IDSEL_OFFSET;
|
||||
devno = ctz32(idsel);
|
||||
funno = (cfgaddr & BONITO_PCICONF_FUN_MASK) >> BONITO_PCICONF_FUN_OFFSET;
|
||||
regno = (cfgaddr & BONITO_PCICONF_REG_MASK) >> BONITO_PCICONF_REG_OFFSET;
|
||||
@ -618,7 +621,10 @@ static void bonito_realize(PCIDevice *dev, Error **errp)
|
||||
SysBusDevice *sysbus = SYS_BUS_DEVICE(s->pcihost);
|
||||
PCIHostState *phb = PCI_HOST_BRIDGE(s->pcihost);
|
||||
|
||||
/* Bonito North Bridge, built on FPGA, VENDOR_ID/DEVICE_ID are "undefined" */
|
||||
/*
|
||||
* Bonito North Bridge, built on FPGA,
|
||||
* VENDOR_ID/DEVICE_ID are "undefined"
|
||||
*/
|
||||
pci_config_set_prog_interface(dev->config, 0x00);
|
||||
|
||||
/* set the north bridge register mapping */
|
||||
|
Loading…
x
Reference in New Issue
Block a user