Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5142736imm; Sun, 22 Jul 2018 14:21:49 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcEM3820Fev+K8zRj/qTPc9zlJZnVaWm9rsmkpQxQwd1Kt8rXCtmM2+rIdQvabaoDcdsBby X-Received: by 2002:a63:5b0d:: with SMTP id p13-v6mr9868796pgb.202.1532294509124; Sun, 22 Jul 2018 14:21:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532294509; cv=none; d=google.com; s=arc-20160816; b=mC+NR7KFsZ4nM/aZYS2GoqXlhplZ7DvbdF32Co+HDP9ITY6hFV8n2HuKo5TmaSzL6E OMCaKBjSuqdOrXFQ8G7mrjoZL7JBHII3BTLOsdeRZtrePne2CEJKP+v0k3wCZIFNXR5H EBCzihDBWz6jzYTBFaG0uEj7GnvrJ/BEM0BKGssdr6WVeQevh4qcMQJ4/vw/3OxYDzZ2 UHRBlew1FWTr1ZK9Ru3IivgGq5mn2pBikauVRk4IKCInwiCQQdNAw2cyKJXDvLQTm3p2 7JhpJRhEIhJiwjh7WkJ/mwYSmcve8+6CREJ8E56gi/Qt8Cdv+Eegrr9uEXyYJK3Hw17F 7n4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=5OpyOkKUeeXfR4BVwdSRyBOd9RMKrnbouXvvMBlTbGE=; b=p4Jvxfc3BKybndiTsrraUNAKZmLglv/I+/lG2I2WKiwrCdCgE750ROso682X/lQSDI QEekyUpzXGppCQZ/48yrQIUh2ecKT/OytnpWFn2hP6XSOaNMm23Z2+ZrXrBjfXZ4dfVG OsHSMRpbqNpW440rZx88hTbtTdKEQI7xCZ2esYM2mCNZQmqbd9HkAqqZUHKHmtoj8HsW XbeUooicO658Kml6MuezigfbHmo3bcBOKmLVvCCyvfCgO0es1GaXW6rt6kQQV6LxmHsP r5AOJpSdae1ExjwnC8scsXY3O5BpHyqoPEuCuc+H1hVv13rboT2mTceJe+TFylQVq8x9 gEgA== 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 x21-v6si6260073pgv.669.2018.07.22.14.21.34; Sun, 22 Jul 2018 14:21:49 -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 S2387900AbeGVWSd (ORCPT + 99 others); Sun, 22 Jul 2018 18:18:33 -0400 Received: from mx2.suse.de ([195.135.220.15]:38772 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387732AbeGVWS0 (ORCPT ); Sun, 22 Jul 2018 18:18:26 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 8540BADC0; Sun, 22 Jul 2018 21:20:24 +0000 (UTC) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: linux-mips@linux-mips.org Cc: Ralf Baechle , Paul Burton , James Hogan , linux-kernel@vger.kernel.org, Govindraj Raja , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , linux-clk@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 15/15] clk: pistachio: Fix wrong SDHost card speed Date: Sun, 22 Jul 2018 23:20:10 +0200 Message-Id: <20180722212010.3979-16-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180722212010.3979-1-afaerber@suse.de> References: <20180722212010.3979-1-afaerber@suse.de> 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: Govindraj Raja The SDHost currently clocks the card 4x slower than it should do, because there is a fixed divide by 4 in the sdhost wrapper that is not present in the clock tree. To model this, add a fixed divide by 4 clock node in the SDHost clock path. This will ensure the right clock frequency is selected when the mmc driver tries to configure frequency on card insert. Signed-off-by: Govindraj Raja Signed-off-by: Andreas Färber --- drivers/clk/pistachio/clk-pistachio.c | 3 ++- include/dt-bindings/clock/pistachio-clk.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/clk/pistachio/clk-pistachio.c b/drivers/clk/pistachio/clk-pistachio.c index c4ceb5eaf46c..1c968d9a6e17 100644 --- a/drivers/clk/pistachio/clk-pistachio.c +++ b/drivers/clk/pistachio/clk-pistachio.c @@ -44,7 +44,7 @@ static struct pistachio_gate pistachio_gates[] __initdata = { GATE(CLK_AUX_ADC_INTERNAL, "aux_adc_internal", "sys_internal_div", 0x104, 22), GATE(CLK_AUX_ADC, "aux_adc", "aux_adc_div", 0x104, 23), - GATE(CLK_SD_HOST, "sd_host", "sd_host_div", 0x104, 24), + GATE(CLK_SD_HOST, "sd_host", "sd_host_div4", 0x104, 24), GATE(CLK_BT, "bt", "bt_div", 0x104, 25), GATE(CLK_BT_DIV4, "bt_div4", "bt_div4_div", 0x104, 26), GATE(CLK_BT_DIV8, "bt_div8", "bt_div8_div", 0x104, 27), @@ -54,6 +54,7 @@ static struct pistachio_gate pistachio_gates[] __initdata = { static struct pistachio_fixed_factor pistachio_ffs[] __initdata = { FIXED_FACTOR(CLK_WIFI_DIV4, "wifi_div4", "wifi_pll", 4), FIXED_FACTOR(CLK_WIFI_DIV8, "wifi_div8", "wifi_pll", 8), + FIXED_FACTOR(CLK_SDHOST_DIV4, "sd_host_div4", "sd_host_div", 4), }; static struct pistachio_div pistachio_divs[] __initdata = { diff --git a/include/dt-bindings/clock/pistachio-clk.h b/include/dt-bindings/clock/pistachio-clk.h index 039f83facb68..77b92aed241d 100644 --- a/include/dt-bindings/clock/pistachio-clk.h +++ b/include/dt-bindings/clock/pistachio-clk.h @@ -21,6 +21,7 @@ /* Fixed-factor clocks */ #define CLK_WIFI_DIV4 16 #define CLK_WIFI_DIV8 17 +#define CLK_SDHOST_DIV4 18 /* Gate clocks */ #define CLK_MIPS 32 -- 2.16.4