This patch changes unsigned [int] to u16 for subsystem IDs. They're in the
hardware and have a specific size. Signed-off-by: Myles Watson <mylesgw@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: svn://coreboot.org/repository/coreboot-v3@1069 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
31edcc58dc
commit
539a101e1b
14 changed files with 17 additions and 21 deletions
|
|
@ -710,8 +710,7 @@ void pci_bus_reset(struct bus *bus)
|
|||
delay(1);
|
||||
}
|
||||
|
||||
void pci_dev_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
void pci_dev_set_subsystem(struct device *dev, u16 vendor, u16 device)
|
||||
{
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
/* Common pci operations without a standard interface */
|
||||
struct pci_operations {
|
||||
/* set the Subsystem IDs for the PCI device */
|
||||
void (*set_subsystem)(struct device * dev, unsigned vendor, unsigned device);
|
||||
void (*set_subsystem)(struct device * dev, u16 vendor, u16 device);
|
||||
};
|
||||
|
||||
/* Common pci bus operations */
|
||||
|
|
@ -60,8 +60,8 @@ struct pci_bus_operations {
|
|||
|
||||
struct pci_driver {
|
||||
struct device_operations *ops;
|
||||
unsigned short vendor;
|
||||
unsigned short device;
|
||||
u16 vendor;
|
||||
u16 device;
|
||||
};
|
||||
|
||||
#define __pci_driver __attribute__ ((used,__section__(".rodata.pci_driver")))
|
||||
|
|
@ -94,7 +94,7 @@ u32 pci_moving_config32(struct device *dev, unsigned reg);
|
|||
unsigned pci_find_next_capability(struct device * dev, unsigned cap, unsigned last);
|
||||
unsigned pci_find_capability(struct device * dev, unsigned cap);
|
||||
struct resource *pci_get_resource(struct device *dev, unsigned long index);
|
||||
void pci_dev_set_subsystem(struct device * dev, unsigned vendor, unsigned device);
|
||||
void pci_dev_set_subsystem(struct device * dev, u16 vendor, u16 device);
|
||||
|
||||
void pci_domain_read_resources(struct device *dev);
|
||||
void ram_resource(struct device *dev, unsigned long index,
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ static void mc_set_resources(struct device * dev)
|
|||
pci_set_resources(dev);
|
||||
}
|
||||
|
||||
static void i945_set_subsystem(struct device * dev, unsigned vendor, unsigned device)
|
||||
static void i945_set_subsystem(struct device * dev, u16 vendor, u16 device)
|
||||
{
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include <config.h>
|
||||
#include "amd8111.h"
|
||||
|
||||
static void lpci_set_subsystem(struct device * dev, unsigned vendor, unsigned device)
|
||||
static void lpci_set_subsystem(struct device * dev, u16 vendor, u16 device)
|
||||
{
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ static void acpi_enable_resources(struct device * dev)
|
|||
|
||||
}
|
||||
|
||||
static void lpci_set_subsystem(struct device * dev, unsigned vendor, unsigned device)
|
||||
static void lpci_set_subsystem(struct device * dev, u16 vendor, u16 device)
|
||||
{
|
||||
pci_write_config32(dev, 0x7c,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ static void ide_init(struct device *dev)
|
|||
pci_write_config16(dev, 0x42, word);
|
||||
}
|
||||
|
||||
static void lpci_set_subsystem(struct device * dev, unsigned vendor, unsigned device)
|
||||
static void lpci_set_subsystem(struct device * dev, u16 vendor, u16 device)
|
||||
{
|
||||
pci_write_config32(dev, 0x70,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ static void amd8111_lpc_enable_resources(struct device * dev)
|
|||
enable_childrens_resources(dev);
|
||||
}
|
||||
|
||||
static void lpci_set_subsystem(struct device * dev, unsigned vendor, unsigned device)
|
||||
static void lpci_set_subsystem(struct device * dev, u16 vendor, u16 device)
|
||||
{
|
||||
pci_write_config32(dev, 0x70,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ static void nic_init(struct device *dev)
|
|||
printk(BIOS_DEBUG, "Done\n");
|
||||
}
|
||||
|
||||
static void lpci_set_subsystem(struct device * dev, unsigned vendor, unsigned device)
|
||||
static void lpci_set_subsystem(struct device * dev, u16 vendor, u16 device)
|
||||
{
|
||||
pci_write_config32(dev, 0xc8,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
#include <io.h>
|
||||
#include "amd8111.h"
|
||||
|
||||
static void lpci_set_subsystem(struct device * dev, unsigned vendor, unsigned device)
|
||||
static void lpci_set_subsystem(struct device * dev, u16 vendor, u16 device)
|
||||
{
|
||||
pci_write_config32(dev, 0x44,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
#include "amd8111.h"
|
||||
|
||||
|
||||
static void lpci_set_subsystem(struct device * dev, unsigned vendor, unsigned device)
|
||||
static void lpci_set_subsystem(struct device * dev, u16 vendor, u16 device)
|
||||
{
|
||||
pci_write_config32(dev, 0x70,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ static void i82801gx_lpc_enable_resources(struct device * dev)
|
|||
enable_childrens_resources(dev);
|
||||
}
|
||||
|
||||
static void set_subsystem(struct device * dev, unsigned vendor, unsigned device)
|
||||
static void set_subsystem(struct device * dev, u16 vendor, u16 device)
|
||||
{
|
||||
printk(BIOS_DEBUG, "Setting LPC bridge subsystem ID\n");
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
|
|
|
|||
|
|
@ -49,8 +49,7 @@ static void usb_ehci_init(struct device *dev)
|
|||
printk(BIOS_DEBUG, "done.\n");
|
||||
}
|
||||
|
||||
static void usb_ehci_set_subsystem(struct device * dev, unsigned vendor,
|
||||
unsigned device)
|
||||
static void usb_ehci_set_subsystem(struct device * dev, u16 vendor, u16 device)
|
||||
{
|
||||
u8 access_cntl;
|
||||
|
||||
|
|
|
|||
|
|
@ -248,8 +248,7 @@ static void mcp55_enable(struct device *dev)
|
|||
|
||||
}
|
||||
|
||||
void mcp55_pci_dev_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
void mcp55_pci_dev_set_subsystem(struct device *dev, u16 vendor, u16 device)
|
||||
{
|
||||
pci_write_config32(dev, PCI_MCP55_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@
|
|||
|
||||
#define PCI_MCP55_SUBSYSTEM_VENDOR_ID 0x40
|
||||
|
||||
void mcp55_pci_dev_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device);
|
||||
void mcp55_pci_dev_set_subsystem(struct device *dev, u16 vendor, u16 device);
|
||||
extern struct pci_operations mcp55_pci_dev_ops_pci;
|
||||
|
||||
#endif /* MCP55_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue