summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/imx53.c
Commit message (Collapse)AuthorAgeFilesLines
* ARM: i.MX: Move mach header files to include/mach/imxSascha Hauer2023-03-061-7/+7
| | | | | | | | | | | 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: romapi: Hide using NULL pointers from gcc #2Sascha Hauer2022-11-231-0/+2
| | | | | | | | | | | The i.MX ROM API lies in the NULL page. Accessing that results in compiler warnings like: include/asm-generic/io.h:27:51: warning: array subscript 0 is outside array bounds of 'volatile unsigned char[0]' [-Warray-bounds] Use OPTIMIZER_HIDE_VAR() to hide using NULL pointers from the compiler. 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: Reset OTG controller during startupSascha Hauer2018-09-041-0/+4
| | | | | | | | | | | | | | | | When booting from USB it's sometimes observed that the USB stack on the remote host gets confused. This happens when we adjust the PLLs the USB controller is hanging on. The ROM just leaves the USB controller enabled when it passes control to the bootloader, so in case the usb clks are enabled make sure we reset the otg before doing any critical clock operations. This is currently done for i.MX50, i.MX51, i.MX53 and i.MX6, but a similar thing can happen on other i.MXes aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX53: Make clock tree setup better readableSascha Hauer2018-06-281-10/+17
| | | | | | | Change write register accesses to read-modify-write accesses. This makes it clearer which bits are actually changed by the code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX53: Record reset reason as a part of startupAndrey Smirnov2018-05-081-0/+4
| | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX53: do not pass base address to imx*_boot_save_locSascha Hauer2016-09-221-1/+1
| | | | | | | The functions can determine the necessary base addresses themselves since they are SoC specific anyway. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sizes.h: move include/sizes.h to include/linux/sizes.hMasahiro Yamada2015-01-081-1/+1
| | | | | | | | | | | | | | This file originates in Linux. Linux has it under include/linux/ directory since commit dccd2304cc90. Let's move it to the same place as well in barebox. This commit was generated by the following commands: find -name '*.[chS]' | xargs sed -i -e 's:<sizes.h>:<linux/sizes.h>:' git mv include/sizes.h include/linux/ Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: move esdctl device registration to soc_initSascha Hauer2013-08-201-1/+1
| | | | | | | | | The esdctl devices are currently not in the devicetrees. this means they are not registered when booting from the devicetree. Move the device registration from soc_devices_init to soc_init which is called even with devicetree support so that we get esdctl devices. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: centralize i.MX startupSascha Hauer2013-06-241-2/+6
| | | | | | | 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.MX53: split lowlevel function into early/nonearly versionSascha Hauer2013-04-051-4/+8
| | | | | | | | | clock_notifier_call_chain() can't be called before init time. Protecting it with IS_ENABLED(__PBL__) is not enough. This patch splits out a new imx53_init_lowlevel_early which can be called before init time and does not have the call to clock_notifier_call_chain() in it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX53: Fix pll216 setupSascha Hauer2013-04-041-1/+1
| | | | | | | | The value for i.MX53 216MHz is actually 432MHz. Use the same value as for i.MX51 which really corresponds to 216MHz. These are the same PLL216 values as U-Boot uses. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: Replace numbers with predefined constants in several placesAlexander Shiyan2013-02-261-1/+1
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX5: move pll setup defines to header fileSascha Hauer2012-12-061-12/+6
| | | | | | | The pll setup function is exported, so it makes sense to export the convenience wrappers for specific frequencies aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX: register esdctl controller deviceSascha Hauer2012-12-061-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX53: set bootsource locationSascha Hauer2012-10-171-0/+2
| | | | | | | To be able to set the environment location based on the bootsource. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX53: enable imx53_init_lowlevel for pblSascha Hauer2012-10-171-1/+3
| | | | | | | | | The KARO Tx53 board in the revision 8030 has an instable SDRAM setup. It works as long as the MMU is disabled, but the board crashes at arbitrary places once the MMU gets enabled. So we need the PLL setup early. Enable it for pbl. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX: get rid of imx-regs.hSascha Hauer2012-10-171-1/+1
| | | | | | | | | - remove now unused __REG definitions - include individual SoC register files instead of imx-regs.h - move IMX_GPIO_NR to generic.h - finally remove imx-regs.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/imx-work' into for-next/imxSascha Hauer2012-10-171-20/+7
|\ | | | | | | | | | | | | Conflicts: arch/arm/mach-imx/imx1.c Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM i.MX: Print silicon revision in common placeSascha Hauer2012-10-151-14/+1
| | | | | | | | | | | | | | | | | | 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: Turn iomux-v3 into driverSascha Hauer2012-10-051-0/+1
| | | | | | | | | | | | | | To get proper resources allocated for it and to get rid of IMX_IOMUXC_BASE usage. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM i.MX: streamline imx_silicon_revisionSascha Hauer2012-10-051-8/+7
| | | | | | | | | | | | | | | | 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>
* | ARM i.MX: Add watchdog devices to SoCsSascha Hauer2012-10-051-0/+1
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX5: Switch to common clk supportSascha Hauer2012-10-041-1/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/remove-fsf-address'Sascha Hauer2012-10-031-4/+0
|\ | | | | | | | | | | Conflicts: drivers/net/miidev.c include/miidev.h
| * Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-171-4/+0
| | | | | | | | | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM i.MX: implement clocksource as driverSascha Hauer2012-09-171-0/+2
| | | | | | | | | | | | | | To get rid of the register definitions in the SoC header files. platform_device_id is used to distinguish between gpt types. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM i.MX: Use platform_device_id for gpio driverSascha Hauer2012-09-141-7/+7
|/ | | | | | So we get the type of the gpio controller from the device Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX: switch to gpiolib supportSascha Hauer2012-09-041-14/+7
| | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
* ARM i.MX53: notify clocksource about changing clockWjatscheslaw Stoljarski (Slawa)2012-07-251-0/+2
| | | | | | | | | | | | This fix a clock inaccuracy in get_time_ns (used by sleep, time, etc). At i.MX53 power-on GPT clock is typically 55500000 Hz, and it will be used to calc the clock multiplier. After call imx53_init_lowlevel() GPT clock will changed (e.g. to 66666666 Hz), but multiplier not. To fix this behavior call clock_notifier_call_chain() after changing clock in imx53_init_lowlevel(). Signed-off-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX53: Setup USB clocksSascha Hauer2012-04-121-3/+14
| | | | | | | - get USB PHY clock from OSC (24MHz) - adjust USB clock to 54MHz Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX53: add silicon revision functionsEric Bénard2012-02-271-1/+46
| | | | | Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX5: Allow to pass cpu clock to lowlevel initSascha Hauer2012-02-131-2/+7
| | | | | | | Some variants of the i.MX53 do not allow to run at 1GHz, so pass a cpu frequency parameter to the lowlevel init function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX5: prepare to add a imx51_lowlevel_initSascha Hauer2012-01-021-54/+7
| | | | | | | | - move code which can be shared between i.MX53 and i.MX51 to a common file - rename mx53_init_lowlevel to imx53_init_lowlevel Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX53: Adjust MMC clock frequencies to 200MHzSascha Hauer2011-12-051-0/+9
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX53: enable l2 cacheSascha Hauer2011-11-021-7/+6
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX53: Add lowlevel init codeSascha Hauer2011-10-131-0/+147
| | | | | | | | | | | | | This adds lowlevel (AIPS, PLL, L2) initialization for i.MX53 boards. This is a direct transcription of Freescales U-Boot assembler code with the exception that we initialize PLL1 with 1000MHz and assume that all necessary voltages are already adjusted when we arrive here. It must be explicitely called from the boards so a board is free to do it's own initialization. However, boards should use this code and make it more configurable if necessary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* introduce io.hSascha Hauer2011-09-221-1/+1
| | | | | | | To allow for some generic io accessors introduce io.h and use this instead of asm/io.h throughout the tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: add support for the i.MX53Marc Kleine-Budde2011-07-291-0/+45
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>