From: Eric Nelson <eric.nelson@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH, V2] Resend: i.MX6: add enable_sata_clock()
Date: Sat, 28 Apr 2012 08:29:56 -0700 [thread overview]
Message-ID: <4F9C0CF4.2030400@boundarydevices.com> (raw)
In-Reply-To: <4F9C01DD.6030009@googlemail.com>
On 04/28/2012 07:42 AM, Dirk Behme wrote:
> Hi Eric,
>
> first, do you really want the "Resend" in the subject?
>
> On 26.04.2012 01:48, Eric Nelson wrote:
>> This patch requires Stefano's driver for MX5/MX6 to be useful.
>> http://lists.denx.de/pipermail/u-boot/2012-February/118530.html
>>
>> This is the first and board-independent part of what's needed to enable
>> SATA on an i.MX6 board as discussed in this thread:
>> http://lists.denx.de/pipermail/u-boot/2012-March/120919.html
>>
>> Signed-off-by: Eric Nelson<eric.nelson@boundarydevices.com>
>>
>> ---
>> V2 updated to return -EIO instead of -1.
>>
>> arch/arm/cpu/armv7/mx6/clock.c | 31 ++++++++
>> arch/arm/include/asm/arch-mx6/clock.h | 1 +
>> arch/arm/include/asm/arch-mx6/imx-regs.h | 9 +++
>> arch/arm/include/asm/arch-mx6/iomux-v3.h | 111 ++++++++++++++++++++++++++++++
>> 4 files changed, 152 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c
>> index ef98563..de91cac 100644
>> --- a/arch/arm/cpu/armv7/mx6/clock.c
>> +++ b/arch/arm/cpu/armv7/mx6/clock.c
>> @@ -303,6 +303,37 @@ u32 imx_get_fecclk(void)
>> return decode_pll(PLL_ENET, CONFIG_SYS_MX6_HCLK);
>> }
>>
>> +int enable_sata_clock(void)
>> +{
>> + u32 reg = 0;
>> + s32 timeout = 100000;
>> + struct imx_ccm_reg *const imx_ccm
>> + = (struct imx_ccm_reg *) CCM_BASE_ADDR;
>
> Could you check if the file clock.c has already a global
>
> struct imx_ccm_reg *imx_ccm = (struct imx_ccm_reg *)CCM_BASE_ADDR;
>
> definition, so this redefinition of "struct imx_ccm_reg *const imx_ccm" should
> (must?) be removed here? See
>
> http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=arch/arm/cpu/armv7/mx6/clock.c;h=ef98563ff7639a3895e5dc00acd9cc30bb3c6772;hb=HEAD#l37
>
> Trying to compile this I had to remove this on my test branch [1].
>
Hi Dirk,
I tried to address this global/non-const by making it explicitly public,
but Stefano nacked the patch:
http://patchwork.ozlabs.org/patch/144712/
As it stands, the compiler won't generate an external reference for the
local above, so it should be good.
The global/writable/not published variable imx_ccm should be fixed though.
At least it should be static if it's not exposed through a header and
const so it isn't placed in the BSS segment.
I'll generate a patch later today.
Regards,
Eric
next prev parent reply other threads:[~2012-04-28 15:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <http://lists.denx.de/pipermail/u-boot/2012-March/121135.html>
2012-04-25 23:48 ` [U-Boot] [PATCH, V2] Resend: i.MX6: add enable_sata_clock() Eric Nelson
2012-04-28 14:42 ` Dirk Behme
2012-04-28 15:29 ` Eric Nelson [this message]
2012-05-06 17:04 ` Stefano Babic
2012-05-06 17:42 ` Eric Nelson
2012-05-06 18:08 ` Fabio Estevam
2012-05-06 18:33 ` Eric Nelson
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=4F9C0CF4.2030400@boundarydevices.com \
--to=eric.nelson@boundarydevices.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