From patchwork Wed Aug 15 15:25:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Gutierrez X-Patchwork-Id: 1326151 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 3F5BDDFFED for ; Wed, 15 Aug 2012 15:28:53 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T1fU0-0001w0-48; Wed, 15 Aug 2012 15:26:08 +0000 Received: from na3sys009aog130.obsmtp.com ([74.125.149.143]) by merlin.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1T1fTw-0001v8-Kn for linux-arm-kernel@lists.infradead.org; Wed, 15 Aug 2012 15:26:05 +0000 Received: from mail-ob0-f169.google.com ([209.85.214.169]) (using TLSv1) by na3sys009aob130.postini.com ([74.125.148.12]) with SMTP ID DSNKUCu/ihll4mRWHCiaZuYuey3oI0z0lHNW@postini.com; Wed, 15 Aug 2012 08:26:04 PDT Received: by obhx4 with SMTP id x4so2671255obh.0 for ; Wed, 15 Aug 2012 08:26:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=3lp/UG5uRHZBHhx8EYaLBle3h+p6N0MNVtChasnEnlk=; b=IMo4fG0jK0+wVrrxYsXpS41sNRJXdbnOnjaduiie1wugTiMcyhkOVgIrmFMk9Wb3UW 02WNqODMyk3GMdPnvzzj7NnATviTHdhQL200Z4TI13hLthSlJxmTZzg0ZHqLn+5DzW4M Xl4IVkpjiXvBS0FyBfKk+xkiPrzLaewQXG51Tql5ZI8gjmFNS6ViaK1xwF2WKgZtZjIp /VTUTD6LuG6EBP0h2ur1V9k3KNaSO7OIDh67+GbEa29tukg8jy60DgENVm85lcHa0dZH hZYUlQRR7L0MOsCRIXkKjFb65tz778t7U1K9J0DqbhbPH5aes8QjzFVvq8upXIHgBXKj eAZQ== Received: by 10.182.212.70 with SMTP id ni6mr24340870obc.44.1345044361676; Wed, 15 Aug 2012 08:26:01 -0700 (PDT) Received: from localhost.localdomain (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id j10sm1281246oej.10.2012.08.15.08.26.00 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 15 Aug 2012 08:26:01 -0700 (PDT) From: Juan Gutierrez To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, ohad@wizery.com Subject: [PATCH] omap: remoteproc: set bootaddr support Date: Wed, 15 Aug 2012 10:25:48 -0500 Message-Id: <1345044348-19898-1-git-send-email-jgutierrez@ti.com> X-Mailer: git-send-email 1.7.1 X-Gm-Message-State: ALoCoQlLOlG0kUPKmDpZm8Cdwt98T7M7MJ6kvM4zehWgiriBAmPB9/4/0v3xtpIZDzsTJsiYq27f X-Spam-Note: CRM114 invocation failed X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [74.125.149.143 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Suman Anna , Juan Gutierrez X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 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 Some remote processors (like Omap4's DSP) need to explicitly set a boot address from which they start executing code when taken out of reset. Support for this has been added to remoteproc code through a set_bootaddr function in the platform data which, if needed, must be set according to the backend rproc. For omap4's dsp we can use the next control funtion: .set_bootaddr = omap_ctrl_write_dsp_boot_addr Signed-off-by: Juan Gutierrez Signed-off-by: Suman Anna --- arch/arm/plat-omap/include/plat/remoteproc.h | 2 ++ drivers/remoteproc/omap_remoteproc.c | 3 +++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/arm/plat-omap/include/plat/remoteproc.h b/arch/arm/plat-omap/include/plat/remoteproc.h index b10eac8..3c1c644 100644 --- a/arch/arm/plat-omap/include/plat/remoteproc.h +++ b/arch/arm/plat-omap/include/plat/remoteproc.h @@ -30,6 +30,7 @@ struct platform_device; * @ops: start/stop rproc handlers * @device_enable: omap-specific handler for enabling a device * @device_shutdown: omap-specific handler for shutting down a device + * @set_bootaddr: omap-specific handler for setting the rproc boot address */ struct omap_rproc_pdata { const char *name; @@ -40,6 +41,7 @@ struct omap_rproc_pdata { const struct rproc_ops *ops; int (*device_enable) (struct platform_device *pdev); int (*device_shutdown) (struct platform_device *pdev); + void(*set_bootaddr)(u32); }; #if defined(CONFIG_OMAP_REMOTEPROC) || defined(CONFIG_OMAP_REMOTEPROC_MODULE) diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c index a1f7ac1..a0c168c 100644 --- a/drivers/remoteproc/omap_remoteproc.c +++ b/drivers/remoteproc/omap_remoteproc.c @@ -116,6 +116,9 @@ static int omap_rproc_start(struct rproc *rproc) struct omap_rproc_pdata *pdata = pdev->dev.platform_data; int ret; + if (pdata->set_bootaddr) + pdata->set_bootaddr(rproc->bootaddr); + oproc->nb.notifier_call = omap_rproc_mbox_callback; /* every omap rproc is assigned a mailbox instance for messaging */