aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/bt-hci.c6
-rw-r--r--hw/cbus.c6
-rw-r--r--hw/gt64xxx.c1
-rw-r--r--hw/mst_fpga.c4
-rw-r--r--hw/musicpal.c2
-rw-r--r--hw/nand.c2
-rw-r--r--hw/omap2.c2
-rw-r--r--hw/omap_clk.c2
-rw-r--r--hw/openpic.c2
-rw-r--r--hw/pc.h1
-rw-r--r--hw/pckbd.c2
-rw-r--r--hw/piix_pci.c2
-rw-r--r--hw/ppc.c6
-rw-r--r--hw/ppc.h4
-rw-r--r--hw/ppc_prep.c10
-rw-r--r--hw/rtl8139.c2
-rw-r--r--hw/soc_dma.c8
-rw-r--r--hw/tc58128.c12
-rw-r--r--hw/tsc2005.c3
-rw-r--r--hw/tsc210x.c1
-rw-r--r--hw/tusb6010.c1
-rw-r--r--hw/zaurus.c6
22 files changed, 50 insertions, 35 deletions
diff --git a/hw/bt-hci.c b/hw/bt-hci.c
index 2562f21f63..121fabf453 100644
--- a/hw/bt-hci.c
+++ b/hw/bt-hci.c
@@ -87,6 +87,7 @@ struct bt_hci_link_s {
};
/* LMP layer emulation */
+#if 0
static void bt_submit_lmp(struct bt_device_s *bt, int length, uint8_t *data)
{
int resp, resplen, error, op, tr;
@@ -386,7 +387,7 @@ static void bt_submit_lmp(struct bt_device_s *bt, int length, uint8_t *data)
respdata[0] |= tr;
}
-void bt_submit_raw_acl(struct bt_piconet_s *net, int length, uint8_t *data)
+static void bt_submit_raw_acl(struct bt_piconet_s *net, int length, uint8_t *data)
{
struct bt_device_s *slave;
if (length < 1)
@@ -411,6 +412,7 @@ void bt_submit_raw_acl(struct bt_piconet_s *net, int length, uint8_t *data)
break;
}
}
+#endif
/* HCI layer emulation */
@@ -1118,7 +1120,7 @@ static void bt_hci_mode_tick(void *opaque)
bt_hci_lmp_mode_change_master(hci, link, acl_active, 0);
}
-void bt_hci_reset(struct bt_hci_s *hci)
+static void bt_hci_reset(struct bt_hci_s *hci)
{
hci->acl_len = 0;
hci->last_cmd = 0;
diff --git a/hw/cbus.c b/hw/cbus.c
index c84de05336..03218b4450 100644
--- a/hw/cbus.c
+++ b/hw/cbus.c
@@ -435,7 +435,8 @@ void retu_key_event(void *retu, int state)
s->status |= 1 << 5;
}
-void retu_head_event(void *retu, int state)
+#if 0
+static void retu_head_event(void *retu, int state)
{
struct cbus_slave_s *slave = (struct cbus_slave_s *) retu;
struct cbus_retu_s *s = (struct cbus_retu_s *) slave->opaque;
@@ -452,7 +453,7 @@ void retu_head_event(void *retu, int state)
s->result[retu_adc_head_det] = 123;
}
-void retu_hook_event(void *retu, int state)
+static void retu_hook_event(void *retu, int state)
{
struct cbus_slave_s *slave = (struct cbus_slave_s *) retu;
struct cbus_retu_s *s = (struct cbus_retu_s *) slave->opaque;
@@ -468,6 +469,7 @@ void retu_hook_event(void *retu, int state)
else
s->result[retu_adc_hook_det] = 123;
}
+#endif
/* Tahvo/Betty */
struct cbus_tahvo_s {
diff --git a/hw/gt64xxx.c b/hw/gt64xxx.c
index 8e8adadd25..b6cd9714ff 100644
--- a/hw/gt64xxx.c
+++ b/hw/gt64xxx.c
@@ -891,7 +891,6 @@ static int pci_gt64120_map_irq(PCIDevice *pci_dev, int irq_num)
}
}
-extern PCIDevice *piix4_dev;
static int pci_irq_levels[4];
static void pci_gt64120_set_irq(qemu_irq *pic, int irq_num, int level)
diff --git a/hw/mst_fpga.c b/hw/mst_fpga.c
index e2f0a9a59a..2d5ac5ae8d 100644
--- a/hw/mst_fpga.c
+++ b/hw/mst_fpga.c
@@ -168,12 +168,12 @@ mst_fpga_writeb(void *opaque, target_phys_addr_t addr, uint32_t value)
}
}
-CPUReadMemoryFunc *mst_fpga_readfn[] = {
+static CPUReadMemoryFunc *mst_fpga_readfn[] = {
mst_fpga_readb,
mst_fpga_readb,
mst_fpga_readb,
};
-CPUWriteMemoryFunc *mst_fpga_writefn[] = {
+static CPUWriteMemoryFunc *mst_fpga_writefn[] = {
mst_fpga_writeb,
mst_fpga_writeb,
mst_fpga_writeb,
diff --git a/hw/musicpal.c b/hw/musicpal.c
index cee3468054..ffd59faf66 100644
--- a/hw/musicpal.c
+++ b/hw/musicpal.c
@@ -236,7 +236,7 @@ static i2c_interface *mixer_i2c;
/* Wolfson 8750 I2C address */
#define MP_WM_ADDR 0x34
-const char audio_name[] = "mv88w8618";
+static const char audio_name[] = "mv88w8618";
typedef struct musicpal_audio_state {
uint32_t base;
diff --git a/hw/nand.c b/hw/nand.c
index 294a83f85f..11f8efca28 100644
--- a/hw/nand.c
+++ b/hw/nand.c
@@ -106,7 +106,7 @@ struct nand_flash_s {
# include "nand.c"
/* Information based on Linux drivers/mtd/nand/nand_ids.c */
-struct nand_info_s {
+static const struct nand_info_s {
int size;
int width;
int page_shift;
diff --git a/hw/omap2.c b/hw/omap2.c
index a5003834dd..5add05938f 100644
--- a/hw/omap2.c
+++ b/hw/omap2.c
@@ -2174,7 +2174,7 @@ static CPUWriteMemoryFunc *omap_sti_fifo_writefn[] = {
omap_badwidth_write8,
};
-struct omap_sti_s *omap_sti_init(struct omap_target_agent_s *ta,
+static struct omap_sti_s *omap_sti_init(struct omap_target_agent_s *ta,
target_phys_addr_t channel_base, qemu_irq irq, omap_clk clk,
CharDriverState *chr)
{
diff --git a/hw/omap_clk.c b/hw/omap_clk.c
index 13d7411838..3a681300b8 100644
--- a/hw/omap_clk.c
+++ b/hw/omap_clk.c
@@ -1101,7 +1101,7 @@ void omap_clk_adduser(struct clk *clk, qemu_irq user)
/* If a clock is allowed to idle, it is disabled automatically when
* all of clock domains using it are disabled. */
-int omap_clk_is_idle(struct clk *clk)
+static int omap_clk_is_idle(struct clk *clk)
{
struct clk *chld;
diff --git a/hw/openpic.c b/hw/openpic.c
index 32cf54e48d..def20eb4c8 100644
--- a/hw/openpic.c
+++ b/hw/openpic.c
@@ -128,7 +128,7 @@ enum {
IRQ_INTERNAL = 0x02,
IRQ_TIMER = 0x04,
IRQ_SPECIAL = 0x08,
-} IRQ_src_type;
+};
typedef struct IRQ_queue_t {
uint32_t queue[BF_WIDTH(MAX_IRQ)];
diff --git a/hw/pc.h b/hw/pc.h
index e2da853715..d64d8a6431 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -105,6 +105,7 @@ void i440fx_set_smm(PCIDevice *d, int val);
int piix3_init(PCIBus *bus, int devfn);
void i440fx_init_memory_mappings(PCIDevice *d);
+extern PCIDevice *piix4_dev;
int piix4_init(PCIBus *bus, int devfn);
/* vga.c */
diff --git a/hw/pckbd.c b/hw/pckbd.c
index 0845c96497..2176b83329 100644
--- a/hw/pckbd.c
+++ b/hw/pckbd.c
@@ -129,7 +129,7 @@ typedef struct KBDState {
int it_shift;
} KBDState;
-KBDState kbd_state;
+static KBDState kbd_state;
/* update irq and KBD_STAT_[MOUSE_]OBF */
/* XXX: not generating the irqs if KBD_MODE_DISABLE_KBD is set may be
diff --git a/hw/piix_pci.c b/hw/piix_pci.c
index 90cb3a6394..1d6bf20173 100644
--- a/hw/piix_pci.c
+++ b/hw/piix_pci.c
@@ -210,7 +210,7 @@ PCIBus *i440fx_init(PCIDevice **pi440fx_state, qemu_irq *pic)
/* PIIX3 PCI to ISA bridge */
-PCIDevice *piix3_dev;
+static PCIDevice *piix3_dev;
PCIDevice *piix4_dev;
/* just used for simpler irq handling. */
diff --git a/hw/ppc.c b/hw/ppc.c
index c1bc486e05..60d6e86cf0 100644
--- a/hw/ppc.c
+++ b/hw/ppc.c
@@ -806,10 +806,12 @@ clk_setup_cb cpu_ppc_tb_init (CPUState *env, uint32_t freq)
}
/* Specific helpers for POWER & PowerPC 601 RTC */
-clk_setup_cb cpu_ppc601_rtc_init (CPUState *env)
+#if 0
+static clk_setup_cb cpu_ppc601_rtc_init (CPUState *env)
{
return cpu_ppc_tb_init(env, 7812500);
}
+#endif
void cpu_ppc601_store_rtcu (CPUState *env, uint32_t value)
{
@@ -1343,7 +1345,7 @@ static uint16_t NVRAM_crc_update (uint16_t prev, uint16_t value)
return tmp;
}
-uint16_t NVRAM_compute_crc (nvram_t *nvram, uint32_t start, uint32_t count)
+static uint16_t NVRAM_compute_crc (nvram_t *nvram, uint32_t start, uint32_t count)
{
uint32_t i;
uint16_t crc = 0xFFFF;
diff --git a/hw/ppc.h b/hw/ppc.h
index 0a3d4ff06b..297f55060f 100644
--- a/hw/ppc.h
+++ b/hw/ppc.h
@@ -29,3 +29,7 @@ void PREP_debug_write (void *opaque, uint32_t addr, uint32_t val);
extern CPUWriteMemoryFunc *PPC_io_write[];
extern CPUReadMemoryFunc *PPC_io_read[];
void PPC_debug_write (void *opaque, uint32_t addr, uint32_t val);
+
+void ppc40x_irq_init (CPUState *env);
+void ppc6xx_irq_init (CPUState *env);
+void ppc970_irq_init (CPUState *env);
diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index 944935d298..0180bbb045 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -84,9 +84,11 @@ static int ne2000_irq[NE2000_NB_MAX] = { 9, 10, 11, 3, 4, 5 };
/* ISA IO ports bridge */
#define PPC_IO_BASE 0x80000000
+#if 0
/* Speaker port 0x61 */
-int speaker_data_on;
-int dummy_refresh_clock;
+static int speaker_data_on;
+static int dummy_refresh_clock;
+#endif
static void speaker_ioport_write (void *opaque, uint32_t addr, uint32_t val)
{
@@ -518,13 +520,13 @@ static uint32_t PPC_prep_io_readl (void *opaque, target_phys_addr_t addr)
return ret;
}
-CPUWriteMemoryFunc *PPC_prep_io_write[] = {
+static CPUWriteMemoryFunc *PPC_prep_io_write[] = {
&PPC_prep_io_writeb,
&PPC_prep_io_writew,
&PPC_prep_io_writel,
};
-CPUReadMemoryFunc *PPC_prep_io_read[] = {
+static CPUReadMemoryFunc *PPC_prep_io_read[] = {
&PPC_prep_io_readb,
&PPC_prep_io_readw,
&PPC_prep_io_readl,
diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index cae8788586..feffa9c33b 100644
--- a/hw/rtl8139.c
+++ b/hw/rtl8139.c
@@ -1255,7 +1255,7 @@ static void rtl8139_reset(RTL8139State *s)
RTL8139TallyCounters_clear(&s->tally_counters);
}
-void RTL8139TallyCounters_clear(RTL8139TallyCounters* counters)
+static void RTL8139TallyCounters_clear(RTL8139TallyCounters* counters)
{
counters->TxOk = 0;
counters->RxOk = 0;
diff --git a/hw/soc_dma.c b/hw/soc_dma.c
index 4c87c8b9bd..54804221f3 100644
--- a/hw/soc_dma.c
+++ b/hw/soc_dma.c
@@ -23,20 +23,20 @@
#include "qemu-timer.h"
#include "soc_dma.h"
-void transfer_mem2mem(struct soc_dma_ch_s *ch)
+static void transfer_mem2mem(struct soc_dma_ch_s *ch)
{
memcpy(ch->paddr[0], ch->paddr[1], ch->bytes);
ch->paddr[0] += ch->bytes;
ch->paddr[1] += ch->bytes;
}
-void transfer_mem2fifo(struct soc_dma_ch_s *ch)
+static void transfer_mem2fifo(struct soc_dma_ch_s *ch)
{
ch->io_fn[1](ch->io_opaque[1], ch->paddr[0], ch->bytes);
ch->paddr[0] += ch->bytes;
}
-void transfer_fifo2mem(struct soc_dma_ch_s *ch)
+static void transfer_fifo2mem(struct soc_dma_ch_s *ch)
{
ch->io_fn[0](ch->io_opaque[0], ch->paddr[1], ch->bytes);
ch->paddr[1] += ch->bytes;
@@ -47,7 +47,7 @@ void transfer_fifo2mem(struct soc_dma_ch_s *ch)
* oprating systems may not need to use them. */
static void *fifo_buf;
static int fifo_size;
-void transfer_fifo2fifo(struct soc_dma_ch_s *ch)
+static void transfer_fifo2fifo(struct soc_dma_ch_s *ch)
{
if (ch->bytes > fifo_size)
fifo_buf = qemu_realloc(fifo_buf, fifo_size = ch->bytes);
diff --git a/hw/tc58128.c b/hw/tc58128.c
index 37f5419582..2f1b305d47 100644
--- a/hw/tc58128.c
+++ b/hw/tc58128.c
@@ -58,7 +58,7 @@ static void init_dev(tc58128_dev * dev, const char *filename)
}
}
-void handle_command(tc58128_dev * dev, uint8_t command)
+static void handle_command(tc58128_dev * dev, uint8_t command)
{
switch (command) {
case 0xff:
@@ -86,7 +86,7 @@ void handle_command(tc58128_dev * dev, uint8_t command)
}
}
-void handle_address(tc58128_dev * dev, uint8_t data)
+static void handle_address(tc58128_dev * dev, uint8_t data)
{
switch (dev->state) {
case READ1:
@@ -119,7 +119,7 @@ void handle_address(tc58128_dev * dev, uint8_t data)
}
}
-uint8_t handle_read(tc58128_dev * dev)
+static uint8_t handle_read(tc58128_dev * dev)
{
#if 0
if (dev->address % 0x100000 == 0)
@@ -131,9 +131,9 @@ uint8_t handle_read(tc58128_dev * dev)
/* We never mark the device as busy, so interrupts cannot be triggered
XXXXX */
-int tc58128_cb(uint16_t porta, uint16_t portb,
- uint16_t * periph_pdtra, uint16_t * periph_portadir,
- uint16_t * periph_pdtrb, uint16_t * periph_portbdir)
+static int tc58128_cb(uint16_t porta, uint16_t portb,
+ uint16_t * periph_pdtra, uint16_t * periph_portadir,
+ uint16_t * periph_pdtrb, uint16_t * periph_portbdir)
{
int dev;
diff --git a/hw/tsc2005.c b/hw/tsc2005.c
index f7a35b2d9d..293d716cd1 100644
--- a/hw/tsc2005.c
+++ b/hw/tsc2005.c
@@ -23,6 +23,7 @@
#include "hw.h"
#include "qemu-timer.h"
#include "console.h"
+#include "devices.h"
#define TSC_CUT_RESOLUTION(value, p) ((value) >> (16 - (p ? 12 : 10)))
@@ -319,7 +320,7 @@ static void tsc2005_reset(struct tsc2005_state_s *s)
tsc2005_pin_update(s);
}
-uint8_t tsc2005_txrx_word(void *opaque, uint8_t value)
+static uint8_t tsc2005_txrx_word(void *opaque, uint8_t value)
{
struct tsc2005_state_s *s = opaque;
uint32_t ret = 0;
diff --git a/hw/tsc210x.c b/hw/tsc210x.c
index 61e101d628..0ae48f73b0 100644
--- a/hw/tsc210x.c
+++ b/hw/tsc210x.c
@@ -26,6 +26,7 @@
#include "qemu-timer.h"
#include "console.h"
#include "omap.h" /* For struct i2s_codec_s and struct uwire_slave_s */
+#include "devices.h"
#define TSC_DATA_REGISTERS_PAGE 0x0
#define TSC_CONTROL_REGISTERS_PAGE 0x1
diff --git a/hw/tusb6010.c b/hw/tusb6010.c
index 8318c46b73..6f37779135 100644
--- a/hw/tusb6010.c
+++ b/hw/tusb6010.c
@@ -25,6 +25,7 @@
#include "usb.h"
#include "omap.h"
#include "irq.h"
+#include "devices.h"
struct tusb_s {
int iomemtype[2];
diff --git a/hw/zaurus.c b/hw/zaurus.c
index 7b8f1520c3..c475eaa613 100644
--- a/hw/zaurus.c
+++ b/hw/zaurus.c
@@ -155,12 +155,12 @@ static void scoop_writeb(void *opaque, target_phys_addr_t addr, uint32_t value)
}
}
-CPUReadMemoryFunc *scoop_readfn[] = {
+static CPUReadMemoryFunc *scoop_readfn[] = {
scoop_readb,
scoop_readb,
scoop_readb,
};
-CPUWriteMemoryFunc *scoop_writefn[] = {
+static CPUWriteMemoryFunc *scoop_writefn[] = {
scoop_writeb,
scoop_writeb,
scoop_writeb,
@@ -252,7 +252,7 @@ struct scoop_info_s *scoop_init(struct pxa2xx_state_s *cpu,
#define MAGIC_CHG(a, b, c, d) ((d << 24) | (c << 16) | (b << 8) | a)
-struct __attribute__ ((__packed__)) sl_param_info {
+static struct __attribute__ ((__packed__)) sl_param_info {
uint32_t comadj_keyword;
int32_t comadj;