From: Dirk Behme <dirk.behme@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [ARM] TI DaVinci (TMS320DM644x) support [2/5]
Date: Mon, 06 Aug 2007 19:11:49 +0200 [thread overview]
Message-ID: <46B75655.9030603@googlemail.com> (raw)
In-Reply-To: <Pine.LNX.4.64ksi.0708051727480.21187@home-gw.koi8.net>
ksi at koi8.net wrote:
> diff -purN u-boot.git.orig/include/linux/mtd/mtd.h
u-boot.git/include/linux/mtd/mtd.h
> --- u-boot.git.orig/include/linux/mtd/mtd.h 2007-02-12
10:41:27.000000000 -0800
> +++ u-boot.git/include/linux/mtd/mtd.h 2007-08-05
16:19:52.000000000 -0700
> @@ -11,6 +11,11 @@
> #include <linux/types.h>
> #include <linux/mtd/mtd-abi.h>
>
> +#if 0
> +#define CONFIG_MTD_DEBUG 1
> +#define CONFIG_MTD_DEBUG_VERBOSE 3
> +#endif
> +
> #define MAX_MTD_DEVICES 16
>
> #define MTD_ERASE_PENDING 0x01
> @@ -201,11 +206,19 @@ static inline void mtd_erase_callback(st
> #define MTD_DEBUG_LEVEL3 (3) /* Noisy */
>
> #ifdef CONFIG_MTD_DEBUG
> +#if 0
> #define DEBUG(n, args...) \
> do { \
> if (n <= CONFIG_MTD_DEBUG_VERBOSE) \
> printk(KERN_INFO args); \
> } while(0)
> +#else
> +#define DEBUG(n, args...) \
> + do { \
> + if (n <= CONFIG_MTD_DEBUG_VERBOSE) \
> + printf(args); \
> + } while(0)
> +#endif
> #else /* CONFIG_MTD_DEBUG */
> #define DEBUG(n, args...) do { } while(0)
>
...
> diff -purN u-boot.git.orig/drivers/nand/nand_bbt.c u-boot.git/drivers/nand/nand_bbt.c
> --- u-boot.git.orig/drivers/nand/nand_bbt.c 2007-02-12 10:41:27.000000000 -0800
> +++ u-boot.git/drivers/nand/nand_bbt.c 2007-08-05 16:19:52.000000000 -0700
> @@ -152,7 +152,7 @@ static int read_bbt (struct mtd_info *mt
> continue;
> if (reserved_block_code &&
> (tmp == reserved_block_code)) {
> - printk (KERN_DEBUG "nand_read_bbt: Reserved block at 0x%08x\n",
> + DEBUG(MTD_DEBUG_LEVEL0, "nand_read_bbt: Reserved block at 0x%08x\n",
> ((offs << 2) + (act >> 1)) << this->bbt_erase_shift);
> this->bbt[offs + (act >> 3)] |= 0x2 << (act & 0x06);
> continue;
> @@ -229,14 +229,14 @@ static int read_abs_bbts (struct mtd_inf
> if (td->options & NAND_BBT_VERSION) {
> nand_read_raw (mtd, buf, td->pages[0] << this->page_shift, mtd->oobblock, mtd->oobsize);
> td->version[0] = buf[mtd->oobblock + td->veroffs];
> - printk (KERN_DEBUG "Bad block table at page %d, version 0x%02X\n", td->pages[0], td->version[0]);
> + DEBUG(MTD_DEBUG_LEVEL0, "Bad block table at page %d, version 0x%02X\n", td->pages[0], td->version[0]);
> }
>
> /* Read the mirror version, if available */
> if (md && (md->options & NAND_BBT_VERSION)) {
> nand_read_raw (mtd, buf, md->pages[0] << this->page_shift, mtd->oobblock, mtd->oobsize);
> md->version[0] = buf[mtd->oobblock + md->veroffs];
> - printk (KERN_DEBUG "Bad block table at page %d, version 0x%02X\n", md->pages[0], md->version[0]);
> + DEBUG(MTD_DEBUG_LEVEL0, "Bad block table at page %d, version 0x%02X\n", md->pages[0], md->version[0]);
> }
>
> return 1;
> @@ -375,7 +375,7 @@ static int search_bbt (struct mtd_info *
> if (td->pages[i] == -1)
> printk (KERN_WARNING "Bad block table not found for chip %d\n", i);
> else
> - printk (KERN_DEBUG "Bad block table found at page %d, version 0x%02X\n", td->pages[i], td->version[i]);
> + DEBUG(MTD_DEBUG_LEVEL0, "Bad block table found at page %d, version 0x%02X\n", td->pages[i], td->version[i]);
> }
> return 0;
> }
> @@ -569,7 +569,7 @@ write:
> printk (KERN_WARNING "nand_bbt: Error while writing bad block table %d\n", res);
> return res;
> }
> - printk (KERN_DEBUG "Bad block table written to 0x%08x, version 0x%02X\n",
> + DEBUG(MTD_DEBUG_LEVEL0, "Bad block table written to 0x%08x, version 0x%02X\n",
> (unsigned int) to, td->version[chip]);
>
> /* Mark it as used */
- Do we really need this? If yes, please check if you hit all "printk
(KERN_DEBUG, .." statements. It looked to me that there was still one
"printk (KERN_DEBUG, .." after applying your patch.
- Can anybody please check if patches [2/5] and [5/5] apply cleanly?
I'm not sure whether I made anything wrong while saving the patches,
but patch 2 and 5, which are modify existing files, have rejects for me.
So unfortunately, I can't actually compile DaVinci patches because
(a) recent git fails compiling for me in drivers/bios_emulator
(b) patch [2/5] and [5/5] have rejects for me I have to resolve manually
(c) if (a) and (b) is fixed, davinci.h needs changes for most recent git
So all comments from review only. Hope this helps at least a little.
Best regards
Dirk
next prev parent reply other threads:[~2007-08-06 17:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-06 0:29 [U-Boot-Users] [ARM] TI DaVinci (TMS320DM644x) support [2/5] ksi at koi8.net
2007-08-06 17:11 ` Dirk Behme [this message]
2007-08-06 18:41 ` Wolfgang Denk
2007-08-06 19:31 ` ksi at koi8.net
2007-08-06 20:53 ` Wolfgang Denk
2007-08-06 21:06 ` ksi at koi8.net
2007-08-06 22:01 ` Wolfgang Denk
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=46B75655.9030603@googlemail.com \
--to=dirk.behme@googlemail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.