From patchwork Tue Apr 17 15:44:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 153238 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id ABF9EB700F for ; Wed, 18 Apr 2012 01:47:16 +1000 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SKAa2-0000Rp-Kx; Tue, 17 Apr 2012 15:44:34 +0000 Received: from mail-bk0-f49.google.com ([209.85.214.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SKAZv-0000RC-Lp for linux-arm-kernel@lists.infradead.org; Tue, 17 Apr 2012 15:44:31 +0000 Received: by bkcjk13 with SMTP id jk13so6509060bkc.36 for ; Tue, 17 Apr 2012 08:44:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=JX4Amg0r3P1E+7MeUOXyPyELZr3+6cZPUG876JO0bso=; b=EqNxH4rqaCcNarcmL1tBv5yXMBPwDvrfqnjfCzDwS1v2uYKE0Tw2IR2i88NLZfCVRo R6LXJJW1RcpM91+3vf79g5MF8kAytOpJz2CMCv40Pt2Q9+vgBqyQBHBoNrZIY/Tbd8An PCA1jcJGXZXL4vQuVxO325VcyaIkzVA5KGx5cb/cx/c0OxvdMnPNBLA1f5hrbdZzJzih Om9HkDMopZhnOC6HdJDDXEITqQ5+c7bMjSTw0Wpq8oSU3BInjWaO79QobcqUgMeAwVk6 XNrNRmPKL0tgdNI5puqta9W8oi8oXvORLreX+HLihTvl/c16SdAbplq+e3+4T2H3pCIR qNxQ== Received: by 10.204.156.79 with SMTP id v15mr4960055bkw.37.1334677465433; Tue, 17 Apr 2012 08:44:25 -0700 (PDT) Received: from [192.168.0.130] (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id u16sm38862487bkf.10.2012.04.17.08.44.23 (version=SSLv3 cipher=OTHER); Tue, 17 Apr 2012 08:44:24 -0700 (PDT) Message-ID: <4F8D8FD6.1070508@linaro.org> Date: Tue, 17 Apr 2012 16:44:22 +0100 From: Lee Jones User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120402 Thunderbird/11.0.1 MIME-Version: 1.0 To: Lee Jones Subject: Re: [PATCH 11/16 v2] ARM: ux500: Do not attempt to register non-existent i2c devices on Snowball References: <1334659448-11521-1-git-send-email-lee.jones@linaro.org> <1334659448-11521-12-git-send-email-lee.jones@linaro.org> In-Reply-To: <1334659448-11521-12-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQnTHMnAnnAO5Ep3fjkJ8j7PnalZGT/TzQLU3LXGOxKEoatNC3ZiEa9zv8Jz5CPN1SSBvDOV 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.214.49 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux@arm.linux.org.uk, linus.walleij@stericsson.com, arnd@arndb.de, grant.likely@secretlab.ca, cjb@laptop.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org From: Lee Jones Date: Mon, 16 Apr 2012 15:26:55 +0100 Subject: [PATCH 11/16] ARM: ux500: Do not attempt to register non-existent i2c devices on Snowball This patch prevents i2c devices which are not present on the Snowball low-cost development board from being registered. Devices such as; tc3589x, bu1780 and lp5521 are present on other supported boards, but are not located on Snowball. Signed-off-by: Lee Jones Reviewed-by: Arnd Bergmann --- arch/arm/mach-ux500/board-mop500.c | 24 +++++++++++++----------- 1 files changed, 13 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index a46345e..ed92456 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -652,7 +652,6 @@ static void __init mop500_init_machine(void) static void __init snowball_init_machine(void) { struct device *parent = NULL; - int i2c0_devs; int i; parent = u8500_init_devices(); @@ -670,11 +669,6 @@ static void __init snowball_init_machine(void) mop500_spi_init(parent); mop500_uart_init(parent); - i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); - i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); - i2c_register_board_info(2, mop500_i2c2_devices, - ARRAY_SIZE(mop500_i2c2_devices)); - /* This board has full regulator constraints */ regulator_has_full_constraints(); } @@ -787,7 +781,6 @@ static void __init u8500_init_machine(void) int i; parent = u8500_of_init_devices(); - i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++) mop500_platform_devs[i]->dev.parent = parent; @@ -805,6 +798,12 @@ static void __init u8500_init_machine(void) ARRAY_SIZE(mop500_platform_devs)); mop500_sdi_init(parent); + + i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); + i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); + i2c_register_board_info(2, mop500_i2c2_devices, + ARRAY_SIZE(mop500_i2c2_devices)); + } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { snowball_pins_init(); @@ -831,13 +830,16 @@ static void __init u8500_init_machine(void) ARRAY_SIZE(mop500_platform_devs)); hrefv60_sdi_init(parent); + + i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); + i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES; + + i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); + i2c_register_board_info(2, mop500_i2c2_devices, + ARRAY_SIZE(mop500_i2c2_devices)); } mop500_i2c_init(parent); - i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); - i2c_register_board_info(2, mop500_i2c2_devices, - ARRAY_SIZE(mop500_i2c2_devices)); - /* This board has full regulator constraints */ regulator_has_full_constraints(); }