From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O9QCX-0004wO-3H for qemu-devel@nongnu.org; Tue, 04 May 2010 18:02:49 -0400 Received: from [140.186.70.92] (port=40724 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9QCV-0004u6-A1 for qemu-devel@nongnu.org; Tue, 04 May 2010 18:02:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O9QCT-0001Yp-Mc for qemu-devel@nongnu.org; Tue, 04 May 2010 18:02:47 -0400 Received: from mail.serverraum.org ([78.47.150.89]:49975) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O9QCT-0001YE-HW for qemu-devel@nongnu.org; Tue, 04 May 2010 18:02:45 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.serverraum.org (Postfix) with ESMTP id 5E13B3EEA3 for ; Wed, 5 May 2010 00:02:41 +0200 (CEST) Received: from mail.serverraum.org ([127.0.0.1]) by localhost (web.serverraum.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AZfnUKnkGssl for ; Wed, 5 May 2010 00:02:40 +0200 (CEST) Received: from thanatos.local (77-22-61-82-dynip.superkabel.de [77.22.61.82]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.serverraum.org (Postfix) with ESMTPSA id BE30B3EEA0 for ; Wed, 5 May 2010 00:02:40 +0200 (CEST) From: Michael Walle Date: Wed, 5 May 2010 00:02:38 +0200 References: <4BDBD0FC.7010707@mail.berlios.de> <1272735246-22555-1-git-send-email-michael@walle.cc> In-Reply-To: <1272735246-22555-1-git-send-email-michael@walle.cc> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201005050002.38795.michael@walle.cc> Subject: [Qemu-devel] Re: [PATCH] pflash_cfi01: add device ID read command List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Ping for this patch. Anything wrong with it? Am Saturday 01 May 2010 19:34:06 schrieb Michael Walle: > Add support to read manufacturer and device ID. For everything else (eg. > lock bits) 0 is returned. > > Signed-off-by: Michael Walle > --- > hw/pflash_cfi01.c | 20 ++++++++++++++++++++ > 1 files changed, 20 insertions(+), 0 deletions(-) > > diff --git a/hw/pflash_cfi01.c b/hw/pflash_cfi01.c > index 6b2adba..bc901e6 100644 > --- a/hw/pflash_cfi01.c > +++ b/hw/pflash_cfi01.c > @@ -166,6 +166,22 @@ static uint32_t pflash_read (pflash_t *pfl, > target_phys_addr_t offset, ret = pfl->status; > DPRINTF("%s: status %x\n", __func__, ret); > break; > + case 0x90: > + switch (boff) { > + case 0: > + ret = pfl->ident[0] << 8 | pfl->ident[1]; > + DPRINTF("%s: Manufacturer Code %04x\n", __func__, ret); > + break; > + case 1: > + ret = pfl->ident[2] << 8 | pfl->ident[3]; > + DPRINTF("%s: Device ID Code %04x\n", __func__, ret); > + break; > + default: > + DPRINTF("%s: Read Device Information boff=%x\n", __func__, > boff); + ret = 0; > + break; > + } > + break; > case 0x98: /* Query mode */ > if (boff > pfl->cfi_len) > ret = 0; > @@ -283,6 +299,10 @@ static void pflash_write(pflash_t *pfl, > target_phys_addr_t offset, DPRINTF("%s: Read status register\n", __func__); > pfl->cmd = cmd; > return; > + case 0x90: /* Read Device ID */ > + DPRINTF("%s: Read Device information\n", __func__); > + pfl->cmd = cmd; > + return; > case 0x98: /* CFI query */ > DPRINTF("%s: CFI query\n", __func__); > break; -- wkr michael