From 33041ca5358f91b3e0812affb5a6a7ae091aa7f2 Mon Sep 17 00:00:00 2001 From: Bobby The Builder Date: Mon, 1 Nov 2021 13:32:11 -0400 Subject: [PATCH] main/crust: upgrade to 0.5 (MR 2648) [ci:skip-build] already built successfully in CI --- ...a01c9ee211195728e14b4f26dd2e5226561a.patch | 198 ------------------ main/crust/APKBUILD | 7 +- 2 files changed, 3 insertions(+), 202 deletions(-) delete mode 100644 main/crust/0289a01c9ee211195728e14b4f26dd2e5226561a.patch diff --git a/main/crust/0289a01c9ee211195728e14b4f26dd2e5226561a.patch b/main/crust/0289a01c9ee211195728e14b4f26dd2e5226561a.patch deleted file mode 100644 index 6ff812dd8..000000000 --- a/main/crust/0289a01c9ee211195728e14b4f26dd2e5226561a.patch +++ /dev/null @@ -1,198 +0,0 @@ -From 0289a01c9ee211195728e14b4f26dd2e5226561a Mon Sep 17 00:00:00 2001 -From: Samuel Holland -Date: Fri, 28 May 2021 18:26:39 -0500 -Subject: [PATCH] drivers: irq: Remove deprecated GPIO polling code - -Since v5.13, specifically commit 189bef235dd3 ("arm64: dts: allwinner: -Move wakeup-capable IRQs to r_intc"), Linux routes the GPIO EINT IRQs to -R_INTC during suspend and shutdown. This means Crust will detect pending -EINT IRQs using the normal R_INTC status polling code. - -This change completely obsoletes the GPIO register polling code, so that -code and its associated Kconfig options can be removed. - -Signed-off-by: Samuel Holland ---- - configs/pinephone_defconfig | 2 -- - drivers/Kconfig | 1 - - drivers/irq/Kconfig | 51 ---------------------------------- - drivers/irq/irq.c | 29 ++----------------- - drivers/irq/irq.h | 16 ----------- - drivers/irq/sun6i-a31-r-intc.c | 4 +-- - 6 files changed, 4 insertions(+), 99 deletions(-) - delete mode 100644 drivers/irq/Kconfig - delete mode 100644 drivers/irq/irq.h - -diff --git a/configs/pinephone_defconfig b/configs/pinephone_defconfig -index 5e720f1f..875ad025 100644 ---- a/configs/pinephone_defconfig -+++ b/configs/pinephone_defconfig -@@ -1,4 +1,2 @@ --CONFIG_IRQ_POLL_EINT=y --CONFIG_IRQ_POLL_EINT_LAST_BANK=0 - CONFIG_MFD_AXP20X=y - # CONFIG_SERIAL is not set -diff --git a/drivers/Kconfig b/drivers/Kconfig -index 0cb6dae5..5f513533 100644 ---- a/drivers/Kconfig -+++ b/drivers/Kconfig -@@ -8,7 +8,6 @@ menu "Device drivers" - source "dram/Kconfig" - source "cir/Kconfig" - source "clock/Kconfig" --source "irq/Kconfig" - source "regmap/Kconfig" - source "mfd/Kconfig" - source "pmic/Kconfig" -diff --git a/drivers/irq/Kconfig b/drivers/irq/Kconfig -deleted file mode 100644 -index 84330c8b..00000000 ---- a/drivers/irq/Kconfig -+++ /dev/null -@@ -1,51 +0,0 @@ --# --# Copyright © 2020-2021 The Crust Firmware Authors. --# SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-only --# -- --menu "Interrupt and wakeup options" -- --config IRQ_POLL_EINT -- bool "Poll the GPIO controller for EINT IRQs (DEPRECATED)" -- help -- Check the main GPIO controller (the one containing ports -- A through H) for external interrupts (EINTs) when -- polling for wakeup IRQs. -- -- This allows EINT-capable pins on those ports to be used -- as wakeup sources. The pins must be configured as EINT -- pins by Linux before entering suspend. -- -- Note: This option is not needed when using a Linux patch -- set released in 2021. The newer driver plumbs the EINT -- IRQs through to R_INTC. -- -- Say Y if your board has a device connected to port A-H -- that must be able to wake up or turn on the system, and -- you are using an older kernel. Otherwise, say N. -- --if IRQ_POLL_EINT -- --config IRQ_POLL_EINT_FIRST_BANK -- int "First EINT bank to poll" -- range 0 7 -- default 0 -- help -- Begin the EINT polling loop at the nth EINT-capable GPIO -- bank, counting from 0. This number is not related to the -- GPIO bank letter. -- --config IRQ_POLL_EINT_LAST_BANK -- int "Last EINT bank to poll" -- range 0 7 -- default 2 if PLATFORM_A64 -- default 2 if PLATFORM_A83T -- default 7 if PLATFORM_H6 -- help -- End the EINT polling loop at the nth EINT-capable GPIO -- bank, counting from 0. This number is not related to the -- GPIO bank letter. -- --endif -- --endmenu -diff --git a/drivers/irq/irq.c b/drivers/irq/irq.c -index 85efcb32..ae675374 100644 ---- a/drivers/irq/irq.c -+++ b/drivers/irq/irq.c -@@ -4,32 +4,7 @@ - */ - - #include --#include - #include --#include -- --#include "irq.h" -- --#define EINT_CTL_REG(n) (0x20 * (n) + 0x0210) --#define EINT_STATUS_REG(n) (0x20 * (n) + 0x0214) -- --uint32_t --irq_poll_eint(void) --{ -- uint32_t pending = 0; -- --#if CONFIG(IRQ_POLL_EINT) -- uint32_t first = CONFIG_IRQ_POLL_EINT_FIRST_BANK; -- uint32_t last = CONFIG_IRQ_POLL_EINT_LAST_BANK; -- -- for (uint32_t bank = first; bank <= last; ++bank) { -- pending |= mmio_read_32(DEV_PIO + EINT_CTL_REG(bank)) & -- mmio_read_32(DEV_PIO + EINT_STATUS_REG(bank)); -- } --#endif -- -- return pending; --} - - uint32_t WEAK - irq_needs_avcc(void) -@@ -40,11 +15,11 @@ irq_needs_avcc(void) - uint32_t WEAK - irq_needs_vdd_sys(void) - { -- return CONFIG(IRQ_POLL_EINT); -+ return 0; - } - - uint32_t WEAK - irq_poll(void) - { -- return irq_poll_eint(); -+ return 0; - } -diff --git a/drivers/irq/irq.h b/drivers/irq/irq.h -deleted file mode 100644 -index 314329d5..00000000 ---- a/drivers/irq/irq.h -+++ /dev/null -@@ -1,16 +0,0 @@ --/* -- * Copyright © 2021 The Crust Firmware Authors. -- * SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-only -- */ -- --#ifndef IRQ_PRIVATE_H --#define IRQ_PRIVATE_H -- --#include -- --/** -- * Poll for interrupts from the main PIO controller's EINT pins. -- */ --uint32_t irq_poll_eint(void); -- --#endif /* IRQ_PRIVATE_H */ -diff --git a/drivers/irq/sun6i-a31-r-intc.c b/drivers/irq/sun6i-a31-r-intc.c -index 5cd56440..c140994e 100644 ---- a/drivers/irq/sun6i-a31-r-intc.c -+++ b/drivers/irq/sun6i-a31-r-intc.c -@@ -79,7 +79,7 @@ irq_needs_avcc(void) - uint32_t - irq_needs_vdd_sys(void) - { -- uint32_t enabled = CONFIG(IRQ_POLL_EINT); -+ uint32_t enabled = 0; - - /* Only read registers with relevant bits. */ - for (int i = 0; i < NUM_MUX_REGS; ++i) { -@@ -96,7 +96,7 @@ irq_needs_vdd_sys(void) - uint32_t - irq_poll(void) - { -- uint32_t pending = irq_poll_eint(); -+ uint32_t pending = 0; - - for (int i = 0; i < NUM_IRQ_REGS; ++i) - pending |= mmio_read_32(DEV_R_INTC + INTC_IRQ_PEND_REG(i)); diff --git a/main/crust/APKBUILD b/main/crust/APKBUILD index 48f9caf36..8f920da15 100644 --- a/main/crust/APKBUILD +++ b/main/crust/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: Martijn Braam pkgname=crust -pkgver=0.4 +pkgver=0.5 pkgrel=0 pkgdesc="SCP firmware for sunxi SoCs" arch="aarch64" @@ -8,7 +8,7 @@ url="https://github.com/crust-firmware/crust" license="BSD-1-Clause AND BSD-3-Clause AND GPL-2.0-only and MIT" makedepends="gcc-or1k-elf binutils-or1k-elf dtc bison flex" source="https://github.com/crust-firmware/crust/archive/v$pkgver/crust-v$pkgver.tar.gz - 0289a01c9ee211195728e14b4f26dd2e5226561a.patch" +" options="!check !archcheck !tracedeps pmb:cross-native" # No tests build() { @@ -20,6 +20,5 @@ package() { install -D -m644 build/scp/scp.bin "$pkgdir"/usr/share/crust/pinephone/scp.bin } sha512sums=" -c6cd3b001ed3573c1737d07e68871740ae5df152d3dcb33358378f8e91ef599f6141bc4fc8aa66d2bc6d9be510da927cfab389e36e9f7f25bdad02f778acac03 crust-v0.4.tar.gz -3e9271a9c2850f2c8864502b2db19b9c42c8c336ee8b4e31077fdb11c7ccdabcc8353f13b2d58330a01c2aa574c08e315ec75685ba39689ec51900f9c001862f 0289a01c9ee211195728e14b4f26dd2e5226561a.patch +1a3811053fd3a27285a1377888ab5b36e9363a2f5818f69966eb7f5214e571475a2a7865b9e1b68387940a9a7e9dc3841d2458544c155aecc5b9da041eb946ba crust-v0.5.tar.gz "