mach_mpparse.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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(void);
  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. #ifdef CONFIG_ACPI
  28. static inline int es7000_check_dsdt(void)
  29. {
  30. struct acpi_table_header *header = NULL;
  31. if(!acpi_get_table_header_early(ACPI_DSDT, &header))
  32. acpi_table_print(header, 0);
  33. if (!strncmp(header->oem_id, "UNISYS", 6))
  34. return 1;
  35. return 0;
  36. }
  37. /* Hook from generic ACPI tables.c */
  38. static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id)
  39. {
  40. unsigned long oem_addr;
  41. if (!find_unisys_acpi_oem_table(&oem_addr)) {
  42. if (es7000_check_dsdt())
  43. return parse_unisys_oem((char *)oem_addr);
  44. else {
  45. setup_unisys();
  46. return 1;
  47. }
  48. }
  49. return 0;
  50. }
  51. #else
  52. static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id)
  53. {
  54. return 0;
  55. }
  56. #endif
  57. #endif /* __ASM_MACH_MPPARSE_H */