Fix spelling, pointed out by Stefano and Axel.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36139 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler 2010-04-11 09:52:42 +00:00
parent 86d4795d36
commit ad0b28334d
3 changed files with 39 additions and 39 deletions

View File

@ -581,7 +581,7 @@ ioapic_init(kernel_args *args)
// TODO: remove when the PCI IRQ routing through ACPI is available below
return;
// load acpi modul
// load acpi module
status_t status;
acpi_module_info* acpiModule;
status = get_module(B_ACPI_MODULE_NAME, (module_info**)&acpiModule);
@ -591,7 +591,7 @@ ioapic_init(kernel_args *args)
}
BPrivate::CObjectDeleter<const char, status_t>
acpiModulePutter(B_ACPI_MODULE_NAME, put_module);
// load pci modul
// load pci module
pci_module_info* pciModule;
status = get_module(B_PCI_MODULE_NAME, (module_info**)&pciModule);
if (status != B_OK) {
@ -670,12 +670,12 @@ ioapic_init(kernel_args *args)
// configure apic interrupts assume 1:1 mapping
for (int i = 0; i < table.Count(); i++) {
irq_routing_entry& entry = table.ElementAt(i);
irq_discriptor irqDiscriptor;
read_current_irq(acpiModule, entry.source, &irqDiscriptor);
irq_descriptor irqDescriptor;
read_current_irq(acpiModule, entry.source, &irqDescriptor);
uint32 config = 0;
config |= irqDiscriptor.polarity;
config |= irqDiscriptor.interrupt_mode;
ioapic_configure_io_interrupt(irqDiscriptor.irq, config);
config |= irqDescriptor.polarity;
config |= irqDescriptor.interrupt_mode;
ioapic_configure_io_interrupt(irqDescriptor.irq, config);
}
// prefer the ioapic over the normal pic

View File

@ -25,7 +25,7 @@ const int kIRQDescriptor = 0x04;
const char* kACPIPciRootName = "PNP0A03";
irq_discriptor::irq_discriptor()
irq_descriptor::irq_descriptor()
:
irq(0),
shareable(false),
@ -37,10 +37,10 @@ irq_discriptor::irq_discriptor()
void
print_irq_discriptor(irq_discriptor* discriptor)
print_irq_descriptor(irq_descriptor* descriptor)
{
for (int i = 0; i < 16; i++) {
if (discriptor->irq >> i & 0x01)
if (descriptor->irq >> i & 0x01)
dprintf("interrupt: %i\n", i);
}
@ -50,9 +50,9 @@ print_irq_discriptor(irq_discriptor* discriptor)
const char* edgeTriggeredString = " edge triggered";
dprintf("shareable: %i, polarity: %s, interrupt_mode: %s\n",
discriptor->shareable, discriptor->polarity == B_HIGH_ACTIVE_POLARITY
descriptor->shareable, descriptor->polarity == B_HIGH_ACTIVE_POLARITY
? activeHighString : activeLowString,
discriptor->interrupt_mode == B_LEVEL_TRIGGERED ? levelTriggeredString
descriptor->interrupt_mode == B_LEVEL_TRIGGERED ? levelTriggeredString
: edgeTriggeredString);
}
@ -181,8 +181,8 @@ read_irq_routing_table(pci_module_info *pci, acpi_module_info* acpi,
status_t
read_irq_discriptor(acpi_module_info* acpi, acpi_handle device,
const char* method, irq_discriptor* discriptor)
read_irq_descriptor(acpi_module_info* acpi, acpi_handle device,
const char* method, irq_descriptor* descriptor)
{
acpi_data buffer;
buffer.pointer = NULL;
@ -201,7 +201,7 @@ read_irq_discriptor(acpi_module_info* acpi, acpi_handle device,
int8* resourcePointer = (int8*)resourceBuffer[0].data.buffer.buffer;
int8 integer = resourcePointer[0];
if (integer >> 3 != kIRQDescriptor) {
TRACE("resource is not a irq discriptor\n");
TRACE("resource is not a irq descriptor\n");
return B_ERROR;
}
@ -211,9 +211,9 @@ read_irq_discriptor(acpi_module_info* acpi, acpi_handle device,
return B_ERROR;
}
discriptor->irq = resourcePointer[2];
discriptor->irq = discriptor->irq << 8;
discriptor->irq |= resourcePointer[1];
descriptor->irq = resourcePointer[2];
descriptor->irq = descriptor->irq << 8;
descriptor->irq |= resourcePointer[1];
// if size equal 2 we are don't else read the third entry
if (size == 2)
@ -223,12 +223,12 @@ read_irq_discriptor(acpi_module_info* acpi, acpi_handle device,
int bit;
bit = irqInfo & 0x01;
discriptor->interrupt_mode = (bit == 0) ? B_LEVEL_TRIGGERED
descriptor->interrupt_mode = (bit == 0) ? B_LEVEL_TRIGGERED
: B_EDGE_TRIGGERED;
bit = irqInfo >> 3 & 0x01;
discriptor->polarity = (bit == 0) ? B_HIGH_ACTIVE_POLARITY
descriptor->polarity = (bit == 0) ? B_HIGH_ACTIVE_POLARITY
: B_LOW_ACTIVE_POLARITY;
discriptor->shareable = irqInfo >> 4 & 0x01;
descriptor->shareable = irqInfo >> 4 & 0x01;
return B_OK;
}
@ -236,39 +236,39 @@ read_irq_discriptor(acpi_module_info* acpi, acpi_handle device,
status_t
read_current_irq(acpi_module_info* acpi, acpi_handle device,
irq_discriptor* discriptor)
irq_descriptor* descriptor)
{
return read_irq_discriptor(acpi, device, "_CRS", discriptor);
return read_irq_descriptor(acpi, device, "_CRS", descriptor);
}
status_t
read_possible_irq(acpi_module_info* acpi, acpi_handle device,
irq_discriptor* discriptor)
irq_descriptor* descriptor)
{
return read_irq_discriptor(acpi, device, "_PRS", discriptor);
return read_irq_descriptor(acpi, device, "_PRS", descriptor);
}
status_t
set_acpi_irq(acpi_module_info* acpi, acpi_handle device,
irq_discriptor* discriptor)
irq_descriptor* descriptor)
{
acpi_object_type outBuffer;
outBuffer.object_type = ACPI_TYPE_BUFFER;
int8 data[4];
data[0] = 0x23;
data[1] = discriptor->irq & 0xFF;
data[2] = discriptor->irq >> 8;
data[1] = descriptor->irq & 0xFF;
data[2] = descriptor->irq >> 8;
data[3] = 0;
int8 bit;
bit = (discriptor->interrupt_mode == B_HIGH_ACTIVE_POLARITY) ? 0 : 1;
bit = (descriptor->interrupt_mode == B_HIGH_ACTIVE_POLARITY) ? 0 : 1;
data[3] |= bit;
bit = (discriptor->polarity == B_LEVEL_TRIGGERED) ? 0 : 1;
bit = (descriptor->polarity == B_LEVEL_TRIGGERED) ? 0 : 1;
data[3] |= bit << 3;
bit = discriptor->shareable ? 1 : 0;
bit = descriptor->shareable ? 1 : 0;
data[3] |= bit << 4;
outBuffer.data.buffer.length = sizeof(data);

View File

@ -26,9 +26,9 @@ struct irq_routing_entry
typedef Vector<irq_routing_entry> IRQRoutingTable;
struct irq_discriptor
struct irq_descriptor
{
irq_discriptor();
irq_descriptor();
// bit 0 is interrupt 0, bit 2 is interrupt 2, and so on
int16 irq;
bool shareable;
@ -39,21 +39,21 @@ struct irq_discriptor
};
void print_irq_discriptor(irq_discriptor* discriptor);
void print_irq_descriptor(irq_descriptor* descriptor);
void print_irq_routing_table(IRQRoutingTable* table);
status_t read_irq_routing_table(pci_module_info *pci, acpi_module_info* acpi,
IRQRoutingTable* table);
status_t read_irq_discriptor(acpi_module_info* acpi, acpi_handle device,
const char* method, irq_discriptor* discriptor);
status_t read_irq_descriptor(acpi_module_info* acpi, acpi_handle device,
const char* method, irq_descriptor* descriptor);
status_t read_current_irq(acpi_module_info* acpi, acpi_handle device,
irq_discriptor* discriptor);
irq_descriptor* descriptor);
status_t read_possible_irq(acpi_module_info* acpi, acpi_handle device,
irq_discriptor* discriptor);
irq_descriptor* descriptor);
status_t set_acpi_irq(acpi_module_info* acpi, acpi_handle device,
irq_discriptor* discriptor);
irq_descriptor* descriptor);
#endif