From patchwork Mon Aug 13 11:58:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 10702 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 376D923F34 for ; Mon, 13 Aug 2012 11:58:10 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id E5E66A18016 for ; Mon, 13 Aug 2012 11:58:09 +0000 (UTC) Received: by yenl8 with SMTP id l8so954471yen.11 for ; Mon, 13 Aug 2012 04:58:09 -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:mime-version:content-type :x-gm-message-state; bh=0+hz4SRROf1rB+l2zC3dMxSMmVh3t2Bbam4IndhRoA0=; b=YB3mzL3UuuyAsiaR9KVk/XPeuP4A0gXLVNM2Pjjq0kqwNf+WIx9W03YmMDMMBzVd2L CKWh/leTiIUnFewaY/8Uq5advRpdjcVSpqadGBnUrV5GWFTWvla+kATz4+6W22wQ06+M Q+Rrwyq02JmBwxNLmGq7rn85kADJNrub4n2lIoMCtN90d4fVJ/9pCoTo/1vnKCSrU47w ZvKq/94ZlAf/XOLxi5lvYhP/tEUQlWM/es8pV2UN9Iwp/IQhdufEvoMnTWPAfhrWlXhT v4CN/c/oydlMqG1SHalYb1zVTpSImW0C+djnf2dCYox7aDR/nrIETv8ePv5EJ4z7l9xQ HdGQ== Received: by 10.50.154.132 with SMTP id vo4mr5087136igb.31.1344859089127; Mon, 13 Aug 2012 04:58:09 -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.50.184.200 with SMTP id ew8csp173306igc; Mon, 13 Aug 2012 04:58:08 -0700 (PDT) Received: by 10.14.206.200 with SMTP id l48mr13596934eeo.41.1344859087898; Mon, 13 Aug 2012 04:58:07 -0700 (PDT) Received: from eu1sys200aog104.obsmtp.com (eu1sys200aog104.obsmtp.com. [207.126.144.117]) by mx.google.com with SMTP id f45si3693219eep.9.2012.08.13.04.58.05 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 13 Aug 2012 04:58:07 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.117 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.117; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.117 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob104.postini.com ([207.126.147.11]) with SMTP ID DSNKUCjrzDQy3cruSwz03EFrRyTo/o0Q+1d8@postini.com; Mon, 13 Aug 2012 11:58:07 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id BBA8B55; Mon, 13 Aug 2012 11:57:37 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id 99A334A; Mon, 13 Aug 2012 08:21:50 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id CCAD0A8072; Mon, 13 Aug 2012 13:57:57 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.83.0; Mon, 13 Aug 2012 13:58:02 +0200 From: Linus Walleij To: Cc: Linus Walleij Subject: [PATCH 4/7] ARM: u300: merge u300.c into core.c and rid headers Date: Mon, 13 Aug 2012 13:58:00 +0200 Message-ID: <1344859080-29408-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkMN7+P6hWIQAbxRA2vN/oSYti+PDUxhAdjlyR86ZZZOnyY7NjVFKanJvU6Q7GPa1x8Zkdw From: Linus Walleij This gets rid of the separate u300.c file in mach-u300 since it can just as well live right in core.c, then we also get rid of the broadcasted file that is not helping anyone. Put the interface to the system timer into a separate header. Signed-off-by: Linus Walleij --- arch/arm/mach-u300/Makefile | 1 - arch/arm/mach-u300/core.c | 22 +++++++++++++--- arch/arm/mach-u300/include/mach/platform.h | 20 --------------- arch/arm/mach-u300/timer.c | 2 ++ arch/arm/mach-u300/timer.h | 1 + arch/arm/mach-u300/u300.c | 41 ------------------------------ 6 files changed, 21 insertions(+), 66 deletions(-) delete mode 100644 arch/arm/mach-u300/include/mach/platform.h create mode 100644 arch/arm/mach-u300/timer.h delete mode 100644 arch/arm/mach-u300/u300.c diff --git a/arch/arm/mach-u300/Makefile b/arch/arm/mach-u300/Makefile index 7e47d37..5a86c58 100644 --- a/arch/arm/mach-u300/Makefile +++ b/arch/arm/mach-u300/Makefile @@ -7,7 +7,6 @@ obj-m := obj-n := obj- := -obj-$(CONFIG_ARCH_U300) += u300.o obj-$(CONFIG_SPI_PL022) += spi.o obj-$(CONFIG_MACH_U300_SPIDUMMY) += dummyspichip.o obj-$(CONFIG_I2C_STU300) += i2c.o diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index 0158189..bc23391 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c @@ -39,12 +39,15 @@ #include #include #include +#include +#include #include #include #include #include +#include "timer.h" #include "spi.h" #include "i2c.h" #include "u300-gpio.h" @@ -76,7 +79,7 @@ static struct map_desc u300_io_desc[] __initdata = { }, }; -void __init u300_map_io(void) +static void __init u300_map_io(void) { iotable_init(u300_io_desc, ARRAY_SIZE(u300_io_desc)); /* We enable a real big DMA buffer if need be. */ @@ -1600,7 +1603,7 @@ static struct platform_device *platform_devs[] __initdata = { * together so some interrupts are connected to the first one and some * to the second one. */ -void __init u300_init_irq(void) +static void __init u300_init_irq(void) { u32 mask[2] = {0, 0}; struct clk *clk; @@ -1742,7 +1745,7 @@ static void __init u300_assign_physmem(void) } } -void __init u300_init_devices(void) +static void __init u300_init_machine(void) { int i; u16 val; @@ -1783,7 +1786,7 @@ void __init u300_init_devices(void) /* Forward declare this function from the watchdog */ void coh901327_watchdog_reset(void); -void u300_restart(char mode, const char *cmd) +static void u300_restart(char mode, const char *cmd) { switch (mode) { case 's': @@ -1799,3 +1802,14 @@ void u300_restart(char mode, const char *cmd) /* Wait for system do die/reset. */ while (1); } + +MACHINE_START(U300, "Ericsson AB U335 S335/B335 Prototype Board") + /* Maintainer: Linus Walleij */ + .atag_offset = 0x100, + .map_io = u300_map_io, + .init_irq = u300_init_irq, + .handle_irq = vic_handle_irq, + .timer = &u300_timer, + .init_machine = u300_init_machine, + .restart = u300_restart, +MACHINE_END diff --git a/arch/arm/mach-u300/include/mach/platform.h b/arch/arm/mach-u300/include/mach/platform.h deleted file mode 100644 index 096333f..0000000 --- a/arch/arm/mach-u300/include/mach/platform.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * - * arch/arm/mach-u300/include/mach/platform.h - * - * - * Copyright (C) 2006-2009 ST-Ericsson AB - * License terms: GNU General Public License (GPL) version 2 - * Basic platform init and mapping functions. - * Author: Linus Walleij - */ - -#ifndef __ASSEMBLY__ - -void u300_map_io(void); -void u300_init_irq(void); -void u300_init_devices(void); -void u300_restart(char, const char *); -extern struct sys_timer u300_timer; - -#endif diff --git a/arch/arm/mach-u300/timer.c b/arch/arm/mach-u300/timer.c index 56ac06d..146e815 100644 --- a/arch/arm/mach-u300/timer.c +++ b/arch/arm/mach-u300/timer.c @@ -26,6 +26,8 @@ #include #include +#include "timer.h" + /* * APP side special timer registers * This timer contains four timers which can fire an interrupt each. diff --git a/arch/arm/mach-u300/timer.h b/arch/arm/mach-u300/timer.h new file mode 100644 index 0000000..b5e9791 --- /dev/null +++ b/arch/arm/mach-u300/timer.h @@ -0,0 +1 @@ +extern struct sys_timer u300_timer; diff --git a/arch/arm/mach-u300/u300.c b/arch/arm/mach-u300/u300.c deleted file mode 100644 index 4e56e8c..0000000 --- a/arch/arm/mach-u300/u300.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * - * arch/arm/mach-u300/u300.c - * - * - * Copyright (C) 2006-2009 ST-Ericsson AB - * License terms: GNU General Public License (GPL) version 2 - * Platform machine definition. - * Author: Linus Walleij - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static void __init u300_init_machine(void) -{ - u300_init_devices(); -} - -MACHINE_START(U300, "Ericsson AB U335 S335/B335 Prototype Board") - /* Maintainer: Linus Walleij */ - .atag_offset = 0x100, - .map_io = u300_map_io, - .init_irq = u300_init_irq, - .handle_irq = vic_handle_irq, - .timer = &u300_timer, - .init_machine = u300_init_machine, - .restart = u300_restart, -MACHINE_END