interrupt_t *get_hdmi_interrupt()
{
#if defined(CONFIG_STI7141)
      return interrupt_handle(OS21_INTERRUPT_IRQ_HDMI_7);
#elif defined(CONFIG_STI7108)
      return interrupt_handle(OS21_INTERRUPT_HDMI_FORMATTER);
#elif !defined(CONFIG_STI5206)
      return interrupt_handle(OS21_INTERRUPT_HDMI);
#endif

  return NULL;
}
interrupt_t *get_bdisp_interrupt()
{
#if defined(CONFIG_STI7200)
  return interrupt_handle(OS21_INTERRUPT_BDISP0_AQ1);
#elif defined(CONFIG_STI7111) || defined(CONFIG_STI7105) || defined(CONFIG_STI7106)
  return interrupt_handle(OS21_INTERRUPT_BDISP_AQ);
#elif defined(CONFIG_STI7141)
  return interrupt_handle(OS21_INTERRUPT_BDISP_AQ1_IRQP);
#elif defined(CONFIG_STI5206)
  return interrupt_handle(OS21_INTERRUPT_BDISP_AQ1);
#elif defined(CONFIG_STI7108)
  return interrupt_handle(OS21_INTERRUPT_BDISP_AQ_1);
#endif

  return NULL;
}
Exemple #3
0
void 
trap(unsigned status, unsigned cause, unsigned epc, 
     md_thread_t *frame)
{
	const int exc = cause & CAUSE_EXC_MASK;
	DPRINTF("status:%x cause:%x epc:%x exc:%x\n",
		status, cause, epc, exc);
	switch(exc) {
	case EXC_INT:
		interrupt_handle(cause & CAUSE_IP_MASK);
		break;
	case EXC_SYS:
		syscall_handle(status, cause, epc, frame);
		break;
	default:
		printf("[general exception]\n");
		dump_frame(frame);
		while(1)
			;
	}
}
interrupt_t *get_main_vtg_interrupt()
{
#if defined(CONFIG_STB7100) || defined(CONFIG_STB7109)
  return interrupt_handle(OS21_INTERRUPT_VTG_1);
#elif defined(CONFIG_STI7200)
  return interrupt_handle(OS21_INTERRUPT_VTG_MAIN0);
#elif defined(CONFIG_STI7111) || defined(CONFIG_STI7105) || defined(CONFIG_STI7106)
  return interrupt_handle(OS21_INTERRUPT_MAIN_VTG);
#elif defined(CONFIG_STI7141)
  return interrupt_handle(OS21_INTERRUPT_IRQ_MAIN_VTG_0);
#elif defined(CONFIG_STI5206)
  return interrupt_handle(OS21_INTERRUPT_MAIN_VTG);
#elif defined(CONFIG_STI7108)
  return interrupt_handle(OS21_INTERRUPT_VTG_MAIN_VSYNC);
#endif

  return NULL;
}
Exemple #5
0
static EMBX_ERROR STb5525_NotifyFunction(void *data, EMBX_UINT opcode, void *param)
{
	struct stb5525_ctx *ctx = data;
	EMBXSHM_GenericConfig_InstallIsr_t *installIsr = param;
	EMBX_ERROR res = EMBX_SUCCESS;
	int err;

	switch (opcode) {
	case EMBXSHM_OPCODE_RENDEZVOUS:
		printf("Waiting for %s processor to boot ... ",
		       (IS_HOST() ? "audio" : "host"));
		fflush(stdout);

		/* the ILC trigger mode registers go to zero on reset so it is
		 * very easy to implement a rendezvous with them.
		 */
		*(ilc_mailbox[US]) = ILC_MAILBOX_BOOTSIG;	
		while (*(ilc_mailbox[THEM]) != ILC_MAILBOX_BOOTSIG) {}
		*(ilc_mailbox[THEM]) = ILC_MAILBOX_CLEAR;
		while (*(ilc_mailbox[US]) == ILC_MAILBOX_BOOTSIG) {}

		printf("done\n");
		break;
	case EMBXSHM_OPCODE_INSTALL_ISR:
		ctx->cpuID = installIsr->cpuID;
		ctx->interruptParameters = (*installIsr);

		ctx->handle = interrupt_handle(IS_HOST() ? OS21_INTERRUPT_MAILBOX_0 :
		                                           OS21_INTERRUPT_MAILBOX_1);
		assert(ctx->handle);

		err = interrupt_install_shared(ctx->handle,
					       STb5525_InterruptHandler, ctx);
		assert(0 == err);

		err = interrupt_enable(ctx->handle);
		assert(0 == err);

		/* when we installed the interrupt we potentially clobbered a
		 * pending interrupt from our partner. for this reason we assume
		 * we did clobber an interrupt and generate one just in case.
		 */
		*(ilc_mailbox[US]) = ILC_MAILBOX_RAISE;
		break;
	case EMBXSHM_OPCODE_REMOVE_ISR:
		interrupt_uninstall(ctx->handle);
		ctx->handle = 0;
		break;
	case EMBXSHM_OPCODE_RAISE_INTERRUPT:
		*(ilc_mailbox[(EMBX_UINT) param]) = ILC_MAILBOX_RAISE;
		break;
	case EMBXSHM_OPCODE_CLEAR_INTERRUPT:
		*(ilc_mailbox[US]) = ILC_MAILBOX_CLEAR;
		break;
	case EMBXSHM_OPCODE_ENABLE_INTERRUPT:
		(void) interrupt_enable(ctx->handle);
		break;
	case EMBXSHM_OPCODE_DISABLE_INTERRUPT:
		(void) interrupt_disable(ctx->handle);
		break;
	case EMBXSHM_OPCODE_BUFFER_FLUSH:
	default:
		res = EMBX_SYSTEM_ERROR;
	}
	
	return res;
}