| f97606f2 | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Clean up sdram_calculate_size() part 2
Clean up coding style, mostly clean up comments, add kerneldoc. Also, zap assignment of the "cs" variable, which is outright dead code, so
ddr: altera: sdram: Clean up sdram_calculate_size() part 2
Clean up coding style, mostly clean up comments, add kerneldoc. Also, zap assignment of the "cs" variable, which is outright dead code, so just remove it.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| bb056d9c | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Clean up sdram_calculate_size() part 1
Pluck out all of the CONFIG_HPS_SDR_CTRLCFG_* macros. This change makes sdram.c completely clear of these macros and allows removing of the
ddr: altera: sdram: Clean up sdram_calculate_size() part 1
Pluck out all of the CONFIG_HPS_SDR_CTRLCFG_* macros. This change makes sdram.c completely clear of these macros and allows removing of the ugly include of sdram.h . The namespace is now a much nicer place!
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 5af91418 | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Introduce socfpga_sdram_get_config()
Introduce socfpga_sdram_get_config() function implement in a board file, which returns the socfpga_sdram_config structure. This is the last s
ddr: altera: sdram: Introduce socfpga_sdram_get_config()
Introduce socfpga_sdram_get_config() function implement in a board file, which returns the socfpga_sdram_config structure. This is the last step in cleaning up the socfpga_mmr_init_full(), but not the last step which allows removing the inclusion of sdram.h from drivers/ddr/altera/sdram.c thus far.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 99f453e9 | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Clean up sdram_mmr_init_full() part 8
Fix the return value so that standard errno return values can be used.
Signed-off-by: Marek Vasut <marex@denx.de> |
| 1e8a85f8 | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Clean up sdram_mmr_init_full() part 7
Add kerneldoc.
Signed-off-by: Marek Vasut <marex@denx.de> |
| 1a302a45 | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Clean up sdram_mmr_init_full() part 6
Pull out the block of register programming into a separate function.
Signed-off-by: Marek Vasut <marex@denx.de> |
| 9d6b012c | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Clean up sdram_mmr_init_full() part 5
Rework remaining two register setting functions such that they only return the final register value. Move the register setting into the bloc
ddr: altera: sdram: Clean up sdram_mmr_init_full() part 5
Rework remaining two register setting functions such that they only return the final register value. Move the register setting into the block of register I/O in sdram_mmr_init_full().
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 076470ee | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Clean up sdram_mmr_init_full() part 4
Merge sdr_set_*() functions which are just setting registers among the sea of register setting in sdram_mmr_init_full(). There is no need to
ddr: altera: sdram: Clean up sdram_mmr_init_full() part 4
Merge sdr_set_*() functions which are just setting registers among the sea of register setting in sdram_mmr_init_full(). There is no need to keep them separate this way, there is nothing special about them.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 764aa9a9 | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Clean up sdram_mmr_init_full() part 3
Pluck out the remaining CONFIG_HPS_SDR_CTRLCFG_ and put it into the socfpga_sdram_config structure.
Signed-off-by: Marek Vasut <marex@denx.
ddr: altera: sdram: Clean up sdram_mmr_init_full() part 3
Pluck out the remaining CONFIG_HPS_SDR_CTRLCFG_ and put it into the socfpga_sdram_config structure.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| dc3b91d9 | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Clean up sdram_mmr_init_full() part 2
Suck out all the CONFIG_HPS_SDR_CTRLCFG_* from sdram_mmr_init_full() into the socfpga_sdram_config structure. There is still one ugly macro
ddr: altera: sdram: Clean up sdram_mmr_init_full() part 2
Suck out all the CONFIG_HPS_SDR_CTRLCFG_* from sdram_mmr_init_full() into the socfpga_sdram_config structure. There is still one ugly macro left behind, but this will be taken care of in subsequent patch.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| be9a9fc5 | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Clean up sdram_mmr_init_full() part 1
Zap all the ad-hoc readbacks from the registers and other useless and broken debug output. This is really not useful and is only confusing.
ddr: altera: sdram: Clean up sdram_mmr_init_full() part 1
Zap all the ad-hoc readbacks from the registers and other useless and broken debug output. This is really not useful and is only confusing.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 04ae4489 | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Introduce socfpga_sdram_config() structure
Introduce this seemingly massive structure, which holds required values of all the registers of the SDRAM controller. The idea here is
ddr: altera: sdram: Introduce socfpga_sdram_config() structure
Introduce this seemingly massive structure, which holds required values of all the registers of the SDRAM controller. The idea here is to avoid including the sdram.h header file, which is full of ad-hoc macros that polute the global namespace. Once the cleanup of sdram.c would be complete and all registers would be loaded from this new socfpga_sdram_config, a board file will only pass this structure into the sdram.c . This will hide all the horrors generated by QTS in the board directory.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 9a48a9ac | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Clean up set_sdr_mp_threshold()
Get rid of the constant clrsetbits_le32(), instead prepare the whole content of the register once and write it at the end of the function.
Signed
ddr: altera: sdram: Clean up set_sdr_mp_threshold()
Get rid of the constant clrsetbits_le32(), instead prepare the whole content of the register once and write it at the end of the function.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| ad2ba5d6 | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Clean up set_sdr_mp_pacing()
Get rid of the constant clrsetbits_le32(), instead prepare the whole content of the register once and write it at the end of the function.
Signed-of
ddr: altera: sdram: Clean up set_sdr_mp_pacing()
Get rid of the constant clrsetbits_le32(), instead prepare the whole content of the register once and write it at the end of the function.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| a5ba9296 | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Clean up set_sdr_mp_weight()
Get rid of the constant clrsetbits_le32(), instead prepare the whole content of the register once and write it at the end of the function.
Signed-of
ddr: altera: sdram: Clean up set_sdr_mp_weight()
Get rid of the constant clrsetbits_le32(), instead prepare the whole content of the register once and write it at the end of the function.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 1009e396 | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Clean up set_sdr_fifo_cfg()
Get rid of the constant clrsetbits_le32(), instead prepare the whole content of the register once and write it at the end of the function.
Signed-off
ddr: altera: sdram: Clean up set_sdr_fifo_cfg()
Get rid of the constant clrsetbits_le32(), instead prepare the whole content of the register once and write it at the end of the function.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| b3bdb220 | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Clean up set_sdr_static_cfg()
Get rid of the constant clrsetbits_le32(), instead prepare the whole content of the register once and write it at the end of the function.
Signed-o
ddr: altera: sdram: Clean up set_sdr_static_cfg()
Get rid of the constant clrsetbits_le32(), instead prepare the whole content of the register once and write it at the end of the function.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 0ef88300 | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Clean up set_sdr_addr_rw()
Get rid of the constant clrsetbits_le32(), instead prepare the whole content of the register once and write it at the end of the function.
Signed-off-
ddr: altera: sdram: Clean up set_sdr_addr_rw()
Get rid of the constant clrsetbits_le32(), instead prepare the whole content of the register once and write it at the end of the function.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 60bd0df0 | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Clean up set_sdr_dram_timing*()
Get rid of the constant clrsetbits_le32(), instead prepare the whole content of the register once and write it at the end of the function. Merge s
ddr: altera: sdram: Clean up set_sdr_dram_timing*()
Get rid of the constant clrsetbits_le32(), instead prepare the whole content of the register once and write it at the end of the function. Merge set_sdr_dram_timing{1,2,3,4,lowpwr}() into single function set_sdr_dram_timing() , since there's no point in keeping all this stuff separate anymore.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 067c853f | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Clean up set_sdr_ctrlcfg()
Get rid of the constant clrsetbits_le32(), instead prepare the whole content of the register once and write it at the end of the function. The big plan
ddr: altera: sdram: Clean up set_sdr_ctrlcfg()
Get rid of the constant clrsetbits_le32(), instead prepare the whole content of the register once and write it at the end of the function. The big plan here is to remove all the CONFIG_HPS_SDR_ macros, hide them in QTS compatibility layer in board implementation and pass only a small structure into the driver.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| f3671697 | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Clean up compute_errata_rows() part 2
Remove all parameters of this function, since they are only constants passed in from another function, so make them local. Also, rename the
ddr: altera: sdram: Clean up compute_errata_rows() part 2
Remove all parameters of this function, since they are only constants passed in from another function, so make them local. Also, rename the function to get_errata_rows() as this is closer to what it does.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 791d20e1 | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Clean up compute_errata_rows() part 1
Clean up weird parenthesis and odd type casts from the function. Fix comment style.
Signed-off-by: Marek Vasut <marex@denx.de> |
| 58d86144 | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Switch to generic_hweight32()
Use generic function instead of CPU-specific one.
Signed-off-by: Marek Vasut <marex@denx.de> |
| 3de9622e | 26-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up of delay_for_n_mem_clocks() part 5
Add kerneldoc.
Signed-off-by: Marek Vasut <marex@denx.de> |
| 0c1b81bd | 26-Jul-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: Clean up of delay_for_n_mem_clocks() part 4
Simplify the loop code, optimizing compiler can deal with this. No functional change.
Signed-off-by: Marek Vasut <marex@denx.de> |