Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp10658pxu; Tue, 6 Oct 2020 17:05:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZ4XvsLyRzBmePRASbzt14avuA6WFMS4kz6Rd3s6uVfnE0DLkoSP6jaSamrmR0N5Bb9P5l X-Received: by 2002:a17:906:8401:: with SMTP id n1mr527726ejx.215.1602029142521; Tue, 06 Oct 2020 17:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602029142; cv=none; d=google.com; s=arc-20160816; b=Z1Gx8m/NLQESZY+q7y0Z1OnRUtRobCHE3lFXd8ap3nU5PI5cUrqjk/uMnI5Lee9ouO luGVLAQo5VSk2Lm33nM376nwuP0UahBsKdNgVFbJZEjkJuwVkNoYglEVw11HKvPlWr1u +5cimtWJR+41SUUjEF1iTLwPRuc4Tu5NMhGaHIgogUnwIRvyqu0JNqL8xxrmrFNfDhYE VqcDVd1zu+san8+ypY3W00vD2qNMYeqP8EQ8o9kCmKLOmlgltfylf/PeIFB4jSJxmR+w ijiKUXoSZ5AYGVToWmJEzVcxxY0fk2qLTyOALuvaBm3LoyYRz4KWQj3KVgfCpk719Nwz DYjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=WeTr2DclcJlH7Exdx/vQPAx1aBy6AJmJr+8ryX9DMvA=; b=XxQ4aXZUlbz9gP2ffudkBUaTUkcwViKOfV0Po2O1QdAx4i3z5tHRO2Z4nezOgoCaH7 RFuIe3OtX95FmNKLmhxD5gFLCk7RRD3baCx73vLdI0Ut2T1EauIftmFqD1WrCRYpuJ4s ilCdYJDAVrPwS0MO4wmam9nDNE+FzuF0vbArPF3VT1Fv5WnLbCtGwuw5EQ75RlBdmFEf aLoGovZlmWvQggdeHvVRufcZfE9EWXd3QQedOjyGMNGmEk0125NKrDIIniW7i30f+weI gNGrw1KcHzjy9NAfKZv4hwkS2kLf7PnqqzL9rq/J4xvRtrqii13CsvltgNCDSTsoCkoS Coqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zGOcAx3i; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b12si131615edv.217.2020.10.06.17.05.19; Tue, 06 Oct 2020 17:05:42 -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; dkim=pass header.i=@kernel.org header.s=default header.b=zGOcAx3i; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726725AbgJGACa (ORCPT + 99 others); Tue, 6 Oct 2020 20:02:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:35048 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725925AbgJGACa (ORCPT ); Tue, 6 Oct 2020 20:02:30 -0400 Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E6967214DB for ; Wed, 7 Oct 2020 00:02:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602028950; bh=tFASekccPs0uwtl2alfNzpZUiMaOcFfZ7JluNg7mEA0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=zGOcAx3ib718MRD2RusoZpw7CLWDysskCpjbMp/zPQMDTANZ9ugFs8eixKxbeHFpr mYlTcDyp19X+py+ph+AiO1aiw9ZXnJ4L2yQlVz/5V5D2U0lwO627vw2WYIX5d3Z6Hv xcpov2M8GpwsEiPrqkMlJHSk1Kz9FfPwKKaUOlOU= Received: by mail-ej1-f49.google.com with SMTP id c22so422105ejx.0 for ; Tue, 06 Oct 2020 17:02:29 -0700 (PDT) X-Gm-Message-State: AOAM531gW0O56cVetdh02kIZ/4Gb2WOzvmcjnyaMjtslyvS9nXZT3iZb 1xiF1Sm3gzW5WtKfsvrRC9T5IW3w2qkpFRLOAA== X-Received: by 2002:a17:906:3716:: with SMTP id d22mr538107ejc.267.1602028948530; Tue, 06 Oct 2020 17:02:28 -0700 (PDT) MIME-Version: 1.0 References: <20201006193320.405529-1-enric.balletbo@collabora.com> <20201006193320.405529-5-enric.balletbo@collabora.com> In-Reply-To: <20201006193320.405529-5-enric.balletbo@collabora.com> From: Chun-Kuang Hu Date: Wed, 7 Oct 2020 08:02:17 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/4] soc: mediatek: mmsys: Use an array for setting the routing registers To: Enric Balletbo i Serra Cc: linux-kernel , Collabora Kernel ML , Yongqiang Niu , Matthias Brugger , Nicolas Boichat , Hsin-Yi Wang , Chun-Kuang Hu , CK Hu , Linux ARM , "moderated list:ARM/Mediatek SoC support" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Enric Balletbo i Serra =E6=96=BC 2020=E5=B9= =B410=E6=9C=887=E6=97=A5 =E9=80=B1=E4=B8=89 =E4=B8=8A=E5=8D=883:33=E5=AF=AB= =E9=81=93=EF=BC=9A > > From: CK Hu > > Actually, setting the registers for routing, use multiple 'if-else' for d= ifferent > 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. Reviewed-by: Chun-Kuang Hu > > 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(-) >