From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3] [POWERPC] TQM8272: Fix compiling error for the TQM8272 board.
Date: Thu, 28 Aug 2008 13:48:36 +0200 [thread overview]
Message-ID: <48B69094.3030103@denx.de> (raw)
In-Reply-To: <20080827201034.GB20876@ld0162-tx32.am.freescale.net>
Hello,
[POWERPC] TQM8272: Fix compiling error for the TQM8272 board.
tqm8272.c: In function 'upmnand_hwcontrol':
tqm8272.c:1086: warning: implicit declaration of function 'writeb'
tqm8272.c: In function 'board_nand_init':
tqm8272.c:1193: error: 'struct nand_chip' has no member named 'write_byte'
make[1]: *** [tqm8272.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [board/tqc/tqm8272/libtqm8272.a] Error 2
introduced from commit:
Update MTD to that of Linux 2.6.22.1
author William Juul <william.juul@datarespons.no>
Wed, 31 Oct 2007 12:53:06 +0000 (13:53 +0100)
committer Scott Wood <scottwood@freescale.com>
Tue, 12 Aug 2008 16:31:15 +0000 (11:31 -0500)
commit cfa460adfdefcc30d104e1a9ee44994ee349bb7b
Signed-off-by: Heiko Schocher <hs@denx.de>
---
board/tqc/tqm8272/tqm8272.c | 33 +++++++++++++++------------------
1 files changed, 15 insertions(+), 18 deletions(-)
diff --git a/board/tqc/tqm8272/tqm8272.c b/board/tqc/tqm8272/tqm8272.c
index a0ec254..a3d37f6 100644
--- a/board/tqc/tqm8272/tqm8272.c
+++ b/board/tqc/tqm8272/tqm8272.c
@@ -1068,10 +1068,22 @@ int update_flash_size (int flash_size)
static u8 hwctl = 0;
-static void upmnand_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
+static void upmnand_write_byte(struct mtd_info *mtdinfo, u_char byte)
{
- struct nand_chip *this = mtd->priv;
+ struct nand_chip *this = mtdinfo->priv;
+ ulong base = (ulong) (this->IO_ADDR_W + chipsel * CFG_NAND_CS_DIST);
+ if (hwctl & 0x1) {
+ WRITE_NAND_UPM(byte, base, CFG_NAND_UPM_WRITE_CMD_OFS);
+ } else if (hwctl & 0x2) {
+ WRITE_NAND_UPM(byte, base, CFG_NAND_UPM_WRITE_ADDR_OFS);
+ } else {
+ WRITE_NAND(byte, base);
+ }
+}
+
+static void upmnand_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
+{
if (ctrl & NAND_CTRL_CHANGE) {
if ( ctrl & NAND_CLE )
hwctl |= 0x1;
@@ -1083,21 +1095,7 @@ static void upmnand_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
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)
-{
- struct nand_chip *this = mtdinfo->priv;
- ulong base = (ulong) (this->IO_ADDR_W + chipsel * CFG_NAND_CS_DIST);
-
- if (hwctl & 0x1) {
- WRITE_NAND_UPM(byte, base, CFG_NAND_UPM_WRITE_CMD_OFS);
- } else if (hwctl & 0x2) {
- WRITE_NAND_UPM(byte, base, CFG_NAND_UPM_WRITE_ADDR_OFS);
- } else {
- WRITE_NAND(byte, base);
- }
+ upmnand_write_byte (mtd, cmd);
}
static u_char upmnand_read_byte(struct mtd_info *mtdinfo)
@@ -1190,7 +1188,6 @@ int board_nand_init(struct nand_chip *nand)
nand->cmd_ctrl = upmnand_hwcontrol;
nand->read_byte = upmnand_read_byte;
- nand->write_byte = upmnand_write_byte;
nand->dev_ready = tqm8272_dev_ready;
#ifndef CONFIG_NAND_SPL
--
1.5.6.1
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2008-08-28 11:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-27 11:08 [U-Boot] [POWERPC] TQM8272: Fix compiling error for the TQM8272 board Heiko Schocher
2008-08-27 11:13 ` Stefan Roese
2008-08-27 11:34 ` Heiko Schocher
2008-08-27 11:59 ` Stefan Roese
2008-08-27 18:37 ` [U-Boot] [PATCH v2] " Heiko Schocher
2008-08-27 20:10 ` Scott Wood
2008-08-28 11:48 ` Heiko Schocher [this message]
2008-09-06 21:31 ` [U-Boot] [PATCH v3] " Wolfgang Denk
2008-08-28 11:50 ` [U-Boot] [PATCH][POWERPC] TQM8272: move NAND part in seperate File Heiko Schocher
2008-09-06 21:32 ` Wolfgang Denk
2008-09-06 20:54 ` [U-Boot] [PATCH v2] [POWERPC] TQM8272: Fix compiling error for the TQM8272 board Wolfgang Denk
2008-08-27 20:09 ` [U-Boot] " Scott Wood
2008-08-28 3:35 ` Heiko Schocher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48B69094.3030103@denx.de \
--to=hs@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox