Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752542AbbETD23 (ORCPT ); Tue, 19 May 2015 23:28:29 -0400 Received: from mail-bn1on0058.outbound.protection.outlook.com ([157.56.110.58]:13248 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752491AbbETD2W (ORCPT ); Tue, 19 May 2015 23:28:22 -0400 Authentication-Results: spf=fail (sender IP is 66.35.236.227) smtp.mailfrom=opensource.altera.com; codeaurora.org; dkim=none (message not signed) header.d=none; Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=dinguyen@opensource.altera.com; From: To: , CC: , , , Dinh Nguyen Subject: [PATCHv4 1/2] clk: socfpga: update clk.h so for Arria10 platform to use Date: Tue, 19 May 2015 22:22:41 -0500 Message-ID: <1432092162-8889-2-git-send-email-dinguyen@opensource.altera.com> X-Mailer: git-send-email 2.2.1 In-Reply-To: <1432092162-8889-1-git-send-email-dinguyen@opensource.altera.com> References: <1432092162-8889-1-git-send-email-dinguyen@opensource.altera.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [64.129.157.38] X-ClientProxiedBy: DM2PR10CA0067.namprd10.prod.outlook.com (10.141.241.35) To BN3PR03MB1365.namprd03.prod.outlook.com (25.163.34.151) X-Microsoft-Exchange-Diagnostics-untrusted: 1;BN3PR03MB1365;2:/0svRpygTYV55faedFMR0bR/oFGQ3GAOXyU1Pj+u9FZguU+gDVYEBJ8qauNv49Z8;2:hM37WDmBJkSFMNFigEDEc2kXHNEMyd/PUgDxDzTewxD1ebQO7K2SJPUH2MgtC6vDCLIAY9FNcy474jKkCLtACE7sv1MsaEPSO9mhgNcSPBvZW0aNXp+tQ8RZRMHqLvKDQOOnF9w/3SE/uOWB33EJIA==;6:eS9H/ctGCPtwqP0vjZCZPEE1pIKB03z8HjQNG8EnTwTcBSVbPU5lpHuK7tnXZTeR/ANVjw7SyerACKxJA/UAJS7q2WxEslQLDSZzfTQIXhLOILtZFlJGpgr94tzUpYOHNuI1/bk6+8PKFrgKUzYW7w==;3:t6UJpNZKjdnQezVmgTIC0wlNkm/1HAcsU5yGAawkiaHaeJQ2qfQ9k3k9iTV+nzVST1WMmmKal58xZIkIR+5R7yx851BY6tj3bJIdjRlOAR7fKu0vPKwWAvoxeiYcsnTzLMGT0geidrdy96qrVM1RzYr5o6tbxMr0WoTYnBuKnD7T3F20O0XE7VkaRObe5zCQ82QVRBpBsZHXmu6rsy9VcPZe9ywhbQzWs3xBpCowuAGmpFVCm67naUMLZ37mJDnPCb53uGO9FHP6HEFgrFLCyg+3gJb0b5bwylwCxoZ41mk= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1365;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1PR03MB038;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1PR03MB154; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:;UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BN3PR03MB1365;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1365;BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BN1PR03MB038;BCL:0;PCL:0;RULEID:;SRVR:BN1PR03MB038; X-Forefront-PRVS: 0582641F53 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(6009001)(189002)(199003)(122386002)(66066001)(50466002)(77156002)(46102003)(53416004)(62966003)(42186005)(101416001)(92566002)(86152002)(87976001)(40100003)(189998001)(86362001)(48376002)(229853001)(47776003)(64706001)(19580395003)(5001960100002)(5001770100001)(5001830100001)(69596002)(5001920100001)(97736004)(5001860100001)(19580405001)(2950100001)(50986999)(77096005)(68736005)(76176999)(81156007)(4001540100001)(106356001)(105586002)(50226001)(33646002)(107886002)(4001430100001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN3PR03MB1365;H:linux-builds1.altera.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:0;LANG:en; X-Microsoft-Exchange-Diagnostics-untrusted: =?us-ascii?Q?1;BN3PR03MB1365;9:yUqDJC9t+spNEDH6zocpBCTDuVjM7z0GpTy7Ndgj8R?= =?us-ascii?Q?BygtgDj39FQ1Jvmv6YvhZHHy5/rVleE8u/2RELJfzYTaSoD7Ns81pWBujIih?= =?us-ascii?Q?c76GkFtnkElSZoxGMFz+Y8zaAnQigY1ZK7utBTnTaJ1Ks65cR2qzPd02U7BT?= =?us-ascii?Q?A4Ye4qOB2EqgW67ZHSQ13mcyur4HADrBhKJaKWx3FtT8t/Yopxd7t5lVAW5n?= =?us-ascii?Q?IlpGd9Pva5BYl042eGKloPnhc4xwHJ+hbTGFeK5I0O8c3nWG84UY55qA3S5M?= =?us-ascii?Q?OZZJ+FbQ2TgNULmIV98YZem4ab2kW5JqHWweS1UaI9desLqI/ZZnRGfrxEsM?= =?us-ascii?Q?V7LKFwcBLcOKpLOstkjhPzLgg4OsHL8S9GihVkaglo0+mY1uMCIWJsTeBunP?= =?us-ascii?Q?bit4YmLIGFNvsehL+NVvr/1Mk2eCP0F7sI4uHnc6qax2B/a15lC7XCueSCYo?= =?us-ascii?Q?fQttNsMQSAyb1Wn+SQw0R2zacwmUEeiQV3DrsYqVz0pO0QLtnQhJ+BLc5Ine?= =?us-ascii?Q?K/0tyvu7ALH/rKw0ZqaOZyGK0eLo7BVjTPV8C9ufPipCKBw79JzQtyB1Ewxr?= =?us-ascii?Q?U2xDzpAEDDNCqH2GINguwXKXGDOZCvSdigeqj11zZzu8ejXFDQ25/Lnc/AhO?= =?us-ascii?Q?bVYFR5AP95QnNtHM8EsJrFAZmycRQykPUw5uQLqqroEaumNUh/iFNyJmjfpQ?= =?us-ascii?Q?slzhCmpFf/RHrwUN7PFnon6TidGIvGSqHQk/nwtLq90do4XvnEnQOKXYQ4LK?= =?us-ascii?Q?s5DMCMeo/5wUlWLfGY3eyks3gvC9tqKEcaCicELdsjX8fO/8iQ1NjBzYmicn?= =?us-ascii?Q?u0y4sLo6hM+wNbnrZQKWMFHIwx60HjOdSFChNaauZ+lBFdIoTzSFKwDesxPP?= =?us-ascii?Q?sg1E/W7HWgSKQ8gH/JT8geTgTXsfmYJw7Htx/5mm3Q3Ja8SdauGiN50y1PC1?= =?us-ascii?Q?IRhG3Kjy9gjcDMnH5ZdS4QP12szvgpsgMsUjzlfwHKmrDwQoP1jZURCfTRHx?= =?us-ascii?Q?ajcSqWkuEG8IT56ZN1OG6W78Y0rLimsfXKfe6/gmFGnRe20T2IanYTLTUuAh?= =?us-ascii?Q?ShyUxK+ynYeWV2P+aoGxFTyodnim+3Ogwj4JyD7tdfhx1nNPVb1V/umdvi3R?= =?us-ascii?Q?+QP4Ty+I4XgYk64gfanWIf64UbyXLO4SjMVPJcodBu26rvdodQokO0dDUa98?= =?us-ascii?Q?xKEm0OT2zXdx4=3D?= X-Microsoft-Exchange-Diagnostics-untrusted: 1;BN3PR03MB1365;3:dGj5qWESOkKSCBji/dji4DE11XySj/lKwRpqLyPtG3jQbNHYeDXr0+HHJuDr5IqS4Ku8a3+fnJ2nIUMwNllXsWbIiSOTM2ZPjKG4nCP+r4FtpXnM2USklFMNjijtIVXcdzVT7bDUlEZvwNeVjHDjvw==;10:AaTa9LFLXwI6JQIKhAHEHCCmc4ovnAY3o84Q4jbSQhKPlxEcuc7KuTUSzgulqX/gKutgDQ+CzYiD7/Ozf8q78kHJhXVDhWF4OqjMtgeiThg=;6:M4FACXYVGSOTNP9MUv/1RU4aCcAIOx0Mrhsg6CGSFcMfbHlsqP2uutBCj9/3jU7a X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB1365 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: BY2FFO11FD001.protection.gbl X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD001;1:j/Kr/C54iRXgej05Mmtqa+saQUs/c4Lcqbco3H2dAYHJJpbYfuWno7l5lSkDAxBivRcAkjSTjATmYd2jLTF60K2RYXt5n84Cvm/p+OLSPzXEEOlzrzyMKcn/mOGsK9odKGYV0gc1yO71ABLC3UuqyOyChgh09gGsoGnCB6R7oAE9LrlfMmSiRicR3zmEwhtCUwrqrKS25y1Y0cUwdRoRinOsejW9E6LDytc45OwgCJC5l8PYyyJd2a9kPjW22j4qDpRTrp2BXi0OfUSBbKPqmA== X-Forefront-Antispam-Report: CIP:66.35.236.227;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(339900001)(199003)(189002)(85426001)(5001770100001)(105606002)(106466001)(87936001)(92566002)(46102003)(86152002)(48376002)(16796002)(6070500001)(50226001)(53416004)(5001830100001)(62966003)(50986999)(76176999)(107886002)(64706001)(47776003)(66066001)(4001540100001)(77096005)(86362001)(189998001)(50466002)(19580395003)(77156002)(33646002)(5001960100002)(97736004)(5001860100001)(122386002)(68736005)(229853001)(6806004)(19580405001)(2950100001)(40100003)(81156007)(7099028)(4001430100001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN1PR03MB038;H:sj-itexedge03.altera.priv.altera.com;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;A:0;MX:1;LANG:en; X-Forefront-PRVS: 0582641F53 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2015 03:28:16.4694 (UTC) X-MS-Exchange-CrossTenant-Id: fbd72e03-d4a5-4110-adce-614d51f2077a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fbd72e03-d4a5-4110-adce-614d51f2077a;Ip=[66.35.236.227];Helo=[sj-itexedge03.altera.priv.altera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR03MB038 X-Microsoft-Exchange-Diagnostics: 1;BN1PR03MB154;2:sJKH/qfRc9dsGS/6er4V7Cy4TN9dYMSHIqU/Vp64bMfOm9iajnQ7ndR83WYc++16;2:8cjze7Lnq4vqVRxRXYdv39k96m0Kf9KBBzvkL1Pn8cT9ZQFGJ/Erg9mkKsqItclekQQoeOusyaei5f6p4bX9esQoz3COcHsVGHttwvcXEjvWUne/koFfL4J/AcaC+hfgaBwDDVmkhZ5yTscbSkx1LVsMpi4QP2H52+HpX5GCnaLcZkUqNrCd+ggL71B7q4YJveBLcX8RqPsmAgiIjNlDSlDRHYGJw2V8HPA9cXn5//8=;9:uFBE/jDEW/ncLACU7NGlmHRN9UhI2Cj9GHkEh+RtcgjiJiZfaKMcRsh+QrIdgl+VoDAajJqKOXAOzbwb4G2SI9aNgin2SE3ac45x5oNi2LgI0F8q06CT31lvOiv2oVjqWJYn8adHpNgC0yb27rbxJw== X-OriginatorOrg: opensource.altera.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1943 Lines: 58 From: Dinh Nguyen There are 5 possible parent clocks for the SoCFPGA Arria10. Move the define SYSMGR_SDMMC_CTRL_SET and streq() to clk.h so that the Arria clock driver can use. Signed-off-by: Dinh Nguyen --- drivers/clk/socfpga/clk-gate.c | 4 ---- drivers/clk/socfpga/clk.h | 6 +++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/clk/socfpga/clk-gate.c b/drivers/clk/socfpga/clk-gate.c index dd3a78c..607ab35 100644 --- a/drivers/clk/socfpga/clk-gate.c +++ b/drivers/clk/socfpga/clk-gate.c @@ -32,14 +32,10 @@ #define SOCFPGA_MMC_CLK "sdmmc_clk" #define SOCFPGA_GPIO_DB_CLK_OFFSET 0xA8 -#define streq(a, b) (strcmp((a), (b)) == 0) - #define to_socfpga_gate_clk(p) container_of(p, struct socfpga_gate_clk, hw.hw) /* SDMMC Group for System Manager defines */ #define SYSMGR_SDMMCGRP_CTRL_OFFSET 0x108 -#define SYSMGR_SDMMC_CTRL_SET(smplsel, drvsel) \ - ((((smplsel) & 0x7) << 3) | (((drvsel) & 0x7) << 0)) static u8 socfpga_clk_get_parent(struct clk_hw *hwclk) { diff --git a/drivers/clk/socfpga/clk.h b/drivers/clk/socfpga/clk.h index d291f60..b09a5d5 100644 --- a/drivers/clk/socfpga/clk.h +++ b/drivers/clk/socfpga/clk.h @@ -26,9 +26,13 @@ #define CLKMGR_L4SRC 0x70 #define CLKMGR_PERPLL_SRC 0xAC -#define SOCFPGA_MAX_PARENTS 3 +#define SOCFPGA_MAX_PARENTS 5 #define div_mask(width) ((1 << (width)) - 1) +#define streq(a, b) (strcmp((a), (b)) == 0) +#define SYSMGR_SDMMC_CTRL_SET(smplsel, drvsel) \ + ((((smplsel) & 0x7) << 3) | (((drvsel) & 0x7) << 0)) + extern void __iomem *clk_mgr_base_addr; void __init socfpga_pll_init(struct device_node *node); -- 2.2.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/