File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,8 +167,9 @@ static struct mtd_partition aspenite_nand_partitions[] = {
167167
168168static struct pxa3xx_nand_platform_data aspenite_nand_info = {
169169 .enable_arbiter = 1 ,
170- .parts = aspenite_nand_partitions ,
171- .nr_parts = ARRAY_SIZE (aspenite_nand_partitions ),
170+ .num_cs = 1 ,
171+ .parts [0 ] = aspenite_nand_partitions ,
172+ .nr_parts [0 ] = ARRAY_SIZE (aspenite_nand_partitions ),
172173};
173174
174175static struct i2c_board_info aspenite_i2c_info [] __initdata = {
Original file line number Diff line number Diff line change @@ -424,8 +424,9 @@ static struct mtd_partition cm_x300_nand_partitions[] = {
424424static struct pxa3xx_nand_platform_data cm_x300_nand_info = {
425425 .enable_arbiter = 1 ,
426426 .keep_config = 1 ,
427- .parts = cm_x300_nand_partitions ,
428- .nr_parts = ARRAY_SIZE (cm_x300_nand_partitions ),
427+ .num_cs = 1 ,
428+ .parts [0 ] = cm_x300_nand_partitions ,
429+ .nr_parts [0 ] = ARRAY_SIZE (cm_x300_nand_partitions ),
429430};
430431
431432static void __init cm_x300_init_nand (void )
Original file line number Diff line number Diff line change @@ -139,8 +139,9 @@ static struct mtd_partition colibri_nand_partitions[] = {
139139static struct pxa3xx_nand_platform_data colibri_nand_info = {
140140 .enable_arbiter = 1 ,
141141 .keep_config = 1 ,
142- .parts = colibri_nand_partitions ,
143- .nr_parts = ARRAY_SIZE (colibri_nand_partitions ),
142+ .num_cs = 1 ,
143+ .parts [0 ] = colibri_nand_partitions ,
144+ .nr_parts [0 ] = ARRAY_SIZE (colibri_nand_partitions ),
144145};
145146
146147void __init colibri_pxa3xx_init_nand (void )
Original file line number Diff line number Diff line change @@ -325,8 +325,9 @@ static struct mtd_partition littleton_nand_partitions[] = {
325325
326326static struct pxa3xx_nand_platform_data littleton_nand_info = {
327327 .enable_arbiter = 1 ,
328- .parts = littleton_nand_partitions ,
329- .nr_parts = ARRAY_SIZE (littleton_nand_partitions ),
328+ .num_cs = 1 ,
329+ .parts [0 ] = littleton_nand_partitions ,
330+ .nr_parts [0 ] = ARRAY_SIZE (littleton_nand_partitions ),
330331};
331332
332333static void __init littleton_init_nand (void )
Original file line number Diff line number Diff line change @@ -389,10 +389,11 @@ static struct mtd_partition mxm_8x10_nand_partitions[] = {
389389};
390390
391391static struct pxa3xx_nand_platform_data mxm_8x10_nand_info = {
392- .enable_arbiter = 1 ,
393- .keep_config = 1 ,
394- .parts = mxm_8x10_nand_partitions ,
395- .nr_parts = ARRAY_SIZE (mxm_8x10_nand_partitions )
392+ .enable_arbiter = 1 ,
393+ .keep_config = 1 ,
394+ .num_cs = 1 ,
395+ .parts [0 ] = mxm_8x10_nand_partitions ,
396+ .nr_parts [0 ] = ARRAY_SIZE (mxm_8x10_nand_partitions )
396397};
397398
398399static void __init mxm_8x10_nand_init (void )
Original file line number Diff line number Diff line change @@ -346,8 +346,9 @@ static struct mtd_partition raumfeld_nand_partitions[] = {
346346static struct pxa3xx_nand_platform_data raumfeld_nand_info = {
347347 .enable_arbiter = 1 ,
348348 .keep_config = 1 ,
349- .parts = raumfeld_nand_partitions ,
350- .nr_parts = ARRAY_SIZE (raumfeld_nand_partitions ),
349+ .num_cs = 1 ,
350+ .parts [0 ] = raumfeld_nand_partitions ,
351+ .nr_parts [0 ] = ARRAY_SIZE (raumfeld_nand_partitions ),
351352};
352353
353354/**
Original file line number Diff line number Diff line change @@ -366,8 +366,9 @@ static struct mtd_partition zylonite_nand_partitions[] = {
366366
367367static struct pxa3xx_nand_platform_data zylonite_nand_info = {
368368 .enable_arbiter = 1 ,
369- .parts = zylonite_nand_partitions ,
370- .nr_parts = ARRAY_SIZE (zylonite_nand_partitions ),
369+ .num_cs = 1 ,
370+ .parts [0 ] = zylonite_nand_partitions ,
371+ .nr_parts [0 ] = ARRAY_SIZE (zylonite_nand_partitions ),
371372};
372373
373374static void __init zylonite_init_nand (void )
Original file line number Diff line number Diff line change @@ -41,6 +41,19 @@ struct pxa3xx_nand_flash {
4141 struct pxa3xx_nand_timing * timing ; /* NAND Flash timing */
4242};
4343
44+ /*
45+ * Current pxa3xx_nand controller has two chip select which
46+ * both be workable.
47+ *
48+ * Notice should be taken that:
49+ * When you want to use this feature, you should not enable the
50+ * keep configuration feature, for two chip select could be
51+ * attached with different nand chip. The different page size
52+ * and timing requirement make the keep configuration impossible.
53+ */
54+
55+ /* The max num of chip select current support */
56+ #define NUM_CHIP_SELECT (2)
4457struct pxa3xx_nand_platform_data {
4558
4659 /* the data flash bus is shared between the Static Memory
@@ -52,8 +65,11 @@ struct pxa3xx_nand_platform_data {
5265 /* allow platform code to keep OBM/bootloader defined NFC config */
5366 int keep_config ;
5467
55- const struct mtd_partition * parts ;
56- unsigned int nr_parts ;
68+ /* indicate how many chip selects will be used */
69+ int num_cs ;
70+
71+ const struct mtd_partition * parts [NUM_CHIP_SELECT ];
72+ unsigned int nr_parts [NUM_CHIP_SELECT ];
5773
5874 const struct pxa3xx_nand_flash * flash ;
5975 size_t num_flash ;
You can’t perform that action at this time.
0 commit comments