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: 11721 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 7A58B23E57 for ; Tue, 25 Sep 2012 15:10:24 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 2161DA190BB for ; Tue, 25 Sep 2012 15:10:24 +0000 (UTC) Received: by ieje10 with SMTP id e10so13114206iej.11 for ; Tue, 25 Sep 2012 08:10:23 -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:x-gm-message-state; bh=5TuWIGHYTGKlBCuN5DKLkbwG+DaZWiQwvZ6mbbHS7Z4=; b=QIFOUQf3kefxOzaKIdaWBl8zXAV/TCund18D54XnJtLehZ7Xs9xcM2EfqBB5b2C4eP b4s+gjNUHLdeTwLw7a1MGzTBa+6q4AA8t2i2dUDMuNw3w3WCwP8FVa8TC4JYVj9tDkfV 77Cg46lNS6ycbonOS0r5KKEEhhW07usTB7L+u2SkG807PD4H31qV+uBEy0fBIO6ilplS MRpi8CjUCRA/W2dGLHgKpQ4ot74p9N1yDeKjc1gtuYTq4edF6AiG4mmhThwbIqC7aWiG 2IW4iLLuJS+83hGBYK4+sfislw9cwtBxs1/WvyJxkX9Khg2HnSRKSDSP25GsyIF2URqQ 5WKg== Received: by 10.42.110.130 with SMTP id q2mr12246998icp.53.1348585823493; Tue, 25 Sep 2012 08:10:23 -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.50.184.232 with SMTP id ex8csp299896igc; Tue, 25 Sep 2012 08:10:22 -0700 (PDT) Received: by 10.180.100.133 with SMTP id ey5mr22589460wib.4.1348585821017; Tue, 25 Sep 2012 08:10:21 -0700 (PDT) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx.google.com with ESMTPS id fj2si1312940wib.47.2012.09.25.08.10.19 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 25 Sep 2012 08:10:21 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.212.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by wibhr7 with SMTP id hr7so609014wib.13 for ; Tue, 25 Sep 2012 08:10:19 -0700 (PDT) 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 Cc: STEricsson_nomadik_linux@list.st.com, linus.walleij@stericsson.com, arnd@arndb.de, Lee Jones 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: ALoCoQk1E5h+97R5fLg6nfaWJJERRicEgdFs3gS4SV17AJMgsm7AREvNZYu0PzYZMUslAZ57VCFV 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 --- 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)