lkml.org 
[lkml]   [2012]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH-v3] Support M95040 SPI EEPROM
    On Tue, Apr 03, 2012 at 09:53:20AM -0700, Chris Wright wrote:
    > * Ivo Sieben (meltedpianoman@gmail.com) wrote:
    > > + instr = AT25_READ;
    > > + if (at25->chip.flags & EE_INSTR_BIT3_IS_ADDR)
    > > + if (offset >= (1U << (at25->addrlen * 8)))
    > > + instr |= AT25_INSTR_BIT3;
    > > + *cp++ = instr;
    > <snip>
    > > + /*
    > > + * Certain EEPROMS have a size that is larger than the number of address
    > > + * bytes would allow (e.g. like M95040 from ST that has 512 Byte size
    > > + * but uses only one address byte (A0 to A7) for addressing.) For
    > > + * the extra address bit (A8, A16 or A24) bit 3 of the instruction byte
    > > + * is used. This instruction bit is normally defined as don't care for
    > > + * other AT25 like chips.
    > > + */
    > > +#define EE_INSTR_BIT3_IS_ADDR 0x0010
    >
    > Is there some guarantee that this chip flag will always have this
    > meaning?

    ? This is a driver flag.

    --
    Pengutronix e.K. | Wolfram Sang |
    Industrial Linux Solutions | http://www.pengutronix.de/ |
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2012-04-03 19:09    [W:2.122 / U:0.364 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site