Revert "MTD: atmel_nand: Add PMECC controller support"

This reverts commit f3b6daeff4340b90ce98966871fbbdd3e1249578.

prepare to use mainline PMECC patch.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Revert "MTD: atmel_nand: optimize read/write buffer functions"

This reverts commit 6ddc4f41327a2782c63817dc8b94dd92edad8352.

In mainline this commit is also reverted. see:

500823195d0c9eec2a4637484f30cc93ec633d4a (Revert "mtd: atmel_nand: optimize read/write buffer functions")

Signed-off-by: Josh Wu <josh.wu@atmel.com>
mtd: at91: extract hw ecc initialization to one function

This patch moves hw ecc initialization code to one function.

Signed-off-by: Hong Xu <hong.xu@atmel.com>
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
[port to 2.6.39]
Signed-off-by: Josh Wu <josh.wu@atmel.com>
atmel_nand: add PMECC parameters in nand structure.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
mtd: at91: atmel_nand: add Programmable Multibit ECC controller support

The Programmable Multibit ECC (PMECC) controller is a programmable binary
BCH(Bose, Chaudhuri and Hocquenghem) encoder and decoder. This controller
can be used to support both SLC and MLC NAND Flash devices. It supports to
generate ECC to correct 2, 4, 8, 12 or 24 bits of error per sector of data.

To use PMECC in this driver, the user needs to set the address and size of
PMECC, PMECC error location controllers and ROM. And also needs to pass the
correction capability, the sector size and ROM lookup table offsets via dt.

This driver has been tested on AT91SAM9X5-EK and AT91SAM9N12-EK with JFFS2,
YAFFS2, UBIFS and mtd-utils.

Signed-off-by: Hong Xu <hong.xu@atmel.com>
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Tested-by: Richard Genoud <richard.genoud@gmail.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
atmel_nand: port to 2.6.39. modify function definition of read_page()/write_page() and remove ecc.strength.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
atmel_nand: pass the pmecc parameter from board file to driver.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
atmel_nand: 9x5ek: enable PMECC in 9x5ek board.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
atmel_nand: enable dma for 9x5ek.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
9n12: add initial support for SAM9N12. the code is based on 9x5 board.

Signed-off-by: Hong Xu <hong.xu@atmel.com>
9n12: Manually add mach-types with the support for 9n12

Signed-off-by: Hong Xu <hong.xu@atmel.com>
9n12: Add initial at91sam9n12ek_defconfig

Signed-off-by: Hong Xu <hong.xu@atmel.com>
9N12: Change Macro definition for AT91_MATRIX_EBI_DRIVE

Signed-off-by: elen.song <elen.song@atmel.com>
Signed-off-by: Hong Xu <hong.xu@atmel.com>
9n12: Enable Nandflash on Board

Configure Nandflash timing,Pin defination on VB board.
Add DMA controller.
Test with SWECC.

Signed-off-by: elen.song <elen.song@atmel.com>
Signed-off-by: Hong Xu <hong.xu@atmel.com>
[remove the modification of atmel_nand.c]
Signed-off-by: Josh Wu <josh.wu@atmel.com>
9n12: Add SD/MMC support on board

Signed-off-by: elen.song <elen.song@atmel.com>
Signed-off-by: Hong Xu <hong.xu@atmel.com>
9n12: Enable USB on the board

Configure PLLB to genrate clock to USB.
Configure USB host and device port vbus-pin,according to VB schematics.
    and USB device port vbus_pin(AT91_PIN_PC0) conflicts with LCDC pin configuration.
Register USB device as "at91_udc".
Configure OHCI_BASE Address to 0x00500000, according to datasheet.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Hong Xu <hong.xu@atmel.com>
[split the comments to another commit]
Signed-off-by: Josh Wu <josh.wu@atmel.com>
9n12: Configure USB host vbus-pin to AT91_PIN_PB7

Configure USB host vbus-pin to AT91_PIN_PB7
USB device vbus-pin to AT91_PIN_PB16
Only 1 host port on AT91SAM9N12-EK

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Hong Xu <hong.xu@atmel.com>
9n12: Add KS8851 Ethernet chip

Add KS8851 Ethernet chip. It's connected to D0..D15 and uses NCS2

Note: It conflicts with NF on N12 proto board

Signed-off-by: Elen Song <elen.song@atmel.com>
Signed-off-by: Hong Xu <hong.xu@atmel.com>
video: atmel_hlcdfb: Add support to change different LCD configurations at board level

Add support to change different LCD configurations at board level
- Piexl clock polarity
- PWM clock source selection
- PWM clock prescaler
- PWM clock polarity

Signed-off-by: Hong Xu <hong.xu@atmel.com>
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
[format changes, remove the code that disable HEO interrupt that impact to 9x5.]
[add paramters for 9x5 in board file.]
Signed-off-by: Josh Wu <josh.wu@atmel.com>
9n12: Enable LCD on the AT91SAM9N12-EK board

Select the system clock as the pwm-clock source
Set the PWM clock prescaler to DIV_64
Set the pixel clock polarity to rising edge

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Hong Xu <hong.xu@atmel.com>