AnsweredAssumed Answered

u-boot access

Question asked by h-endou on Jun 4, 2013
Latest reply on Jun 4, 2013 by Aaronwu

Hi, Software enginner


I have a question about u-boot access.


When u-boot accesses a Flash device,

The internal function(1) which is called from SPI common function(2)

seems to check whether if there is "Ctrl+C".

When the function(1) detected "Ctrl+C" input, SPI access processing seems to stop

processing. Is this intended processing?

If it is the processing intended, what kind of thing is this processing assume?




  • Driver for Blackfin On-Chip SPI device
  • Copyright (c) 2005-2010 Analog Devices Inc.
  • Licensed under the GPL-2 or later.



"Ctrl+C" is called ('**'mark below)


static int spi_pio_xfer(struct bfin_spi_slave *bss, const u8 *tx, u8 *rx,

   uint bytes)


/* discard invalid data and clear RXS */  read_SPI_RDBR(bss);

/* todo: take advantage of hardware fifos  */  while (bytes--) {

  u8 value = (tx ? *tx++ : CONFIG_BFIN_SPI_IDLE_VAL);

  debug("%s: tx:%x ", __func__, value);

  write_SPI_TDBR(bss, value);


  while ((read_SPI_STAT(bss) & TXS))

**if (ctrlc())

    return -1;

  while (!(read_SPI_STAT(bss) & SPIF))

**if (ctrlc())

    return -1;

  while (!(read_SPI_STAT(bss) & RXS))

**if (ctrlc())

    return -1;

  value = read_SPI_RDBR(bss);

  if (rx)

   *rx++ = value;

  debug("rx:%x\n", value);



return 0;




Best Regards,