/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) 2018 MediaTek Inc.
 */

#ifndef __RAM_CONSOLE_DEF_H__
#define __RAM_CONSOLE_DEF_H__

#include "dev/mt5896.h"

// ram_console over dram for mt5896

/* hard code addr */
// use dram addr
//#define RAM_CONSOLE_SRAM_ADDR (0x5ca00000) //(0x0011D000)
#define RAM_CONSOLE_SRAM_ADDR (0x25D40000) //(0x0011D000)
#define RAM_CONSOLE_SRAM_SIZE (0x800)

#define RAM_CONSOLE_SRAM_SIZE_OVERALL (0x1000)
#define RAM_CONSOLE_MRDUMP_SRAM_SIZE_OVERALL (0x3000)

#ifdef RAM_CONSOLE_OVER_SRAM  // sram

#define RAM_CONSOLE_DEF_ADDR RAM_CONSOLE_SRAM_ADDR
#define RAM_CONSOLE_DEF_SIZE RAM_CONSOLE_SRAM_SIZE

#else  // dram : tv use this
#define RAM_CONSOLE_DRAM_ADDR 0x25D40000 //(DRAM_BASE_PHY + 0x14400000)
#define RAM_CONSOLE_DRAM_SIZE (0x10000)

#define RAM_CONSOLE_DEF_ADDR RAM_CONSOLE_DRAM_ADDR
#define RAM_CONSOLE_DEF_SIZE RAM_CONSOLE_DRAM_SIZE
#endif

// align minirdump-reserved-memory in dts , to remove
#define KE_RESERVED_MEM_ADDR 0x25D60000  //(DRAM_BASE_PHY + 0x144f0000)
#define PSTORE_ADDR 0x3FF00000 //(DRAM_BASE_PHY + 0x14410000)
#define PSTORE_SIZE 0x100000 //0xe0000

#endif
