lkml.org 
[lkml]   [2012]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 11/15] ARM: etm: Check arch version and disable data tracing for ptm
From
On Thu, Jun 28, 2012 at 9:07 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Thu, Jun 21, 2012 at 12:47 AM, John Stultz <john.stultz@linaro.org> wrote:
>
>> +#define ETMR_ID                        0x1e4
>> +#define ETMIDR_VERSION(x)      (((x) >> 4) & 0xff)
>> +#define ETMIDR_VERSION_PFT_1_0 0x30
>
> NAK don't reinvent this stuff.
>
> From <linux/amba/bus.h>
>
> Use these macros on the periphid:
> #define amba_config(d)  AMBA_CONFIG_BITS((d)->periphid)
> #define amba_rev(d)     AMBA_REV_BITS((d)->periphid)
> #define amba_manf(d)    AMBA_MANF_BITS((d)->periphid)
> #define amba_part(d)    AMBA_PART_BITS((d)->periphid)
>

Those values do not come from the same register. The revision is
duplicated there, but I did not find the major and minor etm version
which is what I'm looking at. Also, if these values are set in the
amba_device before calling amba_device_register the hardware registers
are not read at all and the information could be from an older
hardware rev than what you are currently running on.

> I thin amba_rev() is the one you're looking for (not sure).
>
> So here:
>
>> @@ -724,6 +724,9 @@ static int __devinit etm_probe(struct amba_device *dev, const struct amba_id *id
>
>> +       if (etmccr & ETMCCR_ETMIDR_PRESENT) {
>> +               etmidr = etm_readl(t, t->etm_regs_count, ETMR_ID);
>> +               etm_version = ETMIDR_VERSION(etmidr);
>
> etm_version = amba_rev(dev);
>
> etc.
>
> Yours,
> Linus Walleij



--
Arve Hjønnevåg
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-06-29 00:01    [W:1.249 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site