mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, grant.likely@secretlab.ca,
	hpa@zytor.com, mingo@redhat.com, dirk.brandewie@gmail.com,
	bigeasy@linutronix.de, tglx@linutronix.de
Subject: [tip:x86/platform] x86: dtb: Add device tree support for HPET
Date: Wed, 23 Feb 2011 21:51:12 GMT	[thread overview]
Message-ID: <tip-ffb9fc68dff38f811eeb24c15aba0418b6a8ee53@git.kernel.org> (raw)
In-Reply-To: <1298405266-1624-7-git-send-email-bigeasy@linutronix.de>

Commit-ID:  ffb9fc68dff38f811eeb24c15aba0418b6a8ee53
Gitweb:     http://git.kernel.org/tip/ffb9fc68dff38f811eeb24c15aba0418b6a8ee53
Author:     Sebastian Andrzej Siewior <bigeasy@linutronix.de>
AuthorDate: Tue, 22 Feb 2011 21:07:41 +0100
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 23 Feb 2011 22:27:53 +0100

x86: dtb: Add device tree support for HPET

Set hpet_address based on information provied form DTB

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Cc: sodaville@linutronix.de
Cc: devicetree-discuss@lists.ozlabs.org
Cc: Dirk Brandewie <dirk.brandewie@gmail.com>
LKML-Reference: <1298405266-1624-7-git-send-email-bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/x86/kernel/devicetree.c |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
index 2739d56..dbb3bda 100644
--- a/arch/x86/kernel/devicetree.c
+++ b/arch/x86/kernel/devicetree.c
@@ -11,6 +11,7 @@
 #include <linux/of_platform.h>
 #include <linux/slab.h>
 
+#include <asm/hpet.h>
 #include <asm/irq_controller.h>
 #include <asm/apic.h>
 
@@ -98,6 +99,23 @@ void __init add_dtb(u64 data)
 	initial_dtb = data + offsetof(struct setup_data, data);
 }
 
+static void __init dtb_setup_hpet(void)
+{
+	struct device_node *dn;
+	struct resource r;
+	int ret;
+
+	dn = of_find_compatible_node(NULL, NULL, "intel,ce4100-hpet");
+	if (!dn)
+		return;
+	ret = of_address_to_resource(dn, 0, &r);
+	if (ret) {
+		WARN_ON(1);
+		return;
+	}
+	hpet_address = r.start;
+}
+
 static void __init dtb_lapic_setup(void)
 {
 #ifdef CONFIG_X86_LOCAL_APIC
@@ -197,5 +215,6 @@ void __init x86_dtb_get_config(unsigned int unused)
 	of_scan_flat_dt(early_init_dt_scan_root, NULL);
 
 	unflatten_device_tree();
+	dtb_setup_hpet();
 	dtb_apic_setup();
 }

  reply	other threads:[~2011-02-23 21:51 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-22 20:07 Device tree on x86, part v4 Sebastian Andrzej Siewior
2011-02-22 20:07 ` [PATCH 01/11] x86/e820: remove conditional early mapping in parse_e820_ext Sebastian Andrzej Siewior
2011-02-23 21:49   ` [tip:x86/platform] x86: e820: Remove " tip-bot for Sebastian Andrzej Siewior
2011-02-22 20:07 ` [PATCH 02/11] x86: Add device tree support Sebastian Andrzej Siewior
2011-02-23 21:49   ` [tip:x86/platform] " tip-bot for Sebastian Andrzej Siewior
2011-02-22 20:07 ` [PATCH 03/11] x86/dtb: Add a device tree for CE4100 Sebastian Andrzej Siewior
2011-02-22 20:59   ` Grant Likely
2011-02-23 21:50   ` [tip:x86/platform] x86: dtb: " tip-bot for Sebastian Andrzej Siewior
2011-02-22 20:07 ` [PATCH 04/11] x86/dtb: add irq domain abstraction Sebastian Andrzej Siewior
2011-02-22 21:06   ` Grant Likely
2011-02-23 21:50   ` [tip:x86/platform] x86: dtb: Add " tip-bot for Sebastian Andrzej Siewior
2011-02-22 20:07 ` [PATCH 05/11] x86/dtb: add early parsing of IO APIC Sebastian Andrzej Siewior
2011-02-23 21:50   ` [tip:x86/platform] x86: dtb: Add early parsing of IO_APIC tip-bot for Sebastian Andrzej Siewior
2011-02-22 20:07 ` [PATCH 06/11] x86/dtb: add support hpet Sebastian Andrzej Siewior
2011-02-23 21:51   ` tip-bot for Sebastian Andrzej Siewior [this message]
2011-02-22 20:07 ` [PATCH 07/11] x86/dtb: add support for PCI devices backed by dtb nodes Sebastian Andrzej Siewior
2011-02-22 21:08   ` Grant Likely
2011-02-23 21:51   ` [tip:x86/platform] x86: dtb: Add " tip-bot for Sebastian Andrzej Siewior
2011-02-22 20:07 ` [PATCH 08/11] x86/dtb: Add generic bus probe Sebastian Andrzej Siewior
2011-02-23 21:51   ` [tip:x86/platform] x86: dtb: " tip-bot for Sebastian Andrzej Siewior
2011-02-22 20:07 ` [PATCH 09/11] x86/ioapic: Add OF bindings for IO-APIC Sebastian Andrzej Siewior
2011-02-22 21:14   ` Grant Likely
2011-02-23 21:52   ` [tip:x86/platform] x86: ioapic: Add OF bindings for IO_APIC tip-bot for Sebastian Andrzej Siewior
2011-02-22 20:07 ` [PATCH 10/11] x86/ce4100: use OF for ioapic Sebastian Andrzej Siewior
2011-02-23 21:52   ` [tip:x86/platform] x86: ce4100: Use OF to setup devices tip-bot for Sebastian Andrzej Siewior
2011-02-22 20:07 ` [PATCH 11/11] rtc/cmos: add OF bindings Sebastian Andrzej Siewior
2011-02-22 20:50   ` Grant Likely
2011-02-23 21:53   ` [tip:x86/platform] rtc: cmos: Add " tip-bot for Sebastian Andrzej Siewior
2011-02-22 21:16 ` Device tree on x86, part v4 Grant Likely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-ffb9fc68dff38f811eeb24c15aba0418b6a8ee53@git.kernel.org \
    --to=bigeasy@linutronix.de \
    --cc=dirk.brandewie@gmail.com \
    --cc=grant.likely@secretlab.ca \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®