From patchwork Mon Dec 31 16:59:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 126 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (cartago.priv [10.11.12.1]) by cassiopea.amarulasolutions.com (Postfix) with ESMTPS id D02762E002E for ; Mon, 31 Dec 2018 18:01:30 +0100 (CET) Received: by mail-pf1-f198.google.com with SMTP id 68sf29390861pfr.6 for ; Mon, 31 Dec 2018 09:01:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1546275689; cv=pass; d=google.com; s=arc-20160816; b=roYlsg/GFjUXTT7is0akGvjEYoKN/etMRy3iQw01VW1Ngn3rZUJtVQ2mkrcphkWQYq hLS6mhXt0vzWeGe7WmQkyg9jKvi1XdI8hAZyLi5xq+AoY4ihnbzgW8Oejp/un+ROGUWu G0IGzuEnWZCvZlEMosSdCrFUE/aO1PbTcKObN/RL9CjRTRS3O5+D/m3mes2kz/iI92// 3L6wfRJlgfvxnu0rdeDn3HWWUl9aAp4WiDhswHC8nF8mxxfdZg1JmLfhL4SOTkYI225y b1UzrIDxX8WgBpFDuBQBCRQPuVf9Ss++79mENCgwlMeCipeO1/FrPs5j4YzX8MnCT+EE XoFw== 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=OvS2z6nBuIgvfl8FKYgJ/CHtahREhue/+JP6VggJtxk=; b=H9WBDVGv/NN8u4dHa+3ZHeh7OvPmXVnSFGQOMB2uHvJ4jbUp7ptaxnMSjFdelAV3RZ vSo+KQ1uXc5kEdHIVrBNDU/3hdyxlZsUziCSeg0DkX8RAUfdBj6J572WavhE/oavyQxd Z3JdaeUwcU401jVUFZn6fSpfzAnz9sztCqg1eR+q25Q+pTbwIzpOrgTmtX5Pzr+MiT0O uKLEOtR/JPYAg8IgtegQ5fl8cV9nunM+hIqpP8zssTL/BNo0yEql4C+P6VIXbB+TV8Pp QmA/FJj6XdJksxpavlqaGGyOpjIE/gcxyun85UFbKHkot/J+GQyOmFUKBl+FwoCQ1NG0 CpXw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Rm/4yGal"; 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=OvS2z6nBuIgvfl8FKYgJ/CHtahREhue/+JP6VggJtxk=; b=PrPnfsDXc7cAiQgGU0RCRBcR0/sYGc/ia6oTidAkhf5e5gDgg7N+1THrgWeXTVVYfN NCZ05jY/NCMv7gg8UaRLlumvi0ZIrP1GMKPeT2m/4iMTrnwKBtRQsy3LLG1mlrUw4ke8 JhNXcGBrMxE6yhTmFonXDa2nv6EK9OfMFlqCU= 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=OvS2z6nBuIgvfl8FKYgJ/CHtahREhue/+JP6VggJtxk=; b=dh+r9ujTlWVAutu2gWN+E74YDr/gPnU0HWKNIZ6IxrygqnPcAFIn+qpNjsQ4Pp1tGS xjl5ab/6AK9wwDYTVO7dPwBvr1CwnM/ndP7g15zujuFg94Ae1fGTgwXZCiagYIboHFSw osoGHQ8IdswfySMXrNyk69WKv5+92ly+FmzXe/oczdkvqF6XruyPMKl7DRbWu7LL/Xnk ZgsNc8+xGh29FjQ57ecBtXeMP5lJOWTjN6Gx6W+Irv+93k3JfIXACemoIkdhKMMc5CI4 6y6QJttK/ItMR8/ys+i/eai/QTDhWsHW26yaZPW6Qs59v5Ujdslu8OIKE6qbZCQOIOXX ghbQ== X-Gm-Message-State: AJcUukdAyXQcrSbFm6EipTlkvU6j9bqmPnC+g0ztvBDF27MFZ+f9kbvK o9O5iJDHqRA2LbblONEede87ZQGf X-Google-Smtp-Source: ALg8bN5ju+NaGow7G/rjebRkP4SDUvFeRDXO1XMTMJz547KdKLSWrTeIUw7hWXmxHfSCggAtnXcgQg== X-Received: by 2002:a63:549:: with SMTP id 70mr17206519pgf.33.1546275689482; Mon, 31 Dec 2018 09:01:29 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:56d1:: with SMTP id h78ls12627037pfj.4.gmail; Mon, 31 Dec 2018 09:01:29 -0800 (PST) X-Received: by 2002:a63:68c4:: with SMTP id d187mr8012711pgc.11.1546275689145; Mon, 31 Dec 2018 09:01:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546275689; cv=none; d=google.com; s=arc-20160816; b=T0d1KSKPdum/VxvUKo4KfDqGAUUZDFS3tMrQdWaJMeVbpO2aE1fvJqUJmPtkq8nKsc rLy+H/IJ7fJRDyA7Bq7fs+34GE8bTa2qUi59VnX4wMjeX5dAu/nK8Q75PnTStnEo6P9f 4FF1GKhtX5TQSSXxcnCAmKk7cr0/ae4yVhF5VZ+lOzPnpI2hu/CMdq0jCd1ajUSuthxk ZXma0PWkknjDP9M/F+UPE9OgsOjIY9y43rwp+jrxWvMddi2t9V/+ZY8UhjMxDv9C4Dtg sDpOtF50p8Z4OxBx/3+xrSpaJQpksYnoDE1i+dxNHGF1X8JdMLSKfhDBnnb4Uv2Qpv13 3HsQ== 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=OvS2z6nBuIgvfl8FKYgJ/CHtahREhue/+JP6VggJtxk=; b=FljZqT1oUYy/TRxPuhO/yy/o9huXC+PVRDIE6+/cRw34HHBSXrTkub7lOVPNIh/ad1 JPD5qiPkwXdwuzW8NOMjk7LqRjPBfQMX5TQ4JRCXxTn5tE3vVU0L3eDAYq9gHkn4LdYd IDu63/zW59rbx/bgtZ/aQFlSaYiYIpIWjrdkIpLHCsgmAKz4IgRxCyQIe1lXU6dR9iw9 bR9ls5VOKqw7WUl1TOADy5Qde/pgSgcpyDVuy6IN7hkPXJN2oTGAkweAdd/4J4h1HUKV mrYZvNI7W55bTl4qMt1kG85egethI0hjMY4/hGkWfPEf1kVcbqOkwbbwz1GEOk5lZURM JzBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Rm/4yGal"; 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 62sor13584090pla.19.2018.12.31.09.01.29 for (Google Transport Security); Mon, 31 Dec 2018 09:01:29 -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:bb86:: with SMTP id m6mr38367249pls.315.1546275688795; Mon, 31 Dec 2018 09:01:28 -0800 (PST) Received: from localhost.localdomain ([115.97.184.237]) by smtp.gmail.com with ESMTPSA id p7sm90692925pfj.72.2018.12.31.09.01.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Dec 2018 09:01:28 -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 11/26] clk: sunxi: Implement UART clocks Date: Mon, 31 Dec 2018 22:29:12 +0530 Message-Id: <20181231165927.13803-12-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="Rm/4yGal"; 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 clocks for all Allwinner SoC clock drivers via ccu clock gate table. Signed-off-by: Jagan Teki --- drivers/clk/sunxi/clk_a10.c | 9 +++++++++ drivers/clk/sunxi/clk_a10s.c | 5 +++++ 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 ++++ 9 files changed, 57 insertions(+) diff --git a/drivers/clk/sunxi/clk_a10.c b/drivers/clk/sunxi/clk_a10.c index 59d9d90a19..1b074e3872 100644 --- a/drivers/clk/sunxi/clk_a10.c +++ b/drivers/clk/sunxi/clk_a10.c @@ -19,6 +19,15 @@ static struct ccu_clk_gate a10_gates[] = { [CLK_AHB_EHCI1] = GATE(0x060, BIT(3)), [CLK_AHB_OHCI1] = GATE(0x060, BIT(4)), + [CLK_APB1_UART0] = GATE(0x06c, BIT(16)), + [CLK_APB1_UART1] = GATE(0x06c, BIT(17)), + [CLK_APB1_UART2] = GATE(0x06c, BIT(18)), + [CLK_APB1_UART3] = GATE(0x06c, BIT(19)), + [CLK_APB1_UART4] = GATE(0x06c, BIT(20)), + [CLK_APB1_UART5] = GATE(0x06c, BIT(21)), + [CLK_APB1_UART6] = GATE(0x06c, BIT(22)), + [CLK_APB1_UART7] = GATE(0x06c, BIT(23)), + [CLK_USB_OHCI0] = GATE(0x0cc, BIT(6)), [CLK_USB_OHCI1] = GATE(0x0cc, BIT(7)), [CLK_USB_PHY] = GATE(0x0cc, BIT(8)), diff --git a/drivers/clk/sunxi/clk_a10s.c b/drivers/clk/sunxi/clk_a10s.c index 474f37d607..a50c6e3f7f 100644 --- a/drivers/clk/sunxi/clk_a10s.c +++ b/drivers/clk/sunxi/clk_a10s.c @@ -17,6 +17,11 @@ static struct ccu_clk_gate a10s_gates[] = { [CLK_AHB_EHCI] = GATE(0x060, BIT(1)), [CLK_AHB_OHCI] = GATE(0x060, BIT(2)), + [CLK_APB1_UART0] = GATE(0x06c, BIT(16)), + [CLK_APB1_UART1] = GATE(0x06c, BIT(17)), + [CLK_APB1_UART2] = GATE(0x06c, BIT(18)), + [CLK_APB1_UART3] = GATE(0x06c, BIT(19)), + [CLK_USB_OHCI] = GATE(0x0cc, BIT(6)), [CLK_USB_PHY0] = GATE(0x0cc, BIT(8)), [CLK_USB_PHY1] = GATE(0x0cc, BIT(9)), diff --git a/drivers/clk/sunxi/clk_a23.c b/drivers/clk/sunxi/clk_a23.c index 0fc8a5821c..63004b881d 100644 --- a/drivers/clk/sunxi/clk_a23.c +++ b/drivers/clk/sunxi/clk_a23.c @@ -17,6 +17,12 @@ static struct ccu_clk_gate a23_gates[] = { [CLK_BUS_EHCI] = GATE(0x060, BIT(26)), [CLK_BUS_OHCI] = GATE(0x060, BIT(29)), + [CLK_BUS_UART0] = GATE(0x06c, BIT(16)), + [CLK_BUS_UART1] = GATE(0x06c, BIT(17)), + [CLK_BUS_UART2] = GATE(0x06c, BIT(18)), + [CLK_BUS_UART3] = GATE(0x06c, BIT(19)), + [CLK_BUS_UART4] = GATE(0x06c, BIT(20)), + [CLK_USB_PHY0] = GATE(0x0cc, BIT(8)), [CLK_USB_PHY1] = GATE(0x0cc, BIT(9)), [CLK_USB_HSIC] = GATE(0x0cc, BIT(10)), diff --git a/drivers/clk/sunxi/clk_a31.c b/drivers/clk/sunxi/clk_a31.c index 03dd9ae913..c01d2a3549 100644 --- a/drivers/clk/sunxi/clk_a31.c +++ b/drivers/clk/sunxi/clk_a31.c @@ -20,6 +20,13 @@ static struct ccu_clk_gate a31_gates[] = { [CLK_AHB1_OHCI1] = GATE(0x060, BIT(30)), [CLK_AHB1_OHCI2] = GATE(0x060, BIT(31)), + [CLK_APB2_UART0] = GATE(0x06c, BIT(16)), + [CLK_APB2_UART1] = GATE(0x06c, BIT(17)), + [CLK_APB2_UART2] = GATE(0x06c, BIT(18)), + [CLK_APB2_UART3] = GATE(0x06c, BIT(19)), + [CLK_APB2_UART4] = GATE(0x06c, BIT(20)), + [CLK_APB2_UART5] = GATE(0x06c, BIT(21)), + [CLK_USB_PHY0] = GATE(0x0cc, BIT(8)), [CLK_USB_PHY1] = GATE(0x0cc, BIT(9)), [CLK_USB_PHY2] = GATE(0x0cc, BIT(10)), diff --git a/drivers/clk/sunxi/clk_a64.c b/drivers/clk/sunxi/clk_a64.c index 28bda1f497..b427e3adda 100644 --- a/drivers/clk/sunxi/clk_a64.c +++ b/drivers/clk/sunxi/clk_a64.c @@ -19,6 +19,12 @@ static const struct ccu_clk_gate a64_gates[] = { [CLK_BUS_OHCI0] = GATE(0x060, BIT(28)), [CLK_BUS_OHCI1] = GATE(0x060, BIT(29)), + [CLK_BUS_UART0] = GATE(0x06c, BIT(16)), + [CLK_BUS_UART1] = GATE(0x06c, BIT(17)), + [CLK_BUS_UART2] = GATE(0x06c, BIT(18)), + [CLK_BUS_UART3] = GATE(0x06c, BIT(19)), + [CLK_BUS_UART4] = GATE(0x06c, BIT(20)), + [CLK_USB_PHY0] = GATE(0x0cc, BIT(8)), [CLK_USB_PHY1] = GATE(0x0cc, BIT(9)), [CLK_USB_HSIC] = GATE(0x0cc, BIT(10)), diff --git a/drivers/clk/sunxi/clk_a83t.c b/drivers/clk/sunxi/clk_a83t.c index 45faef2f11..fbffa3bf5f 100644 --- a/drivers/clk/sunxi/clk_a83t.c +++ b/drivers/clk/sunxi/clk_a83t.c @@ -18,6 +18,12 @@ static struct ccu_clk_gate a83t_gates[] = { [CLK_BUS_EHCI1] = GATE(0x060, BIT(27)), [CLK_BUS_OHCI0] = GATE(0x060, BIT(29)), + [CLK_BUS_UART0] = GATE(0x06c, BIT(16)), + [CLK_BUS_UART1] = GATE(0x06c, BIT(17)), + [CLK_BUS_UART2] = GATE(0x06c, BIT(18)), + [CLK_BUS_UART3] = GATE(0x06c, BIT(19)), + [CLK_BUS_UART4] = GATE(0x06c, BIT(20)), + [CLK_USB_PHY0] = GATE(0x0cc, BIT(8)), [CLK_USB_PHY1] = GATE(0x0cc, BIT(9)), [CLK_USB_HSIC] = GATE(0x0cc, BIT(10)), diff --git a/drivers/clk/sunxi/clk_h3.c b/drivers/clk/sunxi/clk_h3.c index 283fc31b01..f706e77dee 100644 --- a/drivers/clk/sunxi/clk_h3.c +++ b/drivers/clk/sunxi/clk_h3.c @@ -23,6 +23,11 @@ static struct ccu_clk_gate h3_gates[] = { [CLK_BUS_OHCI2] = GATE(0x060, BIT(30)), [CLK_BUS_OHCI3] = GATE(0x060, BIT(31)), + [CLK_BUS_UART0] = GATE(0x06c, BIT(16)), + [CLK_BUS_UART1] = GATE(0x06c, BIT(17)), + [CLK_BUS_UART2] = GATE(0x06c, BIT(18)), + [CLK_BUS_UART3] = GATE(0x06c, BIT(19)), + [CLK_USB_PHY0] = GATE(0x0cc, BIT(8)), [CLK_USB_PHY1] = GATE(0x0cc, BIT(9)), [CLK_USB_PHY2] = GATE(0x0cc, BIT(10)), diff --git a/drivers/clk/sunxi/clk_r40.c b/drivers/clk/sunxi/clk_r40.c index 2a6000f4dc..3405b39c46 100644 --- a/drivers/clk/sunxi/clk_r40.c +++ b/drivers/clk/sunxi/clk_r40.c @@ -21,6 +21,15 @@ static struct ccu_clk_gate r40_gates[] = { [CLK_BUS_OHCI1] = GATE(0x060, BIT(30)), [CLK_BUS_OHCI2] = GATE(0x060, BIT(31)), + [CLK_BUS_UART0] = GATE(0x06c, BIT(16)), + [CLK_BUS_UART1] = GATE(0x06c, BIT(17)), + [CLK_BUS_UART2] = GATE(0x06c, BIT(18)), + [CLK_BUS_UART3] = GATE(0x06c, BIT(19)), + [CLK_BUS_UART4] = GATE(0x06c, BIT(20)), + [CLK_BUS_UART5] = GATE(0x06c, BIT(21)), + [CLK_BUS_UART6] = GATE(0x06c, BIT(22)), + [CLK_BUS_UART7] = GATE(0x06c, BIT(23)), + [CLK_USB_PHY0] = GATE(0x0cc, BIT(8)), [CLK_USB_PHY1] = GATE(0x0cc, BIT(9)), [CLK_USB_PHY2] = GATE(0x0cc, BIT(10)), diff --git a/drivers/clk/sunxi/clk_v3s.c b/drivers/clk/sunxi/clk_v3s.c index 0eeea84c1a..a662bc3e93 100644 --- a/drivers/clk/sunxi/clk_v3s.c +++ b/drivers/clk/sunxi/clk_v3s.c @@ -15,6 +15,10 @@ static struct ccu_clk_gate v3s_gates[] = { [CLK_BUS_OTG] = GATE(0x060, BIT(24)), + [CLK_BUS_UART0] = GATE(0x06c, BIT(16)), + [CLK_BUS_UART1] = GATE(0x06c, BIT(17)), + [CLK_BUS_UART2] = GATE(0x06c, BIT(18)), + [CLK_USB_PHY0] = GATE(0x0cc, BIT(8)), };