1/* 2 * host_os.h 3 * 4 * DSP-BIOS Bridge driver support functions for TI OMAP processors. 5 * 6 * Copyright (C) 2008 Texas Instruments, Inc. 7 * 8 * This package is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License version 2 as 10 * published by the Free Software Foundation. 11 * 12 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 */ 16 17#ifndef _HOST_OS_H_ 18#define _HOST_OS_H_ 19 20#include <asm/system.h> 21#include <asm/atomic.h> 22#include <linux/semaphore.h> 23#include <linux/uaccess.h> 24#include <linux/irq.h> 25#include <linux/io.h> 26#include <linux/syscalls.h> 27#include <linux/version.h> 28#include <linux/kernel.h> 29#include <linux/string.h> 30#include <linux/stddef.h> 31#include <linux/types.h> 32#include <linux/interrupt.h> 33#include <linux/spinlock.h> 34#include <linux/sched.h> 35#include <linux/fs.h> 36#include <linux/file.h> 37#include <linux/slab.h> 38#include <linux/delay.h> 39#include <linux/ctype.h> 40#include <linux/mm.h> 41#include <linux/device.h> 42#include <linux/vmalloc.h> 43#include <linux/ioport.h> 44#include <linux/platform_device.h> 45#include <plat/clock.h> 46#include <linux/clk.h> 47#include <plat/mailbox.h> 48#include <linux/pagemap.h> 49#include <asm/cacheflush.h> 50#include <linux/dma-mapping.h> 51 52/* TODO -- Remove, once BP defines them */ 53#define INT_DSP_MMU_IRQ 28 54 55struct dspbridge_platform_data { 56 void (*dsp_set_min_opp) (u8 opp_id); 57 u8(*dsp_get_opp) (void); 58 void (*cpu_set_freq) (unsigned long f); 59 unsigned long (*cpu_get_freq) (void); 60 unsigned long mpu_speed[6]; 61 62 /* functions to write and read PRCM registers */ 63 void (*dsp_prm_write)(u32, s16 , u16); 64 u32 (*dsp_prm_read)(s16 , u16); 65 u32 (*dsp_prm_rmw_bits)(u32, u32, s16, s16); 66 void (*dsp_cm_write)(u32, s16 , u16); 67 u32 (*dsp_cm_read)(s16 , u16); 68 u32 (*dsp_cm_rmw_bits)(u32, u32, s16, s16); 69 70 u32 phys_mempool_base; 71 u32 phys_mempool_size; 72}; 73 74#define PRCM_VDD1 1 75 76extern struct platform_device *omap_dspbridge_dev; 77extern struct device *bridge; 78 79#if defined(CONFIG_TIDSPBRIDGE) || defined(CONFIG_TIDSPBRIDGE_MODULE) 80extern void dspbridge_reserve_sdram(void); 81#else 82static inline void dspbridge_reserve_sdram(void) 83{ 84} 85#endif 86 87extern unsigned long dspbridge_get_mempool_base(void); 88#endif 89