From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] mxc_ocotp: Do not disable the OCOTP clock after every access
Date: Mon, 01 Dec 2014 10:36:57 +0100 [thread overview]
Message-ID: <547C36B9.5080608@denx.de> (raw)
In-Reply-To: <1416928268-17610-2-git-send-email-fabio.estevam@freescale.com>
On 25/11/2014 16:11, Fabio Estevam wrote:
> Leave the OCOTP turned on, so that we subsequent access do not fail.
>
> After enabling the thermal driver on a mx6sxsabresd board:
>
> U-Boot 2015.01-rc1-18267-g99d4189-dirty (Nov 24 2014 - 12:59:01)
>
> CPU: Freescale i.MX6SX rev1.0 at 792 MHz
> CPU: Temperature 48 C
> Reset cause: POR
> Board: MX6SX SABRE SDB
> I2C: ready
> DRAM: 1 GiB
> PMIC: PFUZE100 ID=0x10
> MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
> 00:01.0 - 16c3:abcd - Bridge device
> 01:00.0 - 8086:08b1 - Network controller
> In: serial
> Out: serial
> Err: serial
> Net:
> (hang)
>
> As the thermal driver accesses the ocotp registers, its clock will be disabled
> afterwards.
>
> Then when the MAC address is read (also from ocotp registers) it will cause a
> hang.
>
> Do not disable the ocotp clock to prevent this problem.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> drivers/misc/mxc_ocotp.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/misc/mxc_ocotp.c b/drivers/misc/mxc_ocotp.c
> index 3de1245..67f9429 100644
> --- a/drivers/misc/mxc_ocotp.c
> +++ b/drivers/misc/mxc_ocotp.c
> @@ -81,8 +81,6 @@ static int finish_access(struct ocotp_regs *regs, const char *caller)
> err = !!(readl(®s->ctrl) & BM_CTRL_ERROR);
> clear_error(regs);
>
> - enable_ocotp_clk(0);
> -
> if (err) {
> printf("mxc_ocotp %s(): Access protect error\n", caller);
> return -EIO;
>
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
next prev parent reply other threads:[~2014-12-01 9:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 15:11 [U-Boot] [PATCH 2/2] mx6sxsabresd: Add thermal support Fabio Estevam
2014-11-25 15:11 ` [U-Boot] [PATCH 1/2] mxc_ocotp: Do not disable the OCOTP clock after every access Fabio Estevam
2014-11-25 19:48 ` Benoît Thébaudeau
2014-11-25 19:56 ` Fabio Estevam
2014-11-25 20:13 ` Benoît Thébaudeau
2014-12-01 9:36 ` Stefano Babic [this message]
2014-12-01 9:36 ` [U-Boot] [PATCH 2/2] mx6sxsabresd: Add thermal support Stefano Babic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=547C36B9.5080608@denx.de \
--to=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.