Port-vax archive

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

Re: About support for rtVAX300



Johnny Billquist wrote:

> A few questions below, as I have a hard time following what you actually 
> have done...
> 
> On 2013-01-12 23:53, Holm Tiffe wrote:
> >[..]
> >
> >I'm no on that point, weher I should be able to talk with the UART.
> >
> >The machine boots int my (incomplete) scncnprobe().
> >
> >void
> >scncnprobe(struct consdev *cn)
> >{
> >
> >//static  vaddr_t dz_regs;
> >
> >         extern vaddr_t iospace;
> >         vaddr_t * du_base;
> >         int diagcons;
> >         paddr_t ioaddr = 0x20100000;
> >         extern const struct cdevsw scn_cdevsw;
> >
> >         switch(vax_boardtype) {
> >         case VAX_BTYP_RT300:
> >                 diagcons = 0;
> >                 break;
> >         default:
> >                 cn->cn_pri = CN_DEAD;
> >                 return;
> >         }
> >         if (diagcons)
> >                 cn->cn_pri = CN_REMOTE;
> >         else
> >                 cn->cn_pri = CN_NORMAL;
> >         cn->cn_dev = makedev(cdevsw_lookup_major(&scn_cdevsw), diagcons);
> >         du_base = (void *)iospace;
> >         ioaccess(iospace, ioaddr, 1);
> >         du_base[0xc]=0xa;
> >         DELAY(10000);
> >         du_base[0xc]=(u_char)0x42;
> >         DELAY(10000);
> >         __asm("halt");
> >
> >}
> >
> >...and finally halts at bottom.
> >I've used that dz_vsbus.c as example and this is the very first call
> >to my driver.
> >The UART in this moment should be still poper initialized from the ROM
> >code, so writing to this Transmit buffer at 0x2010000c should print out
> >the char 'B'.
> 
> I assume what you see is that it comes to the halt, but nothing is 
> printed on the console, right?
> 
> Check your assignment to iospace in your code... :-)
> (I hope you do understand what you are doing...)
[..]
> 
> Yes, be more careful and observant when you write your code. :-)
> 
>       Johnny

No, I don't really know anymore what I'm doing there.

void
dzcnprobe(struct consdev *cndev)
{
        extern  vaddr_t iospace;
        int diagcons;
        paddr_t ioaddr = 0x200A0000;
        extern const struct cdevsw dz_cdevsw;
 
        switch (vax_boardtype) {
        case VAX_BTYP_410:
        case VAX_BTYP_420:
        case VAX_BTYP_43:
                diagcons = (vax_confdata & 0x20 ? 3 : 0);
                break;

        case VAX_BTYP_46:
        case VAX_BTYP_48:
                diagcons = (vax_confdata & 0x100 ? 3 : 0);
                break;

        case VAX_BTYP_49:
                ioaddr = 0x25000000;
                diagcons = (vax_confdata & 8 ? 3 : 0);
                break;

        case VAX_BTYP_53:
                ioaddr = 0x25000000;
                diagcons = 3;
                break;

        default:
                cndev->cn_pri = CN_DEAD;
                return;
        }
        if (diagcons)
                cndev->cn_pri = CN_REMOTE;
        else
                cndev->cn_pri = CN_NORMAL;
        cndev->cn_dev = makedev(cdevsw_lookup_major(&dz_cdevsw), diagcons);
        dz_regs = iospace;
        dz = (void *)dz_regs;
        ioaccess(iospace, ioaddr, 1);
        dz->csr = 0;    /* Disable scanning until initting is done */
        dz->tcr = (1 << minor(cndev->cn_dev));    /* Turn on xmitter */
        dz->csr = 0x20; /* Turn scanning back on */
}

..and what would be different to that code.
Good to know that you know whats wrong. :-|

Holm
-- 
      Technik Service u. Handel Tiffe, www.tsht.de, Holm Tiffe, 
     Freiberger Straße 42, 09600 Oberschöna, USt-Id: DE253710583
  www.tsht.de, info%tsht.de@localhost, Fax +49 3731 74200, Mobil: 0172 8790 741



Home | Main Index | Thread Index | Old Index