From patchwork Sun Dec 6 18:03:03 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ladislav.Michl@seznam.cz X-Patchwork-Id: 65171 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nB6H3DDn030031 for ; Sun, 6 Dec 2009 17:03:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933895AbZLFRDD (ORCPT ); Sun, 6 Dec 2009 12:03:03 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933890AbZLFRDD (ORCPT ); Sun, 6 Dec 2009 12:03:03 -0500 Received: from smtp.seznam.cz ([77.75.72.43]:42634 "EHLO smtp.seznam.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933887AbZLFRDB (ORCPT ); Sun, 6 Dec 2009 12:03:01 -0500 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=seznam.cz; h=Received:Received:Date:From:To:Subject:Message-ID:Reply-To:MIME-Version:Content-Type:Content-Disposition:User-Agent:X-Smtpd:X-Seznam-User:X-QM-Mark; b=MhLKxxdwUj7Bhhq9+vTG/ktKp8sfdxMWNlbZBHtEnfI7QImm5Fcz456PoEJLqWyOq nqwvIXEBKNQxU4QeNIHkcmYxcKiiLsLaqbipMvtVD/szKM+5/a+D0OgJq/60RuFRBIQ ZFWxMVz1BaQTd77Xui6/Jymqc5huyoAGYkn220Y= Received: from debian (34.24.broadband3.iol.cz [85.70.24.34]) by email-relay2.go.seznam.cz (Seznam SMTPD 1.1.7@13984) with ESMTP; Sun, 06 Dec 2009 18:03:05 +0100 (CET) Received: by debian (sSMTP sendmail emulation); Sun, 06 Dec 2009 19:03:03 +0100 Date: Sun, 6 Dec 2009 19:03:03 +0100 From: Ladislav Michl To: linux-omap@vger.kernel.org Subject: [PATCH] arch/arm/plat-omap/devices.c - sort alphabetically Message-ID: <20091206180303.GA3057@localhost.localdomain> Reply-To: Ladislav Michl MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Smtpd: 1.1.7@13984 X-Seznam-User: ladislav.michl@seznam.cz X-QM-Mark: email-qm3<268416477> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index f866178..30b5db7 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c @@ -242,6 +242,39 @@ fail: /*-------------------------------------------------------------------------*/ +#if defined(CONFIG_HW_RANDOM_OMAP) || defined(CONFIG_HW_RANDOM_OMAP_MODULE) + +#ifdef CONFIG_ARCH_OMAP24XX +#define OMAP_RNG_BASE 0x480A0000 +#else +#define OMAP_RNG_BASE 0xfffe5000 +#endif + +static struct resource rng_resources[] = { + { + .start = OMAP_RNG_BASE, + .end = OMAP_RNG_BASE + 0x4f, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device omap_rng_device = { + .name = "omap_rng", + .id = -1, + .num_resources = ARRAY_SIZE(rng_resources), + .resource = rng_resources, +}; + +static void omap_init_rng(void) +{ + (void) platform_device_register(&omap_rng_device); +} +#else +static inline void omap_init_rng(void) {} +#endif + +/*-------------------------------------------------------------------------*/ + /* Numbering for the SPI-capable controllers when used for SPI: * spi = 1 * uwire = 2 @@ -324,39 +357,6 @@ static void omap_init_wdt(void) static inline void omap_init_wdt(void) {} #endif -/*-------------------------------------------------------------------------*/ - -#if defined(CONFIG_HW_RANDOM_OMAP) || defined(CONFIG_HW_RANDOM_OMAP_MODULE) - -#ifdef CONFIG_ARCH_OMAP24XX -#define OMAP_RNG_BASE 0x480A0000 -#else -#define OMAP_RNG_BASE 0xfffe5000 -#endif - -static struct resource rng_resources[] = { - { - .start = OMAP_RNG_BASE, - .end = OMAP_RNG_BASE + 0x4f, - .flags = IORESOURCE_MEM, - }, -}; - -static struct platform_device omap_rng_device = { - .name = "omap_rng", - .id = -1, - .num_resources = ARRAY_SIZE(rng_resources), - .resource = rng_resources, -}; - -static void omap_init_rng(void) -{ - (void) platform_device_register(&omap_rng_device); -} -#else -static inline void omap_init_rng(void) {} -#endif - /* * This gets called after board-specific INIT_MACHINE, and initializes most * on-chip peripherals accessible on this board (except for few like USB): @@ -384,9 +384,9 @@ static int __init omap_init_devices(void) */ omap_init_dsp(); omap_init_kp(); + omap_init_rng(); omap_init_uwire(); omap_init_wdt(); - omap_init_rng(); return 0; } arch_initcall(omap_init_devices);