From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C895C432BE for ; Sun, 1 Aug 2021 16:44:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6B60860720 for ; Sun, 1 Aug 2021 16:44:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229794AbhHAQo3 (ORCPT ); Sun, 1 Aug 2021 12:44:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:44008 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229548AbhHAQo2 (ORCPT ); Sun, 1 Aug 2021 12:44:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 27C9B610CE; Sun, 1 Aug 2021 16:44:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627836260; bh=XkN/0HlRnn1J0tNRiBvBaztD4kNQZthcZ1uCFGXTeLA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=m/gZd7Cp2b8pM+E3o/anhcsu16RuMH/nHHFKq5k1cJ67Lj9h6V6g2F0kmPJ9FFHc4 8iUmpm5hU7KK2AeOmtmbYTa+Pwt7+NjWORkPU6Jc+mSUq9/uqsP5Ugw4Q8oQod5DM0 +FlAQFxQ+1BVxjgVMvwIGIyt3vsep2ygwS1JMECzvyfaHeZKUzzoQRNi+/vqxBs4up RYRJtYX1h4eglfnbCoMbInIOmEUm7XTBmqfgbk9irS1p3U603tsXRci5H6IJlg+88+ 5CbiHd/R/aId8jAsqbabkJCeGW6Or+8pVJkOLcjmjmox8OVn/xYmZSo0ZM19qBs/1/ jDUiJTIOhH0ng== Received: by mail-oi1-f171.google.com with SMTP id u10so21234270oiw.4; Sun, 01 Aug 2021 09:44:20 -0700 (PDT) X-Gm-Message-State: AOAM531HAne/Tw5cv3wV1d+zKDRy2x3tGvRCa3Jy6a1/3x2lOQofDQJv Hz7MPxzxupWzM0b+VmU2LVDXdetxFCwkhKvsTbc= X-Google-Smtp-Source: ABdhPJwru+GPIfnxnY+Mb/e0vfuLbQ5kzslJIYdNjhk/2M2TH7OuUaiNedrwBgjnOFdBmPdWejxZjDfhr5+oB2N/bYs= X-Received: by 2002:aca:d64d:: with SMTP id n74mr8229062oig.47.1627836259302; Sun, 01 Aug 2021 09:44:19 -0700 (PDT) MIME-Version: 1.0 References: <20210730134552.853350-1-bert@biot.com> <20210730134552.853350-5-bert@biot.com> In-Reply-To: From: Ard Biesheuvel Date: Sun, 1 Aug 2021 18:44:08 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/5] ARM: Add basic support for EcoNet EN7523 SoC To: Arnd Bergmann Cc: Bert Vermeulen , DTML , Linux Kernel Mailing List , Linux ARM , Russell King , Linus Walleij , Andrew Morton , Geert Uytterhoeven , Anshuman Khandual , Krzysztof Kozlowski , John Crispin , YiFei Zhu , Mike Rapoport , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Nick Desaulniers , Kees Cook , Masahiro Yamada , Nathan Chancellor , Viresh Kumar , Felix Fietkau Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 30 Jul 2021 at 16:48, Arnd Bergmann wrote: > > On Fri, Jul 30, 2021 at 3:45 PM Bert Vermeulen wrote: > > > > From: John Crispin > > > > EN7523 is an armv7 based silicon used inside broadband access type devices > > such as xPON and xDSL. It shares various silicon blocks with MediaTek > > silicon such as the MT7622. > > > > Signed-off-by: John Crispin > > Signed-off-by: Bert Vermeulen > > It's always nice to see a new SoC family. > > > --- a/arch/arm/Kconfig > > +++ b/arch/arm/Kconfig > > @@ -580,6 +580,20 @@ config ARCH_VIRT > > select HAVE_ARM_ARCH_TIMER > > select ARCH_SUPPORTS_BIG_ENDIAN > > > > +config ARCH_ECONET > > + bool "Econet SoC Support" > > + depends on ARCH_MULTI_V7 > > + select ARM_AMBA > > + select ARM_GIC > > + select ARM_GIC_V3 > > + select ARM_DMA_USE_IOMMU > > + select ARM_PSCI > > + select HAVE_ARM_ARCH_TIMER > > + select IOMMU_DMA > > + select COMMON_CLK > > + help > > + Support for Econet EN7523 SoCs > > Given how closely related this probably is to MT7623/MT7622, should this > perhaps just be part of arch/arm/mach-mediatek? According to > https://wikidevi.wi-cat.ru/MediaTek#xPON, the older (mips based) MT752x > chips are apparently just rebranded to EN752x after the business unit > was spun off, but I guess they are still in the same family. > > > diff --git a/arch/arm/Makefile b/arch/arm/Makefile > > index 173da685a52e..1bff0aa29c07 100644 > > --- a/arch/arm/Makefile > > +++ b/arch/arm/Makefile > > @@ -152,6 +152,7 @@ textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000 > > textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000 > > textofs-$(CONFIG_ARCH_MESON) := 0x00208000 > > textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000 > > +textofs-$(CONFIG_ARCH_ECONET) := 0x00088000 > > Why is this needed? > > Note also the comment directly above it exlaining > # Text offset. This list is sorted numerically by address in order to > # provide a means to avoid/resolve conflicts in multi-arch kernels. > Yes, please drop this - it is a horrible hack and it's already quite disappointing that we are stuck with it for the foreseeable future. So I assume the purpose of this is to protect the first 128k of DRAM to be protected from being overwritten by the decompressor? It would be best to move this reserved region elsewhere, but I can understand that this is no longer an option. So the alternatives are - omit this window from the /memory node, and rely on Geert's recent decompressor changes which make it discover the usable memory from the DT, or - better would be to use a /memreserve/ here (which you may already have?), and teach the newly added decompressor code to take those into account when choosing the target window for decompressing the kernel. -- Ard. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8E3DC4338F for ; Sun, 1 Aug 2021 16:46:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 72BB060725 for ; Sun, 1 Aug 2021 16:46:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 72BB060725 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NZbHlVxamdw6/uqxY5lq/XlAqeQHSFZ+syrUSPrJ5S0=; b=j7C6mL2eWPSn73 HemkSMSU/rIVPHqUxvcKod++XFDDsxmLO4Xxx90QTxQy5piIBSJWmCOrEZJcS5GJuvZBvA9QsCkSi 3zDDJ0iaisxEi1CcyHJ3a32MWRcnhwKz9+01FHRcfH7Gk2QosgO1BSmfxyFqtmkb1hnfKnY7+6LJe SPcarqb1xn7xeMaFOmdExb4uTxWcXGtRYYR4KEnQSjOT1gTZbyMKaXJ+bthgiREiyOJ5Jwf98qAFo TWGZZJq+/wVOr5Uu/ynNjtRsHD72xuarpmqzLlb8pid0RypyuOd9C013n/aCSE8Nc2rH8JTyh26YV z6Rubk1sywfB7F+U7kqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mAEZe-00DttI-PC; Sun, 01 Aug 2021 16:44:26 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mAEZa-00Dtsd-OG for linux-arm-kernel@lists.infradead.org; Sun, 01 Aug 2021 16:44:24 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 20AF3610FC for ; Sun, 1 Aug 2021 16:44:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627836260; bh=XkN/0HlRnn1J0tNRiBvBaztD4kNQZthcZ1uCFGXTeLA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=m/gZd7Cp2b8pM+E3o/anhcsu16RuMH/nHHFKq5k1cJ67Lj9h6V6g2F0kmPJ9FFHc4 8iUmpm5hU7KK2AeOmtmbYTa+Pwt7+NjWORkPU6Jc+mSUq9/uqsP5Ugw4Q8oQod5DM0 +FlAQFxQ+1BVxjgVMvwIGIyt3vsep2ygwS1JMECzvyfaHeZKUzzoQRNi+/vqxBs4up RYRJtYX1h4eglfnbCoMbInIOmEUm7XTBmqfgbk9irS1p3U603tsXRci5H6IJlg+88+ 5CbiHd/R/aId8jAsqbabkJCeGW6Or+8pVJkOLcjmjmox8OVn/xYmZSo0ZM19qBs/1/ jDUiJTIOhH0ng== Received: by mail-oi1-f171.google.com with SMTP id y18so21287315oiv.3 for ; Sun, 01 Aug 2021 09:44:20 -0700 (PDT) X-Gm-Message-State: AOAM531C325fd5V0qIGICuE/l8NXN/wONKbhE5WDUNGrYFhDHdRVnBv9 cPLcuDUkXd2CmcZFqiatVcXtg+DHKTxf8I+bwWM= X-Google-Smtp-Source: ABdhPJwru+GPIfnxnY+Mb/e0vfuLbQ5kzslJIYdNjhk/2M2TH7OuUaiNedrwBgjnOFdBmPdWejxZjDfhr5+oB2N/bYs= X-Received: by 2002:aca:d64d:: with SMTP id n74mr8229062oig.47.1627836259302; Sun, 01 Aug 2021 09:44:19 -0700 (PDT) MIME-Version: 1.0 References: <20210730134552.853350-1-bert@biot.com> <20210730134552.853350-5-bert@biot.com> In-Reply-To: From: Ard Biesheuvel Date: Sun, 1 Aug 2021 18:44:08 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/5] ARM: Add basic support for EcoNet EN7523 SoC To: Arnd Bergmann Cc: Bert Vermeulen , DTML , Linux Kernel Mailing List , Linux ARM , Russell King , Linus Walleij , Andrew Morton , Geert Uytterhoeven , Anshuman Khandual , Krzysztof Kozlowski , John Crispin , YiFei Zhu , Mike Rapoport , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Nick Desaulniers , Kees Cook , Masahiro Yamada , Nathan Chancellor , Viresh Kumar , Felix Fietkau X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210801_094422_865999_C9874C03 X-CRM114-Status: GOOD ( 29.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 30 Jul 2021 at 16:48, Arnd Bergmann wrote: > > On Fri, Jul 30, 2021 at 3:45 PM Bert Vermeulen wrote: > > > > From: John Crispin > > > > EN7523 is an armv7 based silicon used inside broadband access type devices > > such as xPON and xDSL. It shares various silicon blocks with MediaTek > > silicon such as the MT7622. > > > > Signed-off-by: John Crispin > > Signed-off-by: Bert Vermeulen > > It's always nice to see a new SoC family. > > > --- a/arch/arm/Kconfig > > +++ b/arch/arm/Kconfig > > @@ -580,6 +580,20 @@ config ARCH_VIRT > > select HAVE_ARM_ARCH_TIMER > > select ARCH_SUPPORTS_BIG_ENDIAN > > > > +config ARCH_ECONET > > + bool "Econet SoC Support" > > + depends on ARCH_MULTI_V7 > > + select ARM_AMBA > > + select ARM_GIC > > + select ARM_GIC_V3 > > + select ARM_DMA_USE_IOMMU > > + select ARM_PSCI > > + select HAVE_ARM_ARCH_TIMER > > + select IOMMU_DMA > > + select COMMON_CLK > > + help > > + Support for Econet EN7523 SoCs > > Given how closely related this probably is to MT7623/MT7622, should this > perhaps just be part of arch/arm/mach-mediatek? According to > https://wikidevi.wi-cat.ru/MediaTek#xPON, the older (mips based) MT752x > chips are apparently just rebranded to EN752x after the business unit > was spun off, but I guess they are still in the same family. > > > diff --git a/arch/arm/Makefile b/arch/arm/Makefile > > index 173da685a52e..1bff0aa29c07 100644 > > --- a/arch/arm/Makefile > > +++ b/arch/arm/Makefile > > @@ -152,6 +152,7 @@ textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000 > > textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000 > > textofs-$(CONFIG_ARCH_MESON) := 0x00208000 > > textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000 > > +textofs-$(CONFIG_ARCH_ECONET) := 0x00088000 > > Why is this needed? > > Note also the comment directly above it exlaining > # Text offset. This list is sorted numerically by address in order to > # provide a means to avoid/resolve conflicts in multi-arch kernels. > Yes, please drop this - it is a horrible hack and it's already quite disappointing that we are stuck with it for the foreseeable future. So I assume the purpose of this is to protect the first 128k of DRAM to be protected from being overwritten by the decompressor? It would be best to move this reserved region elsewhere, but I can understand that this is no longer an option. So the alternatives are - omit this window from the /memory node, and rely on Geert's recent decompressor changes which make it discover the usable memory from the DT, or - better would be to use a /memreserve/ here (which you may already have?), and teach the newly added decompressor code to take those into account when choosing the target window for decompressing the kernel. -- Ard. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel