summaryrefslogtreecommitdiffstats
path: root/arch/arm/imx-common
Commit message (Collapse)AuthorAgeFilesLines
* imx: i2c: Zap unnecessary malloc() callsMarek Vasut2014-12-301-16/+8
| | | | | | | | | | | | | | | | The malloc() calls are unnecessary, just allocate the stuff on stack. While at it, reorder the code a little, so that only one variable is used for the text, use snprintf() instead of sprintf() and use %01d as a formatting string to avoid any possible overflows. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Nikita Kiryanov <nikita@compulab.co.il> Cc: Sean Cross <xobs@kosagi.com> Cc: Simon Glass <sjg@chromium.org> Cc: Stefano Babic <sbabic@denx.de> Cc: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
* imx SPL: enable boot from eMMC boot partitions.Pierre Aubert2014-12-301-1/+3
| | | | Signed-off-by: Pierre Aubert <p.aubert@staubli.com>
* sata: fix reset_sata for dwc_ahsataSoeren Moch2014-12-011-0/+3
| | | | | | | | | | | - fix crash when sata device is not initialized - remove disable_sata_clock() since it is not clear which clock for which device should be disabled here - call disable_sata_clock() for mx6 in preboot_os instead Signed-off-by: Soeren Moch <smoch@web.de> Acked-by: Nikita Kiryanov <nikita@compulab.co.il> Tested-by: Nikita Kiryanov <nikita@compulab.co.il>
* arm: imx: stop sata on bootNikita Kiryanov2014-11-241-2/+6
| | | | | | | | | | | | | | Ideally, the Linux kernel should get the hardware in its most untouched state. For the most part, U-Boot does not reset the various subsystems it touches before boot, and usually Linux deals with it, but on some boards (cm_fx6) the Linux kernel fails to detect the ssd correctly if sata is used by U-Boot. Power off sata on OS boot so that Linux will have a clean state to work with. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Cc: Stefano Babic <sbabic@denx.de>
* mx6: thermal: Check cpu temperature via thermal sensorYe.Li2014-11-211-0/+21
| | | | | | | | Add imx6 thermal device to mx6 soc file. Read the cpu temperature using this device to access onchip thermal sensor. Signed-off-by: Ye.Li <B37916@freescale.com> Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
* imx: consolidate set_chipselect_size functionFabio Estevam2014-11-201-0/+31
| | | | | | | | | | Move MX5 specific set_chipselect_size function into generic i.MX part, such that MX6 based boards are able to use this function as well. While doing this the iomuxc gpr member needed to be consolidated between MX5 and MX6. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
* mx6: Use a common SPL configuration fileFabio Estevam2014-11-201-0/+8
| | | | | | | | | Many boards use a minimal .cfg file in the SPL case. Introduce spl_sd.cfg so that we can reuse it. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de>
* mx6: video_skip: Fix crash on NULL pointerNikolay Dimitrov2014-11-131-1/+5
| | | | | Signed-off-by: Nikolay Dimitrov <picmaster@mail.bg> Cc: Stefano Babic <sbabic@denx.de>
* arm: imx: make bmode command work with SPL/U-Boot comboNikita Kiryanov2014-11-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The bmode command forces the SoC to use a specific boot device by writing its boot mode into SRC_GPR9, and notifying the SoC of the change using SRC_GPR10[28] bit: if the bit is on, bootROM uses the value in SRC_GPR9 instead of SRC_SMBR1 to determine the boot device. SPL on the other hand is oblivious to this distinction, so once the bootROM loads SPL from the device configured in SRC_GPR10, SPL will attempt to load U-Boot from the device configured in SRC_SMBR1, which is not updated by the bootROM to the value in SRC_GPR9. The result is that the selected boot device is not used across all the boot stages. Update spl_boot_device() to look at gpr9 when necessary. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Cc: Stefano Babic <sbabic@denx.de> Cc: Troy Kisky <troy.kisky@boundarydevices.com> Cc: Tim Harvey <tharvey@gateworks.com> Cc: Eric Nelson <eric.nelson@boundarydevices.com> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Heiko Schocher <hs@denx.de>
* Merge branch 'master' of git://www.denx.de/git/u-boot-imxTom Rini2014-11-052-9/+81
|\
| * imx: mx6 sabreauto: Add board support for USB EHCIYe.Li2014-11-031-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On mx6 sabreauto board, there are two USB ports: 0: OTG 1: HOST The EHCI driver is enabled for this board, but the IOMUX and VBUS power control is not implemented, which cause both USB port failed to work. This patch fix the problem by adding the board support codes. Since the power control uses the GPIO pin from port expander MAX7310, the PCA953X driver is enabled for accessing the MAX7310. The ID pin of OTG Port needs to configure the GPR1 bit 13 for selecting its daisy chain. Add a new function "imx_iomux_set_gpr_register" to handle GPR register setting. Signed-off-by: Ye.Li <B37916@freescale.com>
| * imx: gpt: Add High frequency clock source support for GPTYe.Li2014-11-031-9/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new configuration "CONFIG_MXC_GPT_HCLK". When it is set, the GPT will select a high frequency clock as clock source. Otherwise, the GPT will stay to use 32Khz OSC as clock source. In the implementation, since only the GPT on i.MX6 series provide the clock source option for 24Mhz OSC. For others (only i.MX5 and i.MX6 compile the driver), if the configuration is set, the perclk will be selected as clock source. MX6Q/D Rev 1.0 and MX6SL are special in the implementation, because they don't have the 24Mhz OSC clock source option, so also select the perclk for them. For MX6SL, we will set the OSC 24Mhz to perclk in CCM, so eventually the clock comes from OSC 24Mhz. Signed-off-by: Ye.Li <B37916@freescale.com>
* | Rename some defines containing FAT in their name to be filesystem genericGuillaume GARDET2014-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | Rename some defines containing FAT in their name to be filesystem generic: MMCSD_MODE_FAT => MMCSD_MODE_FS CONFIG_SPL_FAT_LOAD_ARGS_NAME => CONFIG_SPL_FS_LOAD_ARGS_NAME CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME => CONFIG_SPL_FS_LOAD_PAYLOAD_NAME CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION => CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Cc: Tom Rini <trini@ti.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-imxTom Rini2014-10-271-3/+0
|\ \ | |/
| * ARM: i.MX video: declare displays and display_count publiclyEric Nelson2014-10-211-3/+0
| | | | | | | | | | | | | | | | Declare displays[] and display_count in imx-common/video.h to prevent "Should it be static?" messages when compiling board files with "make C=1". Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
* | imx: add missing includesJeroen Hofstee2014-10-252-0/+3
| | | | | | | | Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
* | dm: imx: i2c: Use gpio_request() to request GPIOsSimon Glass2014-10-221-0/+25
| | | | | | | | | | | | | | | | | | | | GPIOs should be requested before use. Without this, driver model will not permit the GPIO to be used. Cc: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
* | imx: Add error checking to setup_i2c()Simon Glass2014-10-221-5/+19
|/ | | | | | | Since this function can fail, check its return value. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Nikita Kiryanov <nikita@compulab.co.il>
* ARM: mx6: Prevent overflow in DRAM size detectionMarek Vasut2014-08-201-0/+5
| | | | | | | | | | | | | The MX6 DRAM controller can be configured to handle 4GiB of DRAM, but only 3840 MiB of that can be really used. In case the controller is configured to operate a 4GiB module, the imx_ddr_size() function will correctly compute that there is 4GiB of DRAM in the system. Firstly, the return value is 32-bit, so the function will effectively return zero. Secondly, the MX6 cannot address the full 4GiB, but only 3840MiB of all that. Thus, clamp the returned size to 3840MiB in such case. Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Tim Harvey <tharvey@gateworks.com>
* mx6: Remove duplication of iomuxc structureFabio Estevam2014-07-231-2/+1
| | | | | | | | | | | | | | | There is no need to keep iomuxc_base_regs structure as it serves the exact same purpose of the iomuxc structure, which is to provide access to the GPR registers. The additional fields of iomuxc_base_regs are not used. Other advantage of 'iomuxc' is that it has a shorter name and the variable declarations can fit into a single line. So remove iomuxc_base_regs structure and use iomuxc instead. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de>
* Merge branch 'master' of git://git.denx.de/u-bootStefano Babic2014-07-161-4/+0
|\ | | | | | | | | | | | | Signed-off-by: Stefano Babic <sbabic@denx.de> Conflicts: boards.cfg
| * Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'Albert ARIBAUD2014-06-305-12/+111
| |\
| * | kbuild: move cmd_mkimage to scripts/Makefile.libMasahiro Yamada2014-06-051-4/+0
| | | | | | | | | | | | | | | | | | | | | Because cmd_mkimage is used in various subdirectories, it seems reasonable to define it in scripts/Makefile.lib. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | | mx6: Add support for the mx6solox variantFabio Estevam2014-07-101-0/+2
| |/ |/| | | | | | | | | | | | | | | | | | | | | mx6solox is the newest member of the mx6 family. Some of the new features on this variants are: - Cortex M4 microcontroller (besides the CortexA9) - Dual Gigabit Ethernet Add the initial support for it. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
* | vf610: fix build due to missing sys_proto.hStefano Babic2014-06-251-1/+1
| | | | | | | | | | | | | | | | commit 67a04ab3ab8522a3a34491853e46105317580df5 fix the build for MX25. The same error happens for VF610 SOC. Signed-off-by: Stefano Babic <sbabic@denx.de>
* | MX25: fix build due to missing sys_proto.hStefano Babic2014-06-061-0/+2
| | | | | | | | | | | | | | | | THe mx25 arch does not have a sys_proto.h file. Instead of creating a dummy file, the file is not included for this SOC. Signed-off-by: Stefano Babic <sbabic@denx.de>
* | imx: sata: return failure if not IMX6Q/IMX6DTim Harvey2014-06-061-1/+6
| | | | | | | | | | | | | | The IMX6QUAD/DUAL have SATA, but the IMX6SOLO/DL do not. Return instead of configuring the SATA clock and GPR13 registers. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* | imx: iomux: add macros to setup iomux for multiple SoC typesTim Harvey2014-06-061-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow imx_iomux_v3_setup_multiple_pads to take a multi-cpu pad_list and add macros for declaring the pad_list that take into account the SoC types supported using CONFIG_MX6QDL (supports both the MX6Q and MX6DL iomux). Cc: Stefan Roese <sr@denx.de> Cc: Otavio Salvador <otavio@ossystems.com.br> Cc: Andy Ng <andreas2025@gmail.com> Cc: Eric Nelson <eric.nelson@boundarydevices.com> Cc: Tapani Utriainen <tapani@technexion.com> Cc: Tom Rini <trini@ti.com> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* | imx: add comments and remove unused struct fieldsTim Harvey2014-06-061-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add comment block for the imx_ddr_size function and remove the extra unused fields from struct esd_mmdc_regs which are also not common between IMX53 and IMX6. Cc: Stefan Roese <sr@denx.de> Cc: Otavio Salvador <otavio@ossystems.com.br> Cc: Andy Ng <andreas2025@gmail.com> Cc: Eric Nelson <eric.nelson@boundarydevices.com> Cc: Tapani Utriainen <tapani@technexion.com> Cc: Tom Rini <trini@ti.com> Signed-off-by: Tim Harvey <tharvey@gateworks.com> Acked-by: Stefano Babic <sbabic@denx.de> Acked-by: Nikita Kiryanov <nikita@compulab.co.il>
* | mx6: add boot device support for SPLTim Harvey2014-06-062-0/+82
|/ | | | | | | | | | | | | | | Add a common spl.c file to support boot device functions needed for SPL such as detecting the boot device. Cc: Stefan Roese <sr@denx.de> Cc: Otavio Salvador <otavio@ossystems.com.br> Cc: Andy Ng <andreas2025@gmail.com> Cc: Eric Nelson <eric.nelson@boundarydevices.com> Cc: Tapani Utriainen <tapani@technexion.com> Cc: Tom Rini <trini@ti.com> Signed-off-by: Tim Harvey <tharvey@gateworks.com> Acked-by: Nikita Kiryanov <nikita@compulab.co.il>
* iomux-v3: Add support for mx6sl LVE bitFabio Estevam2014-05-091-0/+8
| | | | | | | | | | | | | On mx6sl there is a LVE (Low Voltage Enable) bit in the IOMUXC_SW_PAD_CTL register that can enable or disable low voltage on the pad. LVE is bit 22 of IOMUXC_SW_PAD_CTL register, but in order to make the calculation easier we can define it as a flag in bit 1, since this bit is unused. Add support for it. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Tested-by: Otavio Salvador <otavio@ossystems.com.br>
* imx-common/video: add detect_hdmiEric Benard2014-04-151-0/+10
| | | | | | | | this function is used by several board together with board_video_skip to detect if hdmi is plugged is order to select the display to use. So move it in imx-common to share it. Signed-off-by: Eric Bénard <eric@eukrea.com>
* imx-common: add board_video_skipEric Benard2014-04-152-0/+56
| | | | | | | | this function is shared by several boards and thus can be factorized Signed-off-by: Eric Bénard <eric@eukrea.com> Acked-by: Eric Nelson <eric.nelson@boundarydevices.com> Acked-by: Stefano Babic <sbabic@denx.de>
* Merge branch 'u-boot/master' into 'u-boot-arm/master'Albert ARIBAUD2014-04-081-1/+1
|\ | | | | | | | | | | | | | | Conflicts: arch/arm/cpu/arm926ejs/mxs/Makefile include/configs/trats.h include/configs/trats2.h include/mmc.h
| * kbuild: Rename UIMAGE to MKIMAGEMarek Vasut2014-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot uses the 'mkimage' tool to produce various image types, not only uImage image type. Rename the invocation name from UIMAGE to MKIMAGE. The following command was used to do the replacement: git grep 'quiet_cmd_mkimage.* = UIMAGE' | cut -d : -f 1 | \ xargs -i sed -i "s@\(quiet_cmd_mkimage\)\(.*\) = UIMAGE @\1\2 = MKIMAGE@" {} Signed-off-by: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@ti.com> Cc: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | imx: add rules for U-Boot DTB supportStefano Babic2014-04-021-0/+8
|/ | | | Signed-off-by: Stefano Babic <sbabic@denx.de>
* kbuild: use shorten logs for IMX imagesMasahiro Yamada2014-02-251-34/+51
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kbuild: rename OBJCFLAGS to OBJCOPYFLAGSMasahiro Yamada2014-02-251-2/+2
| | | | | | | Rename OBJCFLAGS to OBJCOPYFLAGS beforehand to use "cmd_objcopy" in scripts/Makefile.lib in an upcoming commit. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* Merge branch 'u-boot/master' into 'u-boot-arm/master'Albert ARIBAUD2014-02-201-1/+1
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile drivers/net/npe/Makefile These two conflicts arise from commit 0b2d3f20 ("ARM: NET: Remove the IXP NPE ethernet driver") and are resolved by deleting the drivers/net/npe/Makefile file and removing the CONFIG_IXP4XX_NPE line from Makefile.
| * kbuild: use Linux Kernel build scriptsMasahiro Yamada2014-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we are ready to switch over to real Kbuild. This commit disables temporary scripts: scripts/{Makefile.build.tmp, Makefile.host.tmp} and enables real Kbuild scripts: scripts/{Makefile.build,Makefile.host,Makefile.lib}. This switch is triggered by the line in scripts/Kbuild.include -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj +build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj We need to adjust some build scripts for U-Boot. But smaller amount of modification is preferable. Additionally, we need to fix compiler flags which are locally added or removed. In Kbuild, it is not allowed to change CFLAGS locally. Instead, ccflags-y, asflags-y, cppflags-y, CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o are prepared for that purpose. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Gerhard Sittig <gsi@denx.de>
* | mx6: Distinguish mx6dual from mx6quadFabio Estevam2014-02-111-0/+2
|/ | | | | | | | | | | | Currently when we boot a mx6dual U-boot reports that it is a mx6quad. Report it as MX6D instead: CPU: Freescale i.MX6D rev1.2 at 792 MHz Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Stefano babic <sbabic@denx.de> Acked-by: Otavio Salvador <otavio@ossystems.com.br>
* MX6: fix sata compilation for i.MX6Stefano Babic2013-12-192-1/+2
| | | | | | | Commit 164d98466103a46b7c881149e92ec2a28a6375be breaks board with SATA support, because sata is not compiled. Signed-off-by: Stefano Babic <sbabic@denx.de>
* nitrogen6x: Move setup_sata to common partGiuseppe Pagano2013-12-172-0/+36
| | | | | | | | | | Move setup_sata function definition from platform file nitrogen6x.c to arch/arm/imx-common/sata.c to avoid code duplication. Signed-off-by: Giuseppe Pagano <giuseppe.pagano@seco.com> CC: Stefano Babic <sbabic@denx.de> CC: Fabio Estevam <fabio.estevam@freescale.com> CC: Eric Nelson <eric.nelson@boundarydevices.com>
* imx-common: remove extraneous semicolon from macroEric Nelson2013-11-271-2/+2
| | | | Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
* ARM: imx-common: convert makefiles to Kbuild styleMasahiro Yamada2013-10-311-29/+6
| | | | | | | | Multiple targets are included in arch/arm/imx-common/Makefile In order to refactor it, we need to tweak Makefile and spl/Makefile. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* i2c: mxc: move to new subsystemtrem2013-10-171-1/+1
| | | | Signed-off-by: Philippe Reynes <tremyfr@yahoo.fr>
* Merge git://git.denx.de/u-boot-armStefano Babic2013-07-319-144/+9
|\ | | | | | | | | | | | | | | | | Conflicts: board/freescale/mx6qsabrelite/Makefile board/freescale/mx6qsabrelite/mx6qsabrelite.c include/configs/mx6qsabrelite.h Signed-off-by: Stefano Babic <sbabic@denx.de>
| * Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-249-144/+9
| | | | | | | | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* | imx: nitrogen6x: mx6qsabrelite: Add support for DVI monitorsRobert Winkler2013-07-271-2/+1
|/ | | | | | | | | | | | | | | | | | | | | | A little background is probably appropriate for this patch. Since "the beginning" of usage of the SABRE Lite and Nitrogen6x boards, DVI detection has been somewhat broken. Some (most) DVI monitors don't produce the "HPD" bit in the PHY_STAT0 register, but do show proper toggling of the RX_SENSE0..3 bits. Creating a new the bit-mask to include all five bits and modifying the 'hdmidet' command and internal detection routines allows these monitors to function properly in U-Boot. A related patch to our kernels allows things to work under Linux: https://github.com/boundarydevices/linux-imx6/commit/7d8752905c118af9063738a533227de0b2f6ecd4 Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com> Acked-by: Stefano Babic <sbabic@denx.de>
* arm: vf610: Add IOMUX support for Vybrid VF610Alison Wang2013-06-032-1/+7
| | | | | | | | | | | | | This patch adds the IOMUX support for Vybrid VF610 platform. There is a little difference for IOMUXC module between VF610 and i.MX platform, the muxmode and pad configuration share one 32bit register on VF610, but they are two independent registers on I.MX platform. A CONFIG_IOMUX_SHARE_CONFIG_REG was introduced to fit this difference. Signed-off-by: Alison Wang <b18965@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de> Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
OpenPOWER on IntegriCloud