on duplicating device tree clk constants

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

Just now I'm working on improvement of device tree support in barebox-mips.

I have examined some existing ARM device trees. I have a clock-related question.
I'll use tegra20 device tree as an example.

We have the include/dt-bindings/clock/tegra20-car.h file with clock numbers defines:

Here is a small part of the file:

  #define TEGRA20_CLK_CPU 0
  /* 1 */
  /* 2 */
  #define TEGRA20_CLK_AC97 3
  #define TEGRA20_CLK_RTC 4
  #define TEGRA20_CLK_TIMER 5
  #define TEGRA20_CLK_UARTA 6

At the other hand we have enum tegra20_clks definition in the drivers/clk/tegra/clk-tegra20.c file:

  enum tegra20_clks {
        cpu, ac97 = 3, rtc, timer, uarta, uartb, gpio, sdmmc2, i2s1 = 11, i2c1,
        ndflash, sdmmc1, sdmmc4, twc, pwm, i2s2, epp, gr2d = 21, usbd, isp,

I see that the constants are the same, but they have differrent names.

Can we drop duplicated definitions?

What device tree clock design pattern I have to use for new code?

-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux