~ubuntu-branches/ubuntu/vivid/linux-fsl-imx51/vivid

« back to all changes in this revision

Viewing changes to drivers/mtd/nand/gpmi/gpmi-bch.c

  • Committer: Bazaar Package Importer
  • Author(s): Andy Whitcroft, Bryan Wu, Heiko Carstens, Kay Sievers, Upstream Kernel Changes
  • Date: 2010-01-27 10:30:45 UTC
  • Revision ID: james.westby@ubuntu.com-20100127103045-ocbuz94jsh104pgx
Tags: 2.6.31-603.5
[ Bryan Wu ]

* [Config] Enable devtmpfs for fsl-imx51 kernel
  - LP: #512321
* SAUCE: IMX51: only export NEON flag to userspace on Freescale iMX51
  rev3.x or later silicon
  - LP: #507416

[ Heiko Carstens ]

* (pre-stable) driver-core: fix devtmpfs crash on s390
  - LP: #512370

[ Kay Sievers ]

* (pre-stable) Driver-Core: devtmpfs - set root directory mode to 0755
  - LP: #512370

[ Upstream Kernel Changes ]

* ENGR00119069 V4L2 capture: Do not change current crop setting for tvin.
* ENGR00118830 Update NAND driver scan scheme to support new nand type
* ENGR00118946 imx23: enable wake up from USB 5V
* ENGR00119150 Bluetooth: Handsfree audio has noise
* ENGR00118610 MX23: Add double buffering for PXP
* ENGR00118872 Write bootstream to kernel by kobs with BCH ECC
* ENGR00119199: ipu: add clock nodes for pixel clocks
* ENGR00119202: Fix DVFS-PER related bugs.
* ENGR00119203 MX23: Correct VDDD value for CPU frequency 360 MHz
* ENGR00119004 v4l2 output: fix kernel dump
* ENGR00119242 Add wait timeout support to void dead loop in NAND driver
* ENGR00119263: MX51 : Fix pll_set_rate function
* ENGR00119075 fix iMX23 USB initialization cause wrong power status
* ENGR00118892 MX23: iMX233 disable lcd clock when LCD off
* ENGR00119063 MX23: fix system halt rather than reboot when watchdog
  timeout
* ENGR00119324 Put GPMI NAND flash scan scheme code to the common NAND
  directory
* ENGR00114151 800x600-16@60 video not play correctly
* ENGR00119275 ipuv3: dmfc size control
* ENGR00119443 [MX23_BSP] GPMI driver computes wrong block size for
  K9GAG08U0D
* ENGR00119136 ipuv3: support 720p for ipu lib
* ENGR00119274 TVE: HDTV can not work
* ENGR00119104 MX23 ALSA: Resolve the problem of record from line-in
* ENGR00119081 V4l2 capture:Support NV12 output pixel format for still
  capture
* ENGR00119179 TVE: fix system hang for tvout
* ENGR00119070 IPUv3 FB:Support DP local alpha in pixel
* ENGR00119432 MX35 system can't re-boot up when SD/MMC boot is used.
* ENGR00119296 Fix iMX23 display abnormal when change frequency
* ENGR00119484 Update NFC INT wait timeout value to 1s
* ENGR00119504 MX25: Change nand partition for bootloader to 3M byte
* ENGR00119532 MX35: Change nand partition for bootloader to 3M bytes
* ENGR00119305 imx23: fix ethernet standby issue
* ENGR00115370 ipuv3: add display control
* ENGR00119531 ipuv3: dmfc setting restore during resume
* Driver Core: devtmpfs - kernel-maintained tmpfs-based /dev
  - LP: #512321

Show diffs side-by-side

added added

removed removed

Lines of Context:
193
193
 
194
194
        switch (writesize) {
195
195
        case 2048:
196
 
                ecc0 = 4;
197
 
                eccn = 4;
 
196
                ecc0 = 8;
 
197
                eccn = 8;
198
198
                metasize = 10;
199
199
                break;
200
200
        case 4096:
203
203
                        eccn = 8;
204
204
                } else {
205
205
                        ecc0 = 16;
206
 
                        eccn = 14;
 
206
                        eccn = 16;
207
207
                }
208
208
 
209
209
                metasize = 10;
220
220
        state->nands[index].ecc0 = ecc0;
221
221
        state->nands[index].eccn = eccn;
222
222
 
223
 
        __raw_writel(BF(writesize/512, BCH_FLASH0LAYOUT0_NBLOCKS) |
 
223
        __raw_writel(BF(writesize/512 - 1, BCH_FLASH0LAYOUT0_NBLOCKS) |
224
224
                     BF(metasize, BCH_FLASH0LAYOUT0_META_SIZE) |
225
225
                     BF(ecc0 >> 1, BCH_FLASH0LAYOUT0_ECC0) | /* for oob */
226
 
                     BF(0x00, BCH_FLASH0LAYOUT0_DATA0_SIZE), layout);
 
226
                     BF(512, BCH_FLASH0LAYOUT0_DATA0_SIZE), layout);
227
227
        __raw_writel(BF(writesize + oobsize, BCH_FLASH0LAYOUT1_PAGE_SIZE) |
228
228
                     BF(eccn >> 1, BCH_FLASH0LAYOUT1_ECCN) | /* for dblock */
229
229
                     BF(512, BCH_FLASH0LAYOUT1_DATAN_SIZE), layout + 0x10);
409
409
                BM_APBH_CHn_CMD_IRQONCMPLT      |
410
410
                BF(BV_APBH_CHn_CMD_COMMAND__NO_DMA_XFER, APBH_CHn_CMD_COMMAND);
411
411
 
 
412
        init_completion(&state->nands[index].done);
 
413
 
412
414
        return 0;
413
415
}
414
416
 
437
439
        if (err)
438
440
                return err;
439
441
 
440
 
        printk(KERN_DEBUG"%s: initialized\n", __func__);
 
442
        printk(KERN_INFO"%s: initialized\n", __func__);
441
443
        return 0;
442
444
}
443
445