This source file includes following definitions.
- jazz_fd_inb
- jazz_fd_outb
- jazz_fd_enable_dma
- jazz_fd_disable_dma
- jazz_fd_request_dma
- jazz_fd_free_dma
- jazz_fd_clear_dma_ff
- jazz_fd_set_dma_mode
- jazz_fd_set_dma_addr
- jazz_fd_set_dma_count
- jazz_fd_get_dma_residue
- jazz_fd_enable_irq
- jazz_fd_disable_irq
- jazz_fd_cacheflush
- jazz_rtc_read_data
- jazz_rtc_write_data
1
2
3
4
5
6
7
8
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
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 }