On Fri, Jun 17, 2011 at 04:30, Mike Frysinger wrote:
> --- a/drivers/spi/spi_bfin5xx.c
> +++ b/drivers/spi/spi_bfin5xx.c
> @@ -641,8 +641,9 @@
> drv_data->cs_change = transfer->cs_change;
>
> /* Bits per word setup */
> - bits_per_word = transfer->bits_per_word ? : message->spi->bits_per_word;
> - if ((bits_per_word > 0) && (bits_per_word % 16 == 0)) {
> + bits_per_word = transfer->bits_per_word ? :
> + message->spi->bits_per_word ? : 8;
> + if (bits_per_word % 16 == 0) {
> drv_data->n_bytes = bits_per_word/8;
> drv_data->len = (transfer->len) >> 1;
> cr_width = BIT_CTL_WORDSIZE;
and this one does seem to work for me ;)
m25p80 spi0.1: m25p16 (2048 Kbytes)
Creating 2 MTD partitions on "m25p80":
0x000000000000-0x000000080000 : "bootloader(spi)"
0x000000080000-0x000000200000 : "linux kernel(spi)"
...
root:/> md5sum /dev/mtd5
974c71e79f02e0e4085d436fbebae0ba /dev/mtd5
root:/> md5sum /dev/mtd5
974c71e79f02e0e4085d436fbebae0ba /dev/mtd5
root:/> md5sum /dev/mtd5
974c71e79f02e0e4085d436fbebae0ba /dev/mtd5
...
root:/> hexdump -C /dev/mtd5 | head -1
00000000 01 50 be ad 00 00 a0 ff 00 00 00 00 60 79 04 00 |.P..........`y..|
(that's the right ldr signature from u-boot.ldr)
-mike
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits