summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap
Commit message (Collapse)AuthorAgeFilesLines
* hw_random: add OMAP RNG driverAhmad Fatoum13 days1-0/+5
| | | | | | | | | To enable proper hardening with stack protector, add support for the OMAP RNG driver. This has been tested on a Beagle Bone Black. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240313105631.686778-13-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* default environment: make string arguments constSascha Hauer2024-02-201-0/+1
| | | | | | | | | | | | | Change default_environment_path_set() to take a const char * and let default_environment_path_get() return a const char *. Also, do not keep a copy of the string passed to default_environment_path_set() rather than the original string to make it more clear where the path is allocated. This allows us to free the string passed to default_environment_path_set() after usage by some callers. Link: https://lore.barebox.org/20240219105507.1618465-1-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: add MODULE_DEVICE_TABLE markersAhmad Fatoum2023-06-131-0/+1
| | | | | | | | | | | | | | | | Syncing device trees with Linux upstream can lead to breakage, when the device trees are switched to newer bindings, which are not yet supported in barebox. To make it easier to spot such issues, we want to start applying some heuristics to flag possibly problematic DT changes. One step towards being able to do that is to know what nodes barebox actually consumes. Most of the nodes have a compatible entry, which is matched by an array of of_device_id, so let's have MODULE_DEVICE_TABLE point at it for future extraction. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230612125908.1087340-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: drop trailing spaceAhmad Fatoum2023-05-021-1/+1
| | | | | | | | | | | | | | Found by manual inspection of the output of: rg '\s+$' | rg -v dts/ Patch can be verified by observing that no diff results from: git show --ignore-space-at-eol Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Link: https://lore.barebox.org/20230424121805.150434-4-ahmad@a3f.at Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: omap: Make multi-arch safeSascha Hauer2023-03-072-1/+10
| | | | | | Make sure the initcalls do not execute on foreign SoCs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: omap: usbboot: Enable USB communication when neededSascha Hauer2023-03-071-1/+3
| | | | | | | | Instead of activating USB communication unconditionally in an initcall, let the users activate it once they need it. This gets us rid of an initcall that is not protected against running on foreign SoCs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: omap: Move mach header files to include/mach/omapSascha Hauer2023-03-0661-5011/+77
| | | | | | | | | | Currently arch specific headers can be included with longer possible as there won't be a single mach anymore. Move all omap specific header files to include/mach/omap/ to prepare for multi-arch support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Rename struct driver_d to driverSascha Hauer2023-01-101-1/+1
| | | | | | | | | | | The '_d' suffix was originally meant to distinguish barebox struct names from Linux struct names. struct driver doesn't exist in Linux, so we can rename it and remove the meaningless suffix. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-4-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Rename struct device_d to deviceSascha Hauer2023-01-106-35/+35
| | | | | | | | | | | | | The '_d' suffix was originally introduced in case we want to import Linux struct device as a separate struct into barebox. Over time it became clear that this won't happen, instead barebox struct device_d is basically the same as Linux struct device. Rename the struct name accordingly to make porting Linux code easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Remove unused struct partitionSascha Hauer2022-11-231-1/+0
| | | | | | | | struct partition from include/partition.h is entirely unused. Remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.barebox.org/20221117120604.3840211-1-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: replace errno_str() with %m printf format specifierAhmad Fatoum2022-10-112-11/+10
| | | | | | | | | | | Both errno_str() and printf("%m" end up calling strerror(). %m is more convenient to use, so switch over all instances to it. No functional change. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20221010061122.2084009-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2022-08-111-7/+1
|\
| * serial: ns16550: Reuse 48MHz default clock definition for non-DT OMAP boardsAlexander Shiyan2022-06-301-7/+1
| | | | | | | | | | | | | | Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220628080414.28960-1-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | bootsource: rename existing bootsource_set to bootsource_set_rawAhmad Fatoum2022-08-093-6/+3
|/ | | | | | | | | | | | | | | | | Patterns like [ "$bootsource" = mmc ] && boot mmc$bootsource_instance expect that ${bootsource_instance} and MMC aliases align, which may not always be the case. In preparation for adding a new bootsource_set function that consults an optional mapping table from bootrom bootsource_instance to board-specific device numbering, rename all existing instances to bootsource_set_raw. While at it, clean up the legacy split into bootsource_set and bootsource_set_instance and have the new bootsource_set_raw accept both arguments at once. No functional change intended. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220720055042.3510276-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/omap'Sascha Hauer2022-06-2912-342/+262
|\
| * ARM: OMAP: Rework watchdog codeAlexander Shiyan2022-06-146-75/+24
| | | | | | | | | | | | | | | | | | | | This patch introduces the omap_watchdog_disable() function, since the WDT core is the same for different OMAP variants, it can be used for all supported SOCs. Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220609091946.20028-1-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: OMAP: Move am33xx_sdram_size() into EMIF module and make it genericAlexander Shiyan2022-06-076-54/+58
| | | | | | | | | | | | Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220603112540.51644-8-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: OMAP: Use EMIF4 registers for get SDRAM sizeAlexander Shiyan2022-06-071-1/+1
| | | | | | | | | | | | | | | | | | | | Instead of using the registers of the control module, we will use the EMIF registers in am335x_sdram_size(). This can help when porting this function to other CPU variants. Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220603112540.51644-7-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: OMAP: emif: Rename am35xx_emif4 unitAlexander Shiyan2022-06-072-1/+1
| | | | | | | | | | | | | | | | | | EMIF can be used for other CPU variants. Let's rename it to be more generic. Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220603112540.51644-6-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: OMAP: emif: Abstract am35xx_emif4 from any CPU-specific includesAlexander Shiyan2022-06-072-4/+2
| | | | | | | | | | | | Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220603112540.51644-5-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: OMAP: Move locally used definitions from emif4 header to am35xx_emif4Alexander Shiyan2022-06-072-53/+52
| | | | | | | | | | | | Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220603112540.51644-4-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: OMAP: Adopt am35xx_emif4_init() to use fixed offset definitionsAlexander Shiyan2022-06-072-44/+20
| | | | | | | | | | | | Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220603112540.51644-3-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: OMAP: Move EMIF4 definitions to appropriate headerAlexander Shiyan2022-06-073-21/+22
| | | | | | | | | | | | Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220603112540.51644-2-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: OMAP: Rearranging EMIF4 definitionsAlexander Shiyan2022-06-072-29/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently we have three different definitions for EMIF management: - Offsets - Offsets relative to the base address - Offsets in the structure The patch represents the first attempt to unify this. Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220603112540.51644-1-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2022-06-291-9/+5
|\ \
| * | read_file: Pass NULL for the size parameter if the return value is not usedAlexander Shiyan2022-06-101-9/+5
| |/ | | | | | | | | | | Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220609072629.15723-1-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / ARM: OMAP: syslib: Optimize wait_on_value() functionAlexander Shiyan2022-06-091-9/+6
|/ | | | | | | | Saves up to 8 bytes in THUMB mode. Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220606064034.9568-1-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2022-05-199-99/+46
|\
| * ARM: omap: Cleanup omap4_revisionAlexander Shiyan2022-05-051-13/+4
| | | | | | | | | | | | | | | | Clean up the omap4 revision function by removing exceeding break statements. Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220505065206.10816-1-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * arm: boards: Add support for MYIR MYD-AM335X Development BoardAlexander Shiyan2022-04-293-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | The MYD-AM335X Development Board designed by MYIR is a high-performance ARM Evaluation Module (EVM) using the MYC-AM335X CPU module as the core controller board. It is based on up to 1GHz Texas Instruments (TI) Sitara AM335x family of ARM Cortex-A8 Microprocessors (MPUs) that deliver high DMIPs at a low cost while also delivering optional 3D graphics acceleration and key peripherals. Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220426070440.12471-1-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video: omap-fb: Rework to enable COMPILE_TEST optionAlexander Shiyan2022-04-255-86/+33
| | | | | | | | | | | | | | | | | | | | | | To add a compilation check for the omap-fb driver, move the omap-fb.h header to a global location. The "omap_add_display" function is used only for legacy boards, so we will move it to a common place for such calls (omap_devices.c). Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220422071158.14631-1-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: omap: Fix linker error with MTD disabledSascha Hauer2022-04-211-0/+5
| | | | | | | | | | | | | | We are using mtd functions now, make sure we do so only with MTD enabled to prevent linker errors. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: omap: xload: read from unpartitioned deviceSascha Hauer2022-04-211-53/+33
|/ | | | | | | | | | | | The omap xload code creates a temporary partition where the barebox image is read from. Since 7f9f45b9bf it is no longer allowed to create overlapping partitions which means the temporary partition can no longer be created when the device was partitioned already. Fix this by using the mtd PEB api to read the barebox image from the full device and not from a partition. Fixes: 7f9f45b9bf ("devfs: Do not create overlapping partitions") Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rename cdev_open() -> cdev_open_by_name()Sascha Hauer2022-02-081-2/+2
| | | | | | | | | | | | The cdev_* functions normally take a struct cdev * argument, with the exception of cdev_open(). Rename cdev_open() to cdev_open_by_name() to be able to implement cdev_open() with the expected semantics in the next step. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220207094953.949868-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arch: add SPDX-License-Identifier to all .c filesAhmad Fatoum2022-01-056-1/+13
| | | | | | | | | 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>
* arch: add SPDX-License-Identifier to all headersAhmad Fatoum2022-01-0513-1/+27
| | | | | | | | | 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-9-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/overlapping-memory-banks'Sascha Hauer2021-06-161-3/+1
|\
| * ARM: report probe error at arm_add_mem_device() callsites on failureAhmad Fatoum2021-06-021-3/+1
| | | | | | | | | | | | | | | | | | | | | | Failure to add one memory bank shouldn't prevent the driver from trying to add other memory banks, but the user should be informed as this points at a misconfiguration. Have the probe functions eventually fail with -EBUSY in such a case. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210531071239.30653-7-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: am33xx: add define for 800Mhz MPU PLL pointMarc Reilly2021-06-151-0/+1
|/ | | | | | Signed-off-by: Marc Reilly <marc@cpdesign.com.au> Link: https://lore.barebox.org/20210613222639.13190-3-marc@cpdesign.com.au Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: include <linux/math64.h> wrapper instead of <asm-generic/div64.h>Ahmad Fatoum2021-02-191-1/+1
| | | | | | | | | | | <asm-generic/div64.h> isn't meant for direct usage as <asm/div64.h> may override this on a per-architecture basis. We don't do that currently, but in the future we might. Include the <linux/math64.h> instead. No functional change. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc' into masterSascha Hauer2020-10-143-2/+7
|\
| * commands: boot_order: note that it's OMAP specific in help textAhmad Fatoum2020-10-051-2/+2
| | | | | | | | | | | | | | | | Kconfig and online documentation don't indicate that it's OMAP specific. Fix this. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: am335x: Enable TSC/ADC clockTrent Piepho2020-09-292-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Now that there is a Barebox driver for the ADC, enable the clock to the TSC/ADC block. This machine doesn't use common clock framework clocks in Barebox, and instead enables any clock that might get used. Enalbing the clock could be made conditional based on enabling the driver, but none of the other clocks do this. Signed-off-by: Trent Piepho <trent.piepho@synapse.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | treewide: Use driver macroSascha Hauer2020-09-291-6/+1
|/ | | | | | | We have several macros for a oneline driver registration. Add some missing and use them consistently where possible througout the tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* restart: give all restart handlers a descriptive nameAhmad Fatoum2020-09-153-3/+3
| | | | | | | | | | | | | With incoming changes to choose a specific reset method, give all currently unnamed "default" reset handlers a name: - soc reset via SoC-specific means - soc-wdt reset via SoC watchdog timer - vector reset via jump to reset vector - efi reset via EFI firmware Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2020-05-145-15/+0
|\
| * treewide: remove references to CREDITSUwe Kleine-König2020-04-275-15/+0
| | | | | | | | | | | | | | | | The CREDITS file was removed from barebox in 2015 by commit 6570288f2d97 ("Remove the CREDITS file"). Remove references to it from several files. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | treewide: Kconfig: remove some unused symbolsAhmad Fatoum2020-04-291-3/+0
|/ | | | | | | | All these symbols are defined, but unused anywhere in the barebox tree. Remove them. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: use cpu_relax() where appropriateAhmad Fatoum2020-04-151-4/+2
| | | | | | | | Instead of doing /* cpu_relax(); */ barrier(); on upstream uses of cpu_relax(), just use the new cpu_relax() #define directly. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: Compile with -fPIESascha Hauer2019-11-121-2/+0
| | | | | | | | | | | | | | | | Early code in barebox often runs at an address the binary is not linked at. This causes problems for example when simple initializations in a switch are converted to an array lookup (-ftree-switch-conversion). These arrays are then addressed where they are linked at. Some code where this is known to cause problems is already compiled with -fno-tree-switch-conversion. This however is limited to single files. This patch compiles barebox with -fPIE enabled. This causes such tables to be looked up PC relative rather than with its absolute address. This makes the -fno-tree-switch-conversion and -fno-jump-table options unnecessary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>