/[qemu]/qemu/hw/fdc.c
ViewVC logotype

Diff of /qemu/hw/fdc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by bellard, Sun Nov 7 18:04:02 2004 UTC revision 1.16 by bellard, Sun Dec 19 23:18:01 2004 UTC
# Line 21  Line 21 
21   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22   * THE SOFTWARE.   * THE SOFTWARE.
23   */   */
24    /*
25     * The controller is used in Sun4m systems in a slightly different
26     * way. There are changes in DOR register and DMA is not available.
27     */
28  #include "vl.h"  #include "vl.h"
29    
30  /********************************************************/  /********************************************************/
# Line 90  typedef struct fdrive_t { Line 94  typedef struct fdrive_t {
94      uint8_t ro;               /* Is read-only           */      uint8_t ro;               /* Is read-only           */
95  } fdrive_t;  } fdrive_t;
96    
97    #ifdef TARGET_SPARC
98    #define DMA_read_memory(a,b,c,d)
99    #define DMA_write_memory(a,b,c,d)
100    #define DMA_register_channel(a,b,c)
101    #define DMA_hold_DREQ(a)
102    #define DMA_release_DREQ(a)
103    #define DMA_get_channel_mode(a) (0)
104    #define DMA_schedule(a)
105    #endif
106    
107  static void fd_init (fdrive_t *drv, BlockDriverState *bs)  static void fd_init (fdrive_t *drv, BlockDriverState *bs)
108  {  {
109      /* Drive */      /* Drive */
# Line 455  static void fdctrl_write (void *opaque, Line 469  static void fdctrl_write (void *opaque,
469      }      }
470  }  }
471    
472    static CPUReadMemoryFunc *fdctrl_mem_read[3] = {
473        fdctrl_read,
474        fdctrl_read,
475        fdctrl_read,
476    };
477    
478    static CPUWriteMemoryFunc *fdctrl_mem_write[3] = {
479        fdctrl_write,
480        fdctrl_write,
481        fdctrl_write,
482    };
483    
484  static void fd_change_cb (void *opaque)  static void fd_change_cb (void *opaque)
485  {  {
486      fdrive_t *drv = opaque;      fdrive_t *drv = opaque;
# Line 473  fdctrl_t *fdctrl_init (int irq_lvl, int Line 499  fdctrl_t *fdctrl_init (int irq_lvl, int
499                         BlockDriverState **fds)                         BlockDriverState **fds)
500  {  {
501      fdctrl_t *fdctrl;      fdctrl_t *fdctrl;
502  //    int io_mem;      int io_mem;
503      int i;      int i;
504    
505      FLOPPY_DPRINTF("init controller\n");      FLOPPY_DPRINTF("init controller\n");
# Line 504  fdctrl_t *fdctrl_init (int irq_lvl, int Line 530  fdctrl_t *fdctrl_init (int irq_lvl, int
530      fdctrl_reset(fdctrl, 0);      fdctrl_reset(fdctrl, 0);
531      fdctrl->state = FD_CTRL_ACTIVE;      fdctrl->state = FD_CTRL_ACTIVE;
532      if (mem_mapped) {      if (mem_mapped) {
533          FLOPPY_ERROR("memory mapped floppy not supported by now !\n");          io_mem = cpu_register_io_memory(0, fdctrl_mem_read, fdctrl_mem_write, fdctrl);
534  #if 0          cpu_register_physical_memory(io_base, 0x08, io_mem);
         io_mem = cpu_register_io_memory(0, fdctrl_mem_read, fdctrl_mem_write);  
         cpu_register_physical_memory(base, 0x08, io_mem);  
 #endif  
535      } else {      } else {
536          register_ioport_read(io_base + 0x01, 5, 1, &fdctrl_read, fdctrl);          register_ioport_read(io_base + 0x01, 5, 1, &fdctrl_read, fdctrl);
537          register_ioport_read(io_base + 0x07, 1, 1, &fdctrl_read, fdctrl);          register_ioport_read(io_base + 0x07, 1, 1, &fdctrl_read, fdctrl);

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26