mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 6/8] animeo_ip: update to use console_open/close for rs485 crossed detection
Date: Thu,  3 Oct 2013 09:21:58 +0200	[thread overview]
Message-ID: <1380784920-30890-6-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1380784920-30890-1-git-send-email-plagnioj@jcrosoft.com>

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 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

  parent reply	other threads:[~2013-10-03  7:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-03  7:17 [PATCH 0/8 v2] more serial cleanup Jean-Christophe PLAGNIOL-VILLARD
2013-10-03  7:21 ` [PATCH 1/8] console: factorise function to get the first enabled console Jean-Christophe PLAGNIOL-VILLARD
2013-10-03  7:21   ` [PATCH 2/8] console: factorise function to get the console by name Jean-Christophe PLAGNIOL-VILLARD
2013-10-06 11:24     ` Sascha Hauer
2013-10-06 18:38       ` Jean-Christophe PLAGNIOL-VILLARD
2013-10-07  6:23         ` Sascha Hauer
2013-10-03  7:21   ` [PATCH 3/8] console: introduce startup and shutdown Jean-Christophe PLAGNIOL-VILLARD
2013-10-03  7:21   ` [PATCH 4/8] loadxy: use console_open/close Jean-Christophe PLAGNIOL-VILLARD
2013-10-03  7:21   ` [PATCH 5/8] console: console_get_by_name pass flags Jean-Christophe PLAGNIOL-VILLARD
2013-10-03  7:21   ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2013-10-03  7:21   ` [PATCH 7/8] serial: amba-pl011: add start and shutdown support Jean-Christophe PLAGNIOL-VILLARD
2013-10-03  7:22   ` [PATCH 8/8] serial: atmel: " Jean-Christophe PLAGNIOL-VILLARD
  -- strict thread matches above, loose matches on Subject: below --
2013-09-27  7:12 [PATCH 0/8] more serial cleanup Jean-Christophe PLAGNIOL-VILLARD
2013-09-27  7:14 ` [PATCH 1/8] console_simple: fix: set f_active Jean-Christophe PLAGNIOL-VILLARD
2013-09-27  7:14   ` [PATCH 6/8] animeo_ip: update to use console_open/close for rs485 crossed detection Jean-Christophe PLAGNIOL-VILLARD

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=1380784920-30890-6-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    /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