Looks good to me. Thanks!

FWIW, I actually wrote a patch that is very similar, but never quite completed it: https://review.coreboot.org/c/flashrom/+/19673

So at least we know your patch is already tested ;-)

On Mon, Jan 14, 2019 at 5:02 AM Florian Kaiser <florian_kaiser@genua.de> wrote:
Hello Nico,

thanks for your feedback! I attached an improved patch that hopefully solves
these issues.

Thanks a lot!

Florian

Am Sonntag, 23. Dezember 2018, 14:34:16 schrieb Nico Huber:
> Hello Florian,
>
> thanks for your patch, I've commented on it inline.
>
> On 10.12.18 11:05, Florian Kaiser wrote:
> > I am using this patch for a while now and I did not encounter any
> > problems. I am not sure if this was/is not supported. Is there any reason
> > why this is not supported?
>
> No reason beside that nobody cared about it yet, I guess.
>
> Nico
>
> > From 5df0b1ff7bb95f4384c98727a56a03660dde6aaa Mon Sep 17 00:00:00 2001
> > From: Florian Kaiser <fkaiser@genua.de>
> > Date: Tue, 31 Jul 2018 13:42:22 +0200
> > Subject: [PATCH] dediprog: allow the use of the programming target
> > "socket".
> >
> > Change-Id: I8c5120ce2151138093be0f27951916ec7f725574
> > Signed-off-by: Florian Kaiser <fkaiser@genua.de>
> > ---
> >
> >  dediprog.c      | 6 +++++-
> >  flashrom.8.tmpl | 5 +++--
> >  2 files changed, 8 insertions(+), 3 deletions(-)
> >
> > diff --git a/dediprog.c b/dediprog.c
> > index 72818ea..0eb84ec 100644
> > --- a/dediprog.c
> > +++ b/dediprog.c
> > @@ -1028,7 +1028,7 @@ int dediprog_init(void)
> >
> >                     free(target_str);
> >                     return 1;
> >             
> >             }
> >
> > -           if (target < 1 || target > 2) {
> > +           if (target < 1 || target > 3) {
> >
> >                     msg_perr("Error: Value for 'target' is out of range.\n");
> >                     free(target_str);
> >                     return 1;
> >
> > @@ -1047,6 +1047,10 @@ int dediprog_init(void)
> >
> >                     msg_pinfo("Using target %s.\n",
"FLASH_TYPE_APPLICATION_FLASH_2");
> >                     target = FLASH_TYPE_APPLICATION_FLASH_2;
> >                     break;
> >
> > +           case 3:
> > +                   msg_pinfo("Using target %s.\n", "FLASH_TYPE_SOCKET");
> > +                   target = FLASH_TYPE_SOCKET;
> > +                   break;
>
> This makes a flaw in set_target_flash() obvious now. Not all programmers
> have a socket. I just checked set_target_flash() silently fails with an
> SF 100. So we should check for compatibility there or at the calling
> site.
>
> >             default:
> >                     break;
> >             
> >             }
> >
> > diff --git a/flashrom.8.tmpl b/flashrom.8.tmpl
> > index c557af7..04fd1c8 100644
> > --- a/flashrom.8.tmpl
> > +++ b/flashrom.8.tmpl
> > @@ -946,8 +946,9 @@ parameter specifies which target chip should be used.
> > Syntax is>
> >  where
> >  .B value
> >  can be
> >
> > -.BR 1 " or " 2
> > -to select target chip 1 or 2 respectively. The default is target chip 1.
> > +.BR 1 ", " 2 " or " 3
> > +to select target chip 1 or 2 respectively. The default is target chip 1.
> > To use the programming socket
> This reads confusing now (set 1, 2 or 3 to choose between 1 and 2?).
>
> > +of the SF600 you need to select target 3.
> >
> >  .SS

--
Mit freundlichen Grüssen

Florian Kaiser
Microkernel Systems Development
tel +49 89 991950 - 320

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
genua
Gesellschaft für Netzwerk - und Unix-Administration mbH
Domagkstr. 7, D-85551 Kirchheim. http://www.genua.de
Tel: (089) 99 19 50-0, Fax: (089) 99 19 50 - 999

Geschaeftsfuehrer: Matthias Ochs, Marc Tesch
Amtsgericht Muenchen HRB 98238
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
Mit freundlichen Grüssen

Florian Kaiser
Microkernel Systems Development
tel +49 89 991950 - 320

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
genua
Gesellschaft für Netzwerk - und Unix-Administration mbH
Domagkstr. 7, D-85551 Kirchheim. http://www.genua.de
Tel: (089) 99 19 50-0, Fax: (089) 99 19 50 - 999

Geschaeftsfuehrer: Matthias Ochs, Marc Tesch
Amtsgericht Muenchen HRB 98238
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
flashrom mailing list -- flashrom@flashrom.org
To unsubscribe send an email to flashrom-leave@flashrom.org