mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-05 02:51:00 +00:00
83d290c56f
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
83 lines
2.4 KiB
C
83 lines
2.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Copyright (C) 2011
|
|
* Heiko Schocher, DENX Software Engineering, hs@denx.de.
|
|
*/
|
|
#ifndef _DV_DDR2_DEFS_H_
|
|
#define _DV_DDR2_DEFS_H_
|
|
|
|
/*
|
|
* DDR2 Memory Ctrl Register structure
|
|
* See sprueh7d.pdf for more details.
|
|
*/
|
|
struct dv_ddr2_regs_ctrl {
|
|
unsigned char rsvd0[4]; /* 0x00 */
|
|
unsigned int sdrstat; /* 0x04 */
|
|
unsigned int sdbcr; /* 0x08 */
|
|
unsigned int sdrcr; /* 0x0C */
|
|
unsigned int sdtimr; /* 0x10 */
|
|
unsigned int sdtimr2; /* 0x14 */
|
|
unsigned char rsvd1[4]; /* 0x18 */
|
|
unsigned int sdbcr2; /* 0x1C */
|
|
unsigned int pbbpr; /* 0x20 */
|
|
unsigned char rsvd2[156]; /* 0x24 */
|
|
unsigned int irr; /* 0xC0 */
|
|
unsigned int imr; /* 0xC4 */
|
|
unsigned int imsr; /* 0xC8 */
|
|
unsigned int imcr; /* 0xCC */
|
|
unsigned char rsvd3[20]; /* 0xD0 */
|
|
unsigned int ddrphycr; /* 0xE4 */
|
|
unsigned int ddrphycr2; /* 0xE8 */
|
|
unsigned char rsvd4[4]; /* 0xEC */
|
|
};
|
|
|
|
#define DV_DDR_PHY_PWRDNEN 0x40
|
|
#define DV_DDR_PHY_EXT_STRBEN 0x80
|
|
#define DV_DDR_PHY_RD_LATENCY_SHIFT 0
|
|
|
|
#define DV_DDR_SDTMR1_RFC_SHIFT 25
|
|
#define DV_DDR_SDTMR1_RP_SHIFT 22
|
|
#define DV_DDR_SDTMR1_RCD_SHIFT 19
|
|
#define DV_DDR_SDTMR1_WR_SHIFT 16
|
|
#define DV_DDR_SDTMR1_RAS_SHIFT 11
|
|
#define DV_DDR_SDTMR1_RC_SHIFT 6
|
|
#define DV_DDR_SDTMR1_RRD_SHIFT 3
|
|
#define DV_DDR_SDTMR1_WTR_SHIFT 0
|
|
|
|
#define DV_DDR_SDTMR2_RASMAX_SHIFT 27
|
|
#define DV_DDR_SDTMR2_XP_SHIFT 25
|
|
#define DV_DDR_SDTMR2_ODT_SHIFT 23
|
|
#define DV_DDR_SDTMR2_XSNR_SHIFT 16
|
|
#define DV_DDR_SDTMR2_XSRD_SHIFT 8
|
|
#define DV_DDR_SDTMR2_RTP_SHIFT 5
|
|
#define DV_DDR_SDTMR2_CKE_SHIFT 0
|
|
|
|
#define DV_DDR_SDCR_DDR2TERM1_SHIFT 27
|
|
#define DV_DDR_SDCR_IBANK_POS_SHIFT 26
|
|
#define DV_DDR_SDCR_MSDRAMEN_SHIFT 25
|
|
#define DV_DDR_SDCR_DDRDRIVE1_SHIFT 24
|
|
#define DV_DDR_SDCR_BOOTUNLOCK_SHIFT 23
|
|
#define DV_DDR_SDCR_DDR_DDQS_SHIFT 22
|
|
#define DV_DDR_SDCR_DDR2EN_SHIFT 20
|
|
#define DV_DDR_SDCR_DDRDRIVE0_SHIFT 18
|
|
#define DV_DDR_SDCR_DDREN_SHIFT 17
|
|
#define DV_DDR_SDCR_SDRAMEN_SHIFT 16
|
|
#define DV_DDR_SDCR_TIMUNLOCK_SHIFT 15
|
|
#define DV_DDR_SDCR_BUS_WIDTH_SHIFT 14
|
|
#define DV_DDR_SDCR_CL_SHIFT 9
|
|
#define DV_DDR_SDCR_IBANK_SHIFT 4
|
|
#define DV_DDR_SDCR_PAGESIZE_SHIFT 0
|
|
|
|
#define DV_DDR_SDRCR_LPMODEN (1 << 31)
|
|
#define DV_DDR_SDRCR_MCLKSTOPEN (1 << 30)
|
|
|
|
#define DV_DDR_SRCR_LPMODEN_SHIFT 31
|
|
#define DV_DDR_SRCR_MCLKSTOPEN_SHIFT 30
|
|
|
|
#define DV_DDR_BOOTUNLOCK (1 << DV_DDR_SDCR_BOOTUNLOCK_SHIFT)
|
|
#define DV_DDR_TIMUNLOCK (1 << DV_DDR_SDCR_TIMUNLOCK_SHIFT)
|
|
|
|
#define dv_ddr2_regs_ctrl \
|
|
((struct dv_ddr2_regs_ctrl *)DAVINCI_DDR_EMIF_CTRL_BASE)
|
|
|
|
#endif /* _DV_DDR2_DEFS_H_ */
|