AnsweredAssumed Answered

device tree with variable number of cpu

Question asked by Niklas Molin on Feb 24, 2015
Latest reply on Mar 3, 2015 by Glen Fine

Hi.

 

If I have an image I want to be able to run in either IMX6Q (4 cores) or IMX6D (2 cores).

Is there a way for the Linux kernel to adjust after number of cores the CPU has or do I need to compile to different images?

In the device tree (for SabreSD there is some configurations for the CPUs, imx6q.dtsi):

 

cpus {

  #address-cells = <1>;

  #size-cells = <0>;

 

 

  cpu0: cpu@0 {

  compatible = "arm,cortex-a9";

  device_type = "cpu";

  reg = <0>;

  next-level-cache = <&L2>;

  operating-points = <

  /* kHz    uV */

  1200000 1275000

  996000  1250000

  852000  1250000

  792000  1150000

  396000  975000

  >;

  fsl,soc-operating-points = <

  /* ARM kHz  SOC-PU uV */

  1200000       1275000

  996000        1250000

  852000        1250000

  792000        1175000

  396000        1175000

  >;

  clock-latency = <61036>; /* two CLK32 periods */

  clocks = <&clks 104>, <&clks 6>, <&clks 16>,

  <&clks 17>, <&clks 170>;

  clock-names = "arm", "pll2_pfd2_396m", "step",

       "pll1_sw", "pll1_sys";

  arm-supply = <&reg_arm>;

  pu-supply = <&reg_pu>;

  soc-supply = <&reg_soc>;

  };

  cpu@1 {

  compatible = "arm,cortex-a9";

  device_type = "cpu";

  reg = <1>;

  next-level-cache = <&L2>;

  };

  cpu@2 {

  compatible = "arm,cortex-a9";

  device_type = "cpu";

  reg = <2>;

  next-level-cache = <&L2>;

  };

  cpu@3 {

  compatible = "arm,cortex-a9";

  device_type = "cpu";

  reg = <3>;

  next-level-cache = <&L2>;

  };

};

 

Thanks,

Niklas

 

Outcomes