[Top] [All Lists]

Re: Fixes to MTD flash driver on AMD Alchemy db1100 board

To: Ulrich Eckhardt <>
Subject: Re: Fixes to MTD flash driver on AMD Alchemy db1100 board
From: Pete Popov <>
Date: Sat, 26 Feb 2005 14:04:03 -0800
In-reply-to: <>
Organization: Embedded Alley Solutions, Inc
Original-recipient: rfc822;
References: <1108962105.6611.24.camel@SillyPuddy.localdomain> <1109052412.20045.6.camel@SillyPuddy.localdomain> <> <>
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020
Ulrich Eckhardt wrote:
Pete Popov wrote:

Here is a 2.6 patch that gets rid of all the Au1x mapping files and
replaces them with a single file.

Big step forward, this looks much cleaner and easier to maintain!

Just a few nits:

1. mymtd = do_map_probe("cfi_probe", &alchemy_map);

Doesn't this mean that the Alchemy flash driver depends on the CFI interface? I also see that CONFIG_MTD_CFI is not set in the configfiles for some boards.

2. If above do_map_probe() returns NULL, the ioremap()ed memory is leaked. Doesn't matter that much probably, but is trivial to fix.

 if (!mymtd)
  iounmap( alchemy_map.virt);
  return -ENXIO;

3. No need to cast the parameter to iounmap(), it should happily digest whatever ioremap() returns. If that gives warnings, something different is going wrong in between. ;)

Thanks, I took care of all this. I removed the multiple drivers in favor of the single, simplied driver. I pushed the updates in linux-mips head, and the mtd community tree. To use these changes with linux-mips 2.4 branch, you have to patch-in the entire mtd tree. However, even then I had some compile problems that were not related to the changes I made, so I don't know if you can still use the latest mtd tree with a 2.4 kernel.


<Prev in Thread] Current Thread [Next in Thread>