From patchwork Fri May 20 07:23:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Sperl X-Patchwork-Id: 9128799 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B7CEF60762 for ; Fri, 20 May 2016 07:23:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AADD427125 for ; Fri, 20 May 2016 07:23:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FD7527A84; Fri, 20 May 2016 07:23:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5373A27125 for ; Fri, 20 May 2016 07:23:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754959AbcETHX0 (ORCPT ); Fri, 20 May 2016 03:23:26 -0400 Received: from 212-186-180-163.static.surfer.at ([212.186.180.163]:55653 "EHLO cgate.sperl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754089AbcETHXZ (ORCPT ); Fri, 20 May 2016 03:23:25 -0400 Received: from rasp3a.intern.sperl.org (account martin@sperl.org [10.10.10.43] verified) by sperl.org (CommuniGate Pro SMTP 6.1.2) with ESMTPSA id 6464968; Fri, 20 May 2016 07:23:20 +0000 From: kernel@martin.sperl.org To: Michael Turquette , Stephen Boyd , Stephen Warren , Lee Jones , Eric Anholt , linux-clk@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org Cc: Martin Sperl Subject: [PATCH 2/2] memory: bcm2835: enable driver early in the boot process Date: Fri, 20 May 2016 07:23:17 +0000 Message-Id: <1463728997-8241-3-git-send-email-kernel@martin.sperl.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1463728997-8241-1-git-send-email-kernel@martin.sperl.org> References: <1463728997-8241-1-git-send-email-kernel@martin.sperl.org> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Martin Sperl Enable the critical sdram-clocks early during the boot process, so that these clocks (and their PLLs) can not get disabled when a different driver disables its clocks again because it failed to probe propperly (maybe deferred). Signed-off-by: Martin Sperl --- drivers/memory/bcm2835-sdram.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/memory/bcm2835-sdram.c b/drivers/memory/bcm2835-sdram.c index 9d8cce2..7b6406d 100644 --- a/drivers/memory/bcm2835-sdram.c +++ b/drivers/memory/bcm2835-sdram.c @@ -431,6 +431,9 @@ static int bcm2835_sdram_probe(struct platform_device *pdev) /* setup debugfs */ bcm2835_sdram_debugfs(pdev); + /* note that we have registered sdram */ + dev_dbg(&pdev->dev, "registered sdram\n"); + return 0; } @@ -457,7 +460,12 @@ static struct platform_driver bcm2835_sdram_driver = { .of_match_table = bcm2835_sdram_of_match_table, }, }; -module_platform_driver(bcm2835_sdram_driver); + +static int __init __bcm2835_sdram_driver_init(void) +{ + return platform_driver_register(&bcm2835_sdram_driver); +} +core_initcall_sync(__bcm2835_sdram_driver_init); MODULE_AUTHOR("Martin Sperl"); MODULE_DESCRIPTION("sdram driver for bcm2835 chip");