Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp89558imm; Tue, 31 Jul 2018 14:23:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgperj2fFFUbdsyzcNR3T726HSr8WtfQm7p9OFg7z2WaPhQbP0y8alXVK49xkj29cmcTTOUaH X-Received: by 2002:a62:3856:: with SMTP id f83-v6mr24015980pfa.48.1533072225847; Tue, 31 Jul 2018 14:23:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533072225; cv=none; d=google.com; s=arc-20160816; b=AnpTkq/dk9prt7Ci1ushUjtoMTJ3XClyDhjP3Nn3X6DLMd6HIdDSNq/WieBGx93YeM 5BwkRsgoae0OYQ1/F8y0nbgKsFyqt7VBu+izMkksGMF0ynrXpCDeBmJfTjwp8r6NPECa 5euhbS6N4La0yJ2ahMG2//s0HBVtKsf1oDzo5LYxfAfvWVXSL1fjnn9wzXECYuzwpLv+ HCy3Gnbh1IFW+ln0pDD7vpwBRcWevUqdkoPbZmpkcykf2hGfSfsoq26oa76yASdsfWIJ khlSwrWQcMCR1o34RkhEItidfE7nagPPiBwC8y+pXHLhiAy6UeKnfv4yG6cGEKSxJtX6 LsCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=xWgSSZMU1Vb4uQ3vAr9DJu9XRuM567DM/2ZOehY6cgQ=; b=f+0NNiRi9q8oosgjDwKS8H2b+AvkFeJ4UUO6+PG8CgWLckzLs5oyGPVrK4h0S3wUJ1 TMTOPMxkJtNSHfMhOR9GvF4V+kLR1tSKbNsSwej9FEqTW8WH1afpvlUFAFEqkFCHcYFA 62KE8X6ZP7eRVBgQ6gE4dZHJkEZ+pT41d4ugC1mGHyETqSaIw+S0wVXPRda/s+kVnuBl FvLRcn6/lhm+58ukODSgmUFHzcVlqR7Cf2Dgls63FNofeKoRUJnxLlmsGYivEwTfTvTu oHbxvMMcrzz4mL1RyRsX7JKrLh+irgSycWpMX27ahFE/xckwEjbtOXaIKRQ8Fvw3HiLV Z0mw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p9-v6si14364779pff.30.2018.07.31.14.23.26; Tue, 31 Jul 2018 14:23:45 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732410AbeGaXEM (ORCPT + 99 others); Tue, 31 Jul 2018 19:04:12 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:42054 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731121AbeGaXEM (ORCPT ); Tue, 31 Jul 2018 19:04:12 -0400 Received: by mail-io0-f194.google.com with SMTP id g11-v6so14295813ioq.9; Tue, 31 Jul 2018 14:21:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=xWgSSZMU1Vb4uQ3vAr9DJu9XRuM567DM/2ZOehY6cgQ=; b=Th4hnhZIpfas70ZhwiLUI/QHw4RgMbRmDI7Eh+LoHeOBanRG/8IfOksYPQ7NPZvzry 8Vgit3agPAnKr0DTxt0vQTPqagSYmIZIX4e2Qlf9uuWR/7i+j84IKBKnEPlzP/gONZzg N32dhf4EN8zzn2zo2WTtf1FLxWdBw15wTFqQCyhPS2XQKZhPHl7WddJQUF1qHzXQ7cKx ML36cyFVmAm/BhAwxtmsEfXuSblDxyerKbdZ+ZtAy25ph1Amu0Yg8rxUcJTdvfbv7NRf UUXONdEYgsqABTQ8CaIV9AhJ+PnaT34I1RYvKNapvkztWNAR8140Kq2uS1u9wHSGQcml d84g== X-Gm-Message-State: AOUpUlGsB9DbzJvSHiqUGTOta6uRmaYrEr59e3Wnqawu7UfCATXmpKVw sQbJxqc0VN/7GKTly9i56w== X-Received: by 2002:a6b:c409:: with SMTP id y9-v6mr1235470ioa.77.1533072115928; Tue, 31 Jul 2018 14:21:55 -0700 (PDT) Received: from localhost ([24.51.61.72]) by smtp.gmail.com with ESMTPSA id 82-v6sm2492168itm.2.2018.07.31.14.21.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Jul 2018 14:21:55 -0700 (PDT) Date: Tue, 31 Jul 2018 15:21:54 -0600 From: Rob Herring To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: linux-mips@linux-mips.org, Ralf Baechle , Paul Burton , James Hogan , linux-kernel@vger.kernel.org, Govindraj Raja , Michael Turquette , Stephen Boyd , Mark Rutland , linux-clk@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH 15/15] clk: pistachio: Fix wrong SDHost card speed Message-ID: <20180731212154.GA17395@rob-hp-laptop> References: <20180722212010.3979-1-afaerber@suse.de> <20180722212010.3979-16-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180722212010.3979-16-afaerber@suse.de> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 22, 2018 at 11:20:10PM +0200, Andreas F?rber wrote: > 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 Does this clock really need to be exposed in DT? > > /* Gate clocks */ > #define CLK_MIPS 32 > -- > 2.16.4 >