From patchwork Tue Apr 6 17:53:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Guzman Lugo, Fernando" X-Patchwork-Id: 90821 X-Patchwork-Delegate: omar.ramirez@ti.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o36Hrrr5002191 for ; Tue, 6 Apr 2010 17:53:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755648Ab0DFRxx (ORCPT ); Tue, 6 Apr 2010 13:53:53 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:48815 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753041Ab0DFRxw convert rfc822-to-8bit (ORCPT ); Tue, 6 Apr 2010 13:53:52 -0400 Received: from dlep33.itg.ti.com ([157.170.170.112]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id o36HroQu003842 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 6 Apr 2010 12:53:50 -0500 Received: from dlep26.itg.ti.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id o36Hro6i022577; Tue, 6 Apr 2010 12:53:50 -0500 (CDT) Received: from dlee74.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id o36Hrn9Q008998; Tue, 6 Apr 2010 12:53:49 -0500 (CDT) Received: from dlee06.ent.ti.com ([157.170.170.11]) by dlee74.ent.ti.com ([157.170.170.8]) with mapi; Tue, 6 Apr 2010 12:53:49 -0500 From: "Guzman Lugo, Fernando" To: "linux-omap@vger.kernel.org" CC: Hiroshi DOYU , Ameya Palande , "felipe.contreras@nokia.com" Date: Tue, 6 Apr 2010 12:53:47 -0500 Subject: [PATCH 2/3] DSPBRIDGE: remove HW_DSPSS_BootModeSet function Thread-Topic: [PATCH 2/3] DSPBRIDGE: remove HW_DSPSS_BootModeSet function Thread-Index: AcrVshud8Tnnq7PHRJ2YTW3s0SLBJA== Message-ID: <496565EC904933469F292DDA3F1663E602CAF98C64@dlee06.ent.ti.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US 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 (demeter.kernel.org [140.211.167.41]); Tue, 06 Apr 2010 17:54:00 +0000 (UTC) diff --git a/drivers/dsp/bridge/Makefile b/drivers/dsp/bridge/Makefile index ce85ba6..1350362 100644 --- a/drivers/dsp/bridge/Makefile +++ b/drivers/dsp/bridge/Makefile @@ -15,7 +15,7 @@ librmgr = rmgr/dbdcd.o rmgr/disp.o rmgr/drv.o rmgr/mgr.o rmgr/node.o \ rmgr/nldr.o rmgr/drv_interface.o libdload = dynload/cload.o dynload/getsection.o dynload/reloc.o \ dynload/tramp.o -libhw = hw/hw_prcm.o hw/hw_dspssC64P.o hw/hw_mmu.o +libhw = hw/hw_prcm.o hw/hw_mmu.o bridgedriver-objs = $(libgen) $(libservices) $(libwmd) $(libpmgr) $(librmgr) \ $(libdload) $(libhw) diff --git a/drivers/dsp/bridge/hw/IPIAccInt.h b/drivers/dsp/bridge/hw/IPIAccInt.h deleted file mode 100644 index 644fd0d..0000000 --- a/drivers/dsp/bridge/hw/IPIAccInt.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * IPIAccInt.h - * - * DSP-BIOS Bridge driver support functions for TI OMAP processors. - * - * Copyright (C) 2005-2006 Texas Instruments, Inc. - * - * This package is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#ifndef _IPI_ACC_INT_H -#define _IPI_ACC_INT_H - -/* Bitfield mask and offset declarations */ -#define SYSC_IVA2BOOTMOD_OFFSET 0x404 -#define SYSC_IVA2BOOTADDR_OFFSET 0x400 -#define SYSC_IVA2BOOTADDR_MASK 0xfffffc00 - -#endif /* _IPI_ACC_INT_H */ -/* EOF */ diff --git a/drivers/dsp/bridge/hw/IVA2RegAcM.h b/drivers/dsp/bridge/hw/IVA2RegAcM.h deleted file mode 100644 index 181374f..0000000 --- a/drivers/dsp/bridge/hw/IVA2RegAcM.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * IVA1RegAcM.h - * - * DSP-BIOS Bridge driver support functions for TI OMAP processors. - * - * Copyright (C) 2005-2006 Texas Instruments, Inc. - * - * This package is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#ifndef _IVA2_REG_ACM_H -#define _IVA2_REG_ACM_H - -#include -#include - -#define SYSC_IVA2BOOTMOD_OFFSET 0x404 -#define SYSC_IVA2BOOTADDR_OFFSET 0x400 - -#endif diff --git a/drivers/dsp/bridge/hw/hw_dspssC64P.c b/drivers/dsp/bridge/hw/hw_dspssC64P.c deleted file mode 100644 index 89e9316..0000000 --- a/drivers/dsp/bridge/hw/hw_dspssC64P.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * hw_dspss64P.c - * - * DSP-BIOS Bridge driver support functions for TI OMAP processors. - * - * API definitions to configure DSP Subsystem modules like IPI - * - * Copyright (C) 2005-2006 Texas Instruments, Inc. - * - * This package is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* PROJECT SPECIFIC INCLUDE FILES */ -#include -#include -#include -#include -#include -#include - -/* HW FUNCTIONS */ -hw_status hw_dspss_boot_mode_set(const void __iomem *baseAddress, - enum hw_dspsysc_boot_mode_t bootMode, - const u32 bootAddress) -{ - hw_status status = RET_OK; - u32 offset = SYSC_IVA2BOOTMOD_OFFSET; - u32 aligned_boot_addr; - - /* if Boot mode it DIRECT BOOT, check that the bootAddress is - * aligned to atleast 1K :: TODO */ - __raw_writel(bootMode, (baseAddress) + offset); - - offset = SYSC_IVA2BOOTADDR_OFFSET; - - aligned_boot_addr = bootAddress & SYSC_IVA2BOOTADDR_MASK; - - __raw_writel(aligned_boot_addr, (baseAddress) + offset); - - return status; -} diff --git a/drivers/dsp/bridge/hw/hw_dspssC64P.h b/drivers/dsp/bridge/hw/hw_dspssC64P.h deleted file mode 100644 index af0c38b..0000000 --- a/drivers/dsp/bridge/hw/hw_dspssC64P.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * hw_dspssC64P.h - * - * DSP-BIOS Bridge driver support functions for TI OMAP processors. - * - * DSP Subsystem API declarations - * - * Copyright (C) 2005-2006 Texas Instruments, Inc. - * - * This package is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#ifndef _HW_DSPSS_H -#define _HW_DSPSS_H -#include - -enum hw_dspsysc_boot_mode_t { - HW_DSPSYSC_DIRECTBOOT = 0x0, - HW_DSPSYSC_IDLEBOOT = 0x1, - HW_DSPSYSC_SELFLOOPBOOT = 0x2, - HW_DSPSYSC_USRBOOTSTRAP = 0x3, - HW_DSPSYSC_DEFAULTRESTORE = 0x4 -}; - -#define HW_DSP_IDLEBOOT_ADDR 0x007E0000 - -extern hw_status hw_dspss_boot_mode_set(const void __iomem *baseAddress, - enum hw_dspsysc_boot_mode_t bootMode, - const u32 bootAddress); - -#endif /* _HW_DSPSS_H */ diff --git a/drivers/dsp/bridge/wmd/tiomap3430.c b/drivers/dsp/bridge/wmd/tiomap3430.c index 7a1093c..ff47edb 100644 --- a/drivers/dsp/bridge/wmd/tiomap3430.c +++ b/drivers/dsp/bridge/wmd/tiomap3430.c @@ -43,7 +43,6 @@ /* ------------------------------------ Hardware Abstraction Layer */ #include -#include #include #include @@ -78,6 +77,7 @@ #define MMU_SSECTION_ADDR_MASK 0xFF000000 #define MMU_LARGE_PAGE_MASK 0xFFFF0000 #define MMU_SMALL_PAGE_MASK 0xFFFFF000 +#define OMAP3_IVA2_BOOTADDR_MASK 0xFFFFFC00 #define PAGES_II_LVL_TABLE 512 #define PHYS_TO_PAGE(phys) pfn_to_page((phys) >> PAGE_SHIFT) @@ -477,21 +477,16 @@ static dsp_status bridge_brd_start(struct wmd_dev_context *hDevContext, /* hw_rst_reset(resources.dwPrcmBase, HW_RST1_IVA2); */ if (DSP_SUCCEEDED(status)) { hw_rst_reset(resources.dw_prm_base, HW_RST1_IVA2); - if (dsp_debug) { - /* Set the bootmode to self loop */ - dev_dbg(bridge, "Set boot mode to self loop" - " for IVA2 Device\n"); - hw_dspss_boot_mode_set - (resources.dw_sys_ctrl_base, - HW_DSPSYSC_SELFLOOPBOOT, dwDSPAddr); - } else { - /* Set the bootmode to '0' - direct boot */ - dev_dbg(bridge, "Set boot mode to direct boot" - " for IVA2 Device\n"); - hw_dspss_boot_mode_set - (resources.dw_sys_ctrl_base, - HW_DSPSYSC_DIRECTBOOT, dwDSPAddr); - } + /* Mask address with 1K for compatibility */ + __raw_writel(dwDSPAddr & OMAP3_IVA2_BOOTADDR_MASK, + OMAP343X_CTRL_REGADDR( + OMAP343X_CONTROL_IVA2_BOOTADDR)); + /* + * 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)); } } if (DSP_SUCCEEDED(status)) { diff --git a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c index f21be4b..56b9a38 100644 --- a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c +++ b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c @@ -33,7 +33,6 @@ /* ------------------------------------ Hardware Abstraction Layer */ #include -#include #include #include