|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v1 09/14] xen/arm: Add cmdline boot option "pci=on"
Add cmdline boot option "pci=on" to enable/disable the PCI init during
boot.
Signed-off-by: Rahul Singh <rahul.singh@xxxxxxx>
---
xen/arch/arm/pci/pci.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/xen/arch/arm/pci/pci.c b/xen/arch/arm/pci/pci.c
index d1c9cf997d..dc63bbc2a2 100644
--- a/xen/arch/arm/pci/pci.c
+++ b/xen/arch/arm/pci/pci.c
@@ -62,8 +62,38 @@ static void __init acpi_pci_init(void)
static inline void __init acpi_pci_init(void) { }
#endif
+static bool __initdata param_pci_enable;
+
+static int __init parse_pci_param(const char *arg)
+{
+ if ( !arg )
+ {
+ param_pci_enable = false;
+ return 0;
+ }
+
+ switch ( parse_bool(arg, NULL) )
+ {
+ case 0:
+ param_pci_enable = false;
+ return 0;
+ case 1:
+ param_pci_enable = true;
+ return 0;
+ }
+
+ return -EINVAL;
+}
+custom_param("pci", parse_pci_param);
+
static int __init pci_init(void)
{
+ /*
+ * Enable PCI when has been enabled explicitly (pci=on)
+ */
+ if ( !param_pci_enable)
+ return 0;
+
if ( acpi_disabled )
dt_pci_init();
else
--
2.17.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |