Linux version 4.14.40
&gpmc {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&fpga_x16_default>;
ranges = <2 0 0x02000000 0x01000000>; /* CS2 space. Min partition = 16MB */
fpga@2,0 {
compatible = "mtd-ram";
reg = <2 0 0x01000000>; /* CS2 */
bank-width = <2>;
gpmc,cs-on-ns = <0>;
gpmc,cs-rd-off-ns = <14>; /* tCEA + tCHZ + 1 */
gpmc,cs-wr-off-ns = <12>;
gpmc,adv-on-ns = <0>; /* cs-on-ns */
gpmc,adv-rd-off-ns = <2>; /* min( tALH + tALS + 1) */
gpmc,adv-wr-off-ns = <2>; /* min( tALH + tALS + 1) */
gpmc,we-on-ns = <6>; /* cs-on-ns */
gpmc,we-off-ns = <10>; /* we-on-time + tWP + 2 */
gpmc,oe-on-ns = <4>; /* cs-on-ns + tRR + 2 */
gpmc,oe-off-ns = <12>; /* oe-on-ns + tRP + 2 */
gpmc,access-ns = <10>; /* tCEA + 4 read access*/
gpmc,rd-cycle-ns = <10>;
gpmc,wr-cycle-ns = <16>;
gpmc,bus-turnaround-ns = <0>;
gpmc,cycle2cycle-delay-ns = <2>;
gpmc,cycle2cycle-samecsen = <1>;
gpmc,cycle2cycle-diffcsen = <0>;
gpmc,wr-access-ns = <40>;
gpmc,wr-data-mux-bus-ns = <4>;
};
};
cat /proc/iomem
02000000-02ffffff : 2000000.fpga
能直接使用devmem命令访问02000000-02ffffff吗? 也不用写任何代码就这么简单? 在phymap_of_core.c已完成地址映射并且在/dev目录下生成mtdblock5设备节点,这个节点有用吗?