Path: blob/master/arch/avr32/mach-at32ap/include/mach/sram.h
10820 views
/*1* Simple SRAM allocator2*3* Copyright (C) 2008 Atmel Corporation4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License version 2 as7* published by the Free Software Foundation.8*/9#ifndef __ASM_AVR32_ARCH_SRAM_H10#define __ASM_AVR32_ARCH_SRAM_H1112#include <linux/genalloc.h>1314extern struct gen_pool *sram_pool;1516static inline unsigned long sram_alloc(size_t len)17{18if (!sram_pool)19return 0UL;2021return gen_pool_alloc(sram_pool, len);22}2324static inline void sram_free(unsigned long addr, size_t len)25{26return gen_pool_free(sram_pool, addr, len);27}2829#endif /* __ASM_AVR32_ARCH_SRAM_H */303132