From 64438fb960ff61194141f8af5092c713b36773dc Mon Sep 17 00:00:00 2001 From: mglocker Date: Wed, 22 May 2024 18:10:00 +0000 Subject: [PATCH] Fix some bogus masking for the HCS (Host Controller Status) register. --- sys/dev/ic/ufshcireg.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/ic/ufshcireg.h b/sys/dev/ic/ufshcireg.h index bb1991ed762..702b6046863 100644 --- a/sys/dev/ic/ufshcireg.h +++ b/sys/dev/ic/ufshcireg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ufshcireg.h,v 1.10 2024/05/20 20:08:04 mglocker Exp $ */ +/* $OpenBSD: ufshcireg.h,v 1.11 2024/05/22 18:10:00 mglocker Exp $ */ /* * Copyright (c) 2022 Marcus Glocker @@ -99,10 +99,10 @@ #define UFSHCI_REG_IE_UTRCE (1 << 0) /* RW */ /* Host Controller Status */ #define UFSHCI_REG_HCS 0x30 -#define UFSHCI_REG_HCS_TLUNUTPE(x) ((x << 24) & 0xff000000) /* RO */ -#define UFSHCI_REG_HCS_TTAGUTPE(x) ((x << 16) & 0x00ff0000) /* RO */ -#define UFSHCI_REG_HCS_UTPEC(x) ((x << 12) & 0x0000f000) /* RO */ -#define UFSHCI_REG_HCS_UPMCRS(x) ((x << 8) & 0x00000700) /* RO */ +#define UFSHCI_REG_HCS_TLUNUTPE(x) ((x >> 24) & 0x000000ff) /* RO */ +#define UFSHCI_REG_HCS_TTAGUTPE(x) ((x >> 16) & 0x000000ff) /* RO */ +#define UFSHCI_REG_HCS_UTPEC(x) ((x >> 12) & 0x0000000f) /* RO */ +#define UFSHCI_REG_HCS_UPMCRS(x) ((x >> 8) & 0x00000007) /* RO */ #define UFSHCI_REG_HCS_UCRDY (1 << 3) /* RO */ #define UFSHCI_REG_HCS_UTMRLRDY (1 << 2) /* RO */ #define UFSHCI_REG_HCS_UTRLRDY (1 << 1) /* RO */ -- 2.20.1