summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/include
Commit message (Collapse)AuthorAgeFilesLines
* arm: at91: fix at91_configure_usart6 warningSam Ravnborg2019-02-251-0/+1
| | | | | | | | | | | Add declaration to silence following warning: arch/arm/mach-at91/sama5d4_devices.c:487:24: warning: no previous prototype for ‘at91_configure_usart6’ Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Tested-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: delete unused mach/sama5d3_matrix.hAlexander Shiyan2019-01-211-15/+0
| | | | | | | This removes the stale mach/sama5d3_matrix.h include as there is no user of it. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: atmel_nand: Add per board ECC setupLadislav Michl2018-12-141-0/+2
| | | | | Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: remove unused definesSascha Hauer2018-11-0610-133/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: separate restart handler registration into SoC specific codeSascha Hauer2018-11-064-0/+7
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: make at91sam926x_board_init board specificSascha Hauer2018-11-062-11/+30
| | | | | | | | | The base addresses used in at91sam926x_board_init() differ with each SoC. The board knows which SoC we are running on though, so create and use SoC specific variants of these functions which pass the appropriate base addresses to at91sam926x_board_init(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: drop at91_pmc_write()/at91_pmc_read()Sascha Hauer2018-11-062-7/+3
| | | | | | | at91_pmc_write() and at91_pmc_read() need a compile time base address, so remove them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91rm9200ek: use plain readl/writel for pmc accessesSascha Hauer2018-11-061-0/+1
| | | | | | | at91_pmc_write() needs a compile time base address, so rather use plain read/writel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91sam926x use writel rather than pmc accessor functionSascha Hauer2018-11-061-8/+9
| | | | | | | | The pmc accessor function depends on a compile time base address, so rather use writel directly. In this case we can hardcode the base address again since all at91sam926x SoCs have the same pmc base address. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: remove mach/io.hSascha Hauer2018-11-064-41/+11
| | | | | | | Remove at91_sys_read() and at91_sys_write() since these are no longer used. This makes mach/io.h empty so remove that aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91rm9200 timer: Make system timer defines SoC specificSascha Hauer2018-11-062-49/+49
| | | | | | | | - rename at91_st.h to at91rm9200_st.h - rename prefix from AT91_ to AT91RM9200_ - remove register offset from System timer defines Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: remove unused header fileSascha Hauer2018-11-061-146/+0
| | | | | | nothing from mach/at91_tc.h is used, remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91rm9200: Add SoC namespace to memory controller definesSascha Hauer2018-11-061-137/+137
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: Use SoC specific base addresses where appropriateSascha Hauer2018-11-061-1/+1
| | | | | | | Replace AT91_ base addresses with their SoC specific variants where possible. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: Add SoC namespace to matrix definesSascha Hauer2018-11-057-514/+514
| | | | | | | Add SoC namespace to matrix define so we have one source less of conflicting defines. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: remove common matrix header fileSascha Hauer2018-11-051-30/+0
| | | | | | | The common matrix header file can be removed when the users include the SoC specific one. Fix the only user and remove the file. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: consolidate phy reset functionsSascha Hauer2018-11-053-4/+7
| | | | | | | | | | Many boards have the same ethernet phy reset function, so share the code in a common function. While at it remove the AT91_RSTC offset from the rstc register defines. AT91_RSTC was the offset between the AT91_SYSTEM_BASE and the reset controller. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: remove AT91_SDRAM_BASESascha Hauer2018-11-054-12/+1
| | | | | | | AT91_SDRAM_BASE is only used in board code which known the SDRAM base address, so we do not need a common define. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: drop AT91_NB_USARTSascha Hauer2018-11-0510-20/+0
| | | | | | | | | AT91_NB_USART only used to return an error from at91_register_uart() if an invalid UART number is passed. This will never happen as the linker fails earlier in that case, so the runtime check can be removed and with it the now unused AT91_NB_USART define. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: remove unused definesSascha Hauer2018-11-059-126/+4
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91sam926x: Add header for at91sam926x common base addressesSascha Hauer2018-11-051-0/+8
| | | | | | | There are some base addresses common to at91sam926x. Add a separate header for these. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: remove unused CONSISTENT_DMA_SIZE definesSascha Hauer2018-11-053-6/+0
| | | | | | CONSISTENT_DMA_SIZE is unused, remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: remove unused AT_DMA_ID_ definesSascha Hauer2018-11-054-120/+0
| | | | | | The defines are unused and not properly namespaced, so remove them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: at91: fix sdram controller initAhmad Fatoum2018-11-051-9/+9
| | | | | | | | | e739663535 confused parameters to __raw_writel. The value and the base address was mixed up. Fixes: e739663535 (arm: at91: code cleanup in at91sam926x_board_init) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: at91: move irq_fixup to header fileSam Ravnborg2018-01-171-0/+16
| | | | | | | | | | | | This allows at91_rtt_irq_fixup() to be used outside of the mach-at91/ directory. Adjust all call sites to include the at91_rtt header. Deleting one .c file is another nice side effect of this move. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: at91: remove leftovers from moving reset code in mach-at91Sam Ravnborg2018-01-091-46/+0
| | | | | | Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: at91: code cleanup in at91sam926x_board_initSam Ravnborg2018-01-091-56/+17
| | | | | | | | | | | - drop dead code (CONFIG_SYS_MATRIX_MCFG_REMAP not defined) - drop use of macros for simple __read/__write functions - delete extra lines - Trivial comments kept on a single line Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: at91: add at91sam926x_board_init.hSam Ravnborg2018-01-091-0/+222
| | | | | | | | | | | | | | | | | | | To prepare moving reset code to board code create at91sam926x_board_init.h. at91sam926x_board_init.h is a copy of at91sam926x_lowlevel_init.c with a few changes: - We no longer call board code from this function - The struct is renamed to avoid name clashes - Function renamed to better match the prurpose This file allows board code to include at91sam926x_board_init.h and use the init functions in their init code. Users must select AT91SAM926X_BOARD_INIT Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: at91: refactor lowlevel_init selectionSam Ravnborg2018-01-091-1/+1
| | | | | | | | | | | | | | | | | | | The aim with this conversion is to drop the dependency where the mach-at91/ code call code in the boards file. This dependency must be dropepd to enable multi-image builds. The selection of lowlevel_init functions are pushed to the individual boards. Use AT91SAM926X_BOARD_INIT for the boards that share the at91sam926x_board_init file, and push this to the individual boards. To be used in follow-up patches bootstrap is likewise pushed out to the individual boards. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* at91: sync mach/barebox-arm-head.hSam Ravnborg2017-09-061-3/+15
| | | | | | | | | | | | | | From 308f9f62554feaffaf3e2a0c7203e57b6fde8abc Mon Sep 17 00:00:00 2001 From: Sam Ravnborg <sam@ravnborg.org> Date: Fri, 7 Jul 2017 17:53:59 +0200 Subject: [PATCH 1/2] at91: sync mach/barebox-arm-head.h To prepare for multi image support synch the barebox-arm-head.h header with the arm version. This include the reservation of a small area for board specific use Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* usb: ohci-at91: Add DT supportAndrey Smirnov2017-03-301-2/+4
| | | | | | Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* at91: Fix bug/typo in debug_ll.hAndrey Smirnov2017-03-091-1/+1
| | | | | | | Correct "COFNIG" to "CONFIG". Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* at91sam9x5: fix ROM base address (bugfix for nand ECC)iEdoardo Scaglia2015-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The ROM base address in the 9x5 processors lives at 1M, not 4M, where SMD is, as defined later in the same file. The ROM includes some tables that are used to build error-correction data for NAND memory. By using the wrong address, we get wrong data and the result is undetected bit flips (data at 0x408000 is all zeroes). Thus, even though our kernel was fixing bit errors in NAND, barebox was not fixing them. With UBI (our situation) we got I/O errors because the checksum verification for data nodes failed. Using the proper address corrects the problem: barebox reports a "bitflip" message, consistent with the kernel message for the same file, and the files are properly loaded and booted. Note: the kernel has the same wrong define, but then the magic number 0x00108000 as spelled in arch/arm/boot/dts/at91sam9x5.dtsi is used instead of the symbolic name. Signed-off-by: Edoardo Scaglia <scaglia@amelchem.com> Signed-off-by: Federico Braghiroli <braghiroli@amelchem.com> Signed-off-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gpio: Drop asm-generic/gpio.hSascha Hauer2015-08-201-2/+0
| | | | | | | | | | Since we no longer have custom gpio function prototypes we can drop the prototypes from asm-generic/gpio.h can add them to include/gpio.h instead. While at it add static inline dummy wrappers for !CONFIG_GENERIC_GPIO so that code using gpios can compile without gpio support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: atmel: at91sam9n12: add subtype supportBo Shen2015-02-111-0/+7
| | | | | | | | As the at91sam9n12 series includes at91sam9n12, at91sam9cn11, at91sam9cn12. So, add subtype to distinguish them. Signed-off-by: Bo Shen <voice.shen@atmel.com> 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: at91: add sama5d4 soc support #2Bo Shen2014-09-241-0/+134
| | | | | Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: add sama5d4 soc support #1Bo Shen2014-09-243-0/+33
| | | | | Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: atmel: sama5d3 is a family member of sama5Bo Shen2014-09-221-1/+1
| | | | | | | | As the sama5d3 is a family member of sama5, so only check sama5 family. Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: move pmc base address into soc headerBo Shen2014-09-229-2/+12
| | | | | | | | As the PMC base address may be different between each SoC, so move them to SoC header. Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: AT91: Make gpio mux functions inlineSascha Hauer2014-09-091-23/+19
| | | | | | | Otherwise we get a unused function warning each time mach/gpio.h is included. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: mach-at91: move gpio.h to include folderRaphaël Poggi2014-09-031-0/+149
| | | | | | | | This commit add functions from mach-at91/gpio.h in include/mach/gpio.h. This allow to use these functions outside the mach-at91 folder. Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: nand: add has_pmecc memberRaphaël Poggi2014-09-021-0/+1
| | | | | | | By adding this structure member, we can retrieve the pmecc config, through the device tree. Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sama5d3x: fix HSMC MODE register offset and add TIMINGS registerMatteo Fortini2014-07-311-1/+32
| | | | | | | | | As stated in section 29.19.35 of SAMA5D3 Series Datasheet, MODE register has offset 0x10 and at offset 0x0C there is a TIMINGS register. Signed-off-by: Matteo Fortini <matteo.fortini@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: remove address of the Free Software FoundationAntony Pavlov2014-06-111-3/+0
| | | | | | | | | | | | | | | | | | The FSF address has changed; The FSF site says that address is Free Software Foundation 51 Franklin Street, Fifth Floor Boston, MA 02110-1301 USA (see http://www.fsf.org/about/contact/) Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: add sama5d36 SoC supportBo Shen2014-03-311-1/+4
| | | | | | | SAMA5D36 SoC is a sub type of SAMA5D3 which has two Ethernets Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mci'Sascha Hauer2013-10-071-0/+1
|\
| * atmel_mci: add devname pdata supportJean-Christophe PLAGNIOL-VILLARD2013-09-181-0/+1
| | | | | | | | | | | | | | so we can specify the devname in the board Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | at91: add irq fixupJean-Christophe PLAGNIOL-VILLARD2013-09-181-0/+35
|/ | | | | | | | | | Some of the irq can still be on after a reset or power on as the IP are powered by the backup power. This could lead to an interrupt dead lock when the kernel boot. So disable them before booting. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: AT91: move iomux definitions to iomux.hSascha Hauer2013-08-162-268/+266
| | | | | | | mach/gpio.h is for the gpio API, so move unrelated stuff away. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>