fix typos and warnings in the device tree code (trivial)
Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3441 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
8533606db7
commit
d98cf5bed9
|
@ -7,6 +7,8 @@
|
||||||
|
|
||||||
#include <x86emu/x86emu.h>
|
#include <x86emu/x86emu.h>
|
||||||
|
|
||||||
|
#include "pcbios/pcibios.h"
|
||||||
|
|
||||||
#define MEM_WB(where, what) wrb(where, what)
|
#define MEM_WB(where, what) wrb(where, what)
|
||||||
#define MEM_WW(where, what) wrw(where, what)
|
#define MEM_WW(where, what) wrw(where, what)
|
||||||
#define MEM_WL(where, what) wrl(where, what)
|
#define MEM_WL(where, what) wrl(where, what)
|
||||||
|
@ -22,6 +24,10 @@ void x_outw(u16 port, u16 val);
|
||||||
u32 x_inl(u16 port);
|
u32 x_inl(u16 port);
|
||||||
void x_outl(u16 port, u32 val);
|
void x_outl(u16 port, u32 val);
|
||||||
|
|
||||||
|
|
||||||
|
// sys.c
|
||||||
|
void X86EMU_setMemBase(void *base, size_t size);
|
||||||
|
|
||||||
/* general software interrupt handler */
|
/* general software interrupt handler */
|
||||||
u32 getIntVect(int num)
|
u32 getIntVect(int num)
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
|
|
||||||
#include "pcibios.h"
|
#include "pcibios.h"
|
||||||
|
|
||||||
int pcibios_handler()
|
int pcibios_handler(void)
|
||||||
{
|
{
|
||||||
int i, ret = 0;
|
int ret = 0;
|
||||||
struct device *dev = 0;
|
struct device *dev = 0;
|
||||||
|
|
||||||
switch (X86_AX) {
|
switch (X86_AX) {
|
||||||
|
|
|
@ -25,4 +25,7 @@ enum {
|
||||||
SET_FAILED = 0x88,
|
SET_FAILED = 0x88,
|
||||||
BUFFER_TOO_SMALL = 0x89
|
BUFFER_TOO_SMALL = 0x89
|
||||||
};
|
};
|
||||||
#endif /* PCI_BIOS_H */
|
|
||||||
|
int pcibios_handler(void);
|
||||||
|
|
||||||
|
#endif /* PCI_BIOS_H */
|
||||||
|
|
|
@ -79,6 +79,7 @@ u16* decode_rm_seg_register(int reg);
|
||||||
unsigned decode_rm00_address(int rm);
|
unsigned decode_rm00_address(int rm);
|
||||||
unsigned decode_rm01_address(int rm);
|
unsigned decode_rm01_address(int rm);
|
||||||
unsigned decode_rm10_address(int rm);
|
unsigned decode_rm10_address(int rm);
|
||||||
|
unsigned decode_rmXX_address(int mod, int rm);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* End of "C" linkage for C++ */
|
} /* End of "C" linkage for C++ */
|
||||||
|
|
|
@ -647,6 +647,7 @@ void pci_dev_set_subsystem(device_t dev, unsigned vendor, unsigned device)
|
||||||
void pci_dev_init(struct device *dev)
|
void pci_dev_init(struct device *dev)
|
||||||
{
|
{
|
||||||
#if CONFIG_PCI_ROM_RUN == 1 || CONFIG_VGA_ROM_RUN == 1
|
#if CONFIG_PCI_ROM_RUN == 1 || CONFIG_VGA_ROM_RUN == 1
|
||||||
|
void run_bios(struct device * dev, unsigned long addr);
|
||||||
struct rom_header *rom, *ram;
|
struct rom_header *rom, *ram;
|
||||||
|
|
||||||
#if CONFIG_PCI_ROM_RUN != 1
|
#if CONFIG_PCI_ROM_RUN != 1
|
||||||
|
@ -666,7 +667,7 @@ void pci_dev_init(struct device *dev)
|
||||||
if (ram == NULL)
|
if (ram == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
run_bios(dev, ram);
|
run_bios(dev, (unsigned long)ram);
|
||||||
|
|
||||||
#if CONFIG_CONSOLE_VGA == 1
|
#if CONFIG_CONSOLE_VGA == 1
|
||||||
/* vga_inited is a trigger of the VGA console code. */
|
/* vga_inited is a trigger of the VGA console code. */
|
||||||
|
@ -1070,7 +1071,7 @@ unsigned int pci_scan_bus(struct bus *bus,
|
||||||
}
|
}
|
||||||
post_code(0x25);
|
post_code(0x25);
|
||||||
|
|
||||||
/* Die if any leftover Static devices are are found.
|
/* Die if any left over static devices are are found.
|
||||||
* There's probably a problem in the Config.lb.
|
* There's probably a problem in the Config.lb.
|
||||||
*/
|
*/
|
||||||
if(old_devices) {
|
if(old_devices) {
|
||||||
|
@ -1078,7 +1079,7 @@ unsigned int pci_scan_bus(struct bus *bus,
|
||||||
for(left = old_devices; left; left = left->sibling) {
|
for(left = old_devices; left; left = left->sibling) {
|
||||||
printk_err("%s\n", dev_path(left));
|
printk_err("%s\n", dev_path(left));
|
||||||
}
|
}
|
||||||
die("PCI: Left over static devices. Check your Config.lb\n");
|
printk_warning("PCI: Left over static devices. Check your mainboard Config.lb\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For all children that implement scan_bus (i.e. bridges)
|
/* For all children that implement scan_bus (i.e. bridges)
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include <device/pci.h>
|
#include <device/pci.h>
|
||||||
#include <device/pci_ids.h>
|
#include <device/pci_ids.h>
|
||||||
#include <device/pci_ops.h>
|
#include <device/pci_ops.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
struct rom_header * pci_rom_probe(struct device *dev)
|
struct rom_header * pci_rom_probe(struct device *dev)
|
||||||
{
|
{
|
||||||
|
@ -62,7 +63,7 @@ struct rom_header * pci_rom_probe(struct device *dev)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
rom_data = (unsigned char *) rom_header + le32_to_cpu(rom_header->data);
|
rom_data = (struct pci_data *) ((void *)rom_header + le32_to_cpu(rom_header->data));
|
||||||
printk_spew("PCI ROM Image, Vendor %04x, Device %04x,\n",
|
printk_spew("PCI ROM Image, Vendor %04x, Device %04x,\n",
|
||||||
rom_data->vendor, rom_data->device);
|
rom_data->vendor, rom_data->device);
|
||||||
if (dev->vendor != rom_data->vendor || dev->device != rom_data->device) {
|
if (dev->vendor != rom_data->vendor || dev->device != rom_data->device) {
|
||||||
|
@ -95,8 +96,8 @@ struct rom_header *pci_rom_load(struct device *dev, struct rom_header *rom_heade
|
||||||
rom_address = pci_read_config32(dev, PCI_ROM_ADDRESS);
|
rom_address = pci_read_config32(dev, PCI_ROM_ADDRESS);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
rom_header = (unsigned char *) rom_header + image_size; // get next image
|
rom_header = (struct rom_header *)((void *) rom_header + image_size); // get next image
|
||||||
rom_data = (unsigned char *) rom_header + le32_to_cpu(rom_header->data);
|
rom_data = (struct pci_data *)((void *) rom_header + le32_to_cpu(rom_header->data));
|
||||||
image_size = le32_to_cpu(rom_data->ilen) * 512;
|
image_size = le32_to_cpu(rom_data->ilen) * 512;
|
||||||
} while ((rom_data->type!=0) && (rom_data->indicator!=0)); // make sure we got x86 version
|
} while ((rom_data->type!=0) && (rom_data->indicator!=0)); // make sure we got x86 version
|
||||||
|
|
||||||
|
@ -111,7 +112,7 @@ struct rom_header *pci_rom_load(struct device *dev, struct rom_header *rom_heade
|
||||||
#endif
|
#endif
|
||||||
printk_debug("copying VGA ROM Image from 0x%x to 0x%x, 0x%x bytes\n",
|
printk_debug("copying VGA ROM Image from 0x%x to 0x%x, 0x%x bytes\n",
|
||||||
rom_header, PCI_VGA_RAM_IMAGE_START, rom_size);
|
rom_header, PCI_VGA_RAM_IMAGE_START, rom_size);
|
||||||
memcpy(PCI_VGA_RAM_IMAGE_START, rom_header, rom_size);
|
memcpy((void *)PCI_VGA_RAM_IMAGE_START, rom_header, rom_size);
|
||||||
return (struct rom_header *) (PCI_VGA_RAM_IMAGE_START);
|
return (struct rom_header *) (PCI_VGA_RAM_IMAGE_START);
|
||||||
} else {
|
} else {
|
||||||
printk_debug("copying non-VGA ROM Image from 0x%x to 0x%x, 0x%x bytes\n",
|
printk_debug("copying non-VGA ROM Image from 0x%x to 0x%x, 0x%x bytes\n",
|
||||||
|
|
|
@ -34,7 +34,7 @@ static void pciexp_tune_dev(device_t dev)
|
||||||
/* error... */
|
/* error... */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
printk_debug("PCIEXP: tunning %s\n", dev_path(dev));
|
printk_debug("PCIe: tunning %s\n", dev_path(dev));
|
||||||
#warning "IMPLEMENT PCI EXPRESS TUNING"
|
#warning "IMPLEMENT PCI EXPRESS TUNING"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue