From patchwork Tue Jan 21 08:06:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 23425 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f198.google.com (mail-pd0-f198.google.com [209.85.192.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A39E2203BE for ; Tue, 21 Jan 2014 08:06:35 +0000 (UTC) Received: by mail-pd0-f198.google.com with SMTP id v10sf9264434pde.9 for ; Tue, 21 Jan 2014 00:06:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=I5nvxhyz3tsupznbBv5G7Ttu1CaYpdgYcV+w8Yn8rtg=; b=GB9jACWdBpV56qlyWBTT4ovbfFBPjtN4JvAasty2XGlC6Wy1o2pwqm2l6GOqz+SgI6 aG/va6eWNT0vLRazAKe7w/OPEktm47r4lKf5LFZvr4iC+iJv7KADPf+Xk8vWmj1aQJ41 kmgpcDzGhFCShfPwvffmT5VzbzTXJ22DHoRYwTDD/45ZdlLhtiyQ56zKOtNa8iTQ/HZX Z0b3GKf3LARoAwumQM4dkQ77HfAdftpL6fZ/Q4y4Q5XadEh/hG8WN0jufLGElZ1bk2Fr K2bXWDQWmXGoDwPNBVC9dfbnuUQYWpFqiUGmhxWl4sgxiK1QKOIfPY/OZDNY+zOOwTNk Woaw== X-Gm-Message-State: ALoCoQliDFrEsIt78v+QMlJYx+ktLrtvXlYIQZQ0yPBS3auETUVUNHzSxiNz7z0mkbDUVSBTS8Ag X-Received: by 10.68.134.233 with SMTP id pn9mr8389302pbb.5.1390291594819; Tue, 21 Jan 2014 00:06:34 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.102.49 with SMTP id v46ls1202411qge.6.gmail; Tue, 21 Jan 2014 00:06:34 -0800 (PST) X-Received: by 10.58.208.130 with SMTP id me2mr13755503vec.13.1390291594674; Tue, 21 Jan 2014 00:06:34 -0800 (PST) Received: from mail-vb0-f51.google.com (mail-vb0-f51.google.com [209.85.212.51]) by mx.google.com with ESMTPS id kn3si1544190veb.16.2014.01.21.00.06.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Jan 2014 00:06:34 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.51 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.51; Received: by mail-vb0-f51.google.com with SMTP id 11so3398448vbe.10 for ; Tue, 21 Jan 2014 00:06:34 -0800 (PST) X-Received: by 10.58.69.20 with SMTP id a20mr13706482veu.0.1390291594438; Tue, 21 Jan 2014 00:06:34 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp101810vcz; Tue, 21 Jan 2014 00:06:33 -0800 (PST) X-Received: by 10.194.85.75 with SMTP id f11mr9261220wjz.47.1390291593488; Tue, 21 Jan 2014 00:06:33 -0800 (PST) Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by mx.google.com with ESMTPS id i14si2731150wic.79.2014.01.21.00.06.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Jan 2014 00:06:33 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.51 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=74.125.82.51; Received: by mail-wg0-f51.google.com with SMTP id z12so7560773wgg.18 for ; Tue, 21 Jan 2014 00:06:33 -0800 (PST) X-Received: by 10.181.8.66 with SMTP id di2mr2872011wid.43.1390291592963; Tue, 21 Jan 2014 00:06:32 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id w1sm8564009wib.6.2014.01.21.00.06.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Jan 2014 00:06:31 -0800 (PST) From: Linus Walleij To: Mike Turquette Cc: linux-arm-kernel@lists.infradead.org, Andrew Lunn , Linus Walleij Subject: [PATCH] clk: nomadik: fix multiplatform problem Date: Tue, 21 Jan 2014 09:06:21 +0100 Message-Id: <1390291581-5858-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.4.2 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.51 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The Nomadik debugfs screws up multiplatform boots if debugfs is enabled on the multiplatform image, since it's a simple initcall that is unconditionally executed and reads from certain memory locations. Fix this by checking that the driver has been properly initialized, so a base offset to the Nomadik SRC controller exists, before proceeding to register debugfs files. Reported-by: Andrew Lunn Signed-off-by: Linus Walleij --- drivers/clk/clk-nomadik.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/clk-nomadik.c b/drivers/clk/clk-nomadik.c index 6a934a5296bd..05e04ce0f148 100644 --- a/drivers/clk/clk-nomadik.c +++ b/drivers/clk/clk-nomadik.c @@ -494,6 +494,9 @@ static const struct file_operations nomadik_src_clk_debugfs_ops = { static int __init nomadik_src_clk_init_debugfs(void) { + /* Vital for multiplatform */ + if (!src_base) + return -ENODEV; src_pcksr0_boot = readl(src_base + SRC_PCKSR0); src_pcksr1_boot = readl(src_base + SRC_PCKSR1); debugfs_create_file("nomadik-src-clk", S_IFREG | S_IRUGO,