All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] AT91: revise serial lines pullup configuration,
@ 2009-07-17 21:22 Andrzej Wolski
  2009-08-05 23:11 ` [U-Boot] [PATCH] AT91: revise serial lines pullup configuration Andrzej Wolski
  2009-11-22 21:02 ` [U-Boot] [PATCH] AT91: revise serial lines pullup configuration, Wolfgang Denk
  0 siblings, 2 replies; 4+ messages in thread
From: Andrzej Wolski @ 2009-07-17 21:22 UTC (permalink / raw)
  To: u-boot

Currently pullups are incorrectly set for all AT91 SoCs:
pullup for TXD line is enabled, what is not necessary, but
pullup for RXD line, what may be necessary for some boards,
is disabled. This patch fixes it: it enables pullup only
for RXD line.

Signed-off-by: Andrzej Wolski <awolski@poczta.fm>
---
  cpu/arm926ejs/at91/at91cap9_devices.c       |   16 ++++++++--------
  cpu/arm926ejs/at91/at91sam9260_devices.c    |   16 ++++++++--------
  cpu/arm926ejs/at91/at91sam9261_devices.c    |   16 ++++++++--------
  cpu/arm926ejs/at91/at91sam9263_devices.c    |   16 ++++++++--------
  cpu/arm926ejs/at91/at91sam9m10g45_devices.c |   16 ++++++++--------
  cpu/arm926ejs/at91/at91sam9rl_devices.c     |   16 ++++++++--------
  6 files changed, 48 insertions(+), 48 deletions(-)

diff --git a/cpu/arm926ejs/at91/at91cap9_devices.c
b/cpu/arm926ejs/at91/at91cap9_devices.c
index 39e405f..681a8c1 100644
--- a/cpu/arm926ejs/at91/at91cap9_devices.c
+++ b/cpu/arm926ejs/at91/at91cap9_devices.c
@@ -34,29 +34,29 @@

  void at91_serial0_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PA22, 1);		/* TXD0 */
-	at91_set_A_periph(AT91_PIN_PA23, 0);		/* RXD0 */
+	at91_set_A_periph(AT91_PIN_PA22, 0);		/* TXD0 */
+	at91_set_A_periph(AT91_PIN_PA23, 1);		/* RXD0 */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91CAP9_ID_US0);
  }

  void at91_serial1_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PD0, 1);		/* TXD1 */
-	at91_set_A_periph(AT91_PIN_PD1, 0);		/* RXD1 */
+	at91_set_A_periph(AT91_PIN_PD0, 0);		/* TXD1 */
+	at91_set_A_periph(AT91_PIN_PD1, 1);		/* RXD1 */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91CAP9_ID_US1);
  }

  void at91_serial2_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PD2, 1);		/* TXD2 */
-	at91_set_A_periph(AT91_PIN_PD3, 0);		/* RXD2 */
+	at91_set_A_periph(AT91_PIN_PD2, 0);		/* TXD2 */
+	at91_set_A_periph(AT91_PIN_PD3, 1);		/* RXD2 */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91CAP9_ID_US2);
  }

  void at91_serial3_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PC30, 0);		/* DRXD */
-	at91_set_A_periph(AT91_PIN_PC31, 1);		/* DTXD */
+	at91_set_A_periph(AT91_PIN_PC30, 1);		/* DRXD */
+	at91_set_A_periph(AT91_PIN_PC31, 0);		/* DTXD */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_SYS);
  }

diff --git a/cpu/arm926ejs/at91/at91sam9260_devices.c
b/cpu/arm926ejs/at91/at91sam9260_devices.c
index 5309ba2..674fc88 100644
--- a/cpu/arm926ejs/at91/at91sam9260_devices.c
+++ b/cpu/arm926ejs/at91/at91sam9260_devices.c
@@ -30,29 +30,29 @@

  void at91_serial0_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PB4, 1);		/* TXD0 */
-	at91_set_A_periph(AT91_PIN_PB5, 0);		/* RXD0 */
+	at91_set_A_periph(AT91_PIN_PB4, 0);		/* TXD0 */
+	at91_set_A_periph(AT91_PIN_PB5, 1);		/* RXD0 */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_US0);
  }

  void at91_serial1_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PB6, 1);		/* TXD1 */
-	at91_set_A_periph(AT91_PIN_PB7, 0);		/* RXD1 */
+	at91_set_A_periph(AT91_PIN_PB6, 0);		/* TXD1 */
+	at91_set_A_periph(AT91_PIN_PB7, 1);		/* RXD1 */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_US1);
  }

  void at91_serial2_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PB8, 1);		/* TXD2 */
-	at91_set_A_periph(AT91_PIN_PB9, 0);		/* RXD2 */
+	at91_set_A_periph(AT91_PIN_PB8, 0);		/* TXD2 */
+	at91_set_A_periph(AT91_PIN_PB9, 1);		/* RXD2 */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_US2);
  }

  void at91_serial3_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PB14, 0);		/* DRXD */
-	at91_set_A_periph(AT91_PIN_PB15, 1);		/* DTXD */
+	at91_set_A_periph(AT91_PIN_PB14, 1);		/* DRXD */
+	at91_set_A_periph(AT91_PIN_PB15, 0);		/* DTXD */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_SYS);
  }

diff --git a/cpu/arm926ejs/at91/at91sam9261_devices.c
b/cpu/arm926ejs/at91/at91sam9261_devices.c
index 16d411f..56a22c4 100644
--- a/cpu/arm926ejs/at91/at91sam9261_devices.c
+++ b/cpu/arm926ejs/at91/at91sam9261_devices.c
@@ -30,29 +30,29 @@

  void at91_serial0_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PC8, 1);		/* TXD0 */
-	at91_set_A_periph(AT91_PIN_PC9, 0);		/* RXD0 */
+	at91_set_A_periph(AT91_PIN_PC8, 0);		/* TXD0 */
+	at91_set_A_periph(AT91_PIN_PC9, 1);		/* RXD0 */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9261_ID_US0);
  }

  void at91_serial1_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PC12, 1);		/* TXD1 */
-	at91_set_A_periph(AT91_PIN_PC13, 0);		/* RXD1 */
+	at91_set_A_periph(AT91_PIN_PC12, 0);		/* TXD1 */
+	at91_set_A_periph(AT91_PIN_PC13, 1);		/* RXD1 */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9261_ID_US1);
  }

  void at91_serial2_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PC14, 1);		/* TXD2 */
-	at91_set_A_periph(AT91_PIN_PC15, 0);		/* RXD2 */
+	at91_set_A_periph(AT91_PIN_PC14, 0);		/* TXD2 */
+	at91_set_A_periph(AT91_PIN_PC15, 1);		/* RXD2 */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9261_ID_US2);
  }

  void at91_serial3_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PA9, 0);		/* DRXD */
-	at91_set_A_periph(AT91_PIN_PA10, 1);		/* DTXD */
+	at91_set_A_periph(AT91_PIN_PA9, 1);			/* DRXD */
+	at91_set_A_periph(AT91_PIN_PA10, 0);		/* DTXD */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_SYS);
  }

diff --git a/cpu/arm926ejs/at91/at91sam9263_devices.c
b/cpu/arm926ejs/at91/at91sam9263_devices.c
index f72efdf..6e7275d 100644
--- a/cpu/arm926ejs/at91/at91sam9263_devices.c
+++ b/cpu/arm926ejs/at91/at91sam9263_devices.c
@@ -34,29 +34,29 @@

  void at91_serial0_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PA26, 1);		/* TXD0 */
-	at91_set_A_periph(AT91_PIN_PA27, 0);		/* RXD0 */
+	at91_set_A_periph(AT91_PIN_PA26, 0);		/* TXD0 */
+	at91_set_A_periph(AT91_PIN_PA27, 1);		/* RXD0 */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_US0);
  }

  void at91_serial1_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PD0, 1);		/* TXD1 */
-	at91_set_A_periph(AT91_PIN_PD1, 0);		/* RXD1 */
+	at91_set_A_periph(AT91_PIN_PD0, 0);		/* TXD1 */
+	at91_set_A_periph(AT91_PIN_PD1, 1);		/* RXD1 */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_US1);
  }

  void at91_serial2_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PD2, 1);		/* TXD2 */
-	at91_set_A_periph(AT91_PIN_PD3, 0);		/* RXD2 */
+	at91_set_A_periph(AT91_PIN_PD2, 0);		/* TXD2 */
+	at91_set_A_periph(AT91_PIN_PD3, 1);		/* RXD2 */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_US2);
  }

  void at91_serial3_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PC30, 0);		/* DRXD */
-	at91_set_A_periph(AT91_PIN_PC31, 1);		/* DTXD */
+	at91_set_A_periph(AT91_PIN_PC30, 1);		/* DRXD */
+	at91_set_A_periph(AT91_PIN_PC31, 0);		/* DTXD */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_SYS);
  }

diff --git a/cpu/arm926ejs/at91/at91sam9m10g45_devices.c
b/cpu/arm926ejs/at91/at91sam9m10g45_devices.c
index 98d90f2..f413855 100644
--- a/cpu/arm926ejs/at91/at91sam9m10g45_devices.c
+++ b/cpu/arm926ejs/at91/at91sam9m10g45_devices.c
@@ -30,29 +30,29 @@

  void at91_serial0_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PB19, 1);	/* TXD0 */
-	at91_set_A_periph(AT91_PIN_PB18, 0);	/* RXD0 */
+	at91_set_A_periph(AT91_PIN_PB19, 0);	/* TXD0 */
+	at91_set_A_periph(AT91_PIN_PB18, 1);	/* RXD0 */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9G45_ID_US0);
  }

  void at91_serial1_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PB4, 1);		/* TXD1 */
-	at91_set_A_periph(AT91_PIN_PB5, 0);		/* RXD1 */
+	at91_set_A_periph(AT91_PIN_PB4, 0);		/* TXD1 */
+	at91_set_A_periph(AT91_PIN_PB5, 1);		/* RXD1 */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9G45_ID_US1);
  }

  void at91_serial2_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PD6, 1);		/* TXD2 */
-	at91_set_A_periph(AT91_PIN_PD7, 0);		/* RXD2 */
+	at91_set_A_periph(AT91_PIN_PD6, 0);		/* TXD2 */
+	at91_set_A_periph(AT91_PIN_PD7, 1);		/* RXD2 */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9G45_ID_US2);
  }

  void at91_serial3_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PB12, 0);	/* DRXD */
-	at91_set_A_periph(AT91_PIN_PB13, 1);	/* DTXD */
+	at91_set_A_periph(AT91_PIN_PB12, 1);	/* DRXD */
+	at91_set_A_periph(AT91_PIN_PB13, 0);	/* DTXD */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_SYS);;
  }

diff --git a/cpu/arm926ejs/at91/at91sam9rl_devices.c
b/cpu/arm926ejs/at91/at91sam9rl_devices.c
index ebed193..82d1c63 100644
--- a/cpu/arm926ejs/at91/at91sam9rl_devices.c
+++ b/cpu/arm926ejs/at91/at91sam9rl_devices.c
@@ -30,29 +30,29 @@

  void at91_serial0_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PA6, 1);		/* TXD0 */
-	at91_set_A_periph(AT91_PIN_PA7, 0);		/* RXD0 */
+	at91_set_A_periph(AT91_PIN_PA6, 0);		/* TXD0 */
+	at91_set_A_periph(AT91_PIN_PA7, 1);		/* RXD0 */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9RL_ID_US0);
  }

  void at91_serial1_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PA11, 1);		/* TXD1 */
-	at91_set_A_periph(AT91_PIN_PA12, 0);		/* RXD1 */
+	at91_set_A_periph(AT91_PIN_PA11, 0);		/* TXD1 */
+	at91_set_A_periph(AT91_PIN_PA12, 1);		/* RXD1 */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9RL_ID_US1);
  }

  void at91_serial2_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PA13, 1);		/* TXD2 */
-	at91_set_A_periph(AT91_PIN_PA14, 0);		/* RXD2 */
+	at91_set_A_periph(AT91_PIN_PA13, 0);		/* TXD2 */
+	at91_set_A_periph(AT91_PIN_PA14, 1);		/* RXD2 */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9RL_ID_US2);
  }

  void at91_serial3_hw_init(void)
  {
-	at91_set_A_periph(AT91_PIN_PA21, 0);		/* DRXD */
-	at91_set_A_periph(AT91_PIN_PA22, 1);		/* DTXD */
+	at91_set_A_periph(AT91_PIN_PA21, 1);		/* DRXD */
+	at91_set_A_periph(AT91_PIN_PA22, 0);		/* DTXD */
  	at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_SYS);
  }


----------------------------------------------------------------------
Rowerem do pracy? Czemu nie!
Kliknij >>> http://link.interia.pl/f2256

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] AT91: revise serial lines pullup configuration
  2009-07-17 21:22 [U-Boot] [PATCH] AT91: revise serial lines pullup configuration, Andrzej Wolski
@ 2009-08-05 23:11 ` Andrzej Wolski
  2009-11-22 21:02 ` [U-Boot] [PATCH] AT91: revise serial lines pullup configuration, Wolfgang Denk
  1 sibling, 0 replies; 4+ messages in thread
From: Andrzej Wolski @ 2009-08-05 23:11 UTC (permalink / raw)
  To: u-boot

> Currently pullups are incorrectly set for all AT91 SoCs:
> pullup for TXD line is enabled, what is not necessary, but
> pullup for RXD line, what may be necessary for some boards,
> is disabled. This patch fixes it: it enables pullup only
> for RXD line.

What about this patch?

Andrzej Wolski


-- 


----------------------------------------------------------------------
Szukasz pracy? Sprawd? nasze oferty!
http://link.interia.pl/f22b8

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] AT91: revise serial lines pullup configuration,
  2009-07-17 21:22 [U-Boot] [PATCH] AT91: revise serial lines pullup configuration, Andrzej Wolski
  2009-08-05 23:11 ` [U-Boot] [PATCH] AT91: revise serial lines pullup configuration Andrzej Wolski
@ 2009-11-22 21:02 ` Wolfgang Denk
  2009-11-26 14:14   ` Tom
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2009-11-22 21:02 UTC (permalink / raw)
  To: u-boot

Dear Tom,

In message <4A60EB7C.4010108@poczta.fm> Andrzej Wolski wrote:
> Currently pullups are incorrectly set for all AT91 SoCs:
> pullup for TXD line is enabled, what is not necessary, but
> pullup for RXD line, what may be necessary for some boards,
> is disabled. This patch fixes it: it enables pullup only
> for RXD line.
> 
> Signed-off-by: Andrzej Wolski <awolski@poczta.fm>

Could you please check the status of this patch:
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/64068

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
... The prejudices people feel about each other disappear  when  then
get to know each other.
	-- Kirk, "Elaan of Troyius", stardate 4372.5

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] AT91: revise serial lines pullup configuration,
  2009-11-22 21:02 ` [U-Boot] [PATCH] AT91: revise serial lines pullup configuration, Wolfgang Denk
@ 2009-11-26 14:14   ` Tom
  0 siblings, 0 replies; 4+ messages in thread
From: Tom @ 2009-11-26 14:14 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk wrote:
> Dear Tom,
> 
> In message <4A60EB7C.4010108@poczta.fm> Andrzej Wolski wrote:
>> Currently pullups are incorrectly set for all AT91 SoCs:
>> pullup for TXD line is enabled, what is not necessary, but
>> pullup for RXD line, what may be necessary for some boards,
>> is disabled. This patch fixes it: it enables pullup only
>> for RXD line.
>>
>> Signed-off-by: Andrzej Wolski <awolski@poczta.fm>
> 
> Could you please check the status of this patch:
> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/64068
> 
> Best regards,
> 
> Wolfgang Denk
> 

Andrzej,
This patch looks similar to what was done recently for overo.
Please add a comment in the code to the setting of the pullup.
Please also add a comment to commit log explaining why this
needs to change, just saying it is wrong is not enough of
an explanation.  In the case of overo, the problem that was
fixed was random hangs when the serial wasn't connected.

Please also check is any new at91 boards were added since
you first submitted this patch.

Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-26 14:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-17 21:22 [U-Boot] [PATCH] AT91: revise serial lines pullup configuration, Andrzej Wolski
2009-08-05 23:11 ` [U-Boot] [PATCH] AT91: revise serial lines pullup configuration Andrzej Wolski
2009-11-22 21:02 ` [U-Boot] [PATCH] AT91: revise serial lines pullup configuration, Wolfgang Denk
2009-11-26 14:14   ` Tom

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.