[PATCH 04/16] i.MX: ocotp: Initialize 'sense_enable' to true on Vybrid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reading speed grading information (OCOTP word 0x4) only seem to work
when that data read is straigh out of a fusebox. Allow differenet SoC to
deafalut 'sense_enable' to different values and set it to true on
Vybrid.

Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
---
 arch/arm/mach-imx/ocotp.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/mach-imx/ocotp.c b/arch/arm/mach-imx/ocotp.c
index 667555a..e9c07c2 100644
--- a/arch/arm/mach-imx/ocotp.c
+++ b/arch/arm/mach-imx/ocotp.c
@@ -79,6 +79,7 @@ struct imx_ocotp_data {
 	u32 (*addr_to_offset)(u32 addr);
 	u8  mac_offsets[MAX_MAC_OFFSETS];
 	u8  mac_offsets_num;
+	bool sense_enable;
 };
 
 struct ocotp_priv {
@@ -494,6 +495,8 @@ static int imx_ocotp_probe(struct device_d *dev)
 	if (IS_ERR(priv->clk))
 		return PTR_ERR(priv->clk);
 
+	priv->sense_enable = priv->data->sense_enable;
+
 	strcpy(priv->dev.name, "ocotp");
 	priv->dev.parent = dev;
 	register_device(&priv->dev);
@@ -565,6 +568,7 @@ static struct imx_ocotp_data imx6q_ocotp_data = {
 	.addr_to_offset = imx6q_addr_to_offset,
 	.mac_offsets_num = 1,
 	.mac_offsets = { MAC_OFFSET_0 },
+	.sense_enable = false,
 };
 
 static struct imx_ocotp_data imx6sl_ocotp_data = {
@@ -572,6 +576,7 @@ static struct imx_ocotp_data imx6sl_ocotp_data = {
 	.addr_to_offset = imx6sl_addr_to_offset,
 	.mac_offsets_num = 1,
 	.mac_offsets = { MAC_OFFSET_0 },
+	.sense_enable = false,
 };
 
 static struct imx_ocotp_data vf610_ocotp_data = {
@@ -579,6 +584,7 @@ static struct imx_ocotp_data vf610_ocotp_data = {
 	.addr_to_offset = vf610_addr_to_offset,
 	.mac_offsets_num = 2,
 	.mac_offsets = { MAC_OFFSET_0, MAC_OFFSET_1 },
+	.sense_enable = true,
 };
 
 static __maybe_unused struct of_device_id imx_ocotp_dt_ids[] = {
-- 
2.5.5


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux