Fix almost all remaining warnings

git-svn-id: svn://coreboot.org/openbios/openbios-devel@294 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2008-12-20 17:15:47 +00:00
parent 2324d53cb4
commit 7e21fc929d
23 changed files with 101 additions and 53 deletions

View File

@@ -239,7 +239,7 @@ rtc_init(char *path)
}
cuda_t *cuda_init (char *path, uint32_t base)
cuda_t *cuda_init (const char *path, uint32_t base)
{
cuda_t *cuda;
char buf[64];

View File

@@ -15,4 +15,4 @@ enum {
};
cuda_t *cuda_init (char *path, uint32_t base);
cuda_t *cuda_init (const char *path, uint32_t base);

View File

@@ -21,8 +21,10 @@
#include "libc/vsprintf.h"
#include "openbios/drivers.h"
#include "video_subr.h"
#include "timer.h"
#include "pci.h"
#include "cuda.h"
#define set_bool_property(ph, name) set_property(ph, name, NULL, 0);
@@ -219,7 +221,7 @@ static const pci_dev_t eth_devices[] = {
},
};
static void eth_config_cb (const pci_config_t *config)
static int eth_config_cb (const pci_config_t *config)
{
phandle_t ph;
cell props[12];
@@ -236,7 +238,8 @@ static void eth_config_cb (const pci_config_t *config)
props[i*2] = config->regions[i];
props[i*2 + 1] = config->sizes[i];
}
set_property(ph, "reg", props, i * 2 * sizeof(cell));
set_property(ph, "reg", (char *)props, i * 2 * sizeof(cell));
return 0;
}
static const pci_subclass_t net_subclass[] = {
@@ -1104,7 +1107,7 @@ static int macio_config_cb (const pci_config_t *config)
set_int_property(ph, "#interrupt-cells", 1);
props[0]= 0x10;
props[1]= 0x20;
set_property(ph, "reg", &props, sizeof(props));
set_property(ph, "reg", (char *)&props, sizeof(props));
pic_handle = ph;
cuda_init(config->path, config->regions[0]);
@@ -1140,7 +1143,7 @@ static const pci_dev_t *pci_find_device (uint8_t class, uint8_t subclass,
uint8_t iface, uint16_t vendor,
uint16_t product)
{
int (*config_cb)(pci_config_t *config);
int (*config_cb)(const pci_config_t *config);
const pci_class_t *pclass;
const pci_subclass_t *psubclass;
const pci_iface_t *piface;
@@ -1371,8 +1374,8 @@ static char pci_xbox_blacklisted (int bus, int devnum, int fn)
#endif
static void
ob_pci_configure(pci_arch_t *addr, pci_config_t *config, uint32_t *mem_base,
uint32_t *io_base)
ob_pci_configure(pci_addr addr, pci_config_t *config, unsigned long *mem_base,
unsigned long *io_base)
{
uint32_t smask, omask, amask, size, reloc, min_align;

View File

@@ -19,7 +19,9 @@
#include "openbios/kernel.h"
#include "openbios/bindings.h"
#include "openbios/pci.h"
#include "openbios/drivers.h"
#include "asm/io.h"
#include "video_subr.h"
/* VGA init. We use the Bochs VESA VBE extensions */
#define VBE_DISPI_INDEX_ID 0x0
@@ -96,8 +98,8 @@ void vga_vbe_set_mode(int width, int height, int depth)
vga_build_rgb_palette();
}
void vga_vbe_init(char *path, uint32_t fb, uint32_t fb_size,
uint32_t rom, uint32_t rom_size)
void vga_vbe_init(const char *path, uint32_t fb, uint32_t fb_size,
unsigned long rom, uint32_t rom_size)
{
phandle_t ph, chosen, aliases;
@@ -117,9 +119,10 @@ void vga_vbe_init(char *path, uint32_t fb, uint32_t fb_size,
aliases = find_dev("/aliases");
set_property(aliases, "screen", path, strlen(path) + 1);
if (rom_size >= 8) {
const uint8_t *p;
const char *p;
int size;
p = rom;
p = (const char *)rom;
if (p[0] == 'N' && p[1] == 'D' && p[2] == 'R' && p[3] == 'V') {
size = *(uint32_t*)(p + 4);
set_property(ph, "driver,AAPL,MacOS,PowerPC",