From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,T_DKIMWL_WL_HIGH,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACF44C28EBD for ; Sun, 9 Jun 2019 17:05:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 77BF620840 for ; Sun, 9 Jun 2019 17:05:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560099919; bh=04tc5K5pMkFcIKUQX04iMtZ9qekNA1F2dV6qUpFv4ew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=rpY2PTGQa683Bfch9ThgUgw4O/KY//DHI7tpYyZns9m6lPSmDwy/+u7+S2YvDz73d K1cdzIKOjH0hs9AuFHtOB3azEwT2M8Y0wKbmszY1j6AMBbAUSANdyCSrqZ54lYUftQ gNOwu6zPjbWjZboJbNGGPcUr1DGYO2oB+Mb6tThQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388787AbfFIRFS (ORCPT ); Sun, 9 Jun 2019 13:05:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:44280 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388155AbfFIRFK (ORCPT ); Sun, 9 Jun 2019 13:05:10 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 68000204EC; Sun, 9 Jun 2019 17:05:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560099909; bh=04tc5K5pMkFcIKUQX04iMtZ9qekNA1F2dV6qUpFv4ew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nGAiTG/0SBG/hsLyv0Op+pJ4iyuOsinlsLFpyulpSeXGoOefXlgshkqvGKLtI9KdS sUfdKXUB3zZbnQTsIo0dRWCzCngTlNMJ1aSfa9s3O4arU0OvoY1sF9I6B0QQZearsG goy0XrbExnpsErSIDyqCwqxtuveQzbYHjp/aeAyQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Joe Burmeister Subject: [PATCH 4.4 210/241] tty: max310x: Fix external crystal register setup Date: Sun, 9 Jun 2019 18:42:32 +0200 Message-Id: <20190609164154.724819740@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190609164147.729157653@linuxfoundation.org> References: <20190609164147.729157653@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joe Burmeister commit 5d24f455c182d5116dd5db8e1dc501115ecc9c2c upstream. The datasheet states: Bit 4: ClockEnSet the ClockEn bit high to enable an external clocking (crystal or clock generator at XIN). Set the ClockEn bit to 0 to disable clocking Bit 1: CrystalEnSet the CrystalEn bit high to enable the crystal oscillator. When using an external clock source at XIN, CrystalEn must be set low. The bit 4, MAX310X_CLKSRC_EXTCLK_BIT, should be set and was not. This was required to make the MAX3107 with an external crystal on our board able to send or receive data. Signed-off-by: Joe Burmeister Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/max310x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/tty/serial/max310x.c +++ b/drivers/tty/serial/max310x.c @@ -571,7 +571,7 @@ static int max310x_set_ref_clk(struct ma } /* Configure clock source */ - clksrc = xtal ? MAX310X_CLKSRC_CRYST_BIT : MAX310X_CLKSRC_EXTCLK_BIT; + clksrc = MAX310X_CLKSRC_EXTCLK_BIT | (xtal ? MAX310X_CLKSRC_CRYST_BIT : 0); /* Configure PLL */ if (pllcfg) {