Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 622e9472 authored by Greg Ungerer's avatar Greg Ungerer
Browse files

m68knommu: correctly use trap_init



Currently trap_init() is an empty function for m68knommu. Instead
the vectors are being setup as part of the IRQ initialization.
This is inconsistent with m68k and other architectures.

Change the local init_vectors() to be trap_init(), and init the
vectors at the correct time during startup. This will help merge of
m68k and m68knommu trap code in the furture.

Signed-off-by: default avatarGreg Ungerer <gerg@uclinux.org>
parent f4a54373
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -22,7 +22,6 @@ extern e_vector vectors[];
asmlinkage void auto_inthandler(void);
asmlinkage void auto_inthandler(void);
asmlinkage void user_inthandler(void);
asmlinkage void user_inthandler(void);
asmlinkage void bad_inthandler(void);
asmlinkage void bad_inthandler(void);
extern void init_vectors(void);


#endif
#endif


+0 −4
Original line number Original line Diff line number Diff line
@@ -60,10 +60,6 @@ static char const * const vec_names[] = {
	"MMU CONFIGURATION ERROR"
	"MMU CONFIGURATION ERROR"
};
};


void __init trap_init(void)
{
}

void die_if_kernel(char *str, struct pt_regs *fp, int nr)
void die_if_kernel(char *str, struct pt_regs *fp, int nr)
{
{
	if (!(fp->sr & PS_S))
	if (!(fp->sr & PS_S))
+0 −2
Original line number Original line Diff line number Diff line
@@ -162,8 +162,6 @@ void __init init_IRQ(void)
{
{
	int irq, edge;
	int irq, edge;


	init_vectors();

	/* Mask all interrupt sources */
	/* Mask all interrupt sources */
	writel(0x88888888, MCF_MBAR + MCFSIM_ICR1);
	writel(0x88888888, MCF_MBAR + MCFSIM_ICR1);
	writel(0x88888888, MCF_MBAR + MCFSIM_ICR2);
	writel(0x88888888, MCF_MBAR + MCFSIM_ICR2);
+6 −1
Original line number Original line Diff line number Diff line
@@ -155,7 +155,7 @@ static struct irq_chip intc_irq_chip = {
 * This function should be called during kernel startup to initialize
 * This function should be called during kernel startup to initialize
 * the machine vector table.
 * the machine vector table.
 */
 */
void __init init_IRQ(void)
void __init trap_init(void)
{
{
	int i;
	int i;


@@ -172,6 +172,11 @@ void __init init_IRQ(void)
	_ramvec[69] = (e_vector) inthandler5;
	_ramvec[69] = (e_vector) inthandler5;
	_ramvec[70] = (e_vector) inthandler6;
	_ramvec[70] = (e_vector) inthandler6;
	_ramvec[71] = (e_vector) inthandler7;
	_ramvec[71] = (e_vector) inthandler7;
}

void __init init_IRQ(void)
{
	int i;


	IVR = 0x40; /* Set DragonBall IVR (interrupt base) to 64 */
	IVR = 0x40; /* Set DragonBall IVR (interrupt base) to 64 */


+6 −2
Original line number Original line Diff line number Diff line
@@ -63,9 +63,8 @@ static struct irq_chip intc_irq_chip = {
 * This function should be called during kernel startup to initialize
 * This function should be called during kernel startup to initialize
 * the vector table.
 * the vector table.
 */
 */
void init_IRQ(void)
void __init trap_init(void)
{
{
	int i;
	int vba = (CPM_VECTOR_BASE<<4);
	int vba = (CPM_VECTOR_BASE<<4);


	/* set up the vectors */
	/* set up the vectors */
@@ -130,6 +129,11 @@ void init_IRQ(void)


	/* turn off all CPM interrupts */
	/* turn off all CPM interrupts */
	pquicc->intr_cimr = 0x00000000;
	pquicc->intr_cimr = 0x00000000;
}

void init_IRQ(void)
{
	int i;


	for (i = 0; (i < NR_IRQS); i++) {
	for (i = 0; (i < NR_IRQS); i++) {
		irq_set_chip(i, &intc_irq_chip);
		irq_set_chip(i, &intc_irq_chip);
Loading