Match the Mac Pro with 8 cores. This machine reports 35 temperature

sensors and some fans.
As I don't own this machine, I could not test this patch.

Obtained from:	applesmc Linux driver.
This commit is contained in:
Rui Paulo 2008-04-12 12:04:09 +00:00
parent 3c35ee2c30
commit d8246db039
2 changed files with 44 additions and 5 deletions

View File

@ -114,9 +114,9 @@ struct asmc_model {
int (*smc_light_left)(SYSCTL_HANDLER_ARGS);
int (*smc_light_right)(SYSCTL_HANDLER_ARGS);
const char *smc_temps[8];
const char *smc_tempnames[8];
const char *smc_tempdescs[8];
const char *smc_temps[ASMC_TEMP_MAX];
const char *smc_tempnames[ASMC_TEMP_MAX];
const char *smc_tempdescs[ASMC_TEMP_MAX];
};
static struct asmc_model *asmc_match(device_t dev);
@ -189,6 +189,15 @@ struct asmc_model asmc_models[] = {
ASMC_MM_TEMPS, ASMC_MM_TEMPNAMES, ASMC_MM_TEMPDESCS
},
/* Idem for the MacPro */
{
"MacPro2", "Apple SMC Mac Pro (8-core)",
NULL, NULL, NULL,
ASMC_FAN_FUNCS,
NULL, NULL,
ASMC_MP_TEMPS, ASMC_MP_TEMPNAMES, ASMC_MP_TEMPDESCS
},
{ NULL, NULL }
};

View File

@ -126,9 +126,12 @@ struct asmc_softc {
/*
* Temperatures.
*
* First for MacBook, second for MacBook Pro, then for Intel Mac Mini.
*
* First for MacBook, second for MacBook Pro, third for Intel Mac Mini and
* last Mac Pro 8-core.
*
*/
/* maximum array size for temperatures including the last NULL */
#define ASMC_TEMP_MAX 36
#define ASMC_MB_TEMPS { "TB0T", "TN0P", "TN1P", "Th0H", "Th1H", \
"TM0P", NULL }
#define ASMC_MB_TEMPNAMES { "enclosure", "northbridge1", \
@ -156,3 +159,30 @@ struct asmc_softc {
#define ASMC_MM_TEMPNAMES { "northbridge1", "northbridge2" }
#define ASMC_MM_TEMPDESCS { "Northbridge Point 1", \
"Northbridge Point 2" }
#define ASMC_MP_TEMPS { "TA0P", "TCAG", "TCAH", "TCBG", "TCBH", \
"TC0C", "TC0D", "TC0P", "TC1C", "TC1D", \
"TC2C", "TC2D", "TC3C", "TC3D", "THTG", \
"TH0P", "TH1P", "TH2P", "TH3P", "TMAP", \
"TMAS", "TMBS", "TM0P", "TM0S", "TM1P", \
"TM1S", "TM2P", "TM2S", "TM3S", "TM8P", \
"TM8S", "TM9P", "TM9S", "TN0H", "TS0C", \
NULL }
#define ASMC_MP_TEMPNAMES { "TA0P", "TCAG", "TCAH", "TCBG", "TCBH", \
"TC0C", "TC0D", "TC0P", "TC1C", "TC1D", \
"TC2C", "TC2D", "TC3C", "TC3D", "THTG", \
"TH0P", "TH1P", "TH2P", "TH3P", "TMAP", \
"TMAS", "TMBS", "TM0P", "TM0S", "TM1P", \
"TM1S", "TM2P", "TM2S", "TM3S", "TM8P", \
"TM8S", "TM9P", "TM9S", "TN0H", "TS0C", \
NULL }
#define ASMC_MP_TEMPDESCS { "TA0P", "TCAG", "TCAH", "TCBG", "TCBH", \
"TC0C", "TC0D", "TC0P", "TC1C", "TC1D", \
"TC2C", "TC2D", "TC3C", "TC3D", "THTG", \
"TH0P", "TH1P", "TH2P", "TH3P", "TMAP", \
"TMAS", "TMBS", "TM0P", "TM0S", "TM1P", \
"TM1S", "TM2P", "TM2S", "TM3S", "TM8P", \
"TM8S", "TM9P", "TM9S", "TN0H", "TS0C", \
NULL }