From patchwork Tue Dec 2 08:49:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 5418401 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 814C3BEEA8 for ; Tue, 2 Dec 2014 08:56:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 60166202FE for ; Tue, 2 Dec 2014 08:56:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 76347202BE for ; Tue, 2 Dec 2014 08:56:37 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XvjCx-000846-9s; Tue, 02 Dec 2014 08:53:19 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XvjAI-0004or-3L for linux-arm-kernel@lists.infradead.org; Tue, 02 Dec 2014 08:50:36 +0000 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NFY00DX85VCHR40@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 02 Dec 2014 17:50:00 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.114]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 04.4F.17016.73D7D745; Tue, 02 Dec 2014 17:50:00 +0900 (KST) X-AuditID: cbfee68d-f79296d000004278-10-547d7d3771c1 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 74.05.09430.73D7D745; Tue, 02 Dec 2014 17:49:59 +0900 (KST) Received: from chan.10.32.193.11 ([10.252.81.195]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NFY00K6X5V9LDO1@mmp2.samsung.com>; Tue, 02 Dec 2014 17:49:59 +0900 (KST) From: Chanwoo Choi To: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 17/19] serial: samsung: Add the support for Exynos5433 SoC Date: Tue, 02 Dec 2014 17:49:54 +0900 Message-id: <1417510196-6714-18-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.5.5 In-reply-to: <1417510196-6714-1-git-send-email-cw00.choi@samsung.com> References: <1417510196-6714-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrBIsWRmVeSWpSXmKPExsWyRsSkSNeitjbEYOEWNovHaxYzWfyddIzd 4v2yHkaLy/u1La5/ec5qMf/IOVaLPxNa2SyaF69ns5h0fwKLxY1fbawWn3/vYrXoXXCVzeJs 0xt2i02Pr7FaXN41h81ixvl9TBZnFveyW/y984/NYun1i0wWp65/ZrNYtPULu8XhN+2sFjMm v2SzWLXrD6PFy48nWBwkPdbMW8Po8fvXJEaPnbPusnvsn7uG3WPzknqPKyeaWD36tqxi9Diz 4Ai7x+dNcgGcUVw2Kak5mWWpRfp2CVwZ067uZy6YKVNxeekclgbGJeJdjBwcEgImEtMvOncx cgKZYhIX7q1n62Lk4hASWMooseDUCjaIhInE9atn2CES0xklWid/YYFwmpgklh2ezQ5SxSag JbH/xQ2wDhEBZ4mGqY1MIEXMAndYJGZeb2ACSQgLeEns+nkerIhFQFXi2L7/YM28Aq4Sx6+d ZoJYpyCxbP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hK/Wj+yT2DkXcDIsIpRNLUguaA4KT3XSK84Mbe4 NC9dLzk/dxMjOEE8k97BuKrB4hCjAAejEg/vifM1IUKsiWXFlbmHGCU4mJVEeH8Z14YI8aYk VlalFuXHF5XmpBYfYjQFumois5Rocj4weeWVxBsam5gZWRqZG1oYGZsrifPeuJkbIiSQnliS mp2aWpBaBNPHxMEp1cDoOi9b8Z+6/wXJy1siT1691BR4Z+ZCpuDVdmse7E01WjvTR3DBzrUv DXsTugvmf52Qwt9/v8eGh7+MuSBZfnHbrR8CW56LBfkqJ3yTWeRV9fkJu9P6k0fVEt5skfmW EPogdOfG+Y3dj5YvkWPf1JB3spBTdJ/SQuGFdTF6Nm88arSMluw+mq6hxFKckWioxVxUnAgA OG37VCYDAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141202_005034_298993_46AEA1D2 X-CRM114-Status: GOOD ( 11.17 ) X-Spam-Score: -5.0 (-----) Cc: mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, tomasz.figa@gmail.com, s.nawrocki@samsung.com, Jiri Slaby , kgene.kim@samsung.com, pankaj.dubey@samsung.com, jh80.chung@samsung.com, cw00.choi@samsung.com, linux-serial@vger.kernel.org, a.kesavan@samsung.com, devicetree@vger.kernel.org, geunsik.lim@samsung.com, arnd@arndb.de, marc.zyngier@arm.com, inki.dae@samsung.com, linux-arm-kernel@lists.infradead.org, Greg Kroah-Hartman , sw0312.kim@samsung.com, kyungmin.park@samsung.com, olof@lixom.net, chanho61.park@samsung.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds new s3c24xx_serial_drv_data structure for Exynos5433 SoC because Exynos5433 has different fifo size from existing Exynos4 SoC. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Signed-off-by: Chanwoo Choi Acked-by: Inki Dae Acked-by: Geunsik Lim --- drivers/tty/serial/samsung.c | 56 ++++++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 20 deletions(-) diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index c78f43a..1747fdc 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -1771,32 +1771,43 @@ static struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = { #endif #if defined(CONFIG_ARCH_EXYNOS) +#define EXYNOS_COMMON_SERIAL_DRV_DATA \ + .info = &(struct s3c24xx_uart_info) { \ + .name = "Samsung Exynos UART", \ + .type = PORT_S3C6400, \ + .has_divslot = 1, \ + .rx_fifomask = S5PV210_UFSTAT_RXMASK, \ + .rx_fifoshift = S5PV210_UFSTAT_RXSHIFT, \ + .rx_fifofull = S5PV210_UFSTAT_RXFULL, \ + .tx_fifofull = S5PV210_UFSTAT_TXFULL, \ + .tx_fifomask = S5PV210_UFSTAT_TXMASK, \ + .tx_fifoshift = S5PV210_UFSTAT_TXSHIFT, \ + .def_clk_sel = S3C2410_UCON_CLKSEL0, \ + .num_clks = 1, \ + .clksel_mask = 0, \ + .clksel_shift = 0, \ + }, \ + .def_cfg = &(struct s3c2410_uartcfg) { \ + .ucon = S5PV210_UCON_DEFAULT, \ + .ufcon = S5PV210_UFCON_DEFAULT, \ + .has_fracval = 1, \ + } \ + static struct s3c24xx_serial_drv_data exynos4210_serial_drv_data = { - .info = &(struct s3c24xx_uart_info) { - .name = "Samsung Exynos4 UART", - .type = PORT_S3C6400, - .has_divslot = 1, - .rx_fifomask = S5PV210_UFSTAT_RXMASK, - .rx_fifoshift = S5PV210_UFSTAT_RXSHIFT, - .rx_fifofull = S5PV210_UFSTAT_RXFULL, - .tx_fifofull = S5PV210_UFSTAT_TXFULL, - .tx_fifomask = S5PV210_UFSTAT_TXMASK, - .tx_fifoshift = S5PV210_UFSTAT_TXSHIFT, - .def_clk_sel = S3C2410_UCON_CLKSEL0, - .num_clks = 1, - .clksel_mask = 0, - .clksel_shift = 0, - }, - .def_cfg = &(struct s3c2410_uartcfg) { - .ucon = S5PV210_UCON_DEFAULT, - .ufcon = S5PV210_UFCON_DEFAULT, - .has_fracval = 1, - }, + EXYNOS_COMMON_SERIAL_DRV_DATA, .fifosize = { 256, 64, 16, 16 }, }; + +static struct s3c24xx_serial_drv_data exynos5433_serial_drv_data = { + EXYNOS_COMMON_SERIAL_DRV_DATA, + .fifosize = { 64, 256, 16, 256 }, +}; + #define EXYNOS4210_SERIAL_DRV_DATA ((kernel_ulong_t)&exynos4210_serial_drv_data) +#define EXYNOS5433_SERIAL_DRV_DATA ((kernel_ulong_t)&exynos5433_serial_drv_data) #else #define EXYNOS4210_SERIAL_DRV_DATA (kernel_ulong_t)NULL +#define EXYNOS5433_SERIAL_DRV_DATA (kernel_ulong_t)NULL #endif static struct platform_device_id s3c24xx_serial_driver_ids[] = { @@ -1818,6 +1829,9 @@ static struct platform_device_id s3c24xx_serial_driver_ids[] = { }, { .name = "exynos4210-uart", .driver_data = EXYNOS4210_SERIAL_DRV_DATA, + }, { + .name = "exynos5433-uart", + .driver_data = EXYNOS5433_SERIAL_DRV_DATA, }, { }, }; @@ -1837,6 +1851,8 @@ static const struct of_device_id s3c24xx_uart_dt_match[] = { .data = (void *)S5PV210_SERIAL_DRV_DATA }, { .compatible = "samsung,exynos4210-uart", .data = (void *)EXYNOS4210_SERIAL_DRV_DATA }, + { .compatible = "samsung,exynos5433-uart", + .data = (void *)EXYNOS5433_SERIAL_DRV_DATA }, {}, }; MODULE_DEVICE_TABLE(of, s3c24xx_uart_dt_match);