AnsweredAssumed Answered

tftpboot ${loadaddr} uImage problem

Question asked by cao ping on Oct 10, 2014
Latest reply on Oct 14, 2014 by cao ping

now i want to boot from SPI3:0,and i modify the code like this:

 

void spi_io_init(struct imx_spi_dev_t *dev)
{
u32 reg;

switch (dev->base) {
case ECSPI1_BASE_ADDR:
  /* Enable clock */
  reg = readl(CCM_BASE_ADDR + CLKCTL_CCGR1);
  reg |= 0x3;
  writel(reg, CCM_BASE_ADDR + CLKCTL_CCGR1);

#if defined CONFIG_MX6Q
  /* SCLK */
  mxc_iomux_v3_setup_pad(MX6Q_PAD_KEY_COL0__ECSPI1_SCLK);

  /* MISO */
  mxc_iomux_v3_setup_pad(MX6Q_PAD_KEY_COL1__ECSPI1_MISO);

  /* MOSI */
  mxc_iomux_v3_setup_pad(MX6Q_PAD_KEY_ROW0__ECSPI1_MOSI);

  mxc_iomux_v3_setup_pad(MX6Q_PAD_KEY_ROW1__ECSPI1_SS0);
#elif defined CONFIG_MX6DL
  /* SCLK */
  mxc_iomux_v3_setup_pad(MX6DL_PAD_KEY_COL0__ECSPI1_SCLK);

  /* MISO */
  mxc_iomux_v3_setup_pad(MX6DL_PAD_KEY_COL1__ECSPI1_MISO);

  /* MOSI */
  mxc_iomux_v3_setup_pad(MX6DL_PAD_KEY_ROW0__ECSPI1_MOSI);

  mxc_iomux_v3_setup_pad(MX6DL_PAD_KEY_ROW1__ECSPI1_SS0);
#endif
  break;
case ECSPI2_BASE_ADDR:
case ECSPI3_BASE_ADDR:
  /* ecspi2-3 fall through */
  break;
default:
  break;
}

 

s32 spi_get_cfg(struct imx_spi_dev_t *dev)
{
switch (dev->slave.cs) {
case 0:
  /* SPI-NOR */
  dev->base = ECSPI1_BASE_ADDR;
  dev->freq = 25000000;
  dev->ss_pol = IMX_SPI_ACTIVE_LOW;
  dev->ss = 0;
  dev->fifo_sz = 64 * 4;
  dev->us_delay = 0;
  break;
case 1:
  /* SPI-NOR */
  dev->base = ECSPI1_BASE_ADDR;
  dev->freq = 25000000;
  dev->ss_pol = IMX_SPI_ACTIVE_LOW;
  dev->ss = 1;
  dev->fifo_sz = 64 * 4;
  dev->us_delay = 0;
  break;
default:
  printf("Invalid Bus ID!\n");
}

return 0;

}

 

and under uboot, when i input:

MX6Q  U-Boot > sf probe 2:0

it display like this:

JEDEC ID: 0x20:0x20:0x16

4096 KiB M25P32 - 4MB at 2:0 is now current device

 

but when i use tftpboot cmd,errors occur:

 

MX6Q  U-Boot > tftpboot ${loadaddr} uImage

PHY indentify @ 0x0 = 0x0007c0f1

FEC: Link is Up 782d

Using FEC0 device

TFTP from server 192.168.3.153; our IP address is 192.168.3.221

Filename 'uImage'.

Load address: 0x10800000

Loading: TX timeout packet at 2786e2c0

TX timeout packet at 2786e2c0

TX not ready

TX timeout packet at 2786e2c0

T TX not ready

TX timeout packet at 2786e2c0

 

and when the image starts in linux,it can exchange data with my computer by net,so i don't why it can not transfer data with tftp?

Outcomes