Port-amiga archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: dd miniroot.fs into CF card from non-amiga NetBSD box



On 2017/02/24 0:14, Michael van Elst wrote:
By changing CPU board from 68060 to 68030, errors for wdc0 disappeared.

Looks like the calibration of 'delay()' doesn't work for your board.
Maybe you can catch the dmesg output, a 50MHz 68060 shows here:

Calibrating delay loop... 21/1024 us

Hmm, how can I calibrate it?

(1) decrease the initial value of delaydivisor

amiga/amiga_init.c:

   932          if (machineid & AMIGA_68060)
   933                  delaydivisor = (1024 * 1) / 80; /* 80 MHz 68060 w. BTC */
   935          else if (machineid & AMIGA_68040)
   936                  delaydivisor = (1024 * 3) / 40; /* 40 MHz 68040 */

--->

   933                  delaydivisor = (1024 / 2) / 80; /* 80 MHz 68060 w. BTC */

for example.

or

(2) increase the argument of delay() in calibrate_delay()

dev/clock.c:

   328  static void
   329  calibrate_delay(device_t self)
   330  {
   331          unsigned long t1, t2;
   332          extern u_int32_t delaydivisor;
   333                  /* XXX this should be defined elsewhere */
   334
   335          if (self)
   336                  printf("Calibrating delay loop... ");
   337
   338          do {
   339                  t1 = clk_gettick();
   340                  delay(1024);
   341                  t2 = clk_gettick();
   342          } while (t2 <= t1);
   343          t2 = ((t2 - t1) * 1000000) / (amiga_clk_interval * hz);
   344          delaydivisor = (delaydivisor * t2 + 1023) >> 10;

--->

   338          do {
   339                  t1 = clk_gettick();
   340                  delay(4096);
   341                  t2 = clk_gettick();
   342          } while (t2 <= t1);
   343          t2 = ((t2 - t1) * 1000000) / (amiga_clk_interval * hz);
   344          delaydivisor = (delaydivisor * t2 + 4095) >> 12;

or both?

Timeout errors for ne0 also disappeared. However, unfortunately, ne0
still cannot be usable. If I switch on my A1200 with ne0 inserted, the
machine does not boot. I guess this is a compatibility issue. I ordered
an "easynet pcmcia network card". I hope it will work...

I remember the A1200 "PCMCIA" slot had several issues.

I ordered a known to work (at least on AmigaOS) card. I will test it. If
it fails, I will try the hardware fix suggested by John.

Thanks,
rin


Home | Main Index | Thread Index | Old Index