Blackfin arch: Add MTD Partitions for MTD_DATAFLASH, increase max SPI SCLK
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
This commit is contained in:
parent
b8e6c91c74
commit
ceac2651e9
@ -584,6 +584,30 @@ static struct bfin5xx_spi_chip spidev_chip_info = {
|
|||||||
|
|
||||||
#if defined(CONFIG_MTD_DATAFLASH) \
|
#if defined(CONFIG_MTD_DATAFLASH) \
|
||||||
|| defined(CONFIG_MTD_DATAFLASH_MODULE)
|
|| defined(CONFIG_MTD_DATAFLASH_MODULE)
|
||||||
|
|
||||||
|
static struct mtd_partition bfin_spi_dataflash_partitions[] = {
|
||||||
|
{
|
||||||
|
.name = "bootloader(spi)",
|
||||||
|
.size = 0x00040000,
|
||||||
|
.offset = 0,
|
||||||
|
.mask_flags = MTD_CAP_ROM
|
||||||
|
}, {
|
||||||
|
.name = "linux kernel(spi)",
|
||||||
|
.size = 0xe0000,
|
||||||
|
.offset = MTDPART_OFS_APPEND,
|
||||||
|
}, {
|
||||||
|
.name = "file system(spi)",
|
||||||
|
.size = MTDPART_SIZ_FULL,
|
||||||
|
.offset = MTDPART_OFS_APPEND,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct flash_platform_data bfin_spi_dataflash_data = {
|
||||||
|
.name = "SPI Dataflash",
|
||||||
|
.parts = bfin_spi_dataflash_partitions,
|
||||||
|
.nr_parts = ARRAY_SIZE(bfin_spi_dataflash_partitions),
|
||||||
|
};
|
||||||
|
|
||||||
/* DataFlash chip */
|
/* DataFlash chip */
|
||||||
static struct bfin5xx_spi_chip data_flash_chip_info = {
|
static struct bfin5xx_spi_chip data_flash_chip_info = {
|
||||||
.enable_dma = 0, /* use dma transfer with this chip*/
|
.enable_dma = 0, /* use dma transfer with this chip*/
|
||||||
@ -609,9 +633,10 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
|
|||||||
|| defined(CONFIG_MTD_DATAFLASH_MODULE)
|
|| defined(CONFIG_MTD_DATAFLASH_MODULE)
|
||||||
{ /* DataFlash chip */
|
{ /* DataFlash chip */
|
||||||
.modalias = "mtd_dataflash",
|
.modalias = "mtd_dataflash",
|
||||||
.max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
|
.max_speed_hz = 33250000, /* max spi clock (SCK) speed in HZ */
|
||||||
.bus_num = 0, /* Framework bus number */
|
.bus_num = 0, /* Framework bus number */
|
||||||
.chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
|
.chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
|
||||||
|
.platform_data = &bfin_spi_dataflash_data,
|
||||||
.controller_data = &data_flash_chip_info,
|
.controller_data = &data_flash_chip_info,
|
||||||
.mode = SPI_MODE_3,
|
.mode = SPI_MODE_3,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user