Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/next68k/stand/boot Make sure to specify volatile ex...



details:   https://anonhg.NetBSD.org/src/rev/809ac1448e3a
branches:  trunk
changeset: 373403:809ac1448e3a
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Tue Feb 07 14:27:59 2023 +0000

description:
Make sure to specify volatile explicitly on DMA register accesses.

It looks booting from SCSI disks on next68k have been broken
since NetBSD 1.6 days, but now it works.
Should be pulled up to netbsd-10 and netbsd-9.

diffstat:

 sys/arch/next68k/stand/boot/dmareg.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 6948650fd551 -r 809ac1448e3a sys/arch/next68k/stand/boot/dmareg.h
--- a/sys/arch/next68k/stand/boot/dmareg.h      Tue Feb 07 14:11:16 2023 +0000
+++ b/sys/arch/next68k/stand/boot/dmareg.h      Tue Feb 07 14:27:59 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dmareg.h,v 1.3 2002/09/11 01:46:36 mycroft Exp $       */
+/*     $NetBSD: dmareg.h,v 1.4 2023/02/07 14:27:59 tsutsui Exp $       */
 /*
  * Copyright (c) 1997 Rolf Grossmann
  * All rights reserved.
@@ -55,7 +55,7 @@
                 &~(DMA_ENDALIGNMENT-1))|0x80000000))
 
 struct dma_dev {               /* format of dma device registers */
-       int dd_csr;             /* control & status register */
+       volatile uint32_t dd_csr; /* control & status register */
        char dd_pad[0x3fec];    /* csr not contiguous with next */
        char *dd_saved_next;    /* saved pointers for HW restart */
        char *dd_saved_limit;



Home | Main Index | Thread Index | Old Index