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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uClinux-2.0.x/] [arch/] [mips/] [kernel/] [jazz-c.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
/*
2
 * Jazz specific C parts
3
 *
4
 * This file is subject to the terms and conditions of the GNU General Public
5
 * License.  See the file "COPYING" in the main directory of this archive
6
 * for more details.
7
 *
8
 * Copyright (C) 1995 by Ralf Baechle
9
 */
10
#include <linux/delay.h>
11
 
12
#include <asm/cachectl.h>
13
#include <asm/jazz.h>
14
#include <asm/jazzdma.h>
15
#include <asm/segment.h>
16
 
17
unsigned char jazz_fd_inb(unsigned int port)
18
{
19
        unsigned char c;
20
 
21
        c = *(volatile unsigned char *) port;
22
        udelay(1);
23
 
24
        return c;
25
}
26
 
27
void jazz_fd_outb(unsigned char value, unsigned int port)
28
{
29
        *(volatile unsigned char *) port = value;
30
}
31
 
32
/*
33
 * How to access the floppy DMA functions.
34
 */
35
void jazz_fd_enable_dma(void)
36
{
37
        vdma_enable(JAZZ_FLOPPY_DMA);
38
}
39
 
40
void jazz_fd_disable_dma(void)
41
{
42
        vdma_disable(JAZZ_FLOPPY_DMA);
43
}
44
 
45
int jazz_fd_request_dma(void)
46
{
47
        return 0;
48
}
49
 
50
void jazz_fd_free_dma(void)
51
{
52
}
53
 
54
void jazz_fd_clear_dma_ff(void)
55
{
56
}
57
 
58
void jazz_fd_set_dma_mode(char mode)
59
{
60
        vdma_set_mode(JAZZ_FLOPPY_DMA, mode);
61
}
62
 
63
void jazz_fd_set_dma_addr(unsigned int a)
64
{
65
        vdma_set_addr(JAZZ_FLOPPY_DMA, vdma_phys2log(PHYSADDR(a)));
66
}
67
 
68
void jazz_fd_set_dma_count(unsigned int count)
69
{
70
        vdma_set_count(JAZZ_FLOPPY_DMA, count);
71
}
72
 
73
int jazz_fd_get_dma_residue(void)
74
{
75
        return vdma_get_residue(JAZZ_FLOPPY_DMA);
76
}
77
 
78
void jazz_fd_enable_irq(void)
79
{
80
}
81
 
82
void jazz_fd_disable_irq(void)
83
{
84
}
85
 
86
void jazz_fd_cacheflush(unsigned char *addr, unsigned int size)
87
{
88
        sys_cacheflush((void *)addr, size, DCACHE);
89
}
90
 
91
unsigned char jazz_rtc_read_data(void)
92
{
93
        return *(char *)JAZZ_RTC_BASE;
94
}
95
 
96
void jazz_rtc_write_data(unsigned char data)
97
{
98
        *(char *)JAZZ_RTC_BASE = data;
99
}

powered by: WebSVN 2.1.0

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