Skip to contentSkip to conversation

: sun4m timer rework, try 2

PATCH In review David Miller 2 participants 7 messages Sep 11, 2008 – Sep 14, 2008 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

cover : sun4m timer rework, try 2

Ok, let's try this again.

The first two patches work to let us use the OF device driver layer facilities much earlier in the boot process.

And then the third is the sun4m timers patch, with no changes from last time.

Robert, let me know how it works out.

Thanks!

#1 lore raw
Quoted 5 lines · David Miller

Ok, let's try this again.

The first two patches work to let us use the OF device driver layer facilities much earlier in the boot process.

Quoted 8 lines

And then the third is the sun4m timers patch, with no changes from last time.

Robert, let me know how it works out.

Thanks!

With all 3 and with just the first 2, I get an OBP Watchdog Reset.

author maintainer
#3 lore raw
In reply to David Miller

From: Robert Reif <[email protected]>
Date: Thu, 11 Sep 2008 20:37:13 -0400

Quoted 1 line

With all 3 and with just the first 2, I get an OBP Watchdog Reset.

Ok, this approach isn't going to work.

We can't use the generic device layer until much later and that's why it's crashing when we try to register the OF driver bus type so early.

I'll have to try and figure out another way to do this.

author maintainer
#4 lore raw
In reply to David Miller

From: David Miller <[email protected]>
Date: Thu, 11 Sep 2008 18:51:34 -0700 (PDT)

Quoted 5 lines

We can't use the generic device layer until much later and that's why it's crashing when we try to register the OF driver bus type so early.

I'll have to try and figure out another way to do this.

Ok, get rid of those patches and try just this one instead.

Thanks in advance Robert.

arch/sparc/include/asm/timer_32.h +0 -43
index adab3de..8906e98 100644
@@ -35,49 +35,6 @@ struct sun4c_timer_info {
 
 #define SUN_TIMER_PHYSADDR   0xf3000000
 
-/* A sun4m has two blocks of registers which are probably of the same
- * structure. LSI Logic's L64851 is told to _decrement_ from the limit
- * value. Aurora behaves similarly but its limit value is compacted in
- * other fashion (it's wider). Documented fields are defined here.
- */
-
-/* As with the interrupt register, we have two classes of timer registers
- * which are per-cpu and master.  Per-cpu timers only hit that cpu and are
- * only level 14 ticks, master timer hits all cpus and is level 10.
- */
-
-#define SUN4M_PRM_CNT_L       0x80000000
-#define SUN4M_PRM_CNT_LVALUE  0x7FFFFC00
-
-struct sun4m_timer_percpu_info {
-  __volatile__ unsigned int l14_timer_limit;    /* Initial value is 0x009c4000 */
-  __volatile__ unsigned int l14_cur_count;
-
-  /* This register appears to be write only and/or inaccessible
-   * on Uni-Processor sun4m machines.
-   */
-  __volatile__ unsigned int l14_limit_noclear;  /* Data access error is here */
-
-  __volatile__ unsigned int cntrl;            /* =1 after POST on Aurora */
-  __volatile__ unsigned char space[PAGE_SIZE - 16];
-};
-
-struct sun4m_timer_regs {
-	struct sun4m_timer_percpu_info cpu_timers[SUN4M_NCPUS];
-	volatile unsigned int l10_timer_limit;
-	volatile unsigned int l10_cur_count;
-
-	/* Again, this appears to be write only and/or inaccessible
-	 * on uni-processor sun4m machines.
-	 */
-	volatile unsigned int l10_limit_noclear;
-
-	/* This register too, it must be magic. */
-	volatile unsigned int foobar;
-
-	volatile unsigned int cfg;     /* equals zero at boot time... */
-};
-
 #define SUN4D_PRM_CNT_L       0x80000000
 #define SUN4D_PRM_CNT_LVALUE  0x7FFFFC00
 
arch/sparc/kernel/sun4m_irq.c +57 -62

150 lines not on this page · raw message

author maintainer
#6 lore raw
In reply to David Miller

From: Robert Reif <[email protected]>
Date: Sat, 13 Sep 2008 09:07:07 -0400

Quoted 4 lines
Quoted 2 lines · David Miller

Ok, get rid of those patches and try just this one instead.

This one works!

Thanks a lot for testing Robert.