[PATCH] m25p80: add support for a callback to platform code on successful device probe

Mike Frysinger vapier.adi at gmail.com
Wed Aug 11 13:27:36 EDT 2010

On Wed, Aug 11, 2010 at 07:56, Sudhakar Rajashekhara wrote:
> On Wed, Aug 11, 2010 at 00:32:00, Mike Frysinger wrote:
>> On Tue, Aug 10, 2010 at 09:07, David Brownell wrote:
>> >> On Tue, Aug 10, 2010 at 12:47:05, Mike Frysinger wrote:
>> >> it is necessary
>> >> > that you do these things from kernel space instead of
>> >> standard
>> >> > userspace.
>> >
>> > Hard to get userspace to do this stuff if
>> > you're doing a network boot, and thus need
>> > to have the MAC address working early.. it's
>> > easy if the kernel can get the MAC address,
>> > else not possible to boot.  Right?
>> no, that isnt true at all.  you can easily have a small initramfs to
>> handle all of your random setup.  if that's too much overhead, you can
>> add a late initcall to your boards file that is run after the MTD
>> devices are probed and let that read the required information.  all of
>> this is more than documented:
>> http://www.denx.de/wiki/view/DULG/EthernetDoesNotWorkInLinux
> I looked around in the kernel and found mtd_notifier callbacks which get
> called upon addition of MTD device. Inside this callback, I am checking
> for the device in which I am interested and doing a mtd->read to get the
> MAC address. So this patch can be dropped.

thanks for the follow up explanation

More information about the linux-mtd mailing list