Joerg Sonnenberger | 3 Jan 2008 01:32
Picon

Re: mvme68k timecounters.... untested

On Sun, Sep 17, 2006 at 05:16:56PM +0900, Izumi Tsutsui wrote:
> Hmm. pcc_timer_hz2lin() macro should use 0x10000 rather than 65536?
> Anyway, it isn't so important on this change so both are ok for me.

Given that mvme68k is one of the 9 remaining ports without timecounter
support, could you please commit this code? It prefered it is done by
someone who actually knows the hardware.

Joerg

Izumi Tsutsui | 4 Jan 2008 12:17
Picon
Gravatar

Re: mvme68k timecounters.... untested

joerg <at> NetBSD.org wrote:

> On Sun, Sep 17, 2006 at 05:16:56PM +0900, Izumi Tsutsui wrote:
> > Hmm. pcc_timer_hz2lin() macro should use 0x10000 rather than 65536?
> > Anyway, it isn't so important on this change so both are ok for me.
> 
> Given that mvme68k is one of the 9 remaining ports without timecounter
> support, could you please commit this code? It prefered it is done by
> someone who actually knows the hardware.

- we should ask Steve (scw <at> ) first.
- IIRC some sources for old microtime(9) are shared with mvmeppc port
  and in sys/dev/mvme so we should handle it too.

Anyway I'll take a look after I'm back to my home.
---
Izumi Tsutsui

Izumi Tsutsui | 4 Jan 2008 14:54
Picon
Gravatar

Re: mvme68k timecounters.... untested

I wrote:

> - we should ask Steve (scw <at> ) first.
> - IIRC some sources for old microtime(9) are shared with mvmeppc port
>   and in sys/dev/mvme so we should handle it too.
> 
> Anyway I'll take a look after I'm back to my home.

I'm still in my hometown, but I played with the sources via ssh:
---

Index: arch/mvme68k/dev/clock_pcc.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mvme68k/dev/clock_pcc.c,v
retrieving revision 1.16
diff -u -r1.16 clock_pcc.c
--- arch/mvme68k/dev/clock_pcc.c	11 Dec 2005 12:18:17 -0000	1.16
+++ arch/mvme68k/dev/clock_pcc.c	4 Jan 2008 13:46:42 -0000
 <at>  <at>  -48,6 +48,7  <at>  <at> 
 #include <sys/kernel.h>
 #include <sys/systm.h>
 #include <sys/device.h>
+#include <sys/timetc.h>

 #include <machine/psl.h>
 #include <machine/bus.h>
 <at>  <at>  -64,6 +65,7  <at>  <at> 
 	struct device sc_dev;
 	struct clock_attach_args sc_clock_args;
 	u_char sc_clock_lvl;
(Continue reading)

Joerg Sonnenberger | 4 Jan 2008 17:53
Picon

Re: mvme68k timecounters.... untested

On Fri, Jan 04, 2008 at 10:54:13PM +0900, Izumi Tsutsui wrote:
>  <at>  <at>  -75,10 +77,12  <at>  <at> 
>  static int clock_pcc_profintr __P((void *));
>  static int clock_pcc_statintr __P((void *));
>  static void clock_pcc_initclocks __P((void *, int, int));
> -static long clock_pcc_microtime __P((void *));
>  static void clock_pcc_shutdown __P((void *));
> +static uint32_t clock_pcc_getcount(struct timecounter *);

static u_int clock_pcc_getcount(struct timecounter *);
to match the prototype.

>  
>  static struct clock_pcc_softc *clock_pcc_sc;
> +static uint32_t clock_pcc_count;
> +static uint16_t clock_pcc_reload;
>  
>  /* ARGSUSED */
>  int
>  <at>  <at>  -75,10 +77,11  <at>  <at> 
>  static int clock_pcctwo_profintr(void *);
>  static int clock_pcctwo_statintr(void *);
>  static void clock_pcctwo_initclocks(void *, int, int);
> -static long clock_pcctwo_microtime(void *);
>  static void clock_pcctwo_shutdown(void *);
> +static uint32_t clock_pcctwo_getcount(struct timecounter *);

Same here.

>  
(Continue reading)

Steve Woodford | 4 Jan 2008 18:03
Picon

Re: mvme68k timecounters.... untested

On Friday 04 January 2008 16:53:47 Joerg Sonnenberger wrote:

> If you can freely program the frequency and just have a free running
> counter, use as high a frequency as possible. With the two glitches
> above, it is otherwise fine.

To be honest, I can't remember the exact details without digging out the 
hardware docs (which are buried somewhere in the attic). But ISTR the 
counter is driven by a fixed 1uS clock.

Cheers, Steve

Izumi Tsutsui | 5 Jan 2008 14:59
Picon
Gravatar

Re: mvme68k timecounters.... untested

joerg <at> britannica.bec.de wrote:

> > +static uint32_t clock_pcc_getcount(struct timecounter *);
> 
> static u_int clock_pcc_getcount(struct timecounter *);
> to match the prototype.

Ah, okay, fixed. (I should open more windows ;-)

> If you can freely program the frequency and just have a free running
> counter, use as high a frequency as possible.

It also affects hardclock(9) so it should be done in
a separate commit after tested on the real hardware, I think.

Anyway, I'll commit the changes tomorrow.
---
Izumi Tsutsui

Izumi Tsutsui | 7 Jan 2008 16:09
Picon
Gravatar

Re: mvme68k timecounters.... untested

> Anyway, I'll commit the changes tomorrow.

Committed. (sorry I was busy yesterday)
---
Izumi Tsutsui

raph | 20 Jan 2008 01:33
Picon

68040 LC no FPU coud boot netbsd or not ?

I have mvme162lx board (68040 processor NO fpu)
before testing, I would like to know if netbsd 4.0 kernel image are enable to
boot or need recompile with a soft-fpu options ?


Gmane