cpufreq: move get idle time functions to cpufreq.c

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
cpufreq: ondemand: adapt to the get cpu idle time function changes.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
cpufreq: interactive: squash the whole driver code from HH, making some adjustments due to older Kernel version and non-MSM chip.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
defconfig: updates

Signed-off-by: Dan Trifan <jimsth@gmail.com>
Revert "omap2: overclock ram."

This reverts commit b40fefdf208b81b9d2fc5f21b01b44f321b398a2.

Signed-off-by: Dan Trifan <jimsth@gmail.com>
Revert "optimized LPDDR RAM timings (~10% throughput increase)"

This reverts commit 619b6b35471c5f25aee941c8f0b266300d22dc8f.

Signed-off-by: Dan Trifan <jimsth@gmail.com>
OMAP4470 LPDDR interface configuration update for 466MHz

Some instability with OMAP4470 when running the DDR at 466MHz is
discovered. This instability is resolved with updated LPDDR settings:

- DLL delay should be set to 461ps:
DDR_PHY_CTRL_1_SHDW[11:4] = 0x37

- Read latency should be set to 0xB:
DDR_PHY_CTRL_1_SHDW[3:0] = 0xB

- Slew Rate should be set to “FASTEST” and Impedance Control to “Drv12”:
CONTROL_LPDDR2IOx_2[LPDDR2IO1_GR10_SR] = 0
CONTROL_LPDDR2IOx_2[LPDDR2IO1_GR10_I] = 7
where x=[1-2]

x-loader performs settings all these parameters.
The patch prevents DLL delay to be overridden by the kernel.

Change-Id: Ic7d1733f6c00941f20a2648303a0cb47761ac5df
Signed-off-by: Volodymyr Mieshkov <volodymyr.mieshkov@ti.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
OMAP4: EMIF: code cleanup and clarification

Removed unused fields of emif_regs structure and
functions that initialize or change them.

Also changed few names of emif_regs members
to match register names.

This made the code easier to understand and read
as well as made it a little bit faster

Change-Id: I0485a01b7f03e922b5a2e69bfb03c2ed941fcf3b
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
OMAP4: EMIF: LPDDR interface configuration update

In latest TRMs for OMAP4 family LPDDR recommended
setting have been changed. This patch does
corresponding changes in the code.

Change-Id: Ibd81b8196db74df5a7c3e29788c72a7b3628a22c
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
OMAP2: OC Ram according to lastest OZ updates. (466mhz)

Signed-off-by: Dan Trifan <jimsth@gmail.com>
Tweaked RAM timings for better throughtput.

Based on researches by @Pattyboi, @Ziyann and @freshgiammi.
Thanks to @Boype for the first ram timing tweaks.
(RGBandwidth, misc, 1 thread, 20 benchmarks best result wins)

       Stock                     Tweaked

Copy   1249.9 MB/s  -> 1428.7 MB/s -->   14.5 % improvement
Scale  1084.8 MB/s  -> 1304.5 MB/s -->   20.3 % improvement
Add     938.4 MB/s   -> 1223.8 MB/s -->    30.4 % improvement
Triad   923.0 MB/s   ->  1191,7 MB/s -->   29.1 % improvement

Signed-off-by: Gianmarco Rengucci <rengucci.gianmarco@gmail.com>

Signed-off-by: Dan Trifan <jimsth@gmail.com>
omap2: enable some erratas

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
init: debug: bye bye

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
writeback: Fix occasional slow sync(1)

In case when system contains no dirty pages, wakeup_flusher_threads()
will submit WB_SYNC_NONE writeback for 0 pages so wb_writeback() exits
immediately without doing anything. Thus sync(1) will write all the
dirty inodes from a WB_SYNC_ALL writeback pass which is slow.

Fix the problem by using get_nr_dirty_pages() in
wakeup_flusher_threads() instead of calculating number of dirty pages
manually. That function also takes number of dirty inodes into account.

CC: stable@vger.kernel.org
Reported-by: Paul Taysom <taysom@chromium.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Cristoforo Cataldo <cristoforo.cataldo@gmail.com>
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
i think this needs applied as well

Signed-off-by: Dan Trifan <jimsth@gmail.com>