diff options
author | Luis R. Rodriguez <mcgrof@kernel.org> | 2015-10-24 13:41:08 -0700 |
---|---|---|
committer | Luis R. Rodriguez <mcgrof@kernel.org> | 2016-02-11 08:42:16 -0800 |
commit | fd898e6884668e774331ddb89edf713baa36a93a (patch) | |
tree | 996a4dcc58adc5bcc5a4c2ae1b98f7fe1a48dee9 | |
parent | 0d6a896dd1dcf247d1ffe0afbf63413c0dcfe1ed (diff) | |
download | linker-tables-fd898e6884668e774331ddb89edf713baa36a93a.tar.gz |
add pci
Forgot to add this to the tree. Note that if
we make PCI critical, since its failing right
now we end up with:
Completed initializing Foo thing !
Initializing PCI buses ...
Early init failed
So all of init fails. If we remove the critical
annotation we get:
Initializing PCI buses ...
Failed to initialize PCI buses on early init, but its not critical
Initializing ACME(TM) Driver ...
Completed initializing ACME(TM) Driver !
We want to add support for ACME driver to be able to
annotate it depends on PCI subsystem for this simple
example case but to let the init sequence go on.
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
-rw-r--r-- | pci.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -0,0 +1,23 @@ +#include <stdio.h> +#include <unistd.h> +#include <errno.h> + +#include "tables.h" +#include "init.h" +#include "pci.h" + +static int early_init_pci(void) { + sleep(1); + + return -EINVAL; +} + +int detect_pci(void) { + return 1; +} + +struct init_fn pci_init_fn __init_fn(INIT_NORMAL) = { + .detect = detect_pci, + .early_init = early_init_pci, + .name = "PCI buses", +}; |