|
| 1 | +/* |
| 2 | + * Copyright (c) 2019, Intel Corporation |
| 3 | + * All rights reserved. |
| 4 | + * |
| 5 | + * Redistribution and use in source and binary forms, with or without |
| 6 | + * modification, are permitted provided that the following conditions are met: |
| 7 | + * * Redistributions of source code must retain the above copyright |
| 8 | + * notice, this list of conditions and the following disclaimer. |
| 9 | + * * Redistributions in binary form must reproduce the above copyright |
| 10 | + * notice, this list of conditions and the following disclaimer in the |
| 11 | + * documentation and/or other materials provided with the distribution. |
| 12 | + * * Neither the name of the Intel Corporation nor the |
| 13 | + * names of its contributors may be used to endorse or promote products |
| 14 | + * derived from this software without specific prior written permission. |
| 15 | + * |
| 16 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 17 | + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 18 | + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 19 | + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
| 20 | + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 21 | + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 22 | + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 23 | + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 24 | + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 25 | + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 26 | + * POSSIBILITY OF SUCH DAMAGE. |
| 27 | + * |
| 28 | + * Author: Liam Girdwood <liam.r.girdwood@linux.intel.com> |
| 29 | + * Keyon Jie <yang.jie@linux.intel.com> |
| 30 | + */ |
| 31 | + |
| 32 | +#ifndef __INCLUDE_CAVS_MAILBOX__ |
| 33 | +#define __INCLUDE_CAVS_MAILBOX__ |
| 34 | + |
| 35 | +#include <platform/memory.h> |
| 36 | + |
| 37 | +/* |
| 38 | + * The Window Region on HPSRAM for cAVS platforms is organised like this :- |
| 39 | + * +--------------------------------------------------------------------------+ |
| 40 | + * | Offset | Region | Size | |
| 41 | + * +---------------------+----------------+-----------------------------------+ |
| 42 | + * | SRAM_TRACE_BASE | Trace Buffer W3| SRAM_TRACE_SIZE | |
| 43 | + * +---------------------+----------------+-----------------------------------+ |
| 44 | + * | SRAM_DEBUG_BASE | Debug data W2 | SRAM_DEBUG_SIZE | |
| 45 | + * +---------------------+----------------+-----------------------------------+ |
| 46 | + * | SRAM_INBOX_BASE | Inbox W1 | SRAM_INBOX_SIZE | |
| 47 | + * +---------------------+----------------+-----------------------------------+ |
| 48 | + * | SRAM_OUTBOX_BASE | Outbox W0 | SRAM_MAILBOX_SIZE | |
| 49 | + * +---------------------+----------------+-----------------------------------+ |
| 50 | + * | SRAM_SW_REG_BASE | SW Registers W0| SRAM_SW_REG_SIZE | |
| 51 | + * +---------------------+----------------+-----------------------------------+ |
| 52 | + * |
| 53 | + * Note: For suecreek SRAM_SW_REG window does not exist - MAILBOX_SW_REG_BASE |
| 54 | + * and MAILBOX_SW_REG_BASE are equal to 0 |
| 55 | + */ |
| 56 | + |
| 57 | + /* window 3 - trace */ |
| 58 | +#define MAILBOX_TRACE_SIZE SRAM_TRACE_SIZE |
| 59 | +#define MAILBOX_TRACE_BASE SRAM_TRACE_BASE |
| 60 | + |
| 61 | + /* window 2 debug, exception and stream */ |
| 62 | +#define MAILBOX_DEBUG_SIZE SRAM_DEBUG_SIZE |
| 63 | +#define MAILBOX_DEBUG_BASE SRAM_DEBUG_BASE |
| 64 | + |
| 65 | +#define MAILBOX_EXCEPTION_SIZE SRAM_EXCEPT_SIZE |
| 66 | +#define MAILBOX_EXCEPTION_BASE SRAM_EXCEPT_BASE |
| 67 | +#define MAILBOX_EXCEPTION_OFFSET SRAM_DEBUG_SIZE |
| 68 | + |
| 69 | +#define MAILBOX_STREAM_SIZE SRAM_STREAM_SIZE |
| 70 | +#define MAILBOX_STREAM_BASE SRAM_STREAM_BASE |
| 71 | +#define MAILBOX_STREAM_OFFSET (SRAM_DEBUG_SIZE + SRAM_EXCEPT_SIZE) |
| 72 | + |
| 73 | + /* window 1 inbox/downlink and FW registers */ |
| 74 | +#define MAILBOX_HOSTBOX_SIZE SRAM_INBOX_SIZE |
| 75 | +#define MAILBOX_HOSTBOX_BASE SRAM_INBOX_BASE |
| 76 | + |
| 77 | + /* window 0 */ |
| 78 | +#define MAILBOX_DSPBOX_SIZE SRAM_OUTBOX_SIZE |
| 79 | +#define MAILBOX_DSPBOX_BASE SRAM_OUTBOX_BASE |
| 80 | + |
| 81 | +#define MAILBOX_SW_REG_SIZE SRAM_SW_REG_SIZE |
| 82 | +#define MAILBOX_SW_REG_BASE SRAM_SW_REG_BASE |
| 83 | + |
| 84 | +#endif |
0 commit comments