[V8 PATCH 5/5] MX53 Enable the AHCI SATA on MX53 SMD board

Sergei Shtylyov sshtylyov at mvista.com
Thu Sep 22 07:42:07 EDT 2011


Hello.

On 22-09-2011 14:14, Richard Zhu wrote:

> Signed-off-by: Richard Zhu<richard.zhu at linaro.org>
> ---
>   arch/arm/mach-mx5/board-mx53_smd.c |   16 ++++++++++++++++
>   1 files changed, 16 insertions(+), 0 deletions(-)

> diff --git a/arch/arm/mach-mx5/board-mx53_smd.c b/arch/arm/mach-mx5/board-mx53_smd.c
> index bc02894..9d06fbe 100644
> --- a/arch/arm/mach-mx5/board-mx53_smd.c
> +++ b/arch/arm/mach-mx5/board-mx53_smd.c
[...]
> @@ -111,6 +112,19 @@ static const struct imxi2c_platform_data mx53_smd_i2c_data __initconst = {
>   	.bitrate = 100000,
>   };
>
> +static inline void mx53_smd_ahci_pwr_on(void)
> +{
> +	int ret;
> +
> +	/* Enable SATA PWR */
> +	ret = gpio_request(MX53_SMD_SATA_PWR_EN, "ahci-sata-pwr");
> +	if (ret) {
> +		printk(KERN_ERR "failed to get SATA_PWR_EN: %d\n", ret);
> +		return;
> +	}
> +	gpio_direction_output(MX53_SMD_SATA_PWR_EN, 1);

    You can use gpio_request_one() instead of gpio_request()/gpio_direction_*().

WBR, Sergei



More information about the linux-arm-kernel mailing list