Commit ca216b8a authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Linus Torvalds

[PATCH] ppc32: Support for new Apple laptop models

This adds support for newer Apple laptop models.  It adds the basic
identification for the new motherboards and the cpufreq support for
models using the new 7447A CPU from Motorola.

This is mostly the work of John Steele Scott <toojays@toojays.net> with
some bits from Sebastian Henschel <linux@kodeaffe.de> and some rework by
myself.  Please apply,
Signed-off-by: default avatarJohn Steele Scott <toojays@toojays.net>
Signed-off-by: default avatarSebastian Henschel <linux@kodeaffe.de>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e5603f99
...@@ -253,6 +253,24 @@ _GLOBAL(low_choose_750fx_pll) ...@@ -253,6 +253,24 @@ _GLOBAL(low_choose_750fx_pll)
mtmsr r7 mtmsr r7
blr blr
_GLOBAL(low_choose_7447a_dfs)
/* Clear MSR:EE */
mfmsr r7
rlwinm r0,r7,0,17,15
mtmsr r0
/* Calc new HID1 value */
mfspr r4,SPRN_HID1
insrwi r4,r3,1,9 /* insert parameter into bit 9 */
sync
mtspr SPRN_HID1,r4
sync
isync
/* Return */
mtmsr r7
blr
#endif /* CONFIG_CPU_FREQ_PMAC && CONFIG_6xx */ #endif /* CONFIG_CPU_FREQ_PMAC && CONFIG_6xx */
/* void local_save_flags_ptr(unsigned long *flags) */ /* void local_save_flags_ptr(unsigned long *flags) */
......
This diff is collapsed.
...@@ -1282,6 +1282,25 @@ core99_firewire_cable_power(struct device_node* node, long param, long value) ...@@ -1282,6 +1282,25 @@ core99_firewire_cable_power(struct device_node* node, long param, long value)
return 0; return 0;
} }
static long __pmac
intrepid_aack_delay_enable(struct device_node* node, long param, long value)
{
unsigned long flags;
if (uninorth_rev < 0xd2)
return -ENODEV;
LOCK(flags);
if (param)
UN_BIS(UNI_N_AACK_DELAY, UNI_N_AACK_DELAY_ENABLE);
else
UN_BIC(UNI_N_AACK_DELAY, UNI_N_AACK_DELAY_ENABLE);
UNLOCK(flags);
return 0;
}
#endif /* CONFIG_POWER4 */ #endif /* CONFIG_POWER4 */
static long __pmac static long __pmac
...@@ -1914,6 +1933,7 @@ static struct feature_table_entry intrepid_features[] __pmacdata = { ...@@ -1914,6 +1933,7 @@ static struct feature_table_entry intrepid_features[] __pmacdata = {
{ PMAC_FTR_SLEEP_STATE, core99_sleep_state }, { PMAC_FTR_SLEEP_STATE, core99_sleep_state },
{ PMAC_FTR_READ_GPIO, core99_read_gpio }, { PMAC_FTR_READ_GPIO, core99_read_gpio },
{ PMAC_FTR_WRITE_GPIO, core99_write_gpio }, { PMAC_FTR_WRITE_GPIO, core99_write_gpio },
{ PMAC_FTR_AACK_DELAY_ENABLE, intrepid_aack_delay_enable },
{ 0, NULL } { 0, NULL }
}; };
...@@ -2116,6 +2136,14 @@ static struct pmac_mb_def pmac_mb_defs[] __pmacdata = { ...@@ -2116,6 +2136,14 @@ static struct pmac_mb_def pmac_mb_defs[] __pmacdata = {
PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features, PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features,
PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE, PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
}, },
{ "PowerBook5,4", "PowerBook G4 15\"",
PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features,
PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
},
{ "PowerBook5,5", "PowerBook G4 17\"",
PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features,
PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
},
{ "PowerBook6,1", "PowerBook G4 12\"", { "PowerBook6,1", "PowerBook G4 12\"",
PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features, PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features,
PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE, PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
...@@ -2128,6 +2156,10 @@ static struct pmac_mb_def pmac_mb_defs[] __pmacdata = { ...@@ -2128,6 +2156,10 @@ static struct pmac_mb_def pmac_mb_defs[] __pmacdata = {
PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features, PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features,
PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE, PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
}, },
{ "PowerBook6,4", "PowerBook G4 12\"",
PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features,
PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
},
{ "PowerBook6,5", "iBook G4", { "PowerBook6,5", "iBook G4",
PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features, PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features,
PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE, PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
......
...@@ -273,6 +273,12 @@ static inline long pmac_call_feature(int selector, struct device_node* node, ...@@ -273,6 +273,12 @@ static inline long pmac_call_feature(int selector, struct device_node* node,
*/ */
#define PMAC_FTR_ENABLE_MPIC PMAC_FTR_DEF(19) #define PMAC_FTR_ENABLE_MPIC PMAC_FTR_DEF(19)
/* PMAC_FTR_AACK_DELAY_ENABLE (NULL, int enable, 0)
*
* Enable/disable the AACK delay on the northbridge for systems using DFS
*/
#define PMAC_FTR_AACK_DELAY_ENABLE PMAC_FTR_DEF(20)
/* Don't use those directly, they are for the sake of pmac_setup.c */ /* Don't use those directly, they are for the sake of pmac_setup.c */
extern long pmac_do_feature_call(unsigned int selector, ...); extern long pmac_do_feature_call(unsigned int selector, ...);
......
...@@ -174,6 +174,7 @@ ...@@ -174,6 +174,7 @@
#define SPRN_HID1 0x3F1 /* Hardware Implementation Register 1 */ #define SPRN_HID1 0x3F1 /* Hardware Implementation Register 1 */
#define HID1_EMCP (1<<31) /* 7450 Machine Check Pin Enable */ #define HID1_EMCP (1<<31) /* 7450 Machine Check Pin Enable */
#define HID1_DFS (1<<22) /* 7447A Dynamic Frequency Scaling */
#define HID1_PC0 (1<<16) /* 7450 PLL_CFG[0] */ #define HID1_PC0 (1<<16) /* 7450 PLL_CFG[0] */
#define HID1_PC1 (1<<15) /* 7450 PLL_CFG[1] */ #define HID1_PC1 (1<<15) /* 7450 PLL_CFG[1] */
#define HID1_PC2 (1<<14) /* 7450 PLL_CFG[2] */ #define HID1_PC2 (1<<14) /* 7450 PLL_CFG[2] */
......
...@@ -142,6 +142,12 @@ ...@@ -142,6 +142,12 @@
*/ */
#define UNI_N_HWINIT_STATE_CPU1_FLAG 0x10000000 #define UNI_N_HWINIT_STATE_CPU1_FLAG 0x10000000
/* This register controls AACK delay, which is set when 2004 iBook/PowerBook
* is in low speed mode.
*/
#define UNI_N_AACK_DELAY 0x0100
#define UNI_N_AACK_DELAY_ENABLE 0x00000001
/* Uninorth 1.5 rev. has additional perf. monitor registers at 0xf00-0xf50 */ /* Uninorth 1.5 rev. has additional perf. monitor registers at 0xf00-0xf50 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment