diff options
author | Peter Barada <peter.barada@logicpd.com> | 2012-11-13 07:40:28 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-12-10 08:54:02 -0700 |
commit | 8c4445d26633f43fcd04add3d6cdc3bc41d14841 (patch) | |
tree | e2cab89ccff5955681182e71200a8d1053585528 /board/ti/evm | |
parent | d7aff44a00e5de3de2ed18a3329edf5ff9d3aada (diff) | |
download | u-boot-imx-8c4445d26633f43fcd04add3d6cdc3bc41d14841.zip u-boot-imx-8c4445d26633f43fcd04add3d6cdc3bc41d14841.tar.gz u-boot-imx-8c4445d26633f43fcd04add3d6cdc3bc41d14841.tar.bz2 |
Pass sdrc timing values through board_sdrc_timings structure
Instead of passing individual registers by value to board_get_mem_timings,
pass a board_mem_timings structure pointer for the board files to fill in.
Pass same structure pointer to write_sdrc_timings. This saves about
90 bytes of space in SPL.
Signed-off-by: Peter Barada <peter.barada@logicpd.com>
Diffstat (limited to 'board/ti/evm')
-rw-r--r-- | board/ti/evm/evm.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c index 61fc7b5..8a3aa0c 100644 --- a/board/ti/evm/evm.c +++ b/board/ti/evm/evm.c @@ -128,8 +128,7 @@ int board_init(void) * provides the timing values back to the function that configures * the memory. */ -void get_board_mem_timings(u32 *mcfg, u32 *ctrla, u32 *ctrlb, u32 *rfr_ctrl, - u32 *mr) +void get_board_mem_timings(struct board_sdrc_timings *timings) { int pop_mfr, pop_id; @@ -142,17 +141,17 @@ void get_board_mem_timings(u32 *mcfg, u32 *ctrla, u32 *ctrlb, u32 *rfr_ctrl, if (pop_mfr == NAND_MFR_HYNIX && pop_id == 0xbc) { /* 256MB DDR */ - *mcfg = HYNIX_V_MCFG_200(256 << 20); - *ctrla = HYNIX_V_ACTIMA_200; - *ctrlb = HYNIX_V_ACTIMB_200; + timings->mcfg = HYNIX_V_MCFG_200(256 << 20); + timings->ctrla = HYNIX_V_ACTIMA_200; + timings->ctrlb = HYNIX_V_ACTIMB_200; } else { /* 128MB DDR */ - *mcfg = MICRON_V_MCFG_165(128 << 20); - *ctrla = MICRON_V_ACTIMA_165; - *ctrlb = MICRON_V_ACTIMB_165; + timings->mcfg = MICRON_V_MCFG_165(128 << 20); + timings->ctrla = MICRON_V_ACTIMA_165; + timings->ctrlb = MICRON_V_ACTIMB_165; } - *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz; - *mr = MICRON_V_MR_165; + timings->rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz; + timings->mr = MICRON_V_MR_165; } #endif |