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: 1326141 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 53BBD3FC66 for ; Wed, 15 Aug 2012 15:26:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754235Ab2HOP0F (ORCPT ); Wed, 15 Aug 2012 11:26:05 -0400 Received: from na3sys009aog114.obsmtp.com ([74.125.149.211]:53796 "EHLO na3sys009aog114.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752064Ab2HOP0C (ORCPT ); Wed, 15 Aug 2012 11:26:02 -0400 Received: from mail-ob0-f181.google.com ([209.85.214.181]) (using TLSv1) by na3sys009aob114.postini.com ([74.125.148.12]) with SMTP ID DSNKUCu/ihll4mRWHCiaZuYuey3oI0z0lHNW@postini.com; Wed, 15 Aug 2012 08:26:02 PDT Received: by obbup19 with SMTP id up19so2511966obb.12 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=CkkeWhdQcspp/nK/0droV7b9+maY0tvIaJF/zPWQwam0E9niYE/MaCLWNHAeJ2Vcyg nEcYiFbDZ0mXBUBKhmG8LPY01rn+ENDYJmw0wWCb5xcRTGvCwEdVzkMm3U1YGdscr/MH ouaqDbpragTh52czdTSbAtXgzmjuiDRRHaSlwUhPmW6TzHX+E/eXdibLSBoEx8OTH5kA hn20CKfmrvExJQFTpvyIB8Et4ySSPUuX6P1T56S1MT1MgpO4eOQYNoyIuxBsMCOpS1KY 2ugJc8eBR1Ci7nO+oUXFcFAAOGf0tHuEdWDt2shLqnOM+oTh2nbiRPlHFCqB8fklo6Lf prBA== 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 Cc: Juan Gutierrez , Suman Anna 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: ALoCoQksfOPLauw6dzrj4tWdJDZ/HTW0c0paVzDiAbOdtl/VIQI4vrQZnAM8GlVCRrj9ccRPmjE7 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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 */