How-to enable HAB in i.MX6x

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How-to enable HAB in i.MX6x

How-to enable HAB in i.MX6x


Share my test procedure in the attachment.

Labels (1)
Attachments
Comments

I do not see a /sys/fsl_otp ???

I have defined "CONFIG_FSL_OTP" and re-compiled.  What step am I missing?

Edit:

(Sorry I mistakenly put /dev/fsl_otp)

Why do you look for this (/dev/fsl_otp)??

From my document, we just need /sys/fsl_otp.

Sorry...thank you.

I am not sure why the device doesn't show up in /sys/fsl_otp.  I selected "y" in menuconfig (.config), and recompiled.

I had the same issue. In my case I moved fsl_otp to be a module so it's error message could be read conveniently. The error I saw in dmesg after modprobing the fsl_otp module was this:

Error: Driver 'imx-ocotp' is already registered, aborting...

If you grep for imx-ocotp  on the kernel source you should find two instances:

./drivers/char/fsl_otp.c:241:           .name   = "imx-ocotp",

./arch/arm/plat-mxc/devices/platform-imx-ocotp.c:99:    return imx_add_platform_device("imx-ocotp", 0,

The second instance is in a function named imx_add_otp(), which has a wrapping #define, imx6q_add_otp() in case of the i.MX6.

I put a call for this function where the call for other components are made (imx6q_add_*) inside arch/arm/mach-mx6/board-mx6q_arm2.c (you may use a different board-mx6q_ file, depending on the hardware you use).

This fixed the issue, now fsl_otp runs and opens the /sys/fsl_otp dir.

Thank you Mickey!  This helped tremendously.

%3CLINGO-SUB%20id%3D%22lingo-sub-1101657%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHow-to%20enable%20HAB%20in%20i.MX6x%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1101657%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CBR%20%2F%3EShare%20my%20test%20procedure%20in%20the%20attachment.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1101657%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MX6_All%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1101662%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20How-to%20enable%20HAB%20in%20i.MX6x%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1101662%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThank%20you%20Mickey!%26nbsp%3B%20This%20helped%20tremendously.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1101661%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20How-to%20enable%20HAB%20in%20i.MX6x%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1101661%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20had%20the%20same%20issue.%20In%20my%20case%20I%20moved%20fsl_otp%20to%20be%20a%20module%20so%20it's%20error%20message%20could%20be%20read%20conveniently.%20The%20error%20I%20saw%20in%20dmesg%20after%20modprobing%20the%20fsl_otp%20module%20was%20this%3A%3C%2FP%3E%3CP%3EError%3A%20Driver%20'imx-ocotp'%20is%20already%20registered%2C%20aborting...%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EIf%20you%20grep%20for%20imx-ocotp%26nbsp%3B%20on%20the%20kernel%20source%20you%20should%20find%20two%20instances%3A%3C%2FP%3E%3CP%3E.%2Fdrivers%2Fchar%2Ffsl_otp.c%3A241%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.name%26nbsp%3B%26nbsp%3B%20%3D%20%22imx-ocotp%22%2C%3C%2FP%3E%3CP%3E.%2Farch%2Farm%2Fplat-mxc%2Fdevices%2Fplatform-imx-ocotp.c%3A99%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%20return%20imx_add_platform_device(%22imx-ocotp%22%2C%200%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThe%20second%20instance%20is%20in%20a%20function%20named%20imx_add_otp()%2C%20which%20has%20a%20wrapping%20%23define%2C%20imx6q_add_otp()%20in%20case%20of%20the%20i.MX6.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EI%20put%20a%20call%20for%20this%20function%20where%20the%20call%20for%20other%20components%20are%20made%20(imx6q_add_*)%20inside%20arch%2Farm%2Fmach-mx6%2Fboard-mx6q_arm2.c%20(you%20may%20use%20a%20different%20board-mx6q_%20file%2C%20depending%20on%20the%20hardware%20you%20use).%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThis%20fixed%20the%20issue%2C%20now%20fsl_otp%20runs%20and%20opens%20the%20%2Fsys%2Ffsl_otp%20dir.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22mce_paste_marker%22%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1101660%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20How-to%20enable%20HAB%20in%20i.MX6x%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1101660%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ESorry...thank%20you.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EI%20am%20not%20sure%20why%20the%20device%20doesn't%20show%20up%20in%20%2Fsys%2Ffsl_otp.%26nbsp%3B%20I%20selected%20%22y%22%20in%20menuconfig%20(.config)%2C%20and%20recompiled.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1101659%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20How-to%20enable%20HAB%20in%20i.MX6x%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1101659%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EWhy%20do%20you%20look%20for%20this%20(%2Fdev%2Ffsl_otp)%3F%3F%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EFrom%20my%20document%2C%20we%20just%20need%20%2Fsys%2Ffsl_otp.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1101658%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20How-to%20enable%20HAB%20in%20i.MX6x%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1101658%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20do%20not%20see%20a%20%2Fsys%2Ffsl_otp%20%3F%3F%3F%3C%2FP%3E%3CP%3EI%20have%20defined%20%22%3CSPAN%20style%3D%22font-family%3A%20'Helvetica%20Neue'%2C%20Helvetica%2C%20Arial%2C%20'Lucida%20Grande'%2C%20sans-serif%3B%20background-color%3A%20%23ffffff%3B%22%3ECONFIG_FSL_OTP%3C%2FSPAN%3E%22%20and%20re-compiled.%26nbsp%3B%20What%20step%20am%20I%20missing%3F%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EEdit%3A%3C%2FP%3E%3CP%3E(Sorry%20I%20mistakenly%20put%20%2Fdev%2Ffsl_otp)%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎05-23-2013 11:32 PM
Updated by: