* [Qemu-devel] [PATCH] pflash_cfi01: add device ID read command
@ 2010-04-30 22:19 Michael Walle
2010-05-01 6:58 ` Stefan Weil
0 siblings, 1 reply; 5+ messages in thread
From: Michael Walle @ 2010-04-30 22:19 UTC (permalink / raw)
To: qemu-devel
Add support to read manufacturer and device ID. For everything else (eg.
lock bits) 0 is returned.
---
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 dfdced9..2d30968 100644
--- a/hw/pflash_cfi01.c
+++ b/hw/pflash_cfi01.c
@@ -165,6 +165,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;
@@ -290,6 +306,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;
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] pflash_cfi01: add device ID read command
2010-04-30 22:19 [Qemu-devel] [PATCH] pflash_cfi01: add device ID read command Michael Walle
@ 2010-05-01 6:58 ` Stefan Weil
2010-05-01 17:34 ` Michael Walle
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Weil @ 2010-05-01 6:58 UTC (permalink / raw)
To: Michael Walle; +Cc: qemu-devel
Am 01.05.2010 00:19, schrieb Michael Walle:
> Add support to read manufacturer and device ID. For everything else (eg.
> lock bits) 0 is returned.
>
Signed-off-by is missing.
> ---
> 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 dfdced9..2d30968 100644
> --- a/hw/pflash_cfi01.c
> +++ b/hw/pflash_cfi01.c
> @@ -165,6 +165,22 @@ static uint32_t pflash_read (pflash_t *pfl,
> target_phys_addr_t offset,
>
The patch is damaged here. Use "git send-email" to send your patch.
> 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;
> @@ -290,6 +306,10 @@ static void pflash_write(pflash_t *pfl,
> target_phys_addr_t offset,
>
The patch is damaged here.
> 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;
>
Regards,
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH] pflash_cfi01: add device ID read command
2010-05-01 6:58 ` Stefan Weil
@ 2010-05-01 17:34 ` Michael Walle
2010-05-04 22:02 ` [Qemu-devel] " Michael Walle
2010-05-21 9:57 ` [Qemu-devel] " Aurelien Jarno
0 siblings, 2 replies; 5+ messages in thread
From: Michael Walle @ 2010-05-01 17:34 UTC (permalink / raw)
To: qemu-devel; +Cc: Michael Walle
Add support to read manufacturer and device ID. For everything else (eg.
lock bits) 0 is returned.
Signed-off-by: Michael Walle <michael@walle.cc>
---
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;
--
1.5.6.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] Re: [PATCH] pflash_cfi01: add device ID read command
2010-05-01 17:34 ` Michael Walle
@ 2010-05-04 22:02 ` Michael Walle
2010-05-21 9:57 ` [Qemu-devel] " Aurelien Jarno
1 sibling, 0 replies; 5+ messages in thread
From: Michael Walle @ 2010-05-04 22:02 UTC (permalink / raw)
To: qemu-devel
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 <michael@walle.cc>
> ---
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] pflash_cfi01: add device ID read command
2010-05-01 17:34 ` Michael Walle
2010-05-04 22:02 ` [Qemu-devel] " Michael Walle
@ 2010-05-21 9:57 ` Aurelien Jarno
1 sibling, 0 replies; 5+ messages in thread
From: Aurelien Jarno @ 2010-05-21 9:57 UTC (permalink / raw)
To: Michael Walle; +Cc: qemu-devel
On Sat, May 01, 2010 at 07:34:06PM +0200, Michael Walle wrote:
> Add support to read manufacturer and device ID. For everything else (eg.
> lock bits) 0 is returned.
>
> Signed-off-by: Michael Walle <michael@walle.cc>
Thanks, applied.
> ---
> 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;
> --
> 1.5.6.5
>
>
>
>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-05-21 9:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-30 22:19 [Qemu-devel] [PATCH] pflash_cfi01: add device ID read command Michael Walle
2010-05-01 6:58 ` Stefan Weil
2010-05-01 17:34 ` Michael Walle
2010-05-04 22:02 ` [Qemu-devel] " Michael Walle
2010-05-21 9:57 ` [Qemu-devel] " Aurelien Jarno
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.