HACK: mtd: spi-nor: Look for PHY pattern partition
The Cadence controller needs to know the PHY tuning pattern location to
be able to tune PHY and enable high speed operation. There is no simple
way to get that information to the controller. We have used MTD
partitions as a way to record that information.
The problem is, MTD partitions are parsed and populated after the flash
is probed. Also, the controller doesn't have direct access to the list
of mtd partitions. So SPI NOR has to find that information out during
its probe.
This patch implements a simple MTD partition parser based on
drivers/mtd/parsers/ofpart.c::parse_fixed_parititons(). This is
obviously not the place to parse the partitions and we can probably find
a better way to do this but this is the simplest way to solve this problem.
There is one obvious limitation with this approach: the partition has to
be specified in the device tree and it cannot come from the command
line.
This hack will let us use PHY tuning until we can figure out a cleaner
way of getting the tuning pattern location to the controller.
Signed-off-by:
Pratyush Yadav <p.yadav@ti.com>
Loading
Please sign in to comment