summaryrefslogtreecommitdiff
path: root/arch/arm/boards/karo-tx28
Commit message (Collapse)AuthorAgeFilesLines
* ARM: mxs: Move mach header files to include/mach/mxsSascha Hauer2023-03-063-11/+11
| | | | | | | | | | Currently arch specific headers can be included with longer possible as there won't be a single mach anymore. Move all mxs specific header files to include/mach/mxs/ to prepare for multi-arch support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: mxs: remove unused mach/clock.hSascha Hauer2023-03-011-1/+0
| | | | | | | | mach/clock.h doesn't contain anything useful, remove it and drop its inclusion from files. Link: https://lore.barebox.org/20230228143031.1718565-2-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: MXS: fix breakage for non-DT boardsAhmad Fatoum2022-10-121-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | boarddata, the third argument passed from barebox PBL to barebox proper, is usually either a pointer to an optionally compressed flattened device tree or a machien type integer casted to a pointer. In order to support device trees located in the first 8192 bytes of address space, barebox has been trying to dereference boarddata, before falling back to treating it as integer. This resulted in breakage as boarddata may be an integer not divisible by 4 and thus an unaligned exception would occur. The already existing barebox_arm_boarddata mechanism sidesteps this issue: With it, the machine type integer is not passed as is, but the address of a suitably aligned structure that contains it is passed instead. Searching for MACH_TYPE in arch/arm/boards shows 5 boards to be affected in-tree, which are all fixed with this commit. Fixes: 390bc7834ffc ("ARM: start: check for machine type last") Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Tested-by: Bastian Krause <bst@pengutronix.de> Link: https://lore.barebox.org/20221011114927.546670-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arch: add SPDX-License-Identifier to all .c filesAhmad Fatoum2022-01-051-0/+2
| | | | | | | | | Record GPL-2.0-only as license for all files lacking an explicit license statement. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220103120539.1730644-11-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: add SPDX-License-Identifier for DCDAhmad Fatoum2022-01-051-0/+1
| | | | | | | | | | | In absence of a license statement, the default is GPL-2.0-only. Add that to the DCD files. All of // /* */ # are acceptable comment characters in the DSL. If there are nearby comments in the file, the same character is used, otherwise #. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220103120539.1730644-8-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: add SPDX-License-Identifier for Kbuild/KconfigAhmad Fatoum2022-01-051-0/+2
| | | | | | | | | | | | | | | To verify only Kconfig/Makefile is touched: git show --numstat --format=oneline HEAD | grep -v 'Kconfig\|Makefile' will print only arch/powerpc/Kbuild. To verify nothing unexpected is added: git show -U0 | grep '^-[^-]\|^+[^+]' | sort -u Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220103120539.1730644-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: tx28: provide header file with function prototypeSascha Hauer2020-09-153-2/+7
| | | | | | | base_board_init() doesn't have a prototype anywhere, add a header file for it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: make use of PTR_ERR_OR_ZEROUwe Kleine-König2020-06-261-3/+1
| | | | | | | | | | | PTR_ERR_OR_ZERO is designed to replace boiler plate like: if (IS_ERR(x)) return PTR_ERR(x); return 0; Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arch/arm/boards: Replace license and copyright boilerplate by SPDX identfiersUwe Kleine-König2020-05-252-26/+4
| | | | | | | | | | | | | | | | This adapts all files that were identifed by licensecheck (https://salsa.debian.org/build-common-team/licensecheck.git) as licensed under the GPL. The advantage is that these specifiers are machine-parseable which helps license conformance, e.g. for packaging barebox in Debian. While touching these files also do some minor comment reformatting to get some uniform layout. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: tx28: Make locally used function staticSascha Hauer2019-10-021-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: tx28: Pass and check machine typeSascha Hauer2019-10-023-1/+11
| | | | | | | Pass MACH_TYPE_TX28 to barebox_arm_entry() and check for it in initcalls to make the board multi image safe. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: MXS: make power levels configurable in mx2*_power_initRoland Hieber2018-08-141-1/+2
| | | | | | | | | | | | | Depending on the application, board code might want to configure different power levels and brownout thresholds. They can do so now with an additional struct mxs_power_ctrls* parameter to mx2*_power_init. Note that VDDMEM was not set up explicitely in mx28_power_init, but can now be configured. However, mx28_power_default->vddmem is NULL, so the old behaviour is still the case when using those default values. Signed-off-by: Roland Hieber <r.hieber@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: MXS: allow starting from battery input without 4P2 source enabledRoland Hieber2018-08-141-1/+1
| | | | | | | | | | | | | | Some boards don't need the 4.2V power source at all, so allow them to keep it disabled for efficiency reasons. For backwards compatibility, don't disable the 4P2 power source on the existing boards which are supplied from battery input. The POWER_USE_5V code path however always enables it up as it is needed to supply the DC-DC converter. Signed-off-by: Roland Hieber <r.hieber@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: MXS: refactor mx2*_power_init source configurationRoland Hieber2018-08-141-1/+1
| | | | | | | | | | | | Having three ints as parameter suggests that we can use up to 2^3 power configurations for the system, but when we look at the code, the power setup is packaged in if {...} else if {...} else if {...} blocks, so setting more than one parameter to 1 is useless here. Refactor the parameters into an enum to get rid of that suggestion. Signed-off-by: Roland Hieber <r.hieber@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX28: Add memory size detectionSascha Hauer2018-08-141-8/+0
| | | | | | | | | | | | | | We can detect the SDRAM automatically, no need to let the boards do it manually. This also fixes device tree based i.MX28 boards like the duckbill. These boards once had a /memory node in the device tree, but now that this was changed to /memory@40000000 barebox didn't find it anymore. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Roland Hieber <r.hieber@pengutronix.de> Signed-off-by: Roland Hieber <r.hieber@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: MXS: allow configuration of EMI clock prescalerRoland Hieber2018-08-141-0/+2
| | | | | | | | | | | | | Allow to set not only the fractional divider, but also the prescaler for the EMI clock in mxs_mem_init_clock(), and rename the parameters accordingly to reflect the change. Port the existing board code to set up the EMI clock explicitely with the old values. Also fix the off-by-a-half error in the comments, which did not take the prescaler of 2 into account, on which the fractional divider is applied (according to the i.MX23/i.MX28 Reference Manuals) Signed-off-by: Roland Hieber <r.hieber@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: MXS: i.MX28: allow setup of low-voltage SDRAMRoland Hieber2018-08-141-1/+2
| | | | | | | | The PINCTRL_*_DDR_MODE_* defines are now needed in global scope, so move them to the respective include header. Signed-off-by: Roland Hieber <r.hieber@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: mxs: add parameter to mx28_mem_init to allow custom memory configUwe Kleine-König2016-05-101-1/+1
| | | | | | | | | | Rename the already global array of default memory settings to make the intended usage more obvious. Also make generous use of the const keyword. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* include: Move fec eth platform_data to include/platform_dataSascha Hauer2016-04-151-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: stm: code buswidth in platform data as decimalSascha Hauer2015-07-061-1/+1
| | | | | | | | | Instead of putting hardware specific bit masks in platform_data just use the decimal interface width and encode this in the driver. This makes it easier to create the platform_data and helps device tree based implementations. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: MXS: power-init: Add parameters to mx28_power_init()Sascha Hauer2015-02-031-1/+1
| | | | | | | | | | | | | | | | | | | Instead of introducing new functions each time a new power supply situation is to be added, this patch adds parameters to mx28_power_init. Right now there are three parameters: - has_battery - true when this board has a battery. - use_battery_input - true when this board is supplied from the battery input, but has a DC source instead of a real battery - use_5v_input - true when this board can use the 5V input The third one is introduced with this patch and allow to boot a board from 5v (USB) source only. The main necessary change this needs is that the DC-DC converter must always be sourced from DCDC_4P2 (DROPOUT_CTRL field of HW_POWER_DCDC4P2) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: MXS: Create ocotp device in SoC codeSascha Hauer2015-01-281-3/+0
| | | | | | | The ocotp device is completely SoC internal, no need to register it from boards. Register it from SoC code instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mxs'Sascha Hauer2015-01-092-43/+56
|\
| * ARM: MXS: Update Karo TX28 board supportSascha Hauer2015-01-052-43/+56
| | | | | | | | | | | | | | | | | | - enable multiimage support to generate bootstream, sd-card and 2nd stage images - Enable new defaultenv support - Enable more features Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | sizes.h: move include/sizes.h to include/linux/sizes.hMasahiro Yamada2015-01-082-2/+2
|/ | | | | | | | | | | | | | 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>
* Documentation: remove doxygen documentationSascha Hauer2014-06-261-52/+0
| | | | | | | The doxygen documentation is long outdated. Remove it. It will be replaced with sphinx based documentation later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: change signature of barebox_arm_entryLucas Stach2014-05-051-1/+1
| | | | | | | | | | | Mostly to make it clear that boarddata needs to be something we can dereference. As this is a pretty invasive change, use the opportunity to make the signature 64bit safe. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: Add display timing from devicetree helperSascha Hauer2014-03-291-5/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: remove armlinux_set_bootparams() calls from boardsSascha Hauer2014-01-061-1/+0
| | | | | | | As the place for the atags now is determined automatically the call from the boards can be removed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Ka-Ro TX28: Fix result checking of devfs_add_partitionSascha Hauer2013-09-301-1/+5
| | | | | | | devfs_add_partition was changed to return the cdev. Fix the result checking accordingly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/boardinfo'Sascha Hauer2013-09-052-1/+3
|\ | | | | | | | | | | | | Conflicts: arch/mips/boards/qemu-malta/init.c commands/bootm.c drivers/of/base.c
| * Set model and hostname at boardlevelSascha Hauer2013-08-162-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | With multiboard support the compiletime generated BOARDINFO string gets more and more meaningless. This removes it from Kconfig and replaces it with a variable that can be set at boardlevel. Also many boards have a standard setting for the hostname in the environment. This patch also moves the standard to C code by calling barebox_set_hostname(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: MXS: move iomux definitions to iomux.hSascha Hauer2013-08-162-0/+2
|/ | | | | | | mach/gpio.h is for the gpio API, so move unrelated stuff away. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: mxs: Add convenience wrapper to register mxs_nand deviceSascha Hauer2013-07-231-2/+2
| | | | | | | The convenience wrapper also contains the bch resources to get rid of the hardcoded base in the driver in the next step. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mxs'Sascha Hauer2013-07-011-6/+0
|\
| * ARM: MXS: remove imx_enable_enetclkSascha Hauer2013-06-201-1/+0
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: MXS: remove board specific clock setupsSascha Hauer2013-06-201-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some boards have board specific special clock setups. These are now done in the SoC specific clock drivers. It is assumed that most board specific clock setup is done based on copy/paste from U-Boot. The generalized clock setup differs from some boards: - ioclk are adjusted to 480MHz - ssp clocks are adjusted to 96MHz - enet out clock is enabled Some boards adjusted the ioclk to 320MHz and the ssp clock to 160MHz. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mci: rename capabilities flagsSascha Hauer2013-06-031-1/+1
|/ | | | | | | | | | Use MMC_CAP_ names instead of MMC_MODE_. This makes it more clear that these are capabilities of host/card and do not refer to the current mode. These are in line with the Linux Kernel except for MMC_CAP_MMC_HIGHSPEED_52MHZ which could be fixed later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Remove unused config.hAlexander Shiyan2013-04-091-16/+0
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: fec: use standard phy type definesSascha Hauer2013-03-091-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* switch boards to lwl-yJean-Christophe PLAGNIOL-VILLARD2013-02-211-2/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: rename reset and common_reset to barebox_arm_reset_vector and ↵Jean-Christophe PLAGNIOL-VILLARD2013-02-081-2/+2
| | | | | | | | | arm_cpu_lowlevel_init reset is confusing with the cpu reset and impossible to grep Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM MXS boards: switch to barebox_arm_entrySascha Hauer2013-02-042-0/+13
| | | | | | All boards use hardcoded SDRAM addresses, copied from the board init file. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mxs: tx28: fix NAND usageWolfram Sang2012-12-051-1/+5
| | | | | | | Pinmuxing was wrong and no GPMI device was created. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net fec_imx: determine fec version based on device idsSascha Hauer2012-10-051-1/+1
| | | | | | | | This adds the device id mechanism to the i.MX fec driver and uses it to determine the fec version. Also adds devicetree probing support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* defaultenv: switch hostname to global.hostnameJean-Christophe PLAGNIOL-VILLARD2012-10-021-7/+7
| | | | | | Udpate dhcp with it too. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* arm: mxs: add proper resource lengthWolfram Sang2012-09-111-6/+6
| | | | | | | | | | | For some reason, the mxs-boards missed some length parameters when adding devices. This made reading from ocotp crash in the current version. Provide missing lengths, use a consistent format and fix the length for the LCDIF. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* config: switch machine to hostnameJean-Christophe PLAGNIOL-VILLARD2012-04-181-7/+7
| | | | | | | So we can use it for dhcp request too. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: mxs: tx28: get MAC from OCOTPWolfram Sang2012-04-051-0/+23
| | | | | Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* defaultenv: simplify bootSascha Hauer2011-12-151-5/+0
| | | | | | | | Now that we have a bootm command which boots everything we can simplify the defaultenvironment. We can call bootm on every image type and can remove the kernelimage_type variables. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>