blob: 2ca89477305f1c3255b6f08bfbd0791fdd2d15b8 [file] [log] [blame]
Roger Quadrosbae074b2013-11-11 16:56:41 +02001/*
2 * SATA Wrapper Register map
3 *
4 * (C) Copyright 2013
5 * Texas Instruments, <www.ti.com>
6 *
7 * SPDX-License-Identifier: GPL-2.0+
8 */
9
10#ifndef _TI_SATA_H
11#define _TI_SATA_H
12
13/* SATA Wrapper module */
14#define TI_SATA_WRAPPER_BASE (OMAP54XX_L4_CORE_BASE + 0x141100)
15/* SATA PHY Module */
16#define TI_SATA_PLLCTRL_BASE (OMAP54XX_L4_CORE_BASE + 0x96800)
17
18/* SATA Wrapper register offsets */
19#define TI_SATA_SYSCONFIG 0x00
20#define TI_SATA_CDRLOCK 0x04
21
22/* Register Set */
23#define TI_SATA_SYSCONFIG_OVERRIDE0 (1 << 16)
24#define TI_SATA_SYSCONFIG_STANDBY_MASK (0x3 << 4)
25#define TI_SATA_SYSCONFIG_IDLE_MASK (0x3 << 2)
26
27/* Standby modes */
28#define TI_SATA_STANDBY_FORCE 0x0
29#define TI_SATA_STANDBY_NO (0x1 << 4)
30#define TI_SATA_STANDBY_SMART_WAKE (0x3 << 4)
31#define TI_SATA_STANDBY_SMART (0x2 << 4)
32
33/* Idle modes */
34#define TI_SATA_IDLE_FORCE 0x0
35#define TI_SATA_IDLE_NO (0x1 << 2)
36#define TI_SATA_IDLE_SMART_WAKE (0x3 << 2)
37#define TI_SATA_IDLE_SMART (0x2 << 2)
38
39#ifdef CONFIG_SCSI_AHCI_PLAT
40int omap_sata_init(void);
41#else
42static inline int omap_sata_init(void)
43{
44 return 0;
45}
46#endif /* CONFIG_SCSI_AHCI_PLAT */
47
48#endif /* _TI_SATA_H */