From patchwork Fri Jan 23 23:23:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 5698231 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8ED069F357 for ; Fri, 23 Jan 2015 23:23:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9AA31202E5 for ; Fri, 23 Jan 2015 23:23:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C21AA2020F for ; Fri, 23 Jan 2015 23:23:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751452AbbAWXXn (ORCPT ); Fri, 23 Jan 2015 18:23:43 -0500 Received: from mail-wi0-f179.google.com ([209.85.212.179]:58491 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751211AbbAWXXm (ORCPT ); Fri, 23 Jan 2015 18:23:42 -0500 Received: by mail-wi0-f179.google.com with SMTP id l15so231190wiw.0 for ; Fri, 23 Jan 2015 15:23:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=ge96rarLhVqSjMTo1ieRjfmznR1eBxWyJb2deuALWWk=; b=ZEYpfE8YQLCWtreYHCw87sMZqfRdkhvsETBgohqmpdrfGoPRpWBG4uZaBu0+WB/ThV id3Y+oBePRUta0Su5f+FGtAFlyaCNR2qaOxlcOrFLbkXUV9Np2iZJAPw1kFuk9GddZqA 93d9Kc4mgXiW3nYXSUcfmzHe06MbL6AfcOU5MprWN3tfVCFPvDcIEnrd8iRXAEFgS8Tw eQTqb4shcpfvuzfILiuLEdu+SjpoSWC2Ku0l1mlhu9/4Jkw7NQa0laeEzmUVRw57uyiU y816/Zwolo1hvj+JUfzjGvggnq9cKb6V+9ShjQN5PQqsVYxFOcwWB+mTs1qkqOzDVja6 465g== X-Received: by 10.194.187.235 with SMTP id fv11mr19093261wjc.16.1422055420689; Fri, 23 Jan 2015 15:23:40 -0800 (PST) Received: from linux-tdhb.lan ([194.187.74.233]) by mx.google.com with ESMTPSA id cg8sm4050097wjc.1.2015.01.23.15.23.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jan 2015 15:23:39 -0800 (PST) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Kalle Valo , linux-wireless@vger.kernel.org Cc: Hauke Mehrtens , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH] bcma: fix watchdog on some ARM chipsets Date: Sat, 24 Jan 2015 00:23:21 +0100 Message-Id: <1422055401-15029-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.8.4.5 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP These chipsets don't need changing clock mode. Signed-off-by: Rafa? Mi?ecki --- This patch adds one line with more than 80 columns, I hope it's OK, IMO it improves readability. --- drivers/bcma/driver_chipcommon.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/bcma/driver_chipcommon.c b/drivers/bcma/driver_chipcommon.c index 84d4a95..b7c8a8d 100644 --- a/drivers/bcma/driver_chipcommon.c +++ b/drivers/bcma/driver_chipcommon.c @@ -178,7 +178,6 @@ void bcma_core_chipcommon_init(struct bcma_drv_cc *cc) u32 bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, u32 ticks) { u32 maxt; - enum bcma_clkmode clkmode; maxt = bcma_chipco_watchdog_get_max_timer(cc); if (cc->capabilities & BCMA_CC_CAP_PMU) { @@ -188,8 +187,13 @@ u32 bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, u32 ticks) ticks = maxt; bcma_cc_write32(cc, BCMA_CC_PMU_WATCHDOG, ticks); } else { - clkmode = ticks ? BCMA_CLKMODE_FAST : BCMA_CLKMODE_DYNAMIC; - bcma_core_set_clockmode(cc->core, clkmode); + struct bcma_bus *bus = cc->core->bus; + + if (bus->chipinfo.id != BCMA_CHIP_ID_BCM4707 && + bus->chipinfo.id != BCMA_CHIP_ID_BCM53018) + bcma_core_set_clockmode(cc->core, + ticks ? BCMA_CLKMODE_FAST : BCMA_CLKMODE_DYNAMIC); + if (ticks > maxt) ticks = maxt; /* instant NMI */