* and Paul Mundt <paul.mundt@nokia.com>
*
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
#include <linux/types.h>
#include <linux/init.h>
#include <linux/err.h>
#include "mmu.h"
#include <asm/tlbflush.h>
+#include <mach/dsp_common.h>
static void *dspvect_page;
#define DSP_INIT_PAGE 0xfff000
}
EXPORT_SYMBOL_GPL(dsp_mem_usecount_clear);
+void omap_mmu_itack(struct omap_mmu *mmu)
+{
+ omap_mmu_write_reg(mmu, OMAP_MMU_IT_ACK_IT_ACK, OMAP_MMU_IT_ACK);
+}
+EXPORT_SYMBOL(omap_mmu_itack);
+
static int omap1_mmu_mem_enable(struct omap_mmu *mmu, void *addr)
{
int ret = 0;
{
dspvect_page = (void *)__get_dma_pages(GFP_KERNEL, 0);
if (dspvect_page == NULL) {
- printk(KERN_ERR "MMU: failed to allocate memory "
- "for dsp vector table\n");
+ dev_err(mmu->dev, "MMU %s: failed to allocate memory "
+ "for vector table\n", mmu->name);
return -ENOMEM;
}
}
static struct cam_ram_regset *
-omap1_mmu_cam_ram_alloc(struct omap_mmu_tlb_entry *entry)
+omap1_mmu_cam_ram_alloc(struct omap_mmu *mmu, struct omap_mmu_tlb_entry *entry)
{
struct cam_ram_regset *cr;
if (entry->va & ~(get_cam_va_mask(entry->pgsz))) {
- printk(KERN_ERR "MMU: mapping vadr (0x%06lx) is not on an "
- "aligned boundary\n", entry->va);
+ dev_err(mmu->dev, "MMU %s: mapping vadr (0x%06lx) is not on"
+ " an aligned boundary\n", mmu->name, entry->va);
return ERR_PTR(-EINVAL);
}
/* if the fault is masked, nothing to do */
if ((status & MMUFAULT_MASK) == 0) {
- pr_debug( "MMU interrupt, but ignoring.\n");
+ pr_debug("MMU interrupt, but ignoring.\n");
/*
* note: in OMAP1710,
* when CACHE + DMA domain gets out of idle in DSP,
* in this case, we just ignore the interrupt.
*/
if (status) {
- pr_debug( "%s%s%s%s\n",
- (status & OMAP_MMU_FAULT_ST_PREF)?
- " (prefetch err)" : "",
- (status & OMAP_MMU_FAULT_ST_PERM)?
- " (permission fault)" : "",
- (status & OMAP_MMU_FAULT_ST_TLB_MISS)?
- " (TLB miss)" : "",
- (status & OMAP_MMU_FAULT_ST_TRANS) ?
- " (translation fault)": "");
- pr_debug( "fault address = %#08lx\n", va);
+ pr_debug("%s%s%s%s\n",
+ (status & OMAP_MMU_FAULT_ST_PREF)?
+ " (prefetch err)" : "",
+ (status & OMAP_MMU_FAULT_ST_PERM)?
+ " (permission fault)" : "",
+ (status & OMAP_MMU_FAULT_ST_TLB_MISS)?
+ " (TLB miss)" : "",
+ (status & OMAP_MMU_FAULT_ST_TRANS) ?
+ " (translation fault)": "");
+ pr_debug("fault address = %#08lx\n", va);
}
enable_irq(mmu->irq);
return;