All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Bießmann" <andreas.devel@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH atmel/next 7/7] driver/serial: delete at91rm9200_usart
Date: Sun, 12 Jun 2011 13:49:17 +0200	[thread overview]
Message-ID: <1307879357-97986-8-git-send-email-andreas.devel@googlemail.com> (raw)
In-Reply-To: <1307879357-97986-1-git-send-email-andreas.devel@googlemail.com>

The at91rm9200_usart driver could be fully replaced by atmel_usart driver.

Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com>
---
 drivers/serial/Makefile           |    1 -
 drivers/serial/at91rm9200_usart.c |  126 -------------------------------------
 2 files changed, 0 insertions(+), 127 deletions(-)
 delete mode 100644 drivers/serial/at91rm9200_usart.c

diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index 5a6011e..0e171b6 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -28,7 +28,6 @@ LIB	:= $(obj)libserial.o
 COBJS-$(CONFIG_ALTERA_UART) += altera_uart.o
 COBJS-$(CONFIG_ALTERA_JTAG_UART) += altera_jtag_uart.o
 COBJS-$(CONFIG_ARM_DCC) += arm_dcc.o
-COBJS-$(CONFIG_AT91RM9200_USART) += at91rm9200_usart.o
 COBJS-$(CONFIG_ATMEL_USART) += atmel_usart.o
 COBJS-$(CONFIG_MCFUART) += mcfuart.o
 COBJS-$(CONFIG_NS9750_UART) += ns9750_serial.o
diff --git a/drivers/serial/at91rm9200_usart.c b/drivers/serial/at91rm9200_usart.c
deleted file mode 100644
index 05ebbc3..0000000
--- a/drivers/serial/at91rm9200_usart.c
+++ /dev/null
@@ -1,126 +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 at 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>
-
-#ifndef CONFIG_AT91_LEGACY
-#include <asm/io.h>
-#include <asm/arch/hardware.h>
-#define CONFIG_AT91_LEGACY
-#include <asm/arch-at91rm9200/AT91RM9200.h>
-#warning Please update to use C structur SoC access !
-#else
-#include <asm/arch/AT91RM9200.h>
-#endif
-
-DECLARE_GLOBAL_DATA_PTR;
-
-#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;
-
-	if ((baudrate = gd->baudrate) <= 0)
-		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_exit (void)
-{
-	us->US_CR = (AT91C_US_RSTRX | AT91C_US_RSTTX);
-}
-
-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.5.4

  parent reply	other threads:[~2011-06-12 11:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-12 11:49 [U-Boot] [PATCH atmel/next 0/7] replace at91rm9200_usart by atmel_usart Andreas Bießmann
2011-06-12 11:49 ` [U-Boot] [PATCH atmel/next 1/7] arm920t/at91: add clock.c Andreas Bießmann
2011-06-12 11:49 ` [U-Boot] [PATCH atmel/next 2/7] arm920t/at91: use new clock.c features Andreas Bießmann
2011-06-12 11:49 ` [U-Boot] [PATCH atmel/next 3/7] arm920t/at91: add at91rm9200_devices.c Andreas Bießmann
2011-06-12 11:49 ` [U-Boot] [PATCH atmel/next 4/7] at91rm9200ek: use atmel_usart Andreas Bießmann
2011-06-12 11:49 ` [U-Boot] [PATCH atmel/next 5/7] eb_cpux9k2: " Andreas Bießmann
2011-06-26 18:10   ` Jens Scharsig
2011-06-12 11:49 ` [U-Boot] [PATCH atmel/next 6/7] cpuat91: " Andreas Bießmann
2011-06-12 11:49 ` Andreas Bießmann [this message]
2011-06-30  8:42 ` [U-Boot] [PATCH atmel/next 0/7] replace at91rm9200_usart by atmel_usart Reinhard Meyer

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=1307879357-97986-8-git-send-email-andreas.devel@googlemail.com \
    --to=andreas.devel@googlemail.com \
    --cc=u-boot@lists.denx.de \
    /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 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.