Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Use BUS_ADDR_{LO,HI}32. NFC.



details:   https://anonhg.NetBSD.org/src/rev/b1127c398b70
branches:  trunk
changeset: 1019250:b1127c398b70
user:      skrll <skrll%NetBSD.org@localhost>
date:      Thu Mar 04 07:29:40 2021 +0000

description:
Use BUS_ADDR_{LO,HI}32.  NFC.

diffstat:

 sys/dev/ic/ahcisata_core.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (33 lines):

diff -r 7bdad26419c2 -r b1127c398b70 sys/dev/ic/ahcisata_core.c
--- a/sys/dev/ic/ahcisata_core.c        Thu Mar 04 07:24:38 2021 +0000
+++ b/sys/dev/ic/ahcisata_core.c        Thu Mar 04 07:29:40 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ahcisata_core.c,v 1.96 2021/03/04 07:24:38 skrll Exp $ */
+/*     $NetBSD: ahcisata_core.c,v 1.97 2021/03/04 07:29:40 skrll Exp $ */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.96 2021/03/04 07:24:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.97 2021/03/04 07:29:40 skrll Exp $");
 
 #include <sys/types.h>
 #include <sys/malloc.h>
@@ -221,10 +221,10 @@
 
        achp = &sc->sc_channels[i];
 
-       AHCI_WRITE(sc, AHCI_P_CLB(i), achp->ahcic_bus_cmdh);
-       AHCI_WRITE(sc, AHCI_P_CLBU(i), (uint64_t)achp->ahcic_bus_cmdh>>32);
-       AHCI_WRITE(sc, AHCI_P_FB(i), achp->ahcic_bus_rfis);
-       AHCI_WRITE(sc, AHCI_P_FBU(i), (uint64_t)achp->ahcic_bus_rfis>>32);
+       AHCI_WRITE(sc, AHCI_P_CLB(i), BUS_ADDR_LO32(achp->ahcic_bus_cmdh));
+       AHCI_WRITE(sc, AHCI_P_CLBU(i), BUS_ADDR_HI32(achp->ahcic_bus_cmdh));
+       AHCI_WRITE(sc, AHCI_P_FB(i), BUS_ADDR_LO32(achp->ahcic_bus_rfis));
+       AHCI_WRITE(sc, AHCI_P_FBU(i), BUS_ADDR_HI32(achp->ahcic_bus_rfis));
 }
 
 static void



Home | Main Index | Thread Index | Old Index