Rev 2216 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2216 | Rev 9499 | ||
---|---|---|---|
Line 569... | Line 569... | ||
569 | }; |
569 | }; |
570 | 570 | ||
Line 571... | Line 571... | ||
571 | }; |
571 | }; |
Line 572... | Line -... | ||
572 | - | ||
573 | 572 | ||
574 | u32_t drvEntry(int action, char *cmdline) |
573 | uint32_t drvEntry(int action, char *cmdline) |
575 | { |
574 | { |
576 | u32_t retval; |
- | |
577 | 575 | uint32_t retval; |
|
578 | ACPI_STATUS status; |
- | |
579 | 576 | ACPI_STATUS status; |
|
Line 580... | Line 577... | ||
580 | int i; |
577 | int i; |
581 | 578 | ||
Line 582... | Line -... | ||
582 | if(action != 1) |
- | |
583 | return 0; |
- | |
584 | - | ||
585 | if( !dbg_open("/rd/1/drivers/acpi.log") ) |
- | |
586 | { |
- | |
587 | printf("Can't open /rd/1/drivers/acpi.log\nExit\n"); |
- | |
588 | return 0; |
579 | if(action != 1) |
589 | } |
580 | return 0; |
590 | 581 | ||
591 | status = AcpiInitializeSubsystem(); |
582 | status = AcpiInitializeSubsystem(); |
592 | if (status != AE_OK) { |
583 | if (status != AE_OK) { |
593 | dbgprintf("AcpiInitializeSubsystem failed (%s)\n", |
584 | printf("AcpiInitializeSubsystem failed (%s)\n", |
Line 594... | Line 585... | ||
594 | AcpiFormatException(status)); |
585 | AcpiFormatException(status)); |
595 | goto err; |
586 | goto err; |
596 | } |
587 | } |
597 | 588 | ||
598 | status = AcpiInitializeTables (NULL, 16, FALSE); |
589 | status = AcpiInitializeTables (NULL, 16, FALSE); |
599 | if (status != AE_OK) { |
590 | if (status != AE_OK) { |
Line 600... | Line 591... | ||
600 | dbgprintf("AcpiInitializeTables failed (%s)\n", |
591 | printf("AcpiInitializeTables failed (%s)\n", |
601 | AcpiFormatException(status)); |
592 | AcpiFormatException(status)); |
602 | goto err; |
593 | goto err; |
603 | } |
594 | } |
604 | 595 | ||
605 | status = AcpiLoadTables(); |
596 | status = AcpiLoadTables(); |
Line 606... | Line 597... | ||
606 | if (status != AE_OK) { |
597 | if (status != AE_OK) { |
Line 625... | Line 616... | ||
625 | AcpiFormatException(status)); |
616 | AcpiFormatException(status)); |
626 | goto err; |
617 | goto err; |
627 | } |
618 | } |
628 | 619 | ||
Line 629... | Line -... | ||
629 | - | ||
630 | set_pic_mode(IO_APIC); |
620 | set_pic_mode(IO_APIC); |
631 | - | ||
632 | acpi_scan(); |
621 | acpi_scan(); |
633 | - | ||
634 | acpi_init_pci(acpi_root); |
622 | acpi_init_pci(acpi_root); |
635 | - | ||
636 | print_pci_irqs(); |
623 | print_pci_irqs(); |
637 | - | ||
638 | create_dm_list(); |
624 | create_dm_list(); |
639 | - | ||
640 | print_dm_list(); |
625 | print_dm_list(); |
Line 641... | Line 626... | ||
641 | 626 | ||
Line 642... | Line 627... | ||
642 | write_device_dat("/RD/1/DRIVERS/DEVICES.DAT"); |
627 | write_device_dat("/RD/1/DRIVERS/DEVICES.DAT"); |
643 | - | ||
644 | err: |
628 | |
645 | - | ||
646 | return 0; |
629 | err: |
Line 647... | Line 630... | ||
647 | 630 | return 0; |
|
648 | }; |
631 | }; |
649 | 632 | ||
Line 697... | Line 680... | ||
697 | (*(int*)data)++; |
680 | (*(int*)data)++; |
698 | return AE_OK; |
681 | return AE_OK; |
699 | } |
682 | } |
700 | 683 | ||
Line 701... | Line -... | ||
701 | - | ||
702 | static void dm_add_acpi(struct acpi_device *device) |
684 | static void dm_add_acpi(struct acpi_device *device) |
703 | { |
685 | { |
704 | struct acpi_device *child; |
686 | struct acpi_device *child; |
705 | ACPI_DEVICE_INFO *info = NULL; |
687 | ACPI_DEVICE_INFO *info = NULL; |
706 | ACPI_STATUS status; |
688 | ACPI_STATUS status; |
Line 746... | Line 728... | ||
746 | static void create_dm_list() |
728 | static void create_dm_list() |
747 | { |
729 | { |
748 | struct acpi_pci_root *root; |
730 | struct acpi_pci_root *root; |
Line 749... | Line -... | ||
749 | - | ||
750 | 731 | ||
751 | list_for_each_entry(root, &acpi_pci_roots, node) |
732 | list_for_each_entry(root, &acpi_pci_roots, node) |
752 | { |
733 | { |
753 | struct pci_bus *pbus, *tbus; |
734 | struct pci_bus *pbus, *tbus; |