lkml.org 
[lkml]   [2011]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 02/11] msm: Generalize timer register mappings
From
Date
On Wed, 2011-01-19 at 12:25 -0800, David Brown wrote:
> + int global_offset = 0;
> +
> + if (cpu_is_msm7x01()) {
> + msm_clocks[MSM_CLOCK_GPT].regbase = MSM_CSR_BASE;
> + msm_clocks[MSM_CLOCK_DGT].regbase = MSM_CSR_BASE + 0x10;
> + } else if (cpu_is_msm7x30()) {
> + msm_clocks[MSM_CLOCK_GPT].regbase = MSM_CSR_BASE + 0x04;
> + msm_clocks[MSM_CLOCK_DGT].regbase = MSM_CSR_BASE + 0x24;
> + } else if (cpu_is_qsd8x50()) {
> + msm_clocks[MSM_CLOCK_GPT].regbase = MSM_CSR_BASE;
> + msm_clocks[MSM_CLOCK_DGT].regbase = MSM_CSR_BASE + 0x10;
> + } else if (cpu_is_msm8x60()) {
> + msm_clocks[MSM_CLOCK_GPT].regbase = MSM_TMR_BASE + 0x04;
> + msm_clocks[MSM_CLOCK_DGT].regbase = MSM_TMR_BASE + 0x24;
> +
> + /* Use CPU0's timer as the global timer. */
> + global_offset = MSM_TMR0_BASE - MSM_TMR_BASE;
> + } else
> + BUG();

Ifdef's here would be OK I think, your already using the "runtime"
checks ..

Daniel

--

Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.



\
 
 \ /
  Last update: 2011-01-24 23:39    [W:0.817 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site