* [PATCH 1/2] serial: drop non used at91rm9200 driver
@ 2012-01-05 13:30 Jean-Christophe PLAGNIOL-VILLARD
2012-01-05 13:30 ` [PATCH 2/2] at91: 9260 and 9g20 add support of join SRAM Memory Mapping Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 2+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-01-05 13:30 UTC (permalink / raw)
To: barebox
we use atmel driver now
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
drivers/serial/serial_at91rm9200.c | 110 ------------------------------------
1 files changed, 0 insertions(+), 110 deletions(-)
delete mode 100644 drivers/serial/serial_at91rm9200.c
diff --git a/drivers/serial/serial_at91rm9200.c b/drivers/serial/serial_at91rm9200.c
deleted file mode 100644
index 9bdc626..0000000
--- a/drivers/serial/serial_at91rm9200.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * (C) Copyright 2002
- * Lineo, Inc <www.lineo.com>
- * Bernhard Kuhn <bkuhn@lineo.com>
- *
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Marius Groeger <mgroeger@sysgo.de>
- *
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Alex Zuepke <azu@sysgo.de>
- *
- * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-#include <common.h>
-#include <io.h>
-#include <mach/hardware.h>
-
-#if !defined(CONFIG_DBGU) && !defined(CONFIG_USART0) && !defined(CONFIG_USART1)
-#error must define one of CONFIG_DBGU or CONFIG_USART0 or CONFIG_USART1
-#endif
-
-/* ggi thunder */
-#ifdef CONFIG_DBGU
-AT91PS_USART us = (AT91PS_USART) AT91C_BASE_DBGU;
-#endif
-#ifdef CONFIG_USART0
-AT91PS_USART us = (AT91PS_USART) AT91C_BASE_US0;
-#endif
-#ifdef CONFIG_USART1
-AT91PS_USART us = (AT91PS_USART) AT91C_BASE_US1;
-#endif
-
-void serial_setbrg (void)
-{
- int baudrate;
-
- baudrate = CONFIG_BAUDRATE;
- /* MASTER_CLOCK/(16 * baudrate) */
- us->US_BRGR = (AT91C_MASTER_CLOCK >> 4) / (unsigned)baudrate;
-}
-
-int serial_init (void)
-{
- /* make any port initializations specific to this port */
-#ifdef CONFIG_DBGU
- *AT91C_PIOA_PDR = AT91C_PA31_DTXD | AT91C_PA30_DRXD; /* PA 31 & 30 */
- *AT91C_PMC_PCER = 1 << AT91C_ID_SYS; /* enable clock */
-#endif
-#ifdef CONFIG_USART0
- *AT91C_PIOA_PDR = AT91C_PA17_TXD0 | AT91C_PA18_RXD0;
- *AT91C_PMC_PCER |= 1 << AT91C_ID_USART0; /* enable clock */
-#endif
-#ifdef CONFIG_USART1
- *AT91C_PIOB_PDR = AT91C_PB21_TXD1 | AT91C_PB20_RXD1;
- *AT91C_PMC_PCER |= 1 << AT91C_ID_USART1; /* enable clock */
-#endif
- serial_setbrg ();
-
- us->US_CR = AT91C_US_RSTRX | AT91C_US_RSTTX;
- us->US_CR = AT91C_US_RXEN | AT91C_US_TXEN;
- us->US_MR =
- (AT91C_US_CLKS_CLOCK | AT91C_US_CHRL_8_BITS |
- AT91C_US_PAR_NONE | AT91C_US_NBSTOP_1_BIT);
- us->US_IMR = ~0ul;
- return (0);
-}
-
-void serial_putc (const char c)
-{
- if (c == '\n')
- serial_putc ('\r');
- while ((us->US_CSR & AT91C_US_TXRDY) == 0);
- us->US_THR = c;
-}
-
-void serial_puts (const char *s)
-{
- while (*s) {
- serial_putc (*s++);
- }
-}
-
-int serial_getc (void)
-{
- while ((us->US_CSR & AT91C_US_RXRDY) == 0);
- return us->US_RHR;
-}
-
-int serial_tstc (void)
-{
- return ((us->US_CSR & AT91C_US_RXRDY) == AT91C_US_RXRDY);
-}
--
1.7.7
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] at91: 9260 and 9g20 add support of join SRAM Memory Mapping
2012-01-05 13:30 [PATCH 1/2] serial: drop non used at91rm9200 driver Jean-Christophe PLAGNIOL-VILLARD
@ 2012-01-05 13:30 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 2+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-01-05 13:30 UTC (permalink / raw)
To: barebox
on 9269 and 9g20 the sram are mirrored at then of the bank so we can join them
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
arch/arm/mach-at91/at91sam9260_devices.c | 12 ++++--------
arch/arm/mach-at91/include/mach/at91sam9260.h | 4 ++++
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index 25a68ca..8e8ea3b 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -26,15 +26,11 @@ void at91_add_device_sdram(u32 size)
{
arm_add_mem_device("ram0", AT91_CHIPSELECT_1, size);
if (cpu_is_at91sam9g20()) {
- add_mem_device("sram0", AT91SAM9G20_SRAM0_BASE,
- AT91SAM9G20_SRAM0_SIZE, IORESOURCE_MEM_WRITEABLE);
- add_mem_device("sram1", AT91SAM9G20_SRAM1_BASE,
- AT91SAM9G20_SRAM1_SIZE, IORESOURCE_MEM_WRITEABLE);
+ add_mem_device("sram0", AT91SAM9G20_SRAM_BASE,
+ AT91SAM9G20_SRAM_SIZE, IORESOURCE_MEM_WRITEABLE);
} else {
- add_mem_device("sram0", AT91SAM9260_SRAM0_BASE,
- AT91SAM9260_SRAM0_SIZE, IORESOURCE_MEM_WRITEABLE);
- add_mem_device("sram1", AT91SAM9260_SRAM1_BASE,
- AT91SAM9260_SRAM1_SIZE, IORESOURCE_MEM_WRITEABLE);
+ add_mem_device("sram0", AT91SAM9260_SRAM_BASE,
+ AT91SAM9260_SRAM_SIZE, IORESOURCE_MEM_WRITEABLE);
}
}
diff --git a/arch/arm/mach-at91/include/mach/at91sam9260.h b/arch/arm/mach-at91/include/mach/at91sam9260.h
index 72dc931..ca273cb 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9260.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9260.h
@@ -121,6 +121,8 @@
#define AT91SAM9260_SRAM0_SIZE SZ_4K /* Internal SRAM 0 size (4Kb) */
#define AT91SAM9260_SRAM1_BASE 0x00300000 /* Internal SRAM 1 base address */
#define AT91SAM9260_SRAM1_SIZE SZ_4K /* Internal SRAM 1 size (4Kb) */
+#define AT91SAM9260_SRAM_BASE 0x002FF000 /* Internal SRAM base address */
+#define AT91SAM9260_SRAM_SIZE SZ_8K /* Internal SRAM size (8Kb) */
#define AT91SAM9260_UHP_BASE 0x00500000 /* USB Host controller */
@@ -134,6 +136,8 @@
#define AT91SAM9G20_SRAM0_SIZE SZ_16K /* Internal SRAM 0 size (16Kb) */
#define AT91SAM9G20_SRAM1_BASE 0x00300000 /* Internal SRAM 1 base address */
#define AT91SAM9G20_SRAM1_SIZE SZ_16K /* Internal SRAM 1 size (16Kb) */
+#define AT91SAM9G20_SRAM_BASE 0x002FC000 /* Internal SRAM base address */
+#define AT91SAM9G20_SRAM_SIZE SZ_32K /* Internal SRAM size (32Kb) */
#define AT91SAM9G20_UHP_BASE 0x00500000 /* USB Host controller */
--
1.7.7
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-05 13:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-05 13:30 [PATCH 1/2] serial: drop non used at91rm9200 driver Jean-Christophe PLAGNIOL-VILLARD
2012-01-05 13:30 ` [PATCH 2/2] at91: 9260 and 9g20 add support of join SRAM Memory Mapping Jean-Christophe PLAGNIOL-VILLARD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox