Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1447553
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net-next v2 2/3] net: dsa: mv88e6xxx: rework EEPROM access |
| Date | 2016-07-21 02:50 +0200 |
| Message-ID | <rXalz-c2-3@gated-at.bofh.it> (permalink) |
| References | <rX80p-7jq-3@gated-at.bofh.it> <rX8a6-7mz-35@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jul 20, 2016 at 06:18:35PM -0400, Vivien Didelot wrote:
> The 6352 family of switches and compatibles provide a 8-bit address and
> 16-bit data access to an optional EEPROM.
>
> Newer chip such as the 6390 family slightly changed the access to 16-bit
> address and 8-bit data.
>
> This commit cleans up the EEPROM access code for 16-bit access and makes
> it easy to eventually introduce future support for 8-bit access.
>
> Here's a list of notable changes brought by this patch:
>
> - provide Global2 unlocked helpers for EEPROM commands
> - remove eeprom_mutex, only reg_lock is necessary for driver functions
> - eeprom_len is 0 for chip without EEPROM, so return it directly
> - the Running bit must be 0 before r/w, so wait for Busy *and* Running
> - remove now unused mv88e6xxx_wait and mv88e6xxx_reg_write
> - other than that, the logic (in _{get,set}_eeprom16) didn't change
>
> Chips with an 8-bit EEPROM access will require to implement the
> 8-suffixed variant of G2 helpers and the related flag:
>
> #define MV88E6XXX_FLAGS_EEPROM8 \
> (MV88E6XXX_FLAG_G2_EEPROM_CMD | \
> MV88E6XXX_FLAG_G2_EEPROM_ADDR)
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net-next v2 0/3] net: dsa: mv88e6xxx: rework EEPROM code Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-07-21 00:20 +0200
[PATCH net-next v2 3/3] net: dsa: mv88e6xxx: kill last locked reg_read Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-07-21 00:20 +0200
Re: [PATCH net-next v2 3/3] net: dsa: mv88e6xxx: kill last locked reg_read Andrew Lunn <andrew@lunn.ch> - 2016-07-21 02:50 +0200
[PATCH net-next v2 2/3] net: dsa: mv88e6xxx: rework EEPROM access Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-07-21 00:30 +0200
Re: [PATCH net-next v2 2/3] net: dsa: mv88e6xxx: rework EEPROM access Andrew Lunn <andrew@lunn.ch> - 2016-07-21 02:50 +0200
Re: [PATCH net-next v2 0/3] net: dsa: mv88e6xxx: rework EEPROM code David Miller <davem@davemloft.net> - 2016-07-21 06:20 +0200
csiph-web