+ /* Initialize channel. */
+ snprintf (c->name, sizeof c->name, "ide%d", channel);
+ switch (channel)
+ {
+ case 0:
+ c->reg_base = 0x1f0;
+ c->irq = 14 + 0x20;
+ break;
+ case 1:
+ c->reg_base = 0x170;
+ c->irq = 15 + 0x20;
+ break;
+ default:
+ NOT_REACHED ();
+ }
+ c->expecting_interrupt = false;
+ sema_init (&c->completion_wait, 0, c->name);
+
+ /* Initialize devices. */