From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [[PATCH v2]pandaboard: 1/1] Modification of Elpida DDR2 RAM for Pandaboard-ES Rev B3
Date: Thu, 14 Nov 2013 14:02:15 -0500 [thread overview]
Message-ID: <52851E37.7080701@ti.com> (raw)
In-Reply-To: <CAFAe+RtFp_vgsRZ8JoM=W+vtk3XKSo2aM7fzobwcmbyLgjJCnQ@mail.gmail.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/14/2013 01:43 PM, Hardik Patel wrote:
>
>
> On Thu, Nov 14, 2013 at 10:02 PM, Tom Rini <trini@ti.com
> <mailto:trini@ti.com>> wrote:
> On 11/14/2013 11:28 AM, Michael Trimarchi wrote:
>>>> Hi
>>>>
>>>> On Thu, Nov 14, 2013 at 5:19 PM, Tom Rini <trini@ti.com
>> <mailto:trini@ti.com>> wrote:
>>>> On 11/14/2013 05:06 AM, Hardik wrote:
>>>>>>> From: Hardik Patel <hardik.patel@volansystech.com
>> <mailto:hardik.patel@volansystech.com>>
>>>>>>>
>>>>>>> Signed-off-by: Hardik Patel <hardik.patel@volansystech.com
>> <mailto:hardik.patel@volansystech.com>>
>>>>>>> ---
>>>>>>> arch/arm/cpu/armv7/omap4/sdram_elpida.c | 2 +-
>>>>>>> board/ti/panda/panda.c | 24
>> ++++++++++++++++++++++++
>>>>>>> 2 files changed, 25 insertions(+), 1 deletion(-)
>>>>>>>
>>>>>>> diff --git a/arch/arm/cpu/armv7/omap4/sdram_elpida.c
>> b/arch/arm/cpu/armv7/omap4/sdram_elpida.c
>>>>>>> index e4c8316..9fbdeea 100644
>>>>>>> --- a/arch/arm/cpu/armv7/omap4/sdram_elpida.c
>>>>>>> +++ b/arch/arm/cpu/armv7/omap4/sdram_elpida.c
>>>>>>> @@ -123,7 +123,7 @@ static void emif_get_reg_dump_sdp(u32 emif_nr,
>> const struct emif_regs **regs)
>>>>>>> *regs = &emif_regs_elpida_200_mhz_2cs;
>>>>>>> else if (omap4_rev == OMAP4430_ES2_3)
>>>>>>> *regs = &emif_regs_elpida_400_mhz_1cs;
>>>>>>> - else if (omap4_rev < OMAP4470_ES1_0)
>>>>>>> + else if (omap4_rev < OMAP4470_ES1_0 && !is_panda_es_rev_b3())
>>>>>>> *regs = &emif_regs_elpida_400_mhz_2cs;
>>>>>>> else
>>>>>>> *regs = &emif_regs_elpida_400_mhz_1cs;
>>>>>>> diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c
>>>>>>> index c104024..5a7f80a 100644
>>>>>>> --- a/board/ti/panda/panda.c
>>>>>>> +++ b/board/ti/panda/panda.c
>>>>>>> @@ -122,6 +122,30 @@ int get_board_revision(void)
>>>>>>> return board_id;
>>>>>>> }
>>>>>>>
>>>>>>> +/*
>>>>>>> +* Routine: is_panda_es_rev_b3
>>>>>>> +* Description: Detect if we are running on B3 version of ES panda
>> board,
>>>>>>> +* This can be done by reading the level of GPIO 171
>>>>>>> +* and checking the processor revisions.
>>>>>>> +* GPIO171: 1 => Panda ES Rev B3
>>>>>>> +*/
>>>>>>> +u8 is_panda_es_rev_b3(void)
>>>>>>> +{
>>>>>>> + int processor_rev = omap_revision();
>>>>>>> + int ret = 0;
>>>>>>> +
>>>>>>> + if ((processor_rev >= OMAP4460_ES1_0 &&
>>>>>>> + processor_rev <= OMAP4460_ES1_1)) {
>>>>>>> +
>>>>>>> + /* Setup the mux for the common board ID pins
>> (gpio 171) */
>>>>>>> + writew((IEN | M3),
>> (*ctrl)->control_padconf_core_base + UNIPRO_TX0);
>>>>>>> +
>>>>>>> + /* if processor_rev is panda ES and GPIO171 is 1,
>> it is rev b3 */
>>>>>>> + ret = gpio_get_value(PANDA_BOARD_ID_2_GPIO);
>>>>>>> + }
>>>>>>> + return ret;
>>>>>>> +}
>>>>>>> +
>>>>>>> /**
>>>>>>> * @brief misc_init_r - Configure Panda board specific configurations
>>>>>>> * such as power configurations, ethernet initialization as phase2 of
>>>>
>>>> This isn't right. What I was saying is that board/ti/panda/panda.c
>>>> needs to provide its own emif_get_reg_dump function, which will (as
>>>> designed) override the current one from
>>>> arch/arm/cpu/armv7/omap4/sdram_elpida.c
>>>>
>>>>
>>>>> Any problem to have visibility of emif_regs array of lpddr?
>
> Things that need exposing so that we can do what was intended before
> should be exposed, in <asm/arch-omap4/sys_proto.h> I think.
>
>
> Hi Tom, Michel,
>
> Thanks for your feedback on this.
>
> We had implemented override of "emif_get_reg_dump" function in panda.c.
> However, we thought checking detection of pandaboard in sdram_elpida.c
> be smaller change and it was also under omap4. However, now I realized
> after discussing that this may break in case of non panda.c OMAP4 boards.
>
> Based on your feedback,we are going to correct it like below. I am
> trying to explain it in brief:
>
> 1) We are going to extern emif_regs in <asm/arch-omap4/sys_proto.h>, so
> that we can access them in panda.c
> #ifdef CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS
> extern const struct emif_regs emif_regs_elpida_200_mhz_2cs;
> extern const struct emif_regs emif_regs_elpida_380_mhz_1cs;
> extern const struct emif_regs emif_regs_elpida_400_mhz_1cs;
> extern const struct emif_regs emif_regs_elpida_400_mhz_2cs;
> #endif
Minor nit, don't protect externs with #ifdef, that's not required.
Otherwise, sounds like a good plan, thanks.
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJShR43AAoJENk4IS6UOR1WZH4P+wTVrxdCNuvPVIhos2l7ilwR
yY/QJaPZ2KMlIAHkS56AGe1EYW+LvoVOgrocmYiTq4FgFbeDwEraJ9+Sqaeghg/+
pyTlvbLXjTUuipfe8G8sKFFeTMlRQSDA4xIsDNR05cU3NcC2IvUrYA8IaWG/b4cE
FndWWAPOqnJ3ZQmzDgOtuMwmBm0kkhKJ/5eobzhW/eReS/d6SD9A0GZQ9VOCmulf
/bRIyebcq0/HXpzL9TMaBp5z+48e3TE/ANIL9TnaTQUwcCErGsJ8JcJUQ50hrCVf
mqv/rrH38FSI2B9ZoejcnpadmArHL2wLY+PQlyerS3tmeZ2BUVYE3ex5/9aXg32b
HJxd+9YgHyAtYNym92X08uXmtLv7eKnN65TR89A8pWqwNuhfsBZIPjNh0zCDJaY6
nGupJIU/XKBACJsnSaiQ08FfXjasBTcZe5XZEOxMU6/FOiYs9uqJGy4XoeWFONrN
w4SNryORZmdggAuSD/OPKTeZWECXI2AES0O1gHHZj3dUx5S0009sZBQ2odJDkrD+
ZBMF60y8DNBAgImCyL4SOaOcX8iPwktTc/mj2eQyPSbS8oEjJEuCO5a76MaVrc1m
kkFiuxjmURn3J23z6wByyvaVKw2ElQL4vmFCvaDAP48SKGVdtEJlLDDpgA4xSOjs
TL1otD20nlVXUh/Coz/D
=IXue
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2013-11-14 19:02 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-25 15:42 [U-Boot] [[PATCH]pandaboard: 0/1] Modification of Elpida DDR2 RAM for Pandaboard-ES Rev B3 Hardik
2013-10-25 15:42 ` [U-Boot] [[PATCH]pandaboard: 1/1] " Hardik
2013-10-28 12:51 ` Dan Murphy
2013-10-28 13:04 ` Tom Rini
2013-10-29 14:17 ` Hardik Patel
2013-10-29 15:54 ` Tom Rini
2013-11-14 10:05 ` [U-Boot] [[PATCH v2]pandaboard: 0/1] " Hardik
2013-11-14 10:06 ` Hardik
2013-11-14 10:06 ` [U-Boot] [[PATCH v2]pandaboard: 1/1] " Hardik
2013-11-14 15:29 ` Robert Nelson
2013-11-14 15:41 ` Michael Trimarchi
2013-11-14 16:19 ` Tom Rini
2013-11-14 16:28 ` Michael Trimarchi
2013-11-14 16:32 ` Tom Rini
2013-11-14 18:43 ` Hardik Patel
2013-11-14 18:58 ` Michael Trimarchi
2013-11-14 19:02 ` Tom Rini [this message]
2013-11-14 19:41 ` Nishanth Menon
2013-11-14 19:49 ` Tom Rini
2013-11-14 20:26 ` Nishanth Menon
2013-11-21 9:17 ` jmgrimaud
2013-11-27 15:46 ` [U-Boot] [[PATCH v3]pandaboard: 0/1] ARM:OMAP4+: panda-es: Support Rev B3 Elpida DDR2 RAM Hardik
2013-11-27 15:46 ` [U-Boot] [[PATCH v3]pandaboard: 1/1] " Hardik
2013-12-04 22:05 ` [U-Boot] [U-Boot, [PATCH, v3] pandaboard: " Tom Rini
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=52851E37.7080701@ti.com \
--to=trini@ti.com \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox