Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1023740pxu; Thu, 8 Oct 2020 00:53:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYFe2j7j0FeeFLj71rptmvapafCS5UlAtHnqM7h0HFdczfz5dFsmO6xDHwPTESdO+FIFuM X-Received: by 2002:a17:906:c444:: with SMTP id ck4mr6992936ejb.398.1602143598720; Thu, 08 Oct 2020 00:53:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602143598; cv=none; d=google.com; s=arc-20160816; b=s4bS0njzc0Zg98n+oXNCER5dtNMqtw2kW/bFM6GK4rVLTNoXUERBXA+TfZumMXcvYP 89wLnulbZ3pR4DglOQqNGDkh070E/0KpkT1F5JlWllt6CVTeaRjina7g091TsIaT4uJB OaTbacR4LdDUwU85INbnrzPT/s+Mk6c/86b5ltnMtPZkOzcPpvIZ2kzqh/6ftS9xvJ1w jKTiup8dVyewf3Rxq8oUGwpImI32qyR2FehzYZ5jQ2tVo/RycrDVhpmGTsYRFZJhLHBY 3swQOHXH20ld/6Tmt2w/mDcjk0SNFi+ql7DLYar2SFytb2icJDlNJ9wwBZLm8YSezrAv N/ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=ixW9Ku7fuag1PXsYrzc8VlDVFnUx3sCOCoA72JC9T/c=; b=qTC07RIdGowPF0Ezgz+3WoTw+w8nkHtVCzDnKGxuGxg565g7QNhX7liZ2lQQCK0gLB ygoSgSJV6+8GztYYiPfS80bH5mX+dQYR3sEVTVaNA0CQBR4TtJZ9JJSF5IS+DJSpylj1 gMNgMGpUh9PDnIjhi8H8kPE1hevCh4PGnNSVFta5tXPnGjdY1nQe3k6o47n7egHZHtIk jebJK/unxOhh7bpM/Y4mYCJuD6dLyyq4kmG/DzBU7LI2DErm9MaMygVJ+8bOfG0n+Ppb i796utLX2vJkdMt723dXRJSQCbgF08X3+mW6spBLuzwvsFaygWzzYSgnUT5Q2VNgIsFI hZlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f3si3371018ejt.743.2020.10.08.00.52.55; Thu, 08 Oct 2020 00:53:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727550AbgJHHt5 (ORCPT + 99 others); Thu, 8 Oct 2020 03:49:57 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:57596 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725899AbgJHHt5 (ORCPT ); Thu, 8 Oct 2020 03:49:57 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 334FB28DBF3 Subject: Re: [PATCH 4/4] soc: mediatek: mmsys: Use an array for setting the routing registers To: Chun-Kuang Hu Cc: linux-kernel , Collabora Kernel ML , Yongqiang Niu , Matthias Brugger , Nicolas Boichat , Hsin-Yi Wang , CK Hu , Linux ARM , "moderated list:ARM/Mediatek SoC support" References: <20201006193320.405529-1-enric.balletbo@collabora.com> <20201006193320.405529-5-enric.balletbo@collabora.com> From: Enric Balletbo i Serra Message-ID: <580ecdf4-a686-f14c-a230-7f87f0c8cde5@collabora.com> Date: Thu, 8 Oct 2020 09:49:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Chun-Kuang, On 8/10/20 2:01, Chun-Kuang Hu wrote: > Hi, Enric: > > Enric Balletbo i Serra 於 2020年10月7日 週三 上午3:33寫道: >> >> From: CK Hu >> >> Actually, setting the registers for routing, use multiple 'if-else' for different >> routes, but this code would be more and more complicated while we >> support more and more SoCs. Change that and use a table per SoC so the >> code will be more portable and clear. >> >> Signed-off-by: CK Hu >> Signed-off-by: Enric Balletbo i Serra >> --- >> >> drivers/soc/mediatek/mtk-mmsys.c | 393 +++++++++++++++++-------------- >> 1 file changed, 210 insertions(+), 183 deletions(-) >> > > [snip] > >> >> static const struct mtk_mmsys_driver_data mt2701_mmsys_driver_data = { >> @@ -93,10 +115,6 @@ static const struct mtk_mmsys_driver_data mt6797_mmsys_driver_data = { >> .clk_driver = "clk-mt6797-mm", >> }; >> >> -static const struct mtk_mmsys_driver_data mt8173_mmsys_driver_data = { >> - .clk_driver = "clk-mt8173-mm", >> -}; >> - >> static const struct mtk_mmsys_driver_data mt8183_mmsys_driver_data = { >> .clk_driver = "clk-mt8183-mm", >> }; >> @@ -106,180 +124,192 @@ struct mtk_mmsys { >> const struct mtk_mmsys_driver_data *data; >> }; >> > > [snip] > >> +static const struct mtk_mmsys_driver_data mt8173_mmsys_driver_data = { >> + .clk_driver = "clk-mt8173-mm", >> + .routes = mt8173_mmsys_routing_table, >> + .num_routes = ARRAY_SIZE(mt8173_mmsys_routing_table), >> +}; >> > > I remove my Reviewed-by tag. You does not set routes for mt2701 and > mt2712, but these two SoC need that. Maybe now they use the same table > as mt8173. > I did that on purpose as explained in the cover letter, and asked for someone with the hardware to provide me a working routing table. But, if you think the same routing should work on those devices I'm fine to use the same for all the current devices. I don't have that hardware, so anyway, will need to test. Thanks, Enric > Regards, > Chun-Kuang. >