Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1023986pxy; Sun, 1 Aug 2021 09:47:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbK0bfJOOlB186CM+IJPfudS59kgI0bdJ1V7URKFlsEyDTvl+nJ5/Z1ow+wEVVAUW6o3Mf X-Received: by 2002:a05:6602:2e8a:: with SMTP id m10mr5410809iow.45.1627836444042; Sun, 01 Aug 2021 09:47:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627836444; cv=none; d=google.com; s=arc-20160816; b=Em0fxhwSw1QYrCAIyxoifCfELBV7mqC3wJUYurQulpcRGufxKo+SfOBgHQ2LRKkHsn pilQB5gV5aKQ/drEoo/8V1k0UyIb+hdZAusnKEaZXdRiJXvzngsnCAC4x03Ag6jw61wx Evs6F1583BYlVzQmgPM1HfsxJe5ViNw0yEjuyDmLfKohRhyB7sEn7bFCKEtWhqMAa8C1 JLj2Jib435UOaqX3kNGLoJlMPiFEnHmScwU41vZz5pm8YVlLgyE7E8fLMN/fU/CjfchD Kfx8TWP4h3A+b0l9TkfpYuCpFXK2YN8+L9xeGIgWT66IXisEG6Vt2w/q1aaWHCx/6nor eDAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=MN31zMrCp2s2/JhCzY+aPOCork2EuxIC7JhxK5ZsV5M=; b=QOcnTfHUbrVF0/uNdKKSW/8OXl+RPT8e0znihOTD1RrRRnGhwPqg0vQuzeHpTFTkvz ghQYrNb6nOJpqICHgX3gqI/upfaNDlppnaoBWdVmHzeMvoet/4pSrY0vzEH2E/24Gn11 dXDi1dafE6Qi01csgpWwXkMZwpGMnRXBKypexLrrF4Qg5C2CGZoXhZOeYduAh4RmNAzl 5KxvNdCxJri5sIqmIvqrlE8XX9ATbJDD0PylBhZYauQSJQq/EoQbNE2anpHD4FD+m5n7 5///iACYqol2QJqu11c56Fg11qQ+Ua5bV+GsVi06whmh1LnHtk5Q1kwLhoQNdteD9oxp x1Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="m/gZd7Cp"; 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 14si1969054ilt.110.2021.08.01.09.47.12; Sun, 01 Aug 2021 09:47:24 -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=k20201202 header.b="m/gZd7Cp"; 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 S229706AbhHAQo3 (ORCPT + 99 others); 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-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.