[U-Boot] [PATCH] AT91: revise serial lines pullup configuration,
Andrzej Wolski
awolski at poczta.fm
Fri Jul 17 23:22:04 CEST 2009
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 at 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
More information about the U-Boot
mailing list