From patchwork Thu Apr 19 20:36:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 7959 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 29FEC23E20 for ; Thu, 19 Apr 2012 20:37:11 +0000 (UTC) Received: from mail-gy0-f180.google.com (mail-gy0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id EC455A180E6 for ; Thu, 19 Apr 2012 20:37:10 +0000 (UTC) Received: by mail-gy0-f180.google.com with SMTP id z12so5988771ghb.11 for ; Thu, 19 Apr 2012 13:37:10 -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=9BQl+mqt2XNosJhOJuYz7IO43anHe95lmK8T+k3j264=; b=ahy0ut1cVchWiwXiv5TkH+8fAQE3PNJqkTfKjcwNvroCmBXuk94Ig8hFMIl/HcrX7L Z4Y0XKjLFFpajGMXD9vdZLyIW9qO8P/3PD3hFFVhMyOfgIN6LbgWAhil5NH6AjIWHI1Y bKRE46qg+9n0s9LOKNxwGfOLu1OdNY5uBNDqk4jdFh+YQCwwByoNoCNF32TVJWhvJ8ws ykcuGXV1d2pJTVrAeFZS4eWEL7LSUSJok7u3PXxCwDh6cJMED7TLwPqqHlpTidBZmRQM HrBJFoa1gMiX613OgOy9zlvGY9W9xVaj6L1tHOB2ba5SYNQWchODa4/IV+OtpCIFWmib J8GQ== Received: by 10.50.135.36 with SMTP id pp4mr3803320igb.19.1334867830622; Thu, 19 Apr 2012 13:37:10 -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.137.198 with SMTP id x6csp317233ibt; Thu, 19 Apr 2012 13:37:10 -0700 (PDT) Received: by 10.180.79.72 with SMTP id h8mr1719625wix.1.1334867829485; Thu, 19 Apr 2012 13:37:09 -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 fr6si117782wib.15.2012.04.19.13.37.09 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 19 Apr 2012 13:37:09 -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 mail-wg0-f50.google.com with SMTP id ds12so8717086wgb.31 for ; Thu, 19 Apr 2012 13:37:09 -0700 (PDT) Received: by 10.216.137.30 with SMTP id x30mr2091880wei.34.1334867829001; Thu, 19 Apr 2012 13:37:09 -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 h8sm345540wix.4.2012.04.19.13.37.06 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 19 Apr 2012 13:37:07 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, arnd@arndb.de, linus.walleij@stericsson.com, grant.likely@secretlab.ca, cjb@laptop.org, linux@arm.linux.org.uk Cc: Lee Jones Subject: [PATCH 06/15] ARM: ux500: New DT:ed u8500_init_devices for one-by-one device enablement Date: Thu, 19 Apr 2012 21:36:35 +0100 Message-Id: <1334867804-31942-7-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.1 In-Reply-To: <1334867804-31942-1-git-send-email-lee.jones@linaro.org> References: <1334867804-31942-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQlYoLgVxgWHTQ0bZU8JTD0A5ZJ793tIkIfi/3hZJpCfERooGYd0J+hjAg0bce359wuvmx1Y 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/board-mop500.h | 3 +++ arch/arm/mach-ux500/cpu-db8500.c | 22 ++++++++++++++++++++++ 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 0dbcdd2..50809af 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -787,7 +787,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/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h index 384baf7..fd94722 100644 --- a/arch/arm/mach-ux500/board-mop500.h +++ b/arch/arm/mach-ux500/board-mop500.h @@ -92,4 +92,7 @@ void __init snowball_pins_init(void); void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info, unsigned n); +/* TODO: Once all pieces are DT:ed, remove completely. */ +struct device * __init u8500_of_init_devices(void); + #endif diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 9bd8163..58768d9 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; +}