nandps: Fix updating the command phase register twice

Fixed updating the command phase register twice for the
flash devices that require four address cycles.

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Acked-by: Anirudha Sarangi <anirudh@xilinx.com>
This commit is contained in:
Punnaiah Choudary Kalluri 2014-07-24 18:24:59 +05:30 committed by Jagannadha Sutradharudu Teki
parent 2792f0a431
commit fffe1b33b9

View file

@ -1119,15 +1119,18 @@ void XNandPs_SendCommand(XNandPs *InstancePtr, XNandPs_CommandFormat
CmdPhaseData = Column;
PageShift = InstancePtr->Geometry.ColAddrCycles * 8;
CmdPhaseData |= Page << PageShift;
/* Send lower bytes of page
address in first address
cycle */
XNandPs_WriteReg(CmdPhaseAddr, CmdPhaseData);
/*
* Send the upper bytes of the page address in second address
* address cycle
*/
CmdPhaseData = Page >> (32 - PageShift);
if (Command->AddrCycles > 4) {
/*
* Send lower bytes of page address in first address
* cycle
*/
XNandPs_WriteReg(CmdPhaseAddr, CmdPhaseData);
/*
* Send the upper bytes of the page address in second
* address cycle
*/
CmdPhaseData = Page >> (32 - PageShift);
}
} else if (Page != XNANDPS_PAGE_NOT_VALID) {
CmdPhaseData = Page;
} else {