diff options
author | Simon Glass <sjg@chromium.org> | 2012-12-13 20:48:50 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-02-04 09:05:42 -0500 |
commit | 45bae2e3cf6b0653a0c68526be51457f50750dd5 (patch) | |
tree | 0fd3a32072369e0a1490737087f27d626c3b6018 /drivers/qe/qe.c | |
parent | 609e6ec3f623f3c3aa2a056654fbc5886e092897 (diff) | |
download | u-boot-imx-45bae2e3cf6b0653a0c68526be51457f50750dd5.zip u-boot-imx-45bae2e3cf6b0653a0c68526be51457f50750dd5.tar.gz u-boot-imx-45bae2e3cf6b0653a0c68526be51457f50750dd5.tar.bz2 |
ppc: Move CONFIG_QE to arch_global_data
Move the quantative easing fields into arch_global_data and tidy up.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/qe/qe.c')
-rw-r--r-- | drivers/qe/qe.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c index 72c585c..5fd2135 100644 --- a/drivers/qe/qe.c +++ b/drivers/qe/qe.c @@ -58,21 +58,22 @@ uint qe_muram_alloc(uint size, uint align) uint savebase; align_mask = align - 1; - savebase = gd->mp_alloc_base; + savebase = gd->arch.mp_alloc_base; - if ((off = (gd->mp_alloc_base & align_mask)) != 0) - gd->mp_alloc_base += (align - off); + off = gd->arch.mp_alloc_base & align_mask; + if (off != 0) + gd->arch.mp_alloc_base += (align - off); if ((off = size & align_mask) != 0) size += (align - off); - if ((gd->mp_alloc_base + size) >= gd->mp_alloc_top) { - gd->mp_alloc_base = savebase; + if ((gd->arch.mp_alloc_base + size) >= gd->arch.mp_alloc_top) { + gd->arch.mp_alloc_base = savebase; printf("%s: ran out of ram.\n", __FUNCTION__); } - retloc = gd->mp_alloc_base; - gd->mp_alloc_base += size; + retloc = gd->arch.mp_alloc_base; + gd->arch.mp_alloc_base += size; memset((void *)&qe_immr->muram[retloc], 0, size); @@ -183,8 +184,8 @@ void qe_init(uint qe_base) out_be32(&qe_immr->iram.iready,QE_IRAM_READY); #endif - gd->mp_alloc_base = QE_DATAONLY_BASE; - gd->mp_alloc_top = gd->mp_alloc_base + QE_DATAONLY_SIZE; + gd->arch.mp_alloc_base = QE_DATAONLY_BASE; + gd->arch.mp_alloc_top = gd->arch.mp_alloc_base + QE_DATAONLY_SIZE; qe_sdma_init(); qe_snums_init(); |