mach_mpparse.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef __ASM_MACH_MPPARSE_H
  2. #define __ASM_MACH_MPPARSE_H
  3. #include <linux/acpi.h>
  4. static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name,
  5. struct mpc_config_translation *translation)
  6. {
  7. Dprintk("Bus #%d is %s\n", m->mpc_busid, name);
  8. }
  9. static inline void mpc_oem_pci_bus(struct mpc_config_bus *m,
  10. struct mpc_config_translation *translation)
  11. {
  12. }
  13. extern int parse_unisys_oem (char *oemptr);
  14. extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
  15. extern void setup_unisys();
  16. static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
  17. char *productid)
  18. {
  19. if (mpc->mpc_oemptr) {
  20. struct mp_config_oemtable *oem_table =
  21. (struct mp_config_oemtable *)mpc->mpc_oemptr;
  22. if (!strncmp(oem, "UNISYS", 6))
  23. return parse_unisys_oem((char *)oem_table);
  24. }
  25. return 0;
  26. }
  27. static inline int es7000_check_dsdt()
  28. {
  29. struct acpi_table_header *header = NULL;
  30. if(!acpi_get_table_header_early(ACPI_DSDT, &header))
  31. acpi_table_print(header, 0);
  32. if (!strncmp(header->oem_id, "UNISYS", 6))
  33. return 1;
  34. return 0;
  35. }
  36. /* Hook from generic ACPI tables.c */
  37. static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id)
  38. {
  39. unsigned long oem_addr;
  40. if (!find_unisys_acpi_oem_table(&oem_addr)) {
  41. if (es7000_check_dsdt())
  42. return parse_unisys_oem((char *)oem_addr);
  43. else {
  44. setup_unisys();
  45. return 1;
  46. }
  47. }
  48. return 0;
  49. }
  50. #endif /* __ASM_MACH_MPPARSE_H */