linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: linux-m68k@lists.linux-m68k.org
Cc: linux-kernel@vger.kernel.org, Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH] m68k: amiga: Fix Denise detection on OCS
Date: Sun, 12 Jan 2020 18:17:05 +0100	[thread overview]
Message-ID: <20200112171705.22600-1-geert@linux-m68k.org> (raw)

The "default" statement for detecting an original Denise chip seems to
be misplaced, causing original Denise chips not being detected.

Fix this by moving it from the outer to the inner "switch" statement.

Fortunately no code relies on this, but the detected version is printed
during boot, and available through /proc/hardware.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
Untested due to lack of hardware.

  - Anyone with an old A2000 with accelerator running Linux?
  - The initital version of Denise does not have the DENISEID register,
    and reading it returns random data (last value seen on the bus).
    Has anyone ever seen it being mis-identified by Linux as Denise HR
    or Lisa?
---
 arch/m68k/amiga/config.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c
index c32ab8041cf6b8dc..95bcd4a13bf86741 100644
--- a/arch/m68k/amiga/config.c
+++ b/arch/m68k/amiga/config.c
@@ -278,11 +278,11 @@ static void __init amiga_identify(void)
 			case 0x08:
 				AMIGAHW_SET(LISA);
 				break;
+			default:
+				AMIGAHW_SET(DENISE);
+				break;
 			}
 			break;
-		default:
-			AMIGAHW_SET(DENISE);
-			break;
 		}
 		switch ((amiga_custom.vposr>>8) & 0x7f) {
 		case 0x00:
-- 
2.17.1


             reply	other threads:[~2020-01-12 17:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-12 17:17 Geert Uytterhoeven [this message]
2020-08-26 11:28 ` [PATCH] m68k: amiga: Fix Denise detection on OCS Geert Uytterhoeven

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=20200112171705.22600-1-geert@linux-m68k.org \
    --to=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    /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;
as well as URLs for NNTP newsgroup(s).