Use the CPU driver's probe() method to perform the CPU init. This will happen
automatically when the first CPU is probed.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
{
const void *blob = gd->fdt_blob;
struct pci_controller *hose;
- struct x86_cpu_priv *cpu;
int sata_node, gma_node;
int ret;
bd82x6x_usb_ehci_init(PCH_EHCI1_DEV);
bd82x6x_usb_ehci_init(PCH_EHCI2_DEV);
- cpu = calloc(1, sizeof(*cpu));
- if (!cpu)
- return -ENOMEM;
- model_206ax_init(cpu);
-
gma_node = fdtdec_next_compatible(blob, 0, COMPAT_INTEL_GMA);
if (gma_node < 0) {
debug("%s: Cannot find GMA node\n", __func__);
static unsigned ehci_debug_addr;
#endif
-int model_206ax_init(struct x86_cpu_priv *cpu)
+static int model_206ax_init(void)
{
int ret;
static int cpu_x86_model_206ax_probe(struct udevice *dev)
{
+ if (dev->seq == 0)
+ model_206ax_init();
+
return 0;
}
int gma_func0_init(struct udevice *dev, const void *blob, int node);
int bd82x6x_init_extra(void);
-/**
- * struct x86_cpu_priv - Information about a single CPU
- *
- * @apic_id: Advanced Programmable Interrupt Controller Identifier, which is
- * just a number representing the CPU core
- *
- * TODO: Move this to driver model once lifecycle is understood
- */
-struct x86_cpu_priv {
- int apic_id;
- int start_err;
-};
-
-int model_206ax_init(struct x86_cpu_priv *cpu);
-
#endif