/* The dpalloc function used and implemented in this file was derieved
- * from PPCBoot/U-Boot file "cpu/mpc8260/commproc.c".
+ * from PPCBoot/U-Boot file "arch/powerpc/cpu/mpc8260/commproc.c".
*/
/* Author: Arun Dharankar <ADharankar@ATTBI.Com>
*/
/*
- * This file is based on "arch/ppc/8260_io/commproc.c" - here is it's
+ * This file is based on "arch/powerpc/8260_io/commproc.c" - here is it's
* copyright notice:
*
* General Purpose functions for the global management of the
#include <common.h>
+#include <console.h>
#include <exports.h>
DECLARE_GLOBAL_DATA_PTR;
}
return 0;
}
-void * memset(void * s,int c,size_t count)
-{
- char *xs = (char *) s;
- while (count--)
- *xs++ = c;
- return s;
-}
int memcmp(const void * cs,const void * ct,size_t count)
{
const unsigned char *su1, *su2;
#endif /* STANDALONE */
#ifdef STANDALONE
-int mem_to_mem_idma2intr (int argc, char *argv[])
+int mem_to_mem_idma2intr (int argc, char * const argv[])
#else
-int do_idma (bd_t * bd, int argc, char *argv[])
+int do_idma (bd_t * bd, int argc, char * const argv[])
#endif /* STANDALONE */
{
int i;
memaddr = dpalloc (sizeof (pram_idma_t), 64);
- *(volatile ushort *) &immap->im_dprambase[PROFF_IDMA2_BASE] = memaddr;
+ *(volatile u16 *)&immap->im_dprambase16
+ [PROFF_IDMA2_BASE / sizeof(u16)] = memaddr;
piptr = (volatile pram_idma_t *) ((uint) (immap) + memaddr);
piptr->pi_resv1 = 0; /* manual says: clear it */
/* Pointer to initial global data area */
if (dpinit_done == 0) {
- dpbase = gd->dp_alloc_base;
+ dpbase = gd->arch.dp_alloc_base;
dpinit_done = 1;
}
if ((off = size & align_mask) != 0)
size += align - off;
- if ((dpbase + size) >= gd->dp_alloc_top) {
+ if ((dpbase + size) >= gd->arch.dp_alloc_top) {
dpbase = savebase;
printf ("dpalloc: ran out of dual port ram!");
return 0;