>From 29cfa8ec164e2d742f98ddb2c5368b70540f5fab Mon Sep 17 00:00:00 2001 From: Arend van Spriel Date: Sun, 23 Nov 2014 10:26:17 +0100 Subject: [PATCH] bcma: dump raw sprom content for debugging Signed-off-by: Arend van Spriel --- drivers/bcma/sprom.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/bcma/sprom.c b/drivers/bcma/sprom.c index efb037f..0c246a4 100644 --- a/drivers/bcma/sprom.c +++ b/drivers/bcma/sprom.c @@ -129,10 +129,16 @@ static u8 bcma_sprom_crc(const u16 *sprom, size_t words) int word; u8 crc = 0xFF; + pr_debug(KBUILD_MODNAME "sprom:"); for (word = 0; word < words - 1; word++) { + if ((word % 10) == 0) + pr_debug("\n\t"); + pr_debug("%04X ", sprom[word]); crc = bcma_crc8(crc, sprom[word] & 0x00FF); crc = bcma_crc8(crc, (sprom[word] & 0xFF00) >> 8); } + if ((word % 10) == 0) + pr_debug("\n"); crc = bcma_crc8(crc, sprom[words - 1] & 0x00FF); crc ^= 0xFF; -- 1.9.1