From patchwork Tue Sep 25 15:10:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 1504901 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 505E7DF24C for ; Tue, 25 Sep 2012 15:12:24 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TGWmG-0005yM-Db; Tue, 25 Sep 2012 15:10:24 +0000 Received: from mail-wi0-f171.google.com ([209.85.212.171]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TGWmD-0005xN-Ao for linux-arm-kernel@lists.infradead.org; Tue, 25 Sep 2012 15:10:22 +0000 Received: by wibhj13 with SMTP id hj13so562562wib.0 for ; Tue, 25 Sep 2012 08:10:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=5TuWIGHYTGKlBCuN5DKLkbwG+DaZWiQwvZ6mbbHS7Z4=; b=MLw+rmcAvqj1rOaNQIEtsI5851SLVtrA/buWJ/P/GmyNSpm05JHPwzaoZXA8xKlh0q X7KbDZKk7TvPBGYZjNf74+Y28tLqjVK6YdbgePr8K85Yqmj+vbCgwAeHe+yMmSgB9uk0 5AC8/zfYr9Y91Zjs/WMNxGO7ljDtj52f12OKFYsiHiHfF+hw4wTS/5lTck23967YSMmf L1OyOLmOf5FRQoCOnzW2S0mZrUVGdMuIVC2/Yutk+RLEizmmdhdQsEx+3//NPpuOUCzX KGj3J0R0fehAqVCJJ3nJAGRTSUPeg+YHhOQ69OhbOSNwsA93rMsMiHO5ke674kAp4WxW wKig== Received: by 10.216.226.98 with SMTP id a76mr8111056weq.5.1348585819423; Tue, 25 Sep 2012 08:10:19 -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 w7sm20480459wiz.0.2012.09.25.08.10.18 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 25 Sep 2012 08:10:18 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: ux500: Fix initialisation order for UIBs Date: Tue, 25 Sep 2012 16:10:12 +0100 Message-Id: <1348585812-32073-1-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQn/NHIEgrOtL3gMMC0AvcdHjjtJmou0Nm9bKsNsiHEDGvzDZjw43RRUt/npZ06oLuIAMFAe X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.171 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: STEricsson_nomadik_linux@list.st.com, Lee Jones , linus.walleij@stericsson.com, arnd@arndb.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org An earlier change prevented User Interface Boards (UIBs) from being initialised on boards which did not support them. This change had the undesired effect of reordering the UIB initialisation calls with I2C registration. Here we ensure UIBs are only setup after all required infrastructure is already in place. Signed-off-by: Lee Jones Acked-by: Arnd Bergmann Acked-by: Linus Walleij --- arch/arm/mach-ux500/board-mop500.c | 10 +--------- arch/arm/mach-ux500/cpu.c | 2 ++ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 5eb5ea1..4eedf1c 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -639,8 +639,6 @@ 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) @@ -705,8 +703,6 @@ 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") @@ -739,7 +735,7 @@ MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") .timer = &ux500_timer, .handle_irq = gic_handle_irq, .init_machine = snowball_init_machine, - .init_late = ux500_init_late, + .init_late = NULL, MACHINE_END #ifdef CONFIG_MACH_UX500_DT @@ -829,8 +825,6 @@ 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("st-ericsson,hrefv60+")) { /* * The HREFv60 board removed a GPIO expander and routed @@ -840,8 +834,6 @@ static void __init u8500_init_machine(void) mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO; platform_add_devices(mop500_platform_devs, ARRAY_SIZE(mop500_platform_devs)); - - mop500_uib_init(); } /* This board has full regulator constraints */ diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index e2360e7..ab2ca7d 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c @@ -26,6 +26,7 @@ #include #include "clock.h" +#include "board-mop500.h" void __iomem *_PRCMU_BASE; @@ -77,6 +78,7 @@ void __init ux500_init_late(void) { clk_debugfs_init(); clk_init_smp_twd_cpufreq(); + mop500_uib_init(); } static const char * __init ux500_get_machine(void)