diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2016-11-09 08:14:13 -0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-01-11 08:07:00 +0100 |
commit | e8371faca1027a4ae8e84ae5679ccd08ad827316 (patch) | |
tree | 071b3642d19ed5ca84743e3976266fac0e06729f /arch/arm/mach-imx/ocotp.c | |
parent | 278a35ffcb4bc2486a869380da462e8a4d291020 (diff) | |
download | barebox-e8371faca1027a4ae8e84ae5679ccd08ad827316.tar.gz barebox-e8371faca1027a4ae8e84ae5679ccd08ad827316.tar.xz |
i.MX: ocotp: Add Vybrid support
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/ocotp.c')
-rw-r--r-- | arch/arm/mach-imx/ocotp.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/ocotp.c b/arch/arm/mach-imx/ocotp.c index f39e1faeaa..68ff0ce28b 100644 --- a/arch/arm/mach-imx/ocotp.c +++ b/arch/arm/mach-imx/ocotp.c @@ -516,6 +516,14 @@ static u32 imx6q_addr_to_offset(u32 addr) return imx6sl_addr_to_offset(addr) + addendum; } +static u32 vf610_addr_to_offset(u32 addr) +{ + if (addr == 0x04) + return 0x450; + else + return imx6q_addr_to_offset(addr); +} + static struct imx_ocotp_data imx6q_ocotp_data = { .num_regs = 512, .addr_to_offset = imx6q_addr_to_offset, @@ -526,6 +534,11 @@ static struct imx_ocotp_data imx6sl_ocotp_data = { .addr_to_offset = imx6sl_addr_to_offset, }; +static struct imx_ocotp_data vf610_ocotp_data = { + .num_regs = 512, + .addr_to_offset = vf610_addr_to_offset, +}; + static __maybe_unused struct of_device_id imx_ocotp_dt_ids[] = { { .compatible = "fsl,imx6q-ocotp", @@ -540,6 +553,9 @@ static __maybe_unused struct of_device_id imx_ocotp_dt_ids[] = { .compatible = "fsl,imx6ul-ocotp", .data = &imx6q_ocotp_data, }, { + .compatible = "fsl,vf610-ocotp", + .data = &vf610_ocotp_data, + }, { /* sentinel */ } }; |