root/arch/mips/kernel/jazz-c.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. jazz_fd_inb
  2. jazz_fd_outb
  3. jazz_fd_enable_dma
  4. jazz_fd_disable_dma
  5. jazz_fd_request_dma
  6. jazz_fd_free_dma
  7. jazz_fd_clear_dma_ff
  8. jazz_fd_set_dma_mode
  9. jazz_fd_set_dma_addr
  10. jazz_fd_set_dma_count
  11. jazz_fd_get_dma_residue
  12. jazz_fd_enable_irq
  13. jazz_fd_disable_irq
  14. jazz_fd_cacheflush
  15. jazz_rtc_read_data
  16. jazz_rtc_write_data

   1 /*
   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)
     /* [previous][next][first][last][top][bottom][index][help] */
  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)
     /* [previous][next][first][last][top][bottom][index][help] */
  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)
     /* [previous][next][first][last][top][bottom][index][help] */
  36 {
  37         vdma_enable(JAZZ_FLOPPY_DMA);
  38 }
  39 
  40 void jazz_fd_disable_dma(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  41 {
  42         vdma_disable(JAZZ_FLOPPY_DMA);
  43 }
  44 
  45 int jazz_fd_request_dma(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  46 {
  47         return 0;
  48 }
  49 
  50 void jazz_fd_free_dma(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  51 {
  52 }
  53 
  54 void jazz_fd_clear_dma_ff(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  55 {
  56 }
  57 
  58 void jazz_fd_set_dma_mode(char mode)
     /* [previous][next][first][last][top][bottom][index][help] */
  59 {
  60         vdma_set_mode(JAZZ_FLOPPY_DMA, mode);
  61 }
  62 
  63 void jazz_fd_set_dma_addr(unsigned int a)
     /* [previous][next][first][last][top][bottom][index][help] */
  64 {
  65         vdma_set_addr(JAZZ_FLOPPY_DMA, vdma_phys2log(PHYSADDR(a)));
  66 }
  67 
  68 void jazz_fd_set_dma_count(unsigned int count)
     /* [previous][next][first][last][top][bottom][index][help] */
  69 {
  70         vdma_set_count(JAZZ_FLOPPY_DMA, count);
  71 }
  72 
  73 int jazz_fd_get_dma_residue(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  74 {
  75         return vdma_get_residue(JAZZ_FLOPPY_DMA);
  76 }
  77 
  78 void jazz_fd_enable_irq(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  79 {
  80 }
  81 
  82 void jazz_fd_disable_irq(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  83 {
  84 }
  85 
  86 void jazz_fd_cacheflush(unsigned char *addr, unsigned int size)
     /* [previous][next][first][last][top][bottom][index][help] */
  87 {
  88         sys_cacheflush((void *)addr, size, DCACHE);
  89 }
  90 
  91 unsigned char jazz_rtc_read_data(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  92 {
  93         return *(char *)JAZZ_RTC_BASE;
  94 }
  95 
  96 void jazz_rtc_write_data(unsigned char data)
     /* [previous][next][first][last][top][bottom][index][help] */
  97 {
  98         *(char *)JAZZ_RTC_BASE = data;
  99 }

/* [previous][next][first][last][top][bottom][index][help] */