Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Remember / use sc_verid
details: https://anonhg.NetBSD.org/src/rev/d85940545d7e
branches: trunk
changeset: 970321:d85940545d7e
user: skrll <skrll%NetBSD.org@localhost>
date: Fri Mar 20 17:07:17 2020 +0000
description:
Remember / use sc_verid
diffstat:
sys/dev/ic/dwc_mmc.c | 12 ++++++------
sys/dev/ic/dwc_mmc_var.h | 3 ++-
2 files changed, 8 insertions(+), 7 deletions(-)
diffs (51 lines):
diff -r 1824853c499b -r d85940545d7e sys/dev/ic/dwc_mmc.c
--- a/sys/dev/ic/dwc_mmc.c Fri Mar 20 17:02:16 2020 +0000
+++ b/sys/dev/ic/dwc_mmc.c Fri Mar 20 17:07:17 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_mmc.c,v 1.24 2020/03/20 06:18:45 skrll Exp $ */
+/* $NetBSD: dwc_mmc.c,v 1.25 2020/03/20 17:07:17 skrll Exp $ */
/*-
* Copyright (c) 2014-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc_mmc.c,v 1.24 2020/03/20 06:18:45 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc_mmc.c,v 1.25 2020/03/20 17:07:17 skrll Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -807,11 +807,11 @@
{
uint32_t val;
+ val = MMC_READ(sc, DWC_MMC_VERID);
+ sc->sc_verid = __SHIFTOUT(val, DWC_MMC_VERID_ID);
+
if (sc->sc_fifo_reg == 0) {
- val = MMC_READ(sc, DWC_MMC_VERID);
- const u_int id = __SHIFTOUT(val, DWC_MMC_VERID_ID);
-
- if (id < DWC_MMC_VERID_240A)
+ if (sc->sc_verid < DWC_MMC_VERID_240A)
sc->sc_fifo_reg = 0x100;
else
sc->sc_fifo_reg = 0x200;
diff -r 1824853c499b -r d85940545d7e sys/dev/ic/dwc_mmc_var.h
--- a/sys/dev/ic/dwc_mmc_var.h Fri Mar 20 17:02:16 2020 +0000
+++ b/sys/dev/ic/dwc_mmc_var.h Fri Mar 20 17:07:17 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_mmc_var.h,v 1.13 2020/01/23 23:53:55 jmcneill Exp $ */
+/* $NetBSD: dwc_mmc_var.h,v 1.14 2020/03/20 17:07:17 skrll Exp $ */
/*-
* Copyright (c) 2014-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -45,6 +45,7 @@
u_int sc_clock_freq;
u_int sc_bus_width;
bool sc_card_inited;
+ u_int sc_verid;
void *sc_ih;
kmutex_t sc_lock;
Home |
Main Index |
Thread Index |
Old Index