netlink: revert broken, broken "2-clause nla_ok()"
[linux-2.6/btrfs-unstable.git] / include / linux / jz4780-nemc.h
blobe7f1cc7a228469554c114b3812ff86dade9deb3f
1 /*
2 * JZ4780 NAND/external memory controller (NEMC)
4 * Copyright (c) 2015 Imagination Technologies
5 * Author: Alex Smith <alex@alex-smith.me.uk>
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
13 #ifndef __LINUX_JZ4780_NEMC_H__
14 #define __LINUX_JZ4780_NEMC_H__
16 #include <linux/types.h>
18 struct device;
21 * Number of NEMC banks. Note that there are actually 6, but they are numbered
22 * from 1.
24 #define JZ4780_NEMC_NUM_BANKS 7
26 /**
27 * enum jz4780_nemc_bank_type - device types which can be connected to a bank
28 * @JZ4780_NEMC_BANK_SRAM: SRAM
29 * @JZ4780_NEMC_BANK_NAND: NAND
31 enum jz4780_nemc_bank_type {
32 JZ4780_NEMC_BANK_SRAM,
33 JZ4780_NEMC_BANK_NAND,
36 extern unsigned int jz4780_nemc_num_banks(struct device *dev);
38 extern void jz4780_nemc_set_type(struct device *dev, unsigned int bank,
39 enum jz4780_nemc_bank_type type);
40 extern void jz4780_nemc_assert(struct device *dev, unsigned int bank,
41 bool assert);
43 #endif /* __LINUX_JZ4780_NEMC_H__ */