]> git.sur5r.net Git - u-boot/blobdiff - drivers/qe/qe.c
Merge branch 'next' of git://git.denx.de/u-boot-mpc83xx
[u-boot] / drivers / qe / qe.c
index 345587be63ed8414d76379953a5278a04ff5a1e0..b5ddc4b474d0e89bde1884f6f1bd9db46d1c181d 100644 (file)
@@ -4,20 +4,7 @@
  * Dave Liu <daveliu@freescale.com>
  * based on source code of Shlomi Gridish
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include "common.h"
@@ -58,21 +45,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 +171,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();
@@ -220,7 +208,7 @@ void qe_assign_page(uint snum, uint para_ram_base)
    from CLKn pin, we have te change the function.
  */
 
-#define BRG_CLK                (gd->brg_clk)
+#define BRG_CLK                (gd->arch.brg_clk)
 
 int qe_set_brg(uint brg, uint rate)
 {