From: Pete Popov <ppopov@embeddedalley.com>
To: Josh Green <jgreen@users.sourceforge.net>
Cc: linux-mips@linux-mips.org
Subject: Re: Fixes to MTD flash driver on AMD Alchemy db1100 board
Date: Sun, 20 Feb 2005 21:23:26 -0800 [thread overview]
Message-ID: <4219704E.8000207@embeddedalley.com> (raw)
In-Reply-To: <1108962105.6611.24.camel@SillyPuddy.localdomain>
Josh Green wrote:
> Hello, I found a couple compile problems with the
> drivers/mtd/maps/db1x00-flash.c MTD driver. I'm using linux-mips CVS
> from a few weeks back, corresponding to 2.6.11rc2. I noticed some
> recent CVS traffic in regards to this driver, but I didn't see them in
> cvsweb on the linux-mips site. My apologies if this is something that
> has already been reported. Fixes in the patch below:
>
> - Specify proper paths for #include of au1000.h and db1x00.h
> - Cast return value of ioremap to (void __iomem *) to get rid of warning
> concerning conversion of integer to pointer
> - Setup DB1X00_BOTH_BANKS, DB1X00_BOOT_ONLY, and DB1X00_USER_ONLY
> defines in db1x00.h (used pb1550.h as an example) since they seemed to
> be missing which was causing the following to be triggered:
>
> #error MTD_DB1X00 define combo error /* should never happen */
>
> I can see the partitions in /dev/mtd now, but I have not thoroughly
> tested it yet to see if there are any other problems.
The latest mtd driver(s) are in the mtd tree and the db1x00 driver
there should work. Ralf pulls the mtd code from kernel.org and ..
I'm not sure when and how the code gets in kernel.org. The problem
is that if I pull from the mtd tree and push the latest drivers in
linux-mips, they'll still get overwritten with the code from
kernel.org. I'm not sure what's the best way to maintain these
drivers and avoid the confusion.
Pete
>
> Best regards,
> Josh Green
>
>
> ---------------
>
>
> diff -ruN a/drivers/mtd/maps/db1x00-flash.c b/drivers/mtd/maps/db1x00-flash.c
> --- a/drivers/mtd/maps/db1x00-flash.c 2005-02-20 20:29:30.268844944 -0800
> +++ b/drivers/mtd/maps/db1x00-flash.c 2005-02-20 20:29:36.025969728 -0800
> @@ -18,8 +18,8 @@
> #include <linux/mtd/partitions.h>
>
> #include <asm/io.h>
> -#include <asm/au1000.h>
> -#include <asm/db1x00.h>
> +#include <asm/mach-au1x00/au1000.h>
> +#include <asm/mach-db1x00/db1x00.h>
>
> #ifdef DEBUG_RW
> #define DBG(x...) printk(x)
> @@ -192,7 +192,7 @@
> */
> printk(KERN_NOTICE "Db1xxx flash: probing %d-bit flash bus\n",
> db1xxx_mtd_map.bankwidth*8);
> - db1xxx_mtd_map.virt = (unsigned long)ioremap(window_addr, window_size);
> + db1xxx_mtd_map.virt = (void __iomem *)ioremap(window_addr, window_size);
> db1xxx_mtd = do_map_probe("cfi_probe", &db1xxx_mtd_map);
> if (!db1xxx_mtd) return -ENXIO;
> db1xxx_mtd->owner = THIS_MODULE;
> diff -ruN a/include/asm-mips/mach-db1x00/db1x00.h b/include/asm-mips/mach-db1x00/db1x00.h
> --- a/include/asm-mips/mach-db1x00/db1x00.h 2005-02-20 20:30:51.710463936 -0800
> +++ b/include/asm-mips/mach-db1x00/db1x00.h 2005-02-20 20:31:00.671101712 -0800
> @@ -134,6 +134,14 @@
> #define SET_VCC_VPP(VCC, VPP, SLOT)\
> ((((VCC)<<2) | ((VPP)<<0)) << ((SLOT)*8))
>
> +#if defined(CONFIG_MTD_DB1X00_BOOT) && defined(CONFIG_MTD_DB1X00_USER)
> +#define DB1X00_BOTH_BANKS
> +#elif defined(CONFIG_MTD_DB1X00_BOOT) && !defined(CONFIG_MTD_DB1X00_USER)
> +#define DB1X00_BOOT_ONLY
> +#elif !defined(CONFIG_MTD_DB1X00_BOOT) && defined(CONFIG_MTD_DB1X00_USER)
> +#define DB1X00_USER_ONLY
> +#endif
> +
> /* SD controller macros */
> /*
> * Detect card.
>
>
next prev parent reply other threads:[~2005-02-21 5:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-21 5:01 Fixes to MTD flash driver on AMD Alchemy db1100 board Josh Green
2005-02-21 5:23 ` Pete Popov [this message]
2005-02-21 10:44 ` Ulrich Eckhardt
2005-02-21 23:57 ` Josh Green
2005-02-22 6:06 ` Josh Green
2005-02-22 7:25 ` Pete Popov
2005-02-22 15:32 ` Ulrich Eckhardt
2005-02-26 22:04 ` Pete Popov
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=4219704E.8000207@embeddedalley.com \
--to=ppopov@embeddedalley.com \
--cc=jgreen@users.sourceforge.net \
--cc=linux-mips@linux-mips.org \
/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