From: Eric Nelson Date: Tue, 1 May 2012 09:55:11 +0000 (+0000) Subject: i.MX6: mx6q_sabrelite: add SATA bindings X-Git-Tag: v2012.07-rc1~144^2~73 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3996a96c5e33aeb676b364936c95e61a987c4e61;p=u-boot i.MX6: mx6q_sabrelite: add SATA bindings Signed-off-by: Eric Nelson Acked-by: Marek Vasut Acked-by: stefano Babic --- diff --git a/board/freescale/mx6qsabrelite/mx6qsabrelite.c b/board/freescale/mx6qsabrelite/mx6qsabrelite.c index 90773aaa21..29cbfed120 100644 --- a/board/freescale/mx6qsabrelite/mx6qsabrelite.c +++ b/board/freescale/mx6qsabrelite/mx6qsabrelite.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -293,6 +294,32 @@ static void setup_buttons(void) ARRAY_SIZE(button_pads)); } +#ifdef CONFIG_CMD_SATA + +int setup_sata(void) +{ + struct iomuxc_base_regs *const iomuxc_regs + = (struct iomuxc_base_regs *) IOMUXC_BASE_ADDR; + int ret = enable_sata_clock(); + if (ret) + return ret; + + clrsetbits_le32(&iomuxc_regs->gpr[13], + IOMUXC_GPR13_SATA_MASK, + IOMUXC_GPR13_SATA_PHY_8_RXEQ_3P0DB + |IOMUXC_GPR13_SATA_PHY_7_SATA2M + |IOMUXC_GPR13_SATA_SPEED_3G + |(3<