Skip to content

Commit

Permalink
staging: ti dspbridge: move mmufault to deh
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Felipe Contreras authored and Greg Kroah-Hartman committed Jul 8, 2010
1 parent 61a5b76 commit 1961c9c
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 134 deletions.
2 changes: 1 addition & 1 deletion drivers/staging/tidspbridge/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ libservices = services/sync.o services/cfg.o \
services/ntfy.o services/services.o
libcore = core/chnl_sm.o core/msg_sm.o core/io_sm.o core/tiomap3430.o \
core/tiomap3430_pwr.o core/tiomap_io.o \
core/mmu_fault.o core/ue_deh.o core/wdt.o core/dsp-clock.o
core/ue_deh.o core/wdt.o core/dsp-clock.o
libpmgr = pmgr/chnl.o pmgr/io.o pmgr/msg.o pmgr/cod.o pmgr/dev.o pmgr/dspapi.o \
pmgr/dmm.o pmgr/cmm.o pmgr/dbll.o
librmgr = rmgr/dbdcd.o rmgr/disp.o rmgr/drv.o rmgr/mgr.o rmgr/node.o \
Expand Down
98 changes: 0 additions & 98 deletions drivers/staging/tidspbridge/core/mmu_fault.c

This file was deleted.

34 changes: 0 additions & 34 deletions drivers/staging/tidspbridge/core/mmu_fault.h

This file was deleted.

50 changes: 49 additions & 1 deletion drivers/staging/tidspbridge/core/ue_deh.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,61 @@
#include <hw_mmu.h>

/* ----------------------------------- This */
#include "mmu_fault.h"
#include "_tiomap.h"
#include "_deh.h"
#include "_tiomap_pwr.h"
#include <dspbridge/io_sm.h>


static void mmu_fault_dpc(unsigned long data)
{
struct deh_mgr *hdeh_mgr = (void *)data;

if (!hdeh_mgr)
return;

bridge_deh_notify(hdeh_mgr, DSP_MMUFAULT, 0);
}

static irqreturn_t mmu_fault_isr(int irq, void *data)
{
struct deh_mgr *deh_mgr_obj = data;
struct cfg_hostres *resources;
u32 dmmu_event_mask;

if (!deh_mgr_obj)
return IRQ_HANDLED;

resources = deh_mgr_obj->hbridge_context->resources;
if (!resources) {
dev_dbg(bridge, "%s: Failed to get Host Resources\n",
__func__);
return IRQ_HANDLED;
}

hw_mmu_event_status(resources->dw_dmmu_base, &dmmu_event_mask);
if (dmmu_event_mask == HW_MMU_TRANSLATION_FAULT) {
hw_mmu_fault_addr_read(resources->dw_dmmu_base, &deh_mgr_obj->fault_addr);
dev_info(bridge, "%s: status=0x%x, fault_addr=0x%x\n", __func__,
dmmu_event_mask, deh_mgr_obj->fault_addr);
/*
* Schedule a DPC directly. In the future, it may be
* necessary to check if DSP MMU fault is intended for
* Bridge.
*/
tasklet_schedule(&deh_mgr_obj->dpc_tasklet);

/* Disable the MMU events, else once we clear it will
* start to raise INTs again */
hw_mmu_event_disable(resources->dw_dmmu_base,
HW_MMU_TRANSLATION_FAULT);
} else {
hw_mmu_event_disable(resources->dw_dmmu_base,
HW_MMU_ALL_INTERRUPTS);
}
return IRQ_HANDLED;
}

int bridge_deh_create(struct deh_mgr **ret_deh_mgr,
struct dev_object *hdev_obj)
{
Expand Down

0 comments on commit 1961c9c

Please sign in to comment.