From patchwork Fri Aug 10 06:07:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 955997 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="f5MN5BRR"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 41mwRt4qqhz9s8f for ; Fri, 10 Aug 2018 16:38:18 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 6096FC21DB5; Fri, 10 Aug 2018 06:25:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 641C6C21BE5; Fri, 10 Aug 2018 06:16:16 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 8CAFCC21C8B; Fri, 10 Aug 2018 06:10:39 +0000 (UTC) Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by lists.denx.de (Postfix) with ESMTPS id F3597C21EBF for ; Fri, 10 Aug 2018 06:10:27 +0000 (UTC) Received: by mail-pg1-f193.google.com with SMTP id k3-v6so3893376pgq.5 for ; Thu, 09 Aug 2018 23:10:27 -0700 (PDT) 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; bh=1/JOa9t/hSAnV0l5WioONIXtSQTAXL99M0y5EX7uTAo=; b=f5MN5BRRLbdufQ+ZkqiuDGbDRBlyXEMICPW10DVdkdIgHxHSBgVstjZrrQC7uljhH+ YCdyveZyuRMU56jFMNkBxhWKNH0IpFJViNSLMYO+EjddyO1RUi8T9tucDo23ifS1K4Lo iA6YaWS//FJjdYown/uOO++9pW68TAhQ0N7C0= 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; bh=1/JOa9t/hSAnV0l5WioONIXtSQTAXL99M0y5EX7uTAo=; b=YKqhd0Ru5xtvdxP0sONefov1JLzSORLhAX7/feo2kNX5yWyaqNbIFkqc2lZKrNkYTM f7Nj0cahuFuE0EVooI0QvsiJ1D9i8S7PwCMbiKMuIoOU3Gfa02jsPiRSiXeDQb3OdeAq SgUwQnm7rp3gF3lV6dUt2DePt/MzPuop8BxNGk5ESSTLf3+8lgkXhwbKISsDg2yFwdXx /mh/H/Hd8izcao8gFrcEmjLjawpGfhJHAc2nUnmjkJLKmQ3dt9Z5gNl9h6v72mNF+vxj 2pFX5IK7RrUntyF72J57YRpRkV4PFa8GITUhhK6akYqA4/F2/neFNkeLWh5oKGIjevm1 uxfg== X-Gm-Message-State: AOUpUlEYEVmbcU5YNjFgsmptefCyKcU6wghMo8eAj5AE9l6lflmqw0Nt 3rnKv9C1BQGFDuWL/1ZRVc96wQ== X-Google-Smtp-Source: AA+uWPx3jhnfmHPkMdWNzlaaNutCNzuB76eqJ414t2Ex+zMfnxp35nxzHs7s78//uxuKulNyheUUdg== X-Received: by 2002:a63:a011:: with SMTP id r17-v6mr4873928pge.90.1533881426599; Thu, 09 Aug 2018 23:10:26 -0700 (PDT) Received: from localhost.localdomain ([183.82.228.250]) by smtp.gmail.com with ESMTPSA id r23-v6sm16880975pfj.5.2018.08.09.23.10.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Aug 2018 23:10:26 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Andre Przywara , Chen-Yu Tsai , Icenowy Zheng Date: Fri, 10 Aug 2018 11:37:02 +0530 Message-Id: <20180810060711.6547-45-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20180810060711.6547-1-jagan@amarulasolutions.com> References: <20180810060711.6547-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini , u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 44/53] clk: sunxi: Implement Ethernet resets X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Implement Ethernet resets for all relevant Allwinner SoC clock drivers via reset map descriptor table. Cc: Joe Hershberger Signed-off-by: Jagan Teki --- drivers/clk/sunxi/clk_a31.c | 1 + drivers/clk/sunxi/clk_a64.c | 1 + drivers/clk/sunxi/clk_a83t.c | 1 + drivers/clk/sunxi/clk_h3.c | 1 + drivers/clk/sunxi/clk_r40.c | 2 ++ 5 files changed, 6 insertions(+) diff --git a/drivers/clk/sunxi/clk_a31.c b/drivers/clk/sunxi/clk_a31.c index d7a6b2421f..9023640913 100644 --- a/drivers/clk/sunxi/clk_a31.c +++ b/drivers/clk/sunxi/clk_a31.c @@ -63,6 +63,7 @@ static struct ccu_reset_map a31_resets[] = { [RST_AHB1_MMC1] = { 0x2c0, BIT(9) }, [RST_AHB1_MMC2] = { 0x2c0, BIT(10) }, [RST_AHB1_MMC3] = { 0x2c0, BIT(11) }, + [RST_AHB1_EMAC] = { 0x2c0, BIT(17) }, [RST_AHB1_SPI0] = { 0x2c0, BIT(20) }, [RST_AHB1_SPI1] = { 0x2c0, BIT(21) }, [RST_AHB1_SPI2] = { 0x2c0, BIT(22) }, diff --git a/drivers/clk/sunxi/clk_a64.c b/drivers/clk/sunxi/clk_a64.c index 546ddcffa2..b2df499a24 100644 --- a/drivers/clk/sunxi/clk_a64.c +++ b/drivers/clk/sunxi/clk_a64.c @@ -54,6 +54,7 @@ static struct ccu_reset_map a64_resets[] = { [RST_BUS_MMC0] = { 0x2c0, BIT(8) }, [RST_BUS_MMC1] = { 0x2c0, BIT(9) }, [RST_BUS_MMC2] = { 0x2c0, BIT(10) }, + [RST_BUS_EMAC] = { 0x2c0, BIT(17) }, [RST_BUS_SPI0] = { 0x2c0, BIT(20) }, [RST_BUS_SPI1] = { 0x2c0, BIT(21) }, [RST_BUS_OTG] = { 0x2c0, BIT(23) }, diff --git a/drivers/clk/sunxi/clk_a83t.c b/drivers/clk/sunxi/clk_a83t.c index 593ce1ac1b..e1780d6729 100644 --- a/drivers/clk/sunxi/clk_a83t.c +++ b/drivers/clk/sunxi/clk_a83t.c @@ -47,6 +47,7 @@ static struct ccu_reset_map a83t_resets[] = { [RST_BUS_MMC0] = { 0x2c0, BIT(8) }, [RST_BUS_MMC1] = { 0x2c0, BIT(9) }, [RST_BUS_MMC2] = { 0x2c0, BIT(10) }, + [RST_BUS_EMAC] = { 0x2c0, BIT(17) }, [RST_BUS_OTG] = { 0x2c0, BIT(24) }, [RST_BUS_EHCI0] = { 0x2c0, BIT(26) }, [RST_BUS_EHCI1] = { 0x2c0, BIT(27) }, diff --git a/drivers/clk/sunxi/clk_h3.c b/drivers/clk/sunxi/clk_h3.c index ff9f294097..88086580f4 100644 --- a/drivers/clk/sunxi/clk_h3.c +++ b/drivers/clk/sunxi/clk_h3.c @@ -60,6 +60,7 @@ static struct ccu_reset_map h3_resets[] = { [RST_BUS_MMC0] = { 0x2c0, BIT(8) }, [RST_BUS_MMC1] = { 0x2c0, BIT(9) }, [RST_BUS_MMC2] = { 0x2c0, BIT(10) }, + [RST_BUS_EMAC] = { 0x2c0, BIT(17) }, [RST_BUS_SPI0] = { 0x2c0, BIT(20) }, [RST_BUS_SPI1] = { 0x2c0, BIT(21) }, [RST_BUS_OTG] = { 0x2c0, BIT(23) }, diff --git a/drivers/clk/sunxi/clk_r40.c b/drivers/clk/sunxi/clk_r40.c index e5bddc77ee..cf00cf1011 100644 --- a/drivers/clk/sunxi/clk_r40.c +++ b/drivers/clk/sunxi/clk_r40.c @@ -66,6 +66,8 @@ static struct ccu_reset_map r40_resets[] = { [RST_BUS_OHCI1] = { 0x2c0, BIT(30) }, [RST_BUS_OHCI2] = { 0x2c0, BIT(31) }, + [RST_BUS_GMAC] = { 0x2c0, BIT(17) }, + [RST_BUS_UART0] = { 0x2d8, BIT(16) }, [RST_BUS_UART1] = { 0x2d8, BIT(17) }, [RST_BUS_UART2] = { 0x2d8, BIT(18) },