Content originally posted in LPCWare by nohabviktor on Wed Dec 03 07:01:49 MST 2014
Hi!
I have a custom board with LPC1788, 32Mbyte SDRAM, 128 Mbyte Nand flash, on 108Mhz.
I configure the SSP/SPI driver with amba linux driver:
static struct amba_device lpc178x_spi1_dev = {
.dev = {
.coherent_dma_mask = ~0,
.init_name = "dev:ssp1",
.platform_data = &lpc178x_spi1_data,
},
.res = {
.start = SPI_LPC178X_DEV1_REGS,
.end = SPI_LPC178X_DEV1_REGS +
SPI_LPC178X_REGS_SIZE,
.flags = IORESOURCE_MEM,
},
.dma_mask = ~0,
.irq = {SPI_LPC178X_DEV1_IRQ, NO_IRQ},
};
and mmc:
static struct pl022_config_chip spi1_slave = {
.com_mode = INTERRUPT_TRANSFER,
.iface = SSP_INTERFACE_MOTOROLA_SPI,
.hierarchy = SSP_MASTER,
.slave_tx_disable = 0,
.rx_lev_trig = SSP_RX_32_OR_MORE_ELEM,
.tx_lev_trig = SSP_TX_32_OR_MORE_EMPTY_LOC,
.ctrl_len = SSP_BITS_8,
.data_size = SSP_DATA_BITS_8,
.wait_state = SSP_MWIRE_WAIT_ZERO,
.duplex = SSP_MICROWIRE_CHANNEL_FULL_DUPLEX,
.cs_control = spi1_lpc178x_flash_cs__lpc178x_eval,
};
static struct mmc_spi_platform_data mmc_pdata = {
.detect_delay = 100,
.powerup_msecs = 100,
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
};
static struct spi_board_info spi_devices_info[] __initdata =
{
{
.modalias = "mmc_spi",
.max_speed_hz = 20000000,
.bus_num = 1,
.chip_select = 0,
.controller_data = &spi1_slave,
.mode = SPI_MODE_0,
.platform_data = &mmc_pdata,
}
uclinux kernel info:
mmc_spi spi1.0: SD/MMC host mmc0, no WP, no poweroff
mmc_spi spi1.0: can't change chip-select polarity
...
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new SDHC card on SPI
mmcblk0: mmc0:0000 00000 14.7 GiB
mmcblk0: p1
The problem is the reading from sd card is very slow.
My qt project size is 6 Mbyte and if I copied to sd card or run from sd card is always more then 1 minute:
~ # date
Wed Dec 3 13:57:10 UTC 2014
~ #
~ # cp card/qt /
~ #
~ # date
Wed Dec 3 13:58:12 UTC 2014
Please give me an advice on what could be the problem?
Thank you