summaryrefslogtreecommitdiff
path: root/sys/dev/sdmmc/sdmmc_cis.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/sdmmc/sdmmc_cis.c')
-rw-r--r--sys/dev/sdmmc/sdmmc_cis.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/sdmmc/sdmmc_cis.c b/sys/dev/sdmmc/sdmmc_cis.c
index 16a6890a8c7..1b4f5584ce4 100644
--- a/sys/dev/sdmmc/sdmmc_cis.c
+++ b/sys/dev/sdmmc/sdmmc_cis.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdmmc_cis.c,v 1.2 2009/10/03 18:42:36 kettenis Exp $ */
+/* $OpenBSD: sdmmc_cis.c,v 1.3 2009/11/11 21:59:16 jasper Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -39,6 +39,8 @@ sdmmc_cisptr(struct sdmmc_function *sf)
{
u_int32_t cisptr = 0;
+ SDMMC_ASSERT_LOCKED(sf->sc);
+
/* XXX where is the per-function CIS pointer register? */
if (sf->number != 0)
return SD_IO_CIS_START;
@@ -47,6 +49,7 @@ sdmmc_cisptr(struct sdmmc_function *sf)
cisptr |= sdmmc_io_read_1(sf, SD_IO_CCCR_CISPTR+0) << 0;
cisptr |= sdmmc_io_read_1(sf, SD_IO_CCCR_CISPTR+1) << 8;
cisptr |= sdmmc_io_read_1(sf, SD_IO_CCCR_CISPTR+2) << 16;
+
return cisptr;
}
@@ -57,6 +60,8 @@ sdmmc_read_cis(struct sdmmc_function *sf, struct sdmmc_cis *cis)
u_int8_t tplcode;
u_int8_t tpllen;
+ SDMMC_ASSERT_LOCKED(sf->sc);
+
bzero(cis, sizeof *cis);
/* XXX read per-function CIS */
@@ -142,6 +147,7 @@ sdmmc_read_cis(struct sdmmc_function *sf, struct sdmmc_cis *cis)
break;
}
}
+
return 0;
}