sb/broadcom/bcm5785: Consolidate PCI set_subsystem()
This one uses vendor-specific register for the write. Change-Id: Ie36a87314054d00daed6a63b495bd5f5eabef66e Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/31989 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subrata.banik@intel.com>
This commit is contained in:
committed by
Patrick Georgi
parent
321bce4a3f
commit
d096a64bcd
@@ -86,6 +86,13 @@ void bcm5785_enable(struct device *dev)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void bcm5785_set_subsystem(struct device *dev, unsigned int vendor,
|
||||||
|
unsigned int device)
|
||||||
|
{
|
||||||
|
pci_write_config32(dev, 0x40,
|
||||||
|
((device & 0xffff) << 16) | (vendor & 0xffff));
|
||||||
|
}
|
||||||
|
|
||||||
struct chip_operations southbridge_broadcom_bcm5785_ops = {
|
struct chip_operations southbridge_broadcom_bcm5785_ops = {
|
||||||
CHIP_NAME("Serverworks BCM5785 Southbridge")
|
CHIP_NAME("Serverworks BCM5785 Southbridge")
|
||||||
.enable_dev = bcm5785_enable,
|
.enable_dev = bcm5785_enable,
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
#ifndef BCM5785_H
|
#ifndef BCM5785_H
|
||||||
#define BCM5785_H
|
#define BCM5785_H
|
||||||
|
|
||||||
|
#include <device/device.h>
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
|
|
||||||
#ifndef __PRE_RAM__
|
#ifndef __PRE_RAM__
|
||||||
@@ -25,6 +26,9 @@ void bcm5785_enable(struct device *dev);
|
|||||||
void enable_fid_change_on_sb(unsigned sbbusn, unsigned sbdn);
|
void enable_fid_change_on_sb(unsigned sbbusn, unsigned sbdn);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void bcm5785_set_subsystem(struct device *dev, unsigned int vendor,
|
||||||
|
unsigned int device);
|
||||||
|
|
||||||
void ldtstop_sb(void);
|
void ldtstop_sb(void);
|
||||||
|
|
||||||
#endif /* BCM5785_H */
|
#endif /* BCM5785_H */
|
||||||
|
@@ -35,15 +35,8 @@ static void ide_init(struct device *dev)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lpci_set_subsystem(struct device *dev, unsigned vendor,
|
|
||||||
unsigned device)
|
|
||||||
{
|
|
||||||
pci_write_config32(dev, 0x40,
|
|
||||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct pci_operations lops_pci = {
|
static struct pci_operations lops_pci = {
|
||||||
.set_subsystem = lpci_set_subsystem,
|
.set_subsystem = bcm5785_set_subsystem,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct device_operations ide_ops = {
|
static struct device_operations ide_ops = {
|
||||||
|
@@ -115,15 +115,8 @@ static void bcm5785_lpc_enable_resources(struct device *dev)
|
|||||||
bcm5785_lpc_enable_childrens_resources(dev);
|
bcm5785_lpc_enable_childrens_resources(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lpci_set_subsystem(struct device *dev, unsigned vendor,
|
|
||||||
unsigned device)
|
|
||||||
{
|
|
||||||
pci_write_config32(dev, 0x40,
|
|
||||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct pci_operations lops_pci = {
|
static struct pci_operations lops_pci = {
|
||||||
.set_subsystem = lpci_set_subsystem,
|
.set_subsystem = bcm5785_set_subsystem,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct device_operations lpc_ops = {
|
static struct device_operations lpc_ops = {
|
||||||
|
@@ -68,15 +68,8 @@ static void sata_init(struct device *dev)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lpci_set_subsystem(struct device *dev, unsigned vendor,
|
|
||||||
unsigned device)
|
|
||||||
{
|
|
||||||
pci_write_config32(dev, 0x40,
|
|
||||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct pci_operations lops_pci = {
|
static struct pci_operations lops_pci = {
|
||||||
.set_subsystem = lpci_set_subsystem,
|
.set_subsystem = bcm5785_set_subsystem,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct device_operations sata_ops = {
|
static struct device_operations sata_ops = {
|
||||||
|
@@ -32,15 +32,8 @@ static void usb_init(struct device *dev)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lpci_set_subsystem(struct device *dev, unsigned vendor,
|
|
||||||
unsigned device)
|
|
||||||
{
|
|
||||||
pci_write_config32(dev, 0x40,
|
|
||||||
((device & 0xffff) << 16) | (vendor & 0xffff));
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct pci_operations lops_pci = {
|
static struct pci_operations lops_pci = {
|
||||||
.set_subsystem = lpci_set_subsystem,
|
.set_subsystem = bcm5785_set_subsystem,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct device_operations usb_ops = {
|
static struct device_operations usb_ops = {
|
||||||
|
Reference in New Issue
Block a user