upstream u-boot with additional patches for our devices/boards:
https://lists.denx.de/pipermail/u-boot/2017-March/282789.html (AXP crashes) ;
Gbit ethernet patch for some LIME2 revisions ;
with SPI flash support
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
828 B
48 lines
828 B
11 years ago
|
|
||
|
#include <common.h>
|
||
|
#include <linux/compat.h>
|
||
|
|
||
|
struct p_current cur = {
|
||
|
.pid = 1,
|
||
|
};
|
||
|
__maybe_unused struct p_current *current = &cur;
|
||
|
|
||
|
unsigned long copy_from_user(void *dest, const void *src,
|
||
|
unsigned long count)
|
||
|
{
|
||
|
memcpy((void *)dest, (void *)src, count);
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
void *kmalloc(size_t size, int flags)
|
||
|
{
|
||
|
return memalign(ARCH_DMA_MINALIGN, size);
|
||
|
}
|
||
|
|
||
|
void *kzalloc(size_t size, int flags)
|
||
|
{
|
||
|
void *ptr = kmalloc(size, flags);
|
||
|
memset(ptr, 0, size);
|
||
|
return ptr;
|
||
|
}
|
||
|
|
||
|
void *vzalloc(unsigned long size)
|
||
|
{
|
||
|
return kzalloc(size, 0);
|
||
|
}
|
||
|
|
||
|
struct kmem_cache *get_mem(int element_sz)
|
||
|
{
|
||
|
struct kmem_cache *ret;
|
||
|
|
||
|
ret = memalign(ARCH_DMA_MINALIGN, sizeof(struct kmem_cache));
|
||
|
ret->sz = element_sz;
|
||
|
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
void *kmem_cache_alloc(struct kmem_cache *obj, int flag)
|
||
|
{
|
||
|
return memalign(ARCH_DMA_MINALIGN, obj->sz);
|
||
|
}
|