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: 9128803 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 1EEFE60762 for ; Fri, 20 May 2016 07:25:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 10D1625D91 for ; Fri, 20 May 2016 07:25:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 05BEF279C4; Fri, 20 May 2016 07:25:55 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9B7F125D91 for ; Fri, 20 May 2016 07:25:54 +0000 (UTC) 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 1b3enB-0004nC-FH; Fri, 20 May 2016 07:24:17 +0000 Received: from 212-186-180-163.static.surfer.at ([212.186.180.163] helo=cgate.sperl.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b3emt-0004Xe-Jg; Fri, 20 May 2016 07:24:00 +0000 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160520_002359_928518_C209C8F7 X-CRM114-Status: UNSURE ( 7.55 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Sperl MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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");