mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-30 08:31:03 +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>
73 lines
1.9 KiB
C
73 lines
1.9 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* (C) Copyright 2009 Faraday Technology
|
|
* Po-Yu Chuang <ratbert@faraday-tech.com>
|
|
*/
|
|
|
|
/*
|
|
* Static Memory Controller
|
|
*/
|
|
#ifndef __FTSMC020_H
|
|
#define __FTSMC020_H
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
struct ftsmc020_bank {
|
|
unsigned int cr;
|
|
unsigned int tpr;
|
|
};
|
|
|
|
struct ftsmc020 {
|
|
struct ftsmc020_bank bank[4]; /* 0x00 - 0x1c */
|
|
unsigned int pad[8]; /* 0x20 - 0x3c */
|
|
unsigned int ssr; /* 0x40 */
|
|
};
|
|
|
|
void ftsmc020_init(void);
|
|
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
/*
|
|
* Memory Bank Configuration Register
|
|
*/
|
|
#define FTSMC020_BANK_ENABLE (1 << 28)
|
|
#define FTSMC020_BANK_BASE(x) ((x) & 0x0fff1000)
|
|
|
|
#define FTSMC020_BANK_WPROT (1 << 11)
|
|
|
|
#define FTSMC020_BANK_TYPE1 (1 << 10)
|
|
#define FTSMC020_BANK_TYPE2 (1 << 9)
|
|
#define FTSMC020_BANK_TYPE3 (1 << 8)
|
|
|
|
#define FTSMC020_BANK_SIZE_32K (0xb << 4)
|
|
#define FTSMC020_BANK_SIZE_64K (0xc << 4)
|
|
#define FTSMC020_BANK_SIZE_128K (0xd << 4)
|
|
#define FTSMC020_BANK_SIZE_256K (0xe << 4)
|
|
#define FTSMC020_BANK_SIZE_512K (0xf << 4)
|
|
#define FTSMC020_BANK_SIZE_1M (0x0 << 4)
|
|
#define FTSMC020_BANK_SIZE_2M (0x1 << 4)
|
|
#define FTSMC020_BANK_SIZE_4M (0x2 << 4)
|
|
#define FTSMC020_BANK_SIZE_8M (0x3 << 4)
|
|
#define FTSMC020_BANK_SIZE_16M (0x4 << 4)
|
|
#define FTSMC020_BANK_SIZE_32M (0x5 << 4)
|
|
#define FTSMC020_BANK_SIZE_64M (0x6 << 4)
|
|
|
|
#define FTSMC020_BANK_MBW_8 (0x0 << 0)
|
|
#define FTSMC020_BANK_MBW_16 (0x1 << 0)
|
|
#define FTSMC020_BANK_MBW_32 (0x2 << 0)
|
|
|
|
/*
|
|
* Memory Bank Timing Parameter Register
|
|
*/
|
|
#define FTSMC020_TPR_ETRNA(x) (((x) & 0xf) << 28)
|
|
#define FTSMC020_TPR_EATI(x) (((x) & 0xf) << 24)
|
|
#define FTSMC020_TPR_RBE (1 << 20)
|
|
#define FTSMC020_TPR_AST(x) (((x) & 0x3) << 18)
|
|
#define FTSMC020_TPR_CTW(x) (((x) & 0x3) << 16)
|
|
#define FTSMC020_TPR_ATI(x) (((x) & 0xf) << 12)
|
|
#define FTSMC020_TPR_AT2(x) (((x) & 0x3) << 8)
|
|
#define FTSMC020_TPR_WTC(x) (((x) & 0x3) << 6)
|
|
#define FTSMC020_TPR_AHT(x) (((x) & 0x3) << 4)
|
|
#define FTSMC020_TPR_TRNA(x) (((x) & 0xf) << 0)
|
|
|
|
#endif /* __FTSMC020_H */
|