From: Eero Tamminen <oak@helsinkinet.fi>
To: linux-m68k <linux-m68k@lists.linux-m68k.org>
Cc: Michael Schmitz <schmitzmic@gmail.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Eero Tamminen <oak@helsinkinet.fi>
Subject: [PATCH 2/2] m68k: Set reasonable PSG port-A default value
Date: Mon, 23 Sep 2024 00:48:21 +0300 [thread overview]
Message-ID: <20240922214821.16818-2-oak@helsinkinet.fi> (raw)
In-Reply-To: <20240922214821.16818-1-oak@helsinkinet.fi>
Fixes continuous IDE & DSP reset requests on Atari Falcon from 2Hz
floppy media change detection if those bits happen to be set (to
a different value than ROM defaults) before Linux starts.
All successive port-A requests preserve unrelated bits. If bits 4 & 6
are set, that means every PSG port-A request, such as floppy media
change detection, being also Falcon DSP & IDE reset request.
Signed-off-by: Eero Tamminen <oak@helsinkinet.fi>
---
Documentation/arch/m68k/kernel-options.rst | 4 +++-
arch/m68k/atari/config.c | 10 ++++++----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/Documentation/arch/m68k/kernel-options.rst b/Documentation/arch/m68k/kernel-options.rst
index 2008a20b4..cae270018 100644
--- a/Documentation/arch/m68k/kernel-options.rst
+++ b/Documentation/arch/m68k/kernel-options.rst
@@ -674,8 +674,10 @@ items:
set RTS of the MIDI ACIA high
snd6:
set bit 6 of the PSG port A
+ (Falcon: internal speaker on/off, others: monitor jack GPO pin)
snd7:
- set bit 6 of the PSG port A
+ set bit 7 of the PSG port A
+ (Falcon: IDE drive on/off, TT: SCC-A LAN/serial2)
It doesn't make sense to mention a switch more than once (no
difference to only once), but you can give as many switches as you
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c
index b48a0606a..0e4bd90fe 100644
--- a/arch/m68k/atari/config.c
+++ b/arch/m68k/atari/config.c
@@ -188,6 +188,7 @@ early_param("switches", atari_switches_setup);
void __init config_atari(void)
{
unsigned short tos_version;
+ unsigned char porta_init = 0x07;
memset(&atari_hw_present, 0, sizeof(atari_hw_present));
@@ -212,11 +213,12 @@ void __init config_atari(void)
if (atari_switches & ATARI_SWITCH_MIDI)
acia.mid_ctrl = ACIA_DIV16 | ACIA_D8N1S | ACIA_RHTID;
if (atari_switches & (ATARI_SWITCH_SND6|ATARI_SWITCH_SND7)) {
- sound_ym.rd_data_reg_sel = 14;
- sound_ym.wd_data = sound_ym.rd_data_reg_sel |
- ((atari_switches&ATARI_SWITCH_SND6) ? 0x40 : 0) |
- ((atari_switches&ATARI_SWITCH_SND7) ? 0x80 : 0);
+ porta_init |= ((atari_switches&ATARI_SWITCH_SND6) ? 0x40 : 0) |
+ ((atari_switches&ATARI_SWITCH_SND7) ? 0x80 : 0);
}
+ /* Set PSG port-A defaults */
+ sound_ym.rd_data_reg_sel = 14;
+ sound_ym.wd_data = porta_init;
/* ++bjoern:
* Determine hardware present
--
2.39.5
next prev parent reply other threads:[~2024-09-22 21:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-22 21:48 [PATCH 1/2] m68k: Drop Atari EtherNAT support when it's not configured in Eero Tamminen
2024-09-22 21:48 ` Eero Tamminen [this message]
2024-09-22 21:58 ` John Paul Adrian Glaubitz
2024-09-23 8:39 ` Eero Tamminen
2024-09-23 9:04 ` John Paul Adrian Glaubitz
2024-09-24 1:03 ` Michael Schmitz
2024-09-24 20:58 ` Eero Tamminen
2024-09-24 21:09 ` Andreas Schwab
2024-09-24 23:11 ` Eero Tamminen
2024-09-25 17:13 ` Andreas Schwab
2024-09-26 15:41 ` Eero Tamminen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240922214821.16818-2-oak@helsinkinet.fi \
--to=oak@helsinkinet.fi \
--cc=geert@linux-m68k.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=schmitzmic@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox