Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752025AbdGMLrp (ORCPT ); Thu, 13 Jul 2017 07:47:45 -0400 Received: from mail-bn3nam01on0070.outbound.protection.outlook.com ([104.47.33.70]:21381 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751157AbdGMLrh (ORCPT ); Thu, 13 Jul 2017 07:47:37 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; From: Dong Aisheng To: CC: , , , , , , , , Subject: [PATCH V2 02/10] clk: reparent orphans after critical clocks enabled Date: Thu, 13 Jul 2017 19:47:07 +0800 Message-ID: <1499946435-7177-3-git-send-email-aisheng.dong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499946435-7177-1-git-send-email-aisheng.dong@nxp.com> References: <1499946435-7177-1-git-send-email-aisheng.dong@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131444200497122803;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(336005)(39400400002)(39850400002)(39840400002)(39380400002)(39450400003)(39410400002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(199003)(54534003)(189002)(9170700003)(50986999)(7416002)(45080400002)(76176999)(85426001)(6916009)(106466001)(2950100002)(50466002)(5660300001)(104016004)(48376002)(77096006)(498600001)(356003)(68736007)(8936002)(33646002)(2351001)(81166006)(2906002)(189998001)(86362001)(575784001)(50226002)(5003940100001)(36756003)(8676002)(39060400002)(105606002)(6666003)(47776003)(626005)(54906002)(305945005)(110136004)(38730400002)(53936002)(4326008)(8656002)(17260700005);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR03MB473;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:ovr;A:1;MX:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN1AFFO11FD032;1:1NVe3lgixCZ63I6WzFbCRBwO+nvIXEyz0CAqZ9yt5?= =?us-ascii?Q?aMUgnsRKviiqvWilGOs7f5v583ty/6GT2Rxv6ZGfXkq4zrTNekHGc9SWFLtU?= =?us-ascii?Q?Qcyht7/7e6Gy/I5SO3pMo67/XmfinPDGQc/tWKeZEgrNSkfZT8reQ8CSWseR?= =?us-ascii?Q?/LnvVmTWQfKLc0SMYuwINs+/qOPoymAOIFj1qRzKklQzJ5bypPFk/NYgeHMD?= =?us-ascii?Q?cjMsl21ZFN1q2XSHteRdbmQSPA+B2fTzPPjQjV7h+vF2iMX7zcz6pc4bYBA4?= =?us-ascii?Q?ELtjn0A8yoqo+Thtw5EwMDjRvhFrQAg2anbyQxRYVeVsCNtOFsDmjugaaJOb?= =?us-ascii?Q?ek6y5BhPM6GyL/KkRZG2GPJPiYflPX54QfgJRuhpM7mhgXhXmEe9goUuG0DS?= =?us-ascii?Q?64o52KikH8d1Yu+Zj9zPpZW6fi+juF0ijgd9mq7u9wJa9gj0ag2F2043/ZWN?= =?us-ascii?Q?S9p4DIl0MvmqjSxGISHtV/O66FfJ8qJpySt60E+qei2ZmcT4wMm1xOZMtOLO?= =?us-ascii?Q?pvbzhE8QIcgBu7ul2GPgQPSoJfYpMEI2qPxXvE8pVlaWH/trnZrUpZ20s92g?= =?us-ascii?Q?WqQPP4PySggVvZOaWSdQUwuHQGwYv1MSe5w9aruu2ChHi6ATzUoBvGbVuqu3?= =?us-ascii?Q?H6z5Wl/ptPl0W9Qr2My4f/a6lfEAbE8OPftzf5DWvCJNEHntj4dhmMeTgc/3?= =?us-ascii?Q?zjC3e/wYiTb3H9O1OltQvbagHIjXZdCyQ9CIEVgt1fcR5sfnfoAfoPda0heL?= =?us-ascii?Q?oIIWUEcVKNSk0RzlbHmh03RObfpLe8oIytlHIyityCXhXPq4SCSHoFb41xPc?= =?us-ascii?Q?3JgxpGRXm7+8Budao3in8/5EBw4ch5dLoLFnGwCkGkwdHLH8d3hTVG+0ghFA?= =?us-ascii?Q?3moME9HbDJMyTox+cy3/klQ38cwA+CkW02K1BZk9JuJpqCqTqYuNHox1b3+y?= =?us-ascii?Q?y9rfionCfEkYuWALkzL3/JyJcVvp5bG/HJLSMA26NwlEjewEZSDJCpSgg4Po?= =?us-ascii?Q?Ew1meRUggzAwKAXjkRHQEbevXow/FCPdG/OF0UBR/2VMg=3D=3D?= MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6f1e2f3b-77e2-4145-2c92-08d4c9e4f0df X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603031)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:BY2PR03MB473; X-Microsoft-Exchange-Diagnostics: 1;BY2PR03MB473;3:aUB+PWNfAr7J//0U8V0ajPnlbnO4FiyHSJLkBj8F21dM3x3d0mRGDhpblyZy5eyzlv/oTUGNgQOSu1Jqz9BFU8hKGRtTuTi4SGvTqsyNCCgChe9aa4eCAdgbFj4dtOplgYBaDfY4VVJNopRtuuLOxTIYTS8phkONDGy/aC4C8Sd0FxWmgOpKPw8i/DhwLbpFs8HZSvab/Ez+EqNwmI06wya+CzZOJy5APk52eDkA3IpuBXm4Y1416v0ThMJO7ztsmy5qGWW2eo3hUQaFl//SQDluPac6NQW1yS7/UH6aqaiDHnqB5yfauESFa6fxyraep4xS8Z9nsb3Yl2D/KnxTV48A+R30bsbbHeuJ4h5AN/5Y4q4VfZFtoQU5srFCQSiHxMQgiX1S2qSkq3YanWPO4CHIX+JYj/NRBbFN/shumJXBjgh3xC97T1GfDD/dYoT8YBkAXBPz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N1+8XvJY/YfHrF/uroPor5VQQWS9f65Sm33GMS+Mwe9ziMcjFDzoE= X-Exchange-Antispam-Report-Test: UriScan:(133145235818549)(236129657087228)(185117386973197)(107004242121476); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(13018025)(2017060910075)(5005006)(13016025)(8121501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(920511095)(6055026)(6096035)(20161123561025)(20161123563025)(20161123556025)(20161123565025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123559100)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BY2PR03MB473;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BY2PR03MB473; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR03MB473;4:fXz/6KcBNQ6T8IkxYjT2R5vrh8uUBpyhDQdr1q0b3aG?= =?us-ascii?Q?gUGBvTdRyHVRDmms3o/ICarXEWDDJMzxvP3zYDRAZdig9zZxK3m7r4tWC73N?= =?us-ascii?Q?jMmtJCpzfYgHEqsWLjJrqVIo0kSepsjNupCkmdg7cAvot0GDWbk0KlkyERiM?= =?us-ascii?Q?+dBZji9wiH9RC+ApmhDxKdsYCkb0togzCMmgTbhDs9SkIbn3+H2Wv0475ePS?= =?us-ascii?Q?R3DEMwgYEKicPnJd6fWUYg76P8rI/iRgFMtWSUF5epjzi5X0GNFIn0CSke7D?= =?us-ascii?Q?wWrjd2P9tEZbSqiIfPnZ5S/zGp+gqd2vaxiP6pKH6QYqRcp5ajMiXzOQUjCo?= =?us-ascii?Q?G1wdKx7RxoDSvjAmRMEoziUo1S8i8vFxW1GS/fY+BE89MLju3tRSDgOAreZg?= =?us-ascii?Q?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XurUkxK0x8DXLG?= =?us-ascii?Q?vPDnesC3OxXUzPECvGL3p29F6rWepGHm34mtV+TTyTUyg791mFV5ERdZOhu1?= =?us-ascii?Q?ic4NU/rzNd5+tDC02wq5MsvmM5S3EnouRTVJctRHWAeiQe4yoi9rl6Ju2eeZ?= =?us-ascii?Q?tec5ByQ=3D=3D?= X-Forefront-PRVS: 0367A50BB1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR03MB473;23:CbySI+ukERIvVaZ3Oi5wu3hlj/I8EdLkLN3tQePnP8?= =?us-ascii?Q?qRj04lzLljkDBFcLsKPkNdewr9/N/wpGNNBeuJbIytt8MnVYtEFd15wl05hW?= =?us-ascii?Q?vuMn5CY+wI+dSj0y6GyG57hTCCeUfcFMkfVjihqIxfYekNxe8DWs+dOu1v0f?= =?us-ascii?Q?oXPN9BV5cPIWnckIRyW4MsQEG+O0KilZsZPLQ5RxSDKHyXi18DUz5on/kwLE?= =?us-ascii?Q?8PYXWqiiMFGbBOYjzMUbbPD8qmD78aARV1FiwCZMlbZt19QEhWEACnXC4Keo?= =?us-ascii?Q?eMRGxkKzB0/h+h46iVI62beJWu6WMer/f+A4fjBYIiRiuFyHDC0SK5V/U8E0?= =?us-ascii?Q?J3Rbbvi9EW4MOJClbQe3sJucgmNsp0ZmV321+4DJFIGbq6I22aqBW2XhyG/U?= =?us-ascii?Q?HRuWvab2ZyoecrCgPnPFssHmD9YHmUTJi5d9/eeis2WVy0cu4PIeEqnD8hPO?= =?us-ascii?Q?ufG8B2SPHWQMJJxk34fIXAXYouFhFDa6po9NGJ31eCI+trFi8FCxWiY8vl/R?= =?us-ascii?Q?trcMSzQg7SR1SxRF5LBEOCvGve63g3YL48nFrvi8G2I+iMcQeRh3N5dg60hA?= =?us-ascii?Q?9nRjAjln9tC6aKhXib5wZwOmGC0vvAGn30dizpNfFNmLh8kdrtJzVOMgxdvB?= =?us-ascii?Q?+yxlPlOj1T6nJ4tB0Lnr3X4yJYx7iKMJ45spLRb1yHzb+wvJkN2gsiOfucfR?= =?us-ascii?Q?NAdfjX7v6VD/KkEd0B0hZSKQEgsE7Ot+P9geny+9nOmMn37HyoSZO7qUPbum?= =?us-ascii?Q?Q8EBaeTIkM6zJGUWCMtqqS+C8lCFQPfKO8lChwKa+RHF8CflX690y8Hln7B/?= =?us-ascii?Q?YVQ2b3cFAJtrGovArepRPY4tyWvp+5T65KEM2wy2Kh70WVzhkNIeUliVoThp?= =?us-ascii?Q?io+P137gNPktoJqqvncNOeP5lPqgbIp8HEyO1s/UJpC0KbwKpLToN48RdSl7?= =?us-ascii?Q?QiR052grkDwtG6rnU45H9cpI1W/+AprZu4lg+9HqbONdxbroHUQq/zUzW7vP?= =?us-ascii?Q?R1MErUbs90I34xV4cDsyvUBwXZm4q9I7z39VE/5h4CNl5U4jQ0aPwP6y47GV?= =?us-ascii?Q?4mfMNqrXZcN6uXtqmYZbqmz6g3ct+f08Yl8RbWeW7yS8iagI3IYwHZjcc7wM?= =?us-ascii?Q?xc65NyxnVDEGdBL0xTEVLdo5MZoZeCphH13VJHWk9vN9DHzlef7LLQG9dN4k?= =?us-ascii?Q?aT3UCV6Exoaqjbt73Vwvk7PCyUAjb4shNZihbzgf7vv8k6KsMhTp8tfqXjdw?= =?us-ascii?Q?th5JmWkB3lmIeu6TS1h7iqOos8JJ1ngqxnunQX1Pnd336UVy6F2nYVlGM/Zr?= =?us-ascii?Q?2oSWdHPgjhuv8rY58qwuvJjpJsDVYS+yq3QNJWw16sqcJVHGnj4DnmSw3CDM?= =?us-ascii?Q?D/vu9eYwyp+k/4Ds+0IU6yAuCTQxsSQg3bk+SZcp7Ve76z4Q6ICnAAdNzBeL?= =?us-ascii?Q?84KKcV2g=3D=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR03MB473;6:tajPHuC8QqarHSQgLaRg4+W0giieMRIbTdhN0945wOq?= =?us-ascii?Q?JACqvrYQ5O8sv9W32FvznWv2llK3k+C1X0/x2hKq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RTDnCdghJ4t7+HDAsGRTge2+i7CE1j7gMSFw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;BY2PR03MB473;5:P233WOI2rDb37JzXH+zSZPnLfHFJC0J9H2ud9zfnRNMnUfFMNc/dEEuaCGaWmjLnVioHLmOQ7C/NRWPZAdhTNcicNWO2oaY6jzKoci7VZLFLHOb0RHz0geeIEE+06UCu6PpbR/8uS6eYP19FLHeiBtVQSc00XAmByeOeZlXUAk2t0+GQwo0jab4MBSNL7r2A6LyV8ahXaJLQ4ntrFQwniYieWvIpeodnGkbb9E794Ko1rbzoqreccg7Prn0g/qByQ2o9QlEBaNE9C2wijq8Sk6kiyhW/0GCzZ3t91MDLCnGra0nucf8VhtWMNR1lKF6/OPwBohhAE3AA7A69rB33+O37o7I/Ezuuy0J6tyoncbwmwFHH7T+GSX+dh6guIbhaUHOPsHBdwJvATMH2sHanOC8ZtSUuXDdJh9xi4kPcfOctK3v86Lro0o/U+raqzPRg1CXuj88DKgXfp+r46snoCg/vwuGBlE1Nt+bnII1cMicGD+Mohrp2TnnnvFFz66ffvkdTVdcI+pIehdQwwQcHNg==;24:4iC3t0vYtMZBaIPeZYL8WD10OqxX5t9IoY8+D9f8ph4S4JQWVTtqBabCbjL6aKe9/z77DTX5CgsH//l70lO/tbogYLMJd2y+YjVKn/sndG0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY2PR03MB473;7:HKOiMYQiNRWqWNYEmGhrUtgnnskDVEwI+X0/QxF4/zKlfAljYXMWrTBNou1EIRIsqsw8lBI/viKyF2Zfl7MtXTxvawYm5j1eHKHPOd+20Hf0HB9GeOfzWH97t4vq9YfDRWK94txlgHzs/WvbHsrxBe3wwqLILqWIuOJSRbQBPNY/0nK6mnvZZ4kBQkHfkrnjd4XKz5oe7Xy1lvM+Rb/sXlu5DRqAL+nAKquxP/5g/17oN9jMX7GGd9mZvBa/2XzLukodXefDPkk9EBwPO9MrmvNDTdgc2S5msETMPLTxPvvCo/y0tZrmfjvh9/Vb4LakmA6GGwR2ARVC9OAkJ2HOtWKpoCAIyepIXvbKTYsGsYc1hc721KVqnksMsMVb+cXV0IQb9+zjezSwyZFE3J0//K7j7MMj1LZ7pmMHZJsTNYXjZDilqKVZK0qQC8o42+ikBX37GNqO04NHIblKXEyQZZXzLsI1OEIFbdKYw54ICdjdJQw2YGMZMGi71DFW8QPImrn262PokBABt5kKXre3GMSV8bQqj5EVjpCpcUIKE2rQcZASRPk8Y5GrL117cVV2Rm1hPq+DmpsQ9EmLqvUEVinnVKrF2SzPtJMWSqfHDOP2sLPH9w9v14+9QlgYu/KCYFwEaxUaul3i5lty36wxUDz9go3NOVy1LZL9i7dGpk/N7do+kJRXVyw9NksPVIZs6rJzmnwOyZ/SnHnl71rU0955Cx1rssvUOtltdwKWnj6bUp8Fsvr8HJmF6kNPX5dKOXBPwdwwCsXNcB5YoUT2TpQCwNEswN0cVB5g8LIZ8e0= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2017 11:47:29.5250 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR03MB473 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5809 Lines: 133 The orphan clocks reparent operation should be moved after the critical clocks enabled, otherwise it may get a chance to disable a newly registered critical clock which triggers the following warning. Assuming we have two clocks: A and B, B is the parent of A. Clock A has flag: CLK_OPS_PARENT_ENABLE Clock B has flag: CLK_IS_CRITICAL Step 1: Clock A is registered, then it becomes orphan. Step 2: Clock B is registered. Before clock B reach the critical clock enable operation, orphan A will find the newly registered parent B and do reparent operation, then parent B will be finally disabled in __clk_set_parent_after() due to CLK_OPS_PARENT_ENABLE flag as there's still no users of B which will then trigger the following warning. [ 0.000000] WARNING: CPU: 0 PID: 0 at drivers/clk/clk.c:597 clk_core_disable+0xb4/0xe0 [ 0.000000] Modules linked in: [ 0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.11.0-rc1-00056-gdff1f66-dirty #1373 [ 0.000000] Hardware name: Generic DT based system [ 0.000000] Backtrace: [ 0.000000] [] (dump_backtrace) from [] (show_stack+0x18/0x1c) [ 0.000000] r6:600000d3 r5:00000000 r4:c0e26358 r3:00000000 [ 0.000000] [] (show_stack) from [] (dump_stack+0xb4/0xe8) [ 0.000000] [] (dump_stack) from [] (__warn+0xd8/0x104) [ 0.000000] r10:c0c21cd0 r9:c048aa78 r8:00000255 r7:00000009 r6:c0c1cd90 r5:00000000 [ 0.000000] r4:00000000 r3:c0e01d34 [ 0.000000] [] (__warn) from [] (warn_slowpath_null+0x28/0x30) [ 0.000000] r9:00000000 r8:ef00bf80 r7:c165ac4c r6:ef00bf80 r5:ef00bf80 r4:ef00bf80 [ 0.000000] [] (warn_slowpath_null) from [] (clk_core_disable+0xb4/0xe0) [ 0.000000] [] (clk_core_disable) from [] (clk_core_disable_lock+0x20/0x2c) [ 0.000000] r4:000000d3 r3:c0e0af00 [ 0.000000] [] (clk_core_disable_lock) from [] (clk_core_disable_unprepare+0x14/0x28) [ 0.000000] r5:00000000 r4:ef00bf80 [ 0.000000] [] (clk_core_disable_unprepare) from [] (__clk_set_parent_after+0x38/0x54) [ 0.000000] r4:ef00bd80 r3:000010a0 [ 0.000000] [] (__clk_set_parent_after) from [] (clk_register+0x4d0/0x648) [ 0.000000] r6:ef00d500 r5:ef00bf80 r4:ef00bd80 r3:ef00bfd4 [ 0.000000] [] (clk_register) from [] (clk_hw_register+0x10/0x1c) [ 0.000000] r9:00000000 r8:00000003 r7:00000000 r6:00000824 r5:00000001 r4:ef00d500 [ 0.000000] [] (clk_hw_register) from [] (_register_divider+0xcc/0x120) [ 0.000000] [] (_register_divider) from [] (clk_register_divider+0x44/0x54) [ 0.000000] r10:00000004 r9:00000003 r8:00000001 r7:00000000 r6:00000003 r5:00000001 [ 0.000000] r4:f0810030 [ 0.000000] [] (clk_register_divider) from [] (imx7ulp_clocks_init+0x558/0xe98) [ 0.000000] r7:c0e296f8 r6:c165c808 r5:00000000 r4:c165c808 [ 0.000000] [] (imx7ulp_clocks_init) from [] (of_clk_init+0x118/0x1e0) [ 0.000000] r10:00000001 r9:c0e01f68 r8:00000000 r7:c0e01f60 r6:ef7f8974 r5:ef0035c0 [ 0.000000] r4:00000006 [ 0.000000] [] (of_clk_init) from [] (time_init+0x2c/0x38) [ 0.000000] r10:efffed40 r9:c0d61a48 r8:c0e78000 r7:c0e07900 r6:ffffffff r5:c0e78000 [ 0.000000] r4:00000000 [ 0.000000] [] (time_init) from [] (start_kernel+0x218/0x394) [ 0.000000] [] (start_kernel) from [<6000807c>] (0x6000807c) [ 0.000000] r10:00000000 r9:410fc075 r8:6000406a r7:c0e0c930 r6:c0d61a44 r5:c0e07918 [ 0.000000] r4:c0e78294 [ 0.000000] ---[ end trace 0000000000000000 ]--- Fixes: fc8726a2c021 ("clk: core: support clocks which requires parents enable (part 2)") Cc: Stephen Boyd Cc: Michael Turquette Cc: Shawn Guo Signed-off-by: Dong Aisheng --- ChangeLog: v1->v2: * add more detailed commit messages --- drivers/clk/clk.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index fc58c52..e2955b1 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -2471,25 +2471,6 @@ static int __clk_core_init(struct clk_core *core) core->rate = core->req_rate = rate; /* - * walk the list of orphan clocks and reparent any that newly finds a - * parent. - */ - hlist_for_each_entry_safe(orphan, tmp2, &clk_orphan_list, child_node) { - struct clk_core *parent = __clk_init_parent(orphan); - - /* - * we could call __clk_set_parent, but that would result in a - * redundant call to the .set_rate op, if it exists - */ - if (parent) { - __clk_set_parent_before(orphan, parent); - __clk_set_parent_after(orphan, parent, NULL); - __clk_recalc_accuracies(orphan); - __clk_recalc_rates(orphan, 0); - } - } - - /* * optional platform-specific magic * * The .init callback is not used by any of the basic clock types, but @@ -2511,6 +2492,26 @@ static int __clk_core_init(struct clk_core *core) } kref_init(&core->ref); + + /* + * walk the list of orphan clocks and reparent any that newly finds a + * parent. + */ + hlist_for_each_entry_safe(orphan, tmp2, &clk_orphan_list, child_node) { + struct clk_core *parent = __clk_init_parent(orphan); + + /* + * we could call __clk_set_parent, but that would result in a + * redundant call to the .set_rate op, if it exists + */ + if (parent) { + __clk_set_parent_before(orphan, parent); + __clk_set_parent_after(orphan, parent, NULL); + __clk_recalc_accuracies(orphan); + __clk_recalc_rates(orphan, 0); + } + } + out: clk_prepare_unlock(); -- 2.7.4