{northbridge, soc, southbridge}/intel: Make use of pci_dev_set_subsystem()
This patch removes local definitions of sub_system function and make use of common function pci_dev_set_subsystem(). Change-Id: I91982597fdf586ab514bec3d8e4d09f2565fe56d Signed-off-by: Subrata Banik <subrata.banik@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/31982 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: David Guckian Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
parent
6520ec0650
commit
4a0f07166f
|
@ -734,8 +734,13 @@ void pci_bus_reset(struct bus *bus)
|
|||
void pci_dev_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static int should_run_oprom(struct device *dev)
|
||||
|
|
|
@ -74,15 +74,8 @@ static void mch_domain_set_resources(struct device *dev)
|
|||
assign_resources(dev->link_list);
|
||||
}
|
||||
|
||||
static void intel_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
|
||||
static struct pci_operations intel_pci_ops = {
|
||||
.set_subsystem = intel_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations pci_domain_ops = {
|
||||
|
|
|
@ -172,18 +172,6 @@ static void mc_set_resources(struct device *dev)
|
|||
pci_dev_set_resources(dev);
|
||||
}
|
||||
|
||||
static void intel_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static void northbridge_init(struct device *dev)
|
||||
{
|
||||
}
|
||||
|
@ -193,7 +181,7 @@ static void northbridge_enable(struct device *dev)
|
|||
}
|
||||
|
||||
static struct pci_operations intel_pci_ops = {
|
||||
.set_subsystem = intel_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations pci_domain_ops = {
|
||||
|
|
|
@ -221,19 +221,6 @@ static void gma_func0_init(struct device *dev)
|
|||
intel_gma_restore_opregion();
|
||||
}
|
||||
|
||||
static void gma_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor &
|
||||
0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
const struct i915_gpu_controller_info *
|
||||
intel_gma_get_controller_info(void)
|
||||
{
|
||||
|
@ -287,7 +274,7 @@ static const char *gma_acpi_name(const struct device *dev)
|
|||
}
|
||||
|
||||
static struct pci_operations gma_pci_ops = {
|
||||
.set_subsystem = gma_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations gma_func0_ops = {
|
||||
|
|
|
@ -499,18 +499,6 @@ static void gma_func0_init(struct device *dev)
|
|||
intel_gma_restore_opregion();
|
||||
}
|
||||
|
||||
static void gma_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
const struct i915_gpu_controller_info *
|
||||
intel_gma_get_controller_info(void)
|
||||
{
|
||||
|
@ -558,7 +546,7 @@ gma_write_acpi_tables(struct device *const dev, unsigned long current,
|
|||
}
|
||||
|
||||
static struct pci_operations gma_pci_ops = {
|
||||
.set_subsystem = gma_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations gma_func0_ops = {
|
||||
|
|
|
@ -103,20 +103,8 @@ static void minihd_init(struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static void minihd_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations minihd_pci_ops = {
|
||||
.set_subsystem = minihd_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations minihd_ops = {
|
||||
|
|
|
@ -468,18 +468,6 @@ static void disable_devices(void)
|
|||
pci_write_config32(host_dev, DEVEN, deven);
|
||||
}
|
||||
|
||||
static void intel_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static void northbridge_init(struct device *dev)
|
||||
{
|
||||
u8 bios_reset_cpl, pair;
|
||||
|
@ -510,7 +498,7 @@ static void northbridge_init(struct device *dev)
|
|||
}
|
||||
|
||||
static struct pci_operations intel_pci_ops = {
|
||||
.set_subsystem = intel_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations mc_ops = {
|
||||
|
|
|
@ -756,18 +756,6 @@ static void gma_func1_init(struct device *dev)
|
|||
pci_write_config8(dev, 0xf4, 0xff);
|
||||
}
|
||||
|
||||
static void gma_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
const struct i915_gpu_controller_info *
|
||||
intel_gma_get_controller_info(void)
|
||||
{
|
||||
|
@ -834,7 +822,7 @@ static const char *gma_acpi_name(const struct device *dev)
|
|||
}
|
||||
|
||||
static struct pci_operations gma_pci_ops = {
|
||||
.set_subsystem = gma_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations gma_func0_ops = {
|
||||
|
|
|
@ -191,19 +191,8 @@ static void mc_read_resources(struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static void intel_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
static struct pci_operations intel_pci_ops = {
|
||||
.set_subsystem = intel_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations mc_ops = {
|
||||
|
|
|
@ -623,19 +623,6 @@ static void gma_func0_init(struct device *dev)
|
|||
intel_gma_restore_opregion();
|
||||
}
|
||||
|
||||
static void gma_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor &
|
||||
0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static void gma_read_resources(struct device *dev)
|
||||
{
|
||||
pci_dev_read_resources(dev);
|
||||
|
@ -703,7 +690,7 @@ gma_write_acpi_tables(struct device *const dev,
|
|||
}
|
||||
|
||||
static struct pci_operations gma_pci_ops = {
|
||||
.set_subsystem = gma_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations gma_func0_ops = {
|
||||
|
|
|
@ -189,19 +189,6 @@ static void mc_set_resources(struct device *dev)
|
|||
pci_dev_set_resources(dev);
|
||||
}
|
||||
|
||||
static void intel_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor &
|
||||
0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static void northbridge_dmi_init(struct device *dev)
|
||||
{
|
||||
u32 reg32;
|
||||
|
@ -303,7 +290,7 @@ static void northbridge_init(struct device *dev)
|
|||
}
|
||||
|
||||
static struct pci_operations intel_pci_ops = {
|
||||
.set_subsystem = intel_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations mc_ops = {
|
||||
|
|
|
@ -304,19 +304,6 @@ static void gma_func0_init(struct device *dev)
|
|||
intel_gma_restore_opregion();
|
||||
}
|
||||
|
||||
static void gma_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor &
|
||||
0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
const struct i915_gpu_controller_info *intel_gma_get_controller_info(void)
|
||||
{
|
||||
struct device *dev = pcidev_on_root(0x2, 0);
|
||||
|
@ -360,7 +347,7 @@ static const char *gma_acpi_name(const struct device *dev)
|
|||
}
|
||||
|
||||
static struct pci_operations gma_pci_ops = {
|
||||
.set_subsystem = gma_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations gma_func0_ops = {
|
||||
|
|
|
@ -653,18 +653,6 @@ static void gma_func0_init(struct device *dev)
|
|||
intel_gma_restore_opregion();
|
||||
}
|
||||
|
||||
static void gma_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
const struct i915_gpu_controller_info *
|
||||
intel_gma_get_controller_info(void)
|
||||
{
|
||||
|
@ -731,7 +719,7 @@ static void gma_func0_disable(struct device *dev)
|
|||
}
|
||||
|
||||
static struct pci_operations gma_pci_ops = {
|
||||
.set_subsystem = gma_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations gma_func0_ops = {
|
||||
|
|
|
@ -285,18 +285,6 @@ static void mc_read_resources(struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static void intel_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static void northbridge_dmi_init(struct device *dev)
|
||||
{
|
||||
u32 reg32;
|
||||
|
@ -484,7 +472,7 @@ void northbridge_write_smram(u8 smram)
|
|||
}
|
||||
|
||||
static struct pci_operations intel_pci_ops = {
|
||||
.set_subsystem = intel_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations mc_ops = {
|
||||
|
|
|
@ -95,19 +95,6 @@ static void gma_func0_disable(struct device *dev)
|
|||
pci_write_config16(dev_host, D0F0_GGC, ggc);
|
||||
}
|
||||
|
||||
static void gma_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor &
|
||||
0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
const struct i915_gpu_controller_info *
|
||||
intel_gma_get_controller_info(void)
|
||||
{
|
||||
|
@ -159,7 +146,7 @@ static const char *gma_acpi_name(const struct device *dev)
|
|||
}
|
||||
|
||||
static struct pci_operations gma_pci_ops = {
|
||||
.set_subsystem = gma_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations gma_func0_ops = {
|
||||
|
|
|
@ -72,18 +72,6 @@ struct chip_operations soc_intel_baytrail_ops = {
|
|||
.init = soc_init,
|
||||
};
|
||||
|
||||
static void pci_set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
struct pci_operations soc_pci_ops = {
|
||||
.set_subsystem = &pci_set_subsystem,
|
||||
.set_subsystem = &pci_dev_set_subsystem,
|
||||
};
|
||||
|
|
|
@ -380,22 +380,8 @@ struct chip_operations soc_intel_braswell_ops = {
|
|||
.init = soc_init,
|
||||
};
|
||||
|
||||
static void pci_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
printk(BIOS_SPEW, "%s/%s (%s, 0x%04x, 0x%04x)\n",
|
||||
__FILE__, __func__, dev_name(dev), vendor, device);
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
struct pci_operations soc_pci_ops = {
|
||||
.set_subsystem = &pci_set_subsystem,
|
||||
.set_subsystem = &pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -64,17 +64,6 @@ struct chip_operations soc_intel_broadwell_ops = {
|
|||
.init = &broadwell_init_pre_device,
|
||||
};
|
||||
|
||||
static void pci_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device)
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
else
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
(device << 16) | vendor);
|
||||
}
|
||||
|
||||
struct pci_operations broadwell_pci_ops = {
|
||||
.set_subsystem = &pci_set_subsystem
|
||||
.set_subsystem = &pci_dev_set_subsystem
|
||||
};
|
||||
|
|
|
@ -33,13 +33,7 @@ static void usb_ehci_set_subsystem(struct device *dev, unsigned int vendor,
|
|||
/* Enable writes to protected registers. */
|
||||
pci_write_config8(dev, 0x80, access_cntl | 1);
|
||||
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
pci_dev_set_subsystem(dev, vendor, device);
|
||||
|
||||
/* Restore protection. */
|
||||
pci_write_config8(dev, 0x80, access_cntl);
|
||||
|
|
|
@ -129,21 +129,8 @@ struct chip_operations soc_intel_denverton_ns_ops = {
|
|||
.final = soc_final
|
||||
};
|
||||
|
||||
static void soc_set_subsystem(struct device *dev, uint32_t vendor,
|
||||
uint32_t device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) |
|
||||
(vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
struct pci_operations soc_pci_ops = {
|
||||
.set_subsystem = soc_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -74,17 +74,6 @@ struct chip_operations soc_intel_fsp_baytrail_ops = {
|
|||
.init = soc_init,
|
||||
};
|
||||
|
||||
static void pci_set_subsystem(struct device *dev, unsigned vendor, unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
struct pci_operations soc_pci_ops = {
|
||||
.set_subsystem = &pci_set_subsystem,
|
||||
.set_subsystem = &pci_dev_set_subsystem,
|
||||
};
|
||||
|
|
|
@ -88,18 +88,6 @@ struct chip_operations soc_intel_fsp_broadwell_de_ops = {
|
|||
.init = soc_init,
|
||||
};
|
||||
|
||||
static void pci_set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
struct pci_operations soc_pci_ops = {
|
||||
.set_subsystem = &pci_set_subsystem,
|
||||
.set_subsystem = &pci_dev_set_subsystem,
|
||||
};
|
||||
|
|
|
@ -336,20 +336,8 @@ static const char *azalia_acpi_name(const struct device *dev)
|
|||
return "HDEF";
|
||||
}
|
||||
|
||||
static void azalia_set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations azalia_pci_ops = {
|
||||
.set_subsystem = azalia_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations azalia_ops = {
|
||||
|
|
|
@ -694,17 +694,6 @@ static void pch_lpc_enable(struct device *dev)
|
|||
pch_enable(dev);
|
||||
}
|
||||
|
||||
static void set_subsystem(struct device *dev, unsigned vendor, unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static void southbridge_inject_dsdt(struct device *dev)
|
||||
{
|
||||
global_nvs_t *gnvs = cbmem_add (CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));
|
||||
|
@ -924,7 +913,7 @@ static void lpc_final(struct device *dev)
|
|||
}
|
||||
|
||||
static struct pci_operations pci_ops = {
|
||||
.set_subsystem = set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations device_ops = {
|
||||
|
|
|
@ -735,19 +735,8 @@ static void intel_me_init(struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static void set_subsystem(struct device *dev, unsigned vendor, unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations pci_ops = {
|
||||
.set_subsystem = set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations device_ops = {
|
||||
|
|
|
@ -738,19 +738,8 @@ static void intel_me_init(struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static void set_subsystem(struct device *dev, unsigned vendor, unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations pci_ops = {
|
||||
.set_subsystem = set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations device_ops = {
|
||||
|
|
|
@ -234,18 +234,6 @@ static void sata_enable(struct device *dev)
|
|||
pci_write_config16(dev, 0x90, map);
|
||||
}
|
||||
|
||||
static void sata_set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static const char *sata_acpi_name(const struct device *dev)
|
||||
{
|
||||
return "SATA";
|
||||
|
@ -258,7 +246,7 @@ static void sata_fill_ssdt(struct device *dev)
|
|||
}
|
||||
|
||||
static struct pci_operations sata_pci_ops = {
|
||||
.set_subsystem = sata_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations sata_ops = {
|
||||
|
|
|
@ -71,20 +71,8 @@ static struct smbus_bus_operations lops_smbus_bus = {
|
|||
.write_byte = lsmbus_write_byte,
|
||||
};
|
||||
|
||||
static void smbus_set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations smbus_pci_ops = {
|
||||
.set_subsystem = smbus_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static void smbus_read_resources(struct device *dev)
|
||||
|
|
|
@ -84,13 +84,7 @@ static void usb_ehci_set_subsystem(struct device *dev, unsigned vendor,
|
|||
/* Enable writes to protected registers. */
|
||||
pci_write_config8(dev, 0x80, access_cntl | 1);
|
||||
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
pci_dev_set_subsystem(dev, vendor, device);
|
||||
|
||||
/* Restore protection. */
|
||||
pci_write_config8(dev, 0x80, access_cntl);
|
||||
|
|
|
@ -56,20 +56,8 @@ static const char *xhci_acpi_name(const struct device *dev)
|
|||
return "XHC";
|
||||
}
|
||||
|
||||
static void xhci_set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations xhci_pci_ops = {
|
||||
.set_subsystem = xhci_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations usb_xhci_ops = {
|
||||
|
|
|
@ -417,17 +417,6 @@ static void soc_lpc_enable(struct device *dev)
|
|||
soc_enable(dev);
|
||||
}
|
||||
|
||||
static void set_subsystem(struct device *dev, unsigned vendor, unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static void southbridge_inject_dsdt(struct device *dev)
|
||||
{
|
||||
global_nvs_t *gnvs = cbmem_add (CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));
|
||||
|
@ -448,7 +437,7 @@ static void southbridge_inject_dsdt(struct device *dev)
|
|||
}
|
||||
|
||||
static struct pci_operations pci_ops = {
|
||||
.set_subsystem = set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations device_ops = {
|
||||
|
|
|
@ -96,19 +96,8 @@ static void sata_enable(struct device *dev)
|
|||
{
|
||||
}
|
||||
|
||||
static void sata_set_subsystem(struct device *dev, unsigned vendor, unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations sata_pci_ops = {
|
||||
.set_subsystem = sata_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations sata_ops = {
|
||||
|
|
|
@ -40,20 +40,8 @@ static struct smbus_bus_operations lops_smbus_bus = {
|
|||
.read_byte = lsmbus_read_byte,
|
||||
};
|
||||
|
||||
static void smbus_set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations smbus_pci_ops = {
|
||||
.set_subsystem = smbus_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static void rangeley_smbus_read_resources(struct device *dev)
|
||||
|
|
|
@ -247,20 +247,8 @@ static void ac97_modem_init(struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static void ac97_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations ac97_pci_ops = {
|
||||
.set_subsystem = ac97_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations ac97_audio_ops = {
|
||||
|
|
|
@ -303,20 +303,8 @@ static void azalia_init(struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static void azalia_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations azalia_pci_ops = {
|
||||
.set_subsystem = azalia_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations azalia_ops = {
|
||||
|
|
|
@ -92,20 +92,8 @@ static void ide_init(struct device *dev)
|
|||
printk(BIOS_DEBUG, "\n");
|
||||
}
|
||||
|
||||
static void ide_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations ide_pci_ops = {
|
||||
.set_subsystem = ide_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations ide_ops = {
|
||||
|
|
|
@ -676,18 +676,6 @@ static void lpc_final(struct device *dev)
|
|||
outb(POST_OS_BOOT, 0x80);
|
||||
}
|
||||
|
||||
static void set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static void southbridge_inject_dsdt(struct device *dev)
|
||||
{
|
||||
global_nvs_t *gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));
|
||||
|
@ -728,7 +716,7 @@ static void southbridge_fill_ssdt(struct device *device)
|
|||
}
|
||||
|
||||
static struct pci_operations pci_ops = {
|
||||
.set_subsystem = set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations device_ops = {
|
||||
|
|
|
@ -200,20 +200,8 @@ static void sata_init(struct device *dev)
|
|||
pci_write_config32(dev, SATA_IR, reg32);
|
||||
}
|
||||
|
||||
static void sata_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations sata_pci_ops = {
|
||||
.set_subsystem = sata_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations sata_ops = {
|
||||
|
|
|
@ -81,20 +81,8 @@ static struct smbus_bus_operations lops_smbus_bus = {
|
|||
.block_write = lsmbus_block_write,
|
||||
};
|
||||
|
||||
static void smbus_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations smbus_pci_ops = {
|
||||
.set_subsystem = smbus_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static void smbus_read_resources(struct device *dev)
|
||||
|
|
|
@ -43,20 +43,8 @@ static void usb_init(struct device *dev)
|
|||
printk(BIOS_DEBUG, "done.\n");
|
||||
}
|
||||
|
||||
static void usb_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations usb_pci_ops = {
|
||||
.set_subsystem = usb_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations usb_ops = {
|
||||
|
|
|
@ -69,13 +69,7 @@ static void usb_ehci_set_subsystem(struct device *dev, unsigned int vendor,
|
|||
/* Enable writes to protected registers. */
|
||||
pci_write_config8(dev, 0x80, access_cntl | 1);
|
||||
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
pci_dev_set_subsystem(dev, vendor, device);
|
||||
|
||||
/* Restore protection. */
|
||||
pci_write_config8(dev, 0x80, access_cntl);
|
||||
|
|
|
@ -287,20 +287,8 @@ static void azalia_init(struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static void azalia_set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations azalia_pci_ops = {
|
||||
.set_subsystem = azalia_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations azalia_ops = {
|
||||
|
|
|
@ -527,17 +527,6 @@ static void i82801ix_lpc_read_resources(struct device *dev)
|
|||
res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED;
|
||||
}
|
||||
|
||||
static void set_subsystem(struct device *dev, unsigned vendor, unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static void southbridge_inject_dsdt(struct device *dev)
|
||||
{
|
||||
global_nvs_t *gnvs = cbmem_add (CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));
|
||||
|
@ -578,7 +567,7 @@ static void southbridge_fill_ssdt(struct device *device)
|
|||
}
|
||||
|
||||
static struct pci_operations pci_ops = {
|
||||
.set_subsystem = set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations device_ops = {
|
||||
|
|
|
@ -258,20 +258,8 @@ static void sata_enable(struct device *dev)
|
|||
pci_write_config16(dev, 0x90, map);
|
||||
}
|
||||
|
||||
static void sata_set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations sata_pci_ops = {
|
||||
.set_subsystem = sata_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations sata_ops = {
|
||||
|
|
|
@ -64,20 +64,8 @@ static struct smbus_bus_operations lops_smbus_bus = {
|
|||
.write_byte = lsmbus_write_byte,
|
||||
};
|
||||
|
||||
static void smbus_set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations smbus_pci_ops = {
|
||||
.set_subsystem = smbus_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static void smbus_read_resources(struct device *dev)
|
||||
|
|
|
@ -51,20 +51,8 @@ static void thermal_init(struct device *dev)
|
|||
pci_write_config32(dev, 0x10, 0);
|
||||
}
|
||||
|
||||
static void thermal_set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations thermal_pci_ops = {
|
||||
.set_subsystem = thermal_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations device_ops = {
|
||||
|
|
|
@ -44,13 +44,7 @@ static void usb_ehci_set_subsystem(struct device *dev, unsigned vendor,
|
|||
/* Enable writes to protected registers. */
|
||||
pci_write_config8(dev, 0x80, access_cntl | 1);
|
||||
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
pci_dev_set_subsystem(dev, vendor, device);
|
||||
|
||||
/* Restore protection. */
|
||||
pci_write_config8(dev, 0x80, access_cntl);
|
||||
|
|
|
@ -287,20 +287,8 @@ static void azalia_init(struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static void azalia_set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations azalia_pci_ops = {
|
||||
.set_subsystem = azalia_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations azalia_ops = {
|
||||
|
|
|
@ -684,17 +684,6 @@ static void i82801jx_lpc_read_resources(struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static void set_subsystem(struct device *dev, unsigned vendor, unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static void southbridge_inject_dsdt(struct device *dev)
|
||||
{
|
||||
global_nvs_t *gnvs = cbmem_add (CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));
|
||||
|
@ -734,7 +723,7 @@ static void southbridge_fill_ssdt(struct device *device)
|
|||
}
|
||||
|
||||
static struct pci_operations pci_ops = {
|
||||
.set_subsystem = set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations device_ops = {
|
||||
|
|
|
@ -253,20 +253,8 @@ static void sata_enable(struct device *dev)
|
|||
pci_write_config16(dev, 0x90, map);
|
||||
}
|
||||
|
||||
static void sata_set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations sata_pci_ops = {
|
||||
.set_subsystem = sata_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations sata_ops = {
|
||||
|
|
|
@ -91,20 +91,8 @@ static struct smbus_bus_operations lops_smbus_bus = {
|
|||
.block_write = lsmbus_block_write,
|
||||
};
|
||||
|
||||
static void smbus_set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations smbus_pci_ops = {
|
||||
.set_subsystem = smbus_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static void smbus_read_resources(struct device *dev)
|
||||
|
|
|
@ -51,20 +51,8 @@ static void thermal_init(struct device *dev)
|
|||
pci_write_config32(dev, 0x10, 0);
|
||||
}
|
||||
|
||||
static void thermal_set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations thermal_pci_ops = {
|
||||
.set_subsystem = thermal_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations device_ops = {
|
||||
|
|
|
@ -44,13 +44,7 @@ static void usb_ehci_set_subsystem(struct device *dev, unsigned vendor,
|
|||
/* Enable writes to protected registers. */
|
||||
pci_write_config8(dev, 0x80, access_cntl | 1);
|
||||
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
pci_dev_set_subsystem(dev, vendor, device);
|
||||
|
||||
/* Restore protection. */
|
||||
pci_write_config8(dev, 0x80, access_cntl);
|
||||
|
|
|
@ -313,20 +313,8 @@ static void azalia_init(struct device *dev)
|
|||
pci_write_config8(dev, 0x43, reg8);
|
||||
}
|
||||
|
||||
static void azalia_set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations azalia_pci_ops = {
|
||||
.set_subsystem = azalia_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations azalia_ops = {
|
||||
|
|
|
@ -609,18 +609,6 @@ static void pch_lpc_enable(struct device *dev)
|
|||
pch_enable(dev);
|
||||
}
|
||||
|
||||
static void set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static void southbridge_inject_dsdt(struct device *dev)
|
||||
{
|
||||
global_nvs_t *gnvs = cbmem_add (CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));
|
||||
|
@ -807,7 +795,7 @@ static void lpc_final(struct device *dev)
|
|||
}
|
||||
|
||||
static struct pci_operations pci_ops = {
|
||||
.set_subsystem = set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations device_ops = {
|
||||
|
|
|
@ -610,20 +610,8 @@ static void intel_me_init(struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static void set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations pci_ops = {
|
||||
.set_subsystem = set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations device_ops = {
|
||||
|
|
|
@ -235,19 +235,6 @@ static void sata_enable(struct device *dev)
|
|||
pci_write_config16(dev, 0x90, map);
|
||||
}
|
||||
|
||||
static void sata_set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor &
|
||||
0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static void sata_fill_ssdt(struct device *dev)
|
||||
{
|
||||
config_t *config = dev->chip_info;
|
||||
|
@ -255,7 +242,7 @@ static void sata_fill_ssdt(struct device *dev)
|
|||
}
|
||||
|
||||
static struct pci_operations sata_pci_ops = {
|
||||
.set_subsystem = sata_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations sata_ops = {
|
||||
|
|
|
@ -71,20 +71,8 @@ static struct smbus_bus_operations lops_smbus_bus = {
|
|||
.write_byte = lsmbus_write_byte,
|
||||
};
|
||||
|
||||
static void smbus_set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations smbus_pci_ops = {
|
||||
.set_subsystem = smbus_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static void smbus_read_resources(struct device *dev)
|
||||
|
|
|
@ -45,21 +45,8 @@ static void thermal_init(struct device *dev)
|
|||
printk(BIOS_DEBUG, "Thermal init done.\n");
|
||||
}
|
||||
|
||||
static void set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor &
|
||||
0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations pci_ops = {
|
||||
.set_subsystem = set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations thermal_ops = {
|
||||
|
|
|
@ -78,14 +78,7 @@ static void usb_ehci_set_subsystem(struct device *dev, unsigned vendor,
|
|||
/* Enable writes to protected registers. */
|
||||
pci_write_config8(dev, 0x80, access_cntl | 1);
|
||||
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor &
|
||||
0xffff));
|
||||
}
|
||||
pci_dev_set_subsystem(dev, vendor, device);
|
||||
|
||||
/* Restore protection. */
|
||||
pci_write_config8(dev, 0x80, access_cntl);
|
||||
|
|
|
@ -154,20 +154,8 @@ static void azalia_init(struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static void azalia_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations azalia_pci_ops = {
|
||||
.set_subsystem = azalia_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations azalia_ops = {
|
||||
|
|
|
@ -723,17 +723,6 @@ static void pch_lpc_enable(struct device *dev)
|
|||
pch_enable(dev);
|
||||
}
|
||||
|
||||
static void set_subsystem(struct device *dev, unsigned vendor, unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static void southbridge_inject_dsdt(struct device *dev)
|
||||
{
|
||||
global_nvs_t *gnvs;
|
||||
|
@ -981,7 +970,7 @@ static void lpc_final(struct device *dev)
|
|||
}
|
||||
|
||||
static struct pci_operations pci_ops = {
|
||||
.set_subsystem = set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations device_ops = {
|
||||
|
|
|
@ -874,20 +874,8 @@ static void intel_me_init(struct device *dev)
|
|||
*/
|
||||
}
|
||||
|
||||
static void set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations pci_ops = {
|
||||
.set_subsystem = set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static void intel_me_enable(struct device *dev)
|
||||
|
|
|
@ -323,20 +323,8 @@ static void sata_enable(struct device *dev)
|
|||
pci_write_config16(dev, 0x90, map);
|
||||
}
|
||||
|
||||
static void sata_set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations sata_pci_ops = {
|
||||
.set_subsystem = sata_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations sata_ops = {
|
||||
|
|
|
@ -237,20 +237,8 @@ static void serialio_init(struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static void serialio_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations pci_ops = {
|
||||
.set_subsystem = serialio_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations device_ops = {
|
||||
|
|
|
@ -70,20 +70,8 @@ static struct smbus_bus_operations lops_smbus_bus = {
|
|||
.write_byte = lsmbus_write_byte,
|
||||
};
|
||||
|
||||
static void smbus_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations smbus_pci_ops = {
|
||||
.set_subsystem = smbus_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static void smbus_read_resources(struct device *dev)
|
||||
|
|
|
@ -175,13 +175,7 @@ static void usb_ehci_set_subsystem(struct device *dev, unsigned int vendor,
|
|||
/* Enable writes to protected registers. */
|
||||
pci_write_config8(dev, 0x80, access_cntl | 1);
|
||||
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
pci_dev_set_subsystem(dev, vendor, device);
|
||||
|
||||
/* Restore protection. */
|
||||
pci_write_config8(dev, 0x80, access_cntl);
|
||||
|
|
|
@ -373,20 +373,8 @@ static void usb_xhci_init(struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static void usb_xhci_set_subsystem(struct device *dev, unsigned int vendor,
|
||||
unsigned int device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations lops_pci = {
|
||||
.set_subsystem = &usb_xhci_set_subsystem,
|
||||
.set_subsystem = &pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations usb_xhci_ops = {
|
||||
|
|
|
@ -254,20 +254,8 @@ static void azalia_init(struct device *dev)
|
|||
#endif
|
||||
}
|
||||
|
||||
static void azalia_set_subsystem(struct device *dev, unsigned vendor,
|
||||
unsigned device)
|
||||
{
|
||||
if (!vendor || !device) {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
pci_read_config32(dev, PCI_VENDOR_ID));
|
||||
} else {
|
||||
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_operations azalia_pci_ops = {
|
||||
.set_subsystem = azalia_set_subsystem,
|
||||
.set_subsystem = pci_dev_set_subsystem,
|
||||
};
|
||||
|
||||
static struct device_operations azalia_ops = {
|
||||
|
|
Loading…
Reference in New Issue