From patchwork Fri Jul 1 06:44:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Christophe PLAGNIOL-VILLARD X-Patchwork-Id: 934652 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6170s0o027803 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 1 Jul 2011 07:01:14 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QcXiK-0004EW-JD; Fri, 01 Jul 2011 07:00:32 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QcXiI-0003U0-F4; Fri, 01 Jul 2011 07:00:30 +0000 Received: from 2.98.mail-out.ovh.net ([46.105.40.161] helo=98.mail-out.ovh.net) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QcXhr-0003OY-7q for linux-arm-kernel@lists.infradead.org; Fri, 01 Jul 2011 07:00:08 +0000 Received: from mail31.ha.ovh.net (b7.ovh.net [213.186.33.57]) by 98.mail-out.ovh.net (Postfix) with SMTP id 736684B2469 for ; Fri, 1 Jul 2011 08:59:32 +0200 (CEST) Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 1 Jul 2011 08:59:55 +0200 Received: from ns32433.ovh.net (HELO localhost) (plagnioj%jcrosoft.com@213.251.161.87) by ns0.ovh.net with SMTP; 1 Jul 2011 08:59:53 +0200 From: Jean-Christophe PLAGNIOL-VILLARD To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 5/8] at91: move clock subsystem init to soc generic init Date: Fri, 1 Jul 2011 08:44:39 +0200 Message-Id: <1309502682-16897-5-git-send-email-plagnioj@jcrosoft.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1309502682-16897-1-git-send-email-plagnioj@jcrosoft.com> References: <1309502682-16897-1-git-send-email-plagnioj@jcrosoft.com> X-Ovh-Tracer-Id: 8100005406258015229 X-Ovh-Remote: 213.251.161.87 (ns32433.ovh.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: DONE|U 0.5/N X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -140 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110701_030003_561087_F67BA507 X-CRM114-Status: GOOD ( 17.61 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [46.105.40.161 listed in list.dnswl.org] Cc: Patrice Vilchez , Nicolas Ferre , Jean-Christophe PLAGNIOL-VILLARD X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 01 Jul 2011 07:01:14 +0000 (UTC) Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Cc: Nicolas Ferre Cc: Patrice Vilchez --- arch/arm/mach-at91/at91cap9.c | 6 ++---- arch/arm/mach-at91/at91rm9200.c | 5 +---- arch/arm/mach-at91/at91sam9260.c | 5 +---- arch/arm/mach-at91/at91sam9261.c | 5 +---- arch/arm/mach-at91/at91sam9263.c | 5 +---- arch/arm/mach-at91/at91sam9g45.c | 5 +---- arch/arm/mach-at91/at91sam9rl.c | 5 +---- arch/arm/mach-at91/generic.h | 6 +++++- arch/arm/mach-at91/setup.c | 5 ++++- arch/arm/mach-at91/soc.h | 2 +- 10 files changed, 18 insertions(+), 31 deletions(-) diff --git a/arch/arm/mach-at91/at91cap9.c b/arch/arm/mach-at91/at91cap9.c index 6287c0d..bdf5097 100644 --- a/arch/arm/mach-at91/at91cap9.c +++ b/arch/arm/mach-at91/at91cap9.c @@ -340,14 +340,12 @@ static void __init at91cap9_map_io(void) iotable_init(at91cap9_sram_desc, ARRAY_SIZE(at91cap9_sram_desc)); } -static void __init at91cap9_initialize(unsigned long main_clock) +static void __init at91cap9_initialize(void) +{ at91_arch_reset = at91cap9_reset; pm_power_off = at91cap9_poweroff; at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1); - /* Init clock subsystem */ - at91_clock_init(main_clock); - /* Register the processor-specific clocks */ at91cap9_register_clocks(); diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index 36d37bd..9661297 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c @@ -309,7 +309,7 @@ static void __init at91rm9200_map_io(void) iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc)); } -static void __init at91rm9200_initialize(unsigned long main_clock) +static void __init at91rm9200_initialize(void) { at91_arch_reset = at91rm9200_reset; at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1) @@ -317,9 +317,6 @@ static void __init at91rm9200_initialize(unsigned long main_clock) | (1 << AT91RM9200_ID_IRQ4) | (1 << AT91RM9200_ID_IRQ5) | (1 << AT91RM9200_ID_IRQ6); - /* Init clock subsystem */ - at91_clock_init(main_clock); - /* Register the processor-specific clocks */ at91rm9200_register_clocks(); diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c index 8a6b9aa..40e123f 100644 --- a/arch/arm/mach-at91/at91sam9260.c +++ b/arch/arm/mach-at91/at91sam9260.c @@ -350,16 +350,13 @@ static void __init at91sam9260_map_io(void) iotable_init(at91sam9260_sram_desc, ARRAY_SIZE(at91sam9260_sram_desc)); } -static void __init at91sam9260_initialize(unsigned long main_clock) +static void __init at91sam9260_initialize(void) { at91_arch_reset = at91sam9_alt_reset; pm_power_off = at91sam9260_poweroff; at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1) | (1 << AT91SAM9260_ID_IRQ2); - /* Init clock subsystem */ - at91_clock_init(main_clock); - /* Register the processor-specific clocks */ at91sam9260_register_clocks(); diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index f6a2b30..9631973 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c @@ -302,16 +302,13 @@ static void __init at91sam9261_map_io(void) iotable_init(at91sam9261_sram_desc, ARRAY_SIZE(at91sam9261_sram_desc)); } -static void __init at91sam9261_initialize(unsigned long main_clock) +static void __init at91sam9261_initialize(void) { at91_arch_reset = at91sam9_alt_reset; pm_power_off = at91sam9261_poweroff; at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1) | (1 << AT91SAM9261_ID_IRQ2); - /* Init clock subsystem */ - at91_clock_init(main_clock); - /* Register the processor-specific clocks */ at91sam9261_register_clocks(); diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index 7245a8e..3860007 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c @@ -314,15 +314,12 @@ static void __init at91sam9263_map_io(void) iotable_init(at91sam9263_sram_desc, ARRAY_SIZE(at91sam9263_sram_desc)); } -static void __init at91sam9263_initialize(unsigned long main_clock) +static void __init at91sam9263_initialize(void) { at91_arch_reset = at91sam9_alt_reset; pm_power_off = at91sam9263_poweroff; at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1); - /* Init clock subsystem */ - at91_clock_init(main_clock); - /* Register the processor-specific clocks */ at91sam9263_register_clocks(); diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c index 57a4726..e48dda1 100644 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c @@ -330,15 +330,12 @@ static void __init at91sam9g45_map_io(void) iotable_init(at91sam9g45_sram_desc, ARRAY_SIZE(at91sam9g45_sram_desc)); } -static void __init at91sam9g45_initialize(unsigned long main_clock) +static void __init at91sam9g45_initialize(void) { at91_arch_reset = at91sam9g45_reset; pm_power_off = at91sam9g45_poweroff; at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0); - /* Init clock subsystem */ - at91_clock_init(main_clock); - /* Register the processor-specific clocks */ at91sam9g45_register_clocks(); diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c index b83098c..53ac1a7 100644 --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c @@ -300,15 +300,12 @@ static void __init at91sam9rl_map_io(void) iotable_init(at91sam9rl_sram_desc, ARRAY_SIZE(at91sam9rl_sram_desc)); } -static void __init at91sam9rl_initialize(unsigned long main_clock) +static void __init at91sam9rl_initialize(void) { at91_arch_reset = at91sam9_alt_reset; pm_power_off = at91sam9rl_poweroff; at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0); - /* Init clock subsystem */ - at91_clock_init(main_clock); - /* Register the processor-specific clocks */ at91sam9rl_register_clocks(); diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index ce11390..a9d6ed4 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h @@ -31,7 +31,6 @@ extern struct sys_timer at91sam926x_timer; extern struct sys_timer at91x40_timer; /* Clocks */ -extern int __init at91_clock_init(unsigned long main_clock); /* * function to specify the clock of the default console. As we do not * use the device/driver bus, the dev_name is not intialize. So we need @@ -44,6 +43,11 @@ extern void __init at91sam9263_set_console_clock(int id); extern void __init at91sam9rl_set_console_clock(int id); extern void __init at91sam9g45_set_console_clock(int id); extern void __init at91cap9_set_console_clock(int id); +#ifdef CONFIG_AT91_PMC_UNIT +extern int __init at91_clock_init(unsigned long main_clock); +#else +static int inline at91_clock_init(unsigned long main_clock) { return 0; } +#endif struct device; /* Power Management */ diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index 9ea4183..dfbc3fa 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c @@ -248,5 +248,8 @@ void __init at91_map_io(void) void __init at91_initialize(unsigned long main_clock) { - at91_boot_soc.init(main_clock); + /* Init clock subsystem */ + at91_clock_init(main_clock); + + at91_boot_soc.init(); } diff --git a/arch/arm/mach-at91/soc.h b/arch/arm/mach-at91/soc.h index 9de7be4..103030a 100644 --- a/arch/arm/mach-at91/soc.h +++ b/arch/arm/mach-at91/soc.h @@ -7,7 +7,7 @@ struct at91_init_soc { unsigned int *default_irq_priority; void (*map_io)(void); - void (*init)(unsigned long main_clock); + void (*init)(void); }; extern struct at91_init_soc at91_boot_soc;