Tidy the file a bit by removing unused paths. Also removed unused kernel options that do not currently make sense on arm/arm64
Signed-off-by: Graeme Gregory graeme.gregory@linaro.org --- drivers/acpi/plat/arm/boot.c | 115 ++----------------------------------------- 1 file changed, 5 insertions(+), 110 deletions(-)
diff --git a/drivers/acpi/plat/arm/boot.c b/drivers/acpi/plat/arm/boot.c index 8600cd0..881478d 100644 --- a/drivers/acpi/plat/arm/boot.c +++ b/drivers/acpi/plat/arm/boot.c @@ -24,9 +24,6 @@ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
-/* - * BOZO: this needs to be done right.... - */ #include <linux/init.h> #include <linux/acpi.h> #include <linux/acpi_pmtmr.h> @@ -46,8 +43,12 @@ #include <asm/smp.h> #include <asm/acpi.h>
-static int __initdata acpi_force; +/* + * We never plad to use RSDT on arm/arm64 as its deprecated in spec but this + * variable is still required by the ACPI core + */ u32 acpi_rsdt_forced; + int acpi_disabled; EXPORT_SYMBOL(acpi_disabled);
@@ -223,56 +224,6 @@ acpi_parse_gic_distributor(struct acpi_subtable_header *header, return 0; }
-/* - * acpi_pic_sci_set_trigger() - * - * use ELCR to set PIC-mode trigger type for SCI - * - * If a PIC-mode SCI is not recognized or gives spurious IRQ7's - * it may require Edge Trigger -- use "acpi_sci=edge" - * - * Port 0x4d0-4d1 are ECLR1 and ECLR2, the Edge/Level Control Registers - * for the 8259 PIC. bit[n] = 1 means irq[n] is Level, otherwise Edge. - * ECLR1 is IRQs 0-7 (IRQ 0, 1, 2 must be 0) - * ECLR2 is IRQs 8-15 (IRQ 8, 13 must be 0) - */ - -void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger) -{ - unsigned int mask = 1 << irq; - unsigned int old, new; - - /* Real old ELCR mask */ - old = inb(0x4d0) | (inb(0x4d1) << 8); - - /* - * If we use ACPI to set PCI IRQs, then we should clear ELCR - * since we will set it correctly as we enable the PCI irq - * routing. - */ - new = acpi_noirq ? old : 0; - - /* - * Update SCI information in the ELCR, it isn't in the PCI - * routing tables.. - */ - switch (trigger) { - case 1: /* Edge - clear */ - new &= ~mask; - break; - case 3: /* Level - set */ - new |= mask; - break; - } - - if (old == new) - return; - - printk(PREFIX "setting ELCR to %04x (from %04x)\n", new, old); - outb(new, 0x4d0); - outb(new >> 8, 0x4d1); -} - int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) { *irq = gsi_to_irq(gsi); @@ -812,70 +763,14 @@ static int __init parse_acpi(char *arg) if (strcmp(arg, "off") == 0) { disable_acpi(); } - /* acpi=force to over-ride black-list */ - else if (strcmp(arg, "force") == 0) { - acpi_force = 1; - acpi_disabled = 0; - } /* acpi=strict disables out-of-spec workarounds */ else if (strcmp(arg, "strict") == 0) { acpi_strict = 1; } - /* acpi=rsdt use RSDT instead of XSDT */ - else if (strcmp(arg, "rsdt") == 0) { - acpi_rsdt_forced = 1; - } - /* "acpi=noirq" disables ACPI interrupt routing */ - else if (strcmp(arg, "noirq") == 0) { - acpi_noirq_set(); - } - /* "acpi=copy_dsdt" copys DSDT */ - else if (strcmp(arg, "copy_dsdt") == 0) { - acpi_gbl_copy_dsdt_locally = 1; - } else { - /* Core will printk when we return error. */ - return -EINVAL; - } return 0; } early_param("acpi", parse_acpi);
-/* FIXME: Using pci= for an ACPI parameter is a travesty. */ -static int __init parse_pci(char *arg) -{ - if (arg && strcmp(arg, "noacpi") == 0) - acpi_disable_pci(); - return 0; -} -early_param("pci", parse_pci); - -int __init acpi_mps_check(void) -{ - return 0; -} - -static int __init setup_acpi_sci(char *s) -{ - if (!s) - return -EINVAL; - if (!strcmp(s, "edge")) - acpi_sci_flags = ACPI_MADT_TRIGGER_EDGE | - (acpi_sci_flags & ~ACPI_MADT_TRIGGER_MASK); - else if (!strcmp(s, "level")) - acpi_sci_flags = ACPI_MADT_TRIGGER_LEVEL | - (acpi_sci_flags & ~ACPI_MADT_TRIGGER_MASK); - else if (!strcmp(s, "high")) - acpi_sci_flags = ACPI_MADT_POLARITY_ACTIVE_HIGH | - (acpi_sci_flags & ~ACPI_MADT_POLARITY_MASK); - else if (!strcmp(s, "low")) - acpi_sci_flags = ACPI_MADT_POLARITY_ACTIVE_LOW | - (acpi_sci_flags & ~ACPI_MADT_POLARITY_MASK); - else - return -EINVAL; - return 0; -} -early_param("acpi_sci", setup_acpi_sci); - int __acpi_acquire_global_lock(unsigned int *lock) { unsigned int old, new, val;
Applied and tested on foundation-v8
Acked-by: Naresh Bhat naresh.bhat@linaro.org
On 29 August 2013 14:40, Graeme Gregory graeme.gregory@linaro.org wrote:
Tidy the file a bit by removing unused paths. Also removed unused kernel options that do not currently make sense on arm/arm64
Signed-off-by: Graeme Gregory graeme.gregory@linaro.org
drivers/acpi/plat/arm/boot.c | 115 ++----------------------------------------- 1 file changed, 5 insertions(+), 110 deletions(-)
diff --git a/drivers/acpi/plat/arm/boot.c b/drivers/acpi/plat/arm/boot.c index 8600cd0..881478d 100644 --- a/drivers/acpi/plat/arm/boot.c +++ b/drivers/acpi/plat/arm/boot.c @@ -24,9 +24,6 @@
*/
-/*
- BOZO: this needs to be done right....
- */
#include <linux/init.h> #include <linux/acpi.h> #include <linux/acpi_pmtmr.h> @@ -46,8 +43,12 @@ #include <asm/smp.h> #include <asm/acpi.h>
-static int __initdata acpi_force; +/*
- We never plad to use RSDT on arm/arm64 as its deprecated in spec but this
- variable is still required by the ACPI core
- */
u32 acpi_rsdt_forced;
int acpi_disabled; EXPORT_SYMBOL(acpi_disabled);
@@ -223,56 +224,6 @@ acpi_parse_gic_distributor(struct acpi_subtable_header *header, return 0; }
-/*
- acpi_pic_sci_set_trigger()
- use ELCR to set PIC-mode trigger type for SCI
- If a PIC-mode SCI is not recognized or gives spurious IRQ7's
- it may require Edge Trigger -- use "acpi_sci=edge"
- Port 0x4d0-4d1 are ECLR1 and ECLR2, the Edge/Level Control Registers
- for the 8259 PIC. bit[n] = 1 means irq[n] is Level, otherwise Edge.
- ECLR1 is IRQs 0-7 (IRQ 0, 1, 2 must be 0)
- ECLR2 is IRQs 8-15 (IRQ 8, 13 must be 0)
- */
-void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger) -{
unsigned int mask = 1 << irq;
unsigned int old, new;
/* Real old ELCR mask */
old = inb(0x4d0) | (inb(0x4d1) << 8);
/*
* If we use ACPI to set PCI IRQs, then we should clear ELCR
* since we will set it correctly as we enable the PCI irq
* routing.
*/
new = acpi_noirq ? old : 0;
/*
* Update SCI information in the ELCR, it isn't in the PCI
* routing tables..
*/
switch (trigger) {
case 1: /* Edge - clear */
new &= ~mask;
break;
case 3: /* Level - set */
new |= mask;
break;
}
if (old == new)
return;
printk(PREFIX "setting ELCR to %04x (from %04x)\n", new, old);
outb(new, 0x4d0);
outb(new >> 8, 0x4d1);
-}
int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) { *irq = gsi_to_irq(gsi); @@ -812,70 +763,14 @@ static int __init parse_acpi(char *arg) if (strcmp(arg, "off") == 0) { disable_acpi(); }
/* acpi=force to over-ride black-list */
else if (strcmp(arg, "force") == 0) {
acpi_force = 1;
acpi_disabled = 0;
} /* acpi=strict disables out-of-spec workarounds */ else if (strcmp(arg, "strict") == 0) { acpi_strict = 1; }
/* acpi=rsdt use RSDT instead of XSDT */
else if (strcmp(arg, "rsdt") == 0) {
acpi_rsdt_forced = 1;
}
/* "acpi=noirq" disables ACPI interrupt routing */
else if (strcmp(arg, "noirq") == 0) {
acpi_noirq_set();
}
/* "acpi=copy_dsdt" copys DSDT */
else if (strcmp(arg, "copy_dsdt") == 0) {
acpi_gbl_copy_dsdt_locally = 1;
} else {
/* Core will printk when we return error. */
return -EINVAL;
} return 0;
} early_param("acpi", parse_acpi);
-/* FIXME: Using pci= for an ACPI parameter is a travesty. */ -static int __init parse_pci(char *arg) -{
if (arg && strcmp(arg, "noacpi") == 0)
acpi_disable_pci();
return 0;
-} -early_param("pci", parse_pci);
-int __init acpi_mps_check(void) -{
return 0;
-}
-static int __init setup_acpi_sci(char *s) -{
if (!s)
return -EINVAL;
if (!strcmp(s, "edge"))
acpi_sci_flags = ACPI_MADT_TRIGGER_EDGE |
(acpi_sci_flags & ~ACPI_MADT_TRIGGER_MASK);
else if (!strcmp(s, "level"))
acpi_sci_flags = ACPI_MADT_TRIGGER_LEVEL |
(acpi_sci_flags & ~ACPI_MADT_TRIGGER_MASK);
else if (!strcmp(s, "high"))
acpi_sci_flags = ACPI_MADT_POLARITY_ACTIVE_HIGH |
(acpi_sci_flags & ~ACPI_MADT_POLARITY_MASK);
else if (!strcmp(s, "low"))
acpi_sci_flags = ACPI_MADT_POLARITY_ACTIVE_LOW |
(acpi_sci_flags & ~ACPI_MADT_POLARITY_MASK);
else
return -EINVAL;
return 0;
-} -early_param("acpi_sci", setup_acpi_sci);
int __acpi_acquire_global_lock(unsigned int *lock) { unsigned int old, new, val; -- 1.8.3.1
Linaro-acpi mailing list Linaro-acpi@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-acpi
On Thu, Aug 29, 2013 at 10:10:38AM +0100, Graeme Gregory wrote:
Tidy the file a bit by removing unused paths. Also removed unused kernel options that do not currently make sense on arm/arm64
Signed-off-by: Graeme Gregory graeme.gregory@linaro.org
drivers/acpi/plat/arm/boot.c | 115 ++----------------------------------------- 1 file changed, 5 insertions(+), 110 deletions(-)
diff --git a/drivers/acpi/plat/arm/boot.c b/drivers/acpi/plat/arm/boot.c index 8600cd0..881478d 100644 --- a/drivers/acpi/plat/arm/boot.c +++ b/drivers/acpi/plat/arm/boot.c @@ -24,9 +24,6 @@
*/
-/*
- BOZO: this needs to be done right....
- */
#include <linux/init.h> #include <linux/acpi.h> #include <linux/acpi_pmtmr.h> @@ -46,8 +43,12 @@ #include <asm/smp.h> #include <asm/acpi.h>
-static int __initdata acpi_force; +/*
- We never plad to use RSDT on arm/arm64 as its deprecated in spec but this
plad -> planned
On Thu, Aug 29, 2013 at 02:43:03PM +0000, Lurndal, Scott wrote:
On Thu, Aug 29, 2013 at 10:10:38AM +0100, Graeme Gregory wrote:
Tidy the file a bit by removing unused paths. Also removed unused kernel options that do not currently make sense on arm/arm64
Signed-off-by: Graeme Gregory graeme.gregory@linaro.org
drivers/acpi/plat/arm/boot.c | 115 ++----------------------------------------- 1 file changed, 5 insertions(+), 110 deletions(-)
diff --git a/drivers/acpi/plat/arm/boot.c b/drivers/acpi/plat/arm/boot.c index 8600cd0..881478d 100644 --- a/drivers/acpi/plat/arm/boot.c +++ b/drivers/acpi/plat/arm/boot.c @@ -24,9 +24,6 @@
*/
-/*
- BOZO: this needs to be done right....
- */
#include <linux/init.h> #include <linux/acpi.h> #include <linux/acpi_pmtmr.h> @@ -46,8 +43,12 @@ #include <asm/smp.h> #include <asm/acpi.h>
-static int __initdata acpi_force; +/*
- We never plad to use RSDT on arm/arm64 as its deprecated in spec but this
plad -> planned
Oh yes, will incorporate that in pushed patch.
G
On 08/29/2013 03:10 AM, Graeme Gregory wrote:
Tidy the file a bit by removing unused paths. Also removed unused kernel options that do not currently make sense on arm/arm64
Signed-off-by: Graeme Gregory graeme.gregory@linaro.org
drivers/acpi/plat/arm/boot.c | 115 ++----------------------------------------- 1 file changed, 5 insertions(+), 110 deletions(-)
diff --git a/drivers/acpi/plat/arm/boot.c b/drivers/acpi/plat/arm/boot.c index 8600cd0..881478d 100644 --- a/drivers/acpi/plat/arm/boot.c +++ b/drivers/acpi/plat/arm/boot.c @@ -24,9 +24,6 @@
*/
[snip...]
- }
- /* "acpi=copy_dsdt" copys DSDT */
- else if (strcmp(arg, "copy_dsdt") == 0) {
acpi_gbl_copy_dsdt_locally = 1;
I'll have to do some research, but we may want to keep this option. What I don't recall is if this is required to be able to replace the DSDT once the kernel is up and running, or if the use case is just for those situations where I want to get tables from some form of storage that the kernel will be shutting down in the near future...
On Thu, Aug 29, 2013 at 10:43:30AM -0600, Al Stone wrote:
On 08/29/2013 03:10 AM, Graeme Gregory wrote:
Tidy the file a bit by removing unused paths. Also removed unused kernel options that do not currently make sense on arm/arm64
Signed-off-by: Graeme Gregory graeme.gregory@linaro.org
drivers/acpi/plat/arm/boot.c | 115 ++----------------------------------------- 1 file changed, 5 insertions(+), 110 deletions(-)
diff --git a/drivers/acpi/plat/arm/boot.c b/drivers/acpi/plat/arm/boot.c index 8600cd0..881478d 100644 --- a/drivers/acpi/plat/arm/boot.c +++ b/drivers/acpi/plat/arm/boot.c @@ -24,9 +24,6 @@
*/
[snip...]
- }
- /* "acpi=copy_dsdt" copys DSDT */
- else if (strcmp(arg, "copy_dsdt") == 0) {
acpi_gbl_copy_dsdt_locally = 1;
I'll have to do some research, but we may want to keep this option. What I don't recall is if this is required to be able to replace the DSDT once the kernel is up and running, or if the use case is just for those situations where I want to get tables from some form of storage that the kernel will be shutting down in the near future...
Id prefer not to have options that we currently do not use. They just muddy the water. Its easy enough to re-add them when we have the code or need to back them up.
Graeme
On 08/30/2013 01:15 AM, Graeme Gregory wrote:
On Thu, Aug 29, 2013 at 10:43:30AM -0600, Al Stone wrote:
On 08/29/2013 03:10 AM, Graeme Gregory wrote:
Tidy the file a bit by removing unused paths. Also removed unused kernel options that do not currently make sense on arm/arm64
Signed-off-by: Graeme Gregory graeme.gregory@linaro.org
drivers/acpi/plat/arm/boot.c | 115 ++----------------------------------------- 1 file changed, 5 insertions(+), 110 deletions(-)
diff --git a/drivers/acpi/plat/arm/boot.c b/drivers/acpi/plat/arm/boot.c index 8600cd0..881478d 100644 --- a/drivers/acpi/plat/arm/boot.c +++ b/drivers/acpi/plat/arm/boot.c @@ -24,9 +24,6 @@
*/
[snip...]
- }
- /* "acpi=copy_dsdt" copys DSDT */
- else if (strcmp(arg, "copy_dsdt") == 0) {
acpi_gbl_copy_dsdt_locally = 1;
I'll have to do some research, but we may want to keep this option. What I don't recall is if this is required to be able to replace the DSDT once the kernel is up and running, or if the use case is just for those situations where I want to get tables from some form of storage that the kernel will be shutting down in the near future...
Id prefer not to have options that we currently do not use. They just muddy the water. Its easy enough to re-add them when we have the code or need to back them up.
Graeme
Hrm. Fair enough. Question withdrawn :).