From patchwork Wed Jun 22 07:18:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dirk Behme X-Patchwork-Id: 9192021 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 03FD86075C for ; Wed, 22 Jun 2016 07:22:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E044B283F0 for ; Wed, 22 Jun 2016 07:22:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D5140283F2; Wed, 22 Jun 2016 07:22:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7C47B283F0 for ; Wed, 22 Jun 2016 07:22:07 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFcRd-00066b-N0; Wed, 22 Jun 2016 07:19:29 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFcRc-00066K-0G for xen-devel@lists.xenproject.org; Wed, 22 Jun 2016 07:19:28 +0000 Received: from [193.109.254.147] by server-9.bemta-14.messagelabs.com id 51/12-32749-FFB3A675; Wed, 22 Jun 2016 07:19:27 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrFIsWRWlGSWpSXmKPExsXSzf+WW/efdVa 4wYc/ahbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8bHRU+ZCx6KVhw7s4algXGqYBcjF4eQwBlG ibWnrjF2MXJysAi8ZZLYvikHIvGMUaLzYA8ThLOGUaJ/5292CGclo8SsI42sIC1sAloSOyd0s IPYIgLlEqv2PWIFKWIWmMcocWHTNBaQhLCAg8Sy/ZeAdnAA7VCVmPnNHSTMK+Au0XZ3LdhqCQ E5iXWTv7NDxAUlTs58AtbKLCAhcfDFC2aIGhGJiX/fs0HYlhLtK0+CXSchsIlJ4teBt4wTGAV nIemfhaR/ASPTKkaN4tSistQiXUMzvaSizPSMktzEzBxdQ0MTvdzU4uLE9NScxKRiveT83E2M wDCtZ2Bg3MH49bTnIUZJDiYlUV555axwIb6k/JTKjMTijPii0pzU4kOMMhwcShK8+hZAOcGi1 PTUirTMHGDEwKQlOHiURHjVQdK8xQWJucWZ6RCpU4yKUuK8HCAJAZBERmkeXBssSi8xykoJ8z IyMDAI8RSkFuVmlqDKv2IU52BUEuZ1ApnCk5lXAjf9FdBiJqDFy/rTQRaXJCKkpBoYOxgn8EZ +vqB41fqOZuxcluDIpbN8lvftfJJwMU+jb2lAq6LZzsKIH1VO/i4vLrjOY+3dZXXqR6rYYdud mlcLWAP2NExMCfu6zHBla4mI0JIvS3eL9PbW1rxbuu+I9GP1rY1J8zn79k+ROzV37dndn/89L us+9/0cX11j464JYudUrzE35fmGK7EUZyQaajEXFScCAFVn2avNAgAA X-Env-Sender: Dirk.Behme@de.bosch.com X-Msg-Ref: server-10.tower-27.messagelabs.com!1466579966!49191046!1 X-Originating-IP: [139.15.237.11] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTM5LjE1LjIzNy4xMSA9PiAxNTMwMzA=\n X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 40917 invoked from network); 22 Jun 2016 07:19:26 -0000 Received: from smtp6-v.fe.bosch.de (HELO smtp6-v.fe.bosch.de) (139.15.237.11) by server-10.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 22 Jun 2016 07:19:26 -0000 Received: from vsmta14.fe.internet.bosch.com (unknown [10.4.98.54]) by imta24.fe.bosch.de (Postfix) with ESMTP id E33D9D801DB for ; Wed, 22 Jun 2016 09:19:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=de.bosch.com; s=2015-01-21; t=1466579966; bh=SjyolJ6M+0LX9Hzfl8UIAAZl60M7MAZfzyR+LqksUTU=; l=10; h=From:From:Reply-To:Sender; b=CeHHXHJ+7PYvaK44SpKHstYOXsPyd3zTAFru7qAd43EHfAIRvQyD6f0xO8EhFtq3Z itW+3ERjBpQqzh60T+HjLiFWxJlB+qnFuUf6iahEUWWGiqywWTYJDCo0RBZn2Q8l+e DR9nkJ4tllnlFyUxgWrygBJWgMG3wcqCwMUmHGtM= Received: from FE-HUB1001.de.bosch.com (vsgw23.fe.internet.bosch.com [10.4.98.23]) by vsmta14.fe.internet.bosch.com (Postfix) with ESMTP id 8988FA40330 for ; Wed, 22 Jun 2016 09:19:25 +0200 (CEST) Received: from hi-z08if.hi.de.bosch.com (10.34.209.31) by FE-HUB1001.de.bosch.com (10.4.103.109) with Microsoft SMTP Server id 14.3.195.1; Wed, 22 Jun 2016 09:19:24 +0200 Received: from hi-z08if.hi.de.bosch.com (localhost [127.0.0.1]) by hi-z08if.hi.de.bosch.com (Postfix) with ESMTP id EEB7B625F14; Wed, 22 Jun 2016 09:18:38 +0200 (CEST) From: Dirk Behme To: , Julien Grall , Stefano Stabellini Date: Wed, 22 Jun 2016 09:18:28 +0200 Message-ID: <1466579909-17008-1-git-send-email-dirk.behme@de.bosch.com> X-Mailer: git-send-email 2.8.0 MIME-Version: 1.0 X-TM-AS-MML: disable X-TM-AS-Product-Ver: IMSS-7.1.0.1679-8.0.0.1202-22404.006 X-TMASE-MatchedRID: Yko50vy9C3gJgF8W77xm6hcanaCAqviGTJDl9FKHbrmiXe5nNnUYt0FN G6vV64NphlBpwBWpcq7kE1yyOWb0XLEMJCLOBFF282YZTB0b+K8WTveLitVUgU6fPJq+dO88q0/ T9Q8N3RR1PZg9oWxRpU4ZJ0oM1c08L47TD00zmvJAwvZYEy8IBVTcrppXVp3tmyiLZetSf8mfop 0ytGwvXiq2rl3dzGQ1A/zV34DQstVq8iPUQbLDSdfqIS4mb59dhLHqcUBNLVL8IrqHAzrjMg== Cc: Oleksandr Tyshchenko , Iurii Konovalenko , Dirk Behme Subject: [Xen-devel] [PATCH v2 1/2] xen/arm: drivers: scif: Remove dead code X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP The two struct members baud and clock_hz are in the end read only variables nowhere used for anything useful. Removing them makes the code much simpler without changing any functionality. Signed-off-by: Dirk Behme --- xen/drivers/char/scif-uart.c | 24 +----------------------- xen/include/asm-arm/scif-uart.h | 1 - 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/xen/drivers/char/scif-uart.c b/xen/drivers/char/scif-uart.c index 51a2233..bc157fe 100644 --- a/xen/drivers/char/scif-uart.c +++ b/xen/drivers/char/scif-uart.c @@ -41,7 +41,7 @@ #define scif_writew(uart, off, val) writew((val), (uart)->regs + (off)) static struct scif_uart { - unsigned int baud, clock_hz, data_bits, parity, stop_bits; + unsigned int data_bits, parity, stop_bits; unsigned int irq; char __iomem *regs; struct irqaction irqaction; @@ -87,7 +87,6 @@ static void scif_uart_interrupt(int irq, void *data, struct cpu_user_regs *regs) static void __init scif_uart_init_preirq(struct serial_port *port) { struct scif_uart *uart = port->uart; - unsigned int divisor; uint16_t val; /* @@ -142,25 +141,6 @@ static void __init scif_uart_init_preirq(struct serial_port *port) } scif_writew(uart, SCIF_SCSMR, val); - ASSERT( uart->clock_hz > 0 ); - if ( uart->baud != BAUD_AUTO ) - { - /* Setup desired Baud rate */ - divisor = uart->clock_hz / (uart->baud << 4); - ASSERT( divisor >= 1 && divisor <= (uint16_t)UINT_MAX ); - scif_writew(uart, SCIF_DL, (uint16_t)divisor); - /* Selects the frequency divided clock (SC_CLK external input) */ - scif_writew(uart, SCIF_CKS, 0); - udelay(1000000 / uart->baud + 1); - } - else - { - /* Read current Baud rate */ - divisor = scif_readw(uart, SCIF_DL); - ASSERT( divisor >= 1 && divisor <= (uint16_t)UINT_MAX ); - uart->baud = uart->clock_hz / (divisor << 4); - } - /* Setup trigger level for TX/RX FIFOs */ scif_writew(uart, SCIF_SCFCR, SCFCR_RTRG11 | SCFCR_TTRG11); @@ -303,8 +283,6 @@ static int __init scif_uart_init(struct dt_device_node *dev, uart = &scif_com; - uart->clock_hz = SCIF_CLK_FREQ; - uart->baud = BAUD_AUTO; uart->data_bits = 8; uart->parity = PARITY_NONE; uart->stop_bits = 1; diff --git a/xen/include/asm-arm/scif-uart.h b/xen/include/asm-arm/scif-uart.h index 7a9f639..d030b26 100644 --- a/xen/include/asm-arm/scif-uart.h +++ b/xen/include/asm-arm/scif-uart.h @@ -22,7 +22,6 @@ #define __ASM_ARM_SCIF_UART_H #define SCIF_FIFO_MAX_SIZE 16 -#define SCIF_CLK_FREQ 14745600 /* Register offsets */ #define SCIF_SCSMR (0x00) /* Serial mode register */