Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755731Ab2F1QHv (ORCPT ); Thu, 28 Jun 2012 12:07:51 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:55840 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753790Ab2F1QHt convert rfc822-to-8bit (ORCPT ); Thu, 28 Jun 2012 12:07:49 -0400 MIME-Version: 1.0 In-Reply-To: <1340232467-6023-12-git-send-email-john.stultz@linaro.org> References: <1340232467-6023-1-git-send-email-john.stultz@linaro.org> <1340232467-6023-12-git-send-email-john.stultz@linaro.org> Date: Thu, 28 Jun 2012 18:07:48 +0200 Message-ID: Subject: Re: [PATCH 11/15] ARM: etm: Check arch version and disable data tracing for ptm From: Linus Walleij To: John Stultz Cc: LKML , =?ISO-8859-1?Q?Arve_Hj=F8nnev=E5g?= , Russell King , Paul Gortmaker , Alexander Shishkin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1182 Lines: 37 On Thu, Jun 21, 2012 at 12:47 AM, John Stultz 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 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) 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 -- 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/