summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2009-06-12 03:06:33 +0000
committerChris Johns <chrisj@rtems.org>2009-06-12 03:06:33 +0000
commitbe72045b51ac0f27a2cd08053d2179b93f72e194 (patch)
treeec742024a4313e2d27d37c89f5bfd393260e0407 /c
parent2009-06-12 Chris Johns <chrisj@rtems.org> (diff)
downloadrtems-be72045b51ac0f27a2cd08053d2179b93f72e194.tar.bz2
2009-06-12 Chris Johns <chrisj@rtems.org>
* ide/ide.c: Format the data output in DEBUG mode.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/i386/pc386/ChangeLog4
-rw-r--r--c/src/lib/libbsp/i386/pc386/ide/ide.c14
2 files changed, 15 insertions, 3 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/ChangeLog b/c/src/lib/libbsp/i386/pc386/ChangeLog
index 728a11091e..a5e514d726 100644
--- a/c/src/lib/libbsp/i386/pc386/ChangeLog
+++ b/c/src/lib/libbsp/i386/pc386/ChangeLog
@@ -1,3 +1,7 @@
+2009-06-12 Chris Johns <chrisj@rtems.org>
+
+ * ide/ide.c: Format the data output in DEBUG mode.
+
2009-05-30 Chris Johns <chrisj@rtems.org>
* ide/ide.c: Add initialisation code to reset the IDE devices and
diff --git a/c/src/lib/libbsp/i386/pc386/ide/ide.c b/c/src/lib/libbsp/i386/pc386/ide/ide.c
index 3e8224d25f..a43f796d11 100644
--- a/c/src/lib/libbsp/i386/pc386/ide/ide.c
+++ b/c/src/lib/libbsp/i386/pc386/ide/ide.c
@@ -360,7 +360,9 @@ void pc386_ide_read_block
uint8_t status_val;
uint16_t *lbuf = (uint16_t*)
((uint8_t*)(bufs[(*cbuf)].buffer) + (*pos));
-
+#ifdef DEBUG_OUT
+ int i32 = 0;
+#endif
while (cnt < block_size)
{
if (!pc386_ide_status_data_ready (port, 100, &status_val))
@@ -376,9 +378,15 @@ void pc386_ide_read_block
inport_word(port+IDE_REGISTER_DATA,*lbuf);
#ifdef DEBUG_OUT
- printk("0x%x ",*lbuf);
+ printk("%04x ",*lbuf);
+ i32++;
+ if (i32 >= 16)
+ {
+ printk("\n");
+ i32 = 0;
+ }
#endif
-
+
lbuf++;
cnt += sizeof(*lbuf);
(*pos) += sizeof(*lbuf);