mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-10 20:23:54 +09:00
TQM8272: Fix compiling error for the TQM8272 board.
Fix compile problems caused by
commit cfa460adfd
Signed-off-by: Heiko Schocher <hs@denx.de>
This commit is contained in:
parent
1a7f8ccec9
commit
584f979f7e
@ -1069,24 +1069,6 @@ int update_flash_size (int flash_size)
|
|||||||
|
|
||||||
static u8 hwctl = 0;
|
static u8 hwctl = 0;
|
||||||
|
|
||||||
static void upmnand_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
|
|
||||||
{
|
|
||||||
struct nand_chip *this = mtd->priv;
|
|
||||||
|
|
||||||
if (ctrl & NAND_CTRL_CHANGE) {
|
|
||||||
if ( ctrl & NAND_CLE )
|
|
||||||
hwctl |= 0x1;
|
|
||||||
else
|
|
||||||
hwctl &= ~0x1;
|
|
||||||
if ( ctrl & NAND_ALE )
|
|
||||||
hwctl |= 0x2;
|
|
||||||
else
|
|
||||||
hwctl &= ~0x2;
|
|
||||||
}
|
|
||||||
if (cmd != NAND_CMD_NONE)
|
|
||||||
writeb(cmd, this->IO_ADDR_W);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void upmnand_write_byte(struct mtd_info *mtdinfo, u_char byte)
|
static void upmnand_write_byte(struct mtd_info *mtdinfo, u_char byte)
|
||||||
{
|
{
|
||||||
struct nand_chip *this = mtdinfo->priv;
|
struct nand_chip *this = mtdinfo->priv;
|
||||||
@ -1101,6 +1083,22 @@ static void upmnand_write_byte(struct mtd_info *mtdinfo, u_char byte)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void upmnand_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
|
||||||
|
{
|
||||||
|
if (ctrl & NAND_CTRL_CHANGE) {
|
||||||
|
if ( ctrl & NAND_CLE )
|
||||||
|
hwctl |= 0x1;
|
||||||
|
else
|
||||||
|
hwctl &= ~0x1;
|
||||||
|
if ( ctrl & NAND_ALE )
|
||||||
|
hwctl |= 0x2;
|
||||||
|
else
|
||||||
|
hwctl &= ~0x2;
|
||||||
|
}
|
||||||
|
if (cmd != NAND_CMD_NONE)
|
||||||
|
upmnand_write_byte (mtd, cmd);
|
||||||
|
}
|
||||||
|
|
||||||
static u_char upmnand_read_byte(struct mtd_info *mtdinfo)
|
static u_char upmnand_read_byte(struct mtd_info *mtdinfo)
|
||||||
{
|
{
|
||||||
struct nand_chip *this = mtdinfo->priv;
|
struct nand_chip *this = mtdinfo->priv;
|
||||||
@ -1191,7 +1189,6 @@ int board_nand_init(struct nand_chip *nand)
|
|||||||
|
|
||||||
nand->cmd_ctrl = upmnand_hwcontrol;
|
nand->cmd_ctrl = upmnand_hwcontrol;
|
||||||
nand->read_byte = upmnand_read_byte;
|
nand->read_byte = upmnand_read_byte;
|
||||||
nand->write_byte = upmnand_write_byte;
|
|
||||||
nand->dev_ready = tqm8272_dev_ready;
|
nand->dev_ready = tqm8272_dev_ready;
|
||||||
|
|
||||||
#ifndef CONFIG_NAND_SPL
|
#ifndef CONFIG_NAND_SPL
|
||||||
|
Loading…
Reference in New Issue
Block a user