From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdXOo-0004lS-E3 for Qemu-devel@nongnu.org; Fri, 17 May 2013 23:01:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UdXOi-0002Lx-47 for Qemu-devel@nongnu.org; Fri, 17 May 2013 23:01:34 -0400 Received: from [222.73.24.84] (port=4082 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdXOh-0002Ka-O3 for Qemu-devel@nongnu.org; Fri, 17 May 2013 23:01:28 -0400 Message-ID: <5196EEEF.6@cn.fujitsu.com> Date: Sat, 18 May 2013 11:01:03 +0800 From: Weng Fan MIME-Version: 1.0 References: <51932943.7020408@cn.fujitsu.com> <5193B386.3010700@siemens.com> In-Reply-To: <5193B386.3010700@siemens.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Fwd: Re: [PATCH v4 2/2] Add AT24Cxx I2C EEPROM device model List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: "Qemu-devel@nongnu.org" Thank you for you help. I can use the at24 device. And i can see the device in monitor model: info qtree type i2c-bus dev: at24, id "" drive =3D eeprom logical=5Fblock=5Fsize =3D 512 physical=5Fblock=5Fsize =3D 512 min=5Fio=5Fsize =3D 0 opt=5Fio=5Fsize =3D 0 bootindex =3D -1 discard=5Fgranularity =3D 0 device =3D 0 size =3D 65536 address =3D 80 But I have another question. How can i test the eeprom device at24? My qemu command: qemu-system-arm -drive file=3Dtest.img,if=3Dnone,id=3Deeprom -device=20 at24,address=3D0x4c,drive=3Deeprom -M versatilepb -nographic -kernel zImage= =20 -initrd initrd.img -append "root=3Dlinuxrc console=3DttyAMA0,115200" The kernel has compiled at24.c driver. In virtual os,i can't see the device at24. If i want write/read date in at24 device,what should i do? I'm waiting for you help,thank you. =E4=BA=8E 2013-5-16 0:10, Jan Kiszka =E5=86=99=E9=81=93: > On 2013-05-15 08:20, Weng Fan wrote: >> Hi. >> I want to use this patch for qemu-system-arm. >> But an error occurred during initialization of the i2c device. >> >> The error message is : >> >> qemu-system-arm: drive property not set >> qemu-system-arm: Initialization of device at24 failed >> >> The command is: >> qemu-system-arm -M versatilepb -nographic -kernel zImage -initrd >> initrd.img -append "root=3Dlinuxrc console=3DttyAMA0,115200" > > You command line is incomplete, no mentioning of the -drive at24. The > intended usage is: > > -drive file=3D/path/to/image,if=3Dnone,id=3Deeprom -device at24,drive=3De= eprom > > You can also specify the desired at24xxx type explicitly, e.g. at24c256 > for the 256K model. Otherwise the type is derived from the image size. > > Jan > --=20 -------------- Best Regards -------------------------------------------------- Weng Fan Development Dept.I Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China TEL=EF=BC=9A+86+25-86630566-8222 Mail=EF=BC=9Awengfan-fnst@cn.fujitsu.com http://www.fujitsu.com/cn/fnst/ -------------------------------------------------- =