Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1223674
| From | Marc Zyngier <marc.zyngier@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 4/5] clocksource/acpi: Add probing infrastructure for ACPI-based clocksources |
| Date | 2015-09-13 16:10 +0200 |
| Message-ID | <q8g8F-1qp-7@gated-at.bofh.it> (permalink) |
| References | <q8g8F-1qp-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
DT enjoys a rather nice probing infrastructure for clocksources,
while ACPI is so far stuck into a very distant past.
This patch introduces a declarative API, allowing clocksources
to be self-contained and be called when parsing the GTDT table.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
drivers/clocksource/clksrc-of.c | 4 ++++
include/asm-generic/vmlinux.lds.h | 1 +
include/linux/clocksource.h | 3 +++
3 files changed, 8 insertions(+)
diff --git a/drivers/clocksource/clksrc-of.c b/drivers/clocksource/clksrc-of.c
index 0093a8e..a2105bd 100644
--- a/drivers/clocksource/clksrc-of.c
+++ b/drivers/clocksource/clksrc-of.c
@@ -14,6 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <linux/acpi.h>
#include <linux/init.h>
#include <linux/of.h>
#include <linux/clocksource.h>
@@ -38,6 +39,9 @@ void __init clocksource_of_init(void)
init_func(np);
clocksources++;
}
+
+ clocksources += acpi_probe_device_table(clksrc);
+
if (!clocksources)
pr_crit("%s: no matching clocksources found\n", __func__);
}
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index cd836cd..c4bd0e2 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -525,6 +525,7 @@
KERNEL_DTB() \
IRQCHIP_OF_MATCH_TABLE() \
ACPI_PROBE_TABLE(irqchip) \
+ ACPI_PROBE_TABLE(clksrc) \
EARLYCON_TABLE() \
EARLYCON_OF_TABLES()
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index 278dd27..4bd7fe6 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -258,4 +258,7 @@ void acpi_generic_timer_init(void);
static inline void acpi_generic_timer_init(void) { }
#endif
+#define CLOCKSOURCE_ACPI_DECLARE(name, table_id, fn) \
+ ACPI_DECLARE(clksrc, name, table_id, 0, NULL, 0, fn)
+
#endif /* _LINUX_CLOCKSOURCE_H */
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/5] ACPI probing infrastructure Marc Zyngier <marc.zyngier@arm.com> - 2015-09-13 16:10 +0200
[PATCH v2 4/5] clocksource/acpi: Add probing infrastructure for ACPI-based clocksources Marc Zyngier <marc.zyngier@arm.com> - 2015-09-13 16:10 +0200
[PATCH v2 2/5] irqchip/acpi: Add probing infrastructure for ACPI-based irqchips Marc Zyngier <marc.zyngier@arm.com> - 2015-09-13 16:10 +0200
[PATCH v2 1/5] acpi: Add basic device probing infrastructure Marc Zyngier <marc.zyngier@arm.com> - 2015-09-13 16:10 +0200
[PATCH v2 5/5] clocksource/arm_arch_timer: Convert to ACPI probing Marc Zyngier <marc.zyngier@arm.com> - 2015-09-13 16:10 +0200
[PATCH v2 3/5] irqchip/gic: Convert the GIC driver to ACPI probing Marc Zyngier <marc.zyngier@arm.com> - 2015-09-13 16:10 +0200
Re: [PATCH v2 3/5] irqchip/gic: Convert the GIC driver to ACPI probing Hanjun Guo <hanjun.guo@linaro.org> - 2015-09-16 17:10 +0200
Re: [PATCH v2 3/5] irqchip/gic: Convert the GIC driver to ACPI probing Marc Zyngier <marc.zyngier@arm.com> - 2015-09-16 19:30 +0200
Re: [PATCH v2 3/5] irqchip/gic: Convert the GIC driver to ACPI probing Hanjun Guo <hanjun.guo@linaro.org> - 2015-09-16 17:20 +0200
csiph-web