From patchwork Mon Feb 27 10:57:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Paracuellos X-Patchwork-Id: 5888 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2348847wrd; Mon, 27 Feb 2023 03:01:15 -0800 (PST) X-Google-Smtp-Source: AK7set8ESohNCR+DeiKIyGgST1Y0FrQz4MMJkh0VVCfFfW3IBRamtu+vdvmPYCYHfrdURX3gOEb9 X-Received: by 2002:a17:902:e80d:b0:19a:70f9:affb with SMTP id u13-20020a170902e80d00b0019a70f9affbmr29623752plg.2.1677495675239; Mon, 27 Feb 2023 03:01:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677495675; cv=none; d=google.com; s=arc-20160816; b=ilXYsaNOPNBWkoEmzJx5z0qKFDrj9A8FpnKWbpXt4lNCBBTkt2G28dUapyQZ6h6U9N mV58HWhfI7Po/UccYpKihxsACT5SHqeiRHzZ9YssNZXvsK8SZfneqfRATUTj7WJMHNK5 SyC0wWhKKVdb14r2fiQ1K43oF1mDHiHuwy8QUompGftWHnQNGm+IdfoOzjo6F+g+Z4CB KUuSVimsx18qIv/cf6+ZFtVoUYbcOokD2a7X20N4T5YA5rOHbE+vWb3qwguf0hg6Mp5X L3pnLUziEsyqrc2gyv7kxj6QReXVKoDQniGKhfTNSlraZnIWlgSrnklEeFYkKSOb1H/l +YYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ZXZ5C7P9D/0s9CDFL6gpMuOWFVtyKmkspdci0k4HMiI=; b=KphmI3uXhFA1UXzpNEDce2mkHnccTVOdkIcLlmiP4m5XQcp0S7UpbymrX/hryTjKMo PzbmNyJcNysY/OJJ2qfSpCEOxdWLN4IjjbP4p6Y0vLCI5UNdqoUCSNChEIlkSulgYAkJ 67JdKMVPruw5QeK6QOLhPg2q6ZNwMTefX8o0guktoSif4ohAoNA4KS5beUZSLpRJoeI9 JRvq2lNjEUGypmhLW72UQdie0yxQ6iN8GwAvPFu96C57po6JUJD6XBXJU6eF04Af0jkB kGnfrcdgxnuProo8LF6CQWR9bxwAnVWzdZDcdWuO7gOvy+5s5G+4TuX/um1xSBYbg7lH 48Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IQZi6OJV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p23-20020a63c157000000b00502ece99eb3si6600607pgi.41.2023.02.27.03.00.57; Mon, 27 Feb 2023 03:01:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IQZi6OJV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229923AbjB0K6O (ORCPT + 99 others); Mon, 27 Feb 2023 05:58:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229817AbjB0K6L (ORCPT ); Mon, 27 Feb 2023 05:58:11 -0500 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 132BA93FE; Mon, 27 Feb 2023 02:58:10 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id r7so5729615wrz.6; Mon, 27 Feb 2023 02:58:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ZXZ5C7P9D/0s9CDFL6gpMuOWFVtyKmkspdci0k4HMiI=; b=IQZi6OJV1GYXqnOActUwI/xKfypALKlUY8g7CA2Zs2DocpaieW3D+tk0XZSlm8qpGN m/YNDLhI+YRJIgOH6J1a2Rw8bHsMx0rbA9gqViZQY5mFuHZIatlkD53/R/cLmLUi+rKQ NpG/GR2ciwXHyZy8qpI0iX+r6JGP6yhPCwjJYqEdroeZu3CcRC35xXEI5gdZJ5L8+0EQ aasc2VSKW2qyLt7hDJtuYYMcU5PvaSO54sc1SDZMKOmFrHHgMs3JjXJ3fCvzAngQ5Tbh dVpYe04MheYyJvqNWCrhq3fSmKBoU4sjetEp/PUEFg/nit53jdhn/lKWQYrnbRdneJtA Vicw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZXZ5C7P9D/0s9CDFL6gpMuOWFVtyKmkspdci0k4HMiI=; b=5nlNKNSi+m7YC+AFIR2zqWDZv3TmQG5llRuCIEAUasoZc4YxQBHwVG2CVc2GfAqXu3 vyzRfn+zcPVXeTe50wkaczTr+vURDpjTsiulDig+AWLnpStr7f00JvzMLSVYQVEjkHyu wmPpxJr3WpzfkymLIlMtQpO2PrDif93kTke14vp2VU2ao4fTJUDpV2nuPNI8BarhG3z3 Aq9/T8xt/MzisJFpXlBUULEi8HvvdnLrJhOP1bNEK0b7C1PLNOq6P2XStY+9TqmqPfit Pp/1RLIIbYs6j+TWSOtQFvtizQuSS2jNQ6vpm8kgpjzEqqWh5oK3SJJoaIVSrJqeLYqZ wa5g== X-Gm-Message-State: AO0yUKUBLL3v7PwZPTFUR8wf6n8kXh8niLzLxXue9HxTkhV6bsXUfQJY I3/1ln2ALWEYs6ykXLfORJ3YtMUcQck= X-Received: by 2002:a5d:42c3:0:b0:2c7:3c96:18d7 with SMTP id t3-20020a5d42c3000000b002c73c9618d7mr9842046wrr.20.1677495488059; Mon, 27 Feb 2023 02:58:08 -0800 (PST) Received: from localhost.localdomain (106.red-88-13-29.dynamicip.rima-tde.net. [88.13.29.106]) by smtp.gmail.com with ESMTPSA id a4-20020a5d5704000000b002c559843748sm6806122wrv.10.2023.02.27.02.58.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 02:58:07 -0800 (PST) From: Sergio Paracuellos To: linux-mips@vger.kernel.org Cc: tsbogend@alpha.franken.de, john@phrozen.org, linux-kernel@vger.kernel.org, git@johnthomson.fastmail.com.au Subject: [PATCH 00/12] mips: ralink: introduce 'soc_device' initialization Date: Mon, 27 Feb 2023 11:57:54 +0100 Message-Id: <20230227105806.2394101-1-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758981704803696912?= X-GMAIL-MSGID: =?utf-8?q?1758981704803696912?= This series align old SoCs ralink code with current mt7621 code refactoring SoC related information into more readable functions as well as introducing 'soc_device' for all of them. This allows to be able to distinc SoC info from driver code without using architecture dependent includes. I am also planning to extract from ralink code current clock related stuff into proper clk drivers at some time and be able to distinc SoC in this way let me to mark future drivers to be easily marked for COMPILE_TEST target. Changes have been compile tested for: - RT2880 - RT3883 - MT7620 Changes have been properly tested in RT5350 SoC based board (ALL5003 board) resulting in a working platform. Thanks in advance for your time. Best regards, Sergio Paracuellos Sergio Paracuellos (12): mips: ralink: rt305x: define RT305X_SYSC_BASE with __iomem mips: ralink: rt305x: soc queries and tests as functions mips: ralink: rt305x: introduce 'soc_device' initialization mips: ralink: rt3883: define RT3883_SYSC_BASE with __iomem mips: ralink: rt3883: soc queries and tests as functions mips: ralink: rt3883: introduce 'soc_device' initialization mips: ralink: rt288x: define RT2880_SYSC_BASE with __iomem mips: ralink: rt288x: soc queries and tests as functions mips: ralink: rt288x: introduce 'soc_device' initialization mips: ralink: mt7620: define MT7620_SYSC_BASE with __iomem mips: ralink: mt7620: soc queries and tests as functions mips: ralink: mt7620: introduce 'soc_device' initialization arch/mips/include/asm/mach-ralink/mt7620.h | 3 +- arch/mips/include/asm/mach-ralink/rt288x.h | 3 +- arch/mips/include/asm/mach-ralink/rt305x.h | 3 +- arch/mips/include/asm/mach-ralink/rt3883.h | 4 +- arch/mips/ralink/Kconfig | 4 + arch/mips/ralink/mt7620.c | 145 ++++++++++++++++---- arch/mips/ralink/rt288x.c | 94 ++++++++++--- arch/mips/ralink/rt305x.c | 147 +++++++++++++++++---- arch/mips/ralink/rt3883.c | 94 ++++++++++--- 9 files changed, 410 insertions(+), 87 deletions(-)