Re: [STLinux Kernel] [PATCH v2 RESEND 10/11] mtd: st_spi_fsm: Provide mask to obtain correct boot device pins

From: Peter Griffin
Date: Mon Dec 08 2014 - 09:43:39 EST


Hi Lee,

On Thu, 04 Dec 2014, Lee Jones wrote:

> From: Christophe Kerello <christophe.kerello@xxxxxx>
>
> This patch adds a mask to be able to get the right boot device selection.

Have you seen this series I posted https://lkml.org/lkml/2014/11/19/71?

It is trying to consolodate the way the various STI drivers are handling syscfg
registers in the upstream kernel. Now this series came about mainly due to the mixing of address
spaces in the reg property, but the overall aim was to get all STI drivers handling
syscfg registers in a uniform way.

Sadly it seems this driver uses another approach for syscfg handling with extra
DT properties encoding the offset and mask.

IMHO I don't think it makes sense to add more DT properties for doing this. We should consider
migrating this over to using the interface provided in the series above, and for the mask I
would suggest implementing it in a similar way to the code in drivers/phy/phy-stih41x-usb.c
which solves much the same problem by statically encoding the information in the driver
and making a decision based on the compatible flag.

regards,

Peter.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/