From patchwork Fri Aug 1 09:21:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 34690 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f197.google.com (mail-vc0-f197.google.com [209.85.220.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3879120540 for ; Fri, 1 Aug 2014 09:23:56 +0000 (UTC) Received: by mail-vc0-f197.google.com with SMTP id ij19sf11937180vcb.0 for ; Fri, 01 Aug 2014 02:23:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=LZRENInJ1nLOF/QhSIUzVN3yvAkgOPKGpIqoouo6RWw=; b=TValSEF6iQx4MXdEU/snrJeau/C5xkdgmJuUbQKguHFHHjnvWDTYQBcRfdUVSL3Tbq 64pcDNlLMztil+Db7jmqa8Yt08MLTUyTISsUcF/rr1gXw0YZAOJBGS0DHDxL2Ihu0GhH jQvxRx9r7WLDqcLK5FUpkuv2C0+ACwPol0xoGso33Z3LNg9zz081dxXdHAlGQP6BW0cb uBbR09xJKcLKjxXz150dUiGMx57/Mb6hJ0Eyq+GZN90JO0ig0k3FEOgQXeZA7Qusa7Ey Iiepz536CuCibX/VBLQqi87lZlZL154bcvBxSJ2s09OaSUhVrwWL4H1xPjjbeRp58zCs AWng== X-Gm-Message-State: ALoCoQksA8B6h9hgYCpP0802nH7VMWHi3YJVcjxE8XHCn5RpjG7zrNCfTYPJnWnshvp11UJUJExG X-Received: by 10.236.19.7 with SMTP id m7mr1472964yhm.35.1406885036067; Fri, 01 Aug 2014 02:23:56 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.98.175 with SMTP id o44ls1264499qge.55.gmail; Fri, 01 Aug 2014 02:23:56 -0700 (PDT) X-Received: by 10.221.44.69 with SMTP id uf5mr4411231vcb.4.1406885035958; Fri, 01 Aug 2014 02:23:55 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id ig16si6039393vec.38.2014.08.01.02.23.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 01 Aug 2014 02:23:55 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id hy4so6171441vcb.41 for ; Fri, 01 Aug 2014 02:23:55 -0700 (PDT) X-Received: by 10.52.117.209 with SMTP id kg17mr3636518vdb.28.1406885035864; Fri, 01 Aug 2014 02:23:55 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp95297vcb; Fri, 1 Aug 2014 02:23:55 -0700 (PDT) X-Received: by 10.66.236.35 with SMTP id ur3mr4379417pac.35.1406885034180; Fri, 01 Aug 2014 02:23:54 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id aa10si9065455pac.16.2014.08.01.02.23.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Aug 2014 02:23:54 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XD92k-00084S-RW; Fri, 01 Aug 2014 09:22:30 +0000 Received: from mail-pa0-f44.google.com ([209.85.220.44]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XD92e-0007tc-2w for linux-arm-kernel@lists.infradead.org; Fri, 01 Aug 2014 09:22:24 +0000 Received: by mail-pa0-f44.google.com with SMTP id eu11so5479876pac.3 for ; Fri, 01 Aug 2014 02:22:03 -0700 (PDT) X-Received: by 10.70.33.102 with SMTP id q6mr4420435pdi.39.1406884923066; Fri, 01 Aug 2014 02:22:03 -0700 (PDT) Received: from localhost.localdomain ([114.97.106.113]) by mx.google.com with ESMTPSA id hu11sm12154305pdb.53.2014.08.01.02.21.58 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 01 Aug 2014 02:22:02 -0700 (PDT) From: Zhangfei Gao To: Mike Turquette , haojian.zhuang@linaro.org, haifeng.yan@linaro.org, jchxue@gmail.com, xuwei5@hisilicon.com Subject: [PATCH v3 2/5] clk: hix5hd2: add sd clk Date: Fri, 1 Aug 2014 17:21:11 +0800 Message-Id: <1406884874-30406-3-git-send-email-zhangfei.gao@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1406884874-30406-1-git-send-email-zhangfei.gao@linaro.org> References: <1406884874-30406-1-git-send-email-zhangfei.gao@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140801_022224_156276_B603956D X-CRM114-Status: GOOD ( 11.32 ) X-Spam-Score: -1.4 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.44 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.220.44 listed in wl.mailspike.net] Cc: Jiancheng Xue , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: zhangfei.gao@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Jiancheng Xue Signed-off-by: Jiancheng Xue --- drivers/clk/hisilicon/clk-hix5hd2.c | 21 +++++++++++++++------ include/dt-bindings/clock/hix5hd2-clock.h | 4 ++++ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/drivers/clk/hisilicon/clk-hix5hd2.c b/drivers/clk/hisilicon/clk-hix5hd2.c index da49ca4..d2e0888 100644 --- a/drivers/clk/hisilicon/clk-hix5hd2.c +++ b/drivers/clk/hisilicon/clk-hix5hd2.c @@ -50,9 +50,9 @@ static const char *sfc_mux_p[] __initconst = { "24m", "150m", "200m", "100m", "75m", }; static u32 sfc_mux_table[] = {0, 4, 5, 6, 7}; -static const char *sdio1_mux_p[] __initconst = { +static const char *sdio_mux_p[] __initconst = { "75m", "100m", "50m", "15m", }; -static u32 sdio1_mux_table[] = {0, 1, 2, 3}; +static u32 sdio_mux_table[] = {0, 1, 2, 3}; static const char *fephy_mux_p[] __initconst = { "25m", "125m"}; static u32 fephy_mux_table[] = {0, 1}; @@ -61,20 +61,29 @@ static u32 fephy_mux_table[] = {0, 1}; static struct hisi_mux_clock hix5hd2_mux_clks[] __initdata = { { HIX5HD2_SFC_MUX, "sfc_mux", sfc_mux_p, ARRAY_SIZE(sfc_mux_p), CLK_SET_RATE_PARENT, 0x5c, 8, 3, 0, sfc_mux_table, }, - { HIX5HD2_MMC_MUX, "mmc_mux", sdio1_mux_p, ARRAY_SIZE(sdio1_mux_p), - CLK_SET_RATE_PARENT, 0xa0, 8, 2, 0, sdio1_mux_table, }, + { HIX5HD2_MMC_MUX, "mmc_mux", sdio_mux_p, ARRAY_SIZE(sdio_mux_p), + CLK_SET_RATE_PARENT, 0xa0, 8, 2, 0, sdio_mux_table, }, + { HIX5HD2_SD_MUX, "sd_mux", sdio_mux_p, ARRAY_SIZE(sdio_mux_p), + CLK_SET_RATE_PARENT, 0x9c, 8, 2, 0, sdio_mux_table, }, { HIX5HD2_FEPHY_MUX, "fephy_mux", fephy_mux_p, ARRAY_SIZE(fephy_mux_p), CLK_SET_RATE_PARENT, 0x120, 8, 2, 0, fephy_mux_table, }, }; static struct hisi_gate_clock hix5hd2_gate_clks[] __initdata = { - /*sfc*/ + /* sfc */ { HIX5HD2_SFC_CLK, "clk_sfc", "sfc_mux", CLK_SET_RATE_PARENT, 0x5c, 0, 0, }, { HIX5HD2_SFC_RST, "rst_sfc", "clk_sfc", CLK_SET_RATE_PARENT, 0x5c, 4, CLK_GATE_SET_TO_DISABLE, }, - /*sdio1*/ + /* sdio0 */ + { HIX5HD2_SD_BIU_CLK, "clk_sd_biu", "200m", + CLK_SET_RATE_PARENT, 0x9c, 0, 0, }, + { HIX5HD2_SD_CIU_CLK, "clk_sd_ciu", "sd_mux", + CLK_SET_RATE_PARENT, 0x9c, 1, 0, }, + { HIX5HD2_SD_CIU_RST, "rst_sd_ciu", "clk_sd_ciu", + CLK_SET_RATE_PARENT, 0x9c, 4, CLK_GATE_SET_TO_DISABLE, }, + /* sdio1 */ { HIX5HD2_MMC_BIU_CLK, "clk_mmc_biu", "200m", CLK_SET_RATE_PARENT, 0xa0, 0, 0, }, { HIX5HD2_MMC_CIU_CLK, "clk_mmc_ciu", "mmc_mux", diff --git a/include/dt-bindings/clock/hix5hd2-clock.h b/include/dt-bindings/clock/hix5hd2-clock.h index e328669..5bd4135 100644 --- a/include/dt-bindings/clock/hix5hd2-clock.h +++ b/include/dt-bindings/clock/hix5hd2-clock.h @@ -46,6 +46,7 @@ #define HIX5HD2_SFC_MUX 64 #define HIX5HD2_MMC_MUX 65 #define HIX5HD2_FEPHY_MUX 66 +#define HIX5HD2_SD_MUX 67 /* gate clocks */ #define HIX5HD2_SFC_RST 128 @@ -56,6 +57,9 @@ #define HIX5HD2_FWD_BUS_CLK 133 #define HIX5HD2_FWD_SYS_CLK 134 #define HIX5HD2_MAC0_PHY_CLK 135 +#define HIX5HD2_SD_CIU_CLK 136 +#define HIX5HD2_SD_BIU_CLK 137 +#define HIX5HD2_SD_CIU_RST 138 /* complex */ #define HIX5HD2_MAC0_CLK 192