From patchwork Fri May 18 08:39:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 8789 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 7A6AC23E23 for ; Fri, 18 May 2012 08:39:30 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 45195A181BC for ; Fri, 18 May 2012 08:39:30 +0000 (UTC) Received: by mail-gg0-f180.google.com with SMTP id f1so3204914ggn.11 for ; Fri, 18 May 2012 01:39:30 -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=2pOW5SELnHqLBfntDqt2O6H4abOyyMLR8YsItWvYU8s=; b=ioiEsEf+OPHIyInd8G13vdQHIeUAbA2suW66CtVkI050jNBTIL7+ceShVepAP0BnDW Usz5nu3Yvwamjt8CbYmug+vbdD/HZmjuwxjvBKuy457yiOEHFkjQcHwfemjlJUxlQLZn zIGrMGfAvWIIUyKQz6w6bFTWSdSKoiSv+8IH7XQwWPVK8DGMRRtDoeL4dLxPmXK+DW09 xsEnOhh1iFGyyLX6dpXNJDgK9625U/mrV87zf3DGKSGb1jzj6QtjBY7v6866SrSQUTrt nT+cjdPriO6dv7CSDrtDSAHxZU4x6SIP6H5TnAEJDDzoy8x0LOsxzMuYMbij6s8FlFQX nVtw== Received: by 10.50.154.169 with SMTP id vp9mr15630206igb.53.1337330369880; Fri, 18 May 2012 01:39:29 -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.35.72 with SMTP id o8csp86427ibd; Fri, 18 May 2012 01:39:29 -0700 (PDT) Received: by 10.216.204.88 with SMTP id g66mr6579472weo.79.1337330368719; Fri, 18 May 2012 01:39:28 -0700 (PDT) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id o43si10523287wee.144.2012.05.18.01.39.28 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 May 2012 01:39:28 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.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-wg0-f50.google.com with SMTP id ds11so2667382wgb.31 for ; Fri, 18 May 2012 01:39:28 -0700 (PDT) Received: by 10.180.83.72 with SMTP id o8mr26112079wiy.5.1337330368254; Fri, 18 May 2012 01:39:28 -0700 (PDT) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id bn9sm63091322wib.5.2012.05.18.01.39.26 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 May 2012 01:39:27 -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 04/16] ARM: ux500: Only initialise STE's UIBs on boards which support them Date: Fri, 18 May 2012 09:39:03 +0100 Message-Id: <1337330355-17747-5-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1337330355-17747-1-git-send-email-lee.jones@linaro.org> References: <1337330355-17747-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQndgt/Mvs02yPJ7i3OBDOYDf8IZb8k+b8B+6HarW+yuFBGtFxxRRCITSgesrQ+82QSFls2I 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. 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 8845286..faa46b1 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -635,6 +635,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) @@ -699,6 +701,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") @@ -809,6 +813,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")) { //snowball_pins_init(); @@ -842,6 +848,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(); } /* This board has full regulator constraints */ diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h index 44ab4bd..b5bfc1a 100644 --- a/arch/arm/mach-ux500/board-mop500.h +++ b/arch/arm/mach-ux500/board-mop500.h @@ -92,6 +92,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);