From patchwork Thu Oct 13 21:06:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 119618 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 8FA12B71CC for ; Fri, 14 Oct 2011 08:08:10 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A764E28BF4; Thu, 13 Oct 2011 23:08:01 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DK2Yc1+ypNYm; Thu, 13 Oct 2011 23:08:01 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0341328BBA; Thu, 13 Oct 2011 23:07:36 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D7E1528B96 for ; Thu, 13 Oct 2011 23:07:26 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gdjfRaMPopPh for ; Thu, 13 Oct 2011 23:07:24 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by theia.denx.de (Postfix) with ESMTPS id 7722528B98 for ; Thu, 13 Oct 2011 23:07:16 +0200 (CEST) Received: from hpaq12.eem.corp.google.com (hpaq12.eem.corp.google.com [172.25.149.12]) by smtp-out.google.com with ESMTP id p9DL79LU016271; Thu, 13 Oct 2011 14:07:09 -0700 Received: from sglass.mtv.corp.google.com (sglass.mtv.corp.google.com [172.22.72.144]) by hpaq12.eem.corp.google.com with ESMTP id p9DL77cg018383; Thu, 13 Oct 2011 14:07:08 -0700 Received: by sglass.mtv.corp.google.com (Postfix, from userid 121222) id 79F86141223; Thu, 13 Oct 2011 14:07:06 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Thu, 13 Oct 2011 14:06:01 -0700 Message-Id: <1318539963-3329-8-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.3.1 In-Reply-To: <1318539963-3329-1-git-send-email-sjg@chromium.org> References: <1318539963-3329-1-git-send-email-sjg@chromium.org> X-System-Of-Record: true Cc: Tom Warren Subject: [U-Boot] [PATCH 7/9] tegra2: Remove unused low-level Tegra2 UART code X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This was used by the AVP in early boot but is no longer used. Unless we plan to enable it somehow it is not needed. In any case we should try to use the ns16550 driver instead as it has the same code. Signed-off-by: Simon Glass --- drivers/serial/Makefile | 1 - drivers/serial/serial_tegra2.c | 77 ---------------------------------------- drivers/serial/serial_tegra2.h | 29 --------------- 3 files changed, 0 insertions(+), 107 deletions(-) delete mode 100644 drivers/serial/serial_tegra2.c delete mode 100644 drivers/serial/serial_tegra2.h diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile index 1dcc1c7..d2915f5 100644 --- a/drivers/serial/Makefile +++ b/drivers/serial/Makefile @@ -54,7 +54,6 @@ COBJS-$(CONFIG_S3C24X0_SERIAL) += serial_s3c24x0.o COBJS-$(CONFIG_S3C44B0_SERIAL) += serial_s3c44b0.o COBJS-$(CONFIG_XILINX_UARTLITE) += serial_xuartlite.o COBJS-$(CONFIG_SCIF_CONSOLE) += serial_sh.o -COBJS-$(CONFIG_TEGRA2) += serial_tegra2.o ifndef CONFIG_SPL_BUILD COBJS-$(CONFIG_USB_TTY) += usbtty.o diff --git a/drivers/serial/serial_tegra2.c b/drivers/serial/serial_tegra2.c deleted file mode 100644 index 8ff34ea..0000000 --- a/drivers/serial/serial_tegra2.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * (C) Copyright 2010,2011 - * NVIDIA Corporation - * - * See file CREDITS for list of people who contributed to this - * project. - * - * 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 -#include -#include -#include -#include "serial_tegra2.h" - -static void setup_uart(struct uart_ctlr *u) -{ - u32 reg; - - /* Prepare the divisor value */ - reg = NVRM_PLLP_FIXED_FREQ_KHZ * 1000 / NV_DEFAULT_DEBUG_BAUD / 16; - - /* Set up UART parameters */ - writel(UART_LCR_DLAB, &u->uart_lcr); - writel(reg, &u->uart_thr_dlab_0); - writel(0, &u->uart_ier_dlab_0); - writel(0, &u->uart_lcr); /* clear DLAB */ - writel((UART_FCR_TRIGGER_3 | UART_FCR_FIFO_EN | \ - UART_FCR_CLEAR_XMIT | UART_FCR_CLEAR_RCVR), &u->uart_iir_fcr); - writel(0, &u->uart_ier_dlab_0); - writel(UART_LCR_WLS_8, &u->uart_lcr); /* 8N1 */ - writel(UART_MCR_RTS, &u->uart_mcr); - writel(0, &u->uart_msr); - writel(0, &u->uart_spr); - writel(0, &u->uart_irda_csr); - writel(0, &u->uart_asr); - writel((UART_FCR_TRIGGER_3 | UART_FCR_FIFO_EN), &u->uart_iir_fcr); - - /* Flush any old characters out of the RX FIFO */ - reg = readl(&u->uart_lsr); - - while (reg & UART_LSR_DR) { - reg = readl(&u->uart_thr_dlab_0); - reg = readl(&u->uart_lsr); - } -} - -/* - * Routine: uart_init - * Description: init the UART clocks, muxes, and baudrate/parity/etc. - */ -void uart_init(void) -{ - struct uart_ctlr *uart = (struct uart_ctlr *)NV_PA_APB_UARTD_BASE; -#if defined(CONFIG_TEGRA2_ENABLE_UARTD) - setup_uart(uart); -#endif /* CONFIG_TEGRA2_ENABLE_UARTD */ -#if defined(CONFIG_TEGRA2_ENABLE_UARTA) - uart = (struct uart_ctlr *)NV_PA_APB_UARTA_BASE; - - setup_uart(uart); -#endif /* CONFIG_TEGRA2_ENABLE_UARTA */ -} diff --git a/drivers/serial/serial_tegra2.h b/drivers/serial/serial_tegra2.h deleted file mode 100644 index 5704800..0000000 --- a/drivers/serial/serial_tegra2.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * (C) Copyright 2010,2011 - * NVIDIA Corporation - * - * See file CREDITS for list of people who contributed to this - * project. - * - * 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 - */ - -#ifndef _SERIAL_TEGRA_H_ -#define _SERIAL_TEGRA_H_ - -#include - -#endif /* _SERIAL_TEGRA_H_ */