Skip to content

ARM: davinci: step towards removing at24_platform_data

Bartosz Golaszewski linux-arm-kernel linux-omap lkml netdev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest18 patches 22 repliesIn review
  2. v318 patches 1 replySuperseded
  3. v215 patches 3 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v114 patches10 repliesSuperseded

Changes in v4 from the cover letter

- only return -EPROBE_DEFER from nvmem_cell_from_lookup() if we have a matching lookup entry but no corresponding nvmem device yet, return -ENOENT if we can't match the lookup
- check for -EPROBE_DEFER in the emac driver
- put the mtd device after reading the MAC address

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18nvmem: add support for cell lookupsdrivers/nvmem/core.c include/linux/nvmem-consumer.h include/linux/nvmem-provider.h+92 -12 replies
2/18Documentation: nvmem: document lookup entriesDocumentation/nvmem/nvmem.txt+28 -02 replies
3/18ARM: davinci: dm365-evm: use nvmem lookup for mac addressarch/arm/mach-davinci/board-dm365-evm.c+12 -00 replies
4/18ARM: davinci: dm644-evm: use nvmem lookup for mac addressarch/arm/mach-davinci/board-dm644x-evm.c+12 -00 replies
5/18ARM: davinci: dm646x-evm: use nvmem lookup for mac addressarch/arm/mach-davinci/board-dm646x-evm.c+12 -00 replies
6/18ARM: davinci: da830-evm: use nvmem lookup for mac addressarch/arm/mach-davinci/board-da830-evm.c+12 -00 replies
7/18ARM: davinci: mityomapl138: add nvmem cells lookup entriesarch/arm/mach-davinci/board-mityomapl138.c+22 -00 replies
8/18net: davinci_emac: potentially get the MAC address from MTDdrivers/net/ethernet/ti/davinci_emac.c+18 -216 replies
9/18ARM: davinci: da850-evm: remove dead MTD codearch/arm/mach-davinci/board-da850-evm.c+0 -282 replies
10/18net: davinci_emac: use nvmem to retrieve the mac addressdrivers/net/ethernet/ti/davinci_emac.c+26 -90 replies
11/18ARM: davinci: mityomapl138: don't read the MAC address from machine codearch/arm/mach-davinci/board-mityomapl138.c+0 -80 replies
12/18ARM: davinci: dm365-evm: use device properties for at24 eepromarch/arm/mach-davinci/board-dm365-evm.c+5 -80 replies
13/18ARM: davinci: da830-evm: use device properties for at24 eepromarch/arm/mach-davinci/board-da830-evm.c+5 -80 replies
14/18ARM: davinci: dm644x-evm: use device properties for at24 eepromarch/arm/mach-davinci/board-dm644x-evm.c+4 -80 replies
15/18ARM: davinci: dm646x-evm: use device properties for at24 eepromarch/arm/mach-davinci/board-dm646x-evm.c+5 -80 replies
16/18ARM: davinci: sffsdr: fix the at24 eeprom device namearch/arm/mach-davinci/board-sffsdr.c+1 -10 replies
17/18ARM: davinci: sffsdr: use device properties for at24 eepromarch/arm/mach-davinci/board-sffsdr.c+5 -60 replies
18/18ARM: davinci: remove dead code related to MAC address readingarch/arm/mach-davinci/common.c include/linux/davinci_emac.h+0 -170 replies

Reviews trailers per patch

2 of 18 patches have a Reviewed-by or Acked-by.

PatchSrinivas Kandagatla
1/18A-b A-b
2/18A-b
3/18
4/18
5/18
6/18
7/18
8/18
9/18
10/18
11/18
12/18
13/18
14/18
15/18
16/18
17/18
18/18

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 00/18] ARM: davinci: step towards removing at24_platform_data

From: Bartosz Golaszewski <[email protected]>

Since I took over maintainership of the at24 driver I've been working towards removing at24_platform_data in favor for device properties.

DaVinci is the only platform that's still using it - all other users have already been converted.

One of the obstacles in case of DaVinci is removing the setup() callback from the pdata struct, the only user of which are some davinci boards.

Most boards use the EEPROM to store the MAC address. This series adds support for cell lookups to the nvmem framework, registers relevant cells for all users, converts the davinci_emac driver to using them and replaces at24_platform_data with device properties.

The only board that's still using this callback is now mityomapl138. Unfortunately it stores more info in EEPROM than just the MAC address and will require some more work. Unfortunately I don't have access to this board so I can't test any actual solutions on a live hardware.

Tested on a dm365-evm board.

v1 -> v2:
- for backward compatiblity: fall back to using of_get_mac_address() if we can't get an nvmem cell in patch 7
- add patch 15 which removes dead code

v2 -> v3:
- documented new nvmem cell lookup API
- renamed the nvmem cell lookup routines
- added a function for removing the lookup tables
- in order to completly remove the mac_addr from davinci's soc_info added a patch that moves reading the MAC address from SPI to the emac driver
- removed more dead code

v3 -> v4:
- only return -EPROBE_DEFER from nvmem_cell_from_lookup() if we have a matching lookup entry but no corresponding nvmem device yet, return -ENOENT if we can't match the lookup
- check for -EPROBE_DEFER in the emac driver
- put the mtd device after reading the MAC address

Bartosz Golaszewski (18):
nvmem: add support for cell lookups
Documentation: nvmem: document lookup entries
ARM: davinci: dm365-evm: use nvmem lookup for mac address
ARM: davinci: dm644-evm: use nvmem lookup for mac address
ARM: davinci: dm646x-evm: use nvmem lookup for mac address
ARM: davinci: da830-evm: use nvmem lookup for mac address
ARM: davinci: mityomapl138: add nvmem cells lookup entries
net: davinci_emac: potentially get the MAC address from MTD
ARM: davinci: da850-evm: remove dead MTD code
net: davinci_emac: use nvmem to retrieve the mac address
ARM: davinci: mityomapl138: don't read the MAC address from machine
code
ARM: davinci: dm365-evm: use device properties for at24 eeprom
ARM: davinci: da830-evm: use device properties for at24 eeprom
ARM: davinci: dm644x-evm: use device properties for at24 eeprom
ARM: davinci: dm646x-evm: use device properties for at24 eeprom
ARM: davinci: sffsdr: fix the at24 eeprom device name
ARM: davinci: sffsdr: use device properties for at24 eeprom
ARM: davinci: remove dead code related to MAC address reading

 Documentation/nvmem/nvmem.txt              | 28 ++++++++
 arch/arm/mach-davinci/board-da830-evm.c    | 25 ++++---
 arch/arm/mach-davinci/board-da850-evm.c    | 28 --------
 arch/arm/mach-davinci/board-dm365-evm.c    | 25 ++++---
 arch/arm/mach-davinci/board-dm644x-evm.c   | 24 ++++---
 arch/arm/mach-davinci/board-dm646x-evm.c   | 25 ++++---
 arch/arm/mach-davinci/board-mityomapl138.c | 30 ++++++---
 arch/arm/mach-davinci/board-sffsdr.c       | 13 ++--
 arch/arm/mach-davinci/common.c             | 15 -----
 drivers/net/ethernet/ti/davinci_emac.c     | 53 ++++++++++++---
 drivers/nvmem/core.c                       | 77 +++++++++++++++++++++-
 include/linux/davinci_emac.h               |  2 -
 include/linux/nvmem-consumer.h             |  6 ++
 include/linux/nvmem-provider.h             | 10 +++
 14 files changed, 258 insertions(+), 103 deletions(-)
Signature · 1 line
2.17.1