From patchwork Tue Apr 17 10:43:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 7893 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 AC76123E00 for ; Tue, 17 Apr 2012 10:44:49 +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 710E4A184A2 for ; Tue, 17 Apr 2012 10:44:49 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so12004590iag.11 for ; Tue, 17 Apr 2012 03:44:49 -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=PmoSHloArYs3BRoL4PwbH6LDa6Cag2LrYuBY71DjGQM=; b=Mbyv+xYC6vw6kzbD8qI0UcJKyPv76lQp3jPviMWoW2igsHjv2tpW766wAFXx0ggmSK kaY6BJWwyxMbgDScJfxGN7sUpi7AAOBKBKy9tROHdWRKJIeff+iulbiTdqgFJBuGPCDe V4Zft91Jk8tLqtrflAx8xSKjTJM1pSvgn5xtEM5+HmTsfnC7fBzGFRiDybYiaZ46UAsF 2btnT/8cnEJGqsAqAmj4gNrDGlBaqdZGqKlyq9VTsOgXGZH3SAMDYLJB7LsSDW28O92n Mjv/Hc/mBpgp2wNXGvCfNYYZYjfwgqw6RKxESDD/Cw7yGptuCMCuY0eoosHhnylPi2q9 E4jw== Received: by 10.50.17.201 with SMTP id q9mr6733953igd.19.1334659489244; Tue, 17 Apr 2012 03:44:49 -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 x6csp138695ibt; Tue, 17 Apr 2012 03:44:48 -0700 (PDT) Received: by 10.180.97.4 with SMTP id dw4mr5866530wib.18.1334659487967; Tue, 17 Apr 2012 03:44:47 -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 y43si21417417weq.132.2012.04.17.03.44.47 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 Apr 2012 03:44:47 -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 wibhq7 with SMTP id hq7so368382wib.13 for ; Tue, 17 Apr 2012 03:44:47 -0700 (PDT) Received: by 10.216.137.232 with SMTP id y82mr8963517wei.82.1334659487440; Tue, 17 Apr 2012 03:44:47 -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 fn2sm42069492wib.0.2012.04.17.03.44.44 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 Apr 2012 03:44:46 -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 06/16] ARM: ux500: New DT:ed u8500_init_devices for one-by-one device enablement Date: Tue, 17 Apr 2012 11:43:58 +0100 Message-Id: <1334659448-11521-7-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.1 In-Reply-To: <1334659448-11521-1-git-send-email-lee.jones@linaro.org> References: <1334659448-11521-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQnFTHj+5yyQmqDfCNKA4KJJbtQig1JjqRdau3w5Gw1by0jYOFPBmjwP5y0B+CD+TMuFjFZo 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 ee1296a..29fec0f 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; +}