Remove debug printk when IDE debugging is disabled (Laurent Vivier)

git-svn-id: svn://coreboot.org/openbios/openbios-devel@331 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2008-12-31 15:43:34 +00:00
parent 47e9e700d3
commit df2f3e5217
2 changed files with 9 additions and 2 deletions

View File

@@ -64,7 +64,7 @@
<!-- Drivers -->
<option name="CONFIG_DRIVER_PCI" type="boolean" value="true"/>
<option name="CONFIG_DEBUG_PCI" type="boolean" value="true"/>
<option name="CONFIG_DEBUG_PCI" type="boolean" value="false"/>
<option name="CONFIG_DRIVER_IDE" type="boolean" value="true"/>
<option name="CONFIG_IDE_NUM_CHANNELS" type="integer" value="2"/>
<option name="CONFIG_IDE_FIRST_UNIT" type="integer" value="1"/>

View File

@@ -1364,9 +1364,11 @@ int ob_ide_init(const char *path, uint32_t io_port0, uint32_t ctl_port0,
snprintf(nodebuff, sizeof(nodebuff), "%s/" DEV_NAME, path,
current_channel);
REGISTER_NAMED_NODE(ob_ide_ctrl, nodebuff);
#ifdef CONFIG_DEBUG_IDE
printk(DEV_NAME": [io ports 0x%x-0x%x,0x%x]\n",
current_channel, chan->io_regs[0],
chan->io_regs[0] + 7, chan->io_regs[8]);
#endif
for (j = 0; j < 2; j++) {
struct ide_drive *drive = &chan->drives[j];
@@ -1375,7 +1377,10 @@ int ob_ide_init(const char *path, uint32_t io_port0, uint32_t ctl_port0,
if (!drive->present)
continue;
printk(" drive%d [ATA%s ", j, drive->type == ide_type_atapi ? "PI" : "");
#ifdef CONFIG_DEBUG_IDE
printk(" drive%d [ATA%s ", j,
drive->type == ide_type_atapi ? "PI" : "");
#endif
switch (drive->media) {
case ide_media_floppy:
media = "floppy";
@@ -1390,7 +1395,9 @@ int ob_ide_init(const char *path, uint32_t io_port0, uint32_t ctl_port0,
media = "disk";
break;
}
#ifdef CONFIG_DEBUG_IDE
printk("%s]: %s\n", media, drive->model);
#endif
snprintf(nodebuff, sizeof(nodebuff),
"%s/" DEV_NAME "/%s", path, current_channel,
media);