Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp1807515ybj; Sun, 22 Sep 2019 12:22:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqyBwBJRSLZWpbP/tFVWqRS162qni/scoKCBDPiX1+apB5wUkLfnvN56nrEhL57LIElvYC5T X-Received: by 2002:aa7:d295:: with SMTP id w21mr26335772edq.302.1569180137388; Sun, 22 Sep 2019 12:22:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569180137; cv=none; d=google.com; s=arc-20160816; b=kRHmF9moj1EZm7s/qyuR3MYnAUwj+a+wAR7HOXeBQjQzuIsFylJtwDCfz5Soch6Ra5 dSpoLIC6R4kibgxuuFbqGSy1DcTkg6dZ47GnGEt/YW096Z9fIBwRwMzwcit1J9c8Zyw7 EoPdYS5gtLLpObrAvnbDhA6g97hnf6cec+nZ5dz9Fuqhw/UcELReeF4Zz5q+Pwk1xSVd JNnKhwt9Tk/q+I1yGCLjImM3vqGR/RuOULCUDkOhh4Te64ez4pj9zoova3HN1Br/ll8E qwH7b6d9dlgOIwTe8JOJSHsUwRyFM3M8AiE1bOBnk/kpxWf8ldZmUVIkyQsosZkmRiXY gr/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MgeOWr52J0AbeRdfS/blsOSLs4diI31K6bmRntAvmGc=; b=0Uhdr1yzjOM3kUqSUVruDAvkxh3m6Uh/DAUawh+FMMQRuw1soWBwIc7tSKpLIGknp9 uzvW8vhFpolFmZK1kx2mbUZALPpAhHGiUxIWr1bgMMgo59RcVTWOnA6Zvg+i649LReYO QJEZ7+ILKOKdyBsn9KpsZEFXuVuN7x1jAT10RzwoVFgde2jnZOI4zvzjQLtvsYTs/PX+ sXJDX4wpxvIC5GDJmQj0pHQfgXZm3FUeRKm+B6D/Re1ffefXh6qDhfMtDUyUQHwkL633 IVRpirfNFAxbwWn47HxZIK7P8gRCzOzUnd3XAN9YBY3VMuoAHr5msnb22n1nZwbizxsC 75zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=cH05sPvR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ck2si4077745ejb.346.2019.09.22.12.21.54; Sun, 22 Sep 2019 12:22:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=cH05sPvR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438200AbfIUPS5 (ORCPT + 99 others); Sat, 21 Sep 2019 11:18:57 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:39601 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392043AbfIUPSy (ORCPT ); Sat, 21 Sep 2019 11:18:54 -0400 Received: by mail-wr1-f65.google.com with SMTP id r3so9614381wrj.6; Sat, 21 Sep 2019 08:18:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MgeOWr52J0AbeRdfS/blsOSLs4diI31K6bmRntAvmGc=; b=cH05sPvRnyjjP4kqZ62tz5buGh4I6wiRdSZ73thccq3BH6hMZ/efZjpv/k0ukN1j6o I7ZPU9kRKbOMbsE3D6vjGOKpngSxeRVR8P+HTYqmPZXOIQO4Yfl95X3gNhQk7hvYghRY 0YG09bEXuXWi4js1VASxO8rD+1pHiB7L4da3a56wWljAt0HIpN00+zwF2zg+YSTq8r+U IjmZZs6AcM5nQ8IS4k1D/ZvwCObfssmRcIgxSmNPTcn28/WxpNQBe0/mlluLGd10wXrF 41YzrSpx6DKRfthRXUurdMqNtq+g9wzy2rgIVSnjyrkV2S3fh8BudveJtu5+9jce4TO3 akpw== 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=MgeOWr52J0AbeRdfS/blsOSLs4diI31K6bmRntAvmGc=; b=eC6aOuX+V3D7Q54Z41RkcpzPWK2ZeSJaLK7Qya4IvF9SFhjhhJwuXOt9SYBElmUWlS 505IOmcRt1Ch4x9DZrSLoaeAbvO8oXwLM+n9v56oXS0z4PZWIT1cWiZpYO/x3huu5Pkj HhdxaVSFl9HwOez1NMWx5LKekwwMvf6rHDUDRUzRBxDg9JyEvDOcMc5vPj57hDX1fzdx AuIN15EiMF+7Y2ku3LgKtLLhCgx8amyraeBbjI9ssfZUWUGitsK0yNvE+CL7uaolYQ6l drjoefoQGQFBnzfIMI3g+U+Bfv6Akpp1pNJ6Yo1h8DgQuCvmJIYSqQPjVltWFFx1UgUL udlA== X-Gm-Message-State: APjAAAV/L52eYfiUlbMHMEyLX0O7TM6BXKsNaKpOIYK0eIVw406O+A8b vO+lbG5tQUEYlSrDqGPG3d8= X-Received: by 2002:adf:f44e:: with SMTP id f14mr15047963wrp.290.1569079132443; Sat, 21 Sep 2019 08:18:52 -0700 (PDT) Received: from blackbox.darklights.net (p200300F133CE0B0028BAA8C744A6F562.dip0.t-ipconnect.de. [2003:f1:33ce:b00:28ba:a8c7:44a6:f562]) by smtp.googlemail.com with ESMTPSA id c6sm6003120wrb.60.2019.09.21.08.18.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Sep 2019 08:18:51 -0700 (PDT) From: Martin Blumenstingl To: narmstrong@baylibre.com, jbrunet@baylibre.com, robh+dt@kernel.org, mark.rutland@arm.com, linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org, khilman@baylibre.com Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, Martin Blumenstingl Subject: [PATCH 4/6] clk: meson: meson8b: add the ddr_pll input for the audio clocks Date: Sat, 21 Sep 2019 17:18:33 +0200 Message-Id: <20190921151835.770263-5-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190921151835.770263-1-martin.blumenstingl@googlemail.com> References: <20190921151835.770263-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The two audio muxes cts_amclk_sel and cts_mclk_i958_sel use ddr_pll as input at index 0. Update the muxes to use clk_parent_data and add "ddr_pll" as input using clk_parent_data.fw_name because the DDR clock controller is actually separate from the main clock controller. Signed-off-by: Martin Blumenstingl --- drivers/clk/meson/meson8b.c | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c index fefb4b7185d0..3987f4ea7378 100644 --- a/drivers/clk/meson/meson8b.c +++ b/drivers/clk/meson/meson8b.c @@ -2429,28 +2429,25 @@ static struct clk_regmap meson8b_vdec_hevc = { }, }; -/* TODO: the clock at index 0 is "DDR_PLL" which we don't support yet */ -static const struct clk_hw *meson8b_cts_amclk_parent_hws[] = { - &meson8b_mpll0.hw, - &meson8b_mpll1.hw, - &meson8b_mpll2.hw +static const struct clk_parent_data meson8b_cts_amclk_parent_data[] = { + { .fw_name = "ddr_pll", }, + { .hw = &meson8b_mpll0.hw, }, + { .hw = &meson8b_mpll1.hw, }, + { .hw = &meson8b_mpll2.hw, }, }; -static u32 meson8b_cts_amclk_mux_table[] = { 1, 2, 3 }; - static struct clk_regmap meson8b_cts_amclk_sel = { .data = &(struct clk_regmap_mux_data){ .offset = HHI_AUD_CLK_CNTL, .mask = 0x3, .shift = 9, - .table = meson8b_cts_amclk_mux_table, .flags = CLK_MUX_ROUND_CLOSEST, }, .hw.init = &(struct clk_init_data){ .name = "cts_amclk_sel", .ops = &clk_regmap_mux_ops, - .parent_hws = meson8b_cts_amclk_parent_hws, - .num_parents = ARRAY_SIZE(meson8b_cts_amclk_parent_hws), + .parent_data = meson8b_cts_amclk_parent_data, + .num_parents = ARRAY_SIZE(meson8b_cts_amclk_parent_data), }, }; @@ -2488,28 +2485,25 @@ static struct clk_regmap meson8b_cts_amclk = { }, }; -/* TODO: the clock at index 0 is "DDR_PLL" which we don't support yet */ -static const struct clk_hw *meson8b_cts_mclk_i958_parent_hws[] = { - &meson8b_mpll0.hw, - &meson8b_mpll1.hw, - &meson8b_mpll2.hw +static const struct clk_parent_data meson8b_cts_mclk_i958_parent_data[] = { + { .fw_name = "ddr_pll", }, + { .hw = &meson8b_mpll0.hw, }, + { .hw = &meson8b_mpll1.hw, }, + { .hw = &meson8b_mpll2.hw, }, }; -static u32 meson8b_cts_mclk_i958_mux_table[] = { 1, 2, 3 }; - static struct clk_regmap meson8b_cts_mclk_i958_sel = { .data = &(struct clk_regmap_mux_data){ .offset = HHI_AUD_CLK_CNTL2, .mask = 0x3, .shift = 25, - .table = meson8b_cts_mclk_i958_mux_table, .flags = CLK_MUX_ROUND_CLOSEST, }, .hw.init = &(struct clk_init_data) { .name = "cts_mclk_i958_sel", .ops = &clk_regmap_mux_ops, - .parent_hws = meson8b_cts_mclk_i958_parent_hws, - .num_parents = ARRAY_SIZE(meson8b_cts_mclk_i958_parent_hws), + .parent_data = meson8b_cts_mclk_i958_parent_data, + .num_parents = ARRAY_SIZE(meson8b_cts_mclk_i958_parent_data), }, }; -- 2.23.0