From patchwork Thu Oct 12 08:42:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1847315 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=ooz1WsjX; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=f8QShFTn; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S5jqt1Xnsz23jX for ; Thu, 12 Oct 2023 19:44:42 +1100 (AEDT) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:In-Reply-To:References:Message-Id: MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UkO1ZvBkn9UB7ZPMUbGnK0Lnm2574NMpBZ7M9kezNCg=; b=ooz1WsjXjqQjTY bAqUW9m7r9P+g1ob3+CELXqR4aIiDKR25ufc2GulKyQiU61XbYhn92GhRfKHZlUJOkggrox4ju2KX LOybbtNSViy3JpWSb8SVVq1v1MpMyBjIY68GVnbJ2QYMnmc1jTgBbfxQ4X2csJw/6y0d5utRqKma7 t1mAAO3s2vqgqqm9RlAQEs2trVIbvPof4ugr0BpZsMPouDZHdrZcYB60QqdVGb00hmOt4ZsTzNCiW gBpkfy1ZYpa2sI8MU3XuYHBTpugryH9RXyRM0VvZYUa21BM5vPaCZivOy7VXrl8MDKLYVzO278C1G gdjPFNMhmJyYFQVk808g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqrH6-000E25-2E; Thu, 12 Oct 2023 08:42:32 +0000 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqrGx-000Dte-2v for openwrt-devel@lists.openwrt.org; Thu, 12 Oct 2023 08:42:25 +0000 Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2c186ea81c7so8909011fa.1 for ; Thu, 12 Oct 2023 01:42:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697100140; x=1697704940; darn=lists.openwrt.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=GTwHDaNRmhBM3ZvGWs+t8LW+NYMOpeBSecebxx+DGps=; b=f8QShFTnmbxWf128vLTl8yCtTfURh/sPP75W/f8BmkveA9DP8Om+knCBj94ejOZ7i9 1KS/+ll8YJ4oZ+bgXBwj122OLkZOtzvHdb18kMkbfvOikmjjJcbCJ265Vi/7PhmIG3P9 4GCUFYwBp+ZBJdHnnkUFmOY4wmblnNtYxO4kdfxQgGPln9nwtjaAxOGmUDx8LQFihd2J L4HbyapbctWDbUfNQZcdeqa8jGZwWXWVU4ajrmBhRRbrXUydJ/WZ5TGUoW1o7j3UryiO oudOMe9/Co2hFBaulRO6mZw/NAdxKCW4eIr/tl9WVwuif1o2yE6gOqvWYCyyKzKMyrgO /B4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697100140; x=1697704940; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GTwHDaNRmhBM3ZvGWs+t8LW+NYMOpeBSecebxx+DGps=; b=s0xik296nRinjSX7BjewfnQYfCpP/04ew+91/jFZatHeqPLQsn5vMydc5TsnREo5wn sVKFlSQNnULTFObm2wVT+22Abh4mC2Lg8iRaTEVkApLlg4XGkScBSYfdpmF5Tm0o3P/Z g4QGn6LhYVzYhHhUhMediIhh3VuaPwxDdtdRqIEKArWR6Aj7N+QFFtQMk2uzlMqQhjRL scdrVRKH9fFpMWJhf685aduAb7vGBjCf/jltudzpAJoqlcZfGFgzNRbXBO+ZpciYzGFW kVrJJ/BettsRm3sCQntZzZAUFPoR4q0F2aeXu92xcvgPTzHEJuo6bFqvtya3fASnbonY Suzg== X-Gm-Message-State: AOJu0YyuY+HSTmQHHBUWqsvtiNHhp0WEy388NuxYZE2ejeRld+CEmvgK sTNWphWKTe0sEA77WEC69NfU4ffVZdVItrk1kKo= X-Google-Smtp-Source: AGHT+IGz4szYpyLxHl9VIN2spGoqbnq//P3pc00f4pfHWRDcfoeRfXz27qMPIQUMWxQwKWfVIhJd2A== X-Received: by 2002:ac2:5e6f:0:b0:4ff:7046:984a with SMTP id a15-20020ac25e6f000000b004ff7046984amr19110619lfr.7.1697100139797; Thu, 12 Oct 2023 01:42:19 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id o9-20020a05651238a900b00501c8959f6asm2705043lft.98.2023.10.12.01.42.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 01:42:19 -0700 (PDT) From: Linus Walleij Date: Thu, 12 Oct 2023 10:42:16 +0200 Subject: [PATCH v3 01/10] boot/apex: Restore the APEX boot loader MIME-Version: 1.0 Message-Id: <20231012-ixp4xx-v3-1-e09c74712c0b@linaro.org> References: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> In-Reply-To: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> To: Imre Kaloz , Krzysztof Halasa , Howard Harte , openwrt-devel@lists.openwrt.org X-Mailer: b4 0.12.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231012_014224_022128_81098407 X-CRM114-Status: GOOD ( 16.22 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This is a partial revert of the deletion of the IXP4xx target: we restore the APEX boot loader so we can use it for the NSLU2 and related targets. The APEX upstream is as dead as it gets so I have applied OpenWrts old patches on top of the never released v1.6.10 version and forked it into an OpenWrt variant on GitHub. If the upstream comes back [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:22a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hauke Mehrtens , Linus Walleij , Raylynn Knight Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This is a partial revert of the deletion of the IXP4xx target: we restore the APEX boot loader so we can use it for the NSLU2 and related targets. The APEX upstream is as dead as it gets so I have applied OpenWrts old patches on top of the never released v1.6.10 version and forked it into an OpenWrt variant on GitHub. If the upstream comes back alive I will happily switch over to it. The file refers to the external GitHub, I suppose when integrating this patch the file should be copied to OpenWrts file repository and the file link changed. Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Build APEX from git URL. - Use the Build/InstallDev makerule to build the binaries like all other boot loader do. - Add PKG_LICENSE and PKG_LICENSE_FILES - Add DEPENDS on !IN_SDK ChangeLog v1->v2: - Do not default to "y", instead make the device target select apex by default. - Do not package the boot loader into the rootfs image. Who wants that. --- package/boot/apex/Makefile | 61 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/package/boot/apex/Makefile b/package/boot/apex/Makefile new file mode 100644 index 000000000000..66a1b7667eb0 --- /dev/null +++ b/package/boot/apex/Makefile @@ -0,0 +1,61 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Copyright (C) 2006-2023 OpenWrt.org + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=apex +# This version was created from the stalled and unreleased v1.6.10 +# with some patches on top. +PKG_VERSION:=1.6.10-openwrt +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/linusw/apex.git +PKG_SOURCE_VERSION:=483e18aa133d5e25866570c29b124530b2d1e0d3 +PKG_MIRROR_HASH:=42230bb436f5590447ca55e8befb8927e6ea74c1e6953c043bbbef986c411704 + +PKG_TARGETS:=bin +PKG_FLAGS:=nonshared +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:=COPYING + +include $(INCLUDE_DIR)/package.mk + +export GCC_HONOUR_COPTS=s + +define Package/apex + SECTION:=boot + CATEGORY:=Boot Loaders + DEPENDS:=@TARGET_ixp4xx @!IN_SDK + DEFAULT:=y + TITLE:=Boot loader for NSLU2, FSG3, NAS100D and others +endef + +define build_apex + $(MAKE) -C $(PKG_BUILD_DIR) \ + ARCH=arm \ + $(1)_config + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + KBUILD_HAVE_NLS=no \ + ARCH=arm \ + clean all + $(INSTALL_BIN) $(PKG_BUILD_DIR)/apex.bin $(PKG_BUILD_DIR)/out/apex-$(2).bin +endef + +define Build/Compile + $(INSTALL_DIR) $(PKG_BUILD_DIR)/out + $(call build_apex,openwrt-nslu2-armeb,nslu2-armeb) + $(call build_apex,openwrt-nslu2-16mb-armeb,nslu2-16mb-armeb) + $(call build_apex,openwrt-fsg3-armeb,fsg3-armeb) + $(call build_apex,openwrt-nas100d-armeb,nas100d-armeb) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(STAGING_DIR_IMAGE)/apex + $(CP) $(PKG_BUILD_DIR)/out/*.bin $(STAGING_DIR_IMAGE)/apex +endef + +$(eval $(call BuildPackage,apex)) From patchwork Thu Oct 12 08:42:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1847311 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=O3JRD3c6; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=y+BS7HZK; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S5jqm5Y4gz23jm for ; Thu, 12 Oct 2023 19:44:36 +1100 (AEDT) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:In-Reply-To:References:Message-Id: MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UaEgthpqtU+rJ1l4+NdJPMzwLzwaN8gw4YzMXPZ+oJc=; b=O3JRD3c63uNv9k Xdx1HFf0x2/xxTYn7oXDX7/FO6mp2/KuairutdkoqCfisGxxwV4bsLAsJNJdztDYKWLnKfuwYdAom vQYHM67AHLpZz5/JwDp73x4EDQexXBAPvWNHzAouE4+csIHLEh2zLS15i3U3K6htbD6JEBwz/d179 k2jLuv10sPhz4mbsMVWv/32TxxX8I9oAg3OTzAbf59ILPPi1J26Dso0OjyIeP/3BVABNVaMG7/TDx p68AuMJBm8PjqU1kuDE7+Q5Tq2Q6dtA+rnS69rpwpHFE+5LgJ/HucdyZTY5UtBF9P275Cb1G/TiIy q89AekWUO5vTHvxT+OwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqrHC-000E5E-0g; Thu, 12 Oct 2023 08:42:38 +0000 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqrGz-000DuI-1r for openwrt-devel@lists.openwrt.org; Thu, 12 Oct 2023 08:42:27 +0000 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-505748580ceso980198e87.3 for ; Thu, 12 Oct 2023 01:42:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697100140; x=1697704940; darn=lists.openwrt.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=rnLI01ryfWpZmaVJi5w8dirkm+yvQchf0VYOeD8BjcE=; b=y+BS7HZK3aOqI/cyJvkeIhdxXm+hQCKRJIh0uUy0Sx/8mtCGSiL6BtV4W6dg11bWFQ bAxEihJf8FdXJpAftNAlbX443xRE6C0+9Sfgs0oj/HGTRLoz9mJSTaO7tD8Uii2qciFW Tz9w4n/cjHY3kJjRV2IZhVsQqHJMmJEtBYv2ND8rd3Ph6Js1zEhWCh01Yq1PGnhyTWUJ VkSQGUEjqvHy41FVAHftn0OLX4/cQLtZo3v//UXhlxu227LCEItzVupdbzdOrjB2hQQ4 v3Uyo5MNYOhG5KGihTW57+SzD036aok/3JDqlkIPCY5bhXlMDqIU0FdNZ0rr4vyaLt0n nzrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697100140; x=1697704940; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rnLI01ryfWpZmaVJi5w8dirkm+yvQchf0VYOeD8BjcE=; b=CCsLB4GVnyU0Omh3uUhhs3fdVzrrAieS8jou/4nJsz+w3DaKgf5X6VZ3jFJFn0OI/p Whr6SBTTbLVohVPj+40V7GxX/jfCXC9iTTzvmc9tfxB6PPRIsnBx7spf/SYPb1pR3qvN AACPA9y7MKCcgWKFfLswp6xwAiL/F8EgOlO/y5FiKtVAexsg0cMTQ3i5wA+NDa9+EuKn mFMBYIV8J9oVJXWGlmsuw53I96EBtkFyBX8er+oKLJJe3suo1DtJKNnLYMc4eFAjgskX k/76j5vbbN8nlQgUcSdbbsa6bfDukF3VsZeDM+xVxkvrndLSzjgRxSP09L4o6OEq9f8k Jpwg== X-Gm-Message-State: AOJu0YyCTE24gqsHZrXpV8nvzbuRfrAl4slwKT4Blg/m0vn+INiAeV4Y AVUyUdrbyjzLaIkKXk9hM+uEVwR2SFXodkx942M= X-Google-Smtp-Source: AGHT+IFSTm1jaXUtAC40YBhc2LhHPRxZ50DaugVpZiyiZqNjOT3Q8QP63lZGZJNasCk/RRzru4941A== X-Received: by 2002:a05:6512:1104:b0:500:98ff:4162 with SMTP id l4-20020a056512110400b0050098ff4162mr24325445lfg.40.1697100140734; Thu, 12 Oct 2023 01:42:20 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id o9-20020a05651238a900b00501c8959f6asm2705043lft.98.2023.10.12.01.42.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 01:42:20 -0700 (PDT) From: Linus Walleij Date: Thu, 12 Oct 2023 10:42:17 +0200 Subject: [PATCH v3 02/10] kernel: crypto: armeb build rules for lib-chacha20 MIME-Version: 1.0 Message-Id: <20231012-ixp4xx-v3-2-e09c74712c0b@linaro.org> References: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> In-Reply-To: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> To: Imre Kaloz , Krzysztof Halasa , Howard Harte , openwrt-devel@lists.openwrt.org X-Mailer: b4 0.12.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231012_014225_750080_6043C6CC X-CRM114-Status: UNSURE ( 7.95 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The lib-chacha20 library is missing build rules for big endian ARM, and since IXP4xx is big endian ARM we need those rules to build for IXP4xx. Suggested-by: Tomasz Maciej Nowak Signed-off-by: Linus Walleij --- ChangeLog v1->v3: - New patch to fix build error. --- package/kernel/linux/modules/cryp [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:133 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomasz Maciej Nowak , Hauke Mehrtens , Linus Walleij , Raylynn Knight Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The lib-chacha20 library is missing build rules for big endian ARM, and since IXP4xx is big endian ARM we need those rules to build for IXP4xx. Suggested-by: Tomasz Maciej Nowak Signed-off-by: Linus Walleij --- ChangeLog v1->v3: - New patch to fix build error. --- package/kernel/linux/modules/crypto.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk index 501be4b0a02c..c0ccdaa3dfe6 100644 --- a/package/kernel/linux/modules/crypto.mk +++ b/package/kernel/linux/modules/crypto.mk @@ -523,6 +523,8 @@ define KernelPackage/crypto-lib-chacha20/arm FILES:=$(LINUX_DIR)/arch/arm/crypto/chacha-neon.ko endef +KernelPackage/crypto-lib-chacha20/armeb=$(KernelPackage/crypto-lib-chacha20/arm) + define KernelPackage/crypto-lib-chacha20/aarch64 KCONFIG+=CONFIG_CRYPTO_CHACHA20_NEON FILES+=$(LINUX_DIR)/arch/arm64/crypto/chacha-neon.ko @@ -616,6 +618,8 @@ define KernelPackage/crypto-lib-poly1305/arm FILES:=$(LINUX_DIR)/arch/arm/crypto/poly1305-arm.ko endef +KernelPackage/crypto-lib-poly1305/armeb=$(KernelPackage/crypto-lib-poly1305/arm) + define KernelPackage/crypto-lib-poly1305/aarch64 KCONFIG+=CONFIG_CRYPTO_POLY1305_NEON FILES:=$(LINUX_DIR)/arch/arm64/crypto/poly1305-neon.ko From patchwork Thu Oct 12 08:42:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1847314 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=VIj8N9ip; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=FrdzCbkn; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S5jqp6mQ2z26jT for ; Thu, 12 Oct 2023 19:44:38 +1100 (AEDT) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:In-Reply-To:References:Message-Id: MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=64WNMdDhGEmat4BcaPDgJuUQelUFXMWM7FvV8DXyOT8=; b=VIj8N9ip0E4MEW 6Em3SA6E020G8Xa14Z6xNK8OZoGbWrUiLmp0zLXzy8709cx/L6MahtUOOTVH0YN5xGWsWSg6mCSBL 5njZperz+Bb26C66Ml2QpDXlD9z9y/S7euqZ+1g2HFWD8A+9YJswsct4sUqPf9GzZJqvwPcMjm0R1 Q+Jr8IwrsEhEPnvN8LmljWG1ICLNnZjQE1fjPHkdclNwldVTh346QCtz+/5Kv5aEYP3nN/K+KsP9y bi3NtADfDDmzfQiV6z+jopDQ3WrgXpCFMMARDGcoY76AZR+pJpQvzAFcs+Y3vFS5ZhL5ZEXgHVH1F ZaPpU0Aif29u5sxrLMdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqrHG-000E7x-12; Thu, 12 Oct 2023 08:42:42 +0000 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqrH0-000DvC-11 for openwrt-devel@lists.openwrt.org; Thu, 12 Oct 2023 08:42:28 +0000 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2c17de836fbso9129771fa.1 for ; Thu, 12 Oct 2023 01:42:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697100142; x=1697704942; darn=lists.openwrt.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=03caJXjSufDSpp1LCzfkdaxOovD/mkaKWVxj7ep2LYM=; b=FrdzCbkn1/JjYgF97SFo+eCpboM06Ej041GYZUmFC+Jmf4PAvbrgihqb1xs6QFejIt x2236b0W/dY5LgwVr78FegKaUGym/vd0OJ+GTbZLzLuPdmqdbNLQUQsbwXZnnJNYNJq9 V9UcnRNSKD5Z57S/Ex3/wnXntmI4ZUHLUUJWqvYdkyCASR1oNReqN137XXmWQjcHTmgC BAJByhKQALXHAj5H5asq5Kx/pupexYaW0j4lbffPTQ+3iv53RtZFjgsxKher0HA86inr 8li6b2D7tn9D1wtDbG/KsMoOifwESSGtOI6KXZPOGD5UrkMVmagGr/mjBkFd79jW6F2e X/dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697100142; x=1697704942; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=03caJXjSufDSpp1LCzfkdaxOovD/mkaKWVxj7ep2LYM=; b=GahTLgXjSkElVSd6UKTUSzbgpebR5WgUyGZ2WvVchFxh+rm3agu6/2DDhHVm9BTdNb UQMw+OqJVX6XZgH9eZc3JDmdfWB/7xEuhvFL7i70r61M0PlxeAtPB2e55wfjTecOuFmZ cu+SN6WhbEBoAvnV2oOi9FkSNtXqdXpdwVGdL7gsnmpat5PQq7rrbUIf5yGBROmuidhI Jyzixn2Ayau0E0/t0ACtNTRkwpONaquP+hdUF8r947jb4QXBRM6R6IhfD0oEOV5NZgmH QIaDzZgK/YobnRPslVmm7zvLRvk0iC0CH80zh0kgA1Qhw1Tz0/Xns/Dj2P/IjnX5Jvt2 w3iA== X-Gm-Message-State: AOJu0YzjTfmWWLcsFWREseP7KgQmd/sDnXU3BFQw3QFBWYjVPmwg1iI/ 0FogJchuTNEhr5q7xrZ44nru5qnJcyTukCXQaaY= X-Google-Smtp-Source: AGHT+IGyiE13u+90goadrYpSlfhtrNhC/1danmYF4SNIUpLQpIsVvq/soNja0FMCX5smGZ5yokohjw== X-Received: by 2002:a05:6512:220b:b0:500:a66b:b189 with SMTP id h11-20020a056512220b00b00500a66bb189mr24720213lfu.51.1697100141922; Thu, 12 Oct 2023 01:42:21 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id o9-20020a05651238a900b00501c8959f6asm2705043lft.98.2023.10.12.01.42.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 01:42:21 -0700 (PDT) From: Linus Walleij Date: Thu, 12 Oct 2023 10:42:18 +0200 Subject: [PATCH v3 03/10] kernel: Add kmod-rtc-x1205 MIME-Version: 1.0 Message-Id: <20231012-ixp4xx-v3-3-e09c74712c0b@linaro.org> References: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> In-Reply-To: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> To: Imre Kaloz , Krzysztof Halasa , Howard Harte , openwrt-devel@lists.openwrt.org X-Mailer: b4 0.12.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231012_014226_448011_D966FCCF X-CRM114-Status: UNSURE ( 8.58 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: To support the IXP42x platforms we need a kernel module for the X1205 RTC so we can load it as an optional module. Signed-off-by: Linus Walleij --- ChangeLog v1->v3: - Use autoprobe, exclude from preinit. --- package/kernel/linux/modules/other.mk | 16 ++++++++++++++++ 1 file changed, 16 [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:232 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hauke Mehrtens , Linus Walleij , Raylynn Knight Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org To support the IXP42x platforms we need a kernel module for the X1205 RTC so we can load it as an optional module. Signed-off-by: Linus Walleij Reviewed-by: Robert Marko --- ChangeLog v1->v3: - Use autoprobe, exclude from preinit. --- package/kernel/linux/modules/other.mk | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index ac26c2a15037..2cd01d84d516 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -780,6 +780,22 @@ endef $(eval $(call KernelPackage,rtc-s35390a)) +define KernelPackage/rtc-x1205 + SUBMENU:=$(OTHER_MENU) + TITLE:=Xicor Intersil X1205 + DEFAULT:=m if ALL_KMODS && RTC_SUPPORT + DEPENDS:=+kmod-i2c-core + KCONFIG:=CONFIG_RTC_DRV_X1205 \ + CONFIG_RTC_CLASS=y + FILES:=$(LINUX_DIR)/drivers/rtc/rtc-x1205.ko + AUTOLOAD:=$(call AutoProbe,rtc-x1205) +endef + +define KernelPackage/rtc-x1205/description + Kernel module for Xicor Intersil X1205 I2C RTC chip +endef + +$(eval $(call KernelPackage,rtc-x1205)) define KernelPackage/mtdtests SUBMENU:=$(OTHER_MENU) From patchwork Thu Oct 12 08:42:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1847318 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=fQnyLTTg; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=G7+ZnIl3; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S5jrC5m7nz23jX for ; Thu, 12 Oct 2023 19:44:59 +1100 (AEDT) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:In-Reply-To:References:Message-Id: MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VBw8KR33xJm0jm7PTDVnm03nNqOGiFTwX79G4pOeHOI=; b=fQnyLTTgnpjNPU gQH1sPWnZJdpB2p41knr2ldsHmdykognfGCBCtSFSbUiqMDvN8CIPm9kAPGPyy1hzJSvVmAER16kC kjvK1FWn10410CtuA79cytJjzlZgSBugwm9udBS+qTyzuf6jJdMk4Am5HDW0eVeDZWLXQU9Srw9gM 7AeHzyfdubr66bexOenJZ2YQVpiHwaffeHVzjiMjg2HG/WOCTEPznacurlWkDUyqc+35h2qHKLwCC EK+DpCk3gYckEJ5CL+sQV8EMNFChQuMXGgZhoY7op/bo6LU7taaa2iTTpOXWXslGW5z5APF1y1zHn +X8Ll0QmGSSZv4JWc/Ow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqrHE-000E6l-1J; Thu, 12 Oct 2023 08:42:40 +0000 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqrGz-000Dvg-1r for openwrt-devel@lists.openwrt.org; Thu, 12 Oct 2023 08:42:28 +0000 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-503397ee920so928621e87.1 for ; Thu, 12 Oct 2023 01:42:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697100143; x=1697704943; darn=lists.openwrt.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Lr62bwlrYG40uVL1DURpMK5oHschff/MYZAZ/+IB6ms=; b=G7+ZnIl3KG/sfzHQOWJehXpy2So6Vmw8sCBQCgbfrrfMZVkUSBbk2junvnDCzaiGwT IScCJP3bFrq64PRhJLY6aiwottlNxNBtdWJB0RfLHmXJlThu5/gxYm0JJB+58VgbUBki Krskv0nq1CDod7TXbq4LoRb2csif2HusFiHPySx+ndaCEWQPv6qtYgZlAru85ip2BMqk svDtTrxS3hQJEn/xDl+gVW2iPNNB9OSRj0jOamndRae1J+iVzn1gRvTODNAZfsCcHLFT J5Jb4PRPhrl5FO+2JcHoBd2tH8NmNXjIV0xNnJtWxHt8wtxn5n5WHlYX5aUL2p+PBVgY 9e5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697100143; x=1697704943; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Lr62bwlrYG40uVL1DURpMK5oHschff/MYZAZ/+IB6ms=; b=IsM/NPjEAMRA29ZSsjlKMQGFtBzhJjyYiOi0qmEb58v6+KvF2M2eTAuUUQoXW564dX 0L3oihkvK5BOrUmryMiU/fCB316VgqbQeGmrHwPqYMpDymUHBH4BgGePk4LhW81JA+N8 dUpNG5ZN83ScJdLgHvGweUDCkXRFOQPRVRLijL8gH3tfzYSvDP/mRq5+mDVQT6qeTsRO B8YKeGdtVdfRAoMOP4H4E+rLbcU3jzjJrZot6ZdL7FrHoVqhE5CF+J7ZW3M0OV9T62fY aIJvpbQdqTdvsuvgWCGSxMYS9K9jWDkyDwPaPdAOlifcu5UpSt95HjLiekmDdUdOZtmr NCYA== X-Gm-Message-State: AOJu0YywXdq0qViDu12/T3L6MMTqeeLBiJo0h2CEVCkNQrasC3v7aK+g 1cpvY6NpxAJGKpO3c8HcCxtBlB20G6x4URG2Br0= X-Google-Smtp-Source: AGHT+IG+5xKF6+uVaXC/MbbUv28GecVCbw6+wF9CYi/Q2+g26jAY7n0+XZpwN4gDbxE7lHrZEvARUA== X-Received: by 2002:a05:6512:4026:b0:500:94c5:6e06 with SMTP id br38-20020a056512402600b0050094c56e06mr26160693lfb.56.1697100142850; Thu, 12 Oct 2023 01:42:22 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id o9-20020a05651238a900b00501c8959f6asm2705043lft.98.2023.10.12.01.42.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 01:42:22 -0700 (PDT) From: Linus Walleij Date: Thu, 12 Oct 2023 10:42:19 +0200 Subject: [PATCH v3 04/10] kernel: Add kmod-rtc-r7301 MIME-Version: 1.0 Message-Id: <20231012-ixp4xx-v3-4-e09c74712c0b@linaro.org> References: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> In-Reply-To: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> To: Imre Kaloz , Krzysztof Halasa , Howard Harte , openwrt-devel@lists.openwrt.org X-Mailer: b4 0.12.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231012_014225_761281_B1311196 X-CRM114-Status: UNSURE ( 8.33 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: To support the IXP42x platforms we need a kernel module for the Epson R7301 RTC so we can load it as an optional module. Signed-off-by: Linus Walleij --- ChangeLog v1->v3: - Use AutoProbe, drop preinit hook. --- package/kernel/linux/modules/other.mk | 15 +++++++++++++++ 1 file changed, 15 inse [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:133 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hauke Mehrtens , Linus Walleij , Raylynn Knight Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org To support the IXP42x platforms we need a kernel module for the Epson R7301 RTC so we can load it as an optional module. Signed-off-by: Linus Walleij Reviewed-by: Robert Marko --- ChangeLog v1->v3: - Use AutoProbe, drop preinit hook. --- package/kernel/linux/modules/other.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index 2cd01d84d516..feee39602db9 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -728,6 +728,21 @@ endef $(eval $(call KernelPackage,rtc-pcf2127)) +define KernelPackage/rtc-r7301 + SUBMENU:=$(OTHER_MENU) + TITLE:=Epson RTC7301 support + DEFAULT:=m if ALL_KMODS && RTC_SUPPORT + KCONFIG:=CONFIG_RTC_DRV_R7301 \ + CONFIG_RTC_CLASS=y + FILES:=$(LINUX_DIR)/drivers/rtc/rtc-r7301.ko + AUTOLOAD:=$(call AutoProbe,rtc-r7301) +endef + +define KernelPackage/rtc-r7301/description + Kernel module for Epson RTC7301 RTC chip +endef + +$(eval $(call KernelPackage,rtc-r7301)) define KernelPackage/rtc-rs5c372a SUBMENU:=$(OTHER_MENU) From patchwork Thu Oct 12 08:42:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1847310 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Gdaso90u; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Y70w/min; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S5jqm1mcZz23jX for ; Thu, 12 Oct 2023 19:44:36 +1100 (AEDT) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:In-Reply-To:References:Message-Id: MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FqqYTsfXPqawqEcBzZePSBfk5AxXZm7YYDnWNJcY0QI=; b=Gdaso90us5POzq V4T6g8Sr4kljMs/rdiwDe2wJPHb5w2yxDpSq0BkUqA4/dRKXJPDPPCLS4+IBmueeMsAAbxn0AYRU7 Sxg4/kF+CdmF2PxuLjOy4kejvKAU/TPy7pEv3txB5B5wsdFv1X7Xm2xAjqsPjlxp4T85XXNAXVvE8 0VKnkd19i0GABzzOKKoZLS+EJo+RtjTR7Ct8cC97u53JABj8mgpRT7dZnjrq6ABXBw5zdwpV1RvFW nwGXIF4JuJMY1spesnO2C5usXrQMMl3HtOGiz/d4ylb+4WDbqXj1J5eDW77ZDZSAXKuHrkON2ZUXj wHqY/2FuYTXGlmWsg5ng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqrHL-000EAU-0b; Thu, 12 Oct 2023 08:42:47 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqrH1-000DwO-2s for openwrt-devel@lists.openwrt.org; Thu, 12 Oct 2023 08:42:29 +0000 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-5041d6d8b10so1002498e87.2 for ; Thu, 12 Oct 2023 01:42:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697100143; x=1697704943; darn=lists.openwrt.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=mcE13Ce418LD+u+aB0WS8AI49gIbE+kBj/n7tBfU4XA=; b=Y70w/minuI9LvHGgRBMlS9Mn/y5MN3Vkf8P1v3d6qYWHuFo7ugNtpoemILfjiKPgV7 6shSWVy0VjXTCz4YckiNkYuIoUjA11XJ8nTCiqHvv2+tWqloxUDWlkXOCeWP3IKwgj12 GwWi3seDuljbWFV++GLo2vpBJY0kNyIKUvQWFEJVDQKqIcoFcqdTTEZvMUVVcp5G8AAE vhWrMQWTZ9gQP+QNRJ5TyiW0Iw/FDdgtZa5aOEpt9xT2je6gTbsn+4zxRe0dl2nvyTbk NBnU3fyoPMJ8Ii0uRqMzbB6stLsZAaDBWy/KYkKpD4chhKTofIuht8u/efwXm/h5p/JJ tpgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697100143; x=1697704943; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mcE13Ce418LD+u+aB0WS8AI49gIbE+kBj/n7tBfU4XA=; b=e8NEJZ1iCVElvnq0uQbGvtQAzzLh8oM9E4mtjeINfHYxde0ISWyDnhufLsEj5d5x0f LYCZ3n4Iw9JYRpVtgnIiC2wmjiCRdBQjrP3JMc8fMqtsnC1CY/t8OYfq/NmjUzNtTS0i wcypTGkjlJ45UJy/Xi1aolNkhG6Bnxksd6yBRlHtrkIcNnSx+8hSWXHgWfN3VNxP9yMM A/kuXlD8Su7jUi5f4LySDdVGPV4McKMe4wzY3VqxfnBkeVeSFHVm4yScsHAoAUOvPdmR rWNg4aRxKo8gtd+DJsJp49GE+ZtlNo02ucrj491o6b5/nOrSbSRCqbHrKM2NWk6F7T03 LM6g== X-Gm-Message-State: AOJu0YzL2JsFa4Dg7G5IEILrd5/Vze79JBhHMnNPT0tajERd13ZSxnlZ PPX/wHiQZzdYMQZFYXPDDTI8UxFGbHhmpRkvtmA= X-Google-Smtp-Source: AGHT+IH+bvE2BiAOhXRj0rVHP+bkQtrJgS50tSaZvQlkc9qybVGoP6xmoKFR7rh442yKXQzIEgQXPw== X-Received: by 2002:a19:2d18:0:b0:500:b8bc:bd9a with SMTP id k24-20020a192d18000000b00500b8bcbd9amr16656365lfj.49.1697100143676; Thu, 12 Oct 2023 01:42:23 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id o9-20020a05651238a900b00501c8959f6asm2705043lft.98.2023.10.12.01.42.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 01:42:23 -0700 (PDT) From: Linus Walleij Date: Thu, 12 Oct 2023 10:42:20 +0200 Subject: [PATCH v3 05/10] kernel: netdevices: Package AMD PHY MIME-Version: 1.0 Message-Id: <20231012-ixp4xx-v3-5-e09c74712c0b@linaro.org> References: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> In-Reply-To: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> To: Imre Kaloz , Krzysztof Halasa , Howard Harte , openwrt-devel@lists.openwrt.org X-Mailer: b4 0.12.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231012_014227_935148_E2ABB1A1 X-CRM114-Status: UNSURE ( 7.75 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This adds a package for the AMD and Altima PHY, found in some odd devices. Signed-off-by: Linus Walleij --- package/kernel/linux/modules/netdevices.mk | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:12e listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hauke Mehrtens , Linus Walleij , Raylynn Knight Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This adds a package for the AMD and Altima PHY, found in some odd devices. Signed-off-by: Linus Walleij Reviewed-by: Robert Marko --- package/kernel/linux/modules/netdevices.mk | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index b0d69e022069..392bc176f491 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -224,6 +224,22 @@ endef $(eval $(call KernelPackage,phylib-broadcom)) +define KernelPackage/phy-amd + SUBMENU:=$(NETWORK_DEVICES_MENU) + TITLE:=AMD PHY driver + KCONFIG:=CONFIG_AMD_PHY + DEPENDS:=+kmod-libphy + FILES:=$(LINUX_DIR)/drivers/net/phy/amd.ko + AUTOLOAD:=$(call AutoProbe,amd) +endef + +define KernelPackage/phy-amd/description + Currently supports the AMD and Altima PHYs. +endef + +$(eval $(call KernelPackage,phy-amd)) + + define KernelPackage/phy-ax88796b SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=Asix PHY driver From patchwork Thu Oct 12 08:42:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1847316 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=cM9rgPvZ; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ZL74U1tu; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S5jr50CNdz23jX for ; Thu, 12 Oct 2023 19:44:53 +1100 (AEDT) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:In-Reply-To:References:Message-Id: MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=J8EosvCJixrL60p89vqx8AMRm5jfq+04p9sYIPh5cbQ=; b=cM9rgPvZvV3eZh IrLxWNzsQ9lCLmSHXxVwEdvlrTPZ3l2D2RJnNzl6V8f7aCvt1senwVxnZkTanN0Cia+UzhTdwIEfN E2e7pyQGWOdY5RmfBj/uO8hLspGvykRXm9QGcexnOOu4lFGHs1UXzeOdqr85lhCGQGkzUy+YgXTai /QSRqxNwSQCQiSCwQCT/eN6/HuxpqtB+N/9i4o4EweMfbDzS0lgvnJiVelAsp1zUqCgydS1VVcIci yqPv0/yuYKdRU/VRz7G2pJJJBAnNEJLLWsHMFtL77KHLx3ieApXKV2nvWWAzK7u8UUkv9gWcwPk4l B0Ma8Whh6QExtKG5W7ZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqrHI-000E9N-26; Thu, 12 Oct 2023 08:42:44 +0000 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqrH0-000DxD-1j for openwrt-devel@lists.openwrt.org; Thu, 12 Oct 2023 08:42:29 +0000 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2b9338e4695so8728051fa.2 for ; Thu, 12 Oct 2023 01:42:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697100145; x=1697704945; darn=lists.openwrt.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=WlSbvC6ND7pSpu4alWLP3U/SYaXlr0oGp/2Iv7V/Pac=; b=ZL74U1tuuLspPeN6kSaXaSppRovmIJax8DIUb0yKs8yrHF2zIe7bfb+VOaWFlgqfXg 2C4xfBmgxTUPOF9lGkQ51WHipwPGSR1vBouYp5Jbv3h02EuicfrVEYz+Lm8eDhGGoLEs W3Nkg3lObuPz6UmGo+1HImkfklkAlEfaX4Iae9bddqlI/DmZyIvCiyWsFsU2/LqRCqrE Xg+IXZROT/mKT5UJXGN1+1MpeFaHMjl3jOYQ1TYRzVihz8ht8gXF86xmO7MyckKUQjQT ZkDyhi8iapAqi+iWedg1xM5pTBtg+m9gV23T5cH0Rdy0/JcW99g01Qxg0dlc5QMZtWnh +vBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697100145; x=1697704945; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WlSbvC6ND7pSpu4alWLP3U/SYaXlr0oGp/2Iv7V/Pac=; b=wExVjaCcSV4LCvuhBfeY8igDgnVFn6z1Z100hqp6X0S9VuPoKmKH0WKBnRCryQg2c/ CaXU02edGJFy1GcS+jAbzhdBSrs0IMUdwmmBofDbLo7MXOJb/rtHMbGuFmUdDghurkKN a+NTJeYEKn24YexXPCyyVv6K35h6GTnPDi95/s3ypaLTxrYm8TsGmDFveLztwEL98+iy so7Scvzk2u2lBFABxS67YEcXJv6E8fJwXKuPJtQYjwBFN9R4PDPWP5vJ92pQyaVwXJAl u99NVbU5qnNsPQJ6p+YANEcGWgaRsJ1LMxcjQYE+P+7/tpSmqtxsTfF9NgO9F+4cNthD aWQw== X-Gm-Message-State: AOJu0YxcuexrA0AZQ+ap4YfdiyMMXsczZCK9UqN7IMr2j+4tiCae68Nl YUyNkBe3DmGDyDMcq94ZRxLAUSO9lJdTFown+7I= X-Google-Smtp-Source: AGHT+IE3avik2u6t4DuglFMVBBpADfLFW6FanQZ1ZkjVSO9eZ8d3jC5Dz9TzbG538ECttwj9Y8cS5A== X-Received: by 2002:a05:6512:ea0:b0:506:8e27:7ce9 with SMTP id bi32-20020a0565120ea000b005068e277ce9mr14862092lfb.16.1697100144714; Thu, 12 Oct 2023 01:42:24 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id o9-20020a05651238a900b00501c8959f6asm2705043lft.98.2023.10.12.01.42.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 01:42:24 -0700 (PDT) From: Linus Walleij Date: Thu, 12 Oct 2023 10:42:21 +0200 Subject: [PATCH v3 06/10] firmware: Resurrect the ixp4xx microcode package MIME-Version: 1.0 Message-Id: <20231012-ixp4xx-v3-6-e09c74712c0b@linaro.org> References: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> In-Reply-To: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> To: Imre Kaloz , Krzysztof Halasa , Howard Harte , openwrt-devel@lists.openwrt.org X-Mailer: b4 0.12.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231012_014226_663774_F563BEF6 X-CRM114-Status: GOOD ( 22.15 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The firmware package for the IXP4xx microcode was deleted but the source files are still in the file cache so we can easily resurrect it. The firmware either supports ethernet (the most common) or WAN (less common), image targets select the firmware they want depending on usecase. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:232 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hauke Mehrtens , Linus Walleij , Raylynn Knight Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The firmware package for the IXP4xx microcode was deleted but the source files are still in the file cache so we can easily resurrect it. The firmware either supports ethernet (the most common) or WAN (less common), image targets select the firmware they want depending on usecase. Signed-off-by: Linus Walleij --- package/firmware/ixp4xx-microcode/Makefile | 77 +++++++++++ .../firmware/ixp4xx-microcode/src/IxNpeMicrocode.h | 148 +++++++++++++++++++++ package/firmware/ixp4xx-microcode/src/LICENSE.IPL | 27 ++++ 3 files changed, 252 insertions(+) diff --git a/package/firmware/ixp4xx-microcode/Makefile b/package/firmware/ixp4xx-microcode/Makefile new file mode 100644 index 000000000000..5ee04a757a2c --- /dev/null +++ b/package/firmware/ixp4xx-microcode/Makefile @@ -0,0 +1,77 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Copyright (C) 2007-2023 OpenWrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ixp4xx-microcode +PKG_VERSION:=2.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=IPL_ixp400NpeLibraryWithCrypto-2_4.zip +PKG_SOURCE_URL:=http://downloads.openwrt.org/sources +PKG_HASH:=1b1170d0657847248589d946048c0aeaa9cd671966fc5bec5933283309485eaa + +PKG_FLAGS:=nonshared + +include $(INCLUDE_DIR)/package.mk + +# Ethernet or WAN support, pick one +define Package/ixp4xx-microcode-ethernet + SECTION:=firmware + CATEGORY:=Firmware + TITLE:=IXP4xx ethernet firmware + DEPENDS:=@TARGET_ixp4xx +endef +define Package/ixp4xx-microcode-wan + SECTION:=firmware + CATEGORY:=Firmware + TITLE:=IXP4xx WAN firmware + DEPENDS:=@TARGET_ixp4xx +endef + +define Package/ixp4xx-microcode-ethernet/description + This package contains the microcode needed to use the network engines in + IXP4xx CPUs for ethernet on all three NPEs. +endef +define Package/ixp4xx-microcode-wan/description + This package contains the microcode needed to use the network engines in + IXP4xx CPUs for ethernet on NPE-A and NPE-B and WAN (HSS) on NPE-C. +endef + +define Build/Prepare + rm -rf $(PKG_BUILD_DIR) + mkdir -p $(PKG_BUILD_DIR) + unzip -d $(PKG_BUILD_DIR)/ $(DL_DIR)/$(PKG_SOURCE) + mv $(PKG_BUILD_DIR)/ixp400_xscale_sw/src/npeDl/IxNpeMicrocode.c $(PKG_BUILD_DIR)/ + rm -rf $(PKG_BUILD_DIR)/ixp400_xscale_sw + $(CP) ./src/* $(PKG_BUILD_DIR)/ +endef + +define Build/Compile + (cd $(PKG_BUILD_DIR); \ + $(HOSTCC) -Wall -I$(STAGING_DIR_HOST)/include IxNpeMicrocode.c -o IxNpeMicrocode; \ + ./IxNpeMicrocode -be \ + ) +endef + +define Package/ixp4xx-microcode-ethernet/install + $(INSTALL_DIR) $(1)/lib/firmware + $(INSTALL_DIR) $(1)/usr/share/doc + $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-A $(1)/lib/firmware/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-B $(1)/lib/firmware/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-C $(1)/lib/firmware/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE.IPL $(1)/usr/share/doc/ +endef +define Package/ixp4xx-microcode-wan/install + $(INSTALL_DIR) $(1)/lib/firmware + $(INSTALL_DIR) $(1)/usr/share/doc + $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-A-HSS $(1)/lib/firmware/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-B $(1)/lib/firmware/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-C $(1)/lib/firmware/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE.IPL $(1)/usr/share/doc/ +endef + + +$(eval $(call BuildPackage,ixp4xx-microcode-ethernet)) +$(eval $(call BuildPackage,ixp4xx-microcode-wan)) diff --git a/package/firmware/ixp4xx-microcode/src/IxNpeMicrocode.h b/package/firmware/ixp4xx-microcode/src/IxNpeMicrocode.h new file mode 100644 index 000000000000..4a843db104f9 --- /dev/null +++ b/package/firmware/ixp4xx-microcode/src/IxNpeMicrocode.h @@ -0,0 +1,148 @@ +/* + * IxNpeMicrocode.h - Headerfile for compiling the Intel microcode C file + * + * Copyright (C) 2006 Christian Hohnstaedt + * + * This file is released under the GPLv2 + * + * + * compile with + * + * gcc -Wall IxNpeMicrocode.c -o IxNpeMicrocode + * + * Executing the resulting binary on your build-host creates the + * "NPE-[ABC].xxxxxxxx" files containing the selected microcode + * + * fetch the IxNpeMicrocode.c from the Intel Access Library. + * It will include this header. + * + * select Images for every NPE from the following + * (used C++ comments for easy uncommenting ....) + */ + +// #define IX_NPEDL_NPEIMAGE_NPEA_ETH_SPAN_MASK_FIREWALL_VLAN_QOS_HDR_CONV_EXTMIB +// #define IX_NPEDL_NPEIMAGE_NPEA_ETH_SPAN_VLAN_QOS_HDR_CONV_EXTMIB +// #define IX_NPEDL_NPEIMAGE_NPEA_ETH_LEARN_FILTER_SPAN_MASK_FIREWALL_VLAN_QOS_EXTMIB +// #define IX_NPEDL_NPEIMAGE_NPEA_HSS_TSLOT_SWITCH +#define IX_NPEDL_NPEIMAGE_NPEA_ETH_SPAN_FIREWALL_VLAN_QOS_HDR_CONV +// #define IX_NPEDL_NPEIMAGE_NPEA_ETH_LEARN_FILTER_SPAN_FIREWALL_VLAN_QOS +// #define IX_NPEDL_NPEIMAGE_NPEA_ETH_LEARN_FILTER_SPAN_FIREWALL +#define IX_NPEDL_NPEIMAGE_NPEA_HSS_2_PORT +// #define IX_NPEDL_NPEIMAGE_NPEA_DMA +// #define IX_NPEDL_NPEIMAGE_NPEA_ATM_MPHY_12_PORT +// #define IX_NPEDL_NPEIMAGE_NPEA_HSS0_ATM_MPHY_1_PORT +// #define IX_NPEDL_NPEIMAGE_NPEA_HSS0_ATM_SPHY_1_PORT +// #define IX_NPEDL_NPEIMAGE_NPEA_HSS0 +// #define IX_NPEDL_NPEIMAGE_NPEA_WEP + + +// #define IX_NPEDL_NPEIMAGE_NPEB_ETH_SPAN_MASK_FIREWALL_VLAN_QOS_HDR_CONV_EXTMIB +// #define IX_NPEDL_NPEIMAGE_NPEB_ETH_SPAN_VLAN_QOS_HDR_CONV_EXTMIB +// #define IX_NPEDL_NPEIMAGE_NPEB_ETH_LEARN_FILTER_SPAN_MASK_FIREWALL_VLAN_QOS_EXTMIB +// #define IX_NPEDL_NPEIMAGE_NPEB_DMA +#define IX_NPEDL_NPEIMAGE_NPEB_ETH_SPAN_FIREWALL_VLAN_QOS_HDR_CONV +// #define IX_NPEDL_NPEIMAGE_NPEB_ETH_LEARN_FILTER_SPAN_FIREWALL_VLAN_QOS +// #define IX_NPEDL_NPEIMAGE_NPEB_ETH_LEARN_FILTER_SPAN_FIREWALL + + +// #define IX_NPEDL_NPEIMAGE_NPEC_ETH_SPAN_MASK_FIREWALL_VLAN_QOS_HDR_CONV_EXTMIB +// #define IX_NPEDL_NPEIMAGE_NPEC_ETH_SPAN_VLAN_QOS_HDR_CONV_EXTMIB +// #define IX_NPEDL_NPEIMAGE_NPEC_ETH_LEARN_FILTER_SPAN_MASK_FIREWALL_VLAN_QOS_EXTMIB +// #define IX_NPEDL_NPEIMAGE_NPEC_DMA +// #define IX_NPEDL_NPEIMAGE_NPEC_CRYPTO_AES_ETH_LEARN_FILTER_SPAN +// #define IX_NPEDL_NPEIMAGE_NPEC_CRYPTO_AES_ETH_LEARN_FILTER_FIREWALL +#define IX_NPEDL_NPEIMAGE_NPEC_CRYPTO_AES_CCM_ETH +// #define IX_NPEDL_NPEIMAGE_NPEC_CRYPTO_AES_CCM_EXTSHA_ETH +// #define IX_NPEDL_NPEIMAGE_NPEC_CRYPTO_ETH_LEARN_FILTER_SPAN_FIREWALL +// #define IX_NPEDL_NPEIMAGE_NPEC_ETH_SPAN_FIREWALL_VLAN_QOS_HDR_CONV +// #define IX_NPEDL_NPEIMAGE_NPEC_ETH_LEARN_FILTER_SPAN_FIREWALL_VLAN_QOS +// #define IX_NPEDL_NPEIMAGE_NPEC_ETH_LEARN_FILTER_SPAN_FIREWALL + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define to_le32(x) (x) +#define to_be32(x) bswap_32(x) +#else +#define to_be32(x) (x) +#define to_le32(x) bswap_32(x) +#endif + +struct dl_image { + unsigned magic; + unsigned id; + unsigned size; + unsigned data[0]; +}; + +const unsigned IxNpeMicrocode_array[]; + +int main(int argc, char *argv[]) +{ + struct dl_image *image = (struct dl_image *)IxNpeMicrocode_array; + int imgsiz, i, fd, cnt; + const unsigned *arrayptr = IxNpeMicrocode_array; + const char *names[] = { "IXP425", "IXP465", "unknown" }; + int bigendian = 1; + + if (argc > 1) { + if (!strcmp(argv[1], "-le")) + bigendian = 0; + else if (!strcmp(argv[1], "-be")) + bigendian = 1; + else { + printf("Usage: %s <-le|-be>\n", argv[0]); + return EXIT_FAILURE; + } + } + + for (image = (struct dl_image *)arrayptr, cnt=0; + (image->id != 0xfeedf00d) && (image->magic == 0xfeedf00d); + image = (struct dl_image *)(arrayptr), cnt++) + { + unsigned char field[4]; + imgsiz = image->size + 3; + *(unsigned*)field = to_be32(image->id); + char filename[40], slnk[10]; + + sprintf(filename, "NPE-%c.%08x", (field[0] & 0xf) + 'A', + image->id); + if (image->id == 0x00090000) + sprintf(slnk, "NPE-%c-HSS", (field[0] & 0xf) + 'A'); + else + sprintf(slnk, "NPE-%c", (field[0] & 0xf) + 'A'); + + printf("Writing image: %s.NPE_%c Func: %2x Rev: %02x.%02x " + "Size: %5d to: '%s'\n", + names[field[0] >> 4], (field[0] & 0xf) + 'A', + field[1], field[2], field[3], imgsiz*4, filename); + fd = open(filename, O_CREAT | O_RDWR | O_TRUNC, 0644); + if (fd >= 0) { + for (i=0; i X-Patchwork-Id: 1847320 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=ktm4xhFp; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=K6MDOWg+; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S5jrL2lHLz1yqj for ; Thu, 12 Oct 2023 19:45:06 +1100 (AEDT) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:In-Reply-To:References:Message-Id: MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=S2tXyKuSn2Y6ipYLfWSnQ5Q5aJZCjxcr1IhXhFJ6VXM=; b=ktm4xhFpV7lVtF HboztszIBHRjurzr3LEqR5LBaRYNF2yLmEtseBj/TgKfd8lURXLSPQg93mSoxhc0nb57mdVmYeooP 8kAcdOYgQ08ekegVwL/Nfirh2gzAYuqPyXWTS2QLwY4pt6twOO4mPITLZGOuJKbF+Dgr01kUgbmdf CEOT3EwEl9qlkNzymGVBmZuiXyAthrGDlFFEhbtts/eMOfj97g5WrSnrqBKL/dVB8kSjQpVT01Avl suM5kvGm+4ta3NCDVlbG6JtQnwlDweu+vrRtWKcp7k/G8ILv+iIOT7GE8MXGr0Mo83UWe+IDVd+6t +gAtYOZcMJZQXtfsguaQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqrHO-000EDM-1p; Thu, 12 Oct 2023 08:42:50 +0000 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqrH2-000DyY-0I for openwrt-devel@lists.openwrt.org; Thu, 12 Oct 2023 08:42:31 +0000 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2bfed7c4e6dso8077691fa.1 for ; Thu, 12 Oct 2023 01:42:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697100146; x=1697704946; darn=lists.openwrt.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=oMWEBNNRpWKSXizqsheAqvDnSVNakVoGSeQ4Qlcj27c=; b=K6MDOWg+E8xQaQ3KYiMz9pwND6rQj2sVWkA/wf0NmiJdle5jVpa7uVgDW9YJYv/3VP oTC7hpuXYdfbVmIOOvi+jX7N1qGJU3lwVqv2RF/krX2kiiMMfBeLhgSL5hrCg7bdQo0A HtPTFWJe0qbRELY8ZNiVCZNXvoAnRfKxaWPT+CglHzE53kPqspmL2vIxPK5Sg8DKwGv2 JfxaKtqPlc6XSEzZBBI/c/SS7KhTo8nUyYu5EA2w5Nw9fq3gdYaocHvKi41MZYRjP3eJ za0GfrqWsXqKcj+plD5MRQ8RCHxnPQf9rjQ7Spqj9zzI91F8+HT2n7nbIXQau9ivvODQ 4TPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697100146; x=1697704946; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oMWEBNNRpWKSXizqsheAqvDnSVNakVoGSeQ4Qlcj27c=; b=vmZdzBiz1h91kUcHoVqyaP7N7BLzOAOPWr5w1K2K4OJQ4ac44bH/pAAyBCa0Z2XFiV z8yY6my8mA3DnolKNwmE+yNwUW0mizHXLcbnJ3KUQdxviEcqK3pd8aGndAzeqYdaz6u+ 0YubRpve52xOygcw56DDiVAdTjjteTX2+gn9YHZZ1FDmYs2tUFIUqGTwj+zVKxJfejvf TgKh7kFBsmmtKStmVFHkI6w+RV9OWdBGT5Hu6IaEXmg71lgWpOkteBHcvYbWot1+56pO uBMcNh/v1TXfcK3NZHPzbxdPbOrc1R0srx+I0MV0YibnMIGrBM9GGXwJmwBLMxvAmbUz XAfA== X-Gm-Message-State: AOJu0YwyX3Wa1w/52aDvlKQBB9233mpOYQyYVnDi3DknuNirnefCkGyn 7h0tYMcOQMntCzf23lLMf9VtnTsme4PpyhQAqwg= X-Google-Smtp-Source: AGHT+IFg3jvbtJXvZA6U41xQzRzOXnln+J70hA+8LkOTDdRE7I4/C9UlW0FwFA6nnLQkzApN3O19QQ== X-Received: by 2002:ac2:5d31:0:b0:503:778:9ad2 with SMTP id i17-20020ac25d31000000b0050307789ad2mr17577396lfb.19.1697100145770; Thu, 12 Oct 2023 01:42:25 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id o9-20020a05651238a900b00501c8959f6asm2705043lft.98.2023.10.12.01.42.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 01:42:25 -0700 (PDT) From: Linus Walleij Date: Thu, 12 Oct 2023 10:42:22 +0200 Subject: [PATCH v3 07/10] ixp4xx: Resurrect IXP4xx support using device tree MIME-Version: 1.0 Message-Id: <20231012-ixp4xx-v3-7-e09c74712c0b@linaro.org> References: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> In-Reply-To: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> To: Imre Kaloz , Krzysztof Halasa , Howard Harte , openwrt-devel@lists.openwrt.org X-Mailer: b4 0.12.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231012_014228_169806_736EE482 X-CRM114-Status: GOOD ( 24.49 ) X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This resurrects the support for IXP4xx using device tree rather than the old (deleted) board files. The final pieces of IXP4xx board files were deleted in Linux v5.19. Ext4 root filesystems on CF and USB are supported by the default config. Content analysis details: (1.5 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.7 URIBL_BLACK Contains an URL listed in the URIBL blacklist [URIs: system.sh] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:22b listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hauke Mehrtens , Linus Walleij , Raylynn Knight Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This resurrects the support for IXP4xx using device tree rather than the old (deleted) board files. The final pieces of IXP4xx board files were deleted in Linux v5.19. Ext4 root filesystems on CF and USB are supported by the default config. We support these three initial targets: - The Gateworks Avila GW2348 reference design has 64MB of RAM and 32MB of flash and also supports USB and CompactFlash. - The Gateworks Cambria GW2358 reference design has 128MB of RAM and 32MB of flash and also supports USB and CompactFlash. - The old and stable Linksys NSLU2 works fine as well, albeit it only has 32MB of RAM so it has been marked as non-default. The 8MB of flash can only fit the kernel, so it has been patched to boot from exteral media on USB. I have used it successfully as a NAS with ksmbd and LUCI web API, see: https://dflund.se/~triad/krad/ixp4xx/ Signed-off-by: Howard Harte Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Don't add the apex package on the NSLU2, the dependency is resolved in the other direction, apex should only build itself for the targets that need it. - Alter the path for the apex binaries slightly. - Split out resurrection of the microcode package to its own patch. - Use only the ip command and not both ip and ifconfig in the MAC setup script. - Drop unsupported device from the MAC setup script. - Name devices with device tuples like gateworks_avila. - Fix name confusion Gateway -> Gateworks. ChangeLog v1->v2: - Have NSLU2 select the apex boot loader instead of having it default built for all targets. - SPDX header for the microcode package. - Set microcode package version back to 1. - Split the microcode firmware package in two, one for just regular ethernet, one for WAN/HSS and select the right package for each device, ridding us one useless firmware file per device. - Cleanup Kconfig using make kernel_oldconfig. - Remove several surplus kernel Kconfig options, some pointless 8250 extensions for example. - Drop all the RTCs from the Kconfig and use the corresponding kernel modules for each device instead, saving space. - Drop all the HWMON drivers from the Kconfig and use the corresponding kernel modules for each device instead. - Use a kernel module for EEPROM access on Gateworks devices. - Fold in an ethernet numbering fix from Howard Harte - Activate Marvell MV88E6060 DSA switch as used by USRobotics USR8200. --- target/linux/ixp4xx/Makefile | 27 +++ .../linux/ixp4xx/base-files/etc/board.d/02_network | 21 ++ .../base-files/lib/preinit/05_set_ether_mac_ixp4xx | 38 ++++ target/linux/ixp4xx/config-6.1 | 252 +++++++++++++++++++++ target/linux/ixp4xx/image/Makefile | 77 +++++++ ...01-mtd-cfi_cmdset_0001-Byte-swap-OTP-info.patch | 74 ++++++ ...-ARM-dts-ixp4xx-Boot-NSLU2-from-harddrive.patch | 24 ++ 7 files changed, 513 insertions(+) diff --git a/target/linux/ixp4xx/Makefile b/target/linux/ixp4xx/Makefile new file mode 100644 index 000000000000..89a1b2407bfe --- /dev/null +++ b/target/linux/ixp4xx/Makefile @@ -0,0 +1,27 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Copyright (C) 2006-2023 OpenWrt.org + +include $(TOPDIR)/rules.mk + +ARCH:=armeb +BOARD:=ixp4xx +BOARDNAME:=Intel XScale IXP4xx +FEATURES:=dt squashfs gpio +CPU_TYPE:=xscale + +KERNEL_PATCHVER:=6.1 + +define Target/Description + Build firmware images for the IXP4xx XScale CPU +endef + +KERNELNAME:=zImage dtbs + +include $(INCLUDE_DIR)/target.mk + +DEFAULT_PACKAGES += fconfig \ + kmod-usb-ledtrig-usbport \ + kmod-leds-gpio + +$(eval $(call BuildTarget)) diff --git a/target/linux/ixp4xx/base-files/etc/board.d/02_network b/target/linux/ixp4xx/base-files/etc/board.d/02_network new file mode 100644 index 000000000000..45d7cbc75a4a --- /dev/null +++ b/target/linux/ixp4xx/base-files/etc/board.d/02_network @@ -0,0 +1,21 @@ +# SPDX-License-Identifier: GPL-2.0-only +. /lib/functions/uci-defaults.sh + +board_config_update + +case "$(board_name)" in +gateworks,gw2348|\ +gateworks,gw2358) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ;; +linksys,nslu2) + ucidef_set_interface_lan "eth0" "dhcp" + ;; +*) + ucidef_set_interface_lan "eth0" "dhcp" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/ixp4xx/base-files/lib/preinit/05_set_ether_mac_ixp4xx b/target/linux/ixp4xx/base-files/lib/preinit/05_set_ether_mac_ixp4xx new file mode 100644 index 000000000000..9e7ff4629830 --- /dev/null +++ b/target/linux/ixp4xx/base-files/lib/preinit/05_set_ether_mac_ixp4xx @@ -0,0 +1,38 @@ +#!/bin/sh +. /lib/functions.sh +. /lib/functions/system.sh + +set_from_redboot () { + for npe in eth0 eth1 eth2 + do + if ip link show dev $npe > /dev/null 2>&1; then + ip link set dev $npe address $(fconfig -s -r -d /dev/$1 -n npe_"$npe"_esa) + fi + done + + # Devices with MAC address set blank: set a dummy value. + if [ "$(ip link show dev eth0 2>/dev/null | grep -c 00:00:00:00:00:00)" = "1" ]; then + ip link set dev eth0 address 00:11:22:33:44:55 + fi + if [ "$(ip link show dev eth1 2>/dev/null | grep -c 00:00:00:00:00:00)" = "1" ]; then + ip link set dev eth0 address 00:11:22:33:44:56 + fi +} + +set_from_sysconf () { + ip link set dev eth0 address $(mtd_get_mac_ascii SysConf hw_addr) +} + +set_ether_mac () { + RBC="$(grep "RedBoot config" /proc/mtd | cut -d: -f1)" + if [ ! -z $RBC ] ; then + set_from_redboot $RBC + else + SYSC="$(grep "SysConf" /proc/mtd | cut -d: -f1)" + if [ ! -z $SYSC ] ; then + set_from_sysconf + fi + fi +} + +boot_hook_add preinit_main set_ether_mac diff --git a/target/linux/ixp4xx/config-6.1 b/target/linux/ixp4xx/config-6.1 new file mode 100644 index 000000000000..3b47385d6b8d --- /dev/null +++ b/target/linux/ixp4xx/config-6.1 @@ -0,0 +1,252 @@ +CONFIG_ALIGNMENT_TRAP=y +CONFIG_ARCH_32BIT_OFF_T=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_IXP4XX=y +CONFIG_ARCH_KEEP_MEMBLOCK=y +CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y +CONFIG_ARCH_MULTIPLATFORM=y +CONFIG_ARCH_MULTI_CPU_AUTO=y +# CONFIG_ARCH_MULTI_V4 is not set +# CONFIG_ARCH_MULTI_V4T is not set +CONFIG_ARCH_MULTI_V4_V5=y +CONFIG_ARCH_MULTI_V5=y +CONFIG_ARCH_NR_GPIO=0 +CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y +CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ARM=y +CONFIG_ARM_APPENDED_DTB=y +# CONFIG_ARM_ATAG_DTB_COMPAT is not set +CONFIG_ARM_HAS_GROUP_RELOCS=y +CONFIG_ARM_L1_CACHE_SHIFT=5 +CONFIG_ARM_PATCH_PHYS_VIRT=y +CONFIG_ARM_THUMB=y +CONFIG_ARM_UNWIND=y +CONFIG_ATA=y +CONFIG_ATAGS=y +CONFIG_AUTO_ZRELADDR=y +CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y +CONFIG_BLK_DEV_SD=y +CONFIG_BLK_MQ_PCI=y +CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y +CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5" +CONFIG_CC_NO_ARRAY_BOUNDS=y +CONFIG_CLKSRC_MMIO=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_COMMON_CLK=y +CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1 +CONFIG_COMPAT_32BIT_TIME=y +CONFIG_CPU_32v5=y +CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_BIG_ENDIAN=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y +CONFIG_CPU_ENDIAN_BE32=y +CONFIG_CPU_PABRT_LEGACY=y +CONFIG_CPU_THUMB_CAPABLE=y +CONFIG_CPU_TLB_V4WBI=y +CONFIG_CPU_USE_DOMAINS=y +CONFIG_CPU_XSCALE=y +CONFIG_CRC16=y +CONFIG_CRYPTO_AUTHENC=m +CONFIG_CRYPTO_CBC=m +CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_DES=m +CONFIG_CRYPTO_DEV_IXP4XX=m +CONFIG_CRYPTO_ECB=m +CONFIG_CRYPTO_HW=y +CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y +CONFIG_CRYPTO_LIB_DES=m +CONFIG_CRYPTO_LIB_SHA1=y +CONFIG_CRYPTO_LIB_UTILS=y +CONFIG_CRYPTO_RNG2=y +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_LL_INCLUDE="debug/8250.S" +CONFIG_DEBUG_UART_8250=y +CONFIG_DEBUG_UART_8250_SHIFT=2 +CONFIG_DEBUG_UART_PHYS=0xc8000003 +CONFIG_DEBUG_UART_VIRT=0xfec00003 +CONFIG_DMA_OPS=y +CONFIG_DTC=y +CONFIG_EDAC_ATOMIC_SCRUB=y +CONFIG_EDAC_SUPPORT=y +CONFIG_EXCLUSIVE_SYSTEM_RAM=y +CONFIG_EXT4_FS=y +# CONFIG_FARSYNC is not set +CONFIG_FIXED_PHY=y +CONFIG_FIX_EARLYCON_MEM=y +CONFIG_FORCE_PCI=y +CONFIG_FS_IOMAP=y +CONFIG_FS_MBCACHE=y +CONFIG_FWNODE_MDIO=y +CONFIG_FW_LOADER_PAGED_BUF=y +CONFIG_FW_LOADER_SYSFS=y +CONFIG_GCC11_NO_ARRAY_BOUNDS=y +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_GENERIC_ATOMIC64=y +CONFIG_GENERIC_BUG=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CPU_AUTOPROBE=y +CONFIG_GENERIC_EARLY_IOREMAP=y +CONFIG_GENERIC_IDLE_POLL_SETUP=y +CONFIG_GENERIC_IRQ_MULTI_HANDLER=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_IRQ_SHOW_LEVEL=y +CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_SCHED_CLOCK=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GLOB=y +CONFIG_GPIOLIB_IRQCHIP=y +CONFIG_GPIO_CDEV=y +CONFIG_GPIO_GENERIC=y +CONFIG_GPIO_GW_PLD=y +CONFIG_GPIO_IXP4XX=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_HAS_DMA=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT_MAP=y +CONFIG_HDLC=y +CONFIG_HWMON=y +CONFIG_HWMON_VID=y +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_IXP4XX=y +CONFIG_HZ_FIXED=0 +CONFIG_HZ_PERIODIC=y +CONFIG_I2C=y +CONFIG_I2C_ALGOBIT=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_GPIO=y +CONFIG_I2C_IOP3XX=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_INTEL_IXP4XX_EB=y +CONFIG_IRQCHIP=y +CONFIG_IRQSTACKS=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_DOMAIN_HIERARCHY=y +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_IRQ_WORK=y +# CONFIG_IWMMXT is not set +CONFIG_IXP4XX_ETH=y +CONFIG_IXP4XX_HSS=y +CONFIG_IXP4XX_IRQ=y +CONFIG_IXP4XX_NPE=y +CONFIG_IXP4XX_QMGR=y +CONFIG_IXP4XX_TIMER=y +CONFIG_IXP4XX_WATCHDOG=y +CONFIG_JBD2=y +CONFIG_LEDS_GPIO=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 +CONFIG_LIBFDT=y +CONFIG_LOCK_DEBUGGING_SUPPORT=y +CONFIG_MDIO_BUS=y +CONFIG_MDIO_DEVICE=y +CONFIG_MDIO_DEVRES=y +CONFIG_MEMFD_CREATE=y +CONFIG_MFD_SYSCON=y +CONFIG_MIGRATION=y +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_MTD_CFI_ADV_OPTIONS=y +# CONFIG_MTD_CFI_GEOMETRY is not set +CONFIG_MTD_OTP=y +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_PHYSMAP_IXP4XX=y +CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_SPLIT_FIRMWARE=y +CONFIG_MTD_SPLIT_FIRMWARE_NAME="linux" +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NEED_KUSER_HELPERS=y +CONFIG_NEED_PER_CPU_KM=y +CONFIG_NET_DSA=y +CONFIG_NET_DSA_MV88E6060=y +CONFIG_NET_PTP_CLASSIFY=y +CONFIG_NET_SELFTESTS=y +CONFIG_NET_VENDOR_XSCALE=y +CONFIG_NLS=y +CONFIG_NVMEM=y +CONFIG_NVMEM_SYSFS=y +CONFIG_OF=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_GPIO=y +CONFIG_OF_IRQ=y +CONFIG_OF_KOBJ=y +CONFIG_OF_MDIO=y +# CONFIG_OLD_SIGACTION is not set +# CONFIG_OLD_SIGSUSPEND3 is not set +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_PAGE_POOL=y +CONFIG_PAGE_SIZE_LESS_THAN_256KB=y +CONFIG_PAGE_SIZE_LESS_THAN_64KB=y +CONFIG_PATA_IXP4XX_CF=y +CONFIG_PCI=y +CONFIG_PCI_DOMAINS=y +CONFIG_PCI_DOMAINS_GENERIC=y +CONFIG_PCI_IXP4XX=y +CONFIG_PERF_USE_VMALLOC=y +CONFIG_PGTABLE_LEVELS=2 +CONFIG_PHYLIB=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_GPIO=y +CONFIG_PREEMPT_NONE_BUILD=y +CONFIG_PTP_1588_CLOCK_OPTIONAL=y +CONFIG_RANDSTRUCT_NONE=y +CONFIG_RATIONAL=y +CONFIG_REALTEK_PHY=y +CONFIG_REGMAP=y +CONFIG_REGMAP_I2C=y +CONFIG_REGMAP_MMIO=y +CONFIG_RUST_IS_AVAILABLE=y +CONFIG_SCSI=y +CONFIG_SCSI_COMMON=y +# CONFIG_SERIAL_8250_EXAR is not set +# CONFIG_SERIAL_8250_FSL is not set +# CONFIG_SERIAL_8250_PCI is not set +# CONFIG_SERIAL_8250_PERICOM is not set +CONFIG_SERIAL_MCTRL_GPIO=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_SG_POOL=y +CONFIG_SOFTIRQ_ON_OWN_STACK=y +CONFIG_SPARSE_IRQ=y +CONFIG_SPLIT_PTLOCK_CPUS=999999 +CONFIG_SRCU=y +CONFIG_SWPHY=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_THREAD_INFO_IN_TASK=y +CONFIG_TICK_CPU_ACCOUNTING=y +CONFIG_TIMER_OF=y +CONFIG_TIMER_PROBE=y +CONFIG_TINY_SRCU=y +CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +CONFIG_UNWINDER_ARM=y +CONFIG_USB=y +CONFIG_USB_COMMON=y +CONFIG_USB_EHCI_BIG_ENDIAN_DESC=y +CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_HCD_PLATFORM=y +CONFIG_USB_EHCI_PCI=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_HCD_PCI=y +# CONFIG_USB_OHCI_HCD_PLATFORM is not set +CONFIG_USB_PCI=y +CONFIG_USB_STORAGE=y +CONFIG_USB_SUPPORT=y +CONFIG_USB_UHCI_HCD=y +CONFIG_USE_OF=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_WAN=y +CONFIG_WATCHDOG_CORE=y +CONFIG_WATCHDOG_NOWAYOUT=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_BCJ=y +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ZBOOT_ROM_TEXT=0x0 diff --git a/target/linux/ixp4xx/image/Makefile b/target/linux/ixp4xx/image/Makefile new file mode 100644 index 000000000000..0bcabe2db143 --- /dev/null +++ b/target/linux/ixp4xx/image/Makefile @@ -0,0 +1,77 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Copyright (C) 2006-2021 OpenWrt.org + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/image.mk + +# Cook a Linksys NSLU2 etc image +define Build/linksys-ixp425-image + touch $@.null-initrd + $(TOPDIR)/scripts/slugimage.pl -L $(STAGING_DIR_IMAGE)/apex/apex-$(1)-armeb.bin -k $@ -r $@.null-initrd -p -o $@.new + mv $@.new $@ +endef + +# Build sysupgrade image +define BuildFirmware/Generic + dd if=$(KDIR)/zImage of=$(KDIR)/zImage.pad bs=64k conv=sync; \ + dd if=$(KDIR)/root.$(1) of=$(KDIR)/root.$(1).pad bs=128k conv=sync; \ + sh $(TOPDIR)/scripts/combined-image.sh \ + $(KDIR)/zImage.pad \ + $(KDIR)/root.$(1).pad \ + $(BIN_DIR)/$(IMG_PREFIX)-$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1)))-sysupgrade.bin +endef + +define Image/Build + $(call Image/Build/$(1),$(1)) + $(call BuildFirmware/Generic,$(1)) +endef + +define Device/Default + PROFILES := Default + KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts) + KERNEL_NAME := zImage + KERNEL := kernel-bin | append-dtb + BLOCKSIZE := 128k +endef + +define Device/gateworks_avila + DEVICE_VENDOR := Gateworks + DEVICE_MODEL := Avila GW2348-4 + DEVICE_PACKAGES := ixp4xx-microcode-ethernet kmod-rtc-ds1672 kmod-eeprom-at24 kmod-hwmon-ad7418 + DEVICE_DTS := intel-ixp42x-gateworks-gw2348 + KERNEL := kernel-bin | append-dtb + IMAGES := kernel.bin rootfs.bin + IMAGE/kernel.bin := append-kernel + IMAGE/rootfs.bin := append-rootfs | pad-rootfs | pad-to 128k +endef +TARGET_DEVICES += gateworks_avila + +define Device/gateworks_cambria + DEVICE_VENDOR := Gateworks + DEVICE_MODEL := Cambria GW2358-4 + DEVICE_PACKAGES := ixp4xx-microcode-ethernet kmod-rtc-ds1672 kmod-eeprom-at24 kmod-hwmon-ad7418 + DEVICE_DTS := intel-ixp43x-gateworks-gw2358 + KERNEL := kernel-bin | append-dtb + IMAGES := kernel.bin rootfs.bin + IMAGE/kernel.bin := append-kernel + IMAGE/rootfs.bin := append-rootfs | pad-rootfs | pad-to 128k +endef +TARGET_DEVICES += gateworks_cambria + +define Device/linksys_nslu2 + DEVICE_VENDOR := Linksys + DEVICE_MODEL := NSLU2 + # USB2 is compiled in and needs no package + DEVICE_PACKAGES := ixp4xx-microcode-ethernet kmod-rtc-x1205 + # Only 32 MB of RAM so not building by default + DEFAULT := n + DEVICE_DTS := intel-ixp42x-linksys-nslu2 + KERNEL := kernel-bin | append-dtb + IMAGES := factory.bin + # This has to boot from harddisk so just append the kernel + IMAGE/factory.bin := append-kernel | linksys-ixp425-image "nslu2" +endef +TARGET_DEVICES += linksys_nslu2 + +$(eval $(call BuildImage)) diff --git a/target/linux/ixp4xx/patches-6.1/0001-mtd-cfi_cmdset_0001-Byte-swap-OTP-info.patch b/target/linux/ixp4xx/patches-6.1/0001-mtd-cfi_cmdset_0001-Byte-swap-OTP-info.patch new file mode 100644 index 000000000000..1c5e44bb7240 --- /dev/null +++ b/target/linux/ixp4xx/patches-6.1/0001-mtd-cfi_cmdset_0001-Byte-swap-OTP-info.patch @@ -0,0 +1,74 @@ +From 4e242d6e08ad1d85b832e158cd0eafcb8f3f76a1 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Tue, 30 May 2023 22:40:31 +0200 +Subject: [PATCH v3] mtd: cfi_cmdset_0001: Byte swap OTP info + +Currently the offset into the device when looking for OTP +bits can go outside of the address of the MTD NOR devices, +and if that memory isn't readable, bad things happen +on the IXP4xx (added prints that illustrate the problem before +the crash): + +cfi_intelext_otp_walk walk OTP on chip 0 start at reg_prot_offset 0x00000100 +ixp4xx_copy_from copy from 0x00000100 to 0xc880dd78 +cfi_intelext_otp_walk walk OTP on chip 0 start at reg_prot_offset 0x12000000 +ixp4xx_copy_from copy from 0x12000000 to 0xc880dd78 +8<--- cut here --- +Unable to handle kernel paging request at virtual address db000000 +[db000000] *pgd=00000000 +(...) + +This happens in this case because the IXP4xx is big endian and +the 32- and 16-bit fields in the struct cfi_intelext_otpinfo are not +properly byteswapped. Compare to how the code in read_pri_intelext() +byteswaps the fields in struct cfi_pri_intelext. + +Adding a small byte swapping loop for the OTP in read_pri_intelext() +and the crash goes away. + +The problem went unnoticed for many years until I enabled +CONFIG_MTD_OTP on the IXP4xx as well, triggering the bug. + +Cc: Nicolas Pitre +Cc: stable@vger.kernel.org +Signed-off-by: Linus Walleij +--- +ChangeLog v2->v3: +- Move the byte swapping to a small loop in read_pri_intelext() + so all bytes are swapped as we reach cfi_intelext_otp_walk(). +ChangeLog v1->v2: +- Drill deeper and discover a big endian compatibility issue. +--- + drivers/mtd/chips/cfi_cmdset_0001.c | 20 ++++++++++++++++++-- + 1 file changed, 18 insertions(+), 2 deletions(-) + +--- a/drivers/mtd/chips/cfi_cmdset_0001.c ++++ b/drivers/mtd/chips/cfi_cmdset_0001.c +@@ -421,9 +421,25 @@ read_pri_intelext(struct map_info *map, + extra_size = 0; + + /* Protection Register info */ +- if (extp->NumProtectionFields) ++ if (extp->NumProtectionFields) { ++ struct cfi_intelext_otpinfo *otp = ++ (struct cfi_intelext_otpinfo *)&extp->extra[0]; ++ + extra_size += (extp->NumProtectionFields - 1) * +- sizeof(struct cfi_intelext_otpinfo); ++ sizeof(struct cfi_intelext_otpinfo); ++ ++ if (extp_size >= sizeof(*extp) + extra_size) { ++ int i; ++ ++ /* Do some byteswapping if necessary */ ++ for (i = 0; i < extp->NumProtectionFields - 1; i++) { ++ otp->ProtRegAddr = le32_to_cpu(otp->ProtRegAddr); ++ otp->FactGroups = le16_to_cpu(otp->FactGroups); ++ otp->UserGroups = le16_to_cpu(otp->UserGroups); ++ otp++; ++ } ++ } ++ } + } + + if (extp->MinorVersion >= '1') { diff --git a/target/linux/ixp4xx/patches-6.1/301-ARM-dts-ixp4xx-Boot-NSLU2-from-harddrive.patch b/target/linux/ixp4xx/patches-6.1/301-ARM-dts-ixp4xx-Boot-NSLU2-from-harddrive.patch new file mode 100644 index 000000000000..ffd69a774c3c --- /dev/null +++ b/target/linux/ixp4xx/patches-6.1/301-ARM-dts-ixp4xx-Boot-NSLU2-from-harddrive.patch @@ -0,0 +1,24 @@ +From 2792791a19f90b0141ed2e781599ba0a42a8cfd5 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Mon, 29 May 2023 23:32:44 +0200 +Subject: [PATCH] ARM: dts: ixp4xx: Boot NSLU2 from harddrive + +This enforces harddrive boot on the NSLU2. The flash is too small +to hold any rootfs these days. + +Signed-off-by: Linus Walleij +--- + arch/arm/boot/dts/intel-ixp42x-linksys-nslu2.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/intel-ixp42x-linksys-nslu2.dts ++++ b/arch/arm/boot/dts/intel-ixp42x-linksys-nslu2.dts +@@ -21,7 +21,7 @@ + }; + + chosen { +- bootargs = "console=ttyS0,115200n8 root=/dev/mtdblock2 rw rootfstype=squashfs,jffs2 rootwait"; ++ bootargs = "console=ttyS0,115200n8 root=/dev/sda1 rw rootwait"; + stdout-path = "uart0:115200n8"; + }; + From patchwork Thu Oct 12 08:42:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1847317 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=NMe6m35w; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ZgxD7cQN; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S5jr65JTYz23jX for ; Thu, 12 Oct 2023 19:44:54 +1100 (AEDT) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:In-Reply-To:References:Message-Id: MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=O/L59sB80rHBSX6bnTQvXyrPzkKxiOmY8/ukbhCewso=; b=NMe6m35wCA6ujX sgx2Hlpu1rAc2XXb6LgaWJafjlMaHMRezwSb9wdNb02PDDkazaF7WCLdmXYXYhfLhsKdjKY4w1gaJ d9pxwQbbJbSmbhpBMDzYXmaNOWe9M8K818YaKaRXVnhYoVcH8CZyJu6ukDL0oTHw5/MxwDqxO41WJ MgnfeAqvqYe+BPLSJDGt79wqtw+FS3SRv/qCFauILbJUWxMmcYRNFSF45yoAEVQXV2AHKVeFMTCVk CUQUdalyGzCs/kFQMdSaDvACNPUWIYi7kDMpyyzcuiiGEmOG45+PnJDp0NNAXoBHpwtVzrsXoTKwT mNnmtfxU1edKJPeUeq9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqrHT-000EHH-04; Thu, 12 Oct 2023 08:42:55 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqrH5-000DzL-1X for openwrt-devel@lists.openwrt.org; Thu, 12 Oct 2023 08:42:33 +0000 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-50325ce89e9so1032397e87.0 for ; Thu, 12 Oct 2023 01:42:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697100147; x=1697704947; darn=lists.openwrt.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=HKeSU8AepDvwKe/0ehJRbaqN5BcKDEowdrqHTWIDqhQ=; b=ZgxD7cQNkJdarggiUwzmExPJ5073woKYGfiqohKBB2+I0pcfI84eOlVH80hlRR580g 67k4yf2ZNfcS0jGDcDdWy77QCxxIqq7jXAi2F/MEDfAVLWvbA1Rrghjgew0a0mBRpzI0 JzpVZSML5PkFdFwLQlRT+pURy2Aua8aF5O4BCKhHelcelW09sZf4hFI+WKlmMYtzICE9 7LPZZ1yEtZuzu20zIot2087oIs+vYruHpb8zxrAie4jU8LJ3NgfHFqFjpLpnpOnh/5Il v24THX5iyXddi0zD+EA/wFN5xnlwIsFxFJbgcuJgSJjFpvPnrnHgPnY5gVvxW7ZyuFe+ sGxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697100147; x=1697704947; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HKeSU8AepDvwKe/0ehJRbaqN5BcKDEowdrqHTWIDqhQ=; b=ahqa/9j+jqgz7d+ZOZQL2KLND6oQPIAUvLHHEYDfAk5/2cleCN9Yyjt6+/+lVLe+IP 5H2bvhDInUJTVkstOTIl26hrizcYNtDy/GIn6l0O1ZjoyeP0qCmwBn7x8T9Jl4e7J3U/ vzqLuRRYA7cfN+rRLDcDQcoIGQsK3bxq7k+910TbGkUvbajx0REh+E1/tnqqJLcMFpFm asOe+sryCNUfNIkhV0VlfLVeL6zYcrgyLur2VEiS5r98Z+CL8ZiC/NJe0eHAoGk7OPAw zPjBcRJ2rDTATY8Elgiou+pj/8wAX7ngIunsdBwWucD9Hh2i1/poRCyebWEhbUkDoqa/ ZEJQ== X-Gm-Message-State: AOJu0YwCcdzKidUeDTfi56vTmI142jgYdM8n61N7KK8i/mfx3jo8p0dH JYmA3xiqwC6NEo7WgvFCw+XCkpBPNh8PFmeiaHY= X-Google-Smtp-Source: AGHT+IGVkGdFG9kTfY5Vpz00ufE9flDr9U7xrpFxKKLxGAYP4o6X/lOwWEdGkoO1PpCRRA/JXQ35Ow== X-Received: by 2002:a05:6512:304b:b0:500:9969:60bf with SMTP id b11-20020a056512304b00b00500996960bfmr21361852lfb.68.1697100147453; Thu, 12 Oct 2023 01:42:27 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id o9-20020a05651238a900b00501c8959f6asm2705043lft.98.2023.10.12.01.42.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 01:42:26 -0700 (PDT) From: Linus Walleij Date: Thu, 12 Oct 2023 10:42:23 +0200 Subject: [PATCH v3 08/10] ixp4xx: Add a ixp4xx hardware crypto kernel module MIME-Version: 1.0 Message-Id: <20231012-ixp4xx-v3-8-e09c74712c0b@linaro.org> References: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> In-Reply-To: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> To: Imre Kaloz , Krzysztof Halasa , Howard Harte , openwrt-devel@lists.openwrt.org X-Mailer: b4 0.12.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231012_014231_583075_5492F589 X-CRM114-Status: UNSURE ( 9.36 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The IXP4xx crypto module must be loaded after the rootfs is up as it depends on loading some NPE microcode from the file system. Signed-off-by: Linus Walleij --- ChangeLog v1->v3: - Use AutoProbe for loading the module. --- package/kernel/linux/modules/crypto.mk | 13 +++++++++++++ target/linux/ixp4xx/ [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:136 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hauke Mehrtens , Linus Walleij , Raylynn Knight Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The IXP4xx crypto module must be loaded after the rootfs is up as it depends on loading some NPE microcode from the file system. Signed-off-by: Linus Walleij --- ChangeLog v1->v3: - Use AutoProbe for loading the module. --- package/kernel/linux/modules/crypto.mk | 13 +++++++++++++ target/linux/ixp4xx/Makefile | 1 + 2 files changed, 14 insertions(+) diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk index c0ccdaa3dfe6..dd17d868fa15 100644 --- a/package/kernel/linux/modules/crypto.mk +++ b/package/kernel/linux/modules/crypto.mk @@ -399,6 +399,19 @@ endef $(eval $(call KernelPackage,crypto-hw-hifn-795x)) +define KernelPackage/crypto-hw-ixp4xx + TITLE:=Intel IXP4xx crypto accelerator + DEPENDS:=@TARGET_ixp4xx +kmod-random-core +kmod-crypto-manager +kmod-crypto-authenc +kmod-crypto-des + KCONFIG:= \ + CONFIG_CRYPTO_HW=y \ + CONFIG_CRYPTO_DEV_IXP4XX + FILES:=$(LINUX_DIR)/drivers/crypto/ixp4xx_crypto.ko + AUTOLOAD:=$(call AutoProbe,ixp4xx_crypto) + $(call AddDepends/crypto) +endef + +$(eval $(call KernelPackage,crypto-hw-ixp4xx)) + define KernelPackage/crypto-hw-padlock TITLE:=VIA PadLock ACE with AES/SHA hw crypto module diff --git a/target/linux/ixp4xx/Makefile b/target/linux/ixp4xx/Makefile index 89a1b2407bfe..6cd30877eeee 100644 --- a/target/linux/ixp4xx/Makefile +++ b/target/linux/ixp4xx/Makefile @@ -21,6 +21,7 @@ KERNELNAME:=zImage dtbs include $(INCLUDE_DIR)/target.mk DEFAULT_PACKAGES += fconfig \ + kmod-crypto-hw-ixp4xx \ kmod-usb-ledtrig-usbport \ kmod-leds-gpio From patchwork Thu Oct 12 08:42:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1847312 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=FLCrEUTQ; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ZMbIADH+; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S5jqn58STz23jX for ; Thu, 12 Oct 2023 19:44:37 +1100 (AEDT) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:In-Reply-To:References:Message-Id: MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JX3UERQwvPi6IAKp4PmPzZBgJdm9CTTThrrobtuKypw=; b=FLCrEUTQr073qJ CEA7jjWg6a41VEUy6PEtwHO3iG/EsueRC7/oOEFih/BX0zDVtFJfUXkn8ZGrGuadtg8HELBPouFpX qkUAUK3tdVO1hKks4EgJ59c1c54QPSaatCpJVy1C2rp54LlxVxF+iGINxksQAIMpojgDE4/ha71xi sH0qMVvpB9vWs7vi+LnkZH98Ek6GZ8OozZJXIYPhnSns2jCBtLauNdYtsP8YmpPxFLuNI27ZMTjJW 4ONw5mshlkXeHeK409qQhqw7I8FCLfAKv3/k9bJ/Lowkg9LMKB1YQqQHdq7h+NO+CmMOrsuVqESSh maG+lsaD1I7tYI3XXpIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqrHV-000EIZ-0D; Thu, 12 Oct 2023 08:42:57 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqrH5-000E04-2m for openwrt-devel@lists.openwrt.org; Thu, 12 Oct 2023 08:42:37 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5041bb9ce51so992845e87.1 for ; Thu, 12 Oct 2023 01:42:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697100148; x=1697704948; darn=lists.openwrt.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=KJfXHWDV+pixVEc3EUP91C7waAx08vJOa/gBMwx/nVE=; b=ZMbIADH+U37Ymb7LYutyHqXXdD6wgERScMb4lXyPh8oW4lbVjyN4TfP0YNlYRmpJCA izbtNCO2fFsHBDmUIS/0SUMdQfJCsA8l8v2RQzQUqB4eh9RgVh/sLV34X42KG75iYS8w drvzUUUx+LulK/LtB26m+c97VIhpng3F6wVgx9NHd162/uJ2cXPRgs0MojeHry9VdPVz u1aJZ09MtTsYiKoOqzdY8HuH6ovpo4nwBSMyT3xw5G5rY1E8shBEY+6cus16XvnpcssZ nraQeZfqSQ0KH7qqgpatoZO8ZZyI3CarpBjhtIpbbVVjSVT1lgdRxamwQTAXOXfbMgm9 K1nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697100148; x=1697704948; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KJfXHWDV+pixVEc3EUP91C7waAx08vJOa/gBMwx/nVE=; b=lJQUkaQTAcr3g6OvBTkDQdIc5HJ6eMnGrRlCT8hmMKdZOmOHMOW887LeYEBSHQPbIr tyPltkQgCg5L5KhyFSQO3AQe+OK0+2MwC31Sl+Myet8/Bo6colBU6LORdI85TbrvGmKi qfvEMnU0BpFU5mOr5aXv9OnHTJbMmv6Ey9cLCE7+u/9zrr9450pcykni6QLZ/eV6DgUq +IGCFIogq/FbLS04QBhU3K+MNWyA19gNLuioWNgDH9wapVPZe7J4FPdljmQp7psjsIpZ j7afJRjE/WEc8oO9YjZ0SVkZ6uCnuSu3/3gzoQ/jnIeqVyFeZSlcKzbxUgDitfokPKtk /VDQ== X-Gm-Message-State: AOJu0YyferQCUfuEHF0WvROJLBfHDHsaedIZ3c5koQsBAKCu5kMjiCDc iykXkpLrAs/2cJinmJsQp4ienibH2BLmOp7TslI= X-Google-Smtp-Source: AGHT+IFVgAND7nSDG+3zqd2cYnVW3UMVORTyyK5lYfDM0OXKvIso0IC3M0+VXbLHZR+7d/Y8+IAPbg== X-Received: by 2002:a05:6512:e96:b0:500:b3fe:916e with SMTP id bi22-20020a0565120e9600b00500b3fe916emr26086374lfb.2.1697100148346; Thu, 12 Oct 2023 01:42:28 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id o9-20020a05651238a900b00501c8959f6asm2705043lft.98.2023.10.12.01.42.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 01:42:27 -0700 (PDT) From: Linus Walleij Date: Thu, 12 Oct 2023 10:42:24 +0200 Subject: [PATCH v3 09/10] ixp4xx: Add USRobotics USR8200 support MIME-Version: 1.0 Message-Id: <20231012-ixp4xx-v3-9-e09c74712c0b@linaro.org> References: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> In-Reply-To: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> To: Imre Kaloz , Krzysztof Halasa , Howard Harte , openwrt-devel@lists.openwrt.org X-Mailer: b4 0.12.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231012_014232_056331_B370BF0D X-CRM114-Status: GOOD ( 32.26 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This brings back USRobotics USR8200 support to the IXP4xx target. Signed-off-by: Linus Walleij --- .../linux/ixp4xx/base-files/etc/board.d/02_network | 5 + target/linux/ixp4xx/config-6.1 | 1 + target/linux/ixp4xx/image/Makefile | 13 ++ ... [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:132 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hauke Mehrtens , Linus Walleij , Raylynn Knight Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This brings back USRobotics USR8200 support to the IXP4xx target. Signed-off-by: Linus Walleij --- .../linux/ixp4xx/base-files/etc/board.d/02_network | 5 + target/linux/ixp4xx/config-6.1 | 1 + target/linux/ixp4xx/image/Makefile | 13 ++ ...p4xx-Handle-clock-output-on-pin-14-and-15.patch | 93 ++++++++ ...003-rtc-rtc7301-Support-byte-addressed-IO.patch | 93 ++++++++ ...ixp4xx-Add-USRobotics-USR8200-device-tree.patch | 260 +++++++++++++++++++++ ...5-net-ixp4xx_eth-Support-changing-the-MTU.patch | 132 +++++++++++ ...06-net-phy-amd-Support-the-Altima-AMI101L.patch | 82 +++++++ ...dog-ixp4xx-Make-sure-restart-always-works.patch | 79 +++++++ 9 files changed, 758 insertions(+) diff --git a/target/linux/ixp4xx/base-files/etc/board.d/02_network b/target/linux/ixp4xx/base-files/etc/board.d/02_network index 45d7cbc75a4a..864328d6bcf1 100644 --- a/target/linux/ixp4xx/base-files/etc/board.d/02_network +++ b/target/linux/ixp4xx/base-files/etc/board.d/02_network @@ -11,6 +11,11 @@ gateworks,gw2358) linksys,nslu2) ucidef_set_interface_lan "eth0" "dhcp" ;; +usr,usr8200) + # LAN ports connected to eth1 thru the MV88E6060 DSA switch + ucidef_set_interface "eth" device "eth1" protocol "none" + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "eth0" + ;; *) ucidef_set_interface_lan "eth0" "dhcp" ;; diff --git a/target/linux/ixp4xx/config-6.1 b/target/linux/ixp4xx/config-6.1 index 3b47385d6b8d..4c4aa11969ea 100644 --- a/target/linux/ixp4xx/config-6.1 +++ b/target/linux/ixp4xx/config-6.1 @@ -1,4 +1,5 @@ CONFIG_ALIGNMENT_TRAP=y +CONFIG_AMD_PHY=y CONFIG_ARCH_32BIT_OFF_T=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_IXP4XX=y diff --git a/target/linux/ixp4xx/image/Makefile b/target/linux/ixp4xx/image/Makefile index 0bcabe2db143..c6d4817c966f 100644 --- a/target/linux/ixp4xx/image/Makefile +++ b/target/linux/ixp4xx/image/Makefile @@ -74,4 +74,17 @@ define Device/linksys_nslu2 endef TARGET_DEVICES += linksys_nslu2 +define Device/usrobotics_usr8200 + DEVICE_VENDOR := USRobotics + DEVICE_MODEL := USR8200 + # USB2 is compiled in and needs no package + DEVICE_PACKAGES := ixp4xx-microcode-ethernet kmod-rtc-r7301 kmod-firewire kmod-firewire-ohci + DEVICE_DTS := intel-ixp42x-usrobotics-usr8200 + KERNEL := kernel-bin | append-dtb + IMAGES := kernel.bin rootfs.bin + IMAGE/kernel.bin := append-kernel + IMAGE/rootfs.bin := append-rootfs | pad-rootfs | pad-to 128k +endef +TARGET_DEVICES += usrobotics_usr8200 + $(eval $(call BuildImage)) diff --git a/target/linux/ixp4xx/patches-6.1/0002-gpio-ixp4xx-Handle-clock-output-on-pin-14-and-15.patch b/target/linux/ixp4xx/patches-6.1/0002-gpio-ixp4xx-Handle-clock-output-on-pin-14-and-15.patch new file mode 100644 index 000000000000..38adecd64fff --- /dev/null +++ b/target/linux/ixp4xx/patches-6.1/0002-gpio-ixp4xx-Handle-clock-output-on-pin-14-and-15.patch @@ -0,0 +1,93 @@ +From fc58944733a2082e3290eda240eb3247a00ad73a Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Thu, 21 Sep 2023 00:12:42 +0200 +Subject: [PATCH] gpio: ixp4xx: Handle clock output on pin 14 and 15 + +This makes it possible to provide basic clock output on pins +14 and 15. The clocks are typically used by random electronics, +not modeled in the device tree, so they just need to be provided +on request. + +In order to not disturb old systems that require that the +hardware defaults are kept in the clock setting bits, we only +manipulate these if either device tree property is present. +Once we know a device needs one of the clocks we can set it +in the device tree. + +Signed-off-by: Linus Walleij +--- + drivers/gpio/gpio-ixp4xx.c | 49 +++++++++++++++++++++++++++++++++++++- + 1 file changed, 48 insertions(+), 1 deletion(-) + +--- a/drivers/gpio/gpio-ixp4xx.c ++++ b/drivers/gpio/gpio-ixp4xx.c +@@ -38,6 +38,18 @@ + #define IXP4XX_GPIO_STYLE_MASK GENMASK(2, 0) + #define IXP4XX_GPIO_STYLE_SIZE 3 + ++/* ++ * Clock output control register defines. ++ */ ++#define IXP4XX_GPCLK_CLK0DC_SHIFT 0 ++#define IXP4XX_GPCLK_CLK0TC_SHIFT 4 ++#define IXP4XX_GPCLK_CLK0_MASK GENMASK(7, 0) ++#define IXP4XX_GPCLK_MUX14 BIT(8) ++#define IXP4XX_GPCLK_CLK1DC_SHIFT 16 ++#define IXP4XX_GPCLK_CLK1TC_SHIFT 20 ++#define IXP4XX_GPCLK_CLK1_MASK GENMASK(23, 16) ++#define IXP4XX_GPCLK_MUX15 BIT(24) ++ + /** + * struct ixp4xx_gpio - IXP4 GPIO state container + * @dev: containing device for this instance +@@ -203,6 +215,8 @@ static int ixp4xx_gpio_probe(struct plat + struct ixp4xx_gpio *g; + struct gpio_irq_chip *girq; + struct device_node *irq_parent; ++ bool clk_14, clk_15; ++ u32 val; + int ret; + + g = devm_kzalloc(dev, sizeof(*g), GFP_KERNEL); +@@ -233,7 +247,40 @@ static int ixp4xx_gpio_probe(struct plat + */ + if (of_machine_is_compatible("dlink,dsm-g600-a") || + of_machine_is_compatible("iom,nas-100d")) +- __raw_writel(0x0, g->base + IXP4XX_REG_GPCLK); ++ val = 0; ++ else ++ val = __raw_readl(g->base + IXP4XX_REG_GPCLK); ++ ++ /* ++ * If either clock output is enabled explicitly in the device tree ++ * we take full control of the clock by masking off all bits for ++ * the clock control and selectively enabling them. Otherwise ++ * we leave the hardware default settings. ++ * ++ * Enable clock outputs with default timings of requested clock. ++ * If you need control over TC and DC, add these to the device ++ * tree bindings and use them here. ++ */ ++ clk_14 = of_property_read_bool(np, "intel,ixp4xx-gpio14-clkout"); ++ clk_15 = of_property_read_bool(np, "intel,ixp4xx-gpio15-clkout"); ++ if (clk_14 || clk_15) { ++ val &= ~(IXP4XX_GPCLK_MUX14 | IXP4XX_GPCLK_MUX15); ++ val &= ~IXP4XX_GPCLK_CLK0_MASK; ++ val &= ~IXP4XX_GPCLK_CLK1_MASK; ++ if (clk_14) { ++ val |= (0 << IXP4XX_GPCLK_CLK0DC_SHIFT); ++ val |= (1 << IXP4XX_GPCLK_CLK0TC_SHIFT); ++ val |= IXP4XX_GPCLK_MUX14; ++ } ++ ++ if (clk_15) { ++ val |= (0 << IXP4XX_GPCLK_CLK1DC_SHIFT); ++ val |= (1 << IXP4XX_GPCLK_CLK1TC_SHIFT); ++ val |= IXP4XX_GPCLK_MUX15; ++ } ++ } ++ ++ __raw_writel(val, g->base + IXP4XX_REG_GPCLK); + + /* + * This is a very special big-endian ARM issue: when the IXP4xx is diff --git a/target/linux/ixp4xx/patches-6.1/0003-rtc-rtc7301-Support-byte-addressed-IO.patch b/target/linux/ixp4xx/patches-6.1/0003-rtc-rtc7301-Support-byte-addressed-IO.patch new file mode 100644 index 000000000000..ddda6e4e7832 --- /dev/null +++ b/target/linux/ixp4xx/patches-6.1/0003-rtc-rtc7301-Support-byte-addressed-IO.patch @@ -0,0 +1,93 @@ +From edd25a77e69b7c546c28077e5dffe72c54c0afe8 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Thu, 21 Sep 2023 22:18:12 +0200 +Subject: [PATCH 2/4] rtc: rtc7301: Support byte-addressed IO + +The old RTC7301 driver in OpenWrt used byte access, but the +current mainline Linux driver uses 32bit word access. + +Make this configurable using device properties using the +standard property "reg-io-width" in e.g. device tree. + +This is needed for the USRobotics USR8200 which has the +chip connected using byte accesses. + +Debugging and testing by Howard Harte. + +Signed-off-by: Linus Walleij +--- + drivers/rtc/rtc-r7301.c | 35 +++++++++++++++++++++++++++++++++-- + 1 file changed, 33 insertions(+), 2 deletions(-) + +--- a/drivers/rtc/rtc-r7301.c ++++ b/drivers/rtc/rtc-r7301.c +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -55,12 +56,23 @@ struct rtc7301_priv { + u8 bank; + }; + +-static const struct regmap_config rtc7301_regmap_config = { ++/* ++ * When the device is memory-mapped, some platforms pack the registers into ++ * 32-bit access using the lower 8 bits at each 4-byte stride, while others ++ * expose them as simply consecutive bytes. ++ */ ++static const struct regmap_config rtc7301_regmap_32_config = { + .reg_bits = 32, + .val_bits = 8, + .reg_stride = 4, + }; + ++static const struct regmap_config rtc7301_regmap_8_config = { ++ .reg_bits = 8, ++ .val_bits = 8, ++ .reg_stride = 1, ++}; ++ + static u8 rtc7301_read(struct rtc7301_priv *priv, unsigned int reg) + { + int reg_stride = regmap_get_reg_stride(priv->regmap); +@@ -356,7 +368,9 @@ static int __init rtc7301_rtc_probe(stru + void __iomem *regs; + struct rtc7301_priv *priv; + struct rtc_device *rtc; ++ static const struct regmap_config *mapconf; + int ret; ++ u32 val; + + priv = devm_kzalloc(&dev->dev, sizeof(*priv), GFP_KERNEL); + if (!priv) +@@ -366,8 +380,25 @@ static int __init rtc7301_rtc_probe(stru + if (IS_ERR(regs)) + return PTR_ERR(regs); + ++ ret = device_property_read_u32(&dev->dev, "reg-io-width", &val); ++ if (ret) ++ /* Default to 32bit accesses */ ++ val = 4; ++ ++ switch (val) { ++ case 1: ++ mapconf = &rtc7301_regmap_8_config; ++ break; ++ case 4: ++ mapconf = &rtc7301_regmap_32_config; ++ break; ++ default: ++ dev_err(&dev->dev, "invalid reg-io-width %d\n", val); ++ return -EINVAL; ++ } ++ + priv->regmap = devm_regmap_init_mmio(&dev->dev, regs, +- &rtc7301_regmap_config); ++ mapconf); + if (IS_ERR(priv->regmap)) + return PTR_ERR(priv->regmap); + diff --git a/target/linux/ixp4xx/patches-6.1/0004-ARM-dts-ixp4xx-Add-USRobotics-USR8200-device-tree.patch b/target/linux/ixp4xx/patches-6.1/0004-ARM-dts-ixp4xx-Add-USRobotics-USR8200-device-tree.patch new file mode 100644 index 000000000000..0ae80d170e49 --- /dev/null +++ b/target/linux/ixp4xx/patches-6.1/0004-ARM-dts-ixp4xx-Add-USRobotics-USR8200-device-tree.patch @@ -0,0 +1,260 @@ +From 02693ffdb93bffcbe772bd91a399dabd123b8c19 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Tue, 19 Sep 2023 16:02:15 +0200 +Subject: [PATCH 4/4] ARM: dts: ixp4xx: Add USRobotics USR8200 device tree + +This is a USRobotics NAS/Firewall/router that has been supported +by OpenWrt in the past. It had dedicated users so let's get it +properly supported. + +Signed-off-by: Linus Walleij +--- + arch/arm/boot/dts/Makefile | 3 +- + .../dts/intel-ixp42x-usrobotics-usr8200.dts | 229 ++++++++++++++++++ + 2 files changed, 231 insertions(+), 1 deletion(-) + create mode 100644 arch/arm/boot/dts/intel-ixp42x-usrobotics-usr8200.dts + +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -292,7 +292,8 @@ dtb-$(CONFIG_ARCH_IXP4XX) += \ + intel-ixp43x-gateworks-gw2358.dtb \ + intel-ixp42x-netgear-wg302v1.dtb \ + intel-ixp42x-arcom-vulcan.dtb \ +- intel-ixp42x-gateway-7001.dtb ++ intel-ixp42x-gateway-7001.dtb \ ++ intel-ixp42x-usrobotics-usr8200.dtb + dtb-$(CONFIG_ARCH_KEYSTONE) += \ + keystone-k2hk-evm.dtb \ + keystone-k2l-evm.dtb \ +--- /dev/null ++++ b/arch/arm/boot/dts/intel-ixp42x-usrobotics-usr8200.dts +@@ -0,0 +1,229 @@ ++// SPDX-License-Identifier: ISC ++/* ++ * Device Tree file for the USRobotics USR8200 firewall ++ * VPN and NAS. Based on know-how from Peter Denison. ++ * ++ * This machine is based on IXP422, the USR internal codename ++ * is "Jeeves". ++ */ ++ ++/dts-v1/; ++ ++#include "intel-ixp42x.dtsi" ++#include ++ ++/ { ++ model = "USRobotics USR8200"; ++ compatible = "usr,usr8200", "intel,ixp42x"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x00000000 0x4000000>; ++ }; ++ ++ chosen { ++ bootargs = "console=ttyS0,115200n8"; ++ stdout-path = "uart1:115200n8"; ++ }; ++ ++ aliases { ++ /* These are switched around */ ++ serial0 = &uart1; ++ serial1 = &uart0; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ieee1394_led: led-1394 { ++ label = "usr8200:green:1394"; ++ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; ++ default-state = "off"; ++ }; ++ usb1_led: led-usb1 { ++ label = "usr8200:green:usb1"; ++ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; ++ default-state = "off"; ++ }; ++ usb2_led: led-usb2 { ++ label = "usr8200:green:usb2"; ++ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; ++ default-state = "off"; ++ }; ++ wireless_led: led-wireless { ++ /* ++ * This LED is mounted inside the case but cannot be ++ * seen from the outside: probably USR planned at one ++ * point for the device to have a wireless card, then ++ * changed their mind and didn't mount it, leaving the ++ * LED in place. ++ */ ++ label = "usr8200:green:wireless"; ++ gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; ++ default-state = "off"; ++ }; ++ pwr_led: led-pwr { ++ label = "usr8200:green:pwr"; ++ gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; ++ default-state = "on"; ++ linux,default-trigger = "heartbeat"; ++ }; ++ }; ++ ++ gpio_keys { ++ compatible = "gpio-keys"; ++ ++ button-reset { ++ wakeup-source; ++ linux,code = ; ++ label = "reset"; ++ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ soc { ++ bus@c4000000 { ++ flash@0,0 { ++ compatible = "intel,ixp4xx-flash", "cfi-flash"; ++ bank-width = <2>; ++ /* Enable writes on the expansion bus */ ++ intel,ixp4xx-eb-write-enable = <1>; ++ /* 16 MB of Flash mapped in at CS0 */ ++ reg = <0 0x00000000 0x1000000>; ++ ++ partitions { ++ compatible = "redboot-fis"; ++ /* Eraseblock at 0x0fe0000 */ ++ fis-index-block = <0x7f>; ++ }; ++ }; ++ rtc@2,0 { ++ /* EPSON RTC7301 DG DIL-capsule */ ++ compatible = "epson,rtc7301dg"; ++ /* ++ * These timing settings were found in the boardfile patch: ++ * IXP4XX_EXP_CS2 = 0x3fff000 | IXP4XX_EXP_BUS_SIZE(0) | IXP4XX_EXP_BUS_WR_EN | ++ * IXP4XX_EXP_BUS_CS_EN | IXP4XX_EXP_BUS_BYTE_EN; ++ */ ++ intel,ixp4xx-eb-t1 = <0>; // no cycles extra address phase ++ intel,ixp4xx-eb-t2 = <0>; // no cycles extra setup phase ++ intel,ixp4xx-eb-t3 = <15>; // 15 cycles extra strobe phase ++ intel,ixp4xx-eb-t4 = <3>; // 3 cycles extra hold phase ++ intel,ixp4xx-eb-t5 = <15>; // 15 cycles extra recovery phase ++ intel,ixp4xx-eb-cycle-type = <0>; // Intel cycle ++ intel,ixp4xx-eb-byte-access-on-halfword = <0>; ++ intel,ixp4xx-eb-mux-address-and-data = <0>; ++ intel,ixp4xx-eb-ahb-split-transfers = <0>; ++ intel,ixp4xx-eb-write-enable = <1>; ++ intel,ixp4xx-eb-byte-access = <1>; ++ /* 512 bytes at CS2 */ ++ reg = <2 0x00000000 0x0000200>; ++ reg-io-width = <1>; ++ native-endian; ++ /* FIXME: try to check if there is an IRQ for the RTC? */ ++ }; ++ }; ++ ++ pci@c0000000 { ++ status = "okay"; ++ ++ /* ++ * Taken from USR8200 boardfile from OpenWrt ++ * ++ * We have 3 slots (IDSEL) with partly swizzled IRQs on slot 16. ++ * We assume the same IRQ for all pins on the remaining slots, that ++ * is what the boardfile was doing. ++ */ ++ #interrupt-cells = <1>; ++ interrupt-map-mask = <0xf800 0 0 7>; ++ interrupt-map = ++ /* IDSEL 14 used for "Wireless" in the board file */ ++ <0x7000 0 0 1 &gpio0 7 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 14 is irq 7 */ ++ /* IDSEL 15 used for VIA VT6307 IEEE 1394 Firewire */ ++ <0x7800 0 0 1 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 15 is irq 8 */ ++ /* IDSEL 16 used for VIA VT6202 USB 2.0 4+1 */ ++ <0x8000 0 0 1 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 16 is irq 11 */ ++ <0x8000 0 0 2 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 16 is irq 10 */ ++ <0x8000 0 0 3 &gpio0 9 IRQ_TYPE_LEVEL_LOW>; /* INT C on slot 16 is irq 9 */ ++ }; ++ ++ gpio@c8004000 { ++ /* Enable clock out on GPIO 15 */ ++ intel,ixp4xx-gpio15-clkout; ++ }; ++ ++ /* EthB WAN */ ++ ethernet@c8009000 { ++ status = "okay"; ++ queue-rx = <&qmgr 3>; ++ queue-txready = <&qmgr 20>; ++ phy-mode = "rgmii"; ++ phy-handle = <&phy9>; ++ ++ mdio { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ phy9: ethernet-phy@9 { ++ reg = <9>; ++ }; ++ ++ /* The switch uses MDIO addresses 16 thru 31 */ ++ switch@16 { ++ compatible = "marvell,mv88e6060"; ++ reg = <16>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ reg = <0>; ++ label = "lan1"; ++ }; ++ ++ port@1 { ++ reg = <1>; ++ label = "lan2"; ++ }; ++ ++ port@2 { ++ reg = <2>; ++ label = "lan3"; ++ }; ++ ++ port@3 { ++ reg = <3>; ++ label = "lan4"; ++ }; ++ ++ port@5 { ++ /* Port 5 is the CPU port according to the MV88E6060 datasheet */ ++ reg = <5>; ++ phy-mode = "rgmii-id"; ++ ethernet = <ðc>; ++ label = "cpu"; ++ fixed-link { ++ speed = <100>; ++ full-duplex; ++ }; ++ }; ++ }; ++ }; ++ }; ++ }; ++ ++ /* EthC LAN connected to the Marvell DSA Switch */ ++ ethc: ethernet@c800a000 { ++ status = "okay"; ++ queue-rx = <&qmgr 4>; ++ queue-txready = <&qmgr 21>; ++ phy-mode = "rgmii"; ++ fixed-link { ++ speed = <100>; ++ full-duplex; ++ }; ++ }; ++ }; ++}; diff --git a/target/linux/ixp4xx/patches-6.1/0005-net-ixp4xx_eth-Support-changing-the-MTU.patch b/target/linux/ixp4xx/patches-6.1/0005-net-ixp4xx_eth-Support-changing-the-MTU.patch new file mode 100644 index 000000000000..4abc6cdbe4e0 --- /dev/null +++ b/target/linux/ixp4xx/patches-6.1/0005-net-ixp4xx_eth-Support-changing-the-MTU.patch @@ -0,0 +1,132 @@ +From 6599df775e2cbb4988bdf8239acf4fbec70e5ef9 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Sat, 23 Sep 2023 20:38:22 +0200 +Subject: [PATCH 3/4] net: ixp4xx_eth: Support changing the MTU + +As we don't specify the MTU in the driver, the framework +will fall back to 1500 bytes and this doesn't work very +well when we try to attach a DSA switch: + + eth1: mtu greater than device maximum + ixp4xx_eth c800a000.ethernet eth1: error -22 setting + MTU to 1504 to include DSA overhead + +After locating an out-of-tree patch in OpenWrt I found +suitable code to set the MTU on the interface and ported +it and updated it. Now the MTU gets set properly. + +Reviewed-by: Jacob Keller +Signed-off-by: Linus Walleij +--- + drivers/net/ethernet/xscale/ixp4xx_eth.c | 65 +++++++++++++++++++++++- + 1 file changed, 64 insertions(+), 1 deletion(-) + +--- a/drivers/net/ethernet/xscale/ixp4xx_eth.c ++++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -63,7 +64,15 @@ + + #define POOL_ALLOC_SIZE (sizeof(struct desc) * (RX_DESCS + TX_DESCS)) + #define REGS_SIZE 0x1000 +-#define MAX_MRU 1536 /* 0x600 */ ++ ++/* MRU is said to be 14320 in a code dump, the SW manual says that ++ * MRU/MTU is 16320 and includes VLAN and ethernet headers. ++ * See "IXP400 Software Programmer's Guide" section 10.3.2, page 161. ++ * ++ * FIXME: we have chosen the safe default (14320) but if you can test ++ * jumboframes, experiment with 16320 and see what happens! ++ */ ++#define MAX_MRU (14320 - VLAN_ETH_HLEN) + #define RX_BUFF_SIZE ALIGN((NET_IP_ALIGN) + MAX_MRU, 4) + + #define NAPI_WEIGHT 16 +@@ -1182,6 +1191,54 @@ static void destroy_queues(struct port * + } + } + ++static int ixp4xx_do_change_mtu(struct net_device *dev, int new_mtu) ++{ ++ struct port *port = netdev_priv(dev); ++ struct npe *npe = port->npe; ++ int framesize, chunks; ++ struct msg msg = {}; ++ ++ /* adjust for ethernet headers */ ++ framesize = new_mtu + VLAN_ETH_HLEN; ++ /* max rx/tx 64 byte chunks */ ++ chunks = DIV_ROUND_UP(framesize, 64); ++ ++ msg.cmd = NPE_SETMAXFRAMELENGTHS; ++ msg.eth_id = port->id; ++ ++ /* Firmware wants to know buffer size in 64 byte chunks */ ++ msg.byte2 = chunks << 8; ++ msg.byte3 = chunks << 8; ++ ++ msg.byte4 = msg.byte6 = framesize >> 8; ++ msg.byte5 = msg.byte7 = framesize & 0xff; ++ ++ if (npe_send_recv_message(npe, &msg, "ETH_SET_MAX_FRAME_LENGTH")) ++ return -EIO; ++ netdev_dbg(dev, "set MTU on NPE %s to %d bytes\n", ++ npe_name(npe), new_mtu); ++ ++ return 0; ++} ++ ++static int ixp4xx_eth_change_mtu(struct net_device *dev, int new_mtu) ++{ ++ int ret; ++ ++ /* MTU can only be changed when the interface is up. We also ++ * set the MTU from dev->mtu when opening the device. ++ */ ++ if (dev->flags & IFF_UP) { ++ ret = ixp4xx_do_change_mtu(dev, new_mtu); ++ if (ret < 0) ++ return ret; ++ } ++ ++ dev->mtu = new_mtu; ++ ++ return 0; ++} ++ + static int eth_open(struct net_device *dev) + { + struct port *port = netdev_priv(dev); +@@ -1232,6 +1289,8 @@ static int eth_open(struct net_device *d + if (npe_send_recv_message(port->npe, &msg, "ETH_SET_FIREWALL_MODE")) + return -EIO; + ++ ixp4xx_do_change_mtu(dev, dev->mtu); ++ + if ((err = request_queues(port)) != 0) + return err; + +@@ -1374,6 +1433,7 @@ static int eth_close(struct net_device * + static const struct net_device_ops ixp4xx_netdev_ops = { + .ndo_open = eth_open, + .ndo_stop = eth_close, ++ .ndo_change_mtu = ixp4xx_eth_change_mtu, + .ndo_start_xmit = eth_xmit, + .ndo_set_rx_mode = eth_set_mcast_list, + .ndo_eth_ioctl = eth_ioctl, +@@ -1488,6 +1548,9 @@ static int ixp4xx_eth_probe(struct platf + ndev->dev.dma_mask = dev->dma_mask; + ndev->dev.coherent_dma_mask = dev->coherent_dma_mask; + ++ ndev->min_mtu = ETH_MIN_MTU; ++ ndev->max_mtu = MAX_MRU; ++ + netif_napi_add_weight(ndev, &port->napi, eth_poll, NAPI_WEIGHT); + + if (!(port->npe = npe_request(NPE_ID(port->id)))) diff --git a/target/linux/ixp4xx/patches-6.1/0006-net-phy-amd-Support-the-Altima-AMI101L.patch b/target/linux/ixp4xx/patches-6.1/0006-net-phy-amd-Support-the-Altima-AMI101L.patch new file mode 100644 index 000000000000..c2ecc5bfff8b --- /dev/null +++ b/target/linux/ixp4xx/patches-6.1/0006-net-phy-amd-Support-the-Altima-AMI101L.patch @@ -0,0 +1,82 @@ +From 49e5663b505070424e18099841943f34342aa405 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Sun, 24 Sep 2023 01:09:01 +0200 +Subject: [PATCH] net: phy: amd: Support the Altima AMI101L + +The Altima AC101L is obviously compatible with the AMD PHY, +as seen by reading the datasheet. + +Datasheet: https://docs.broadcom.com/doc/AC101L-DS05-405-RDS.pdf + +Signed-off-by: Linus Walleij +--- + drivers/net/phy/Kconfig | 4 ++-- + drivers/net/phy/amd.c | 33 +++++++++++++++++++++++---------- + 2 files changed, 25 insertions(+), 12 deletions(-) + +--- a/drivers/net/phy/Kconfig ++++ b/drivers/net/phy/Kconfig +@@ -146,9 +146,9 @@ endif # RTL8366_SMI + comment "MII PHY device drivers" + + config AMD_PHY +- tristate "AMD PHYs" ++ tristate "AMD and Altima PHYs" + help +- Currently supports the am79c874 ++ Currently supports the AMD am79c874 and Altima AC101L. + + config MESON_GXL_PHY + tristate "Amlogic Meson GXL Internal PHY" +--- a/drivers/net/phy/amd.c ++++ b/drivers/net/phy/amd.c +@@ -13,6 +13,7 @@ + #include + #include + ++#define PHY_ID_AC101L 0x00225520 + #define PHY_ID_AM79C874 0x0022561b + + #define MII_AM79C_IR 17 /* Interrupt Status/Control Register */ +@@ -87,19 +88,31 @@ static irqreturn_t am79c_handle_interrup + return IRQ_HANDLED; + } + +-static struct phy_driver am79c_driver[] = { { +- .phy_id = PHY_ID_AM79C874, +- .name = "AM79C874", +- .phy_id_mask = 0xfffffff0, +- /* PHY_BASIC_FEATURES */ +- .config_init = am79c_config_init, +- .config_intr = am79c_config_intr, +- .handle_interrupt = am79c_handle_interrupt, +-} }; ++static struct phy_driver am79c_drivers[] = { ++ { ++ .phy_id = PHY_ID_AM79C874, ++ .name = "AM79C874", ++ .phy_id_mask = 0xfffffff0, ++ /* PHY_BASIC_FEATURES */ ++ .config_init = am79c_config_init, ++ .config_intr = am79c_config_intr, ++ .handle_interrupt = am79c_handle_interrupt, ++ }, ++ { ++ .phy_id = PHY_ID_AC101L, ++ .name = "AC101L", ++ .phy_id_mask = 0xfffffff0, ++ /* PHY_BASIC_FEATURES */ ++ .config_init = am79c_config_init, ++ .config_intr = am79c_config_intr, ++ .handle_interrupt = am79c_handle_interrupt, ++ }, ++}; + +-module_phy_driver(am79c_driver); ++module_phy_driver(am79c_drivers); + + static struct mdio_device_id __maybe_unused amd_tbl[] = { ++ { PHY_ID_AC101L, 0xfffffff0 }, + { PHY_ID_AM79C874, 0xfffffff0 }, + { } + }; diff --git a/target/linux/ixp4xx/patches-6.1/0007-watchdog-ixp4xx-Make-sure-restart-always-works.patch b/target/linux/ixp4xx/patches-6.1/0007-watchdog-ixp4xx-Make-sure-restart-always-works.patch new file mode 100644 index 000000000000..8eae06deb616 --- /dev/null +++ b/target/linux/ixp4xx/patches-6.1/0007-watchdog-ixp4xx-Make-sure-restart-always-works.patch @@ -0,0 +1,79 @@ +From b09e5ea32e099821b1cddc1e26e625ad994ba11e Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Sun, 24 Sep 2023 21:20:24 +0200 +Subject: [PATCH] watchdog: ixp4xx: Make sure restart always works + +The IXP4xx watchdog in early "A0" silicon is unreliable and +cannot be registered, however for some systems such as the +USRobotics USR8200 the watchdog is the only restart option, +so implement a "dummy" watchdog that can only support restart +in this case. + +Fixes: 1aea522809e6 ("watchdog: ixp4xx: Implement restart") +Signed-off-by: Linus Walleij +--- +Other solutions like implementing a pure restart notifier +callback catch in the driver is possible, but this method +will minimize the amount of code and reuse infrastructure +in the core. +--- + drivers/watchdog/ixp4xx_wdt.c | 28 +++++++++++++++++++++++++--- + 1 file changed, 25 insertions(+), 3 deletions(-) + +--- a/drivers/watchdog/ixp4xx_wdt.c ++++ b/drivers/watchdog/ixp4xx_wdt.c +@@ -105,6 +105,25 @@ static const struct watchdog_ops ixp4xx_ + .owner = THIS_MODULE, + }; + ++/* ++ * The A0 version of the IXP422 had a bug in the watchdog making ++ * is useless, but we still need to use it to restart the system ++ * as it is the only way, so in this special case we register a ++ * "dummy" watchdog that doesn't really work, but will support ++ * the restart operation. ++ */ ++static int ixp4xx_wdt_dummy(struct watchdog_device *wdd) ++{ ++ return 0; ++} ++ ++static const struct watchdog_ops ixp4xx_wdt_restart_only_ops = { ++ .start = ixp4xx_wdt_dummy, ++ .stop = ixp4xx_wdt_dummy, ++ .restart = ixp4xx_wdt_restart, ++ .owner = THIS_MODULE, ++}; ++ + static const struct watchdog_info ixp4xx_wdt_info = { + .options = WDIOF_KEEPALIVEPING + | WDIOF_MAGICCLOSE +@@ -120,14 +139,17 @@ static void ixp4xx_clock_action(void *d) + + static int ixp4xx_wdt_probe(struct platform_device *pdev) + { ++ static const struct watchdog_ops *iwdt_ops; + struct device *dev = &pdev->dev; + struct ixp4xx_wdt *iwdt; + struct clk *clk; + int ret; + + if (!(read_cpuid_id() & 0xf) && !cpu_is_ixp46x()) { +- dev_err(dev, "Rev. A0 IXP42x CPU detected - watchdog disabled\n"); +- return -ENODEV; ++ dev_err(dev, "Rev. A0 IXP42x CPU detected - only restart supported\n"); ++ iwdt_ops = &ixp4xx_wdt_restart_only_ops; ++ } else { ++ iwdt_ops = &ixp4xx_wdt_ops; + } + + iwdt = devm_kzalloc(dev, sizeof(*iwdt), GFP_KERNEL); +@@ -153,7 +175,7 @@ static int ixp4xx_wdt_probe(struct platf + iwdt->rate = IXP4XX_TIMER_FREQ; + + iwdt->wdd.info = &ixp4xx_wdt_info; +- iwdt->wdd.ops = &ixp4xx_wdt_ops; ++ iwdt->wdd.ops = iwdt_ops; + iwdt->wdd.min_timeout = 1; + iwdt->wdd.max_timeout = U32_MAX / iwdt->rate; + iwdt->wdd.parent = dev; From patchwork Thu Oct 12 08:42:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1847313 X-Patchwork-Delegate: linus.walleij@linaro.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=D01qbXqI; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=DinZ+gqr; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S5jqp4h9Kz23jm for ; Thu, 12 Oct 2023 19:44:38 +1100 (AEDT) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:In-Reply-To:References:Message-Id: MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ggZ0zFItbUyMlcaAc1DLkd9mPEH+Lom9hJO4M+uhBU0=; b=D01qbXqI7aS1g4 Crhs1bMErDAzJMyeWqMl1XcO0uMnpjPj5pADoLvw4ppWS19EPQXiYBoRo3zbnp1x1EmS09hTfRbpK dx97R3YUG6bTVZd6J71bnNq1cM9tOXWgYl8/uhXkC78JVIG0uGympkAr03Dgm2hvObp1a2lJD/xlk EWIQOsVk8xVTqHR9qqA1Lap5cKIKRAHPpZ4Jq3opqReMQAdkfU321T9yXz3OwFmjoD1M611+4+yhJ gkA4p4FcDYw94vwxaP0t3g9D7UPamWM9VYGyLfoNiXXUKKK4VJSIMVc2HIvV5wTrrH/Gd3CdfJKQs 0Wezhsy9q76ejUSVrUCQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqrHR-000EFt-0p; Thu, 12 Oct 2023 08:42:53 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqrH5-000E0M-2k for openwrt-devel@lists.openwrt.org; Thu, 12 Oct 2023 08:42:33 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-50573e85ee0so955399e87.3 for ; Thu, 12 Oct 2023 01:42:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697100149; x=1697704949; darn=lists.openwrt.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=8qhjcstDdWHYTDL3NCyeuM7cRjkIGvStx1Zqm/R6Db0=; b=DinZ+gqrNraGU9Tkvv+CUaEVAdC7iRWyqOIcNxiB8mL66CNO/NrkuMuF146le+XgXP bJMTpI9Ouz6gSD034QDXLfAqdzlO013FU0pahGTml0njjNg2ZuRNiP0Ebk2oYJVC87KG Yqkmn72DmLcstB8N/hAZs87Ri79nVYiZwzSTwsqHCYwGrFCwR4xySjQKie0tRZITD6bq lvYk13uk0JLDt4+fSTY45KDxncyYEauQiT8Z/e5zqg60hldRU1HiFadDcX2WS8Ft2j/j V9Q6CIThmsK3Ko0ECRp4h3bhyrfMpsSaUXZNGA9bL5wtRw/F4kRFY1SnLkYVyLU1hoFA Alrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697100149; x=1697704949; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8qhjcstDdWHYTDL3NCyeuM7cRjkIGvStx1Zqm/R6Db0=; b=fkQChE1kWVOfXV8DjTTjE2obGsMlWLzfXbaBECDUhTdgqkosup+8UNIHRa4nSTEslR wwAYYTZXWkHfldc7lQEOtJoyif36KjViA0DEnE/eaYbbY+ILrCfwbmGPTPohl3KT7Iz4 w0l5rmBBHAk7QJS3j+HG38lis1y3rNEDh7PxMoDnZRUDSF5DP7NYHOfTTDlg/ij26m2Y VMsbOA7V1XCF0LvM6/nJE96kpbHjsv0J7JPCgIyvFGwK9f8UG8gzIbAPMp2m0aoqfAbb Q9EiuACvwVLdd6KxHr9EX3owCBtZcuChk/tDBOMqpnABExp76BA5ziH44SZ+0jGkIdvl 1jFw== X-Gm-Message-State: AOJu0YzYc10m3KMHZGXs0KMQzlkbH5t2gtnox53EVilLLsUjzJawLSM5 vU3WVn7rPg/82fD93AFLYln2ZJBJ5q1GaHlkiKI= X-Google-Smtp-Source: AGHT+IFmdB87PdacF58CTT79Fh3/nuCUZR0wdwSOa73nQmECMqtmtzJpmV4Dl6Gkq49HU5EPHwUDdQ== X-Received: by 2002:ac2:446b:0:b0:4fe:3724:fdae with SMTP id y11-20020ac2446b000000b004fe3724fdaemr17215060lfl.66.1697100149112; Thu, 12 Oct 2023 01:42:29 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id o9-20020a05651238a900b00501c8959f6asm2705043lft.98.2023.10.12.01.42.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 01:42:28 -0700 (PDT) From: Linus Walleij Date: Thu, 12 Oct 2023 10:42:25 +0200 Subject: [PATCH v3 10/10] ixp4xx: Add hdparm script MIME-Version: 1.0 Message-Id: <20231012-ixp4xx-v3-10-e09c74712c0b@linaro.org> References: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> In-Reply-To: <20231012-ixp4xx-v3-0-e09c74712c0b@linaro.org> To: Imre Kaloz , Krzysztof Halasa , Howard Harte , openwrt-devel@lists.openwrt.org X-Mailer: b4 0.12.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231012_014232_072095_4157AC34 X-CRM114-Status: GOOD ( 10.27 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This script will make sure to spin down harddrives on IXP4xx NAS devices such as the NSLU2 and siblings after 1 minute of inactivity. Signed-off-by: Linus Walleij --- target/linux/ixp4xx/base-files/etc/board.d/03_hdparm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:132 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hauke Mehrtens , Linus Walleij , Raylynn Knight Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This script will make sure to spin down harddrives on IXP4xx NAS devices such as the NSLU2 and siblings after 1 minute of inactivity. Signed-off-by: Linus Walleij --- target/linux/ixp4xx/base-files/etc/board.d/03_hdparm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/target/linux/ixp4xx/base-files/etc/board.d/03_hdparm b/target/linux/ixp4xx/base-files/etc/board.d/03_hdparm new file mode 100644 index 000000000000..27f2b760420e --- /dev/null +++ b/target/linux/ixp4xx/base-files/etc/board.d/03_hdparm @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: GPL-2.0-only +# Spin down drives after one minute if inactive + +if [ ! -n "$(command -v hdparm)" ]; then + exit 0 +fi + +DISKS=$(find /dev/sd[a-z] 2>/dev/null) +for DISK in $DISKS +do + if [ -b $DISK ] ; then + hdparm -S 12 $DISK > /dev/null + fi +done