All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@sunsite.dk>
To: Afzal Mohammed <afzal@ti.com>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	nsekhar@ti.com, Vaibhav Bedia <vaibhav.bedia@ti.com>,
	hvaibhav@ti.com
Subject: Re: [PATCH v2 2/2] ARM: OMAP: sram: Add am33xx SRAM support (minimal)
Date: Mon, 13 Feb 2012 15:24:05 +0100	[thread overview]
Message-ID: <87fweeyfp6.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <1329113715-7634-1-git-send-email-afzal@ti.com> (Afzal Mohammed's message of "Mon, 13 Feb 2012 11:45:15 +0530")

>>>>> "Afzal" == Afzal Mohammed <afzal@ti.com> writes:

 Afzal> From: Vaibhav Bedia <vaibhav.bedia@ti.com>
 Afzal> Update SRAM start & size for am33xx SoC's.

 Afzal> Note: cpu_is_34xx() is true for am33xx also. Doing
 Afzal> cpu_is_am33xx() check after cpu_is_34xx() will not
 Afzal> achieve what we want due to the above reason.
 Afzal> Hence cpu_is_am33xx() is done before cpu_is_34xx()

 Afzal>  		} else {
 Afzal> -			if (cpu_is_omap34xx()) {
 Afzal> +			if (cpu_is_am33xx()) {
 Afzal> +				omap_sram_start = AM33XX_SRAM_PA;
 Afzal> +				omap_sram_size = 0x10000; /* 64K */
 Afzal> +			} else if (cpu_is_omap34xx()) {
 Afzal>  				omap_sram_start = OMAP3_SRAM_PA;
 Afzal>  				omap_sram_size = 0x10000; /* 64K */

I don't particular know the omap sram stuff, but doesn't the 33xx have
2x 64K blocks of SRAM?

 
 Afzal> +static inline int am33xx_sram_init(void)
 Afzal> +{
 Afzal> +	return 0;


I know you mentioned it in the commit message, but it might be good with
a comment here as well that this dummy function is needed to not get the 34xx
init function called for 33xx, so it doesn't get removed when somebody
decides to cleanup.

 Afzal> +}
 Afzal> +
 Afzal>  int __init omap_sram_init(void)
 Afzal>  {
 Afzal>  	omap_detect_sram();
 Afzal> @@ -379,6 +387,8 @@ int __init omap_sram_init(void)
 Afzal>  		omap242x_sram_init();
 Afzal>  	else if (cpu_is_omap2430())
 Afzal>  		omap243x_sram_init();
 Afzal> +	else if (cpu_is_am33xx())
 Afzal> +		am33xx_sram_init();
 Afzal>  	else if (cpu_is_omap34xx())
 Afzal>  		omap34xx_sram_init();
 

-- 
Bye, Peter Korsgaard

WARNING: multiple messages have this Message-ID (diff)
From: jacmet@sunsite.dk (Peter Korsgaard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] ARM: OMAP: sram: Add am33xx SRAM support (minimal)
Date: Mon, 13 Feb 2012 15:24:05 +0100	[thread overview]
Message-ID: <87fweeyfp6.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <1329113715-7634-1-git-send-email-afzal@ti.com> (Afzal Mohammed's message of "Mon, 13 Feb 2012 11:45:15 +0530")

>>>>> "Afzal" == Afzal Mohammed <afzal@ti.com> writes:

 Afzal> From: Vaibhav Bedia <vaibhav.bedia@ti.com>
 Afzal> Update SRAM start & size for am33xx SoC's.

 Afzal> Note: cpu_is_34xx() is true for am33xx also. Doing
 Afzal> cpu_is_am33xx() check after cpu_is_34xx() will not
 Afzal> achieve what we want due to the above reason.
 Afzal> Hence cpu_is_am33xx() is done before cpu_is_34xx()

 Afzal>  		} else {
 Afzal> -			if (cpu_is_omap34xx()) {
 Afzal> +			if (cpu_is_am33xx()) {
 Afzal> +				omap_sram_start = AM33XX_SRAM_PA;
 Afzal> +				omap_sram_size = 0x10000; /* 64K */
 Afzal> +			} else if (cpu_is_omap34xx()) {
 Afzal>  				omap_sram_start = OMAP3_SRAM_PA;
 Afzal>  				omap_sram_size = 0x10000; /* 64K */

I don't particular know the omap sram stuff, but doesn't the 33xx have
2x 64K blocks of SRAM?

 
 Afzal> +static inline int am33xx_sram_init(void)
 Afzal> +{
 Afzal> +	return 0;


I know you mentioned it in the commit message, but it might be good with
a comment here as well that this dummy function is needed to not get the 34xx
init function called for 33xx, so it doesn't get removed when somebody
decides to cleanup.

 Afzal> +}
 Afzal> +
 Afzal>  int __init omap_sram_init(void)
 Afzal>  {
 Afzal>  	omap_detect_sram();
 Afzal> @@ -379,6 +387,8 @@ int __init omap_sram_init(void)
 Afzal>  		omap242x_sram_init();
 Afzal>  	else if (cpu_is_omap2430())
 Afzal>  		omap243x_sram_init();
 Afzal> +	else if (cpu_is_am33xx())
 Afzal> +		am33xx_sram_init();
 Afzal>  	else if (cpu_is_omap34xx())
 Afzal>  		omap34xx_sram_init();
 

-- 
Bye, Peter Korsgaard

  reply	other threads:[~2012-02-13 14:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-13  6:15 [PATCH v2 2/2] ARM: OMAP: sram: Add am33xx SRAM support (minimal) Afzal Mohammed
2012-02-13  6:15 ` Afzal Mohammed
2012-02-13 14:24 ` Peter Korsgaard [this message]
2012-02-13 14:24   ` Peter Korsgaard
2012-02-13 16:07   ` Bedia, Vaibhav
2012-02-13 16:07     ` Bedia, Vaibhav
2012-03-05 23:14     ` Tony Lindgren
2012-03-05 23:14       ` Tony Lindgren
2012-03-07  9:56       ` Hiremath, Vaibhav
2012-03-07  9:56         ` Hiremath, Vaibhav

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=87fweeyfp6.fsf@macbook.be.48ers.dk \
    --to=jacmet@sunsite.dk \
    --cc=afzal@ti.com \
    --cc=hvaibhav@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=vaibhav.bedia@ti.com \
    /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.