From patchwork Sat Dec 24 21:14:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 3286 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp297305wrt; Sat, 24 Dec 2022 13:17:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXu3fHXD5Vt/dgfW5hcE+9SYqADh8Hu32IwI5345alFpROQYNYv7AYLWIUbXFllHoGTTFYZ0 X-Received: by 2002:a17:906:124c:b0:7c0:d60b:2883 with SMTP id u12-20020a170906124c00b007c0d60b2883mr9279714eja.50.1671916638386; Sat, 24 Dec 2022 13:17:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671916638; cv=none; d=google.com; s=arc-20160816; b=RRg1R//6fmTsiAg/1JIwffP9X1QDUjeAf49Wbh8J2bV+lPQReF7CxBKy+fymhK+x4X cwsxiZn2yqa7dNL+M70BPXEAFqnTNW2LZlDBonudMkHVz0cdQSzfNDHv1VcxJbuMoFYj zzkOirUlYuGaxfiCnowos3ZfU4FaPD/lQHRvG49mO5z/Cne25qptiKfFilMU6t3zTqP8 oHaCdSFPcwga4UBHUfaTO3cYcDvNGyp0OB3sVyfJdRyDlvUrWrWVWuib15+JKNRrprUx inSxgOGQviEtN0xT8GlGaalgV8AOYOXDB3eSVGi9krPtT2t3dcn9uGeC+/M57AJmlrK9 Px8Q== 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=SFZ1iu0KtlM0sVLPriwQTJgBT7TxP6+YER8siAUqF2s=; b=XreO3z4ZLj1s6/CPo8ZN94FUDpdDiwvLqwacwokauNiJUq3+KEkXeaqzVfBOc+GahB JbT8JMHe4HX/epxUzUJcPRRCc4TIRKPxc7FSaNvzfD/LME5xTmTCmLJIp8sSWn9lSIVT cLX6iwSZHLsHxW6zQicP7q3KgHvjnkSbD+2JkMy5llahlAklMSgXHIEdOnd62enDPvLc y9tMG2lT3LSHK+8eIjtzd7v1WisDXZ0dQprDBh9226+ZBE3Slj4gaRDZJqlLKLP+omxE zJm8d7ZcAF6x/XWeynSaGz4+OsM1aS0Sz8Fw2kdeh7y/goqx2K0HLVIfFwBK2ZFRJC4T R8lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=idHcWzvA; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc18-20020a170907169200b008379ac04127si6151272ejc.199.2022.12.24.13.16.45; Sat, 24 Dec 2022 13:17:18 -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=@kernel.org header.s=k20201202 header.b=idHcWzvA; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229781AbiLXVQD (ORCPT + 99 others); Sat, 24 Dec 2022 16:16:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbiLXVQA (ORCPT ); Sat, 24 Dec 2022 16:16:00 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 259572AC0 for ; Sat, 24 Dec 2022 13:15:59 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 65E8ACE01BD for ; Sat, 24 Dec 2022 21:15:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54926C433D2; Sat, 24 Dec 2022 21:15:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671916555; bh=kR/Ls8oU711kk7Apo0h6/pv5vyQu/KJ/RCK7hENF8CA=; h=From:To:Cc:Subject:Date:From; b=idHcWzvA+nF4aRpEchMBZJqvNuF60qGs8GMpj4ATQaEo82nH9kwH1BeLKqcmJywz/ pajDgOFp/lbNhfPtt6SppgcnjDxvs4uMtq9pcWJhGbnJWogg32lKKOzAYdt4RXNOFC IHJ6GStiJOCylvh1LdbEMP6JSUXfVgDhr8kJnLxwT354KOFwZEQQ4lSwMzNoyR02e0 KIQHzrpHoOI9Bk06ERWkux1IH3TwjfPUsdEVbnk/LdP7bU7Scc+fd0ZXj6Vv23n38k rnDA/1KYpkrFsy3ySosVlyF+RboXzXFqRVKKar+oYD4I3MLLz5Mt/8D9w01AneF/4H gWtXsTcCRI8Wg== Received: by pali.im (Postfix) id 67B71720; Sat, 24 Dec 2022 22:15:52 +0100 (CET) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Michael Ellerman , Nicholas Piggin , Christophe Leroy , Scott Wood , Sinan Akman , Martin Kennedy Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/8] powerpc/85xx: p2020: Create one unified machine description Date: Sat, 24 Dec 2022 22:14:17 +0100 Message-Id: <20221224211425.14983-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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?1753131661196107202?= X-GMAIL-MSGID: =?utf-8?q?1753131661196107202?= This patch series unifies all P2020 boards and machine descriptions into one generic unified P2020 machine description. With this generic machine description, kernel can boot on any P2020-based board with correct DTS file. Tested on CZ.NIC Turris 1.1 board with has Freescale P2020 processor. Kernel during booting correctly detects P2020 and prints: [ 0.000000] Using Freescale P2020 machine description Changes in v2: * Added patch "p2020: Move i8259 code into own function" (separated from the next one) * Renamed CONFIG_P2020 to CONFIG_PPC_P2020 * Fixed descriptions Link to v1: https://lore.kernel.org/linuxppc-dev/20220819191557.28116-1-pali@kernel.org/ Pali Rohár (8): powerpc/85xx: Mark mpc85xx_rdb_pic_init() as static powerpc/85xx: Mark mpc85xx_ds_pic_init() as static powerpc/85xx: p2020: Move all P2020 machine descriptions to p2020.c powerpc/85xx: p2020: Move i8259 code into own function powerpc/85xx: p2020: Unify .setup_arch and .init_IRQ callbacks powerpc/85xx: p2020: Define just one machine description powerpc/85xx: p2020: Enable boards by new config option CONFIG_PPC_P2020 powerpc: dts: turris1x.dts: Remove "fsl,P2020RDB-PC" compatible string arch/powerpc/boot/dts/turris1x.dts | 2 +- arch/powerpc/platforms/85xx/Kconfig | 22 ++- arch/powerpc/platforms/85xx/Makefile | 1 + arch/powerpc/platforms/85xx/mpc85xx_ds.c | 25 +-- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 46 +----- arch/powerpc/platforms/85xx/p2020.c | 193 ++++++++++++++++++++++ 6 files changed, 215 insertions(+), 74 deletions(-) create mode 100644 arch/powerpc/platforms/85xx/p2020.c