blob: c6713e47b5c516e579d0802aaea4fef53ad7b2fd [file] [log] [blame]
/********************************************************************************
* Marvell GPL License Option
*
* If you received this File from Marvell, you may opt to use, redistribute and/or
* modify this File in accordance with the terms and conditions of the General
* Public License Version 2, June 1991 (the "GPL License"), a copy of which is
* available along with the File in the license.txt file or by writing to the Free
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or
* on the worldwide web at http://www.gnu.org/licenses/gpl.txt.
*
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED
* WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY
* DISCLAIMED. The GPL License provides additional details about this warranty
* disclaimer.
******************************************************************************/
#ifndef _USB_DEV_COMMON_H
#define _USB_DEV_COMMON_H
extern int __usb_console_buf_start;
#define USB_CONSOLE_BUF_BASE ((unsigned int)(&__usb_console_buf_start))
//first 32 bytes reserved for double pointers.
#define USB_SOC_OUTPUT_STRING_BUF (USB_CONSOLE_BUF_BASE + 32)
//the big image buffer
#define USB_SOC_INPUT_STRING_BUF (USB_SOC_OUTPUT_STRING_BUF + USB_SOC_STRING_BUF_SIZE + 32)
#define USB_SOC_STRING_BUF_SIZE (64*1024 - 32)
#define USB_INTR_BUF_SIZE 0x200
#define MAX_ONETIME_INPUT_LEN USB_INTR_BUF_SIZE
#define MAX_ONETIME_OUTPUT_LEN USB_INTR_BUF_SIZE
#define USB_SOC_INPUT_STRING_BUF_ROLL_POINT \
(USB_SOC_INPUT_STRING_BUF + USB_SOC_STRING_BUF_SIZE - MAX_ONETIME_INPUT_LEN)
#define USB_SOC_OUTPUT_STRING_BUF_ROLL_POINT \
(USB_SOC_OUTPUT_STRING_BUF + USB_SOC_STRING_BUF_SIZE - MAX_ONETIME_OUTPUT_LEN)
#define USB_SOC_OUTPUT_WRITE_PTR (USB_SOC_OUTPUT_STRING_BUF - 32)//write by ARM, read only by BCM
#define USB_SOC_OUTPUT_EOS_PTR (USB_SOC_OUTPUT_STRING_BUF - 28)//write by ARM, read only by BCM
#define USB_SOC_START_USB_MAGIC (USB_SOC_OUTPUT_STRING_BUF - 24)
#define MAGIC_START_USB 0xffea0123
//write by BCM, read only by ARM
#define USB_SOC_INPUT_WRITE_PTR (USB_SOC_INPUT_STRING_BUF - 32)
//write by BCM, read only by ARM
#define USB_SOC_INPUT_EOS_PTR (USB_SOC_INPUT_STRING_BUF - 28)
#define ARMV7_DCACHE_LINE_LEN 0x40
#define CACHE_MASK (0xFFFFFFFF&~(ARMV7_DCACHE_LINE_LEN - 1))
#define ALIGNED(addr) (((addr)&(CACHE_MASK)) + ARMV7_DCACHE_LINE_LEN)
#endif//_USB_DEV_COMMON_H