Revision 5c02c033

b/hw/fdc.c
61 61
#define FD_RESET_SENSEI_COUNT  4   /* Number of sense interrupts on RESET */
62 62

  
63 63
/* Floppy disk drive emulation */
64
typedef enum fdisk_type_t {
64
typedef enum FDiskType {
65 65
    FDRIVE_DISK_288   = 0x01, /* 2.88 MB disk           */
66 66
    FDRIVE_DISK_144   = 0x02, /* 1.44 MB disk           */
67 67
    FDRIVE_DISK_720   = 0x03, /* 720 kB disk            */
68 68
    FDRIVE_DISK_USER  = 0x04, /* User defined geometry  */
69 69
    FDRIVE_DISK_NONE  = 0x05, /* No disk                */
70
} fdisk_type_t;
70
} FDiskType;
71 71

  
72
typedef enum fdrive_type_t {
72
typedef enum FDriveType {
73 73
    FDRIVE_DRV_144  = 0x00,   /* 1.44 MB 3"5 drive      */
74 74
    FDRIVE_DRV_288  = 0x01,   /* 2.88 MB 3"5 drive      */
75 75
    FDRIVE_DRV_120  = 0x02,   /* 1.2  MB 5"25 drive     */
76 76
    FDRIVE_DRV_NONE = 0x03,   /* No drive connected     */
77
} fdrive_type_t;
77
} FDriveType;
78 78

  
79
typedef enum fdisk_flags_t {
79
typedef enum FDiskFlags {
80 80
    FDISK_DBL_SIDES  = 0x01,
81
} fdisk_flags_t;
81
} FDiskFlags;
82 82

  
83
typedef struct fdrive_t {
83
typedef struct FDrive {
84 84
    DriveInfo *dinfo;
85 85
    BlockDriverState *bs;
86 86
    /* Drive status */
87
    fdrive_type_t drive;
87
    FDriveType drive;
88 88
    uint8_t perpendicular;    /* 2.88 MB access mode    */
89 89
    /* Position */
90 90
    uint8_t head;
91 91
    uint8_t track;
92 92
    uint8_t sect;
93 93
    /* Media */
94
    fdisk_flags_t flags;
94
    FDiskFlags flags;
95 95
    uint8_t last_sect;        /* Nb sector per track    */
96 96
    uint8_t max_track;        /* Nb of tracks           */
97 97
    uint16_t bps;             /* Bytes per sector       */
98 98
    uint8_t ro;               /* Is read-only           */
99
} fdrive_t;
99
} FDrive;
100 100

  
101
static void fd_init (fdrive_t *drv)
101
static void fd_init(FDrive *drv)
102 102
{
103 103
    /* Drive */
104 104
    drv->bs = drv->dinfo ? drv->dinfo->bdrv : NULL;
......
116 116
}
117 117

  
118 118
/* Returns current position, in sectors, for given drive */
119
static int fd_sector (fdrive_t *drv)
119
static int fd_sector(FDrive *drv)
120 120
{
121 121
    return _fd_sector(drv->head, drv->track, drv->sect, drv->last_sect);
122 122
}
......
128 128
 * returns 3 if sector is invalid
129 129
 * returns 4 if seek is disabled
130 130
 */
131
static int fd_seek (fdrive_t *drv, uint8_t head, uint8_t track, uint8_t sect,
132
                    int enable_seek)
131
static int fd_seek(FDrive *drv, uint8_t head, uint8_t track, uint8_t sect,
132
                   int enable_seek)
133 133
{
134 134
    uint32_t sector;
135 135
    int ret;
......
170 170
}
171 171

  
172 172
/* Set drive back to track 0 */
173
static void fd_recalibrate (fdrive_t *drv)
173
static void fd_recalibrate(FDrive *drv)
174 174
{
175 175
    FLOPPY_DPRINTF("recalibrate\n");
176 176
    drv->head = 0;
......
179 179
}
180 180

  
181 181
/* Recognize floppy formats */
182
typedef struct fd_format_t {
183
    fdrive_type_t drive;
184
    fdisk_type_t  disk;
182
typedef struct FDFormat {
183
    FDriveType drive;
184
    FDiskType  disk;
185 185
    uint8_t last_sect;
186 186
    uint8_t max_track;
187 187
    uint8_t max_head;
188 188
    const char *str;
189
} fd_format_t;
189
} FDFormat;
190 190

  
191
static const fd_format_t fd_formats[] = {
191
static const FDFormat fd_formats[] = {
192 192
    /* First entry is default format */
193 193
    /* 1.44 MB 3"1/2 floppy disks */
194 194
    { FDRIVE_DRV_144, FDRIVE_DISK_144, 18, 80, 1, "1.44 MB 3\"1/2", },
......
236 236
};
237 237

  
238 238
/* Revalidate a disk drive after a disk change */
239
static void fd_revalidate (fdrive_t *drv)
239
static void fd_revalidate(FDrive *drv)
240 240
{
241
    const fd_format_t *parse;
241
    const FDFormat *parse;
242 242
    uint64_t nb_sectors, size;
243 243
    int i, first_match, match;
244 244
    int nb_heads, max_track, last_sect, ro;
......
303 303
/********************************************************/
304 304
/* Intel 82078 floppy disk controller emulation          */
305 305

  
306
static void fdctrl_reset (fdctrl_t *fdctrl, int do_irq);
307
static void fdctrl_reset_fifo (fdctrl_t *fdctrl);
306
static void fdctrl_reset(FDCtrl *fdctrl, int do_irq);
307
static void fdctrl_reset_fifo(FDCtrl *fdctrl);
308 308
static int fdctrl_transfer_handler (void *opaque, int nchan,
309 309
                                    int dma_pos, int dma_len);
310
static void fdctrl_raise_irq (fdctrl_t *fdctrl, uint8_t status0);
311

  
312
static uint32_t fdctrl_read_statusA (fdctrl_t *fdctrl);
313
static uint32_t fdctrl_read_statusB (fdctrl_t *fdctrl);
314
static uint32_t fdctrl_read_dor (fdctrl_t *fdctrl);
315
static void fdctrl_write_dor (fdctrl_t *fdctrl, uint32_t value);
316
static uint32_t fdctrl_read_tape (fdctrl_t *fdctrl);
317
static void fdctrl_write_tape (fdctrl_t *fdctrl, uint32_t value);
318
static uint32_t fdctrl_read_main_status (fdctrl_t *fdctrl);
319
static void fdctrl_write_rate (fdctrl_t *fdctrl, uint32_t value);
320
static uint32_t fdctrl_read_data (fdctrl_t *fdctrl);
321
static void fdctrl_write_data (fdctrl_t *fdctrl, uint32_t value);
322
static uint32_t fdctrl_read_dir (fdctrl_t *fdctrl);
310
static void fdctrl_raise_irq(FDCtrl *fdctrl, uint8_t status0);
311

  
312
static uint32_t fdctrl_read_statusA(FDCtrl *fdctrl);
313
static uint32_t fdctrl_read_statusB(FDCtrl *fdctrl);
314
static uint32_t fdctrl_read_dor(FDCtrl *fdctrl);
315
static void fdctrl_write_dor(FDCtrl *fdctrl, uint32_t value);
316
static uint32_t fdctrl_read_tape(FDCtrl *fdctrl);
317
static void fdctrl_write_tape(FDCtrl *fdctrl, uint32_t value);
318
static uint32_t fdctrl_read_main_status(FDCtrl *fdctrl);
319
static void fdctrl_write_rate(FDCtrl *fdctrl, uint32_t value);
320
static uint32_t fdctrl_read_data(FDCtrl *fdctrl);
321
static void fdctrl_write_data(FDCtrl *fdctrl, uint32_t value);
322
static uint32_t fdctrl_read_dir(FDCtrl *fdctrl);
323 323

  
324 324
enum {
325 325
    FD_DIR_WRITE   = 0,
......
471 471
#define FD_DID_SEEK(state) ((state) & FD_STATE_SEEK)
472 472
#define FD_FORMAT_CMD(state) ((state) & FD_STATE_FORMAT)
473 473

  
474
struct fdctrl_t {
474
struct FDCtrl {
475 475
    /* Controller's identification */
476 476
    uint8_t version;
477 477
    /* HW */
......
512 512
    int sun4m;
513 513
    /* Floppy drives */
514 514
    uint8_t num_floppies;
515
    fdrive_t drives[MAX_FD];
515
    FDrive drives[MAX_FD];
516 516
    int reset_sensei;
517 517
};
518 518

  
519
typedef struct fdctrl_sysbus_t {
519
typedef struct FDCtrlSysBus {
520 520
    SysBusDevice busdev;
521
    struct fdctrl_t state;
522
} fdctrl_sysbus_t;
521
    struct FDCtrl state;
522
} FDCtrlSysBus;
523 523

  
524
typedef struct fdctrl_isabus_t {
524
typedef struct FDCtrlISABus {
525 525
    ISADevice busdev;
526
    struct fdctrl_t state;
527
} fdctrl_isabus_t;
526
    struct FDCtrl state;
527
} FDCtrlISABus;
528 528

  
529 529
static uint32_t fdctrl_read (void *opaque, uint32_t reg)
530 530
{
531
    fdctrl_t *fdctrl = opaque;
531
    FDCtrl *fdctrl = opaque;
532 532
    uint32_t retval;
533 533

  
534 534
    switch (reg) {
......
564 564

  
565 565
static void fdctrl_write (void *opaque, uint32_t reg, uint32_t value)
566 566
{
567
    fdctrl_t *fdctrl = opaque;
567
    FDCtrl *fdctrl = opaque;
568 568

  
569 569
    FLOPPY_DPRINTF("write reg%d: 0x%02x\n", reg & 7, value);
570 570

  
......
637 637
    .minimum_version_id = 1,
638 638
    .minimum_version_id_old = 1,
639 639
    .fields      = (VMStateField []) {
640
        VMSTATE_UINT8(head, fdrive_t),
641
        VMSTATE_UINT8(track, fdrive_t),
642
        VMSTATE_UINT8(sect, fdrive_t),
640
        VMSTATE_UINT8(head, FDrive),
641
        VMSTATE_UINT8(track, FDrive),
642
        VMSTATE_UINT8(sect, FDrive),
643 643
        VMSTATE_END_OF_LIST()
644 644
    }
645 645
};
646 646

  
647 647
static void fdc_pre_save(void *opaque)
648 648
{
649
    fdctrl_t *s = opaque;
649
    FDCtrl *s = opaque;
650 650

  
651 651
    s->dor_vmstate = s->dor | GET_CUR_DRV(s);
652 652
}
653 653

  
654 654
static int fdc_post_load(void *opaque, int version_id)
655 655
{
656
    fdctrl_t *s = opaque;
656
    FDCtrl *s = opaque;
657 657

  
658 658
    SET_CUR_DRV(s, s->dor_vmstate & FD_DOR_SELMASK);
659 659
    s->dor = s->dor_vmstate & ~FD_DOR_SELMASK;
......
669 669
    .post_load = fdc_post_load,
670 670
    .fields      = (VMStateField []) {
671 671
        /* Controller State */
672
        VMSTATE_UINT8(sra, fdctrl_t),
673
        VMSTATE_UINT8(srb, fdctrl_t),
674
        VMSTATE_UINT8(dor_vmstate, fdctrl_t),
675
        VMSTATE_UINT8(tdr, fdctrl_t),
676
        VMSTATE_UINT8(dsr, fdctrl_t),
677
        VMSTATE_UINT8(msr, fdctrl_t),
678
        VMSTATE_UINT8(status0, fdctrl_t),
679
        VMSTATE_UINT8(status1, fdctrl_t),
680
        VMSTATE_UINT8(status2, fdctrl_t),
672
        VMSTATE_UINT8(sra, FDCtrl),
673
        VMSTATE_UINT8(srb, FDCtrl),
674
        VMSTATE_UINT8(dor_vmstate, FDCtrl),
675
        VMSTATE_UINT8(tdr, FDCtrl),
676
        VMSTATE_UINT8(dsr, FDCtrl),
677
        VMSTATE_UINT8(msr, FDCtrl),
678
        VMSTATE_UINT8(status0, FDCtrl),
679
        VMSTATE_UINT8(status1, FDCtrl),
680
        VMSTATE_UINT8(status2, FDCtrl),
681 681
        /* Command FIFO */
682
        VMSTATE_VARRAY_INT32(fifo, fdctrl_t, fifo_size, 0, vmstate_info_uint8, uint8),
683
        VMSTATE_UINT32(data_pos, fdctrl_t),
684
        VMSTATE_UINT32(data_len, fdctrl_t),
685
        VMSTATE_UINT8(data_state, fdctrl_t),
686
        VMSTATE_UINT8(data_dir, fdctrl_t),
687
        VMSTATE_UINT8(eot, fdctrl_t),
682
        VMSTATE_VARRAY_INT32(fifo, FDCtrl, fifo_size, 0, vmstate_info_uint8, uint8),
683
        VMSTATE_UINT32(data_pos, FDCtrl),
684
        VMSTATE_UINT32(data_len, FDCtrl),
685
        VMSTATE_UINT8(data_state, FDCtrl),
686
        VMSTATE_UINT8(data_dir, FDCtrl),
687
        VMSTATE_UINT8(eot, FDCtrl),
688 688
        /* States kept only to be returned back */
689
        VMSTATE_UINT8(timer0, fdctrl_t),
690
        VMSTATE_UINT8(timer1, fdctrl_t),
691
        VMSTATE_UINT8(precomp_trk, fdctrl_t),
692
        VMSTATE_UINT8(config, fdctrl_t),
693
        VMSTATE_UINT8(lock, fdctrl_t),
694
        VMSTATE_UINT8(pwrd, fdctrl_t),
695
        VMSTATE_UINT8_EQUAL(num_floppies, fdctrl_t),
696
        VMSTATE_STRUCT_ARRAY(drives, fdctrl_t, MAX_FD, 1,
697
                             vmstate_fdrive, fdrive_t),
689
        VMSTATE_UINT8(timer0, FDCtrl),
690
        VMSTATE_UINT8(timer1, FDCtrl),
691
        VMSTATE_UINT8(precomp_trk, FDCtrl),
692
        VMSTATE_UINT8(config, FDCtrl),
693
        VMSTATE_UINT8(lock, FDCtrl),
694
        VMSTATE_UINT8(pwrd, FDCtrl),
695
        VMSTATE_UINT8_EQUAL(num_floppies, FDCtrl),
696
        VMSTATE_STRUCT_ARRAY(drives, FDCtrl, MAX_FD, 1,
697
                             vmstate_fdrive, FDrive),
698 698
        VMSTATE_END_OF_LIST()
699 699
    }
700 700
};
701 701

  
702 702
static void fdctrl_external_reset_sysbus(DeviceState *d)
703 703
{
704
    fdctrl_sysbus_t *sys = container_of(d, fdctrl_sysbus_t, busdev.qdev);
705
    fdctrl_t *s = &sys->state;
704
    FDCtrlSysBus *sys = container_of(d, FDCtrlSysBus, busdev.qdev);
705
    FDCtrl *s = &sys->state;
706 706

  
707 707
    fdctrl_reset(s, 0);
708 708
}
709 709

  
710 710
static void fdctrl_external_reset_isa(DeviceState *d)
711 711
{
712
    fdctrl_isabus_t *isa = container_of(d, fdctrl_isabus_t, busdev.qdev);
713
    fdctrl_t *s = &isa->state;
712
    FDCtrlISABus *isa = container_of(d, FDCtrlISABus, busdev.qdev);
713
    FDCtrl *s = &isa->state;
714 714

  
715 715
    fdctrl_reset(s, 0);
716 716
}
717 717

  
718 718
static void fdctrl_handle_tc(void *opaque, int irq, int level)
719 719
{
720
    //fdctrl_t *s = opaque;
720
    //FDCtrl *s = opaque;
721 721

  
722 722
    if (level) {
723 723
        // XXX
......
726 726
}
727 727

  
728 728
/* XXX: may change if moved to bdrv */
729
int fdctrl_get_drive_type(fdctrl_t *fdctrl, int drive_num)
729
int fdctrl_get_drive_type(FDCtrl *fdctrl, int drive_num)
730 730
{
731 731
    return fdctrl->drives[drive_num].drive;
732 732
}
733 733

  
734 734
/* Change IRQ state */
735
static void fdctrl_reset_irq (fdctrl_t *fdctrl)
735
static void fdctrl_reset_irq(FDCtrl *fdctrl)
736 736
{
737 737
    if (!(fdctrl->sra & FD_SRA_INTPEND))
738 738
        return;
......
741 741
    fdctrl->sra &= ~FD_SRA_INTPEND;
742 742
}
743 743

  
744
static void fdctrl_raise_irq (fdctrl_t *fdctrl, uint8_t status0)
744
static void fdctrl_raise_irq(FDCtrl *fdctrl, uint8_t status0)
745 745
{
746 746
    /* Sparc mutation */
747 747
    if (fdctrl->sun4m && (fdctrl->msr & FD_MSR_CMDBUSY)) {
......
761 761
}
762 762

  
763 763
/* Reset controller */
764
static void fdctrl_reset (fdctrl_t *fdctrl, int do_irq)
764
static void fdctrl_reset(FDCtrl *fdctrl, int do_irq)
765 765
{
766 766
    int i;
767 767

  
......
790 790
    }
791 791
}
792 792

  
793
static inline fdrive_t *drv0 (fdctrl_t *fdctrl)
793
static inline FDrive *drv0(FDCtrl *fdctrl)
794 794
{
795 795
    return &fdctrl->drives[(fdctrl->tdr & FD_TDR_BOOTSEL) >> 2];
796 796
}
797 797

  
798
static inline fdrive_t *drv1 (fdctrl_t *fdctrl)
798
static inline FDrive *drv1(FDCtrl *fdctrl)
799 799
{
800 800
    if ((fdctrl->tdr & FD_TDR_BOOTSEL) < (1 << 2))
801 801
        return &fdctrl->drives[1];
......
804 804
}
805 805

  
806 806
#if MAX_FD == 4
807
static inline fdrive_t *drv2 (fdctrl_t *fdctrl)
807
static inline FDrive *drv2(FDCtrl *fdctrl)
808 808
{
809 809
    if ((fdctrl->tdr & FD_TDR_BOOTSEL) < (2 << 2))
810 810
        return &fdctrl->drives[2];
......
812 812
        return &fdctrl->drives[1];
813 813
}
814 814

  
815
static inline fdrive_t *drv3 (fdctrl_t *fdctrl)
815
static inline FDrive *drv3(FDCtrl *fdctrl)
816 816
{
817 817
    if ((fdctrl->tdr & FD_TDR_BOOTSEL) < (3 << 2))
818 818
        return &fdctrl->drives[3];
......
821 821
}
822 822
#endif
823 823

  
824
static fdrive_t *get_cur_drv (fdctrl_t *fdctrl)
824
static FDrive *get_cur_drv(FDCtrl *fdctrl)
825 825
{
826 826
    switch (fdctrl->cur_drv) {
827 827
        case 0: return drv0(fdctrl);
......
835 835
}
836 836

  
837 837
/* Status A register : 0x00 (read-only) */
838
static uint32_t fdctrl_read_statusA (fdctrl_t *fdctrl)
838
static uint32_t fdctrl_read_statusA(FDCtrl *fdctrl)
839 839
{
840 840
    uint32_t retval = fdctrl->sra;
841 841

  
......
845 845
}
846 846

  
847 847
/* Status B register : 0x01 (read-only) */
848
static uint32_t fdctrl_read_statusB (fdctrl_t *fdctrl)
848
static uint32_t fdctrl_read_statusB(FDCtrl *fdctrl)
849 849
{
850 850
    uint32_t retval = fdctrl->srb;
851 851

  
......
855 855
}
856 856

  
857 857
/* Digital output register : 0x02 */
858
static uint32_t fdctrl_read_dor (fdctrl_t *fdctrl)
858
static uint32_t fdctrl_read_dor(FDCtrl *fdctrl)
859 859
{
860 860
    uint32_t retval = fdctrl->dor;
861 861

  
......
866 866
    return retval;
867 867
}
868 868

  
869
static void fdctrl_write_dor (fdctrl_t *fdctrl, uint32_t value)
869
static void fdctrl_write_dor(FDCtrl *fdctrl, uint32_t value)
870 870
{
871 871
    FLOPPY_DPRINTF("digital output register set to 0x%02x\n", value);
872 872

  
......
905 905
}
906 906

  
907 907
/* Tape drive register : 0x03 */
908
static uint32_t fdctrl_read_tape (fdctrl_t *fdctrl)
908
static uint32_t fdctrl_read_tape(FDCtrl *fdctrl)
909 909
{
910 910
    uint32_t retval = fdctrl->tdr;
911 911

  
......
914 914
    return retval;
915 915
}
916 916

  
917
static void fdctrl_write_tape (fdctrl_t *fdctrl, uint32_t value)
917
static void fdctrl_write_tape(FDCtrl *fdctrl, uint32_t value)
918 918
{
919 919
    /* Reset mode */
920 920
    if (!(fdctrl->dor & FD_DOR_nRESET)) {
......
928 928
}
929 929

  
930 930
/* Main status register : 0x04 (read) */
931
static uint32_t fdctrl_read_main_status (fdctrl_t *fdctrl)
931
static uint32_t fdctrl_read_main_status(FDCtrl *fdctrl)
932 932
{
933 933
    uint32_t retval = fdctrl->msr;
934 934

  
......
947 947
}
948 948

  
949 949
/* Data select rate register : 0x04 (write) */
950
static void fdctrl_write_rate (fdctrl_t *fdctrl, uint32_t value)
950
static void fdctrl_write_rate(FDCtrl *fdctrl, uint32_t value)
951 951
{
952 952
    /* Reset mode */
953 953
    if (!(fdctrl->dor & FD_DOR_nRESET)) {
......
967 967
    fdctrl->dsr = value;
968 968
}
969 969

  
970
static int fdctrl_media_changed(fdrive_t *drv)
970
static int fdctrl_media_changed(FDrive *drv)
971 971
{
972 972
    int ret;
973 973

  
......
981 981
}
982 982

  
983 983
/* Digital input register : 0x07 (read-only) */
984
static uint32_t fdctrl_read_dir (fdctrl_t *fdctrl)
984
static uint32_t fdctrl_read_dir(FDCtrl *fdctrl)
985 985
{
986 986
    uint32_t retval = 0;
987 987

  
......
1000 1000
}
1001 1001

  
1002 1002
/* FIFO state control */
1003
static void fdctrl_reset_fifo (fdctrl_t *fdctrl)
1003
static void fdctrl_reset_fifo(FDCtrl *fdctrl)
1004 1004
{
1005 1005
    fdctrl->data_dir = FD_DIR_WRITE;
1006 1006
    fdctrl->data_pos = 0;
......
1008 1008
}
1009 1009

  
1010 1010
/* Set FIFO status for the host to read */
1011
static void fdctrl_set_fifo (fdctrl_t *fdctrl, int fifo_len, int do_irq)
1011
static void fdctrl_set_fifo(FDCtrl *fdctrl, int fifo_len, int do_irq)
1012 1012
{
1013 1013
    fdctrl->data_dir = FD_DIR_READ;
1014 1014
    fdctrl->data_len = fifo_len;
......
1019 1019
}
1020 1020

  
1021 1021
/* Set an error: unimplemented/unknown command */
1022
static void fdctrl_unimplemented (fdctrl_t *fdctrl, int direction)
1022
static void fdctrl_unimplemented(FDCtrl *fdctrl, int direction)
1023 1023
{
1024 1024
    FLOPPY_ERROR("unimplemented command 0x%02x\n", fdctrl->fifo[0]);
1025 1025
    fdctrl->fifo[0] = FD_SR0_INVCMD;
......
1027 1027
}
1028 1028

  
1029 1029
/* Seek to next sector */
1030
static int fdctrl_seek_to_next_sect (fdctrl_t *fdctrl, fdrive_t *cur_drv)
1030
static int fdctrl_seek_to_next_sect(FDCtrl *fdctrl, FDrive *cur_drv)
1031 1031
{
1032 1032
    FLOPPY_DPRINTF("seek to next sector (%d %02x %02x => %d)\n",
1033 1033
                   cur_drv->head, cur_drv->track, cur_drv->sect,
......
1061 1061
}
1062 1062

  
1063 1063
/* Callback for transfer end (stop or abort) */
1064
static void fdctrl_stop_transfer (fdctrl_t *fdctrl, uint8_t status0,
1065
                                  uint8_t status1, uint8_t status2)
1064
static void fdctrl_stop_transfer(FDCtrl *fdctrl, uint8_t status0,
1065
                                 uint8_t status1, uint8_t status2)
1066 1066
{
1067
    fdrive_t *cur_drv;
1067
    FDrive *cur_drv;
1068 1068

  
1069 1069
    cur_drv = get_cur_drv(fdctrl);
1070 1070
    FLOPPY_DPRINTF("transfer status: %02x %02x %02x (%02x)\n",
......
1087 1087
}
1088 1088

  
1089 1089
/* Prepare a data transfer (either DMA or FIFO) */
1090
static void fdctrl_start_transfer (fdctrl_t *fdctrl, int direction)
1090
static void fdctrl_start_transfer(FDCtrl *fdctrl, int direction)
1091 1091
{
1092
    fdrive_t *cur_drv;
1092
    FDrive *cur_drv;
1093 1093
    uint8_t kh, kt, ks;
1094 1094
    int did_seek = 0;
1095 1095

  
......
1189 1189
}
1190 1190

  
1191 1191
/* Prepare a transfer of deleted data */
1192
static void fdctrl_start_transfer_del (fdctrl_t *fdctrl, int direction)
1192
static void fdctrl_start_transfer_del(FDCtrl *fdctrl, int direction)
1193 1193
{
1194 1194
    FLOPPY_ERROR("fdctrl_start_transfer_del() unimplemented\n");
1195 1195

  
......
1203 1203
static int fdctrl_transfer_handler (void *opaque, int nchan,
1204 1204
                                    int dma_pos, int dma_len)
1205 1205
{
1206
    fdctrl_t *fdctrl;
1207
    fdrive_t *cur_drv;
1206
    FDCtrl *fdctrl;
1207
    FDrive *cur_drv;
1208 1208
    int len, start_pos, rel_pos;
1209 1209
    uint8_t status0 = 0x00, status1 = 0x00, status2 = 0x00;
1210 1210

  
......
1310 1310
}
1311 1311

  
1312 1312
/* Data register : 0x05 */
1313
static uint32_t fdctrl_read_data (fdctrl_t *fdctrl)
1313
static uint32_t fdctrl_read_data(FDCtrl *fdctrl)
1314 1314
{
1315
    fdrive_t *cur_drv;
1315
    FDrive *cur_drv;
1316 1316
    uint32_t retval = 0;
1317 1317
    int pos;
1318 1318

  
......
1358 1358
    return retval;
1359 1359
}
1360 1360

  
1361
static void fdctrl_format_sector (fdctrl_t *fdctrl)
1361
static void fdctrl_format_sector(FDCtrl *fdctrl)
1362 1362
{
1363
    fdrive_t *cur_drv;
1363
    FDrive *cur_drv;
1364 1364
    uint8_t kh, kt, ks;
1365 1365

  
1366 1366
    SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK);
......
1420 1420
    }
1421 1421
}
1422 1422

  
1423
static void fdctrl_handle_lock (fdctrl_t *fdctrl, int direction)
1423
static void fdctrl_handle_lock(FDCtrl *fdctrl, int direction)
1424 1424
{
1425 1425
    fdctrl->lock = (fdctrl->fifo[0] & 0x80) ? 1 : 0;
1426 1426
    fdctrl->fifo[0] = fdctrl->lock << 4;
1427 1427
    fdctrl_set_fifo(fdctrl, 1, fdctrl->lock);
1428 1428
}
1429 1429

  
1430
static void fdctrl_handle_dumpreg (fdctrl_t *fdctrl, int direction)
1430
static void fdctrl_handle_dumpreg(FDCtrl *fdctrl, int direction)
1431 1431
{
1432
    fdrive_t *cur_drv = get_cur_drv(fdctrl);
1432
    FDrive *cur_drv = get_cur_drv(fdctrl);
1433 1433

  
1434 1434
    /* Drives position */
1435 1435
    fdctrl->fifo[0] = drv0(fdctrl)->track;
......
1452 1452
    fdctrl_set_fifo(fdctrl, 10, 0);
1453 1453
}
1454 1454

  
1455
static void fdctrl_handle_version (fdctrl_t *fdctrl, int direction)
1455
static void fdctrl_handle_version(FDCtrl *fdctrl, int direction)
1456 1456
{
1457 1457
    /* Controller's version */
1458 1458
    fdctrl->fifo[0] = fdctrl->version;
1459 1459
    fdctrl_set_fifo(fdctrl, 1, 1);
1460 1460
}
1461 1461

  
1462
static void fdctrl_handle_partid (fdctrl_t *fdctrl, int direction)
1462
static void fdctrl_handle_partid(FDCtrl *fdctrl, int direction)
1463 1463
{
1464 1464
    fdctrl->fifo[0] = 0x41; /* Stepping 1 */
1465 1465
    fdctrl_set_fifo(fdctrl, 1, 0);
1466 1466
}
1467 1467

  
1468
static void fdctrl_handle_restore (fdctrl_t *fdctrl, int direction)
1468
static void fdctrl_handle_restore(FDCtrl *fdctrl, int direction)
1469 1469
{
1470
    fdrive_t *cur_drv = get_cur_drv(fdctrl);
1470
    FDrive *cur_drv = get_cur_drv(fdctrl);
1471 1471

  
1472 1472
    /* Drives position */
1473 1473
    drv0(fdctrl)->track = fdctrl->fifo[3];
......
1488 1488
    fdctrl_reset_fifo(fdctrl);
1489 1489
}
1490 1490

  
1491
static void fdctrl_handle_save (fdctrl_t *fdctrl, int direction)
1491
static void fdctrl_handle_save(FDCtrl *fdctrl, int direction)
1492 1492
{
1493
    fdrive_t *cur_drv = get_cur_drv(fdctrl);
1493
    FDrive *cur_drv = get_cur_drv(fdctrl);
1494 1494

  
1495 1495
    fdctrl->fifo[0] = 0;
1496 1496
    fdctrl->fifo[1] = 0;
......
1518 1518
    fdctrl_set_fifo(fdctrl, 15, 1);
1519 1519
}
1520 1520

  
1521
static void fdctrl_handle_readid (fdctrl_t *fdctrl, int direction)
1521
static void fdctrl_handle_readid(FDCtrl *fdctrl, int direction)
1522 1522
{
1523
    fdrive_t *cur_drv = get_cur_drv(fdctrl);
1523
    FDrive *cur_drv = get_cur_drv(fdctrl);
1524 1524

  
1525 1525
    /* XXX: should set main status register to busy */
1526 1526
    cur_drv->head = (fdctrl->fifo[1] >> 2) & 1;
......
1528 1528
                   qemu_get_clock(vm_clock) + (get_ticks_per_sec() / 50));
1529 1529
}
1530 1530

  
1531
static void fdctrl_handle_format_track (fdctrl_t *fdctrl, int direction)
1531
static void fdctrl_handle_format_track(FDCtrl *fdctrl, int direction)
1532 1532
{
1533
    fdrive_t *cur_drv;
1533
    FDrive *cur_drv;
1534 1534

  
1535 1535
    SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK);
1536 1536
    cur_drv = get_cur_drv(fdctrl);
......
1557 1557
    fdctrl_stop_transfer(fdctrl, 0x00, 0x00, 0x00);
1558 1558
}
1559 1559

  
1560
static void fdctrl_handle_specify (fdctrl_t *fdctrl, int direction)
1560
static void fdctrl_handle_specify(FDCtrl *fdctrl, int direction)
1561 1561
{
1562 1562
    fdctrl->timer0 = (fdctrl->fifo[1] >> 4) & 0xF;
1563 1563
    fdctrl->timer1 = fdctrl->fifo[2] >> 1;
......
1569 1569
    fdctrl_reset_fifo(fdctrl);
1570 1570
}
1571 1571

  
1572
static void fdctrl_handle_sense_drive_status (fdctrl_t *fdctrl, int direction)
1572
static void fdctrl_handle_sense_drive_status(FDCtrl *fdctrl, int direction)
1573 1573
{
1574
    fdrive_t *cur_drv;
1574
    FDrive *cur_drv;
1575 1575

  
1576 1576
    SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK);
1577 1577
    cur_drv = get_cur_drv(fdctrl);
......
1585 1585
    fdctrl_set_fifo(fdctrl, 1, 0);
1586 1586
}
1587 1587

  
1588
static void fdctrl_handle_recalibrate (fdctrl_t *fdctrl, int direction)
1588
static void fdctrl_handle_recalibrate(FDCtrl *fdctrl, int direction)
1589 1589
{
1590
    fdrive_t *cur_drv;
1590
    FDrive *cur_drv;
1591 1591

  
1592 1592
    SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK);
1593 1593
    cur_drv = get_cur_drv(fdctrl);
......
1597 1597
    fdctrl_raise_irq(fdctrl, FD_SR0_SEEK);
1598 1598
}
1599 1599

  
1600
static void fdctrl_handle_sense_interrupt_status (fdctrl_t *fdctrl, int direction)
1600
static void fdctrl_handle_sense_interrupt_status(FDCtrl *fdctrl, int direction)
1601 1601
{
1602
    fdrive_t *cur_drv = get_cur_drv(fdctrl);
1602
    FDrive *cur_drv = get_cur_drv(fdctrl);
1603 1603

  
1604 1604
    if(fdctrl->reset_sensei > 0) {
1605 1605
        fdctrl->fifo[0] =
......
1619 1619
    fdctrl->status0 = FD_SR0_RDYCHG;
1620 1620
}
1621 1621

  
1622
static void fdctrl_handle_seek (fdctrl_t *fdctrl, int direction)
1622
static void fdctrl_handle_seek(FDCtrl *fdctrl, int direction)
1623 1623
{
1624
    fdrive_t *cur_drv;
1624
    FDrive *cur_drv;
1625 1625

  
1626 1626
    SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK);
1627 1627
    cur_drv = get_cur_drv(fdctrl);
......
1635 1635
    }
1636 1636
}
1637 1637

  
1638
static void fdctrl_handle_perpendicular_mode (fdctrl_t *fdctrl, int direction)
1638
static void fdctrl_handle_perpendicular_mode(FDCtrl *fdctrl, int direction)
1639 1639
{
1640
    fdrive_t *cur_drv = get_cur_drv(fdctrl);
1640
    FDrive *cur_drv = get_cur_drv(fdctrl);
1641 1641

  
1642 1642
    if (fdctrl->fifo[1] & 0x80)
1643 1643
        cur_drv->perpendicular = fdctrl->fifo[1] & 0x7;
......
1645 1645
    fdctrl_reset_fifo(fdctrl);
1646 1646
}
1647 1647

  
1648
static void fdctrl_handle_configure (fdctrl_t *fdctrl, int direction)
1648
static void fdctrl_handle_configure(FDCtrl *fdctrl, int direction)
1649 1649
{
1650 1650
    fdctrl->config = fdctrl->fifo[2];
1651 1651
    fdctrl->precomp_trk =  fdctrl->fifo[3];
......
1653 1653
    fdctrl_reset_fifo(fdctrl);
1654 1654
}
1655 1655

  
1656
static void fdctrl_handle_powerdown_mode (fdctrl_t *fdctrl, int direction)
1656
static void fdctrl_handle_powerdown_mode(FDCtrl *fdctrl, int direction)
1657 1657
{
1658 1658
    fdctrl->pwrd = fdctrl->fifo[1];
1659 1659
    fdctrl->fifo[0] = fdctrl->fifo[1];
1660 1660
    fdctrl_set_fifo(fdctrl, 1, 1);
1661 1661
}
1662 1662

  
1663
static void fdctrl_handle_option (fdctrl_t *fdctrl, int direction)
1663
static void fdctrl_handle_option(FDCtrl *fdctrl, int direction)
1664 1664
{
1665 1665
    /* No result back */
1666 1666
    fdctrl_reset_fifo(fdctrl);
1667 1667
}
1668 1668

  
1669
static void fdctrl_handle_drive_specification_command (fdctrl_t *fdctrl, int direction)
1669
static void fdctrl_handle_drive_specification_command(FDCtrl *fdctrl, int direction)
1670 1670
{
1671
    fdrive_t *cur_drv = get_cur_drv(fdctrl);
1671
    FDrive *cur_drv = get_cur_drv(fdctrl);
1672 1672

  
1673 1673
    if (fdctrl->fifo[fdctrl->data_pos - 1] & 0x80) {
1674 1674
        /* Command parameters done */
......
1688 1688
    }
1689 1689
}
1690 1690

  
1691
static void fdctrl_handle_relative_seek_out (fdctrl_t *fdctrl, int direction)
1691
static void fdctrl_handle_relative_seek_out(FDCtrl *fdctrl, int direction)
1692 1692
{
1693
    fdrive_t *cur_drv;
1693
    FDrive *cur_drv;
1694 1694

  
1695 1695
    SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK);
1696 1696
    cur_drv = get_cur_drv(fdctrl);
......
1704 1704
    fdctrl_raise_irq(fdctrl, FD_SR0_SEEK);
1705 1705
}
1706 1706

  
1707
static void fdctrl_handle_relative_seek_in (fdctrl_t *fdctrl, int direction)
1707
static void fdctrl_handle_relative_seek_in(FDCtrl *fdctrl, int direction)
1708 1708
{
1709
    fdrive_t *cur_drv;
1709
    FDrive *cur_drv;
1710 1710

  
1711 1711
    SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK);
1712 1712
    cur_drv = get_cur_drv(fdctrl);
......
1725 1725
    uint8_t mask;
1726 1726
    const char* name;
1727 1727
    int parameters;
1728
    void (*handler)(fdctrl_t *fdctrl, int direction);
1728
    void (*handler)(FDCtrl *fdctrl, int direction);
1729 1729
    int direction;
1730 1730
} handlers[] = {
1731 1731
    { FD_CMD_READ, 0x1f, "READ", 8, fdctrl_start_transfer, FD_DIR_READ },
......
1764 1764
/* Associate command to an index in the 'handlers' array */
1765 1765
static uint8_t command_to_handler[256];
1766 1766

  
1767
static void fdctrl_write_data (fdctrl_t *fdctrl, uint32_t value)
1767
static void fdctrl_write_data(FDCtrl *fdctrl, uint32_t value)
1768 1768
{
1769
    fdrive_t *cur_drv;
1769
    FDrive *cur_drv;
1770 1770
    int pos;
1771 1771

  
1772 1772
    /* Reset mode */
......
1831 1831

  
1832 1832
static void fdctrl_result_timer(void *opaque)
1833 1833
{
1834
    fdctrl_t *fdctrl = opaque;
1835
    fdrive_t *cur_drv = get_cur_drv(fdctrl);
1834
    FDCtrl *fdctrl = opaque;
1835
    FDrive *cur_drv = get_cur_drv(fdctrl);
1836 1836

  
1837 1837
    /* Pretend we are spinning.
1838 1838
     * This is needed for Coherent, which uses READ ID to check for
......
1845 1845
}
1846 1846

  
1847 1847
/* Init functions */
1848
static void fdctrl_connect_drives(fdctrl_t *fdctrl)
1848
static void fdctrl_connect_drives(FDCtrl *fdctrl)
1849 1849
{
1850 1850
    unsigned int i;
1851 1851

  
......
1855 1855
    }
1856 1856
}
1857 1857

  
1858
fdctrl_t *fdctrl_init_isa(DriveInfo **fds)
1858
FDCtrl *fdctrl_init_isa(DriveInfo **fds)
1859 1859
{
1860 1860
    ISADevice *dev;
1861 1861

  
......
1864 1864
    qdev_prop_set_drive(&dev->qdev, "driveB", fds[1]);
1865 1865
    if (qdev_init(&dev->qdev) < 0)
1866 1866
        return NULL;
1867
    return &(DO_UPCAST(fdctrl_isabus_t, busdev, dev)->state);
1867
    return &(DO_UPCAST(FDCtrlISABus, busdev, dev)->state);
1868 1868
}
1869 1869

  
1870
fdctrl_t *fdctrl_init_sysbus(qemu_irq irq, int dma_chann,
1871
                             target_phys_addr_t mmio_base,
1872
                             DriveInfo **fds)
1870
FDCtrl *fdctrl_init_sysbus(qemu_irq irq, int dma_chann,
1871
                           target_phys_addr_t mmio_base, DriveInfo **fds)
1873 1872
{
1874
    fdctrl_t *fdctrl;
1873
    FDCtrl *fdctrl;
1875 1874
    DeviceState *dev;
1876
    fdctrl_sysbus_t *sys;
1875
    FDCtrlSysBus *sys;
1877 1876

  
1878 1877
    dev = qdev_create(NULL, "sysbus-fdc");
1879
    sys = DO_UPCAST(fdctrl_sysbus_t, busdev.qdev, dev);
1878
    sys = DO_UPCAST(FDCtrlSysBus, busdev.qdev, dev);
1880 1879
    fdctrl = &sys->state;
1881 1880
    fdctrl->dma_chann = dma_chann; /* FIXME */
1882 1881
    qdev_prop_set_drive(dev, "driveA", fds[0]);
......
1888 1887
    return fdctrl;
1889 1888
}
1890 1889

  
1891
fdctrl_t *sun4m_fdctrl_init (qemu_irq irq, target_phys_addr_t io_base,
1892
                             DriveInfo **fds, qemu_irq *fdc_tc)
1890
FDCtrl *sun4m_fdctrl_init(qemu_irq irq, target_phys_addr_t io_base,
1891
                          DriveInfo **fds, qemu_irq *fdc_tc)
1893 1892
{
1894 1893
    DeviceState *dev;
1895
    fdctrl_sysbus_t *sys;
1896
    fdctrl_t *fdctrl;
1894
    FDCtrlSysBus *sys;
1895
    FDCtrl *fdctrl;
1897 1896

  
1898 1897
    dev = qdev_create(NULL, "SUNW,fdtwo");
1899 1898
    qdev_prop_set_drive(dev, "drive", fds[0]);
1900 1899
    qdev_init_nofail(dev);
1901
    sys = DO_UPCAST(fdctrl_sysbus_t, busdev.qdev, dev);
1900
    sys = DO_UPCAST(FDCtrlSysBus, busdev.qdev, dev);
1902 1901
    fdctrl = &sys->state;
1903 1902
    sysbus_connect_irq(&sys->busdev, 0, irq);
1904 1903
    sysbus_mmio_map(&sys->busdev, 0, io_base);
......
1907 1906
    return fdctrl;
1908 1907
}
1909 1908

  
1910
static int fdctrl_init_common(fdctrl_t *fdctrl, target_phys_addr_t io_base)
1909
static int fdctrl_init_common(FDCtrl *fdctrl, target_phys_addr_t io_base)
1911 1910
{
1912 1911
    int i, j;
1913 1912
    static int command_tables_inited = 0;
......
1944 1943

  
1945 1944
static int isabus_fdc_init1(ISADevice *dev)
1946 1945
{
1947
    fdctrl_isabus_t *isa = DO_UPCAST(fdctrl_isabus_t, busdev, dev);
1948
    fdctrl_t *fdctrl = &isa->state;
1946
    FDCtrlISABus *isa = DO_UPCAST(FDCtrlISABus, busdev, dev);
1947
    FDCtrl *fdctrl = &isa->state;
1949 1948
    int iobase = 0x3f0;
1950 1949
    int isairq = 6;
1951 1950
    int dma_chann = 2;
......
1969 1968

  
1970 1969
static int sysbus_fdc_init1(SysBusDevice *dev)
1971 1970
{
1972
    fdctrl_sysbus_t *sys = DO_UPCAST(fdctrl_sysbus_t, busdev, dev);
1973
    fdctrl_t *fdctrl = &sys->state;
1971
    FDCtrlSysBus *sys = DO_UPCAST(FDCtrlSysBus, busdev, dev);
1972
    FDCtrl *fdctrl = &sys->state;
1974 1973
    int io;
1975 1974
    int ret;
1976 1975

  
......
1987 1986

  
1988 1987
static int sun4m_fdc_init1(SysBusDevice *dev)
1989 1988
{
1990
    fdctrl_t *fdctrl = &(FROM_SYSBUS(fdctrl_sysbus_t, dev)->state);
1989
    FDCtrl *fdctrl = &(FROM_SYSBUS(FDCtrlSysBus, dev)->state);
1991 1990
    int io;
1992 1991

  
1993 1992
    io = cpu_register_io_memory(fdctrl_mem_read_strict,
......
2003 2002
static ISADeviceInfo isa_fdc_info = {
2004 2003
    .init = isabus_fdc_init1,
2005 2004
    .qdev.name  = "isa-fdc",
2006
    .qdev.size  = sizeof(fdctrl_isabus_t),
2005
    .qdev.size  = sizeof(FDCtrlISABus),
2007 2006
    .qdev.no_user = 1,
2008 2007
    .qdev.reset = fdctrl_external_reset_isa,
2009 2008
    .qdev.props = (Property[]) {
2010
        DEFINE_PROP_DRIVE("driveA", fdctrl_isabus_t, state.drives[0].dinfo),
2011
        DEFINE_PROP_DRIVE("driveB", fdctrl_isabus_t, state.drives[1].dinfo),
2009
        DEFINE_PROP_DRIVE("driveA", FDCtrlISABus, state.drives[0].dinfo),
2010
        DEFINE_PROP_DRIVE("driveB", FDCtrlISABus, state.drives[1].dinfo),
2012 2011
        DEFINE_PROP_END_OF_LIST(),
2013 2012
    },
2014 2013
};
......
2016 2015
static SysBusDeviceInfo sysbus_fdc_info = {
2017 2016
    .init = sysbus_fdc_init1,
2018 2017
    .qdev.name  = "sysbus-fdc",
2019
    .qdev.size  = sizeof(fdctrl_sysbus_t),
2018
    .qdev.size  = sizeof(FDCtrlSysBus),
2020 2019
    .qdev.reset = fdctrl_external_reset_sysbus,
2021 2020
    .qdev.props = (Property[]) {
2022
        DEFINE_PROP_DRIVE("driveA", fdctrl_sysbus_t, state.drives[0].dinfo),
2023
        DEFINE_PROP_DRIVE("driveB", fdctrl_sysbus_t, state.drives[1].dinfo),
2021
        DEFINE_PROP_DRIVE("driveA", FDCtrlSysBus, state.drives[0].dinfo),
2022
        DEFINE_PROP_DRIVE("driveB", FDCtrlSysBus, state.drives[1].dinfo),
2024 2023
        DEFINE_PROP_END_OF_LIST(),
2025 2024
    },
2026 2025
};
......
2028 2027
static SysBusDeviceInfo sun4m_fdc_info = {
2029 2028
    .init = sun4m_fdc_init1,
2030 2029
    .qdev.name  = "SUNW,fdtwo",
2031
    .qdev.size  = sizeof(fdctrl_sysbus_t),
2030
    .qdev.size  = sizeof(FDCtrlSysBus),
2032 2031
    .qdev.reset = fdctrl_external_reset_sysbus,
2033 2032
    .qdev.props = (Property[]) {
2034
        DEFINE_PROP_DRIVE("drive", fdctrl_sysbus_t, state.drives[0].dinfo),
2033
        DEFINE_PROP_DRIVE("drive", FDCtrlSysBus, state.drives[0].dinfo),
2035 2034
        DEFINE_PROP_END_OF_LIST(),
2036 2035
    },
2037 2036
};
b/hw/fdc.h
2 2
#include "sysemu.h"
3 3
#define MAX_FD 2
4 4

  
5
typedef struct fdctrl_t fdctrl_t;
5
typedef struct FDCtrl FDCtrl;
6 6

  
7
fdctrl_t *fdctrl_init_isa(DriveInfo **fds);
8
fdctrl_t *fdctrl_init_sysbus(qemu_irq irq, int dma_chann,
9
                             target_phys_addr_t mmio_base,
10
                             DriveInfo **fds);
11
fdctrl_t *sun4m_fdctrl_init (qemu_irq irq, target_phys_addr_t io_base,
12
                             DriveInfo **fds, qemu_irq *fdc_tc);
13
int fdctrl_get_drive_type(fdctrl_t *fdctrl, int drive_num);
7
FDCtrl *fdctrl_init_isa(DriveInfo **fds);
8
FDCtrl *fdctrl_init_sysbus(qemu_irq irq, int dma_chann,
9
                           target_phys_addr_t mmio_base, DriveInfo **fds);
10
FDCtrl *sun4m_fdctrl_init(qemu_irq irq, target_phys_addr_t io_base,
11
                          DriveInfo **fds, qemu_irq *fdc_tc);
12
int fdctrl_get_drive_type(FDCtrl *fdctrl, int drive_num);
b/hw/mips_malta.c
780 780
    ISADevice *isa_dev;
781 781
    CPUState *env;
782 782
    RTCState *rtc_state;
783
    fdctrl_t *floppy_controller;
783
    FDCtrl *floppy_controller;
784 784
    MaltaFPGAState *malta_fpga;
785 785
    qemu_irq *i8259;
786 786
    int piix4_devfn;
b/hw/pc.c
62 62

  
63 63
#define MAX_IDE_BUS 2
64 64

  
65
static fdctrl_t *floppy_controller;
65
static FDCtrl *floppy_controller;
66 66
static RTCState *rtc_state;
67 67
static PITState *pit;
68 68
static PCII440FXState *i440fx_state;

Also available in: Unified diff