summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/raw/mt7621_nand.h
blob: af4bc55961a86640be413d97a1811dd936b3f1b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (C) 2022 MediaTek Inc. All rights reserved.
 *
 * Author: Weijie Gao <weijie.gao@mediatek.com>
 */

#ifndef _MT7621_NAND_H_
#define _MT7621_NAND_H_

#include <linux/types.h>
#include <linux/mtd/mtd.h>
#include <linux/compiler.h>
#include <linux/mtd/rawnand.h>

struct mt7621_nfc {
	struct nand_chip nand;

	void __iomem *nfi_regs;
	void __iomem *ecc_regs;

	u32 spare_per_sector;
};

/* for SPL */
void mt7621_nfc_spl_init(struct mt7621_nfc *nfc);
int mt7621_nfc_spl_post_init(struct mt7621_nfc *nfc);

#endif /* _MT7621_NAND_H_ */