aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/am33xx/emif4.c
AgeCommit message (Collapse)Author
2012-10-25am33xx: support board specific ddr settingsPeter Korsgaard
Move the hardcoded ddr2/ddr3 settings for the ti boards to board code, so other boards can use different types/timings. Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com> [trini: Make apply with rtc32k_enable() in the file] Signed-off-by: Tom Rini <trini@ti.com>
2012-09-01am33xx: Add DDR3 (Micron MT41J128M16JT-125) timings and supportTom Rini
Signed-off-by: Tom Rini <trini@ti.com>
2012-09-01am33xx: Rework config_ddr to make DDR3 support easier.Tom Rini
In order to support DDR3 as well as DDR2, we need to perform the same init sequence, but with different values. So change config_ddr() to toggle setting pointers/etc for what DDR2 wants, and then calling. Signed-off-by: Tom Rini <trini@ti.com>
2012-09-01am33xx: Move some variables in emif4.c, mark them static.Tom Rini
We need vtpreg and ddrctrl but no longer need a second ddrregs. Signed-off-by: Tom Rini <trini@ti.com>
2012-09-01am33xx: Correct and clean up ddr_regs structTom Rini
The ddr_regs struct was incorrectly offset after the dt0wiratio0 entry. Correct this by documenting a missing register that will be used at some point in the future (when write leveling is supported). Further, the cmdNcs{force,delay} fields are undocumented and we have been setting them to zero, remove. Next, setting of the 'DATAn_REG_PHY_USE_RANK0_DELAYS field belongs with the rest of the ddr_data entries, so program it there. Finally, comment on how we are configuring the DATA1 registers that correspond to the DATA0 (dt0) registers defined in the struct. Signed-off-by: Tom Rini <trini@ti.com>
2012-09-01am33xx: Do not touch 'ratio1' fieldsTom Rini
The various ratio1 fields are not documented in any of the documentation I can find. Removing these and testing has yielded success, so remove the code that sets them and move their locations into the reserved fields. Signed-off-by: Tom Rini <trini@ti.com>
2012-09-01am33xx: Rework config_io_ctrl slightlyTom Rini
This function sets a number of related registers to the same value (the registers in question all have the same field descriptions and are related in operation). Rather than defining a struct and setting the value repeatedly, just pass in the value. Signed-off-by: Tom Rini <trini@ti.com>
2012-09-01am33xx: Use emif_regs struct for storing initialization valuesTom Rini
Rather than defining our own structs to note what to use when programming the EMIF and related re-use the emif_regs struct. Signed-off-by: Tom Rini <trini@ti.com>
2012-09-01am33xx: Turn a number of 'int' functions to 'void'Tom Rini
A number of memory initalization functions were int and always returned 0. Further it's not feasible to be doing error checking here, so simply turn them into void functions. Signed-off-by: Tom Rini <trini@ti.com>
2012-09-01am33xx: Document what we're doing with ddrctrl->ddrckectrlTom Rini
- Remove the call to set ddrctrl->ddrioctrl as it's all zeros. - Comment what we're really setting in ddrctrl->ddrckectrl which is that we're operating in the normal mode where EMIF/PHY clock is controlled by the PHY. Signed-off-by: Tom Rini <trini@ti.com>
2012-09-01am33xx: Clean up unused DDR defines, prefix more with 'DDR2'Tom Rini
- Remove a handful of unused defines. - Prefix more values with 'DDR2' as DDR3 will require different values. Signed-off-by: Tom Rini <trini@ti.com>
2012-09-01am33xx: Move the call to ddr_pll_config, make it take the frequencyTom Rini
Depending on if we have DDR2 or DDR3 on the board we will need to call ddr_pll_config with a different value. This call can be delayed slightly to the point where we know which type of memory we have. Signed-off-by: Tom Rini <trini@ti.com>
2012-09-01am33xx: Pass to config_ddr the type of memory that is connectedTom Rini
We need to pass in the type of memory that is connected to the board. The only reliable way to do this is to know what type of board we are running on (which later will be knowable in s_init()). For now, pass in the value of DDR2. Signed-off-by: Tom Rini <trini@ti.com>
2012-09-01am33xx: Make config_cmd_ctrl / config_ddr_data take const structsTom Rini
Rework the EMIF4/DDR code slightly to setup the structs that config_cmd_ctrl and config_ddr_data take to be setup at compile time and mark them as const. This lets us simplify the calling path slightly as well as making it easier to deal with DDR3. Signed-off-by: Tom Rini <trini@ti.com>
2012-09-01am33xx: Rework DDR2 EMIF initalization slightlyTom Rini
With the previous bugfix we now don't need to set two different REF_CTRL values and instead set the final value. Signed-off-by: Tom Rini <trini@ti.com>
2012-01-16ARM:AM33XX: Add SPL support for AM335X EVMChandan Nath
This patch is added to support SPL feature on AM335X platform. In this patch, MMC1 is configured as boot device for SPL and support for other devices will be added in the next patch series. Signed-off-by: Chandan Nath <chandan.nath@ti.com> Signed-off-by: Tom Rini <trini@ti.com> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
2011-10-27ARM:AM33XX: Add emif/ddr supportChandan Nath
This patch adds AM33xx emif/ddr support along with board specific defines. Signed-off-by: Chandan Nath <chandan.nath@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>