Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1360465
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RESEND PATCH v4 5/5] clocksource: add memory-mapped timer support in arm_arch_timer.c |
| Date | 2016-03-18 10:40 +0100 |
| Message-ID | <rdZ2V-3Jq-1@gated-at.bofh.it> (permalink) |
| References | <rdXDQ-2Va-5@gated-at.bofh.it> <rdXDQ-2Va-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Fri, 18 Mar 2016, fu.wei@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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[RESEND PATCH v4 5/5] clocksource: add memory-mapped timer support in arm_arch_timer.c fu.wei@linaro.org - 2016-03-18 09:10 +0100 Re: [RESEND PATCH v4 5/5] clocksource: add memory-mapped timer support in arm_arch_timer.c Thomas Gleixner <tglx@linutronix.de> - 2016-03-18 10:40 +0100
csiph-web