linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ohad Ben-Cohen <ohad@wizery.com>
To: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Cc: akpm@linux-foundation.org, Brian Swetland <swetland@google.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Grant Likely <grant.likely@secretlab.ca>,
	davinci-linux-open-source
	<davinci-linux-open-source@linux.davincidsp.com>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Mark Grosen <mgrosen@ti.com>, Ohad Ben-Cohen <ohad@wizery.com>
Subject: [RFC 6/8] davinci: da850: add remoteproc dsp device
Date: Tue, 21 Jun 2011 10:18:32 +0300	[thread overview]
Message-ID: <1308640714-17961-7-git-send-email-ohad@wizery.com> (raw)
In-Reply-To: <1308640714-17961-1-git-send-email-ohad@wizery.com>

From: Mark Grosen <mgrosen@ti.com>

Add davinci remoteproc device for the da850's C674x dsp remote
processor, and support it on the da850-evm and omapl138-hawk boards.

Signed-off-by: Mark Grosen <mgrosen@ti.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
It'd be nice to split this patch to the different components it changes,
but it's probably not so important at this early stage.

 arch/arm/mach-davinci/board-da850-evm.c     |    4 ++++
 arch/arm/mach-davinci/board-omapl138-hawk.c |    4 ++++
 arch/arm/mach-davinci/da850.c               |   14 ++++++++++++++
 arch/arm/mach-davinci/devices-da8xx.c       |   15 +++++++++++++++
 arch/arm/mach-davinci/include/mach/da8xx.h  |    1 +
 5 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index a7b41bf..6b35f0a 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -1176,6 +1176,10 @@ static __init void da850_evm_init(void)
 	i2c_register_board_info(1, da850_evm_i2c_devices,
 			ARRAY_SIZE(da850_evm_i2c_devices));
 
+	ret = da850_register_rproc();
+	if (ret)
+		pr_warning("dsp/rproc registration failed: %d\n", ret);
+
 	/*
 	 * shut down uart 0 and 1; they are not used on the board and
 	 * accessing them causes endless "too much work in irq53" messages
diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c
index 67c38d0..52c8434 100644
--- a/arch/arm/mach-davinci/board-omapl138-hawk.c
+++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
@@ -319,6 +319,10 @@ static __init void omapl138_hawk_init(void)
 		pr_warning("omapl138_hawk_init: "
 			"watchdog registration failed: %d\n",
 			ret);
+
+	ret = da850_register_rproc();
+	if (ret)
+		pr_warning("dsp/rproc registration failed: %d\n", ret);
 }
 
 #ifdef CONFIG_SERIAL_8250_CONSOLE
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 133aac4..9280b1e 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -74,6 +74,13 @@ static struct clk pll0_aux_clk = {
 	.flags		= CLK_PLL | PRE_PLL,
 };
 
+static struct clk pll0_sysclk1 = {
+	.name		= "pll0_sysclk1",
+	.parent		= &pll0_clk,
+	.flags		= CLK_PLL,
+	.div_reg	= PLLDIV1,
+};
+
 static struct clk pll0_sysclk2 = {
 	.name		= "pll0_sysclk2",
 	.parent		= &pll0_clk,
@@ -373,6 +380,12 @@ static struct clk spi1_clk = {
 	.flags		= DA850_CLK_ASYNC3,
 };
 
+static struct clk dsp_clk = {
+	.name		= "dsp",
+	.parent		= &pll0_sysclk1,
+	.lpsc		= DA8XX_LPSC0_GEM,
+};
+
 static struct clk_lookup da850_clks[] = {
 	CLK(NULL,		"ref",		&ref_clk),
 	CLK(NULL,		"pll0",		&pll0_clk),
@@ -419,6 +432,7 @@ static struct clk_lookup da850_clks[] = {
 	CLK(NULL,		"usb20",	&usb20_clk),
 	CLK("spi_davinci.0",	NULL,		&spi0_clk),
 	CLK("spi_davinci.1",	NULL,		&spi1_clk),
+	CLK(NULL,		"dsp",		&dsp_clk),
 	CLK(NULL,		NULL,		NULL),
 };
 
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c
index fc4e98e..3becfd1 100644
--- a/arch/arm/mach-davinci/devices-da8xx.c
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -20,6 +20,7 @@
 #include <mach/time.h>
 #include <mach/da8xx.h>
 #include <mach/cpuidle.h>
+#include <mach/remoteproc.h>
 
 #include "clock.h"
 
@@ -647,6 +648,20 @@ int __init da850_register_mmcsd1(struct davinci_mmc_config *config)
 	da850_mmcsd1_device.dev.platform_data = config;
 	return platform_device_register(&da850_mmcsd1_device);
 }
+
+int __init da850_register_rproc(void)
+{
+	struct platform_device *rproc;
+	struct davinci_rproc_pdata rproc_pdata = {
+		.name		= "dsp",
+		.firmware	= "davinci-dsp.bin",
+		.clk_name	= "dsp",
+	};
+
+	rproc = platform_device_register_data(NULL, "davinci-rproc", 0,
+					    &rproc_pdata, sizeof(rproc_pdata));
+	return PTR_RET(rproc);
+};
 #endif
 
 static struct resource da8xx_rtc_resources[] = {
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h
index ad64da7..a6f024f 100644
--- a/arch/arm/mach-davinci/include/mach/da8xx.h
+++ b/arch/arm/mach-davinci/include/mach/da8xx.h
@@ -74,6 +74,7 @@ void __init da850_init(void);
 
 int da830_register_edma(struct edma_rsv_info *rsv);
 int da850_register_edma(struct edma_rsv_info *rsv[2]);
+int da850_register_rproc(void);
 int da8xx_register_i2c(int instance, struct davinci_i2c_platform_data *pdata);
 int da8xx_register_spi(int instance, struct spi_board_info *info, unsigned len);
 int da8xx_register_watchdog(void);
-- 
1.7.1


  parent reply	other threads:[~2011-06-21  7:22 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-21  7:18 [RFC 0/8] Introducing a generic AMP/IPC framework Ohad Ben-Cohen
2011-06-21  7:18 ` [RFC 1/8] drivers: add generic remoteproc framework Ohad Ben-Cohen
2011-06-22 17:55   ` Randy Dunlap
2011-06-22 19:11     ` Ohad Ben-Cohen
     [not found]   ` <1308640714-17961-2-git-send-email-ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>
2011-06-27 20:49     ` Grant Likely
     [not found]       ` <20110627204958.GB20865-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-06-27 21:52         ` Grosen, Mark
2011-06-27 22:24           ` Grant Likely
     [not found]             ` <20110627222401.GE20865-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-06-27 23:54               ` Grosen, Mark
2011-06-27 23:29         ` Russell King - ARM Linux
2011-06-27 23:35           ` Grant Likely
2011-06-28 21:55           ` Ohad Ben-Cohen
2011-06-28 21:41         ` Ohad Ben-Cohen
2011-06-21  7:18 ` [RFC 2/8] remoteproc: add omap implementation Ohad Ben-Cohen
2011-06-22 10:05   ` Will Newton
2011-06-22 10:50     ` Ohad Ben-Cohen
2011-06-27 21:00   ` Grant Likely
2011-06-29 15:04     ` Ohad Ben-Cohen
2011-06-29 15:31       ` Grant Likely
2011-06-21  7:18 ` [RFC 3/8] omap: add carveout memory support for remoteproc Ohad Ben-Cohen
2011-06-21  7:18 ` [RFC 4/8] omap: add remoteproc devices Ohad Ben-Cohen
2011-06-21  7:18 ` [RFC 5/8] remoteproc: add davinci implementation Ohad Ben-Cohen
2011-06-23 15:27   ` Sergei Shtylyov
     [not found]     ` <4E035B78.3080200-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
2011-06-24  4:25       ` Grosen, Mark
2011-06-24 15:13         ` Sergei Shtylyov
2011-06-24 15:43           ` Nori, Sekhar
     [not found]             ` <B85A65D85D7EB246BE421B3FB0FBB593024D6C2F29-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2011-06-27 18:31               ` Grosen, Mark
     [not found]                 ` <FFF198FBBF957F4393BA834040FEFFA202EC99-Jq/I0xf/SMGIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2011-07-05  5:29                   ` Nori, Sekhar
     [not found]                     ` <B85A65D85D7EB246BE421B3FB0FBB593024D91A2BE-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2011-07-05 16:54                       ` Grosen, Mark
2011-07-05  5:34                 ` Nori, Sekhar
     [not found]                   ` <B85A65D85D7EB246BE421B3FB0FBB593024D91A2CC-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2011-07-05 16:54                     ` Grosen, Mark
     [not found]                       ` <FFF198FBBF957F4393BA834040FEFFA2032F6F-Jq/I0xf/SMGIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2011-07-06  4:36                         ` Nori, Sekhar
     [not found]           ` <4E04A9AE.3030801-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
2011-06-27 18:20             ` Grosen, Mark
     [not found]               ` <FFF198FBBF957F4393BA834040FEFFA202EC68-Jq/I0xf/SMGIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2011-06-28  9:36                 ` Nori, Sekhar
2011-06-21  7:18 ` Ohad Ben-Cohen [this message]
     [not found]   ` <1308640714-17961-7-git-send-email-ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>
2011-06-28 10:18     ` [RFC 6/8] davinci: da850: add remoteproc dsp device Sergei Shtylyov
2011-06-21  7:18 ` [RFC 7/8] drivers: introduce rpmsg, a remote-processor messaging bus Ohad Ben-Cohen
2011-06-09 17:12   ` Pavel Machek
2011-07-19  5:38     ` Ohad Ben-Cohen
2011-06-22  2:42   ` Rusty Russell
2011-06-22  3:11     ` Sasha Levin
2011-06-22 10:46     ` Ohad Ben-Cohen
2011-09-14 18:38       ` Ohad Ben-Cohen
2011-09-15  0:12         ` Rusty Russell
2011-09-15 14:56           ` Ohad Ben-Cohen
2011-06-27 22:21   ` Grant Likely
2011-06-28 22:46     ` Ohad Ben-Cohen
2011-06-28 22:51       ` Grant Likely
2011-06-28 23:00         ` Ohad Ben-Cohen
2011-06-29 15:43           ` Grant Likely
2011-07-01 15:13             ` Ohad Ben-Cohen
2011-06-28 23:44   ` Randy Dunlap
2011-06-29  6:30     ` Ohad Ben-Cohen
2011-06-29 11:59       ` Arnd Bergmann
2011-06-29 12:29         ` Ohad Ben-Cohen
2011-06-21  7:18 ` [RFC 8/8] rpmsg: add omap host backend Ohad Ben-Cohen
2011-06-21  7:50 ` [RFC 0/8] Introducing a generic AMP/IPC framework Ohad Ben-Cohen
2011-06-21  9:30   ` Ohad Ben-Cohen
2011-06-21 14:20 ` Arnd Bergmann
2011-06-21 15:54   ` Grant Likely
2011-06-22 11:41   ` Ohad Ben-Cohen
2011-06-22 13:05     ` Arnd Bergmann
2011-06-22 13:09       ` Ohad Ben-Cohen
2011-06-23 12:23 ` Michael Williamson
     [not found]   ` <4E033041.9090606-wZX4cNJlHJ2sVWG7oymsAA@public.gmane.org>
2011-06-23 16:27     ` Grosen, Mark
2011-06-23 18:46       ` Arnd Bergmann
2011-06-24  4:32         ` Grosen, Mark
2011-06-24 20:16 ` Stephen Boyd
2011-06-26  1:11   ` Ohad Ben-Cohen
2011-06-26  1:17     ` Brian Swetland
     [not found]     ` <BANLkTi=sFtwam29i4TZdi=RO7BoytTTdrw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-06-27 21:22       ` Grosen, Mark
2011-06-28 11:26         ` Ohad Ben-Cohen
2011-06-28 11:36           ` Brian Swetland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1308640714-17961-7-git-send-email-ohad@wizery.com \
    --to=ohad@wizery.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mgrosen@ti.com \
    --cc=rusty@rustcorp.com.au \
    --cc=swetland@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).