]> err.no Git - linux-2.6/commitdiff
[Blackfin] arch: Add platform support for MTD DATAFLASH
authorMichael Hennerich <michael.hennerich@analog.com>
Thu, 24 Apr 2008 00:46:19 +0000 (08:46 +0800)
committerBryan Wu <cooloney@kernel.org>
Thu, 24 Apr 2008 00:46:19 +0000 (08:46 +0800)
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
arch/blackfin/mach-bf537/boards/stamp.c

index e95478252c877b32c7f9184f782979b6deaa1dfc..d4cbcb8774e70be1cbbe6b07998d7a4c8a6bfbda 100644 (file)
@@ -503,6 +503,15 @@ static struct bfin5xx_spi_chip spidev_chip_info = {
 };
 #endif
 
+#if defined(CONFIG_MTD_DATAFLASH) \
+       || defined(CONFIG_MTD_DATAFLASH_MODULE)
+/* DataFlash chip */
+static struct bfin5xx_spi_chip data_flash_chip_info = {
+       .enable_dma = 0,         /* use dma transfer with this chip*/
+       .bits_per_word = 8,
+};
+#endif
+
 static struct spi_board_info bfin_spi_board_info[] __initdata = {
 #if defined(CONFIG_MTD_M25P80) \
        || defined(CONFIG_MTD_M25P80_MODULE)
@@ -517,7 +526,17 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
                .mode = SPI_MODE_3,
        },
 #endif
-
+#if defined(CONFIG_MTD_DATAFLASH) \
+       || defined(CONFIG_MTD_DATAFLASH_MODULE)
+       {       /* DataFlash chip */
+               .modalias = "mtd_dataflash",
+               .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
+               .bus_num = 0, /* Framework bus number */
+               .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
+               .controller_data = &data_flash_chip_info,
+               .mode = SPI_MODE_3,
+       },
+#endif
 #if defined(CONFIG_SPI_ADC_BF533) \
        || defined(CONFIG_SPI_ADC_BF533_MODULE)
        {