Skip to content

Commit 54c9907

Browse files
Finn Thainmpe
authored andcommitted
macintosh/via-pmu68k: Don't load driver on unsupported hardware
Don't load the via-pmu68k driver on early PowerBooks. The M50753 PMU device found in those models was never supported by this driver. Attempting to load the driver usually causes a boot hang. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Michael Schmitz <schmitzmic@gmail.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent c2f028b commit 54c9907

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

arch/m68k/mac/misc.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,7 @@ void mac_poweroff(void)
478478
cuda_shutdown();
479479
#endif
480480
#ifdef CONFIG_ADB_PMU68K
481-
} else if (macintosh_config->adb_type == MAC_ADB_PB1
482-
|| macintosh_config->adb_type == MAC_ADB_PB2) {
481+
} else if (macintosh_config->adb_type == MAC_ADB_PB2) {
483482
pmu_shutdown();
484483
#endif
485484
}
@@ -520,8 +519,7 @@ void mac_reset(void)
520519
cuda_restart();
521520
#endif
522521
#ifdef CONFIG_ADB_PMU68K
523-
} else if (macintosh_config->adb_type == MAC_ADB_PB1
524-
|| macintosh_config->adb_type == MAC_ADB_PB2) {
522+
} else if (macintosh_config->adb_type == MAC_ADB_PB2) {
525523
pmu_restart();
526524
#endif
527525
} else if (CPU_IS_030) {

drivers/macintosh/via-pmu68k.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,6 @@ static s8 pmu_data_len[256][2] = {
175175
int __init find_via_pmu(void)
176176
{
177177
switch (macintosh_config->adb_type) {
178-
case MAC_ADB_PB1:
179-
pmu_kind = PMU_68K_V1;
180-
break;
181178
case MAC_ADB_PB2:
182179
pmu_kind = PMU_68K_V2;
183180
break;
@@ -785,7 +782,6 @@ pmu_enable_backlight(int on)
785782
/* first call: get current backlight value */
786783
if (backlight_level < 0) {
787784
switch(pmu_kind) {
788-
case PMU_68K_V1:
789785
case PMU_68K_V2:
790786
pmu_request(&req, NULL, 3, PMU_READ_NVRAM, 0x14, 0xe);
791787
while (!req.complete)

include/uapi/linux/pmu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ enum {
9393
PMU_HEATHROW_BASED, /* PowerBook G3 series */
9494
PMU_PADDINGTON_BASED, /* 1999 PowerBook G3 */
9595
PMU_KEYLARGO_BASED, /* Core99 motherboard (PMU99) */
96-
PMU_68K_V1, /* 68K PMU, version 1 */
96+
PMU_68K_V1, /* Unused/deprecated */
9797
PMU_68K_V2, /* 68K PMU, version 2 */
9898
};
9999

0 commit comments

Comments
 (0)