summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/imx.c
Commit message (Collapse)AuthorAgeFilesLines
* ARM: i.MX8M: convert the machine init to the soc driverMarco Felsch2024-01-291-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Convert the i.MX8M machine init code to the previously introduced soc framework. The soc driver was mostly copied from Linux with slightly adaptions for barebox. To the soc driver is called during the postcore_initcall to keep the level aligned with the previous imx_init(). The ocotp clock must keept running else the ARM-SMCCC stuck for calls where the TF-A tries to access the ocotp. A sample output of the new introduced soc0 device: | | barebox@FSL i.MX8MM EVKB:/ devinfo soc0 | Bus: soc | Parameters: | family: Freescale i.MX (type: string) | machine: FSL i.MX8MM EVKB (type: string) | revision: 1.0 (type: string) | serial_number: 15182A09DAB5B3C9 (type: string) | soc_id: i.MX8MM (type: string) Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20240125133856.3792552-2-m.felsch@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: initial i.MX9 supportSascha Hauer2023-11-201-0/+4
| | | | | Link: https://lore.barebox.org/20231110125800.1901232-2-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: Move mach header files to include/mach/imxSascha Hauer2023-03-061-3/+3
| | | | | | | | | | | Currently arch specific headers can be included with #include <mach/xxx.h>. With upcoming multi-arch support this is no longer possible as there won't be a single mach anymore. Move all i.MX specific header files to include/mach/imx/ to prepare for multi-arch support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: add i.MX8MN (Nano) SoC support boilerplateAhmad Fatoum2021-10-051-0/+4
| | | | | | | | | The Nano is basically a downsized mini. Add the necessary bits, so driver and board support can be added. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20211001100949.6891-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: imx: Replace license and copyright boilerplate by SPDX identifiersUwe Kleine-König2021-05-251-12/+1
| | | | | | | | | | Converts the files that licensecheck can determine to be licensed under GPL-2.0-only or GPL-2.0-or-later and also convert their copyright statements to SPDX. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.barebox.org/20210522143431.824057-1-u.kleine-koenig@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: demote reset reason print to debug levelLucas Stach2021-05-031-2/+2
| | | | | | | | | | | | | | The i.MX reset reason is not really helpful on its own, as it needs to be augmented with other information like the watchdog state to get the real system reset reason. As it stands this log is more confusing than answering any questions a user might have. Demote the log to debug level to stop this confusion. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20210422110849.1556472-1-l.stach@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: imx: add initial imx8mp supportOleksij Rempel2020-07-141-0/+4
| | | | | | | | | | | | This adds base support for the i.MX8MP SoC. Not much to do here as this SoC is quite similar to the i.MX8M. This adds: - Kconfig symbols - bootsource detection - register base address defines - iomux defines Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
* Merge branch 'for-next/stm32'Sascha Hauer2020-03-181-1/+1
|\
| * reset_source: migrate from reset_source_name to reset_source_to_stringAhmad Fatoum2020-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | Whether reset_source_name() returns the just set reset_source is dependent on probe order and the priorities of prior reset sources in relation to the current one. Make this more robust by using the new reset_source_to_string. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: i.MX8M: Add i.MX8MM supportSascha Hauer2020-02-191-0/+4
|/ | | | | | This adds support for the i.MX8MM. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/reset-source'Sascha Hauer2019-09-121-3/+1
|\
| * reset_source: drop reset_source_set_instance()Uwe Kleine-König2019-08-281-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | The semantic of reset_source_set_instance() required a separate call to reset_source_set() (or reset_source_set_priority()) and checked right usage only using the type. Make the set of functions a bit easier to use by dropping reset_source_set_instance() and instead introduce a function that can set all relevant parameters (source, priority and instance) in one go. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: i.MX: Do not hang() on unknown SoCsSascha Hauer2019-08-191-1/+1
|/ | | | | | | | | | The generic DT image built with CONFIG_ARCH_IMX has nothing really i.MX specific except that it has support for i.MX features. The DT image could be started with a non i.MX device tree which works as expected. imx_init() panics though when started with a non i.MX device tree. Remove the hang() so that we can just continue. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: When SRSR shows wdog then lookup reset source in wdogSascha Hauer2018-11-161-5/+1
| | | | | | | | | | | | | On i.MX6 when the watchdog has resetted the system then the SRSR register correctly shows that the watchdog has resetted the system. This is not the desired result though, a "reset" in barebox or "reboot" in Linux should result in "RST" as reset source. So instead of making the SRSR register value overwrite the reset source read from the watchdog registers, interpret the SRSR value corresponding to watchdog reset as "lookup details in the watchdog registers". Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
* ARM: i.MX8MQ: Add code to detect reset reasonAndrey Smirnov2018-08-131-0/+11
| | | | | | | | | Reset reason bits and their meaning seem to be identical between i.MX7 and i.MX8MQ. Share the definitions for the former and used it for the latter. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Add i.MX8 supportSascha Hauer2018-06-081-0/+4
| | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> [andrew.smirnov@gmail.com: fix B0 chips to report IMX_CHIP_REV_2_0] Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: Make imx6_reset_reasons globalAndrey Smirnov2018-05-081-0/+9
| | | | | | | | | Both i.MX51 and i.MX53 have exactly the same reset source mapping, so rename imx6_reset_reasons to imx_reset_reasons and make it a globally visible constant so it could be shared. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: VFxxx: Detect cpu variant on startAndrey Smirnov2018-05-081-1/+1
| | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: Print "revision unknown" if that is the caseAndrey Smirnov2018-05-081-1/+4
| | | | | | | | | Printing "revision 16.16" if i.MX SoC's revision is unknown is a bit confusing so modify the code to actually say "revision unknown" in such a case. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: Log detected reset reasonAndrey Smirnov2018-05-081-0/+3
| | | | | | | | Log detected reset reason as well as raw value of SRSR for better clarity. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: Add infrastructure to record SoC reset reasonAndrey Smirnov2018-04-261-0/+33
| | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: Add i.MX6 ULL supportStefan Riedmueller2017-05-171-0/+2
| | | | | Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX: Add i.MX6SL supportAlexander Kurz2017-02-021-0/+2
| | | | | | | | | | | | | Most i.MX6SL infrastructure is already covered in barebox by general i.MX6 support. Missing infrastructure provided in separate commits are * SoC type detection * Clock infrastructure Add the missing fsl,imx6sl-mmdc, so it will not be catched by fsl,imx6q-mmdc and the remaining bits and pieces to provide barebox i.MX6SL SoC support. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: Add i.MX7 base architecture supportJuergen Borleis2017-01-201-0/+6
| | | | | Signed-off-by Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/vybrid'Sascha Hauer2016-11-141-0/+4
|\
| * i.MX: Add primitive functions for VF610 familyAndrey Smirnov2016-11-111-0/+4
| | | | | | | | | | | | | | Add very basic functions to support VF610 family. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: i.MX: beginning i.MX6ul supportSascha Hauer2016-11-081-0/+2
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add i.MX50 supportAlexander Kurz2016-09-121-0/+6
| | | | | Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: imx: add QP as supported i.MX6 variantLucas Stach2016-08-031-0/+2
| | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: Add i.MX6sx supportSascha Hauer2014-11-271-0/+2
| | | | | | | | Add some cpu type defines and clock support. The clock support is very different from other i.MX variants, so it's a separate file, like done in the kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: print silicon revision with pr_infoSascha Hauer2014-11-201-1/+1
| | | | | | So that this message can be silenced by reducing the loglevel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: Add missing includesSascha Hauer2013-11-081-0/+1
| | | | | | | | A lot of files rely on include/driver.h including include/of.h (and this including include/errno.h. include the files explicitly so we can eventually get rid of including of.h from driver.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: adopt cpu_is_* for multiple SoCsSascha Hauer2013-06-251-1/+37
| | | | | | | | This makes cpu_is_* functions when necessary for upcoming multisoc support. When only one SoC type is compiled in cpu_is_* still expand to static values. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: centralize i.MX startupSascha Hauer2013-06-241-0/+55
| | | | | | | Each i.MX SoC has its own SoC initcall. To ease multi SoC support move it to a single initcall. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX: Print silicon revision in common placeSascha Hauer2012-10-151-1/+5
| | | | | | | | | Rather than doing this in the SoC specific code just print it in imx_set_silicon_revision. This saves some lines of code and also results in i.MX27 now also having the silicon revision printed during startup. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX: streamline imx_silicon_revisionSascha Hauer2012-10-051-0/+27
All i.MX SoCs now use the same imx_silicon_revision() function to get the revision. Add a separate header file for it and a common function used on all SoCs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>