{cpu,soc}: Use DEVICE_NOOP macro over dummy symbol
Change-Id: Iaf2b2873bd1c52d7f936bd9b483e194a0872a626 Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/7285 Tested-by: build bot (Jenkins) Reviewed-by: Bruce Griffith <Bruce.Griffith@se-eng.com>
This commit is contained in:
@ -25,13 +25,9 @@ static void cpu_init(struct device *dev)
|
|||||||
/* TODO: Check if anything else needs to be explicitly initialized */
|
/* TODO: Check if anything else needs to be explicitly initialized */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cpu_noop(struct device *dev)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct device_operations cpu_ops = {
|
static struct device_operations cpu_ops = {
|
||||||
.read_resources = cpu_noop,
|
.read_resources = DEVICE_NOOP,
|
||||||
.set_resources = cpu_noop,
|
.set_resources = DEVICE_NOOP,
|
||||||
.enable_resources = cpu_enable_resources,
|
.enable_resources = cpu_enable_resources,
|
||||||
.init = cpu_init,
|
.init = cpu_init,
|
||||||
.scan_bus = NULL,
|
.scan_bus = NULL,
|
||||||
|
@ -44,9 +44,6 @@ static void sc520_enable_resources(struct device *dev) {
|
|||||||
pci_write_config8(dev, PCI_COMMAND, command);
|
pci_write_config8(dev, PCI_COMMAND, command);
|
||||||
command = pci_read_config8(dev, PCI_COMMAND);
|
command = pci_read_config8(dev, PCI_COMMAND);
|
||||||
printk(BIOS_SPEW, "========>%s, command 0x%x\n", __func__, command);
|
printk(BIOS_SPEW, "========>%s, command 0x%x\n", __func__, command);
|
||||||
/*
|
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sc520_read_resources(device_t dev)
|
static void sc520_read_resources(device_t dev)
|
||||||
@ -170,14 +167,10 @@ static void cpu_bus_init(device_t dev)
|
|||||||
printk(BIOS_SPEW, "cpu_bus_init\n");
|
printk(BIOS_SPEW, "cpu_bus_init\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cpu_bus_noop(device_t dev)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct device_operations cpu_bus_ops = {
|
static struct device_operations cpu_bus_ops = {
|
||||||
.read_resources = cpu_bus_noop,
|
.read_resources = DEVICE_NOOP,
|
||||||
.set_resources = cpu_bus_noop,
|
.set_resources = DEVICE_NOOP,
|
||||||
.enable_resources = cpu_bus_noop,
|
.enable_resources = DEVICE_NOOP,
|
||||||
.init = cpu_bus_init,
|
.init = cpu_bus_init,
|
||||||
.scan_bus = 0,
|
.scan_bus = 0,
|
||||||
};
|
};
|
||||||
|
@ -40,12 +40,10 @@ static struct device_operations pci_domain_ops = {
|
|||||||
.ops_pci_bus = pci_bus_default_ops,
|
.ops_pci_bus = pci_bus_default_ops,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void cpu_bus_noop(device_t dev) { }
|
|
||||||
|
|
||||||
static struct device_operations cpu_bus_ops = {
|
static struct device_operations cpu_bus_ops = {
|
||||||
.read_resources = cpu_bus_noop,
|
.read_resources = DEVICE_NOOP,
|
||||||
.set_resources = cpu_bus_noop,
|
.set_resources = DEVICE_NOOP,
|
||||||
.enable_resources = cpu_bus_noop,
|
.enable_resources = DEVICE_NOOP,
|
||||||
.init = baytrail_init_cpus,
|
.init = baytrail_init_cpus,
|
||||||
.scan_bus = NULL,
|
.scan_bus = NULL,
|
||||||
};
|
};
|
||||||
|
@ -36,12 +36,10 @@ static struct device_operations pci_domain_ops = {
|
|||||||
.ops_pci_bus = &pci_ops_mmconf,
|
.ops_pci_bus = &pci_ops_mmconf,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void cpu_bus_noop(device_t dev) { }
|
|
||||||
|
|
||||||
static struct device_operations cpu_bus_ops = {
|
static struct device_operations cpu_bus_ops = {
|
||||||
.read_resources = &cpu_bus_noop,
|
.read_resources = DEVICE_NOOP,
|
||||||
.set_resources = &cpu_bus_noop,
|
.set_resources = DEVICE_NOOP,
|
||||||
.enable_resources = &cpu_bus_noop,
|
.enable_resources = DEVICE_NOOP,
|
||||||
.init = &broadwell_init_cpus,
|
.init = &broadwell_init_cpus,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -50,12 +50,10 @@ static struct device_operations pci_domain_ops = {
|
|||||||
.ops_pci_bus = pci_bus_default_ops,
|
.ops_pci_bus = pci_bus_default_ops,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void cpu_bus_noop(device_t dev) { }
|
|
||||||
|
|
||||||
static struct device_operations cpu_bus_ops = {
|
static struct device_operations cpu_bus_ops = {
|
||||||
.read_resources = cpu_bus_noop,
|
.read_resources = DEVICE_NOOP,
|
||||||
.set_resources = cpu_bus_noop,
|
.set_resources = DEVICE_NOOP,
|
||||||
.enable_resources = cpu_bus_noop,
|
.enable_resources = DEVICE_NOOP,
|
||||||
.init = baytrail_init_cpus,
|
.init = baytrail_init_cpus,
|
||||||
.scan_bus = NULL,
|
.scan_bus = NULL,
|
||||||
};
|
};
|
||||||
|
@ -45,13 +45,9 @@ static void soc_init(device_t dev)
|
|||||||
printk(BIOS_INFO, "CPU: Tegra124\n");
|
printk(BIOS_INFO, "CPU: Tegra124\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void soc_noop(device_t dev)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct device_operations soc_ops = {
|
static struct device_operations soc_ops = {
|
||||||
.read_resources = soc_noop,
|
.read_resources = DEVICE_NOOP,
|
||||||
.set_resources = soc_noop,
|
.set_resources = DEVICE_NOOP,
|
||||||
.enable_resources = soc_enable,
|
.enable_resources = soc_enable,
|
||||||
.init = soc_init,
|
.init = soc_init,
|
||||||
.scan_bus = 0,
|
.scan_bus = 0,
|
||||||
|
@ -129,13 +129,9 @@ static void cpu_init(device_t dev)
|
|||||||
cpu_id, get_arm_clk() / (1024*1024));
|
cpu_id, get_arm_clk() / (1024*1024));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cpu_noop(device_t dev)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct device_operations cpu_ops = {
|
static struct device_operations cpu_ops = {
|
||||||
.read_resources = cpu_noop,
|
.read_resources = DEVICE_NOOP,
|
||||||
.set_resources = cpu_noop,
|
.set_resources = DEVICE_NOOP,
|
||||||
.enable_resources = cpu_enable,
|
.enable_resources = cpu_enable,
|
||||||
.init = cpu_init,
|
.init = cpu_init,
|
||||||
.scan_bus = 0,
|
.scan_bus = 0,
|
||||||
|
@ -160,13 +160,9 @@ static void cpu_init(device_t dev)
|
|||||||
cpu_id, get_arm_clk() / 1000000);
|
cpu_id, get_arm_clk() / 1000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cpu_noop(device_t dev)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct device_operations cpu_ops = {
|
static struct device_operations cpu_ops = {
|
||||||
.read_resources = cpu_noop,
|
.read_resources = DEVICE_NOOP,
|
||||||
.set_resources = cpu_noop,
|
.set_resources = DEVICE_NOOP,
|
||||||
.enable_resources = cpu_enable,
|
.enable_resources = cpu_enable,
|
||||||
.init = cpu_init,
|
.init = cpu_init,
|
||||||
.scan_bus = 0,
|
.scan_bus = 0,
|
||||||
|
Reference in New Issue
Block a user