From patchwork Mon Oct 11 20:37:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 246411 X-Patchwork-Delegate: paul@pwsan.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9BKdXUt023584 for ; Mon, 11 Oct 2010 20:39:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755765Ab0JKUjb (ORCPT ); Mon, 11 Oct 2010 16:39:31 -0400 Received: from utopia.booyaka.com ([72.9.107.138]:40283 "EHLO utopia.booyaka.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755758Ab0JKUja (ORCPT ); Mon, 11 Oct 2010 16:39:30 -0400 Received: (qmail 29534 invoked by uid 1019); 11 Oct 2010 20:39:29 -0000 MBOX-Line: From nobody Mon Oct 11 14:37:14 2010 Subject: [PATCH 3/3] DSPBridge: convert OMAP3430 adaptation layer to use new SCM DSP boot control fns To: fernando.lugo@ti.com From: Paul Walmsley Cc: linux-omap@vger.kernel.org Date: Mon, 11 Oct 2010 14:37:14 -0600 Message-ID: <20101011203713.24425.52021.stgit@twilight.localdomain> In-Reply-To: <20101011203659.24425.2381.stgit@twilight.localdomain> References: <20101011203659.24425.2381.stgit@twilight.localdomain> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 11 Oct 2010 20:39:33 +0000 (UTC) diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c index f914829..3fd9551 100644 --- a/drivers/staging/tidspbridge/core/tiomap3430.c +++ b/drivers/staging/tidspbridge/core/tiomap3430.c @@ -21,7 +21,7 @@ #include #include #include -#include +#include /* ----------------------------------- DSP/BIOS Bridge */ #include @@ -374,6 +374,7 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt, u32 clk_cmd; struct io_mgr *hio_mgr; u32 ul_load_monitor_timer; + u8 bootmode; struct dspbridge_platform_data *pdata = omap_dspbridge_dev->dev.platform_data; @@ -415,15 +416,13 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt, OMAP3430_RST1_IVA2_MASK, OMAP3430_IVA2_MOD, OMAP2_RM_RSTCTRL); /* Mask address with 1K for compatibility */ - __raw_writel(dsp_addr & OMAP3_IVA2_BOOTADDR_MASK, - OMAP343X_CTRL_REGADDR( - OMAP343X_CONTROL_IVA2_BOOTADDR)); + dsp_addr &= OMAP3_IVA2_BOOTADDR_MASK; + (*pdata->set_dsp_bootaddr)(dsp_addr); /* * Set bootmode to self loop if dsp_debug flag is true */ - __raw_writel((dsp_debug) ? OMAP3_IVA2_BOOTMOD_IDLE : 0, - OMAP343X_CTRL_REGADDR( - OMAP343X_CONTROL_IVA2_BOOTMOD)); + bootmode = dsp_debug ? OMAP_IVA2_DSP_BOOTMODE_IDLE : 0; + (*pdata->set_dsp_bootmode)(bootmode); } } if (!status) { diff --git a/drivers/staging/tidspbridge/include/dspbridge/host_os.h b/drivers/staging/tidspbridge/include/dspbridge/host_os.h index 6b4feb4..a251fe4 100644 --- a/drivers/staging/tidspbridge/include/dspbridge/host_os.h +++ b/drivers/staging/tidspbridge/include/dspbridge/host_os.h @@ -59,7 +59,11 @@ struct dspbridge_platform_data { unsigned long (*cpu_get_freq) (void); unsigned long mpu_speed[6]; + void (*set_dsp_bootaddr)(u32 pa); + void (*set_dsp_bootmode)(u8 mode); + /* functions to write and read PRCM registers */ + /* XXX None of this should be here */ void (*dsp_prm_write)(u32, s16 , u16); u32 (*dsp_prm_read)(s16 , u16); u32 (*dsp_prm_rmw_bits)(u32, u32, s16, s16);