From: Wolfgang Denk Date: Thu, 16 Sep 2010 13:31:48 +0200 Subject: [U-Boot] [PATCH] Kirkwood: print_cpuinfo fixed for valid devid revid In-Reply-To: <1284648724-6871-1-git-send-email-prafulla@marvell.com> References: <1284648724-6871-1-git-send-email-prafulla@marvell.com> Message-ID: <20100916113148.4C90115242D@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Prafulla Wadaskar, In message <1284648724-6871-1-git-send-email-prafulla@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 ... > + 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