Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27652
b: refs/heads/master
c: 3c00944
h: refs/heads/master
v: v3
  • Loading branch information
Ralf Baechle committed Jun 19, 2006
1 parent d7817f9 commit 9a47cbd
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0307e8d024dffc00743fb54b9afa920a346f1adb
refs/heads/master: 3c0094426f3ff37697062b940211712746419688
2 changes: 1 addition & 1 deletion trunk/arch/mips/sgi-ip27/ip27-irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ static struct hw_interrupt_type bridge_irq_type = {

static unsigned long irq_map[NR_IRQS / BITS_PER_LONG];

static int allocate_irqno(void)
int allocate_irqno(void)
{
int irq;

Expand Down
61 changes: 59 additions & 2 deletions trunk/arch/mips/sgi-ip27/ip27-timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,13 @@ static int set_rtc_mmss(unsigned long nowtime)
}
#endif

static unsigned int rt_timer_irq;

void ip27_rt_timer_interrupt(struct pt_regs *regs)
{
int cpu = smp_processor_id();
int cpuA = cputoslice(cpu) == 0;
int irq = 9; /* XXX Assign number */
unsigned int irq = rt_timer_irq;

irq_enter();
write_seqlock(&xtime_lock);
Expand Down Expand Up @@ -179,13 +181,68 @@ static __init unsigned long get_m48t35_time(void)
return mktime(year, month, date, hour, min, sec);
}

static void startup_rt_irq(unsigned int irq)
{
}

static void shutdown_rt_irq(unsigned int irq)
{
}

static void enable_rt_irq(unsigned int irq)
{
}

static void disable_rt_irq(unsigned int irq)
{
}

static void mask_and_ack_rt(unsigned int irq)
{
}

static void end_rt_irq(unsigned int irq)
{
}

static struct hw_interrupt_type rt_irq_type = {
.typename = "SN HUB RT timer",
.startup = startup_rt_irq,
.shutdown = shutdown_rt_irq,
.enable = enable_rt_irq,
.disable = disable_rt_irq,
.ack = mask_and_ack_rt,
.end = end_rt_irq,
};

static struct irqaction rt_irqaction = {
.handler = ip27_rt_timer_interrupt,
.flags = SA_INTERRUPT,
.mask = CPU_MASK_NONE,
.name = "timer"
};

extern int allocate_irqno(void);

static void ip27_timer_setup(struct irqaction *irq)
{
int irqno = allocate_irqno();

if (irqno < 0)
panic("Can't allocate interrupt number for timer interrupt");

irq_desc[irqno].status = IRQ_DISABLED;
irq_desc[irqno].action = NULL;
irq_desc[irqno].depth = 1;
irq_desc[irqno].handler = &rt_irq_type;

/* over-write the handler, we use our own way */
irq->handler = no_action;

/* setup irqaction */
// setup_irq(IP27_TIMER_IRQ, irq); /* XXX Can't do this yet. */
irq_desc[irqno].status |= IRQ_PER_CPU;

rt_timer_irq = irqno;
}

void __init ip27_time_init(void)
Expand Down

0 comments on commit 9a47cbd

Please sign in to comment.