From patchwork Mon Dec 31 16:59:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 127 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f198.google.com (cartago.priv [10.11.12.1]) by cassiopea.amarulasolutions.com (Postfix) with ESMTPS id 9B7892E002E for ; Mon, 31 Dec 2018 18:01:35 +0100 (CET) Received: by mail-pg1-f198.google.com with SMTP id 202sf24542284pgb.6 for ; Mon, 31 Dec 2018 09:01:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1546275694; cv=pass; d=google.com; s=arc-20160816; b=Bqztxn8LjIKdzSprtOqHOVoBv2ivjgwbdnQ1+C2OviQ5OZiwRKfoCtNlOE6Tz6dNZI 7UFJGBOpHreUkR5ZPRBMKjn8eIDRocnjI3iIhLbnGAnsYX4UGW62ZA1dzHhPPgYvjfa8 G8KweVtAaN2K1X35Yn7tcdRXrFX+oR/dLxQov0IMY2uUJjd454rDufO2GJdb+mb8j5Uh 1GkffuSmeCraSCeeHcKrcOKWkzPwp6QFyVvLv7/4pslzGRbaW1zGt705fcVZpY2/KN7G s1wZDKK6QtGPI9X95VfCCibm1dtbXADkzjEKulP6nq41qhv7YYRSZy59ear/9gRE8+D2 +btw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cugyKq5wN9a38GldPKLYpfvUK949xPGTk9wJpHdgXzs=; b=MZRHhmQz8hRrm+SRL9vabCy44KwlMarE8qnUWROx/CHNttMcCVmhMUhWRPKm5JQAeE XneUuDobbekY3B9wB6RpEQe1YVMTiXA2oceBRccBtVxRX9uXTSQmMH4v4w2Z/0ABFYrj u+9tjrrIthUEWPjCtHBPiSnKhIQ7SgD0auK8CyhY95MlPM2p98vdZmGEsYGqrZvmP11h tF7rq2hcQJSYr0N9rCgLiU41/By8hhTLj29bXJBJaMevvtcXLSlZwZrhUhnhQ1GzghRQ mep2mLKa0hs5CImBP4eEoKQQBBVyGnEjqocABniuUnypr+xlU7SINjisZaKLR9b87F7x m7Tg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=anqTx+VB; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=cugyKq5wN9a38GldPKLYpfvUK949xPGTk9wJpHdgXzs=; b=Bxed9KQQNFd97OjC6zQYN/1IOiprsChN9qBDcG9iH88ZWLROtSWQV37Ziv3rBeTCi+ en1O2sNuZUXxS8fKyFqesl5zR1aHgE58DTkmMbslXYGT6cmOLmHDvADsQmEPw596UGoE cgAzWHDSn2L9Ng5UuOjXQESyvUMh13O2+Q7Io= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=cugyKq5wN9a38GldPKLYpfvUK949xPGTk9wJpHdgXzs=; b=ZBgOsKfHf2+MLrRNT4h3utmv3y6sfCxjkCs6yXvP28WMXUT2j7V0EUjzPnjFW/JST6 25/clU9dRF8TnacDmWaxQef1brYw6iDIyVU3cmHd928jEAKcisLaZUzEjacDGk4ntfJx Ii1wgBQzq9YFHdMNjApWzmml9hhsbCsV8hbmADLdM0Ef+1HaUHbRgP67kRBM92KayKRv zR+cBR0EMPfs/nsFvlrBp7h7nex5zf5eAmy7KmHSJ9w6W8Ei+K8neGYOksgkIE26Szm1 avaRO20wnmjzbhXqHlcAOdhVJDX/RyGfJk+wA2TMTdWbWJYg2/4AopaxN36I4HiDYMA7 99wA== X-Gm-Message-State: AJcUukdgXpqdryXwgSWb3cDOF5cLtbhrPjsd0vZo6SjU8ERhQIsylUpW lJ5YHPIuBAKrKEPoNjX1v5AV1Tu6 X-Google-Smtp-Source: ALg8bN6fUSoj0hJzi4Z/jtf/vJZJyIxwB8mt7rA2C3SeFc+K+y06POHW3wqE/BsZGHo909OtuWoMew== X-Received: by 2002:a63:87c2:: with SMTP id i185mr17429466pge.124.1546275694273; Mon, 31 Dec 2018 09:01:34 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:9b81:: with SMTP id y1ls13421395plp.3.gmail; Mon, 31 Dec 2018 09:01:34 -0800 (PST) X-Received: by 2002:a17:902:c5:: with SMTP id a63mr38359842pla.267.1546275693935; Mon, 31 Dec 2018 09:01:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546275693; cv=none; d=google.com; s=arc-20160816; b=V/cn90lfEZN5Z8S/nVDhtepjDxKCFAjD3laRTFQwgT+P8p9Q0I+pbo6Ne6WJOuMg8N 9eCyOX+CDVriJHw7lE3BP5Rd9sj7KWWDWQTCDBH8rPl5agRTid5kUHTLcrjrDY8VZjGm GfB7b5hwKxHinayz8OqeQAG8E8JMZC1j5AFkUWQb9h05ju4qp5W8Ljlj9aY42qekWd9p zAbsm90vcuoBzGSW0nNJ5Gj8tqDE3UM0rtgXVfv6a1nJQQnXMNGwNc3Jn0W1oppn+hZM nR387VIhMqir/Q/PDNGyhWmRyH1hcmaROZLLhISYvJ38P/3Ts0YQKln93bydbRN+/tDV KLwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=cugyKq5wN9a38GldPKLYpfvUK949xPGTk9wJpHdgXzs=; b=0zEkkMu8nRb0bfpOOYL5v9vIRQDXxwFK+eDGkcBR1XFGd3fJ19Wq9OTh9YMyV0fBuY inXahtnPGN/+FP8mujJmaNKMs4zvX2IsRTU7oSUiXphwr+92c3YnuxW3CKdUc9ah9cct LxM7xBwBZf8x3HCKVAzY2kEQhu8LRKA9UAiWpFJB/SudLZypi2EkD9ETq3dIvoEXn27n yw8KsCKVSBAsBpo+uPuRcKUKLiS/VEpx4+nCXbnkvHrv32H24GK29ycXfecJURxQuiaO /Lw0iVRXo5Iux2OqA1+GitCto8epHvak68t4QTEl54vF1r0qRuT/1gfNGyehXTBg5fel Ln5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=anqTx+VB; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id y21sor13526788plp.22.2018.12.31.09.01.33 for (Google Transport Security); Mon, 31 Dec 2018 09:01:33 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:902:8f83:: with SMTP id z3mr33895971plo.328.1546275693592; Mon, 31 Dec 2018 09:01:33 -0800 (PST) Received: from localhost.localdomain ([115.97.184.237]) by smtp.gmail.com with ESMTPSA id p7sm90692925pfj.72.2018.12.31.09.01.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Dec 2018 09:01:33 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Andre Przywara Cc: Chen-Yu Tsai , Simon Glass , Tom Rini , u-boot@lists.denx.de, linux-sunxi@googlegroups.com, Michael Trimarchi , linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v5 12/26] clk: sunxi: Implement UART resets Date: Mon, 31 Dec 2018 22:29:13 +0530 Message-Id: <20181231165927.13803-13-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181231165927.13803-1-jagan@amarulasolutions.com> References: <20181231165927.13803-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=anqTx+VB; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Implement UART resets for all relevant Allwinner SoC clock drivers via ccu reset table. Signed-off-by: Jagan Teki --- drivers/clk/sunxi/clk_a23.c | 6 ++++++ drivers/clk/sunxi/clk_a31.c | 7 +++++++ drivers/clk/sunxi/clk_a64.c | 6 ++++++ drivers/clk/sunxi/clk_a83t.c | 6 ++++++ drivers/clk/sunxi/clk_h3.c | 5 +++++ drivers/clk/sunxi/clk_r40.c | 9 +++++++++ drivers/clk/sunxi/clk_v3s.c | 4 ++++ 7 files changed, 43 insertions(+) diff --git a/drivers/clk/sunxi/clk_a23.c b/drivers/clk/sunxi/clk_a23.c index 63004b881d..4661a33191 100644 --- a/drivers/clk/sunxi/clk_a23.c +++ b/drivers/clk/sunxi/clk_a23.c @@ -38,6 +38,12 @@ static struct ccu_reset a23_resets[] = { [RST_BUS_OTG] = RESET(0x2c0, BIT(24)), [RST_BUS_EHCI] = RESET(0x2c0, BIT(26)), [RST_BUS_OHCI] = RESET(0x2c0, BIT(29)), + + [RST_BUS_UART0] = RESET(0x2d8, BIT(16)), + [RST_BUS_UART1] = RESET(0x2d8, BIT(17)), + [RST_BUS_UART2] = RESET(0x2d8, BIT(18)), + [RST_BUS_UART3] = RESET(0x2d8, BIT(19)), + [RST_BUS_UART4] = RESET(0x2d8, BIT(20)), }; static const struct ccu_desc a23_ccu_desc = { diff --git a/drivers/clk/sunxi/clk_a31.c b/drivers/clk/sunxi/clk_a31.c index c01d2a3549..b05bea5b82 100644 --- a/drivers/clk/sunxi/clk_a31.c +++ b/drivers/clk/sunxi/clk_a31.c @@ -46,6 +46,13 @@ static struct ccu_reset a31_resets[] = { [RST_AHB1_OHCI0] = RESET(0x2c0, BIT(29)), [RST_AHB1_OHCI1] = RESET(0x2c0, BIT(30)), [RST_AHB1_OHCI2] = RESET(0x2c0, BIT(31)), + + [RST_APB2_UART0] = RESET(0x2d8, BIT(16)), + [RST_APB2_UART1] = RESET(0x2d8, BIT(17)), + [RST_APB2_UART2] = RESET(0x2d8, BIT(18)), + [RST_APB2_UART3] = RESET(0x2d8, BIT(19)), + [RST_APB2_UART4] = RESET(0x2d8, BIT(20)), + [RST_APB2_UART5] = RESET(0x2d8, BIT(21)), }; static const struct ccu_desc a31_ccu_desc = { diff --git a/drivers/clk/sunxi/clk_a64.c b/drivers/clk/sunxi/clk_a64.c index b427e3adda..162ec769d6 100644 --- a/drivers/clk/sunxi/clk_a64.c +++ b/drivers/clk/sunxi/clk_a64.c @@ -43,6 +43,12 @@ static const struct ccu_reset a64_resets[] = { [RST_BUS_EHCI1] = RESET(0x2c0, BIT(25)), [RST_BUS_OHCI0] = RESET(0x2c0, BIT(28)), [RST_BUS_OHCI1] = RESET(0x2c0, BIT(29)), + + [RST_BUS_UART0] = RESET(0x2d8, BIT(16)), + [RST_BUS_UART1] = RESET(0x2d8, BIT(17)), + [RST_BUS_UART2] = RESET(0x2d8, BIT(18)), + [RST_BUS_UART3] = RESET(0x2d8, BIT(19)), + [RST_BUS_UART4] = RESET(0x2d8, BIT(20)), }; static const struct ccu_desc a64_ccu_desc = { diff --git a/drivers/clk/sunxi/clk_a83t.c b/drivers/clk/sunxi/clk_a83t.c index fbffa3bf5f..3fe96ccd84 100644 --- a/drivers/clk/sunxi/clk_a83t.c +++ b/drivers/clk/sunxi/clk_a83t.c @@ -40,6 +40,12 @@ static struct ccu_reset a83t_resets[] = { [RST_BUS_EHCI0] = RESET(0x2c0, BIT(26)), [RST_BUS_EHCI1] = RESET(0x2c0, BIT(27)), [RST_BUS_OHCI0] = RESET(0x2c0, BIT(29)), + + [RST_BUS_UART0] = RESET(0x2d8, BIT(16)), + [RST_BUS_UART1] = RESET(0x2d8, BIT(17)), + [RST_BUS_UART2] = RESET(0x2d8, BIT(18)), + [RST_BUS_UART3] = RESET(0x2d8, BIT(19)), + [RST_BUS_UART4] = RESET(0x2d8, BIT(20)), }; static const struct ccu_desc a83t_ccu_desc = { diff --git a/drivers/clk/sunxi/clk_h3.c b/drivers/clk/sunxi/clk_h3.c index f706e77dee..89f59dbea3 100644 --- a/drivers/clk/sunxi/clk_h3.c +++ b/drivers/clk/sunxi/clk_h3.c @@ -53,6 +53,11 @@ static struct ccu_reset h3_resets[] = { [RST_BUS_OHCI1] = RESET(0x2c0, BIT(29)), [RST_BUS_OHCI2] = RESET(0x2c0, BIT(30)), [RST_BUS_OHCI3] = RESET(0x2c0, BIT(31)), + + [RST_BUS_UART0] = RESET(0x2d8, BIT(16)), + [RST_BUS_UART1] = RESET(0x2d8, BIT(17)), + [RST_BUS_UART2] = RESET(0x2d8, BIT(18)), + [RST_BUS_UART3] = RESET(0x2d8, BIT(19)), }; static const struct ccu_desc h3_ccu_desc = { diff --git a/drivers/clk/sunxi/clk_r40.c b/drivers/clk/sunxi/clk_r40.c index 3405b39c46..a95017f12e 100644 --- a/drivers/clk/sunxi/clk_r40.c +++ b/drivers/clk/sunxi/clk_r40.c @@ -50,6 +50,15 @@ static struct ccu_reset r40_resets[] = { [RST_BUS_OHCI0] = RESET(0x2c0, BIT(29)), [RST_BUS_OHCI1] = RESET(0x2c0, BIT(30)), [RST_BUS_OHCI2] = RESET(0x2c0, BIT(31)), + + [RST_BUS_UART0] = RESET(0x2d8, BIT(16)), + [RST_BUS_UART1] = RESET(0x2d8, BIT(17)), + [RST_BUS_UART2] = RESET(0x2d8, BIT(18)), + [RST_BUS_UART3] = RESET(0x2d8, BIT(19)), + [RST_BUS_UART4] = RESET(0x2d8, BIT(20)), + [RST_BUS_UART5] = RESET(0x2d8, BIT(21)), + [RST_BUS_UART6] = RESET(0x2d8, BIT(22)), + [RST_BUS_UART7] = RESET(0x2d8, BIT(23)), }; static const struct ccu_desc r40_ccu_desc = { diff --git a/drivers/clk/sunxi/clk_v3s.c b/drivers/clk/sunxi/clk_v3s.c index a662bc3e93..867b029172 100644 --- a/drivers/clk/sunxi/clk_v3s.c +++ b/drivers/clk/sunxi/clk_v3s.c @@ -26,6 +26,10 @@ static struct ccu_reset v3s_resets[] = { [RST_USB_PHY0] = RESET(0x0cc, BIT(0)), [RST_BUS_OTG] = RESET(0x2c0, BIT(24)), + + [RST_BUS_UART0] = RESET(0x2d8, BIT(16)), + [RST_BUS_UART1] = RESET(0x2d8, BIT(17)), + [RST_BUS_UART2] = RESET(0x2d8, BIT(18)), }; static const struct ccu_desc v3s_ccu_desc = {