From patchwork Wed May 30 04:47:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 9029 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id DEA0323E58 for ; Wed, 30 May 2012 04:48:33 +0000 (UTC) Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com [209.85.214.180]) by fiordland.canonical.com (Postfix) with ESMTP id 9CA5CA18073 for ; Wed, 30 May 2012 04:48:33 +0000 (UTC) Received: by mail-ob0-f180.google.com with SMTP id un3so10000826obb.11 for ; Tue, 29 May 2012 21:48:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=ygTiAZaRdxNyRInzbB6rQonCMUY4nwj3NAJWjnNkUac=; b=E/iosgvnoe9ZvR6Wvnn8jr8D5UWny18IOGo+I3LvKSROvMinTruOCLR0ultQ92uFf7 0bCrW79e0j7PE3AjE3XXMzX0vbjBC39Bii2me42TH50TpM63JcXjaX9qKrCIvOGlCnDF sZjqf+lfUsqPh2Tlz63w9uq8eyEhvuBHjvWQiHtQlU5zf2k1aJsJKBySIcjyZ4p0rC8i 0yhIhABvxZgiYjbUmhoJuqzr0L61lDjvXofx/SI9YBXgekBe3FJQdPl2s9LEINOZi5ph OaN/XR+dYWgZlJykV9V2eLvy7krQGoq819q3iz9G1o8V5/RlLeumkDJo8UFcSoxuA6X6 lLQA== Received: by 10.50.46.232 with SMTP id y8mr9342220igm.57.1338353313301; Tue, 29 May 2012 21:48:33 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp170258ibb; Tue, 29 May 2012 21:48:32 -0700 (PDT) Received: by 10.68.221.72 with SMTP id qc8mr45545448pbc.63.1338353312546; Tue, 29 May 2012 21:48:32 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id kg6si23391939pbc.215.2012.05.29.21.48.32 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 29 May 2012 21:48:32 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-pb0-f50.google.com with SMTP id rr4so7848714pbb.37 for ; Tue, 29 May 2012 21:48:32 -0700 (PDT) Received: by 10.68.232.103 with SMTP id tn7mr45287793pbc.86.1338353312233; Tue, 29 May 2012 21:48:32 -0700 (PDT) Received: from localhost.localdomain ([118.143.64.134]) by mx.google.com with ESMTPS id kd6sm25122557pbc.24.2012.05.29.21.48.29 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 29 May 2012 21:48:31 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, arnd@arndb.de, linus.walleij@stericsson.com, grant.likely@secretlab.ca, cjb@laptop.org, broonie@opensource.wolfsonmicro.com, sameo@linux.intel.com Cc: Lee Jones Subject: [PATCH 11/22] ARM: ux500: Only initialise STE's UIBs on boards which support them Date: Wed, 30 May 2012 12:47:29 +0800 Message-Id: <1338353260-10097-12-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1338353260-10097-1-git-send-email-lee.jones@linaro.org> References: <1338353260-10097-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQkb5eGCTuVkDwI0CzZMXWHaAI6ydyFvOvn6xYM3WQ/6Md3xNJWjMvXnMulw+pNkIuXmtbP2 ST-Ericsson uses User Interface Boards to extend functionality of some of their development boards. However, these aren't compatible with all the supported boards found in Mainline (Snowball for instance). This patch ensures that the UIBs are only probed on boards which can actually support them. This in turn saves lots of unnecessary error messages normally found in Snowball's boot log. Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/mach-ux500/board-mop500-uib.c | 4 +--- arch/arm/mach-ux500/board-mop500.c | 8 ++++++++ arch/arm/mach-ux500/board-mop500.h | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-ux500/board-mop500-uib.c b/arch/arm/mach-ux500/board-mop500-uib.c index b29a788..1f47d96 100644 --- a/arch/arm/mach-ux500/board-mop500-uib.c +++ b/arch/arm/mach-ux500/board-mop500-uib.c @@ -96,7 +96,7 @@ static void __init __mop500_uib_init(struct uib *uib, const char *why) /* * Detect the UIB attached based on the presence or absence of i2c devices. */ -static int __init mop500_uib_init(void) +int __init mop500_uib_init(void) { struct uib *uib = mop500_uib; struct i2c_adapter *i2c0; @@ -131,5 +131,3 @@ static int __init mop500_uib_init(void) return 0; } - -module_init(mop500_uib_init); diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index ea6082a..6b3fef5 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -716,6 +716,8 @@ static void __init mop500_init_machine(void) /* This board has full regulator constraints */ regulator_has_full_constraints(); + + mop500_uib_init(); } static void __init snowball_init_machine(void) @@ -780,6 +782,8 @@ static void __init hrefv60_init_machine(void) /* This board has full regulator constraints */ regulator_has_full_constraints(); + + mop500_uib_init(); } MACHINE_START(U8500, "ST-Ericsson MOP500 platform") @@ -883,6 +887,8 @@ static void __init u8500_init_machine(void) i2c_register_board_info(2, mop500_i2c2_devices, ARRAY_SIZE(mop500_i2c2_devices)); + mop500_uib_init(); + } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { /* * Devices to be DT:ed: @@ -913,6 +919,8 @@ static void __init u8500_init_machine(void) i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); i2c_register_board_info(2, mop500_i2c2_devices, ARRAY_SIZE(mop500_i2c2_devices)); + + mop500_uib_init(); } mop500_i2c_init(parent); diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h index 3be0cb8..2f87b25 100644 --- a/arch/arm/mach-ux500/board-mop500.h +++ b/arch/arm/mach-ux500/board-mop500.h @@ -89,6 +89,7 @@ void __init mop500_pinmaps_init(void); void __init snowball_pinmaps_init(void); void __init hrefv60_pinmaps_init(void); +int __init mop500_uib_init(void); void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info, unsigned n);