Linux:设备树到acpi驱动程序 [英] Linux: device tree to acpi driver

查看:211
本文介绍了Linux:设备树到acpi驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这方面我需要帮助,我的驱动程序已经在设备树模式下工作,并且我想为其支持acpi模式,但在创建分区上却卡住了:

I need help on this, my driver already work on device tree mode, and I want support acpi mode for it, I'm stuck on create partitions:

设备树:

&spi0 {
status = "ok";

flash: n25q256a@0 {
status = "ok";
cell-index = <0>;
#address-cells = <1>;
#size-cells = <1>;
    compatible = "n25q256a";
    reg = <0>;
    spi-max-frequency = <15000000>;
    spi-cpha;
    spi-cpol;

    partition@0x00000000 {
        label = "Boot loader";
        reg = <0x00000000 0x01000000>;
    };
    partition@0x01000000 {
            label = "n25q256a-test";
            reg = <0x01000000 0x01000000>;
    };
    partition@0x01100000 {
            label = "n25q256a-data";
            reg = <0x01100000 0x00f00000>;
    };
  };
};

下面是acpi表:

        Device (N25P){      
            Name (_ADR, 1)
            Name (_CID, "N25Q256A")
            Name (_CRS, ResourceTemplate (){
                SPISerialBus(
                    0,          //Slave select CS0 (_ADR)
                    PolarityLow,        //Polarity of CS0 output(_DPL)
                    FourWireMode,       //(_MOD)
                    8,          //8-bit frame(_LEN)
                    ControllerInitiated,    //(_SLV)
                    15000000,       //Speed Hz (_SPE)
                    ClockPolarityHigh,  //(_POL)
                    ClockPhaseSecond,   //(_PHA)
                    "\\_SB.AHBC.SPI0",          //Controller
                )

            })
        //============ Partitons =========
        }

推荐答案

X86支持ACPI模型,作为ARM,POWERPC支持dts,如果您尝试将驱动程序用于x86,那么您正是在该位置加载该驱动程序ACPI表??.从类似于dts的"of_match_table"的驱动程序角度来看,ACPI模型将存在"acpi_match_table"

X86 supports ACPI Model, where as ARM, POWERPC supports dts, if you are trying to use your driver for x86, then where exactly you are trying to load this ACPI table ??. From driver perspective similar to "of_match_table" for dts, there will be "acpi_match_table" for ACPI Model

这篇关于Linux:设备树到acpi驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆