From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from 15.mo4.mail-out.ovh.net ([91.121.62.11] helo=mo4.mail-out.ovh.net) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VRdDt-0002DJ-DZ for barebox@lists.infradead.org; Thu, 03 Oct 2013 07:21:24 +0000 Received: from mail187.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo4.mail-out.ovh.net (Postfix) with SMTP id 50E9510550C2 for ; Thu, 3 Oct 2013 09:21:00 +0200 (CEST) From: Jean-Christophe PLAGNIOL-VILLARD Date: Thu, 3 Oct 2013 09:21:58 +0200 Message-Id: <1380784920-30890-6-git-send-email-plagnioj@jcrosoft.com> In-Reply-To: <1380784920-30890-1-git-send-email-plagnioj@jcrosoft.com> References: <20131003071723.GP32444@ns203013.ovh.net> <1380784920-30890-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" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 6/8] animeo_ip: update to use console_open/close for rs485 crossed detection To: barebox@lists.infradead.org Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- arch/arm/boards/animeo_ip/init.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/boards/animeo_ip/init.c b/arch/arm/boards/animeo_ip/init.c index 2fee1ff..e6d2745 100644 --- a/arch/arm/boards/animeo_ip/init.c +++ b/arch/arm/boards/animeo_ip/init.c @@ -343,8 +343,6 @@ static void animeo_ip_shutdown(void) * and use it for decompress */ animeo_ip_shutdown_uart(IOMEM(AT91_DBGU + AT91_BASE_SYS)); - animeo_ip_shutdown_uart(IOMEM(AT91SAM9260_BASE_US0)); - animeo_ip_shutdown_uart(IOMEM(AT91SAM9260_BASE_US1)); } static int animeo_ip_console_init(void) @@ -397,8 +395,10 @@ static int animeo_ip_cross_detect_init(void) return -EINVAL; at91_set_gpio_input(AT91_PIN_PC16, 0); + console_open(cs0); cs0->set_mode(cs0, CONSOLE_MODE_RS485); cs0->setbrg(cs0, 38400); + console_open(cs1); cs1->set_mode(cs1, CONSOLE_MODE_RS485); cs1->setbrg(cs1, 38400); @@ -426,6 +426,9 @@ err: pr_info("rs485 ports %scrossed\n", crossed ? "" : "not "); + console_close(cs0); + console_close(cs1); + return 0; } late_initcall(animeo_ip_cross_detect_init); -- 1.8.4.rc3 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox