1/* 2 * Copyright 2009 Freescale Semiconductor, Inc. 3 * 4 * Cache SRAM handling for QorIQ platform 5 * 6 * Author: Vivek Mahajan <vivek.mahajan@freescale.com> 7 8 * This file is derived from the original work done 9 * by Sylvain Munaut for the Bestcomm SRAM allocator. 10 * 11 * This program is free software; you can redistribute it and/or modify it 12 * under the terms of the GNU General Public License as published by the 13 * Free Software Foundation; either version 2 of the License, or (at your 14 * option) any later version. 15 * 16 * This program is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 * You should have received a copy of the GNU General Public License 22 * along with this program; if not, write to the Free Software 23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 24 */ 25 26#ifndef __ASM_POWERPC_FSL_85XX_CACHE_SRAM_H__ 27#define __ASM_POWERPC_FSL_85XX_CACHE_SRAM_H__ 28 29#include <asm/rheap.h> 30#include <linux/spinlock.h> 31 32/* 33 * Cache-SRAM 34 */ 35 36struct mpc85xx_cache_sram { 37 phys_addr_t base_phys; 38 void *base_virt; 39 unsigned int size; 40 rh_info_t *rh; 41 spinlock_t lock; 42}; 43 44extern void mpc85xx_cache_sram_free(void *ptr); 45extern void *mpc85xx_cache_sram_alloc(unsigned int size, 46 phys_addr_t *phys, unsigned int align); 47 48#endif /* __AMS_POWERPC_FSL_85XX_CACHE_SRAM_H__ */ 49