public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: tglx@linutronix.de (Thomas Gleixner)
To: linux-arm-kernel@lists.infradead.org
Subject: [RESEND PATCH v4 5/5] clocksource: add memory-mapped timer support in arm_arch_timer.c
Date: Fri, 18 Mar 2016 10:32:48 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.11.1603181031280.3978@nanos> (raw)
In-Reply-To: <1458288053-29031-6-git-send-email-fu.wei@linaro.org>

On Fri, 18 Mar 2016, fu.wei at linaro.org wrote:
> +static u32 __init arch_timer_mem_cnttidr(struct acpi_gtdt_timer_block *gt_block)
> +{
> +	phys_addr_t cntctlbase_phy;
> +	void __iomem *cntctlbase;
> +	u32 cnttidr;
> +
> +	cntctlbase_phy = (phys_addr_t)gtdt_gt_cntctlbase(gt_block);
> +	if (!cntctlbase_phy) {
> +		pr_err("Can't find CNTCTLBase.\n");
> +		return 0;
> +	}
> +
> +	/*
> +	 * According to ARMv8 Architecture Reference Manual(ARM),
> +	 * the size of CNTCTLBase frame of memory-mapped timer
> +	 * is SZ_4K(Offset 0x000 ? 0xFFF).
> +	 */
> +	cntctlbase = ioremap(cntctlbase_phy, SZ_4K);
> +	if (!cntctlbase) {
> +		pr_err("Can't map CNTCTLBase\n");
> +		return 0;
> +	}

Why are you continuing when you can't find a base address or the remap fails?

> +	/*
> +	 * Get Generic Timer Counter-timer Timer ID Register
> +	 * for Virtual Timer Capability info
> +	 */
> +	cnttidr = arch_timer_mem_cnttidr(gt_block);

Thanks,

	tglx

  reply	other threads:[~2016-03-18  9:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-18  8:00 [RESEND PATCH v4 0/5] acpi, clocksource: add GTDT and ARM memory-mapped timer support fu.wei at linaro.org
2016-03-18  8:00 ` [RESEND PATCH v4 1/5] clocksource: move some enums and marcos to header file for arm_arch_timer fu.wei at linaro.org
2016-03-18  9:27   ` Thomas Gleixner
2016-03-29  9:38     ` Fu Wei
2016-03-18  8:00 ` [RESEND PATCH v4 2/5] ACPI: add GTDT table parse driver into ACPI driver fu.wei at linaro.org
2016-03-18 14:45   ` Daniel Lezcano
2016-03-18  8:00 ` [RESEND PATCH v4 3/5] clocksource: simplify ACPI code in arm_arch_timer.c fu.wei at linaro.org
2016-03-18  8:00 ` [RESEND PATCH v4 4/5] clocksource: a little improvment for printk " fu.wei at linaro.org
2016-03-18  8:00 ` [RESEND PATCH v4 5/5] clocksource: add memory-mapped timer support " fu.wei at linaro.org
2016-03-18  9:32   ` Thomas Gleixner [this message]
2016-03-18 13:37 ` [RESEND PATCH v4 0/5] acpi, clocksource: add GTDT and ARM memory-mapped timer support Daniel Lezcano

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=alpine.DEB.2.11.1603181031280.3978@nanos \
    --to=tglx@linutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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