From c8eb20cb4f6c0572e76cf0cfd008af59d501ab7c Mon Sep 17 00:00:00 2001 From: Merlijn Wajer Date: Mon, 22 Nov 2021 11:41:43 +0100 Subject: [PATCH] Remove patched moved into main branch --- ...-utils-add-support-for-componants-pr.patch | 125 ------------ debian/patches/0001-maemo-leste-quirks.patch | 77 ------- ...-mapphone-add-interrupt-for-headphon.patch | 27 --- ...eadphone-jack-plug-detection-support.patch | 190 ------------------ ...m-handling-for-hs-emu-interrupt-save.patch | 157 --------------- debian/patches/fbdev.patch | 46 ----- debian/patches/series | 6 - 7 files changed, 628 deletions(-) delete mode 100644 debian/patches/0001-ASoC-simple-card-utils-add-support-for-componants-pr.patch delete mode 100644 debian/patches/0001-maemo-leste-quirks.patch delete mode 100644 debian/patches/0002-ARM-dts-motorola-mapphone-add-interrupt-for-headphon.patch delete mode 100644 debian/patches/0003-ASoC-cpcap-add-headphone-jack-plug-detection-support.patch delete mode 100644 debian/patches/0005-arm-omap4-fix-cpu-pm-handling-for-hs-emu-interrupt-save.patch delete mode 100644 debian/patches/fbdev.patch diff --git a/debian/patches/0001-ASoC-simple-card-utils-add-support-for-componants-pr.patch b/debian/patches/0001-ASoC-simple-card-utils-add-support-for-componants-pr.patch deleted file mode 100644 index fd93e66b2bfbc..0000000000000 --- a/debian/patches/0001-ASoC-simple-card-utils-add-support-for-componants-pr.patch +++ /dev/null @@ -1,125 +0,0 @@ -From: Carl Philipp Klemm -Date: Fri, 29 Oct 2021 12:11:48 +0200 -Subject: [PATCH 1/3] ASoC: simple-card-utils: add support for componants - provideing jack events via set_jack - -This allows componants that want a jack to report state on to do so by calling -set_jack on components implementing this funciton. - -Signed-off-by: Carl Philipp Klemm ---- - include/sound/simple_card_utils.h | 6 ++-- - sound/soc/generic/simple-card-utils.c | 46 ++++++++++++++++++--------- - 2 files changed, 34 insertions(+), 18 deletions(-) - -diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h -index 51b3b485a92e..547ad537613d 100644 ---- a/include/sound/simple_card_utils.h -+++ b/include/sound/simple_card_utils.h -@@ -57,8 +57,8 @@ struct asoc_simple_priv { - struct prop_nums num; - unsigned int mclk_fs; - } *dai_props; -- struct asoc_simple_jack hp_jack; -- struct asoc_simple_jack mic_jack; -+ struct asoc_simple_jack *hp_jack; -+ struct asoc_simple_jack *mic_jack; - struct snd_soc_dai_link *dai_link; - struct asoc_simple_dai *dais; - struct snd_soc_dai_link_component *dlcs; -@@ -173,7 +173,7 @@ int asoc_simple_parse_pin_switches(struct snd_soc_card *card, - char *prefix); - - int asoc_simple_init_jack(struct snd_soc_card *card, -- struct asoc_simple_jack *sjack, -+ struct asoc_simple_jack **sjack, - int is_hp, char *prefix, char *pin); - int asoc_simple_init_priv(struct asoc_simple_priv *priv, - struct link_info *li); -diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c -index 10c63b73900c..794ecac3bfaf 100644 ---- a/sound/soc/generic/simple-card-utils.c -+++ b/sound/soc/generic/simple-card-utils.c -@@ -395,6 +395,7 @@ int asoc_simple_dai_init(struct snd_soc_pcm_runtime *rtd) - struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card); - struct simple_dai_props *props = simple_priv_to_props(priv, rtd->num); - struct asoc_simple_dai *dai; -+ struct snd_soc_component *component; - int i, ret; - - for_each_prop_dai_codec(props, i, dai) { -@@ -412,6 +413,18 @@ int asoc_simple_dai_init(struct snd_soc_pcm_runtime *rtd) - if (ret < 0) - return ret; - -+ for_each_rtd_components(rtd, i, component) { -+ if (component->driver->set_jack) { -+ if (!priv->hp_jack) { -+ priv->hp_jack = devm_kzalloc(priv->snd_card.dev, sizeof(*priv->hp_jack), GFP_KERNEL); -+ snd_soc_card_jack_new(&priv->snd_card, "Headphones", SND_JACK_HEADPHONE, -+ &priv->hp_jack->jack, -+ NULL, 0); -+ } -+ snd_soc_component_set_jack(component, &priv->hp_jack->jack, NULL); -+ } -+ } -+ - return 0; - } - EXPORT_SYMBOL_GPL(asoc_simple_dai_init); -@@ -554,7 +567,7 @@ int asoc_simple_parse_pin_switches(struct snd_soc_card *card, - EXPORT_SYMBOL_GPL(asoc_simple_parse_pin_switches); - - int asoc_simple_init_jack(struct snd_soc_card *card, -- struct asoc_simple_jack *sjack, -+ struct asoc_simple_jack **sjack, - int is_hp, char *prefix, - char *pin) - { -@@ -569,8 +582,6 @@ int asoc_simple_init_jack(struct snd_soc_card *card, - if (!prefix) - prefix = ""; - -- sjack->gpio.gpio = -ENOENT; -- - if (is_hp) { - snprintf(prop, sizeof(prop), "%shp-det-gpio", prefix); - pin_name = pin ? pin : "Headphones"; -@@ -588,21 +599,26 @@ int asoc_simple_init_jack(struct snd_soc_card *card, - return -EPROBE_DEFER; - - if (gpio_is_valid(det)) { -- sjack->pin.pin = pin_name; -- sjack->pin.mask = mask; -+ struct asoc_simple_jack *sjack_d; -+ -+ sjack = devm_kzalloc(dev, sizeof(*(*sjack)), GFP_KERNEL); -+ sjack_d = *sjack; -+ -+ sjack_d->pin.pin = pin_name; -+ sjack_d->pin.mask = mask; - -- sjack->gpio.name = gpio_name; -- sjack->gpio.report = mask; -- sjack->gpio.gpio = det; -- sjack->gpio.invert = !!(flags & OF_GPIO_ACTIVE_LOW); -- sjack->gpio.debounce_time = 150; -+ sjack_d->gpio.name = gpio_name; -+ sjack_d->gpio.report = mask; -+ sjack_d->gpio.gpio = det; -+ sjack_d->gpio.invert = !!(flags & OF_GPIO_ACTIVE_LOW); -+ sjack_d->gpio.debounce_time = 150; - - snd_soc_card_jack_new(card, pin_name, mask, -- &sjack->jack, -- &sjack->pin, 1); -+ &sjack_d->jack, -+ &sjack_d->pin, 1); - -- snd_soc_jack_add_gpios(&sjack->jack, 1, -- &sjack->gpio); -+ snd_soc_jack_add_gpios(&sjack_d->jack, 1, -+ &sjack_d->gpio); - } - - return 0; diff --git a/debian/patches/0001-maemo-leste-quirks.patch b/debian/patches/0001-maemo-leste-quirks.patch deleted file mode 100644 index 9997bd449e5e3..0000000000000 --- a/debian/patches/0001-maemo-leste-quirks.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff --git a/Makefile b/Makefile -index 5e7c1d854441..abe4da154c40 100644 ---- a/Makefile -+++ b/Makefile -@@ -1522,7 +1522,7 @@ CLEAN_FILES += include/ksym vmlinux.symvers modules-only.symvers \ - # Directories & files removed with 'make mrproper' - MRPROPER_FILES += include/config include/generated \ - arch/$(SRCARCH)/include/generated .tmp_objdiff \ -- debian snap tar-install \ -+ snap tar-install \ - .config .config.old .version \ - Module.symvers \ - certs/signing_key.pem certs/signing_key.x509 \ -diff --git a/scripts/package/builddeb b/scripts/package/builddeb -index 91a502bb97e8..aba68a686269 100755 ---- a/scripts/package/builddeb -+++ b/scripts/package/builddeb -@@ -101,15 +101,15 @@ deploy_libc_headers () { - - # move asm headers to /usr/include//asm to match the structure - # used by Debian-based distros (to support multi-arch) -- host_arch=$(dpkg-architecture -a$(cat debian/arch) -qDEB_HOST_MULTIARCH) -- mkdir $pdir/usr/include/$host_arch -- mv $pdir/usr/include/asm $pdir/usr/include/$host_arch/ -+ #host_arch=$(dpkg-architecture -a$(cat debian/arch) -qDEB_HOST_MULTIARCH) -+ #mkdir $pdir/usr/include/$host_arch -+ #mv $pdir/usr/include/asm $pdir/usr/include/$host_arch/ - } - - version=$KERNELRELEASE - tmpdir=debian/linux-image - dbg_dir=debian/linux-image-dbg --packagename=linux-image-$version -+packagename=linux-image-droid4 - dbg_packagename=$packagename-dbg - - if [ "$ARCH" = "um" ] ; then -@@ -200,9 +200,23 @@ set -e - export DEB_MAINT_PARAMS="\$*" - - # Tell initramfs builder whether it's wanted --export INITRD=$(if_enabled_echo CONFIG_BLK_DEV_INITRD Yes No) -+export INITRD=No - - test -d $debhookdir/$script.d && run-parts --arg="$version" --arg="/$installed_image_path" $debhookdir/$script.d -+ -+case "$script" in -+postinst) -+ depmod $version -+ mkdir -p /boot/boot -+ rm -f /boot/boot/zImage /boot/boot/omap4-droid4-xt894.dtb /boot/boot/omap4-droid-bionic-xt875.dtb -+ cp -f /boot/vmlinuz-$version /boot/boot/zImage -+ cp -f /usr/lib/linux-image-droid4/omap4-droid4-xt894.dtb /usr/lib/linux-image-droid4/omap4-droid-bionic-xt875.dtb /boot/boot -+ ;; -+postrm) -+ rm -f /boot/boot/zImage /boot/boot/omap4-droid4-xt894.dtb /boot/boot/omap4-droid-bionic-xt875.dtb -+ ;; -+esac -+ - exit 0 - EOF - chmod 755 "$tmpdir/DEBIAN/$script" -@@ -211,11 +225,11 @@ done - if [ "$ARCH" != "um" ]; then - if is_enabled CONFIG_MODULES; then - deploy_kernel_headers debian/linux-headers -- create_package linux-headers-$version debian/linux-headers -+ create_package linux-headers-droid4 debian/linux-headers - fi - -- deploy_libc_headers debian/linux-libc-dev -- create_package linux-libc-dev debian/linux-libc-dev -+ #deploy_libc_headers debian/linux-libc-dev -+ #create_package linux-libc-dev debian/linux-libc-dev - fi - - create_package "$packagename" "$tmpdir" diff --git a/debian/patches/0002-ARM-dts-motorola-mapphone-add-interrupt-for-headphon.patch b/debian/patches/0002-ARM-dts-motorola-mapphone-add-interrupt-for-headphon.patch deleted file mode 100644 index 2987fef340447..0000000000000 --- a/debian/patches/0002-ARM-dts-motorola-mapphone-add-interrupt-for-headphon.patch +++ /dev/null @@ -1,27 +0,0 @@ -From: Carl Philipp Klemm -Date: Fri, 29 Oct 2021 11:48:50 +0200 -Subject: [PATCH 2/3] ARM: dts: motorola-mapphone: add interrupt for headphone - detection - -Signed-off-by: Carl Philipp Klemm ---- - arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi b/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi -index 77eadebdaa1d..e4d12e7bd35a 100644 ---- a/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi -+++ b/arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi -@@ -72,6 +72,9 @@ cpcap_audio: audio-codec { - #address-cells = <1>; - #size-cells = <0>; - -+ interrupts-extended = <&cpcap 9 0>; -+ interrupt-names = "hpplugged"; -+ - port@0 { - reg = <0>; - cpcap_audio_codec0: endpoint { --- -2.33.1 - diff --git a/debian/patches/0003-ASoC-cpcap-add-headphone-jack-plug-detection-support.patch b/debian/patches/0003-ASoC-cpcap-add-headphone-jack-plug-detection-support.patch deleted file mode 100644 index 34e95966d49f5..0000000000000 --- a/debian/patches/0003-ASoC-cpcap-add-headphone-jack-plug-detection-support.patch +++ /dev/null @@ -1,190 +0,0 @@ -From: Carl Philipp Klemm -Date: Fri, 29 Oct 2021 12:14:07 +0200 -Subject: [PATCH 3/3] ASoC: cpcap: add headphone jack plug detection support. - -Signed-off-by: Carl Philipp Klemm ---- - sound/soc/codecs/cpcap.c | 110 +++++++++++++++++++++++++++++++++++---- - 1 file changed, 100 insertions(+), 10 deletions(-) - -diff --git a/sound/soc/codecs/cpcap.c b/sound/soc/codecs/cpcap.c -index 612dd151cd5a..d8643cb92902 100644 ---- a/sound/soc/codecs/cpcap.c -+++ b/sound/soc/codecs/cpcap.c -@@ -15,6 +15,7 @@ - #include - #include - #include -+#include - - /* Register 512 CPCAP_REG_VAUDIOC --- Audio Regulator and Bias Voltage */ - #define CPCAP_BIT_AUDIO_LOW_PWR 6 -@@ -252,8 +253,14 @@ enum cpcap_dai { - }; - - struct cpcap_audio { -+ struct device *dev; - struct snd_soc_component *component; - struct regmap *regmap; -+ struct snd_soc_jack *hp_jack; -+ -+ struct delayed_work jack_detect_work; -+ -+ int hp_irq; - - u16 vendor; - -@@ -603,6 +610,21 @@ static int cpcap_input_left_mux_put_enum(struct snd_kcontrol *kcontrol, - return 0; - } - -+static struct snd_soc_jack_pin headset_jack_pins[] = { -+ { -+ .pin = "Headset Right Playback Route", -+ .mask = SND_JACK_HEADPHONE, -+ }, -+ { -+ .pin = "Headset Left Playback Route", -+ .mask = SND_JACK_HEADPHONE, -+ }, -+ { -+ .pin = "Headphones", -+ .mask = SND_JACK_HEADPHONE, -+ } -+}; -+ - static const struct snd_kcontrol_new cpcap_input_left_mux = - SOC_DAPM_ENUM_EXT("Input Left", cpcap_input_left_mux_enum, - cpcap_input_left_mux_get_enum, -@@ -1561,8 +1583,6 @@ static int cpcap_dai_mux(struct cpcap_audio *cpcap, bool swap_dai_configuration) - u16 voice_mask = BIT(CPCAP_BIT_DIG_AUD_IN); - int err; - -- -- - if (!swap_dai_configuration) { - /* Codec on DAI0, HiFi on DAI1 */ - voice_val = 0; -@@ -1586,6 +1606,46 @@ static int cpcap_dai_mux(struct cpcap_audio *cpcap, bool swap_dai_configuration) - return 0; - } - -+static irqreturn_t cpcap_hp_irq_thread(int irq, void *arg) -+{ -+ struct cpcap_audio *cpcap = arg; -+ int val = -1; -+ bool plugged; -+ -+ regmap_read(cpcap->regmap, CPCAP_REG_INTS1, &val); -+ plugged = val & (1<<9); -+ -+ if (!cpcap->component) -+ { -+ dev_warn(cpcap->dev, "%s called before component is ready.", __func__); -+ return IRQ_HANDLED; -+ } -+ -+ if (!cpcap->hp_jack) -+ { -+ dev_warn(cpcap->dev, "%s called before jack is ready.", __func__); -+ return IRQ_HANDLED; -+ } -+ -+ snd_soc_jack_report(cpcap->hp_jack, plugged ? 0 : SND_JACK_HEADPHONE, SND_JACK_HEADPHONE); -+ -+ return IRQ_HANDLED; -+} -+ -+static int cpcap_set_jack_detect(struct snd_soc_component *component, -+ struct snd_soc_jack *hp_jack, void *data) -+{ -+ struct cpcap_audio *cpcap = snd_soc_component_get_drvdata(component); -+ -+ if (!cpcap->hp_jack) { -+ dev_info(cpcap->dev, "registering jack"); -+ cpcap->hp_jack = hp_jack; -+ snd_soc_jack_add_pins(hp_jack, ARRAY_SIZE(headset_jack_pins), headset_jack_pins); -+ } -+ -+ return 0; -+} -+ - static int cpcap_audio_reset(struct snd_soc_component *component, - bool swap_dai_configuration) - { -@@ -1628,13 +1688,9 @@ static int cpcap_audio_reset(struct snd_soc_component *component, - - static int cpcap_soc_probe(struct snd_soc_component *component) - { -- struct cpcap_audio *cpcap; -+ struct cpcap_audio *cpcap = snd_soc_component_get_drvdata(component); - int err; - -- cpcap = devm_kzalloc(component->dev, sizeof(*cpcap), GFP_KERNEL); -- if (!cpcap) -- return -ENOMEM; -- snd_soc_component_set_drvdata(component, cpcap); - cpcap->component = component; - - cpcap->regmap = dev_get_regmap(component->dev->parent, NULL); -@@ -1657,6 +1713,7 @@ static struct snd_soc_component_driver soc_codec_dev_cpcap = { - .num_dapm_widgets = ARRAY_SIZE(cpcap_dapm_widgets), - .dapm_routes = intercon, - .num_dapm_routes = ARRAY_SIZE(intercon), -+ .set_jack = cpcap_set_jack_detect, - .idle_bias_on = 1, - .use_pmdown_time = 1, - .endianness = 1, -@@ -1665,13 +1722,46 @@ static struct snd_soc_component_driver soc_codec_dev_cpcap = { - - static int cpcap_codec_probe(struct platform_device *pdev) - { -- struct device_node *codec_node = -- of_get_child_by_name(pdev->dev.parent->of_node, "audio-codec"); -+ struct cpcap_audio *cpcap; -+ struct device_node *codec_node; -+ int ret; - -+ codec_node = of_get_child_by_name(pdev->dev.parent->of_node, "audio-codec"); - pdev->dev.of_node = codec_node; - -- return devm_snd_soc_register_component(&pdev->dev, &soc_codec_dev_cpcap, -+ cpcap = devm_kzalloc(&pdev->dev, sizeof(*cpcap), GFP_KERNEL); -+ if (!cpcap) -+ return -ENOMEM; -+ dev_set_drvdata(&pdev->dev, cpcap); -+ -+ ret = devm_snd_soc_register_component(&pdev->dev, &soc_codec_dev_cpcap, - cpcap_dai, ARRAY_SIZE(cpcap_dai)); -+ if (ret < 0) -+ return ret; -+ -+ cpcap->hp_irq = platform_get_irq_byname(pdev, "hpplugged"); -+ if (cpcap->hp_irq < 0) -+ return -ENODEV; -+ -+ cpcap->dev = &pdev->dev; -+ -+ ret = devm_request_threaded_irq(&pdev->dev, cpcap->hp_irq, NULL, -+ cpcap_hp_irq_thread, -+ IRQF_TRIGGER_RISING | -+ IRQF_TRIGGER_FALLING | -+ IRQF_ONESHOT, -+ "cpcap-codec-headphone", cpcap); -+ if (ret) { -+ dev_err(&pdev->dev, "could not get irq: %i\n", -+ ret); -+ return ret; -+ } -+ -+ dev_dbg(cpcap->dev, "dev_dbg %s %px", __func__, cpcap); -+ dev_warn(cpcap->dev, "dev_warn %s %px", __func__, cpcap); -+ printk("printk %s %px", __func__, cpcap); -+ -+ return 0; - } - - static struct platform_driver cpcap_codec_driver = { --- -2.33.1 - diff --git a/debian/patches/0005-arm-omap4-fix-cpu-pm-handling-for-hs-emu-interrupt-save.patch b/debian/patches/0005-arm-omap4-fix-cpu-pm-handling-for-hs-emu-interrupt-save.patch deleted file mode 100644 index cfba7a3867e6b..0000000000000 --- a/debian/patches/0005-arm-omap4-fix-cpu-pm-handling-for-hs-emu-interrupt-save.patch +++ /dev/null @@ -1,157 +0,0 @@ -From: Tony Lindgren -Subject: [PATCH] ARM: OMAP4: Fix cpu_pm handling for HS/EMU interrupt save -Date: Thu, 25 Feb 2021 14:16:12 +0200 - -Since commit 55be2f50336f ("ARM: OMAP2+: Handle errors for cpu_pm") we -allow the drivers to block deeper idle states with cpu_pm notifiers. -Turns out this change causes random hangs on a mostly idle droid4. - -The hang seems to be caused by reconfiguring the MPUSS domain registers -after we have already called irq_save_secure_context(). This happens -on the cpu_pm notifier error path if a driver is busy and returns -NOTIFY_BAD in CPU_CLUSTER_PM_ENTER handling to block the deeper idle -states. Note that this issue does not exist for the GP SoCs, for them -we just save and restore the context in the cpu_pm notifier. - -Let's fix the issue by calling omap4_irq_save_secure_context() later on -after the cpu_pm notifiers are done. And since we have omap-secure.c, -let's move omap4_irq_save_secure_context() there. - -Fixes: 55be2f50336f ("ARM: OMAP2+: Handle errors for cpu_pm") -Reported-by: Carl Philipp Klemm -Reported-by: Merlijn Wajer -Cc: Ivan Jelincic -Cc: Pavel Machek -Cc: Sebastian Reichel -Signed-off-by: Tony Lindgren ---- - arch/arm/mach-omap2/omap-mpuss-lowpower.c | 17 ++++++++++++----- - arch/arm/mach-omap2/omap-secure.c | 16 ++++++++++++++++ - arch/arm/mach-omap2/omap-secure.h | 1 + - arch/arm/mach-omap2/omap-wakeupgen.c | 20 ++++---------------- - 4 files changed, 33 insertions(+), 21 deletions(-) - -diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c -index 9fba98c2313a..e254a53c3cf2 100644 ---- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c -+++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c -@@ -48,6 +48,7 @@ - - #include "soc.h" - #include "common.h" -+#include "omap-secure.h" - #include "omap44xx.h" - #include "omap4-sar-layout.h" - #include "pm.h" -@@ -256,15 +257,21 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state) - - pwrdm_pre_transition(NULL); - -- /* -- * Check MPUSS next state and save interrupt controller if needed. -- * In MPUSS OSWR or device OFF, interrupt controller contest is lost. -- */ -+ /* Check MPUSS next state to see if context is lost */ - mpuss_clear_prev_logic_pwrst(); - if ((pwrdm_read_next_pwrst(mpuss_pd) == PWRDM_POWER_RET) && -- (pwrdm_read_logic_retst(mpuss_pd) == PWRDM_POWER_OFF)) -+ (pwrdm_read_logic_retst(mpuss_pd) == PWRDM_POWER_OFF)) { - save_state = 2; - -+ /* -+ * Save interrupt controller for HS/EMU if needed. In MPUSS OSWR -+ * and device OFF, interrupt controller context is lost. For GP -+ * SoCs, see the cpu_pm notifiers and cpu_pm irq_notifier(). -+ */ -+ if (!cpu && omap_type() != OMAP2_DEVICE_TYPE_GP) -+ omap4_irq_save_secure_context(); -+ } -+ - cpu_clear_prev_logic_pwrst(cpu); - pwrdm_set_next_pwrst(pm_info->pwrdm, power_state); - pwrdm_set_logic_retst(pm_info->pwrdm, cpu_logic_state); -diff --git a/arch/arm/mach-omap2/omap-secure.c b/arch/arm/mach-omap2/omap-secure.c -index 0659ab4cb0af..6b852509d270 100644 ---- a/arch/arm/mach-omap2/omap-secure.c -+++ b/arch/arm/mach-omap2/omap-secure.c -@@ -137,6 +137,22 @@ u32 omap3_save_secure_ram(void __iomem *addr, int size) - } - #endif - -+/* -+ * Save GIC and Wakeupgen interrupt context using secure API for HS/EMU devices. -+ * Must be called after cpu_pm notifiers to avoid reconfiguring MPUSS on the -+ * cpu_pm notifier error path. -+ */ -+void __maybe_unused omap4_irq_save_secure_context(void) -+{ -+ u32 ret; -+ -+ ret = omap_secure_dispatcher(OMAP4_HAL_SAVEGIC_INDEX, -+ FLAG_START_CRITICAL, -+ 0, 0, 0, 0, 0); -+ if (ret != API_HAL_RET_VALUE_OK) -+ pr_err("GIC and Wakeupgen context save failed\n"); -+} -+ - /** - * rx51_secure_dispatcher: Routine to dispatch secure PPA API calls - * @idx: The PPA API index -diff --git a/arch/arm/mach-omap2/omap-secure.h b/arch/arm/mach-omap2/omap-secure.h -index 172069f31616..2befd44d41e3 100644 ---- a/arch/arm/mach-omap2/omap-secure.h -+++ b/arch/arm/mach-omap2/omap-secure.h -@@ -74,6 +74,7 @@ extern phys_addr_t omap_secure_ram_mempool_base(void); - extern int omap_secure_ram_reserve_memblock(void); - extern u32 save_secure_ram_context(u32 args_pa); - extern u32 omap3_save_secure_ram(void __iomem *save_regs, int size); -+extern void omap4_irq_save_secure_context(void); - - extern u32 rx51_secure_dispatcher(u32 idx, u32 process, u32 flag, u32 nargs, - u32 arg1, u32 arg2, u32 arg3, u32 arg4); -diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c -index 8d21e3a3c05f..397edd308ba7 100644 ---- a/arch/arm/mach-omap2/omap-wakeupgen.c -+++ b/arch/arm/mach-omap2/omap-wakeupgen.c -@@ -367,20 +367,6 @@ static void irq_restore_context(void) - wakeupgen_ops->restore_context(); - } - --/* -- * Save GIC and Wakeupgen interrupt context using secure API -- * for HS/EMU devices. -- */ --static void irq_save_secure_context(void) --{ -- u32 ret; -- ret = omap_secure_dispatcher(OMAP4_HAL_SAVEGIC_INDEX, -- FLAG_START_CRITICAL, -- 0, 0, 0, 0, 0); -- if (ret != API_HAL_RET_VALUE_OK) -- pr_err("GIC and Wakeupgen context save failed\n"); --} -- - /* Define ops for context save and restore for each SoC */ - static struct omap_wakeupgen_ops omap4_wakeupgen_ops = { - .save_context = omap4_irq_save_context, -@@ -429,14 +415,16 @@ static void __init irq_hotplug_init(void) - #endif - - #ifdef CONFIG_CPU_PM -+/* -+ * Note that gic context save for HS/EMU devices must be done after the cpu_pm -+ * notifiers, see omap4_irq_save_secure_context(). -+ */ - static int irq_notifier(struct notifier_block *self, unsigned long cmd, void *v) - { - switch (cmd) { - case CPU_CLUSTER_PM_ENTER: - if (omap_type() == OMAP2_DEVICE_TYPE_GP || soc_is_am43xx()) - irq_save_context(); -- else -- irq_save_secure_context(); - break; - case CPU_CLUSTER_PM_EXIT: - if (omap_type() == OMAP2_DEVICE_TYPE_GP || soc_is_am43xx()) --- -2.30.1 diff --git a/debian/patches/fbdev.patch b/debian/patches/fbdev.patch deleted file mode 100644 index 31720a3fc94b8..0000000000000 --- a/debian/patches/fbdev.patch +++ /dev/null @@ -1,46 +0,0 @@ -From bcfb7ccf44a54fa566a12adbdb176683bff94223 Mon Sep 17 00:00:00 2001 -From: Sebastian Reichel -Date: Fri, 30 Apr 2021 01:56:04 +0200 -Subject: [PATCH] drm/omap: get fbdev working for manually updated display - -Running a legacy application, which directly uses /dev/fb0 -currently results in display not being refreshed when the -application mmaps the memory instead of calling write(). - -Deferred IO support will also schedule dirty_work with the -damage collected from the mmap page writes and thus gets -some more legacy applications working. - -Signed-off-by: Sebastian Reichel ---- - drivers/gpu/drm/omapdrm/omap_fbdev.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c -index 42eac6ad12bd..fc3897d2d7cc 100644 ---- a/drivers/gpu/drm/omapdrm/omap_fbdev.c -+++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c -@@ -87,6 +87,11 @@ static const struct fb_ops omap_fb_ops = { - .fb_imageblit = drm_fb_helper_sys_imageblit, - }; - -+static struct fb_deferred_io omap_fb_defio = { -+ .delay = HZ / 20, -+ .deferred_io = drm_fb_helper_deferred_io, -+}; -+ - static int omap_fbdev_create(struct drm_fb_helper *helper, - struct drm_fb_helper_surface_size *sizes) - { -@@ -176,6 +181,9 @@ static int omap_fbdev_create(struct drm_fb_helper *helper, - - drm_fb_helper_fill_info(fbi, helper, sizes); - -+ fbi->fbdefio = &omap_fb_defio; -+ fb_deferred_io_init(fbi); -+ - dev->mode_config.fb_base = dma_addr; - - fbi->screen_buffer = omap_gem_vaddr(fbdev->bo); --- -2.30.2 diff --git a/debian/patches/series b/debian/patches/series index 3f7c7245933b1..0ce65f9b84021 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,10 +1,4 @@ -0001-maemo-leste-quirks.patch 0002-enable-nl80211-testmode.patch 0004-remove-omap2-from-defconfig.patch anbox-support.patch -0005-arm-omap4-fix-cpu-pm-handling-for-hs-emu-interrupt-save.patch -fbdev.patch enable-nftables-and-wireguard.patch -0001-ASoC-simple-card-utils-add-support-for-componants-pr.patch -0002-ARM-dts-motorola-mapphone-add-interrupt-for-headphon.patch -0003-ASoC-cpcap-add-headphone-jack-plug-detection-support.patch