[U-Boot] [UBOOT][PATCH 0/5] qspi: Add AM437x support

The patch series add support for enabling qspi on AM43xx at uboot.
Testing done: ------------- Wrote a uImage to the flash, read it back and boot the kernel.
Jagannadha Sutradharudu Teki (1): sf: macronix: Add support for MX25L51235F
Sourav Poddar (4): am43xx: add qspi support am437x_epos_evm: add SPL API, QSPI, and serial flash support qspi/spi: Add AM43xx specifics changes am43xx: add delay before xfer
arch/arm/cpu/armv7/am33xx/clock_am43xx.c | 1 + arch/arm/include/asm/arch-am33xx/cpu.h | 4 +++- arch/arm/include/asm/arch-am33xx/omap.h | 1 + board/ti/am43xx/mux.c | 11 +++++++++++ drivers/mtd/spi/sf_probe.c | 2 ++ drivers/spi/ti_qspi.c | 29 ++++++++++++++++++++++++++--- include/configs/am43xx_evm.h | 20 ++++++++++++++++++++ 7 files changed, 64 insertions(+), 4 deletions(-)

Add QSPI definitions and clock configuration support.
Signed-off-by: Sourav Poddar sourav.poddar@ti.com --- arch/arm/cpu/armv7/am33xx/clock_am43xx.c | 1 + arch/arm/include/asm/arch-am33xx/cpu.h | 4 +++- arch/arm/include/asm/arch-am33xx/omap.h | 1 + 3 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/arch/arm/cpu/armv7/am33xx/clock_am43xx.c b/arch/arm/cpu/armv7/am33xx/clock_am43xx.c index 97c00b4..fb654bb 100644 --- a/arch/arm/cpu/armv7/am33xx/clock_am43xx.c +++ b/arch/arm/cpu/armv7/am33xx/clock_am43xx.c @@ -98,6 +98,7 @@ void enable_basic_clocks(void) &cmper->emiffwclkctrl, &cmper->emifclkctrl, &cmper->otfaemifclkctrl, + &cmper->qspiclkctrl, 0 };
diff --git a/arch/arm/include/asm/arch-am33xx/cpu.h b/arch/arm/include/asm/arch-am33xx/cpu.h index 23af125..6537b30 100644 --- a/arch/arm/include/asm/arch-am33xx/cpu.h +++ b/arch/arm/include/asm/arch-am33xx/cpu.h @@ -332,7 +332,9 @@ struct cm_perpll { unsigned int mcasp1clkctrl; /* offset 0x240 */ unsigned int resv11; unsigned int mmc2clkctrl; /* offset 0x248 */ - unsigned int resv12[5]; + unsigned int resv12[3]; + unsigned int qspiclkctrl; /* offset 0x258 */ + unsigned int resv121; unsigned int usb0clkctrl; /* offset 0x260 */ unsigned int resv13[103]; unsigned int l4lsclkstctrl; /* offset 0x400 */ diff --git a/arch/arm/include/asm/arch-am33xx/omap.h b/arch/arm/include/asm/arch-am33xx/omap.h index 10f05c9..7b2f193 100644 --- a/arch/arm/include/asm/arch-am33xx/omap.h +++ b/arch/arm/include/asm/arch-am33xx/omap.h @@ -29,5 +29,6 @@ #define SRAM_SCRATCH_SPACE_ADDR 0x4033C000 #define AM4372_BOARD_NAME_START SRAM_SCRATCH_SPACE_ADDR #define AM4372_BOARD_NAME_END SRAM_SCRATCH_SPACE_ADDR + 0xC +#define QSPI_BASE 0x47900000 #endif #endif

Enables support for SPI SPL, QSPI and Spansion serial flash device on the EVM. Configures pin muxes for QSPI mode.
Signed-off-by: Sourav Poddar sourav.poddar@ti.com --- board/ti/am43xx/mux.c | 11 +++++++++++ include/configs/am43xx_evm.h | 20 ++++++++++++++++++++ 2 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/board/ti/am43xx/mux.c b/board/ti/am43xx/mux.c index 341214d..ff12981 100644 --- a/board/ti/am43xx/mux.c +++ b/board/ti/am43xx/mux.c @@ -35,6 +35,16 @@ static struct module_pin_mux i2c0_pin_mux[] = { {-1}, };
+static struct module_pin_mux qspi_pin_mux[] = { + {OFFSET(gpmc_csn0), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* QSPI_CS0 */ + {OFFSET(gpmc_csn3), (MODE(2) | PULLUP_EN | RXACTIVE)}, /* QSPI_CLK */ + {OFFSET(gpmc_advn_ale), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* QSPI_D0 */ + {OFFSET(gpmc_oen_ren), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* QSPI_D1 */ + {OFFSET(gpmc_wen), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* QSPI_D2 */ + {OFFSET(gpmc_be0n_cle), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* QSPI_D3 */ + {-1}, +}; + void enable_uart0_pin_mux(void) { configure_module_pin_mux(uart0_pin_mux); @@ -44,6 +54,7 @@ void enable_board_pin_mux(void) { configure_module_pin_mux(mmc0_pin_mux); configure_module_pin_mux(i2c0_pin_mux); + configure_module_pin_mux(qspi_pin_mux); }
void enable_i2c0_pin_mux(void) diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index 456dcaa..f28ad41 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -79,6 +79,26 @@ #define CONFIG_OMAP_USB_PHY #define CONFIG_AM437X_USB2PHY2_HOST
+/* SPI */ +#undef CONFIG_OMAP3_SPI +#define CONFIG_TI_QSPI +#define CONFIG_SPI_FLASH +#define CONFIG_SPI_FLASH_MACRONIX +#define CONFIG_CMD_SF +#define CONFIG_CMD_SPI +#define CONFIG_TI_SPI_MMAP +#define CONFIG_QSPI_SEL_GPIO 48 +#define CONFIG_SF_DEFAULT_SPEED 48000000 +#define CONFIG_DEFAULT_SPI_MODE SPI_MODE_3 + +/* SPI SPL */ +#define CONFIG_SPL_SPI_SUPPORT +#define CONFIG_SPL_SPI_LOAD +#define CONFIG_SPL_SPI_FLASH_SUPPORT +#define CONFIG_SPL_SPI_BUS 0 +#define CONFIG_SPL_SPI_CS 0 +#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000 + #ifndef CONFIG_SPL_BUILD #define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80200000\0" \

From: Jagannadha Sutradharudu Teki jagannadha.sutradharudu-teki@xilinx.com
Signed-off-by: Jagannadha Sutradharudu Teki jaganna@xilinx.com Signed-off-by: Sourav Poddar sourav.poddar@ti.com --- drivers/mtd/spi/sf_probe.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c index 5eb8ffe..874ef8c 100644 --- a/drivers/mtd/spi/sf_probe.c +++ b/drivers/mtd/spi/sf_probe.c @@ -68,6 +68,7 @@ static const struct spi_flash_params spi_flash_params_table[] = { {"MX25L25635F", 0xc22019, 0x0, 64 * 1024, 512, 0}, {"MX25L51235F", 0xc2201A, 0x0, 64 * 1024, 1024, 0}, {"MX25L12855E", 0xc22618, 0x0, 64 * 1024, 256, 0}, + {"MX66L51235F", 0xc2201a, 0x0, 64 * 1024, 1024, 0}, #endif #ifdef CONFIG_SPI_FLASH_SPANSION /* SPANSION */ {"S25FL008A", 0x010213, 0x0, 64 * 1024, 16, 0}, @@ -207,6 +208,7 @@ static struct spi_flash *spi_flash_validate_params(struct spi_slave *spi, flash->page_size = (ext_jedec == 0x4d00) ? 512 : 256; flash->sector_size = params->sector_size; flash->size = flash->sector_size * params->nr_sectors; + flash->memory_map = spi->memory_map;
/* Compute erase sector and command */ if (params->flags & SECT_4K) {

On Thu, Nov 14, 2013 at 9:09 PM, Sourav Poddar sourav.poddar@ti.com wrote:
From: Jagannadha Sutradharudu Teki jagannadha.sutradharudu-teki@xilinx.com
Signed-off-by: Jagannadha Sutradharudu Teki jaganna@xilinx.com Signed-off-by: Sourav Poddar sourav.poddar@ti.com
drivers/mtd/spi/sf_probe.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c index 5eb8ffe..874ef8c 100644 --- a/drivers/mtd/spi/sf_probe.c +++ b/drivers/mtd/spi/sf_probe.c @@ -68,6 +68,7 @@ static const struct spi_flash_params spi_flash_params_table[] = { {"MX25L25635F", 0xc22019, 0x0, 64 * 1024, 512, 0}, {"MX25L51235F", 0xc2201A, 0x0, 64 * 1024, 1024, 0}, {"MX25L12855E", 0xc22618, 0x0, 64 * 1024, 256, 0},
{"MX66L51235F", 0xc2201a, 0x0, 64 * 1024, 1024, 0},
What is this - this part is already available is int it?
#endif #ifdef CONFIG_SPI_FLASH_SPANSION /* SPANSION */ {"S25FL008A", 0x010213, 0x0, 64 * 1024, 16, 0}, @@ -207,6 +208,7 @@ static struct spi_flash *spi_flash_validate_params(struct spi_slave *spi, flash->page_size = (ext_jedec == 0x4d00) ? 512 : 256; flash->sector_size = params->sector_size; flash->size = flash->sector_size * params->nr_sectors;
flash->memory_map = spi->memory_map;
This change is also there - please check.

On Thursday 19 December 2013 12:21 AM, Jagan Teki wrote:
On Thu, Nov 14, 2013 at 9:09 PM, Sourav Poddarsourav.poddar@ti.com wrote:
From: Jagannadha Sutradharudu Tekijagannadha.sutradharudu-teki@xilinx.com
Signed-off-by: Jagannadha Sutradharudu Tekijaganna@xilinx.com Signed-off-by: Sourav Poddarsourav.poddar@ti.com
drivers/mtd/spi/sf_probe.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c index 5eb8ffe..874ef8c 100644 --- a/drivers/mtd/spi/sf_probe.c +++ b/drivers/mtd/spi/sf_probe.c @@ -68,6 +68,7 @@ static const struct spi_flash_params spi_flash_params_table[] = { {"MX25L25635F", 0xc22019, 0x0, 64 * 1024, 512, 0}, {"MX25L51235F", 0xc2201A, 0x0, 64 * 1024, 1024, 0}, {"MX25L12855E", 0xc22618, 0x0, 64 * 1024, 256, 0},
{"MX66L51235F", 0xc2201a, 0x0, 64 * 1024, 1024, 0},
What is this - this part is already available is int it?
I switched to your master branch and could not see this part added.
#endif #ifdef CONFIG_SPI_FLASH_SPANSION /* SPANSION */ {"S25FL008A", 0x010213, 0x0, 64 * 1024, 16, 0}, @@ -207,6 +208,7 @@ static struct spi_flash *spi_flash_validate_params(struct spi_slave *spi, flash->page_size = (ext_jedec == 0x4d00) ? 512 : 256; flash->sector_size = params->sector_size; flash->size = flash->sector_size * params->nr_sectors;
flash->memory_map = spi->memory_map;
This change is also there - please check.
Yes, this is there.

On Thu, Dec 19, 2013 at 10:33 AM, Sourav Poddar sourav.poddar@ti.com wrote:
On Thursday 19 December 2013 12:21 AM, Jagan Teki wrote:
On Thu, Nov 14, 2013 at 9:09 PM, Sourav Poddarsourav.poddar@ti.com wrote:
From: Jagannadha Sutradharudu Tekijagannadha.sutradharudu-teki@xilinx.com
Signed-off-by: Jagannadha Sutradharudu Tekijaganna@xilinx.com Signed-off-by: Sourav Poddarsourav.poddar@ti.com
drivers/mtd/spi/sf_probe.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c index 5eb8ffe..874ef8c 100644 --- a/drivers/mtd/spi/sf_probe.c +++ b/drivers/mtd/spi/sf_probe.c @@ -68,6 +68,7 @@ static const struct spi_flash_params spi_flash_params_table[] = { {"MX25L25635F", 0xc22019, 0x0, 64 * 1024, 512, 0}, {"MX25L51235F", 0xc2201A, 0x0, 64 * 1024, 1024, 0}, {"MX25L12855E", 0xc22618, 0x0, 64 * 1024, 256, 0},
{"MX66L51235F", 0xc2201a, 0x0, 64 * 1024, 1024,
0},
What is this - this part is already available is int it?
I switched to your master branch and could not see this part added.
http://git.denx.de/?p=u-boot/u-boot-spi.git;a=commitdiff;h=28303f617a01d6663...

On Thursday 19 December 2013 11:22 AM, Jagan Teki wrote:
On Thu, Dec 19, 2013 at 10:33 AM, Sourav Poddarsourav.poddar@ti.com wrote:
On Thursday 19 December 2013 12:21 AM, Jagan Teki wrote:
On Thu, Nov 14, 2013 at 9:09 PM, Sourav Poddarsourav.poddar@ti.com wrote:
From: Jagannadha Sutradharudu Tekijagannadha.sutradharudu-teki@xilinx.com
Signed-off-by: Jagannadha Sutradharudu Tekijaganna@xilinx.com Signed-off-by: Sourav Poddarsourav.poddar@ti.com
drivers/mtd/spi/sf_probe.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c index 5eb8ffe..874ef8c 100644 --- a/drivers/mtd/spi/sf_probe.c +++ b/drivers/mtd/spi/sf_probe.c @@ -68,6 +68,7 @@ static const struct spi_flash_params spi_flash_params_table[] = { {"MX25L25635F", 0xc22019, 0x0, 64 * 1024, 512, 0}, {"MX25L51235F", 0xc2201A, 0x0, 64 * 1024, 1024, 0}, {"MX25L12855E", 0xc22618, 0x0, 64 * 1024, 256, 0},
{"MX66L51235F", 0xc2201a, 0x0, 64 * 1024, 1024,
0},
What is this - this part is already available is int it?
I switched to your master branch and could not see this part added.
http://git.denx.de/?p=u-boot/u-boot-spi.git;a=commitdiff;h=28303f617a01d6663...
Looks like its a name change, mine is MX66L..with same property

On Thu, Dec 19, 2013 at 11:24 AM, Sourav Poddar sourav.poddar@ti.com wrote:
On Thursday 19 December 2013 11:22 AM, Jagan Teki wrote:
On Thu, Dec 19, 2013 at 10:33 AM, Sourav Poddarsourav.poddar@ti.com wrote:
On Thursday 19 December 2013 12:21 AM, Jagan Teki wrote:
On Thu, Nov 14, 2013 at 9:09 PM, Sourav Poddarsourav.poddar@ti.com wrote:
From: Jagannadha Sutradharudu Tekijagannadha.sutradharudu-teki@xilinx.com
Signed-off-by: Jagannadha Sutradharudu Tekijaganna@xilinx.com Signed-off-by: Sourav Poddarsourav.poddar@ti.com
drivers/mtd/spi/sf_probe.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c index 5eb8ffe..874ef8c 100644 --- a/drivers/mtd/spi/sf_probe.c +++ b/drivers/mtd/spi/sf_probe.c @@ -68,6 +68,7 @@ static const struct spi_flash_params spi_flash_params_table[] = { {"MX25L25635F", 0xc22019, 0x0, 64 * 1024, 512, 0}, {"MX25L51235F", 0xc2201A, 0x0, 64 * 1024, 1024, 0}, {"MX25L12855E", 0xc22618, 0x0, 64 * 1024, 256, 0},
{"MX66L51235F", 0xc2201a, 0x0, 64 * 1024, 1024,
0},
What is this - this part is already available is int it?
I switched to your master branch and could not see this part added.
http://git.denx.de/?p=u-boot/u-boot-spi.git;a=commitdiff;h=28303f617a01d6663...
Looks like its a name change, mine is MX66>>> while (words--) {
eL..with same property
Can you please check - does both were same dev-id's if same, do we have next id to differentiate (ext_jdec)

Add AM43xx specific changes.
Signed-off-by: Sourav Poddar sourav.poddar@ti.com --- drivers/spi/ti_qspi.c | 26 +++++++++++++++++++++++--- 1 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c index 5a5b482..5666250 100644 --- a/drivers/spi/ti_qspi.c +++ b/drivers/spi/ti_qspi.c @@ -11,6 +11,8 @@ #include <asm/arch/omap.h> #include <malloc.h> #include <spi.h> +#include <asm/gpio.h> +#include <asm/omap_gpio.h>
/* ti qpsi register bit masks */ #define QSPI_TIMEOUT 2000000 @@ -39,7 +41,8 @@ #define MM_SWITCH 0x01 #define MEM_CS 0x100 #define MEM_CS_UNSELECT 0xfffff0ff -#define MMAP_START_ADDR 0x5c000000 +#define MMAP_START_ADDR_DRA 0x5c000000 +#define MMAP_START_ADDR_AM43x 0x30000000 #define CORE_CTRL_IO 0x4a002558
#define QSPI_CMD_READ (0x3 << 0) @@ -99,7 +102,11 @@ static void ti_spi_setup_spi_register(struct ti_qspi_slave *qslave) struct spi_slave *slave = &qslave->slave; u32 memval = 0;
- slave->memory_map = (void *)MMAP_START_ADDR; +#ifdef CONFIG_DRA7XX + slave->memory_map = (void *)MMAP_START_ADDR_DRA; +#else + slave->memory_map = (void *)MMAP_START_ADDR_AM43x; +#endif
memval |= QSPI_CMD_READ | QSPI_SETUP0_NUM_A_BYTES | QSPI_SETUP0_NUM_D_BYTES_NO_BITS | @@ -165,6 +172,11 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, { struct ti_qspi_slave *qslave;
+#ifdef CONFIG_AM43XX + gpio_request(CONFIG_QSPI_SEL_GPIO, "qspi_gpio"); + gpio_direction_output(CONFIG_QSPI_SEL_GPIO, 1); +#endif + qslave = spi_alloc_slave(struct ti_qspi_slave, bus, cs); if (!qslave) { printf("SPI_error: Fail to allocate ti_qspi_slave\n"); @@ -229,7 +241,11 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, const uchar *txp = dout; uchar *rxp = din; uint status; - int timeout, val; + int timeout; + +#ifdef CONFIG_DRA7XX + int val; +#endif
debug("spi_xfer: bus:%i cs:%i bitlen:%i words:%i flags:%lx\n", slave->bus, slave->cs, bitlen, words, flags); @@ -237,15 +253,19 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, /* Setup mmap flags */ if (flags & SPI_XFER_MMAP) { writel(MM_SWITCH, &qslave->base->memswitch); +#ifdef CONFIG_DRA7XX val = readl(CORE_CTRL_IO); val |= MEM_CS; writel(val, CORE_CTRL_IO); +#endif return 0; } else if (flags & SPI_XFER_MMAP_END) { writel(~MM_SWITCH, &qslave->base->memswitch); +#ifdef CONFIG_DRA7XX val = readl(CORE_CTRL_IO); val &= MEM_CS_UNSELECT; writel(val, CORE_CTRL_IO); +#endif return 0; }

Without this delay, write/read is failing. Looks like, the WIP always remain set and hence a timeout occurs leading to the error.
Signed-off-by: Sourav Poddar sourav.poddar@ti.com --- Hi Jagan, This patch seems to be necessary for read/write. I tested by changing few timing variables, but it did not help. The same driver works on J6 with a differnet flash(S25FL256S). Is any one tested macronix flash at uboot?
drivers/spi/ti_qspi.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c index 5666250..aa7b6ae 100644 --- a/drivers/spi/ti_qspi.c +++ b/drivers/spi/ti_qspi.c @@ -285,6 +285,9 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, qslave->cmd |= QSPI_3_PIN; qslave->cmd |= 0xfff;
+#ifdef CONFIG_AM43XX + udelay(100); +#endif while (words--) { if (txp) { debug("tx cmd %08x dc %08x data %02x\n",

On Thu, Nov 14, 2013 at 9:09 PM, Sourav Poddar sourav.poddar@ti.com wrote:
Without this delay, write/read is failing. Looks like, the WIP always remain set and hence a timeout occurs leading to the error.
Signed-off-by: Sourav Poddar sourav.poddar@ti.com
Hi Jagan, This patch seems to be necessary for read/write. I tested by changing few timing variables, but it did not help. The same driver works on J6 with a differnet flash(S25FL256S). Is any one tested macronix flash at uboot?
Delay must be for macronix? or common for all flashes.
I haven't tested macronix
drivers/spi/ti_qspi.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c index 5666250..aa7b6ae 100644 --- a/drivers/spi/ti_qspi.c +++ b/drivers/spi/ti_qspi.c @@ -285,6 +285,9 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, qslave->cmd |= QSPI_3_PIN; qslave->cmd |= 0xfff;
+#ifdef CONFIG_AM43XX
udelay(100);
+#endif while (words--) { if (txp) { debug("tx cmd %08x dc %08x data %02x\n", -- 1.7.1
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

On Thursday 19 December 2013 12:17 AM, Jagan Teki wrote:
On Thu, Nov 14, 2013 at 9:09 PM, Sourav Poddarsourav.poddar@ti.com wrote:
Without this delay, write/read is failing. Looks like, the WIP always remain set and hence a timeout occurs leading to the error.
Signed-off-by: Sourav Poddarsourav.poddar@ti.com
Hi Jagan, This patch seems to be necessary for read/write. I tested by changing few timing variables, but it did not help. The same driver works on J6 with a differnet flash(S25FL256S). Is any one tested macronix flash at uboot?
Delay must be for macronix? or common for all flashes.
For macronix.
I haven't tested macronix
drivers/spi/ti_qspi.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c index 5666250..aa7b6ae 100644 --- a/drivers/spi/ti_qspi.c +++ b/drivers/spi/ti_qspi.c @@ -285,6 +285,9 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, qslave->cmd |= QSPI_3_PIN; qslave->cmd |= 0xfff;
+#ifdef CONFIG_AM43XX
udelay(100);
+#endif while (words--) { if (txp) { debug("tx cmd %08x dc %08x data %02x\n", -- 1.7.1
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

On Thu, Dec 19, 2013 at 10:35 AM, Sourav Poddar sourav.poddar@ti.com wrote:
On Thursday 19 December 2013 12:17 AM, Jagan Teki wrote:
On Thu, Nov 14, 2013 at 9:09 PM, Sourav Poddarsourav.poddar@ti.com wrote:
Without this delay, write/read is failing. Looks like, the WIP always remain set and hence a timeout occurs leading to the error.
Signed-off-by: Sourav Poddarsourav.poddar@ti.com
Hi Jagan, This patch seems to be necessary for read/write. I tested by changing few timing variables, but it did not help. The same driver works on J6 with a differnet flash(S25FL256S). Is any one tested macronix flash at uboot?
Delay must be for macronix? or common for all flashes.
For macronix.
All kind of micron parts or any specific.. bcz this delay seems to be not- a reasonable.
I haven't tested macronix
drivers/spi/ti_qspi.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c index 5666250..aa7b6ae 100644 --- a/drivers/spi/ti_qspi.c +++ b/drivers/spi/ti_qspi.c @@ -285,6 +285,9 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, qslave->cmd |= QSPI_3_PIN; qslave->cmd |= 0xfff;
+#ifdef CONFIG_AM43XX
udelay(100);
+#endif

On Thursday 19 December 2013 11:24 AM, Jagan Teki wrote:
On Thu, Dec 19, 2013 at 10:35 AM, Sourav Poddarsourav.poddar@ti.com wrote:
On Thursday 19 December 2013 12:17 AM, Jagan Teki wrote:
On Thu, Nov 14, 2013 at 9:09 PM, Sourav Poddarsourav.poddar@ti.com wrote:
Without this delay, write/read is failing. Looks like, the WIP always remain set and hence a timeout occurs leading to the error.
Signed-off-by: Sourav Poddarsourav.poddar@ti.com
Hi Jagan, This patch seems to be necessary for read/write. I tested by changing few timing variables, but it did not help. The same driver works on J6 with a differnet flash(S25FL256S). Is any one tested macronix flash at uboot?
Delay must be for macronix? or common for all flashes.
For macronix.
All kind of micron parts or any specific.. bcz this delay seems to be not- a reasonable.
that I am not sure as I have only one macronix flash to test with
I haven't tested macronix
drivers/spi/ti_qspi.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c index 5666250..aa7b6ae 100644 --- a/drivers/spi/ti_qspi.c +++ b/drivers/spi/ti_qspi.c @@ -285,6 +285,9 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, qslave->cmd |= QSPI_3_PIN; qslave->cmd |= 0xfff;
+#ifdef CONFIG_AM43XX
udelay(100);
+#endif

On Thu, Dec 19, 2013 at 11:24 AM, Sourav Poddar sourav.poddar@ti.com wrote:
On Thursday 19 December 2013 11:24 AM, Jagan Teki wrote:
On Thu, Dec 19, 2013 at 10:35 AM, Sourav Poddarsourav.poddar@ti.com wrote:
On Thursday 19 December 2013 12:17 AM, Jagan Teki wrote:
On Thu, Nov 14, 2013 at 9:09 PM, Sourav Poddarsourav.poddar@ti.com wrote:
Without this delay, write/read is failing. Looks like, the WIP always remain set and hence a timeout occurs leading to the error.
Signed-off-by: Sourav Poddarsourav.poddar@ti.com
Hi Jagan, This patch seems to be necessary for read/write. I tested by changing few timing variables, but it did not help. The same driver works on J6 with a differnet flash(S25FL256S). Is any one tested macronix flash at uboot?
Delay must be for macronix? or common for all flashes.
For macronix.
All kind of micron parts or any specific.. bcz this delay seems to be not- a reasonable.
that I am not sure as I have only one macronix flash to test with
Honestly, I don't recommend to use standalone delay with works for specific to flash part. That even harm your driver as well... Please try to identify the fix - can you send the data-sheet link you referred to this part...
Also please try to post the bug log w/o delay..if possible.
I haven't tested macronix
drivers/spi/ti_qspi.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c index 5666250..aa7b6ae 100644 --- a/drivers/spi/ti_qspi.c +++ b/drivers/spi/ti_qspi.c @@ -285,6 +285,9 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, qslave->cmd |= QSPI_3_PIN; qslave->cmd |= 0xfff;
+#ifdef CONFIG_AM43XX
udelay(100);
+#endif

On Thursday 14 November 2013 09:09 PM, Sourav Poddar wrote:
The patch series add support for enabling qspi on AM43xx at uboot.
Testing done:
Wrote a uImage to the flash, read it back and boot the kernel.
Jagannadha Sutradharudu Teki (1): sf: macronix: Add support for MX25L51235F
Sourav Poddar (4): am43xx: add qspi support am437x_epos_evm: add SPL API, QSPI, and serial flash support qspi/spi: Add AM43xx specifics changes am43xx: add delay before xfer
arch/arm/cpu/armv7/am33xx/clock_am43xx.c | 1 + arch/arm/include/asm/arch-am33xx/cpu.h | 4 +++- arch/arm/include/asm/arch-am33xx/omap.h | 1 + board/ti/am43xx/mux.c | 11 +++++++++++ drivers/mtd/spi/sf_probe.c | 2 ++ drivers/spi/ti_qspi.c | 29 ++++++++++++++++++++++++++--- include/configs/am43xx_evm.h | 20 ++++++++++++++++++++ 7 files changed, 64 insertions(+), 4 deletions(-)
The above series depends on this patch series: http://www.mail-archive.com/u-boot@lists.denx.de/msg125001.html

Hi Jagan, On Thursday 14 November 2013 09:09 PM, Sourav Poddar wrote:
The patch series add support for enabling qspi on AM43xx at uboot.
Testing done:
Wrote a uImage to the flash, read it back and boot the kernel.
Jagannadha Sutradharudu Teki (1): sf: macronix: Add support for MX25L51235F
Sourav Poddar (4): am43xx: add qspi support am437x_epos_evm: add SPL API, QSPI, and serial flash support qspi/spi: Add AM43xx specifics changes am43xx: add delay before xfer
arch/arm/cpu/armv7/am33xx/clock_am43xx.c | 1 + arch/arm/include/asm/arch-am33xx/cpu.h | 4 +++- arch/arm/include/asm/arch-am33xx/omap.h | 1 + board/ti/am43xx/mux.c | 11 +++++++++++ drivers/mtd/spi/sf_probe.c | 2 ++ drivers/spi/ti_qspi.c | 29 ++++++++++++++++++++++++++--- include/configs/am43xx_evm.h | 20 ++++++++++++++++++++ 7 files changed, 64 insertions(+), 4 deletions(-)
If these patches seems fine to you, can these be picked?

On Mon, Nov 25, 2013 at 4:28 PM, Sourav Poddar sourav.poddar@ti.com wrote:
Hi Jagan,
On Thursday 14 November 2013 09:09 PM, Sourav Poddar wrote:
The patch series add support for enabling qspi on AM43xx at uboot.
Testing done:
Wrote a uImage to the flash, read it back and boot the kernel.
Jagannadha Sutradharudu Teki (1): sf: macronix: Add support for MX25L51235F
Sourav Poddar (4): am43xx: add qspi support am437x_epos_evm: add SPL API, QSPI, and serial flash support qspi/spi: Add AM43xx specifics changes am43xx: add delay before xfer
arch/arm/cpu/armv7/am33xx/clock_am43xx.c | 1 + arch/arm/include/asm/arch-am33xx/cpu.h | 4 +++- arch/arm/include/asm/arch-am33xx/omap.h | 1 + board/ti/am43xx/mux.c | 11 +++++++++++ drivers/mtd/spi/sf_probe.c | 2 ++ drivers/spi/ti_qspi.c | 29 ++++++++++++++++++++++++++--- include/configs/am43xx_evm.h | 20 ++++++++++++++++++++ 7 files changed, 64 insertions(+), 4 deletions(-)
If these patches seems fine to you, can these be picked?
Please send the next version patches - fix the comments as we discussed so far.

On Thursday 19 December 2013 12:24 PM, Jagan Teki wrote:
On Mon, Nov 25, 2013 at 4:28 PM, Sourav Poddarsourav.poddar@ti.com wrote:
Hi Jagan,
On Thursday 14 November 2013 09:09 PM, Sourav Poddar wrote:
The patch series add support for enabling qspi on AM43xx at uboot.
Testing done:
Wrote a uImage to the flash, read it back and boot the kernel.
Jagannadha Sutradharudu Teki (1): sf: macronix: Add support for MX25L51235F
Sourav Poddar (4): am43xx: add qspi support am437x_epos_evm: add SPL API, QSPI, and serial flash support qspi/spi: Add AM43xx specifics changes am43xx: add delay before xfer
arch/arm/cpu/armv7/am33xx/clock_am43xx.c | 1 + arch/arm/include/asm/arch-am33xx/cpu.h | 4 +++- arch/arm/include/asm/arch-am33xx/omap.h | 1 + board/ti/am43xx/mux.c | 11 +++++++++++ drivers/mtd/spi/sf_probe.c | 2 ++ drivers/spi/ti_qspi.c | 29 ++++++++++++++++++++++++++--- include/configs/am43xx_evm.h | 20 ++++++++++++++++++++ 7 files changed, 64 insertions(+), 4 deletions(-)
If these patches seems fine to you, can these be picked?
Please send the next version patches - fix the comments as we discussed so far.
I will send the next version. But, what about the delay patch, I tried other stuffs but could not see any thing that helps. So, I will send the delay patch also as of now, to make it work out of mainline.

On Thu, Dec 19, 2013 at 12:37 PM, Sourav Poddar sourav.poddar@ti.com wrote:
On Thursday 19 December 2013 12:24 PM, Jagan Teki wrote:
On Mon, Nov 25, 2013 at 4:28 PM, Sourav Poddarsourav.poddar@ti.com wrote:
Hi Jagan,
On Thursday 14 November 2013 09:09 PM, Sourav Poddar wrote:
The patch series add support for enabling qspi on AM43xx at uboot.
Testing done:
Wrote a uImage to the flash, read it back and boot the kernel.
Jagannadha Sutradharudu Teki (1): sf: macronix: Add support for MX25L51235F
Sourav Poddar (4): am43xx: add qspi support am437x_epos_evm: add SPL API, QSPI, and serial flash support qspi/spi: Add AM43xx specifics changes am43xx: add delay before xfer
arch/arm/cpu/armv7/am33xx/clock_am43xx.c | 1 + arch/arm/include/asm/arch-am33xx/cpu.h | 4 +++- arch/arm/include/asm/arch-am33xx/omap.h | 1 + board/ti/am43xx/mux.c | 11 +++++++++++ drivers/mtd/spi/sf_probe.c | 2 ++ drivers/spi/ti_qspi.c | 29 ++++++++++++++++++++++++++--- include/configs/am43xx_evm.h | 20 ++++++++++++++++++++ 7 files changed, 64 insertions(+), 4 deletions(-)
If these patches seems fine to you, can these be picked?
Please send the next version patches - fix the comments as we discussed so far.
I will send the next version. But, what about the delay patch, I tried other stuffs but could not see any thing that helps. So, I will send the delay patch also as of now, to make it work out of mainline.
I am some how OK with that as that change is in ur driver..
Just try this change /* FIXME: comments here... */ +#ifdef CONFIG_AM43XX + udelay(100); +#endif
And also write the bug log on commit message(means with out delay)
Try to ass the testing logs on doc/ - for each time you tested a new flash or new driver.

On Thursday 19 December 2013 12:49 PM, Jagan Teki wrote:
On Thu, Dec 19, 2013 at 12:37 PM, Sourav Poddarsourav.poddar@ti.com wrote:
On Thursday 19 December 2013 12:24 PM, Jagan Teki wrote:
On Mon, Nov 25, 2013 at 4:28 PM, Sourav Poddarsourav.poddar@ti.com wrote:
Hi Jagan,
On Thursday 14 November 2013 09:09 PM, Sourav Poddar wrote:
The patch series add support for enabling qspi on AM43xx at uboot.
Testing done:
Wrote a uImage to the flash, read it back and boot the kernel.
Jagannadha Sutradharudu Teki (1): sf: macronix: Add support for MX25L51235F
Sourav Poddar (4): am43xx: add qspi support am437x_epos_evm: add SPL API, QSPI, and serial flash support qspi/spi: Add AM43xx specifics changes am43xx: add delay before xfer
arch/arm/cpu/armv7/am33xx/clock_am43xx.c | 1 + arch/arm/include/asm/arch-am33xx/cpu.h | 4 +++- arch/arm/include/asm/arch-am33xx/omap.h | 1 + board/ti/am43xx/mux.c | 11 +++++++++++ drivers/mtd/spi/sf_probe.c | 2 ++ drivers/spi/ti_qspi.c | 29
++++++++++++++++++++++++++--- include/configs/am43xx_evm.h | 20 ++++++++++++++++++++ 7 files changed, 64 insertions(+), 4 deletions(-)
If these patches seems fine to you, can these be picked?
Please send the next version patches - fix the comments as we discussed so far.
I will send the next version. But, what about the delay patch, I tried other stuffs but could not see any thing that helps. So, I will send the delay patch also as of now, to make it work out of mainline.
I am some how OK with that as that change is in ur driver..
Just try this change /* FIXME: comments here... */ +#ifdef CONFIG_AM43XX
- udelay(100);
+#endif
And also write the bug log on commit message(means with out delay)
Try to ass the testing logs on doc/ - for each time you tested a new flash or new driver.
Ok. I will do as you suggest above, Will add a doc/ for am43x also as it is there for dra.
Thanks, Sourav

On Thursday 19 December 2013 12:49 PM, Jagan Teki wrote:
On Thu, Dec 19, 2013 at 12:37 PM, Sourav Poddarsourav.poddar@ti.com wrote:
On Thursday 19 December 2013 12:24 PM, Jagan Teki wrote:
On Mon, Nov 25, 2013 at 4:28 PM, Sourav Poddarsourav.poddar@ti.com wrote:
Hi Jagan,
On Thursday 14 November 2013 09:09 PM, Sourav Poddar wrote:
The patch series add support for enabling qspi on AM43xx at uboot.
Testing done:
Wrote a uImage to the flash, read it back and boot the kernel.
Jagannadha Sutradharudu Teki (1): sf: macronix: Add support for MX25L51235F
Sourav Poddar (4): am43xx: add qspi support am437x_epos_evm: add SPL API, QSPI, and serial flash support qspi/spi: Add AM43xx specifics changes am43xx: add delay before xfer
arch/arm/cpu/armv7/am33xx/clock_am43xx.c | 1 + arch/arm/include/asm/arch-am33xx/cpu.h | 4 +++- arch/arm/include/asm/arch-am33xx/omap.h | 1 + board/ti/am43xx/mux.c | 11 +++++++++++ drivers/mtd/spi/sf_probe.c | 2 ++ drivers/spi/ti_qspi.c | 29
++++++++++++++++++++++++++--- include/configs/am43xx_evm.h | 20 ++++++++++++++++++++ 7 files changed, 64 insertions(+), 4 deletions(-)
If these patches seems fine to you, can these be picked?
Please send the next version patches - fix the comments as we discussed so far.
I will send the next version. But, what about the delay patch, I tried other stuffs but could not see any thing that helps. So, I will send the delay patch also as of now, to make it work out of mainline.
I am some how OK with that as that change is in ur driver..
Just try this change /* FIXME: comments here... */ +#ifdef CONFIG_AM43XX
- udelay(100);
+#endif
And also write the bug log on commit message(means with out delay)
Try to ass the testing logs on doc/ - for each time you tested a new flash or new driver.
Jagan,
Just realised that this patches depends on AM43x base patches which are in ti-uboot mainline tree. So, what should I do in that case. ?

On Thu, Dec 19, 2013 at 2:17 PM, Sourav Poddar sourav.poddar@ti.com wrote:
On Thursday 19 December 2013 12:49 PM, Jagan Teki wrote:
On Thu, Dec 19, 2013 at 12:37 PM, Sourav Poddarsourav.poddar@ti.com wrote:
On Thursday 19 December 2013 12:24 PM, Jagan Teki wrote:
On Mon, Nov 25, 2013 at 4:28 PM, Sourav Poddarsourav.poddar@ti.com wrote:
Hi Jagan,
On Thursday 14 November 2013 09:09 PM, Sourav Poddar wrote:
The patch series add support for enabling qspi on AM43xx at uboot.
Testing done:
Wrote a uImage to the flash, read it back and boot the kernel.
Jagannadha Sutradharudu Teki (1): sf: macronix: Add support for MX25L51235F
Sourav Poddar (4): am43xx: add qspi support am437x_epos_evm: add SPL API, QSPI, and serial flash support qspi/spi: Add AM43xx specifics changes am43xx: add delay before xfer
arch/arm/cpu/armv7/am33xx/clock_am43xx.c | 1 + arch/arm/include/asm/arch-am33xx/cpu.h | 4 +++- arch/arm/include/asm/arch-am33xx/omap.h | 1 + board/ti/am43xx/mux.c | 11 +++++++++++ drivers/mtd/spi/sf_probe.c | 2 ++ drivers/spi/ti_qspi.c | 29
++++++++++++++++++++++++++--- include/configs/am43xx_evm.h | 20 ++++++++++++++++++++ 7 files changed, 64 insertions(+), 4 deletions(-)
If these patches seems fine to you, can these be picked?
Please send the next version patches - fix the comments as we discussed so far.
I will send the next version. But, what about the delay patch, I tried other stuffs but could not see any thing that helps. So, I will send the delay patch also as of now, to make it work out of mainline.
I am some how OK with that as that change is in ur driver..
Just try this change /* FIXME: comments here... */ +#ifdef CONFIG_AM43XX
- udelay(100);
+#endif
And also write the bug log on commit message(means with out delay)
Try to ass the testing logs on doc/ - for each time you tested a new flash or new driver.
Jagan,
Just realised that this patches depends on AM43x base patches which are in ti-uboot mainline tree. So, what should I do in that case. ?
Send all of them together..!

On Thursday 19 December 2013 02:21 PM, Jagan Teki wrote:
On Thu, Dec 19, 2013 at 2:17 PM, Sourav Poddarsourav.poddar@ti.com wrote:
On Thursday 19 December 2013 12:49 PM, Jagan Teki wrote:
On Thu, Dec 19, 2013 at 12:37 PM, Sourav Poddarsourav.poddar@ti.com wrote:
On Thursday 19 December 2013 12:24 PM, Jagan Teki wrote:
On Mon, Nov 25, 2013 at 4:28 PM, Sourav Poddarsourav.poddar@ti.com wrote:
Hi Jagan,
On Thursday 14 November 2013 09:09 PM, Sourav Poddar wrote: > The patch series add support for enabling qspi > on AM43xx at uboot. > > Testing done: > ------------- > Wrote a uImage to the flash, read it back and boot the > kernel. > > Jagannadha Sutradharudu Teki (1): > sf: macronix: Add support for MX25L51235F > > Sourav Poddar (4): > am43xx: add qspi support > am437x_epos_evm: add SPL API, QSPI, and serial flash support > qspi/spi: Add AM43xx specifics changes > am43xx: add delay before xfer > > arch/arm/cpu/armv7/am33xx/clock_am43xx.c | 1 + > arch/arm/include/asm/arch-am33xx/cpu.h | 4 +++- > arch/arm/include/asm/arch-am33xx/omap.h | 1 + > board/ti/am43xx/mux.c | 11 +++++++++++ > drivers/mtd/spi/sf_probe.c | 2 ++ > drivers/spi/ti_qspi.c | 29 > ++++++++++++++++++++++++++--- > include/configs/am43xx_evm.h | 20 > ++++++++++++++++++++ > 7 files changed, 64 insertions(+), 4 deletions(-) > If these patches seems fine to you, can these be picked?
Please send the next version patches - fix the comments as we discussed so far.
I will send the next version. But, what about the delay patch, I tried other stuffs but could not see any thing that helps. So, I will send the delay patch also as of now, to make it work out of mainline.
I am some how OK with that as that change is in ur driver..
Just try this change /* FIXME: comments here... */ +#ifdef CONFIG_AM43XX
- udelay(100);
+#endif
And also write the bug log on commit message(means with out delay)
Try to ass the testing logs on doc/ - for each time you tested a new flash or new driver.
Jagan,
Just realised that this patches depends on AM43x base patches which are in ti-uboot mainline tree. So, what should I do in that case. ?
Send all of them together..!
So, I should send all the base patches also? Note: These dependendt patches are already there in tom ti-uboot mainline tree.

On Thu, Dec 19, 2013 at 2:28 PM, Sourav Poddar sourav.poddar@ti.com wrote:
On Thursday 19 December 2013 02:21 PM, Jagan Teki wrote:
On Thu, Dec 19, 2013 at 2:17 PM, Sourav Poddarsourav.poddar@ti.com wrote:
On Thursday 19 December 2013 12:49 PM, Jagan Teki wrote:
On Thu, Dec 19, 2013 at 12:37 PM, Sourav Poddarsourav.poddar@ti.com wrote:
On Thursday 19 December 2013 12:24 PM, Jagan Teki wrote:
On Mon, Nov 25, 2013 at 4:28 PM, Sourav Poddarsourav.poddar@ti.com wrote: > > Hi Jagan, > > On Thursday 14 November 2013 09:09 PM, Sourav Poddar wrote: >> >> The patch series add support for enabling qspi >> on AM43xx at uboot. >> >> Testing done: >> ------------- >> Wrote a uImage to the flash, read it back and boot the >> kernel. >> >> Jagannadha Sutradharudu Teki (1): >> sf: macronix: Add support for MX25L51235F >> >> Sourav Poddar (4): >> am43xx: add qspi support >> am437x_epos_evm: add SPL API, QSPI, and serial flash support >> qspi/spi: Add AM43xx specifics changes >> am43xx: add delay before xfer >> >> arch/arm/cpu/armv7/am33xx/clock_am43xx.c | 1 + >> arch/arm/include/asm/arch-am33xx/cpu.h | 4 +++- >> arch/arm/include/asm/arch-am33xx/omap.h | 1 + >> board/ti/am43xx/mux.c | 11 +++++++++++ >> drivers/mtd/spi/sf_probe.c | 2 ++ >> drivers/spi/ti_qspi.c | 29 >> ++++++++++++++++++++++++++--- >> include/configs/am43xx_evm.h | 20 >> ++++++++++++++++++++ >> 7 files changed, 64 insertions(+), 4 deletions(-) >> > If these patches seems fine to you, can these be picked?
Please send the next version patches - fix the comments as we discussed so far.
I will send the next version. But, what about the delay patch, I tried other stuffs but could not see any thing that helps. So, I will send the delay patch also as of now, to make it work out of mainline.
I am some how OK with that as that change is in ur driver..
Just try this change /* FIXME: comments here... */ +#ifdef CONFIG_AM43XX
- udelay(100);
+#endif
And also write the bug log on commit message(means with out delay)
Try to ass the testing logs on doc/ - for each time you tested a new flash or new driver.
Jagan,
Just realised that this patches depends on AM43x base patches which are in ti-uboot mainline tree. So, what should I do in that case. ?
Send all of them together..!
So, I should send all the base patches also?
AM437x is a new board for denx or already available?
Note: These dependendt patches are already there in tom ti-uboot mainline tree.

On Thu, Dec 19, 2013 at 2:28 PM, Sourav Poddar sourav.poddar@ti.com wrote:
On Thursday 19 December 2013 02:21 PM, Jagan Teki wrote:
On Thu, Dec 19, 2013 at 2:17 PM, Sourav Poddarsourav.poddar@ti.com wrote:
On Thursday 19 December 2013 12:49 PM, Jagan Teki wrote:
On Thu, Dec 19, 2013 at 12:37 PM, Sourav Poddarsourav.poddar@ti.com wrote:
On Thursday 19 December 2013 12:24 PM, Jagan Teki wrote:
On Mon, Nov 25, 2013 at 4:28 PM, Sourav Poddarsourav.poddar@ti.com wrote: > > Hi Jagan, > > On Thursday 14 November 2013 09:09 PM, Sourav Poddar wrote: >> >> The patch series add support for enabling qspi >> on AM43xx at uboot. >> >> Testing done: >> ------------- >> Wrote a uImage to the flash, read it back and boot the >> kernel. >> >> Jagannadha Sutradharudu Teki (1): >> sf: macronix: Add support for MX25L51235F >> >> Sourav Poddar (4): >> am43xx: add qspi support >> am437x_epos_evm: add SPL API, QSPI, and serial flash support >> qspi/spi: Add AM43xx specifics changes >> am43xx: add delay before xfer >> >> arch/arm/cpu/armv7/am33xx/clock_am43xx.c | 1 + >> arch/arm/include/asm/arch-am33xx/cpu.h | 4 +++- >> arch/arm/include/asm/arch-am33xx/omap.h | 1 + >> board/ti/am43xx/mux.c | 11 +++++++++++ >> drivers/mtd/spi/sf_probe.c | 2 ++ >> drivers/spi/ti_qspi.c | 29 >> ++++++++++++++++++++++++++--- >> include/configs/am43xx_evm.h | 20 >> ++++++++++++++++++++ >> 7 files changed, 64 insertions(+), 4 deletions(-) >> > If these patches seems fine to you, can these be picked?
Please send the next version patches - fix the comments as we discussed so far.
I will send the next version. But, what about the delay patch, I tried other stuffs but could not see any thing that helps. So, I will send the delay patch also as of now, to make it work out of mainline.
I am some how OK with that as that change is in ur driver..
Just try this change /* FIXME: comments here... */ +#ifdef CONFIG_AM43XX
- udelay(100);
+#endif
And also write the bug log on commit message(means with out delay)
Try to ass the testing logs on doc/ - for each time you tested a new flash or new driver.
Jagan,
Just realised that this patches depends on AM43x base patches which are in ti-uboot mainline tree. So, what should I do in that case. ?
Send all of them together..!
So, I should send all the base patches also?
am43xx_evm is already available - all patches means related to spi for this board. If OK then send
Note: These dependendt patches are already there in tom ti-uboot mainline tree.

On Thursday 19 December 2013 02:50 PM, Jagan Teki wrote:
On Thu, Dec 19, 2013 at 2:28 PM, Sourav Poddarsourav.poddar@ti.com wrote:
On Thursday 19 December 2013 02:21 PM, Jagan Teki wrote:
On Thu, Dec 19, 2013 at 2:17 PM, Sourav Poddarsourav.poddar@ti.com wrote:
On Thursday 19 December 2013 12:49 PM, Jagan Teki wrote:
On Thu, Dec 19, 2013 at 12:37 PM, Sourav Poddarsourav.poddar@ti.com wrote:
On Thursday 19 December 2013 12:24 PM, Jagan Teki wrote: > On Mon, Nov 25, 2013 at 4:28 PM, Sourav Poddarsourav.poddar@ti.com > wrote: >> Hi Jagan, >> >> On Thursday 14 November 2013 09:09 PM, Sourav Poddar wrote: >>> The patch series add support for enabling qspi >>> on AM43xx at uboot. >>> >>> Testing done: >>> ------------- >>> Wrote a uImage to the flash, read it back and boot the >>> kernel. >>> >>> Jagannadha Sutradharudu Teki (1): >>> sf: macronix: Add support for MX25L51235F >>> >>> Sourav Poddar (4): >>> am43xx: add qspi support >>> am437x_epos_evm: add SPL API, QSPI, and serial flash support >>> qspi/spi: Add AM43xx specifics changes >>> am43xx: add delay before xfer >>> >>> arch/arm/cpu/armv7/am33xx/clock_am43xx.c | 1 + >>> arch/arm/include/asm/arch-am33xx/cpu.h | 4 +++- >>> arch/arm/include/asm/arch-am33xx/omap.h | 1 + >>> board/ti/am43xx/mux.c | 11 +++++++++++ >>> drivers/mtd/spi/sf_probe.c | 2 ++ >>> drivers/spi/ti_qspi.c | 29 >>> ++++++++++++++++++++++++++--- >>> include/configs/am43xx_evm.h | 20 >>> ++++++++++++++++++++ >>> 7 files changed, 64 insertions(+), 4 deletions(-) >>> >> If these patches seems fine to you, can these be picked? > Please send the next version patches - fix the comments as we > discussed > so > far. > I will send the next version. But, what about the delay patch, I tried other stuffs but could not see any thing that helps. So, I will send the delay patch also as of now, to make it work out of mainline.
I am some how OK with that as that change is in ur driver..
Just try this change /* FIXME: comments here... */ +#ifdef CONFIG_AM43XX
- udelay(100);
+#endif
And also write the bug log on commit message(means with out delay)
Try to ass the testing logs on doc/ - for each time you tested a new flash or new driver.
Jagan,
Just realised that this patches depends on AM43x base patches which are in ti-uboot mainline tree. So, what should I do in that case. ?
Send all of them together..!
So, I should send all the base patches also?
am43xx_evm is already available - all patches means related to spi for this board. If OK then send
Ok. Actually bassic board support is already there. But there were few updated done on baseport side to make these reach uboot prompt. I will test with those patches and send you only the spi part for pull bsed on your master branch.
Note: These dependendt patches are already there in tom ti-uboot mainline tree.

On Thursday 19 December 2013 02:50 PM, Jagan Teki wrote:
On Thu, Dec 19, 2013 at 2:28 PM, Sourav Poddarsourav.poddar@ti.com wrote:
On Thursday 19 December 2013 02:21 PM, Jagan Teki wrote:
On Thu, Dec 19, 2013 at 2:17 PM, Sourav Poddarsourav.poddar@ti.com wrote:
On Thursday 19 December 2013 12:49 PM, Jagan Teki wrote:
On Thu, Dec 19, 2013 at 12:37 PM, Sourav Poddarsourav.poddar@ti.com wrote:
On Thursday 19 December 2013 12:24 PM, Jagan Teki wrote: > On Mon, Nov 25, 2013 at 4:28 PM, Sourav Poddarsourav.poddar@ti.com > wrote: >> Hi Jagan, >> >> On Thursday 14 November 2013 09:09 PM, Sourav Poddar wrote: >>> The patch series add support for enabling qspi >>> on AM43xx at uboot. >>> >>> Testing done: >>> ------------- >>> Wrote a uImage to the flash, read it back and boot the >>> kernel. >>> >>> Jagannadha Sutradharudu Teki (1): >>> sf: macronix: Add support for MX25L51235F >>> >>> Sourav Poddar (4): >>> am43xx: add qspi support >>> am437x_epos_evm: add SPL API, QSPI, and serial flash support >>> qspi/spi: Add AM43xx specifics changes >>> am43xx: add delay before xfer >>> >>> arch/arm/cpu/armv7/am33xx/clock_am43xx.c | 1 + >>> arch/arm/include/asm/arch-am33xx/cpu.h | 4 +++- >>> arch/arm/include/asm/arch-am33xx/omap.h | 1 + >>> board/ti/am43xx/mux.c | 11 +++++++++++ >>> drivers/mtd/spi/sf_probe.c | 2 ++ >>> drivers/spi/ti_qspi.c | 29 >>> ++++++++++++++++++++++++++--- >>> include/configs/am43xx_evm.h | 20 >>> ++++++++++++++++++++ >>> 7 files changed, 64 insertions(+), 4 deletions(-) >>> >> If these patches seems fine to you, can these be picked? > Please send the next version patches - fix the comments as we > discussed > so > far. > I will send the next version. But, what about the delay patch, I tried other stuffs but could not see any thing that helps. So, I will send the delay patch also as of now, to make it work out of mainline.
I am some how OK with that as that change is in ur driver..
Just try this change /* FIXME: comments here... */ +#ifdef CONFIG_AM43XX
- udelay(100);
+#endif
And also write the bug log on commit message(means with out delay)
Try to ass the testing logs on doc/ - for each time you tested a new flash or new driver.
Jagan,
Just realised that this patches depends on AM43x base patches which are in ti-uboot mainline tree. So, what should I do in that case. ?
Send all of them together..!
So, I should send all the base patches also?
am43xx_evm is already available - all patches means related to spi for this board. If OK then send
Note: These dependendt patches are already there in tom ti-uboot mainline tree.
I am getting this error while building with this patches drivers/spi/built-in.o: In function `spi_setup_slave': /home/a0131647/clone/u-boot/drivers/spi/ti_qspi.c:180: undefined reference to `gpio_request' /home/a0131647/clone/u-boot/drivers/spi/ti_qspi.c:181: undefined reference to `gpio_direction_output' arm-linux-gnueabihf-ld.bfd: BFD (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) 2.23.1 assertion fail /cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/src/binutils-2.23.1/bfd/elf32-arm.c:7677 arm-linux-gnueabihf-ld.bfd: BFD (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) 2.23.1 assertion fail /cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/src/binutils-2.23.1/bfd/elf32-arm.c:7677 arm-linux-gnueabihf-ld.bfd: error: required section '.rel.plt' not found in the linker script arm-linux-gnueabihf-ld.bfd: final link failed: Invalid operation
I think there is something else that need to be merged from ti-uboot tree as I am not facing this issue there
participants (2)
-
Jagan Teki
-
Sourav Poddar