From patchwork Thu Apr 5 10:25:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 7662 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 D227023E47 for ; Thu, 5 Apr 2012 10:25:41 +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 8935AA18598 for ; Thu, 5 Apr 2012 10:25:41 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so2173069iag.11 for ; Thu, 05 Apr 2012 03:25:41 -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=n1ig5d+EJauLtdSNYA6LX693qeMjaI6PYAM/EIgYVP4vA9L2rGW2KdiqvFLE5d1NEq jQfyJWeEI2PKKsF6vlEZZsQQ3MjGUjYCcH9MICH1nmj+ZGDu2Xa+AwlQxx4j7Sp8u0fJ f69L+DN+eFuYB9i3DcSGvh8I5lCzDKihM4IAcPZPsPjT9Y46zFVqF4XILUy7AhB3fWpq PCR42vlJ8R9TRgIESNwJgGiG6UADX197G8YMLRKWqdQG/cm+RKjd9SbXVPnn/kf0916p KKFAiF2rF0U2tRK/9W/ESasFSKyvnVqXnjNEYFGhsfskCxUARLabtWELOpq3a+iDB4OU e1TA== Received: by 10.50.51.197 with SMTP id m5mr1275309igo.38.1333621541273; Thu, 05 Apr 2012 03:25:41 -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 f25csp53781iby; Thu, 5 Apr 2012 03:25:40 -0700 (PDT) Received: by 10.180.95.197 with SMTP id dm5mr11536147wib.20.1333621538972; Thu, 05 Apr 2012 03:25:38 -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 l8si5542407wie.30.2012.04.05.03.25.38 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 05 Apr 2012 03:25:38 -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 wgbds12 with SMTP id ds12so1138612wgb.31 for ; Thu, 05 Apr 2012 03:25:38 -0700 (PDT) Received: by 10.216.132.140 with SMTP id o12mr1302153wei.67.1333621538014; Thu, 05 Apr 2012 03:25:38 -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 l5sm12490310wia.11.2012.04.05.03.25.36 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 05 Apr 2012 03:25:37 -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 11:25:29 +0100 Message-Id: <1333621534-29627-2-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.1 In-Reply-To: <1333621534-29627-1-git-send-email-lee.jones@linaro.org> References: <1333621534-29627-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQkeITRL5Of0CBrpWGSZZCiGUi2+/wtXhHC2W+8/nwvss1oEsZjilLTvuKwg7ud4IZPjCplM 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);