From: Vignesh R Date: Wed, 10 Aug 2016 10:34:10 +0530 Subject: [U-Boot] [PATCH v2 07/22] sf: Adopt flash table INFO macro from Linux In-Reply-To: <1470773041-13812-8-git-send-email-jteki@openedev.com> References: <1470773041-13812-1-git-send-email-jteki@openedev.com> <1470773041-13812-8-git-send-email-jteki@openedev.com> Message-ID: <11516e0d-f2dd-cd04-b0a5-4a35ebc18630@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wednesday 10 August 2016 01:33 AM, Jagan Teki wrote: > INFO macro make flash table entries more adjustable like > adding new flash_info attributes, update ID length bytes > and so on and more over it will sync to Linux way of defining > flash_info attributes. [...] > diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c > index 7f6e9ae..58d5a6a 100644 > --- a/drivers/mtd/spi/spi_flash.c > +++ b/drivers/mtd/spi/spi_flash.c > @@ -924,6 +924,31 @@ static int micron_quad_enable(struct spi_flash *flash) > } > #endif > > +static const struct spi_flash_params *spi_flash_read_id(struct spi_flash *flash) > +{ > + int tmp; > + u8 id[5]; > + const struct spi_flash_params *params; > + > + tmp = spi_flash_cmd(flash->spi, CMD_READ_ID, id, 5); > + if (tmp < 0) { > + printf("SF: error %d reading JEDEC ID\n", tmp); > + return ERR_PTR(tmp); > + } > + Could we have debug() to print the JEDEC IDs read as before? -- Regards Vignesh