| 04955cf2 | 02-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sequencer: Wrap ac_rom_init and inst_rom_init
Introduce two wrapper functions, socfpga_get_seq_ac_init() and socfpga_get_seq_inst_init() to avoid direct inclusion of the sequencer_auto_
ddr: altera: sequencer: Wrap ac_rom_init and inst_rom_init
Introduce two wrapper functions, socfpga_get_seq_ac_init() and socfpga_get_seq_inst_init() to avoid direct inclusion of the sequencer_auto_ac_init.h and sequencer_auto_inst_init.h QTS generated files. This reduces namespace pollution again.
Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
show more ...
|
| 499b7a7c | 02-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sequencer: Zap bogus redefinition of RW_MGR_MEM_NUMBER_OF_RANKS
This is defined in the QTS-generated headers, so it must not be re-defined in sequencer.h .
Signed-off-by: Marek Vasut <
ddr: altera: sequencer: Zap bogus redefinition of RW_MGR_MEM_NUMBER_OF_RANKS
This is defined in the QTS-generated headers, so it must not be re-defined in sequencer.h .
Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
show more ...
|
| f085ac3b | 02-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sequencer: Zap unused params and macros
These parameters are not used in the code, zap them and the macros which are used by them as well.
Signed-off-by: Marek Vasut <marex@denx.de> Ac
ddr: altera: sequencer: Zap unused params and macros
These parameters are not used in the code, zap them and the macros which are used by them as well.
Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
show more ...
|
| 9c76df51 | 02-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sequencer: Move qts-generated files to board dir
Move the files generated by QTS into the board directory, they should not be part of the driver files at all.
Signed-off-by: Marek Vasu
ddr: altera: sequencer: Move qts-generated files to board dir
Move the files generated by QTS into the board directory, they should not be part of the driver files at all.
Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
show more ...
|
| 08eb9470 | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Make sdram_start and sdram_end into u32
Originally, both sdram_start and sdram_end were 64b values. The sdram_start had no reason for being so, since our address space is only 32
ddr: altera: sdram: Make sdram_start and sdram_end into u32
Originally, both sdram_start and sdram_end were 64b values. The sdram_start had no reason for being so, since our address space is only 32b, so switching sdram_start to u32 is simple.
The sdram_end is a bit more complex, since it can actually be set to (1 << 32) if someone really wanted to use an SoCFPGA with 4 GiB of DRAM and fixed the code around a little. But, the code handling the protection rules internally decrements the sdram_end variable anyway. Thus, instead of calling the code and passing in the address of the SDRAM end, pass in the address already decremented by one. This lets the sdram_end be 32b as well.
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 6d01595f | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Minor cleanup in sdram_get_rule()
Fix the data types and zap unnecessary type change.
Signed-off-by: Marek Vasut <marex@denx.de> |
| a003740a | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Minor cleanup in sdram_set_rule()
Zap an obscure unneeded cast and clean other minor nits in this function.
Signed-off-by: Marek Vasut <marex@denx.de> |
| 96b869b6 | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Add missing kerneldoc
Add kerneldoc to functions which are missing it, but are already cleaned up.
Signed-off-by: Marek Vasut <marex@denx.de> |
| 269de4f0 | 01-Aug-2015 |
Marek Vasut <marex@denx.de> |
ddr: altera: sdram: Clean up sdram_write_verify()
Clean the function up so that it's obvious what it is doing, fix the formating strings in debug outputs, add kerneldoc. Make the function return pro
ddr: altera: sdram: Clean up sdram_write_verify()
Clean the function up so that it's obvious what it is doing, fix the formating strings in debug outputs, add kerneldoc. Make the function return proper errno-compliant return values and propagate this change throughout sdram.c
Signed-off-by: Marek Vasut <marex@denx.de>
show more ...
|
| 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 ...
|