]> git.sur5r.net Git - u-boot/blobdiff - drivers/cpu/cpu-uclass.c
pci: Set PCI_COMMAND_IO bit for VGA device
[u-boot] / drivers / cpu / cpu-uclass.c
index d6be9d4dcf5cd534a9efb5627a91dfe405887065..7660f99ef5956804685b6cd7b3789fa1b99a82fc 100644 (file)
@@ -12,6 +12,8 @@
 #include <dm/lists.h>
 #include <dm/root.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 int cpu_get_desc(struct udevice *dev, char *buf, int size)
 {
        struct cpu_ops *ops = cpu_get_ops(dev);
@@ -32,6 +34,16 @@ int cpu_get_info(struct udevice *dev, struct cpu_info *info)
        return ops->get_info(dev, info);
 }
 
+int cpu_get_count(struct udevice *dev)
+{
+       struct cpu_ops *ops = cpu_get_ops(dev);
+
+       if (!ops->get_count)
+               return -ENOSYS;
+
+       return ops->get_count(dev);
+}
+
 U_BOOT_DRIVER(cpu_bus) = {
        .name   = "cpu_bus",
        .id     = UCLASS_SIMPLE_BUS,