Commit 14bfd1ff authored by Sven Henkel's avatar Sven Henkel Committed by Linus Torvalds

[PATCH] pmac/radeonfb: Add suspend support for M11 chip in new iBook 12"

This adds suspend support for the Radeon M11 chip in 12" iBooks
manufactured after July 2005.  I don't know if the new 14" iBooks also
have that chip, so they might also be supported.

The chip identifies itself as "RV350 NV" (pci id 0x4e56), revision 0x80.
Apple calls it "Snowy", xfree86 names it "ATI FireGL Mobility T2 (M11)
NV (AGP)".  So, we seem to be lucky here: The suspend-code for the M10
(which also is a "RV350 NV") works flawless for that chip.
Signed-off-by: default avatarSven Henkel <shenkel@gmail.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 14bf01bb
...@@ -62,9 +62,9 @@ static void radeon_pm_disable_dynamic_mode(struct radeonfb_info *rinfo) ...@@ -62,9 +62,9 @@ static void radeon_pm_disable_dynamic_mode(struct radeonfb_info *rinfo)
OUTPLL(pllSCLK_CNTL, tmp); OUTPLL(pllSCLK_CNTL, tmp);
return; return;
} }
/* RV350 (M10) */ /* RV350 (M10/M11) */
if (rinfo->family == CHIP_FAMILY_RV350) { if (rinfo->family == CHIP_FAMILY_RV350) {
/* for RV350/M10, no delays are required. */ /* for RV350/M10/M11, no delays are required. */
tmp = INPLL(pllSCLK_CNTL2); tmp = INPLL(pllSCLK_CNTL2);
tmp |= (SCLK_CNTL2__R300_FORCE_TCL | tmp |= (SCLK_CNTL2__R300_FORCE_TCL |
SCLK_CNTL2__R300_FORCE_GA | SCLK_CNTL2__R300_FORCE_GA |
...@@ -248,7 +248,7 @@ static void radeon_pm_enable_dynamic_mode(struct radeonfb_info *rinfo) ...@@ -248,7 +248,7 @@ static void radeon_pm_enable_dynamic_mode(struct radeonfb_info *rinfo)
return; return;
} }
/* M10 */ /* M10/M11 */
if (rinfo->family == CHIP_FAMILY_RV350) { if (rinfo->family == CHIP_FAMILY_RV350) {
tmp = INPLL(pllSCLK_CNTL2); tmp = INPLL(pllSCLK_CNTL2);
tmp &= ~(SCLK_CNTL2__R300_FORCE_TCL | tmp &= ~(SCLK_CNTL2__R300_FORCE_TCL |
...@@ -1155,7 +1155,7 @@ static void radeon_pm_full_reset_sdram(struct radeonfb_info *rinfo) ...@@ -1155,7 +1155,7 @@ static void radeon_pm_full_reset_sdram(struct radeonfb_info *rinfo)
OUTREG( CRTC_GEN_CNTL, (crtcGenCntl | CRTC_GEN_CNTL__CRTC_DISP_REQ_EN_B) ); OUTREG( CRTC_GEN_CNTL, (crtcGenCntl | CRTC_GEN_CNTL__CRTC_DISP_REQ_EN_B) );
OUTREG( CRTC2_GEN_CNTL, (crtcGenCntl2 | CRTC2_GEN_CNTL__CRTC2_DISP_REQ_EN_B) ); OUTREG( CRTC2_GEN_CNTL, (crtcGenCntl2 | CRTC2_GEN_CNTL__CRTC2_DISP_REQ_EN_B) );
/* This is the code for the Aluminium PowerBooks M10 */ /* This is the code for the Aluminium PowerBooks M10 / iBooks M11 */
if (rinfo->family == CHIP_FAMILY_RV350) { if (rinfo->family == CHIP_FAMILY_RV350) {
u32 sdram_mode_reg = rinfo->save_regs[35]; u32 sdram_mode_reg = rinfo->save_regs[35];
static u32 default_mrtable[] = static u32 default_mrtable[] =
...@@ -2741,9 +2741,11 @@ void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk) ...@@ -2741,9 +2741,11 @@ void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk)
rinfo->pm_mode |= radeon_pm_d2; rinfo->pm_mode |= radeon_pm_d2;
/* We can restart Jasper (M10 chip in albooks), BlueStone (7500 chip /* We can restart Jasper (M10 chip in albooks), BlueStone (7500 chip
* in some desktop G4s), and Via (M9+ chip on iBook G4) * in some desktop G4s), Via (M9+ chip on iBook G4) and
* Snowy (M11 chip on iBook G4 manufactured after July 2005)
*/ */
if (!strcmp(rinfo->of_node->name, "ATY,JasperParent")) { if (!strcmp(rinfo->of_node->name, "ATY,JasperParent") ||
!strcmp(rinfo->of_node->name, "ATY,SnowyParent")) {
rinfo->reinit_func = radeon_reinitialize_M10; rinfo->reinit_func = radeon_reinitialize_M10;
rinfo->pm_mode |= radeon_pm_off; rinfo->pm_mode |= radeon_pm_off;
} }
......
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