From: stefano babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2] i.MX6: mx6q_sabrelite: add SATA bindings
Date: Sat, 24 Mar 2012 09:19:23 +0100 [thread overview]
Message-ID: <4F6D838B.6050509@denx.de> (raw)
In-Reply-To: <4F6D7319.5050204@googlemail.com>
Am 24/03/2012 08:09, schrieb Dirk Behme:
> Hi Stefano,
Hi Dirk,
>
> On 13.03.2012 17:59, Eric Nelson wrote:
>> Signed-off-by: Eric Nelson<eric.nelson@boundarydevices.com>
>
> Should this patch go into your u-boot-imx.git -next?
mmhh...in patchworks this is marked as "Changes requested" - I do not
remember now why, but I have a couple of open questions rereading the
patch...
>> diff --git a/board/freescale/mx6qsabrelite/mx6qsabrelite.c
>> b/board/freescale/mx6qsabrelite/mx6qsabrelite.c
>> index 1d09a72..5915159 100644
>> --- a/board/freescale/mx6qsabrelite/mx6qsabrelite.c
>> +++ b/board/freescale/mx6qsabrelite/mx6qsabrelite.c
>> @@ -23,6 +23,7 @@
>> #include<common.h>
>> #include<asm/io.h>
>> #include<asm/arch/imx-regs.h>
>> +#include<asm/arch/ccm_regs.h>
>> #include<asm/arch/mx6x_pins.h>
>> #include<asm/arch/iomux-v3.h>
>> #include<asm/errno.h>
>> @@ -267,6 +268,60 @@ int board_eth_init(bd_t *bis)
>> return 0;
>> }
>>
>> +#ifdef CONFIG_CMD_SATA
>> +
>> +int setup_sata(void)
>> +{
>> + u32 reg = 0;
>> + s32 timeout = 100000;
>> + struct imx_ccm_reg *const imx_ccm
>> + = (struct imx_ccm_reg *) CCM_BASE_ADDR;
>> + struct iomuxc_base_regs *const iomuxc_regs
>> + = (struct iomuxc_base_regs *) IOMUXC_BASE_ADDR;
>> +
>> + /* Enable sata clock */
>> + reg = readl(&imx_ccm->CCGR5); /* CCGR5 */
>> + reg |= MXC_CCM_CCGR5_CG2_MASK;
>> + writel(reg,&imx_ccm->CCGR5);
>> +
>> + /* Enable PLLs */
>> + reg = readl(&imx_ccm->analog_pll_enet);
>> + reg&= ~BM_ANADIG_PLL_SYS_POWERDOWN;
>> + writel(reg,&imx_ccm->analog_pll_enet);
>> + reg |= BM_ANADIG_PLL_SYS_ENABLE;
>> + while (timeout--) {
>> + if (readl(&imx_ccm->analog_pll_enet)& BM_ANADIG_PLL_SYS_LOCK)
>> + break;
>> + }
>> + if (timeout<= 0)
>> + return -1;
>> + reg&= ~BM_ANADIG_PLL_SYS_BYPASS;
>> + writel(reg,&imx_ccm->analog_pll_enet);
>> + reg |= BM_ANADIG_PLL_ENET_ENABLE_SATA;
>> + writel(reg,&imx_ccm->analog_pll_enet);
Is it all this part really board specific or mx6 specific ? I would like
to split this part into a common and a board specific parts, and making
the common part available for other boards.
>> +
>> + /* Enable sata phy */
>> + reg = readl(&iomuxc_regs->gpr[13])
>> + & (IOMUXC_GPR13_SDMA_STOP_REQ
>> + |IOMUXC_GPR13_CAN2_STOP_REQ
>> + |IOMUXC_GPR13_CAN1_STOP_REQ
>> + |IOMUXC_GPR13_ENET_STOP_REQ);
Why do you need to touch CAN bits ?
Best regards,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
next prev parent reply other threads:[~2012-03-24 8:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <http://lists.denx.de/pipermail/u-boot/2012-March/#119234>
2012-03-13 16:59 ` [U-Boot] [PATCH V2] i.MX6: mx6q_sabrelite: add SATA bindings Eric Nelson
2012-03-14 14:53 ` Dirk Behme
2012-03-15 8:28 ` Stefano Babic
2012-03-15 9:34 ` Liu Hui-R64343
2012-03-15 9:58 ` Stefano Babic
2012-03-24 7:09 ` Dirk Behme
2012-03-24 8:19 ` stefano babic [this message]
2012-03-24 21:01 ` Eric Nelson
2012-03-25 10:17 ` Stefano Babic
2012-03-25 15:33 ` Eric Nelson
2012-03-24 20:41 ` 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=4F6D838B.6050509@denx.de \
--to=sbabic@denx.de \
--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