/**
 * @file   regs-asp.h
 * @brief  Header for ASP setting.
 *
 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
 *
 * This software is proprietary of Samsung Electronics.
 * No part of this software, either material or conceptual may be copied
 * or distributed, transmitted, transcribed, stored in a retrieval system
 * or translated into any human or computer language in any form by any means,
 * electronic, mechanical, manual or otherwise, or disclosed to third parties
 * without the express written permission of Samsung Electronics.
 */

#ifndef __REGS_ASP_H__
#define __REGS_ASP_H__

/* ASP information */
#define COUNT_OF_ASP		(4)
#define BASE_LOW		(0x0500)
#define BASE_HIGH		(BASE_LOW + 0x04)
#define TOP_LOW			(BASE_HIGH + 0x04)
#define TOP_HIGH		(TOP_LOW + 0x04)

#define REGION_ATTR		(TOP_HIGH + 0x04)
#define REGION_ACCESS		(REGION_ATTR + 0x04)

#define REGI_SEC_WR_EN		(0x1u << 31)
#define REGI_SEC_RD_EN		(0x1u << 30)
#define REGI_ENABLE		(0x1u << 0)
#define REGI_RESET_VALUE	(0x0u)

#define ASP_IDX_OFFSET		(0x20)

#define ASP_START_IDX		(7)
#define ASP_END_IDX		(10)


#define ASP_MIN_IDX		(0)
#define ASP_MAX_IDX		(63)

#define asp_target_sfr(a, b)	(a + (b * ASP_IDX_OFFSET))

#define ASP_MAPPED		(0x01)
#define ASP_UNMAPPED		(0x00)

#define TOP_LOW_MASK 		(0xFFFFF000u)

#endif
