History

mtd: nand: Add a helper to retrieve the number of pages per target

Will be used by the raw NAND framework.

Boris Brezillon committed 8 years ago

Commit 46b01d71 parent 7c4ecca1 file · +14 −0Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/mtd/nand.h+14−0
@@ -271,6 +271,20 @@ nanddev_pages_per_eraseblock(const struct nand_device *nand) · 270 unmodified lines
271271 return nand->memorg.pages_per_eraseblock;
272272 }
273273
274+/**
275+ * nanddev_pages_per_target() - Get the number of pages per target
276+ * @nand: NAND device
277+ *
278+ * Return: the number of pages per target.
279+ */
280+static inline unsigned int
281+nanddev_pages_per_target(const struct nand_device *nand)
282+{
283+ return nand->memorg.pages_per_eraseblock *
284+ nand->memorg.eraseblocks_per_lun *
285+ nand->memorg.luns_per_target;
286+}
287+
274288 /**
275289 * nanddev_per_page_oobsize() - Get NAND erase block size
276290 * @nand: NAND device

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t