[U-Boot] [PATCH] Kirkwood: print_cpuinfo fixed for valid devid revid
Wolfgang Denk
wd at denx.de
Thu Sep 16 13:31:48 CEST 2010
Dear Prafulla Wadaskar,
In message <1284648724-6871-1-git-send-email-prafulla at marvell.com> you wrote:
> Earlier Device Identification register was used to detect
> the type for SoC, considering 88F6282 support to be added,
> It is not possible to detect the same using current
> algorithm.
>
> With this patch, device ID is being read using PCIE devid
> register, also valid chip revision ID will also be read and
> displayed
>
> Signed-off-by: Prafulla Wadaskar <prafulla at marvell.com>
...
> + if ((readl(KW_REG_DEVICE_ID) & 0x03) > 2) {
> + debug("Error.. %s:Unsupported Kirkwood SoC\n", __FUNCTION__);
> + return -1;
Please use a printf() instead of debug() here - error messages should
always be printed.
> + sprintf(name, "%04x", devid);
> + printf("SoC: Kirkwood 88F%s_%s\n", name, rev);
Why do you need a separate sprintf() here? Why not simply:
printf("SoC: Kirkwood 88F%04x_%s\n", devid, rev);
?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Am besten betrachten Sie Fehlermeldungen als eine Art Psycho-Test,
mit dem herausgefunden werden soll, wie belastbar Sie sind."
- Dr. R. Wonneberger, Kompaktführer LaTeX, Kap. 1.6: Fehlermeldungen
More information about the U-Boot
mailing list