Skip to content

Introduce layout aware eeprom commands

Marek Vasut u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 12 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 12 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [U-Boot] [PATCH 00/12] Introduce layout aware eeprom commands
Quoted 16 lines · Nikita Kiryanov
Quoted 15 lines · Marek Vasut
Quoted 14 lines · Nikita Kiryanov

Hi Marek,

Quoted 10 lines · Marek Vasut
Quoted 6 lines · Nikita Kiryanov

This series introduces eeprom layout aware capabilities to the existing eeprom command, and then enables this feature on Compulab boards. It is an import of the Compulab eeprom-utility (https://github.com/compulab/eeprom-util), and it introduces 2 new options to the eeprom command:

eeprom print [-l <layout_version>] bus_num device_addr

The bus number starts to become a problem, esp. when used with DM and where the bus number can change between boots.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Are you referring to the fact that the command allows the user to not specify the bus number (relying on a default value instead)?

No, just using the bus number and device address doesn't seem right anymore.

How so? Both are properties of the hardware, and they should be addressable as such. I feel like I'm missing something, can you elaborate on what you think the problem is?

The bus number is not really an exact identifier in the system anymore because the number changes depending on the number and order of registered buses in DM case. This works for now and is backwards compatible, but I am tempted to push for user API which would be more exact. You might want Simon's opinion on this too.

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

If so, I agree with you
that it is problematic. If I had my way I would've made it a mendatory parameter along with the device address, but that will hurt backwards compatibility.

Quoted 7 lines
Quoted 1 line

But this is new feature, there is no backward compatibility.

I meant making this change for the eeprom read and write commands as well, not just the new commands. I think that the new commands should follow the conventions of the original commands for consistency, I just wish the current conventions were less ambiguous than they are now (it's not possible to figure out what ommision of these parameters does without looking at the source code).

The EEPROM code is in horrible state, indeed. If you want to clean it up some more, I'd be real happy.

Quoted 14 lines
Quoted 14 lines
Quoted 8 lines

I'll be more than happy to redo the last 3 patches if we agree that we are willing to pay that price.

Quoted 4 lines

Best regards,
Marek Vasut

Signature · 2 lines
Best regards,
Marek Vasut
Signature · 2 lines
Best regards,
Marek Vasut