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