| 98668247 | 18-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_center() part 10
Fix the return value of the function to match common convention where 0 means success and negative means error. Fix the return value
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_center() part 10
Fix the return value of the function to match common convention where 0 means success and negative means error. Fix the return values in case of an error to use errno.h codes.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 0113c3e1 | 18-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_center() part 9
The read_group and write_group arguments are the same in all cases when this function is invoked, just merge them into one rw_group a
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_center() part 9
The read_group and write_group arguments are the same in all cases when this function is invoked, just merge them into one rw_group argument. Also, clean up the function argument data types and constify them.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 0c4be198 | 18-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_center() part 8
The search_stop_check() always resets the bit_chk to a new value, so bit_chk will never survive between search_left_edge() and search
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_center() part 8
The search_stop_check() always resets the bit_chk to a new value, so bit_chk will never survive between search_left_edge() and search_right_edge() invocation. There is thus no need to pass it into these functions, so make bit_chk local to them.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 5d6db444 | 18-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_center() part 7
Perform minor reordering of the function to make the code more organised, no functional change.
Signed-off-by: Marek Vasut <marex@de
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_center() part 7
Perform minor reordering of the function to make the code more organised, no functional change.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| ffb8b66e | 18-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_center() part 6
Factor out center_dq_windows(), which is common code between stage 2 and stage 3 of the calibration again and cater for the minor dif
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_center() part 6
Factor out center_dq_windows(), which is common code between stage 2 and stage 3 of the calibration again and cater for the minor differences.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| afb3eb84 | 18-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_center() part 5
Factor out the get_window_mid_index() for finding the best DQ window centering. This is again code common to two stages, so pull it o
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_center() part 5
Factor out the get_window_mid_index() for finding the best DQ window centering. This is again code common to two stages, so pull it out.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| f0712c35 | 18-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_center() part 4
First of all, don't break strings in the debug_cond() calls across multiple lines. Next, zap a couple of really odd casts in the code
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_center() part 4
First of all, don't break strings in the debug_cond() calls across multiple lines. Next, zap a couple of really odd casts in the code. Finally, make i into a signed variable, so it is possible to avoid constructs of the form: for (i = FOO;; i--) { <code>; if (i == 0) break; }.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 901dc36e | 13-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_center() part 3
Factor out common code from search_left_edge() and search_right_edge() which checks whether searching for the window edge should stop
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_center() part 3
Factor out common code from search_left_edge() and search_right_edge() which checks whether searching for the window edge should stop. The code is almost identical, so pull it into separate function and cater for the minor differences.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 71120773 | 13-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_center() part 2
Factor out common code from rw_mgr_mem_calibrate_writes_center() and rw_mgr_mem_calibrate_vfifo_center() for searching for the left e
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_center() part 2
Factor out common code from rw_mgr_mem_calibrate_writes_center() and rw_mgr_mem_calibrate_vfifo_center() for searching for the left edge of the window. The code is almost identical, so pull it into separate function and cater for the minor differences.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| c4907898 | 13-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_center() part 1
Factor out common code from rw_mgr_mem_calibrate_writes_center() and rw_mgr_mem_calibrate_vfifo_center() for searching for the right
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_center() part 1
Factor out common code from rw_mgr_mem_calibrate_writes_center() and rw_mgr_mem_calibrate_vfifo_center() for searching for the right edge of the window. The code is almost identical, so pull it into separate function and cater for the minor differences.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| db3a6061 | 18-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_writes()
Reorder the content of the function a little and fix the comments so they at least become full sentences. Constify function args. Fix the return v
ddr: altera: Clean up rw_mgr_mem_calibrate_writes()
Reorder the content of the function a little and fix the comments so they at least become full sentences. Constify function args. Fix the return value to match the common convention of 0 meaning success.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 783fcf59 | 20-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_read_test() part 5
Make the function documentation into kerneldoc.
Signed-off-by: Marek Vasut <marex@denx.de> |
| ba522c76 | 19-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_read_test() part 4
Clean up the inner loop a bit. No functional change.
Signed-off-by: Marek Vasut <marex@denx.de> |
| 7ce23bb6 | 19-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_read_test() part 3
The C language has signed types, so make use of them. Fix this obscene loop, which tries to do away with unsigned type, but just makes t
ddr: altera: Clean up rw_mgr_mem_calibrate_read_test() part 3
The C language has signed types, so make use of them. Fix this obscene loop, which tries to do away with unsigned type, but just makes the code more cryptic.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 3cb8bf3f | 19-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_read_test() part 2
Clean up data types and constify where applicable. No function change.
Signed-off-by: Marek Vasut <marex@denx.de> |
| 3853d65e | 19-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_read_test() part 1
Clean up the debug output handling at the end of the function and factor out common function call from the condition.
Signed-off-by: Ma
ddr: altera: Clean up rw_mgr_mem_calibrate_read_test() part 1
Clean up the debug output handling at the end of the function and factor out common function call from the condition.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 96df6036 | 19-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_read_test_all_ranks()
Signed-off-by: Marek Vasut <marex@denx.de> |
| 33756893 | 20-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_find_dqs_en_phase() part 7
Add kerneldoc, no functional change.
Signed-off-by: Marek Vasut <marex@denx.de> |
| 914546e7 | 20-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_find_dqs_en_phase() part 6
Fix the return value to match common conventions and propagate this change through the code.
Signed-off-by: Marek Vasut <
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_find_dqs_en_phase() part 6
Fix the return value to match common conventions and propagate this change through the code.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 5735540f | 20-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_find_dqs_en_phase() part 5
Fix the data types, constify where applicable.
Signed-off-by: Marek Vasut <marex@denx.de> |
| 52e8f217 | 19-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_find_dqs_en_phase() part 4
Implement common sdr_find_phase_delay() function and convert all places which use such code to this unified function. No f
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_find_dqs_en_phase() part 4
Implement common sdr_find_phase_delay() function and convert all places which use such code to this unified function. No functional change to the code.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 37b7b13d | 19-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_find_dqs_en_phase() part 3
Clean up odd multiline loop, no functional change.
Signed-off-by: Marek Vasut <marex@denx.de> |
| 23e8ea90 | 19-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_find_dqs_en_phase() part 2
If d != 0 after sdr_working_phase() finishes, the else branch of the condition has no impact on anything at all, since wor
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_find_dqs_en_phase() part 2
If d != 0 after sdr_working_phase() finishes, the else branch of the condition has no impact on anything at all, since work_end was already set independently of the value of "d" . Zap this useless code.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 2f3589ca | 19-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_find_dqs_en_phase() part 1
Fix broken multiline debug strings, fix comments. No functional change.
Signed-off-by: Marek Vasut <marex@denx.de> |
| d145ca9f | 19-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up find_vfifo_read()
Fix data types, constify where applicable, fix comments and debug strings. In case enough failing reads are detected, just return right away instead of breaki
ddr: altera: Clean up find_vfifo_read()
Fix data types, constify where applicable, fix comments and debug strings. In case enough failing reads are detected, just return right away instead of breaking from the loop. This lets us make the error handling at the end much simpler.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|