All of lore.kernel.org
 help / color / mirror / Atom feed
From: sshtylyov@mvista.com (Sergei Shtylyov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: davinci: dm368 evm: add support for CPLD version specific cpu_is_* macro
Date: Tue, 06 Dec 2011 15:40:25 +0400	[thread overview]
Message-ID: <4EDDFF29.1020009@mvista.com> (raw)
In-Reply-To: <1323168359-17943-1-git-send-email-prakash.pm@ti.com>

Hello.

On 06-12-2011 14:45, Manjunathappa, Prakash wrote:

> From: Rajashekhara, Sudhakar <sudhakar.raj@ti.com>

> DM368 and DM365 EVMs have different CPLD versions. This patch
> adds function which differentiates DM368 from DM365 EVMs.

> Signed-off-by: Rajashekhara, Sudhakar <sudhakar.raj@ti.com>
> ---
>   arch/arm/mach-davinci/include/mach/common.h  |    1 +
>   arch/arm/mach-davinci/include/mach/cputype.h |   11 +++++++++++
>   2 files changed, 12 insertions(+), 0 deletions(-)

> diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h
> index a57cba2..f89cd2a 100644
> --- a/arch/arm/mach-davinci/include/mach/common.h
> +++ b/arch/arm/mach-davinci/include/mach/common.h
> @@ -52,6 +52,7 @@ struct davinci_soc_info {
>   	u32				cpu_id;
>   	u32				jtag_id;
>   	u32				jtag_id_reg;
> +	u8				cpld_version;

    Come on, CPLD is not a part of a SoC and the structure is called 
*davinci_soc_info*.

> diff --git a/arch/arm/mach-davinci/include/mach/cputype.h b/arch/arm/mach-davinci/include/mach/cputype.h
> index 957fb87..ef02ab1 100644
> --- a/arch/arm/mach-davinci/include/mach/cputype.h
> +++ b/arch/arm/mach-davinci/include/mach/cputype.h
> @@ -49,6 +49,15 @@ IS_DAVINCI_CPU(da830, DAVINCI_CPU_ID_DA830)
>   IS_DAVINCI_CPU(da850, DAVINCI_CPU_ID_DA850)
>   IS_DAVINCI_CPU(tnetv107x, DAVINCI_CPU_ID_TNETV107X)
>
> +#define IS_DAVINCI_CPU_CPLD_VER(type, id, cpld_ver)			\
> +static inline int is_davinci_ ##type(void)				\
> +{									\
> +	return ((davinci_soc_info.cpu_id == (id))&&			\
> +		(davinci_soc_info.cpld_version == (cpld_ver)));		\
> +}
> +
> +IS_DAVINCI_CPU_CPLD_VER(dm368, DAVINCI_CPU_ID_DM365, 0x21)
> +

    If DM365 is indistinguishable from DM368 except when being on an EVM 
board, so be it.

WBR, Sergei

      reply	other threads:[~2011-12-06 11:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-06 10:45 [PATCH] ARM: davinci: dm368 evm: add support for CPLD version specific cpu_is_* macro Manjunathappa, Prakash
2011-12-06 11:40 ` Sergei Shtylyov [this message]

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=4EDDFF29.1020009@mvista.com \
    --to=sshtylyov@mvista.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.