Skip to content

Commit

Permalink
drivers: mediatek: Update drivers for mt8196
Browse files Browse the repository at this point in the history
Update interrupt, timer, ipc driver.

Signed-off-by: hailong.fan <[email protected]>
  • Loading branch information
hailong-fan committed Jan 7, 2025
1 parent 7df4d00 commit 00c9d5e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/drivers/mediatek/mt8196/intc.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ void intc_irq_unmask(enum IRQn_Type irq)
word = INTC_WORD(irq);
group = intc_desc.irqs[irq].group;
io_reg_update_bits(INTC_IRQ_EN(word), INTC_BIT(irq), INTC_BIT(irq));
//xt_ints_on(1 << grp2hifi_irq_map[group]);
} else
} else {
tr_err(&intc_tr, "Invalid INTC interrupt %d", irq);
}
}

void intc_irq_mask(enum IRQn_Type irq)
Expand All @@ -76,8 +76,9 @@ void intc_irq_mask(enum IRQn_Type irq)
if (irq < IRQ_MAX_CHANNEL) {
word = INTC_WORD(irq);
io_reg_update_bits(INTC_IRQ_EN(word), INTC_BIT(irq), 0);
} else
} else {
tr_err(&intc_tr, "Invalid INTC interrupt %d", irq);
}
}

int intc_irq_enable(enum IRQn_Type irq)
Expand Down Expand Up @@ -122,7 +123,6 @@ int intc_irq_disable(enum IRQn_Type irq)
irq_b = INTC_BIT(irq);
group = intc_desc.irqs[irq].group;

//xt_ints_off(1 << grp2hifi_irq_map[group]); //sw disable irq
intc_desc.int_en[word] &= ~irq_b;
intc_desc.grp_irqs[group][word] &= ~irq_b;
io_reg_update_bits(INTC_IRQ_EN(word), irq_b, 0);
Expand Down
1 change: 0 additions & 1 deletion src/drivers/mediatek/mt8196/intc_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Author: Hailong Fan <[email protected]>
*/


#include <sof/audio/component_ext.h>
#include <rtos/interrupt.h>
#include <sof/lib/memory.h>
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/mediatek/mt8196/ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ int platform_ipc_init(struct ipc *ipc)

/* schedule */
schedule_task_init_edf(&ipc->ipc_task, SOF_UUID(ipc_task_mt8196_uuid),
&ipc_task_ops, ipc, 0, 0);
&ipc_task_ops, ipc, 0, 0);

#if CONFIG_HOST_PTABLE
/* allocate page table buffer */
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/mediatek/mt8196/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ int64_t platform_timer_set(struct timer *timer, uint64_t ticks)

/* set 26m clksrc */
io_reg_update_bits(MTK_TIMER_CON(timer->id), MTK_TIMER_CLKSRC_BIT,
MTK_TIMER_CLK_SRC_CLK_26M);
MTK_TIMER_CLK_SRC_CLK_26M);
/* timer reset value */
io_reg_write(MTK_TIMER_RST_VAL(timer->id), ticks_set);

Expand Down

0 comments on commit 00c9d5e

Please sign in to comment.