On Tue, 4 Aug 2015 01:26:44 +0200 Bernhard Nortmann <[email protected]> wrote:
> Signed-off-by: Bernhard Nortmann <[email protected]> > --- > fel.c | 21 +++++++++++++-------- > 1 file changed, 13 insertions(+), 8 deletions(-) > > diff --git a/fel.c b/fel.c > index bbaeec9..95c3ee2 100644 > --- a/fel.c > +++ b/fel.c > @@ -186,14 +186,20 @@ void aw_fel_print_version(libusb_device_handle *usb) > struct aw_fel_version buf; > aw_fel_get_version(usb, &buf); > > + /* Decoding the actual "SoC name" may be more complicated than this. > + * See e.g. > https://github.com/allwinner-zh/linux-3.4-sunxi/blob/master/arch/arm/mach-sunxi/sunxi-chip.c > + */ > const char *soc_name="unknown"; > switch (buf.soc_id) { > - case 0x1623: soc_name="A10";break; > - case 0x1625: soc_name="A13";break; > - case 0x1633: soc_name="A31";break; > - case 0x1651: soc_name="A20";break; > - case 0x1650: soc_name="A23";break; > - case 0x1639: soc_name="A80";break; > + case 0x1623: soc_name="A10"; break; > + case 0x1625: soc_name="A13"; break; > + case 0x1633: soc_name="A31"; break; > + case 0x1639: soc_name="A80"; break; > + case 0x1650: soc_name="A23"; break; > + case 0x1651: soc_name="A20"; break; > + case 0x1667: soc_name="A33"; break; > + case 0x1673: soc_name="A83T"; break; > + case 0x1680: soc_name="H3"; break; > } > > printf("%.8s soc=%08x(%s) %08x ver=%04x %02x %02x scratchpad=%08x %08x > %08x\n", > @@ -942,8 +948,7 @@ int main(int argc, char **argv) > } else if (strncmp(argv[1], "dump", 4) == 0 && argc > 3) { > aw_fel_dump(handle, strtoul(argv[2], NULL, 0), > strtoul(argv[3], NULL, 0)); > skip = 3; > - } else if ((strncmp(argv[1], "exe", 3) == 0 && argc > 2) > - ) { > + } else if ((strncmp(argv[1], "exe", 3) == 0 && argc > 2)) { > aw_fel_execute(handle, strtoul(argv[2], NULL, 0)); > skip=3; > } else if (strncmp(argv[1], "ver", 3) == 0 && argc > 1) { I guess, this patch is now superseded by the recent patches from Vishnu Patekar, which add full support for H3, A83T and A33. -- Best regards, Siarhei Siamashka -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
