1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Partition defines</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="MTD NAND Driver Programming Interface"><link rel="up" href="basicboarddriver.html" title="Chapter&#160;4.&#160;Basic board driver"><link rel="prev" href="basicboarddriver.html" title="Chapter&#160;4.&#160;Basic board driver"><link rel="next" href="Hardware_control_functions.html" title="Hardware control function"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Partition defines</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="basicboarddriver.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;4.&#160;Basic board driver</th><td width="20%" align="right">&#160;<a accesskey="n" href="Hardware_control_functions.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="Partition_defines"></a>Partition defines</h2></div></div></div><p>
2			If you want to divide your device into partitions, then
3			define a partitioning scheme suitable to your board.
4		</p><pre class="programlisting">
5#define NUM_PARTITIONS 2
6static struct mtd_partition partition_info[] = {
7	{ .name = "Flash partition 1",
8	  .offset =  0,
9	  .size =    8 * 1024 * 1024 },
10	{ .name = "Flash partition 2",
11	  .offset =  MTDPART_OFS_NEXT,
12	  .size =    MTDPART_SIZ_FULL },
13};
14		</pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="basicboarddriver.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="basicboarddriver.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="Hardware_control_functions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&#160;4.&#160;Basic board driver&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Hardware control function</td></tr></table></div></body></html>
15