intel-mid.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. * intel-mid.h: Intel MID specific setup code
  3. *
  4. * (C) Copyright 2009 Intel Corporation
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * as published by the Free Software Foundation; version 2
  9. * of the License.
  10. */
  11. #ifndef _ASM_X86_INTEL_MID_H
  12. #define _ASM_X86_INTEL_MID_H
  13. #include <linux/sfi.h>
  14. extern int intel_mid_pci_init(void);
  15. extern int __init sfi_parse_mrtc(struct sfi_table_header *table);
  16. extern int __init sfi_parse_mtmr(struct sfi_table_header *table);
  17. extern int sfi_mrtc_num;
  18. extern struct sfi_rtc_table_entry sfi_mrtc_array[];
  19. /*
  20. * Here defines the array of devices platform data that IAFW would export
  21. * through SFI "DEVS" table, we use name and type to match the device and
  22. * its platform data.
  23. */
  24. struct devs_id {
  25. char name[SFI_NAME_LEN + 1];
  26. u8 type;
  27. u8 delay;
  28. void *(*get_platform_data)(void *info);
  29. /* Custom handler for devices */
  30. void (*device_handler)(struct sfi_device_table_entry *pentry,
  31. struct devs_id *dev);
  32. };
  33. /*
  34. * Medfield is the follow-up of Moorestown, it combines two chip solution into
  35. * one. Other than that it also added always-on and constant tsc and lapic
  36. * timers. Medfield is the platform name, and the chip name is called Penwell
  37. * we treat Medfield/Penwell as a variant of Moorestown. Penwell can be
  38. * identified via MSRs.
  39. */
  40. enum intel_mid_cpu_type {
  41. /* 1 was Moorestown */
  42. INTEL_MID_CPU_CHIP_PENWELL = 2,
  43. };
  44. extern enum intel_mid_cpu_type __intel_mid_cpu_chip;
  45. #ifdef CONFIG_X86_INTEL_MID
  46. static inline enum intel_mid_cpu_type intel_mid_identify_cpu(void)
  47. {
  48. return __intel_mid_cpu_chip;
  49. }
  50. #else /* !CONFIG_X86_INTEL_MID */
  51. #define intel_mid_identify_cpu() (0)
  52. #endif /* !CONFIG_X86_INTEL_MID */
  53. enum intel_mid_timer_options {
  54. INTEL_MID_TIMER_DEFAULT,
  55. INTEL_MID_TIMER_APBT_ONLY,
  56. INTEL_MID_TIMER_LAPIC_APBT,
  57. };
  58. extern enum intel_mid_timer_options intel_mid_timer_options;
  59. /*
  60. * Penwell uses spread spectrum clock, so the freq number is not exactly
  61. * the same as reported by MSR based on SDM.
  62. */
  63. #define PENWELL_FSB_FREQ_83SKU 83200
  64. #define PENWELL_FSB_FREQ_100SKU 99840
  65. #define SFI_MTMR_MAX_NUM 8
  66. #define SFI_MRTC_MAX 8
  67. extern struct console early_mrst_console;
  68. extern void mrst_early_console_init(void);
  69. extern struct console early_hsu_console;
  70. extern void hsu_early_console_init(const char *);
  71. extern void intel_scu_devices_create(void);
  72. extern void intel_scu_devices_destroy(void);
  73. /* VRTC timer */
  74. #define MRST_VRTC_MAP_SZ (1024)
  75. /*#define MRST_VRTC_PGOFFSET (0xc00) */
  76. extern void intel_mid_rtc_init(void);
  77. #endif /* _ASM_X86_INTEL_MID_H */