From patchwork Thu Apr 5 09:55:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 7655 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 282B423ED0 for ; Thu, 5 Apr 2012 09:56:05 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id D3902A18656 for ; Thu, 5 Apr 2012 09:56:04 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so2131028iag.11 for ; Thu, 05 Apr 2012 02:56:04 -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=eR2A13gkM9aYGJMZsbt/XzTGe9qSGa5FpF2G03UDn3Y=; b=IMkm/touI2MOdJ9zjyI0fAW680RpzedR6fDUKJrXJiNerNIeBq+B/G7uSrR15gu+KC fFEERWEleaIsKt+/4WGOd3d7Eo6zNm7iUtLofjvYi5dJRiTS75FjFZftpLDBKDEnbDzq 3kcfca5FOxu4LP/IEJMzEzMfpAR9uNy+/DD3D00QRTL4oslDVriSUGX+nKP+20wikn7B I52ODJqJk2DziMtUIvicKXlhlv7AcpHr8S92DAx4BuWeb4y6MBec0u8FqLFW2V1ti0XB zFVxM8IFPjCe1o1vCxgn/6lnrFhZuLGkNHNWXIBoYOLgu6WpUGmujdoGKIZhbC8++MAb jMNw== Received: by 10.50.194.232 with SMTP id hz8mr1210060igc.38.1333619764595; Thu, 05 Apr 2012 02:56:04 -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.164.217 with SMTP id f25csp52724iby; Thu, 5 Apr 2012 02:56:03 -0700 (PDT) Received: by 10.180.79.135 with SMTP id j7mr11300660wix.19.1333619762768; Thu, 05 Apr 2012 02:56:02 -0700 (PDT) Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id k9si4190942wiw.46.2012.04.05.02.56.02 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 05 Apr 2012 02:56:02 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.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 mail-we0-f178.google.com with SMTP id a13so994848wer.37 for ; Thu, 05 Apr 2012 02:56:02 -0700 (PDT) Received: by 10.180.101.136 with SMTP id fg8mr11462051wib.4.1333619762200; Thu, 05 Apr 2012 02:56:02 -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 e6sm12308845wix.8.2012.04.05.02.56.00 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 05 Apr 2012 02:56:01 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org Cc: arnd@arndb.de, linus.walleij@stericsson.com, grant.likely@secretlab.ca, cjb@laptop.org, linux@arm.linux.org.uk, Lee Jones Subject: [PATCH 2/7] ARM: ux500: New DT:ed u8500_init_devices for one-by-one device enablement Date: Thu, 5 Apr 2012 10:55:43 +0100 Message-Id: <1333619748-16126-3-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.1 In-Reply-To: <1333619748-16126-1-git-send-email-lee.jones@linaro.org> References: <1333619748-16126-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQn+XoxTaHDHXTZLgtqAP1um4XQ2fTmX4UJgbRLybnklSMJmKTejHVt62p0ekD35ZrQewnOg During Device Tree enablement it is necessary to remove _add_ calls one at at time, as and when particular devices are DT enabled. This patch provides a temporary solution. Once the new *of_init_devices function has been fully unpopulated it will be removed again. Signed-off-by: Lee Jones --- arch/arm/mach-ux500/board-mop500.c | 2 +- arch/arm/mach-ux500/cpu-db8500.c | 22 ++++++++++++++++++++++ arch/arm/mach-ux500/include/mach/setup.h | 3 +++ 3 files changed, 26 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 29e0ade..4d4aeda 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -772,7 +772,7 @@ static void __init u8500_init_machine(void) int i2c0_devs; int i; - parent = u8500_init_devices(); + parent = u8500_of_init_devices(); i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++) diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 9bd8163..c19c8b8 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -206,3 +206,25 @@ struct device * __init u8500_init_devices(void) return parent; } + +// TODO: Once all pieces are DT:ed, remove completely +struct device * __init u8500_of_init_devices(void) +{ + struct device *parent; + int i; + + parent = db8500_soc_device_init(); + + db8500_add_rtc(parent); + db8500_add_usb(parent, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg); + + platform_device_register_data(parent, + "cpufreq-u8500", -1, NULL, 0); + + for (i = 0; i < ARRAY_SIZE(platform_devs); i++) + platform_devs[i]->dev.parent = parent; + + platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); + + return parent; +} diff --git a/arch/arm/mach-ux500/include/mach/setup.h b/arch/arm/mach-ux500/include/mach/setup.h index 3dc00ff..a792c2a 100644 --- a/arch/arm/mach-ux500/include/mach/setup.h +++ b/arch/arm/mach-ux500/include/mach/setup.h @@ -21,6 +21,9 @@ extern void __init u8500_map_io(void); extern struct device * __init u5500_init_devices(void); extern struct device * __init u8500_init_devices(void); +// TODO: Once all pieces are DT:ed, remove completely +extern struct device * __init u8500_of_init_devices(void); + extern void __init ux500_init_irq(void); extern void __init u5500_sdi_init(struct device *parent);