From: Randy Dunlap <randy_d_dunlap@linux.intel.com>
To: lkml <linux-kernel@vger.kernel.org>, akpm <akpm@osdl.org>
Cc: venki <venkatesh.pallipadi@intel.com>, bob.picco@hp.com
Subject: [PATCH 1/3] hpet: allow fixed_mem32 ACPI resource type
Date: Wed, 12 Oct 2005 11:58:14 -0700 [thread overview]
Message-ID: <20051012115814.1d367a94.randy_d_dunlap@linux.intel.com> (raw)
From: Randy Dunlap <randy_d_dunlap@linux.intel.com>
Allow the ACPI HPET description table to use a resource type
of FIXED_MEM32 for the HPET reource. Use the fixed resoure
size of 1 KB for the HPET resource as per the HPET spec.
Signed-off-by: Randy Dunlap <randy_d_dunlap@linux.intel.com>
Acked-by: Bob Picco <bob.picco@hp.com>
---
drivers/char/hpet.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+)
diff -Naurp linux-2614-rc4/drivers/char/hpet.c~hpet_fixmem32 linux-2614-rc4/drivers/char/hpet.c
--- linux-2614-rc4/drivers/char/hpet.c~hpet_fixmem32 2005-10-12 09:40:24.000000000 -0700
+++ linux-2614-rc4/drivers/char/hpet.c 2005-10-12 09:47:20.000000000 -0700
@@ -49,6 +49,8 @@
#define HPET_USER_FREQ (64)
#define HPET_DRIFT (500)
+#define HPET_RANGE_SIZE 1024 /* from HPET spec */
+
static u32 hpet_ntimer, hpet_nhpet, hpet_max_freq = HPET_USER_FREQ;
/* A lock for concurrent access by app and isr hpet activity. */
@@ -896,6 +898,21 @@ static acpi_status hpet_resources(struct
for (hpetp = hpets; hpetp; hpetp = hpetp->hp_next)
if (hpetp->hp_hpet == hdp->hd_address)
return -EBUSY;
+ } else if (res->id == ACPI_RSTYPE_FIXED_MEM32) {
+ struct acpi_resource_fixed_mem32 *fixmem32;
+
+ fixmem32 = &res->data.fixed_memory32;
+ if (!fixmem32)
+ return -EINVAL;
+
+ hdp->hd_phys_address = fixmem32->range_base_address;
+ hdp->hd_address = ioremap(fixmem32->range_base_address,
+ HPET_RANGE_SIZE);
+
+ for (hpetp = hpets; hpetp; hpetp = hpetp->hp_next)
+ if (hpetp->hp_hpet == hdp->hd_address) {
+ return -EBUSY;
+ }
} else if (res->id == ACPI_RSTYPE_EXT_IRQ) {
struct acpi_resource_ext_irq *irqp;
int i;
---
next reply other threads:[~2005-10-12 19:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-12 18:58 Randy Dunlap [this message]
2005-10-12 20:08 ` [PATCH 1/3] hpet: allow fixed_mem32 ACPI resource type Bjorn Helgaas
2005-10-12 21:55 ` Randy.Dunlap
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=20051012115814.1d367a94.randy_d_dunlap@linux.intel.com \
--to=randy_d_dunlap@linux.intel.com \
--cc=akpm@osdl.org \
--cc=bob.picco@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=venkatesh.pallipadi@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.