29.05.2019 11:21, Joseph Lo пишет: > This patch adds the required APIs and variables for the EMC scaling > sequence code on Tegra210. > > Based on the work of Peter De Schrijver <pdeschrijver@xxxxxxxxxx>. > > Signed-off-by: Joseph Lo <josephl@xxxxxxxxxx> > --- > v4: > - fix the API with generic naming > - use 'u16' in 'struct emc_table_register_offset' > --- > > +extern const struct emc_table_register_offset reg_off; > +extern unsigned long dram_over_temp_state; Please avoid global variables where they are not really needed. Add reg_off pointer to tegra_emc. Remove dram_over_temp_state variable entirely and replace it with TEGRA_DRAM_OVER_TEMP_NONE in the code since nothing changes the variable. Again, prepend all global symbols with tegra210_. Alternatively you could simply include tegra210-emc-cc-r21021.c into tegra210-emc.c, I don't see anything wrong with that variant. #include "tegra210-emc-cc-r21021.c" Or you could squash it all into a single source file if variants other than "r21021" are not planned to be supported. This will help to reduce messiness of the code and will allow compiler to better optimize it all. -- Dmitry