[PATCH] eeprom/at25: add erase support

Sascha Hauer s.hauer at pengutronix.de
Tue Nov 22 05:45:13 EST 2011


On Tue, Nov 22, 2011 at 10:58:56AM +0100, Hubert Feurstein wrote:
> 2011/11/22 Sascha Hauer <s.hauer at pengutronix.de>:
> > On Mon, Nov 21, 2011 at 02:31:31PM +0100, Hubert Feurstein wrote:
> >> Signed-off-by: Hubert Feurstein <h.feurstein at gmail.com>
> >> ---
> >>  drivers/eeprom/at25.c |   15 +++++++++++++++
> >>  1 files changed, 15 insertions(+), 0 deletions(-)
> >
> > Do we need this? We normally only have erase functions for devices that
> > need it, namely flashes.
> >
> In my case I use the eeprom (or fram) to store the environment. So
> with this I can erase the env-partition simply by calling 'erase
> /dev/env0'.
> So it's more like a convenience function. Or is there a other
> possibility to easily erase a partition completely? The memset-command
> is not really suitable because I have to pass the size as an argument.

How about cp /dev/zero /dev/env0?

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list