Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3576128imm; Mon, 2 Jul 2018 01:25:51 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdHBhGzNdS2S/m9b7Wn3fzE/SVbg+zBf9znXgmk7SHlqv9aR5vEe0rGMAHhzTjPPykbio7O X-Received: by 2002:a63:5143:: with SMTP id r3-v6mr6399606pgl.11.1530519951357; Mon, 02 Jul 2018 01:25:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530519951; cv=none; d=google.com; s=arc-20160816; b=rivHss4cyRs6n6mL5wYK3AnAR2Z5Vgp/P3c4lb3t4ttH7GHp64uw1kzU6YhI7o16Kc uQ5qYHsE7vf0/17bMe13NZpQXyKEeRK4aP8CQxpi/0RQZcym2vwpZoI37cObVoU7Pnew 6QW6FFoPJv0qsRpvHscgN0uRl3+GR0UQUKyyhBTrWE831jCcd3ytc3K8CX8s9W209eY3 Xwh193ls34xBR/ccmPSdLbG8gvOianOnxeOGtXAHE4vU/uA0XUwTpHYRhmx9pLQVGswE ujVc+DBG7Jw65C3uYHFgvK2iTLersfdrhl1i+LuoHDMxVBDLIP4OZ5HFgNP6abM8MQne McFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:from:references:in-reply-to :message-id:cc:to:arc-authentication-results; bh=zbkFDNJIlySbhOdHZWsMaAX2kER81CGWXHJCHo1P+hg=; b=vF9RIEfwiqBM3FeB8OyEBon3HWn1ISBd+TlN1mPFy9VgbbPSHHXtx9Icpec8Pg31Fu S5ovVfbCEkdforsDYNTPVaO72Z2BHQvzcHraBgWF+/BSLH7cVBnnyO9Jgc0H0EP9G4cV dZ1E6kqy4L1/B2jeMVoQ9M/xrdxOv87hHlPj+5MWGR4qT01iTQIhwsg1jks9MTvhFMPH gYbI9okviGTPsynHklEuSHUos2MaUGa0fO2gJDnVAxkPxEMYyyXKytsBqr1E0aPZZ2+t sFdR9w+2t1a0srRk2d8MLNE9TDezVjoYKmJCtSuBJJx6/wgJWfIaCHtbNPM1TKFszuou SALg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2-v6si729323pfb.365.2018.07.02.01.25.37; Mon, 02 Jul 2018 01:25:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964868AbeGBIXR (ORCPT + 99 others); Mon, 2 Jul 2018 04:23:17 -0400 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:48838 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933632AbeGBIVX (ORCPT ); Mon, 2 Jul 2018 04:21:23 -0400 Received: by kvm5.telegraphics.com.au (Postfix, from userid 502) id 483DB293A6; Mon, 2 Jul 2018 04:21:19 -0400 (EDT) To: Benjamin Herrenschmidt Cc: Michael Schmitz , , , , Geert Uytterhoeven Message-Id: <3923d42d8e3a5e3ae3382d3354744fb6648d03a8.1530519301.git.fthain@telegraphics.com.au> In-Reply-To: References: From: Finn Thain Subject: [PATCH v4 08/11] macintosh/via-pmu68k: Don't load driver on unsupported hardware Date: Mon, 2 Jul 2018 04:21:19 -0400 (EDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Cc: Geert Uytterhoeven Signed-off-by: Finn Thain Reviewed-by: Michael Schmitz --- arch/m68k/mac/misc.c | 6 ++---- drivers/macintosh/via-pmu68k.c | 4 ---- include/uapi/linux/pmu.h | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/arch/m68k/mac/misc.c b/arch/m68k/mac/misc.c index c68054361615..7ccb799eeb57 100644 --- a/arch/m68k/mac/misc.c +++ b/arch/m68k/mac/misc.c @@ -478,8 +478,7 @@ void mac_poweroff(void) cuda_shutdown(); #endif #ifdef CONFIG_ADB_PMU68K - } else if (macintosh_config->adb_type == MAC_ADB_PB1 - || macintosh_config->adb_type == MAC_ADB_PB2) { + } else if (macintosh_config->adb_type == MAC_ADB_PB2) { pmu_shutdown(); #endif } @@ -520,8 +519,7 @@ void mac_reset(void) cuda_restart(); #endif #ifdef CONFIG_ADB_PMU68K - } else if (macintosh_config->adb_type == MAC_ADB_PB1 - || macintosh_config->adb_type == MAC_ADB_PB2) { + } else if (macintosh_config->adb_type == MAC_ADB_PB2) { pmu_restart(); #endif } else if (CPU_IS_030) { diff --git a/drivers/macintosh/via-pmu68k.c b/drivers/macintosh/via-pmu68k.c index d545ed45e482..bec8e1837d7d 100644 --- a/drivers/macintosh/via-pmu68k.c +++ b/drivers/macintosh/via-pmu68k.c @@ -175,9 +175,6 @@ static s8 pmu_data_len[256][2] = { int __init find_via_pmu(void) { switch (macintosh_config->adb_type) { - case MAC_ADB_PB1: - pmu_kind = PMU_68K_V1; - break; case MAC_ADB_PB2: pmu_kind = PMU_68K_V2; break; @@ -785,7 +782,6 @@ pmu_enable_backlight(int on) /* first call: get current backlight value */ if (backlight_level < 0) { switch(pmu_kind) { - case PMU_68K_V1: case PMU_68K_V2: pmu_request(&req, NULL, 3, PMU_READ_NVRAM, 0x14, 0xe); while (!req.complete) diff --git a/include/uapi/linux/pmu.h b/include/uapi/linux/pmu.h index 89cb1acea93a..e128f609281a 100644 --- a/include/uapi/linux/pmu.h +++ b/include/uapi/linux/pmu.h @@ -93,7 +93,7 @@ enum { PMU_HEATHROW_BASED, /* PowerBook G3 series */ PMU_PADDINGTON_BASED, /* 1999 PowerBook G3 */ PMU_KEYLARGO_BASED, /* Core99 motherboard (PMU99) */ - PMU_68K_V1, /* 68K PMU, version 1 */ + PMU_68K_V1, /* Unused/deprecated */ PMU_68K_V2, /* 68K PMU, version 2 */ }; -- 2.16.4