summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2005-04-20 13:03:48 +0000
committerMarcel Holtmann <marcel@holtmann.org>2005-04-20 13:03:48 +0000
commit303a8bfd8c49de19c482b047c9a95b94e585c1cb (patch)
tree54a02462a88b132c57276c84b76b6d90e0835a95
parent47a63f33131e0cbc19e51d7d4f8a27dcf3fcc6a9 (diff)
Read the boot mode on CSR devices
-rw-r--r--tools/csr.h1
-rw-r--r--tools/hciconfig.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/tools/csr.h b/tools/csr.h
index 513a2cf2..72d4cc4a 100644
--- a/tools/csr.h
+++ b/tools/csr.h
@@ -35,6 +35,7 @@
#define CSR_VARID_FAULT_ARG 0x6806
#define CSR_PSKEY_HOSTIO_MAP_SCO_PCM 0x01ab
+#define CSR_PSKEY_INITIAL_BOOTMODE 0x03cd
char *csr_buildidtostr(uint16_t id);
char *csr_chipvertostr(uint16_t ver, uint16_t rev);
diff --git a/tools/hciconfig.c b/tools/hciconfig.c
index df9b211e..20ef065c 100644
--- a/tools/hciconfig.c
+++ b/tools/hciconfig.c
@@ -1043,7 +1043,7 @@ static void print_rev_ericsson(int dd)
static void print_rev_csr(int dd, uint16_t rev)
{
- uint16_t buildid, chipver, chiprev, maxkeylen, mapsco, error;
+ uint16_t buildid, chipver, chiprev, maxkeylen, mapsco, bootmode, error;
if (csr_read_varid_uint16(dd, 0, CSR_VARID_BUILDID, &buildid) < 0) {
printf("\t%s\n", csr_buildidtostr(rev));
@@ -1064,6 +1064,9 @@ static void print_rev_csr(int dd, uint16_t rev)
if (!csr_read_pskey_uint16(dd, 4, CSR_PSKEY_HOSTIO_MAP_SCO_PCM, &mapsco))
printf("\tSCO mapping: %s\n", mapsco ? "PCM" : "HCI");
+ if (!csr_read_pskey_uint16(dd, 4, CSR_PSKEY_INITIAL_BOOTMODE, &bootmode))
+ printf("\tBoot mode: %d%s\n", bootmode, bootmode ? "" : " (HCI)");
+
if (!csr_read_varid_uint16(dd, 5, CSR_VARID_PANIC_ARG, &error)) {
if (error < 0x0100)
printf("\tPanic code: 0x%02x\n", error);