From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from 2.mo3.mail-out.ovh.net ([46.105.75.36] helo=mo3.mail-out.ovh.net) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TVpKS-0000xF-Gh for barebox@lists.infradead.org; Tue, 06 Nov 2012 20:00:58 +0000 Received: from mail612.ha.ovh.net (b6.ovh.net [213.186.33.56]) by mo3.mail-out.ovh.net (Postfix) with SMTP id 6743DFFBDDF for ; Tue, 6 Nov 2012 20:46:08 +0100 (CET) From: Jean-Christophe PLAGNIOL-VILLARD Date: Tue, 6 Nov 2012 20:33:36 +0100 Message-Id: <1352230416-9396-8-git-send-email-plagnioj@jcrosoft.com> In-Reply-To: <1352230416-9396-1-git-send-email-plagnioj@jcrosoft.com> References: <20121106193010.GE25679@game.jcrosoft.org> <1352230416-9396-1-git-send-email-plagnioj@jcrosoft.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 8/8] at91rm9200: fix spi cs support To: barebox@lists.infradead.org the rm9200 have a errata the cs0 must be used via hw cs not gpio Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- arch/arm/mach-at91/at91rm9200_devices.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c index 8cb2f57..c9ceef9 100644 --- a/arch/arm/mach-at91/at91rm9200_devices.c +++ b/arch/arm/mach-at91/at91rm9200_devices.c @@ -182,7 +182,12 @@ void at91_add_device_spi(int spi_id, struct at91_spi_platform_data *pdata) cs_pin = pdata->chipselect[i]; /* enable chip-select pin */ - if (cs_pin > 0) + if (!gpio_is_valid(cs_pin)) + continue; + + if (cs_pin == AT91_PIN_PA3) + at91_set_A_periph(cs_pin, 0); + else at91_set_gpio_output(cs_pin, 1); } -- 1.7.10.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox