| c452dcd0 | 16-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Internal mem_calibrate() cleanup part 5
This is kind of microseries-within-series indent cleanup. Rework the code for the the middle-loop of the mega-loop this time and deal with the gr
ddr: altera: Internal mem_calibrate() cleanup part 5
This is kind of microseries-within-series indent cleanup. Rework the code for the the middle-loop of the mega-loop this time and deal with the group_failed variable. Instead of checking if the group failed in the previous calibration part, just jump to the end of the loop if calibration did fail and increment the counter. This shaves away one more level of indent while making the code slightly more readable.
It is likely that this patch has checkpatch warnings, but for the sake of not breaking the code, these are ignored.
No functional change.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| c50ae303 | 16-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Internal mem_calibrate() cleanup part 4
This is kind of microseries-within-series indent cleanup. Rework the code for the last loop within the mega-loop to make it actually readable and
ddr: altera: Internal mem_calibrate() cleanup part 4
This is kind of microseries-within-series indent cleanup. Rework the code for the last loop within the mega-loop to make it actually readable and not an insane cryptic pile of indent failure.
It is likely that this patch has checkpatch warnings, but for the sake of not breaking the code, these are ignored.
No functional change.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 8213609e | 16-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Internal mem_calibrate() cleanup part 3
This is kind of microseries-within-series indent cleanup. Rework the code for the third loop within the middle-loop of the mega-loop to make it a
ddr: altera: Internal mem_calibrate() cleanup part 3
This is kind of microseries-within-series indent cleanup. Rework the code for the third loop within the middle-loop of the mega-loop to make it actually readable and not an insane cryptic pile of indent failure.
It is likely that this patch has checkpatch warnings, but for the sake of not breaking the code, these are ignored.
No functional change.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 4ac21610 | 16-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Internal mem_calibrate() cleanup part 2
This is kind of microseries-within-series indent cleanup. Rework the code for the second loop within the middle-loop of the mega-loop to make it
ddr: altera: Internal mem_calibrate() cleanup part 2
This is kind of microseries-within-series indent cleanup. Rework the code for the second loop within the middle-loop of the mega-loop to make it actually readable and not an insane cryptic pile of indent failure.
It is likely that this patch has checkpatch warnings, but for the sake of not breaking the code, these are ignored.
No functional change.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 33c42bb8 | 16-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Internal mem_calibrate() cleanup part 1
This is kind of microseries-within-series indent cleanup. Rework the code for the first loop within the middle-loop of the mega-loop to make it a
ddr: altera: Internal mem_calibrate() cleanup part 1
This is kind of microseries-within-series indent cleanup. Rework the code for the first loop within the middle-loop of the mega-loop to make it actually readable and not an insane cryptic pile of indent failure.
It is likely that this patch has checkpatch warnings, but for the sake of not breaking the code, these are ignored.
No functional change.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 722c9685 | 16-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Trivial mem_calibrate() indent cleanup
Redo the mega-condition such that if the calibration is to be skipped, the positive branch of the condition does all the work and returns. The neg
ddr: altera: Trivial mem_calibrate() indent cleanup
Redo the mega-condition such that if the calibration is to be skipped, the positive branch of the condition does all the work and returns. The negative branch, which is in fact the default behavior, is then converted to a code which is no longer conditional. This trims down the indent by one level.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 51cea0b6 | 26-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Minor clean up of mem_skip_calibrate()
Perform minor coding style cleanup of the mem_skip_calibrate() function, clean up comments and add kerneldoc. No functional change.
Signed-off-by
ddr: altera: Minor clean up of mem_skip_calibrate()
Perform minor coding style cleanup of the mem_skip_calibrate() function, clean up comments and add kerneldoc. No functional change.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 080bf64e | 20-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up set_rank_and_odt_mask() part 3
Clean up comments and add kerneldoc.
Signed-off-by: Marek Vasut <marex@denx.de> |
| 287cdf6b | 20-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up set_rank_and_odt_mask() part 2
Turn the big inner if (RW_MGR_MEM_NUMBER_OF_RANKS == ...) conditional into a switch {} statement instead. No functional change.
Signed-off-by: M
ddr: altera: Clean up set_rank_and_odt_mask() part 2
Turn the big inner if (RW_MGR_MEM_NUMBER_OF_RANKS == ...) conditional into a switch {} statement instead. No functional change.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| b2dfd100 | 20-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up set_rank_and_odt_mask() part 1
First, invert the logic of the if (odt_mode == ...) conditional to make the OFF mode harder to miss. It is a short piece of code right at the end
ddr: altera: Clean up set_rank_and_odt_mask() part 1
First, invert the logic of the if (odt_mode == ...) conditional to make the OFF mode harder to miss. It is a short piece of code right at the end, so move it up.
Also, clean up data types and constify where applicable and clean up the cs_and_odt_mask assignment. No functional change.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 4b0ac26a | 20-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up mem_precharge_and_activate()
Perform minor cleanup of this function, fix datatype and add kerneldoc.
Signed-off-by: Marek Vasut <marex@denx.de> |
| 16502a0b | 16-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up mem_config()
Clean mem_config() function. First, reorder the math done in the function such that WLAT and RLAT computation is together. Then, scrap contradictory comments which
ddr: altera: Clean up mem_config()
Clean mem_config() function. First, reorder the math done in the function such that WLAT and RLAT computation is together. Then, scrap contradictory comments which do not match the result of the math at all. Next, extract the mem_precharge_and_activate() call from the end of the function as it is completely unrelated here. Finally, rename the function to mem_init_latency().
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 7c89c2d9 | 16-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up phy_mgr_initialize()
Zap the cryptic casts and rework the code into a slightly more readable form. No functional change.
Signed-off-by: Marek Vasut <marex@denx.de> |
| 23a040c0 | 16-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up run_mem_calibrate()
Clean the function up slightly by using clrsetbits_le32() to flip bits in registers instead of cryptic bitmasks. Zap condition checking for PHY_DEBUG_IN_DEB
ddr: altera: Clean up run_mem_calibrate()
Clean the function up slightly by using clrsetbits_le32() to flip bits in registers instead of cryptic bitmasks. Zap condition checking for PHY_DEBUG_IN_DEBUG_MODE flag, which is never set. Split the calibration report into separate debug_mem_calibrate() function.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 9fa9c90e | 16-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Rename initialize() to phy_mgr_initialize()
Just perform the rename to make the name more descriptive, no functional change.
Signed-off-by: Marek Vasut <marex@denx.de> |
| 84e0b0cf | 16-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Init my_param and my_gbl
Init both structures with zeroes and zap all those zeroing shenanigans further down in the sdram_calibration_full().
Signed-off-by: Marek Vasut <marex@denx.de> |
| 880e46f2 | 16-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Rework initialize_tracking()
Clean the function up by getting rid of all the insane XOR-leftshift combos when assembling register values. While at it, remove all the ad-hoc variables ne
ddr: altera: Rework initialize_tracking()
Clean the function up by getting rid of all the insane XOR-leftshift combos when assembling register values. While at it, remove all the ad-hoc variables necessary for this XOR-leftshift voodoo. Finally, get rid of the iterative division implementation of two constants and replace it with a DIV_ROUND_UP() macro :-)
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| d32badbd | 16-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Fix ad-hoc iterative division implementation
Contemporary CPUs can perform division just fine, use this functionality and zap another implementation of iterative division :-)
Signed-of
ddr: altera: Fix ad-hoc iterative division implementation
Contemporary CPUs can perform division just fine, use this functionality and zap another implementation of iterative division :-)
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| f936f94f | 26-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Minor clean up of set_jump_as_return()
Add kerneldoc and do a minor comment cleanup.
Signed-off-by: Marek Vasut <marex@denx.de> |
| ecd2334a | 12-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Factor out common code
Factor out almost common code from rw_mgr_mem_handoff() and rw_mgr_mem_initialize() into separate rw_mgr_mem_load_user(). No functional change.
Signed-off-by: Ma
ddr: altera: Factor out common code
Factor out almost common code from rw_mgr_mem_handoff() and rw_mgr_mem_initialize() into separate rw_mgr_mem_load_user(). No functional change.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 944fe719 | 12-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Factor out instruction loading from rw_mgr_mem_initialize()
Pull the duplicate code out into a separate function.
Signed-off-by: Marek Vasut <marex@denx.de> |
| f51a7d35 | 18-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up scc_mgr_apply_group_all_out_delay_add_all_ranks()
Zap unused group_bgn parameter, fix and constify data types. Document in kerneldoc. No functional change.
Signed-off-by: Mare
ddr: altera: Clean up scc_mgr_apply_group_all_out_delay_add_all_ranks()
Zap unused group_bgn parameter, fix and constify data types. Document in kerneldoc. No functional change.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 5cb1b508 | 16-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Internal scc_mgr_apply_group_all_out_delay_add() cleanup part 2
Clean the DQS and OCT parts of the function, clean up the chopped formatting strings in debug_cond() and slightly improve
ddr: altera: Internal scc_mgr_apply_group_all_out_delay_add() cleanup part 2
Clean the DQS and OCT parts of the function, clean up the chopped formatting strings in debug_cond() and slightly improve the code. Zap group_bgn argument as it is used only in debug messages. Document the function using kerneldoc. No functional change.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 8eccde3e | 16-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Internal scc_mgr_apply_group_all_out_delay_add() cleanup part 1
Apparently, in case of the DQ and DM, the value if the new_delay variable is calculated, but the value is not used. Zap t
ddr: altera: Internal scc_mgr_apply_group_all_out_delay_add() cleanup part 1
Apparently, in case of the DQ and DM, the value if the new_delay variable is calculated, but the value is not used. Zap the entire code which does calculate the value.
It is not clear to me whether or not the code is doing the right thing in the first place. Right now, it calls scc_mgr_load_dq() and scc_mgr_load_dm() respectively, but I suspect it might need to call scc_mgr_apply_group_dq_out1_delay() and scc_mgr_apply_group_dm_out1_delay() instead. This is something Altera must investigate.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| d41ea93a | 20-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up scc_mgr_zero_group()
First, zap unused argument of the function. Next, clean up the data types, constify where applicable, clean up comments and add kerneldoc.
Signed-off-by:
ddr: altera: Clean up scc_mgr_zero_group()
First, zap unused argument of the function. Next, clean up the data types, constify where applicable, clean up comments and add kerneldoc.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|