My linux is 3.3.0 from http://git.xilinx.com and i found the driver of QSPI to be located at /driver/spi/spi-xilinx-qps.c.
The flash is s25fl256s1 of spansion. My dts file about qspi is follow.
qspi0: spi@e000d000 {
compatible = "xlnx,ps7-qspi-1.00.a";
reg = <0xE000D000 0x1000>;
interrupts = <0 19 0>;
interrupt-parent = <&gic>;
speed-hz = <200000000>;
bus-num = <1>;
num-chip-select = <1>;
#address-cells = <1>;
#size-cells = <0>;
is-dual = <0>;
flash@0 {
compatible = "s25fl256s1";
reg = <0x0>;
spi-max-frequency = <50000000>;
#address-cells = <1>;
#size-cells = <1>;
partition@qspi-fsbl {
label = "qspi-fsbl";
reg = <0x0 0x80000>;
};
partition@qspi-u-boot {
label = "qspi-u-boot";
reg = <0x80000 0x80000>;
};
partition@qspi-linux {
label = "qspi-linux";
reg = <0x100000 0x500000>;
};
partition@qspi-device-tree {
label = "qspi-device-tree";
reg = <0x600000 0x20000>;
};
partition@qspi-user {
label = "qspi-user";
reg = <0x620000 0xE0000>;
};
partition@qspi-scratch {
label = "qspi-scratch";
reg = <0x700000 0x100000>;
};
partition@qspi-rootfs {
label = "qspi-rootfs";
reg = <0x800000 0x800000>;
};
};
The linux boot information is follow:
m25p80 spi1.0: s25fl256s1 (32768 Kbytes)
5 ofpart partitions found on MTD device spi1.0
Creating 5 MTD partitions on "spi1.0":
0x000000000000-0x000000500000 : "qspi-boot" u001E
0x000000500000-0x0000007c0000 : "qspi-linux"
0x0000007c0000-0x000000800000 : "qspi-device-tree"
0x000000800000-0x000000c00000 : "qspi-rootfs"
0x000000c00000-0x000001000000 : "qspi-user"
xqspips e000d000.spi: at 0xE000D000 mapped to 0xE0862000, irq=51
mnt # flashcp -v ramdisk8M.image.gz /dev/mtd4
Erasing blocks: 51/51 (100%)
Writing data: 3257k/0k (100%))
Verifying data: 10k/0k (3257%)File does not seem to match flash data. First mismatch at 0x00000000-0x00002800
The flashcp command seemed not work well and i read the mtdblock use "sf read" command in u-boot comfirm that write unsuccessfully.
I don't know where is wrong, have the driver of spi-xilinx-qps.c some problems?
Can anyone give me some suggest?Thank!