[PARPORT] parport init on mips

From: Stefan Schlosser (castla@grmmbl.org)
Date: Fri Oct 25 2002 - 03:37:51 EDT

  • Next message: Juergen Voelkel: "[PARPORT] libieee1284 -> reading ecp data"

    hi,

    anyone out there, who can tell me why this:

    ------------------- snip -------------------------

    if((mem_fd = open("/dev/mem", O_RDWR)) < 0 ) {
            printf("Cant't open /dev/mem\n");
            exit(-1);
    }

    if(( m_pucmem = (unsigned char*)
            mmap(0, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED,
                    mem_fd, (off_t) 0x14010000)) == MAP_FAILED) {
            printf("ERROR while maping memory! \n");
    }

    pu16tmp = (unsigned short*)(m_pucmem+0x5800);
    u16tmp = *pu16tmp;
    *pu16tmp &= 0xfffbf;

    outb(0x0, 0x300c);
    outb(0x35, 0x300a);

    ------------------- snap -------------------------

    ... works in user space, but giving parport_pc.c 0x14010000 with the
    outb's doesn't ?

    thanks in advance

            - stefan

    -- 
     
    *+++*+++*+++*+++*+++*+++*+++*+++*+++*+++*+++*+++*+++*+++*+++*+++*
    good developers don't debug code, they verify correctness ...
    

    -- To unsubscribe, send mail to: linux-parport-request@torque.net -- -- with the single word "unsubscribe" in the body of the message. --



    This archive was generated by hypermail 2b29 : Fri Oct 25 2002 - 03:47:07 EDT