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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [uclinux/] [uClinux-2.0.x/] [arch/] [armnommu/] [kernel/] [oldlatches.c] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
/* Support for the latches on the old Archimedes which control the floppy,
2
 * hard disc and printer
3
 *
4
 * (c) David Alan Gilbert 1995/1996
5
 */
6
#include <linux/kernel.h>
7
 
8
#include <asm/io.h>
9
#include <asm/hardware.h>
10
 
11
#ifdef LATCHAADDR
12
/*
13
 * They are static so that everyone who accesses them has to go through here
14
 */
15
static unsigned char LatchACopy;
16
 
17
/* newval=(oldval & ~mask)|newdata */
18
void oldlatch_aupdate(unsigned char mask,unsigned char newdata)
19
{
20
    LatchACopy=(LatchACopy & ~mask)|newdata;
21
    outb(LatchACopy, LATCHAADDR);
22
#ifdef DEBUG
23
    printk("oldlatch_A:0x%2x\n",LatchACopy);
24
#endif
25
 
26
}
27
#endif
28
 
29
#ifdef LATCHBADDR
30
static unsigned char LatchBCopy;
31
 
32
/* newval=(oldval & ~mask)|newdata */
33
void oldlatch_bupdate(unsigned char mask,unsigned char newdata)
34
{
35
    LatchBCopy=(LatchBCopy & ~mask)|newdata;
36
    outb(LatchBCopy, LATCHBADDR);
37
#ifdef DEBUG
38
    printk("oldlatch_B:0x%2x\n",LatchBCopy);
39
#endif
40
}
41
#endif
42
 
43
void oldlatch_init(void)
44
{
45
    printk("oldlatch: init\n");
46
#ifdef LATCHAADDR
47
    oldlatch_aupdate(0xff,0xff);
48
#endif
49
#ifdef LATCHBADDR
50
    oldlatch_bupdate(0xff,0x8); /* Thats no FDC reset...*/
51
#endif
52
    return ;
53
}

powered by: WebSVN 2.1.0

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