0

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:

Device Tree:

&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>;
    };
  };
};

Below is acpi table:

        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 =========
        }
perror
  • 7,071
  • 16
  • 58
  • 85
  • 1
    Welcome to Stack Overflow! Just to inform you, Stack Overflow is an English speaking site. So even though you did have English too, someone edited out the section in Vietnamese. In future please stick to english, and people can help edit your posts if you're uncertain about your skills with english. – SuperBiasedMan Aug 07 '15 at 11:05

1 Answers1

0

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

anikhan
  • 1,147
  • 3
  • 18
  • 44
  • Thanks you. Currently, ACPI (tianocore + linux) not support to partition a memory on ARM, so I was modify acpi table and ofpart.c to make it work. Hope this feature will be add in next release of linux and tianocore for ARM. – Đạt Teo Sep 12 '15 at 15:26