OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [arch/] [armnommu/] [kernel/] [oldlatches.c] - Diff between revs 1765 and 1782

Only display areas with differences | Details | Blame | View Log

Rev 1765 Rev 1782
/* Support for the latches on the old Archimedes which control the floppy,
/* Support for the latches on the old Archimedes which control the floppy,
 * hard disc and printer
 * hard disc and printer
 *
 *
 * (c) David Alan Gilbert 1995/1996
 * (c) David Alan Gilbert 1995/1996
 */
 */
#include <linux/kernel.h>
#include <linux/kernel.h>
 
 
#include <asm/io.h>
#include <asm/io.h>
#include <asm/hardware.h>
#include <asm/hardware.h>
 
 
#ifdef LATCHAADDR
#ifdef LATCHAADDR
/*
/*
 * They are static so that everyone who accesses them has to go through here
 * They are static so that everyone who accesses them has to go through here
 */
 */
static unsigned char LatchACopy;
static unsigned char LatchACopy;
 
 
/* newval=(oldval & ~mask)|newdata */
/* newval=(oldval & ~mask)|newdata */
void oldlatch_aupdate(unsigned char mask,unsigned char newdata)
void oldlatch_aupdate(unsigned char mask,unsigned char newdata)
{
{
    LatchACopy=(LatchACopy & ~mask)|newdata;
    LatchACopy=(LatchACopy & ~mask)|newdata;
    outb(LatchACopy, LATCHAADDR);
    outb(LatchACopy, LATCHAADDR);
#ifdef DEBUG
#ifdef DEBUG
    printk("oldlatch_A:0x%2x\n",LatchACopy);
    printk("oldlatch_A:0x%2x\n",LatchACopy);
#endif
#endif
 
 
}
}
#endif
#endif
 
 
#ifdef LATCHBADDR
#ifdef LATCHBADDR
static unsigned char LatchBCopy;
static unsigned char LatchBCopy;
 
 
/* newval=(oldval & ~mask)|newdata */
/* newval=(oldval & ~mask)|newdata */
void oldlatch_bupdate(unsigned char mask,unsigned char newdata)
void oldlatch_bupdate(unsigned char mask,unsigned char newdata)
{
{
    LatchBCopy=(LatchBCopy & ~mask)|newdata;
    LatchBCopy=(LatchBCopy & ~mask)|newdata;
    outb(LatchBCopy, LATCHBADDR);
    outb(LatchBCopy, LATCHBADDR);
#ifdef DEBUG
#ifdef DEBUG
    printk("oldlatch_B:0x%2x\n",LatchBCopy);
    printk("oldlatch_B:0x%2x\n",LatchBCopy);
#endif
#endif
}
}
#endif
#endif
 
 
void oldlatch_init(void)
void oldlatch_init(void)
{
{
    printk("oldlatch: init\n");
    printk("oldlatch: init\n");
#ifdef LATCHAADDR
#ifdef LATCHAADDR
    oldlatch_aupdate(0xff,0xff);
    oldlatch_aupdate(0xff,0xff);
#endif
#endif
#ifdef LATCHBADDR
#ifdef LATCHBADDR
    oldlatch_bupdate(0xff,0x8); /* Thats no FDC reset...*/
    oldlatch_bupdate(0xff,0x8); /* Thats no FDC reset...*/
#endif
#endif
    return ;
    return ;
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.