mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
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:
@@ -64,7 +64,7 @@
|
|||||||
|
|
||||||
<!-- Drivers -->
|
<!-- Drivers -->
|
||||||
<option name="CONFIG_DRIVER_PCI" type="boolean" value="true"/>
|
<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_DRIVER_IDE" type="boolean" value="true"/>
|
||||||
<option name="CONFIG_IDE_NUM_CHANNELS" type="integer" value="2"/>
|
<option name="CONFIG_IDE_NUM_CHANNELS" type="integer" value="2"/>
|
||||||
<option name="CONFIG_IDE_FIRST_UNIT" type="integer" value="1"/>
|
<option name="CONFIG_IDE_FIRST_UNIT" type="integer" value="1"/>
|
||||||
|
|||||||
@@ -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,
|
snprintf(nodebuff, sizeof(nodebuff), "%s/" DEV_NAME, path,
|
||||||
current_channel);
|
current_channel);
|
||||||
REGISTER_NAMED_NODE(ob_ide_ctrl, nodebuff);
|
REGISTER_NAMED_NODE(ob_ide_ctrl, nodebuff);
|
||||||
|
#ifdef CONFIG_DEBUG_IDE
|
||||||
printk(DEV_NAME": [io ports 0x%x-0x%x,0x%x]\n",
|
printk(DEV_NAME": [io ports 0x%x-0x%x,0x%x]\n",
|
||||||
current_channel, chan->io_regs[0],
|
current_channel, chan->io_regs[0],
|
||||||
chan->io_regs[0] + 7, chan->io_regs[8]);
|
chan->io_regs[0] + 7, chan->io_regs[8]);
|
||||||
|
#endif
|
||||||
|
|
||||||
for (j = 0; j < 2; j++) {
|
for (j = 0; j < 2; j++) {
|
||||||
struct ide_drive *drive = &chan->drives[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)
|
if (!drive->present)
|
||||||
continue;
|
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) {
|
switch (drive->media) {
|
||||||
case ide_media_floppy:
|
case ide_media_floppy:
|
||||||
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";
|
media = "disk";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#ifdef CONFIG_DEBUG_IDE
|
||||||
printk("%s]: %s\n", media, drive->model);
|
printk("%s]: %s\n", media, drive->model);
|
||||||
|
#endif
|
||||||
snprintf(nodebuff, sizeof(nodebuff),
|
snprintf(nodebuff, sizeof(nodebuff),
|
||||||
"%s/" DEV_NAME "/%s", path, current_channel,
|
"%s/" DEV_NAME "/%s", path, current_channel,
|
||||||
media);
|
media);
|
||||||
|
|||||||
Reference in New Issue
Block a user