summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx31/sdma-imx31.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx31/sdma-imx31.c')
-rw-r--r--firmware/target/arm/imx31/sdma-imx31.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/firmware/target/arm/imx31/sdma-imx31.c b/firmware/target/arm/imx31/sdma-imx31.c
index 4c5674afb9..97af419077 100644
--- a/firmware/target/arm/imx31/sdma-imx31.c
+++ b/firmware/target/arm/imx31/sdma-imx31.c
@@ -502,10 +502,11 @@ static bool setup_channel(struct channel_control_block *ccb_p)
502/** Public routines **/ 502/** Public routines **/
503void sdma_init(void) 503void sdma_init(void)
504{ 504{
505 imx31_clkctl_module_clock_gating(CG_SDMA, CGM_ON_RUN_WAIT);
506 int i; 505 int i;
507 unsigned long acr; 506 unsigned long acr;
508 507
508 ccm_module_clock_gating(CG_SDMA, CGM_ON_RUN_WAIT);
509
509 /* Reset the controller */ 510 /* Reset the controller */
510 SDMA_RESET |= SDMA_RESET_RESET; 511 SDMA_RESET |= SDMA_RESET_RESET;
511 while (SDMA_RESET & SDMA_RESET_RESET); 512 while (SDMA_RESET & SDMA_RESET_RESET);
@@ -532,11 +533,11 @@ void sdma_init(void)
532 /* 32-word channel contexts, use default bootscript address */ 533 /* 32-word channel contexts, use default bootscript address */
533 SDMA_CHN0ADDR = SDMA_CHN0ADDR_SMSZ | 0x0050; 534 SDMA_CHN0ADDR = SDMA_CHN0ADDR_SMSZ | 0x0050;
534 535
535 avic_enable_int(SDMA, IRQ, 8, SDMA_HANDLER); 536 avic_enable_int(INT_SDMA, INT_TYPE_IRQ, INT_PRIO_DEFAULT+1, SDMA_HANDLER);
536 537
537 /* SDMA core must run at the proper frequency based upon the AHB/IPG ratio */ 538 /* SDMA core must run at the proper frequency based upon the AHB/IPG
538 acr = (imx31_clkctl_get_ahb_clk() / imx31_clkctl_get_ipg_clk()) < 2 ? 539 * ratio */
539 SDMA_CONFIG_ACR : 0; 540 acr = (ccm_get_ahb_clk() / ccm_get_ipg_clk()) < 2 ? SDMA_CONFIG_ACR : 0;
540 541
541 /* No dsp, no debug 542 /* No dsp, no debug
542 * Static context switching - TLSbo86520L SW Workaround for SDMA Chnl0 543 * Static context switching - TLSbo86520L SW Workaround for SDMA Chnl0