From patchwork Wed Oct 5 15:07:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 9363117 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 8985C6077E for ; Wed, 5 Oct 2016 15:10:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7887F2865A for ; Wed, 5 Oct 2016 15:10:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6BD6A2897D; Wed, 5 Oct 2016 15:10:59 +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=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 152712865A for ; Wed, 5 Oct 2016 15:10:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1brnoz-00022b-20; Wed, 05 Oct 2016 15:09:25 +0000 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1brnnz-0001Oy-QX for linux-arm-kernel@lists.infradead.org; Wed, 05 Oct 2016 15:08:26 +0000 Received: by mail-wm0-x22e.google.com with SMTP id k125so272813069wma.1 for ; Wed, 05 Oct 2016 08:08:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=f+zg5MOMO9dj804NWJqcrSx6HXTa+GmG+Y2kKNdU/x0=; b=0FXkqzHbZ5peu5TB3fdRFViUY/HjMlZLwnrkqSTFHXdzQxZ5br5RJlcODrWfPgiXzn joap9pC6WuRS4+QOIWIASTt6wUT/pn3dogaVCpn95p5cHvDqgcbfA2AAKFVt17mumEi7 srwN2HoU1yASX1nSPjjKdiz0HAKlugdnhlSLMXh+DLTO2k6roEUdMgLff803r+bFkzhR ClpD0SwMk2hApnAx+2+07E6PpPehkmlt5Blf2iCy1QBhpTBvan35mNApT8ndzHMpCIlv aWqvmHmF6r89QDmKDdElGYI80D3QMvKBl64QSfLIltt2MTGqU2T+ij+L1lxyfFIMqHnt A5hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=f+zg5MOMO9dj804NWJqcrSx6HXTa+GmG+Y2kKNdU/x0=; b=ACSbXVBZyVA/6Vou6jHA0RgHpFyd8ceWSMctKEhnVME3m92zT48IX/SEeHbPyfWeIo UprvqhaXAwp7OF33PvRMt999S6CthorcX6eaGEy58/YMOdpJWqoAV68TFo1c8gHep7kO 1eJ1dRpZKBVIXm/f7DMv29aQqJgI84n6rOGUi1B+bJGhQcM1UEFtbwuiocgxTe5bs44Y UjHl10CH+Gxd+VZya+E79SU6wm5wr93t3OBx8kAMakQyqTiQj+6M3q/SqbHn6IFsJzo9 f6EtPdNXOHEZGG0sH5EZHNyJ9fL3q90VRYUpCasMSlA9IQmP8BMCNIuP/k77gxg/qLLY FFGQ== X-Gm-Message-State: AA6/9RkufhYxo3MXLzHiuSH4gFYCMEuxNc46mDzyW7c6ax+1SgcSs8W5R/RI/AYNgsaWq4UN X-Received: by 10.28.14.202 with SMTP id 193mr9809563wmo.125.1475680081657; Wed, 05 Oct 2016 08:08:01 -0700 (PDT) Received: from build.net (build.baylibre.com. [37.187.146.144]) by smtp.gmail.com with ESMTPSA id z9sm2596492wjf.14.2016.10.05.08.08.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Oct 2016 08:08:01 -0700 (PDT) From: Neil Armstrong To: sboyd@codeaurora.org Subject: [PATCH 5/6] clk: oxnas: Add OX820 Gate clocks Date: Wed, 5 Oct 2016 17:07:51 +0200 Message-Id: <20161005150752.22618-6-narmstrong@baylibre.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161005150752.22618-1-narmstrong@baylibre.com> References: <20161005150752.22618-1-narmstrong@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161005_080824_165503_2C3070E1 X-CRM114-Status: GOOD ( 11.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-oxnas@lists.tuxfamily.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for the Oxford Semiconductor OX820 SoC gate clocks along the OX810SE SoC support. This rework on concerns the gate clocks since they are different. Future PLL handling code will be added for OX820. Signed-off-by: Neil Armstrong --- drivers/clk/clk-oxnas.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/drivers/clk/clk-oxnas.c b/drivers/clk/clk-oxnas.c index b1ef3ea9..e51e002 100644 --- a/drivers/clk/clk-oxnas.c +++ b/drivers/clk/clk-oxnas.c @@ -27,6 +27,7 @@ #include #include +#include /* Standard regmap gate clocks */ struct clk_oxnas_gate { @@ -130,6 +131,38 @@ static struct clk_oxnas_gate *ox810se_gates[] = { &ox810se_nand, }; +static OXNAS_GATE(ox820_leon, 0, osc_parents); +static OXNAS_GATE(ox820_dma_sgdma, 1, osc_parents); +static OXNAS_GATE(ox820_cipher, 2, osc_parents); +static OXNAS_GATE(ox820_sd, 3, osc_parents); +static OXNAS_GATE(ox820_sata, 4, osc_parents); +static OXNAS_GATE(ox820_audio, 5, osc_parents); +static OXNAS_GATE(ox820_usbmph, 6, osc_parents); +static OXNAS_GATE(ox820_etha, 7, eth_parents); +static OXNAS_GATE(ox820_pciea, 8, osc_parents); +static OXNAS_GATE(ox820_nand, 9, osc_parents); +static OXNAS_GATE(ox820_ethb, 10, eth_parents); +static OXNAS_GATE(ox820_pcieb, 11, osc_parents); +static OXNAS_GATE(ox820_ref600, 12, osc_parents); +static OXNAS_GATE(ox820_usbdev, 13, osc_parents); + +static struct clk_oxnas_gate *ox820_gates[] = { + &ox820_leon, + &ox820_dma_sgdma, + &ox820_cipher, + &ox820_sd, + &ox820_sata, + &ox820_audio, + &ox820_usbmph, + &ox820_etha, + &ox820_pciea, + &ox820_nand, + &ox820_etha, + &ox820_pciea, + &ox820_ref600, + &ox820_usbdev, +}; + static struct clk_hw_onecell_data ox810se_hw_onecell_data = { .hws = { [CLK_810_LEON] = &ox810se_leon.hw, @@ -145,6 +178,25 @@ static struct clk_hw_onecell_data ox810se_hw_onecell_data = { .num = ARRAY_SIZE(ox810se_gates), }; +static struct clk_hw_onecell_data ox820_hw_onecell_data = { + .hws = { + [CLK_820_LEON] = &ox820_leon.hw, + [CLK_820_DMA_SGDMA] = &ox820_dma_sgdma.hw, + [CLK_820_CIPHER] = &ox820_cipher.hw, + [CLK_820_SD] = &ox820_sd.hw, + [CLK_820_SATA] = &ox820_sata.hw, + [CLK_820_AUDIO] = &ox820_audio.hw, + [CLK_820_USBMPH] = &ox820_usbmph.hw, + [CLK_820_ETHA] = &ox820_etha.hw, + [CLK_820_PCIEA] = &ox820_pciea.hw, + [CLK_820_NAND] = &ox820_nand.hw, + [CLK_820_ETHB] = &ox820_ethb.hw, + [CLK_820_PCIEB] = &ox820_pcieb.hw, + [CLK_820_REF600] = &ox820_ref600.hw, + [CLK_820_USBDEV] = &ox820_usbdev.hw, + }, + .num = ARRAY_SIZE(ox820_gates), +}; static struct oxnas_stdclk_data ox810se_stdclk_data = { .onecell_data = &ox810se_hw_onecell_data, @@ -152,9 +204,15 @@ static struct oxnas_stdclk_data ox810se_stdclk_data = { .ngates = ARRAY_SIZE(ox810se_gates), }; +static struct oxnas_stdclk_data ox820_stdclk_data = { + .onecell_data = &ox820_hw_onecell_data, + .gates = ox820_gates, + .ngates = ARRAY_SIZE(ox820_gates), +}; static const struct of_device_id oxnas_stdclk_dt_ids[] = { { .compatible = "oxsemi,ox810se-stdclk", &ox810se_stdclk_data }, + { .compatible = "oxsemi,ox820-stdclk", &ox820_stdclk_data }, { } };