1*bd217d88SThomas Huth /* 2*bd217d88SThomas Huth * ide device definitions 3*bd217d88SThomas Huth * 4*bd217d88SThomas Huth * Copyright (c) 2009 Gerd Hoffmann <kraxel@redhat.com> 5*bd217d88SThomas Huth * 6*bd217d88SThomas Huth * This code is free software; you can redistribute it and/or 7*bd217d88SThomas Huth * modify it under the terms of the GNU Lesser General Public 8*bd217d88SThomas Huth * License as published by the Free Software Foundation; either 9*bd217d88SThomas Huth * version 2.1 of the License, or (at your option) any later version. 10*bd217d88SThomas Huth * 11*bd217d88SThomas Huth * This library is distributed in the hope that it will be useful, 12*bd217d88SThomas Huth * but WITHOUT ANY WARRANTY; without even the implied warranty of 13*bd217d88SThomas Huth * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14*bd217d88SThomas Huth * Lesser General Public License for more details. 15*bd217d88SThomas Huth * 16*bd217d88SThomas Huth * You should have received a copy of the GNU Lesser General Public 17*bd217d88SThomas Huth * License along with this library; if not, see <http://www.gnu.org/licenses/>. 18*bd217d88SThomas Huth */ 19*bd217d88SThomas Huth 20*bd217d88SThomas Huth #ifndef IDE_DEV_H 21*bd217d88SThomas Huth #define IDE_DEV_H 22*bd217d88SThomas Huth 23*bd217d88SThomas Huth #include "hw/qdev-properties.h" 24*bd217d88SThomas Huth #include "hw/block/block.h" 25*bd217d88SThomas Huth #include "hw/ide/internal.h" 26*bd217d88SThomas Huth 27*bd217d88SThomas Huth typedef struct IDEDrive { 28*bd217d88SThomas Huth IDEDevice dev; 29*bd217d88SThomas Huth } IDEDrive; 30*bd217d88SThomas Huth 31*bd217d88SThomas Huth #define DEFINE_IDE_DEV_PROPERTIES() \ 32*bd217d88SThomas Huth DEFINE_BLOCK_PROPERTIES(IDEDrive, dev.conf), \ 33*bd217d88SThomas Huth DEFINE_BLOCK_ERROR_PROPERTIES(IDEDrive, dev.conf), \ 34*bd217d88SThomas Huth DEFINE_PROP_STRING("ver", IDEDrive, dev.version), \ 35*bd217d88SThomas Huth DEFINE_PROP_UINT64("wwn", IDEDrive, dev.wwn, 0), \ 36*bd217d88SThomas Huth DEFINE_PROP_STRING("serial", IDEDrive, dev.serial),\ 37*bd217d88SThomas Huth DEFINE_PROP_STRING("model", IDEDrive, dev.model) 38*bd217d88SThomas Huth 39*bd217d88SThomas Huth void ide_dev_initfn(IDEDevice *dev, IDEDriveKind kind, Error **errp); 40*bd217d88SThomas Huth 41*bd217d88SThomas Huth #endif 42