summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Merge branch 'for-next/misc'Lucas Stach2017-07-311-0/+1
|\
| * ARM: at91: animeo: depend on !CONSOLE_NONELucas Stach2017-07-311-0/+1
| | | | | | | | | | | | The board file configures the consoles, so need console support. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* | arm: at91 bootstrap: declare local function staticSam Ravnborg2017-07-201-1/+1
|/ | | | | | | | Function is only used in this file and no prototype exist in any header. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* at91: Enable PINCTRL for SOC_AT91SAM9Andrey Smirnov2017-03-311-0/+1
| | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* at91sam9x5ek: Convert to use DT clock treeAndrey Smirnov2017-03-314-313/+8
| | | | | | | | | Convert board code to use clock tree form DT as well as converting UART, GPIO and PIT devices to be instantiated from it (to make sure codebase is still bootable). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* at91sam9x5ek: Add preliminary device tree supportAndrey Smirnov2017-03-301-0/+1
| | | | | | | | Add basic code to build and pass board device tree blob to Barebox initialization code. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* at91sam9x5ek: Convert to mult-image buildAndrey Smirnov2017-03-301-17/+23
| | | | | | | | Convert AT91SAM9X5-EK board code to multi-image build process, similar to how majority of i.MX board code is built. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> 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>
* clk: at91: Port at91 DT clock codeAndrey Smirnov2017-03-302-1/+26
| | | | | | | | Port at91 DT clock code from Linux 4.9-rc3. 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>
* clocksource: at91: Move to 'drivers/clocksource'Andrey Smirnov2017-03-093-120/+2
| | | | | | | | | Move PIT driver code to 'drivers/clocsource' and accomodate it by adjusting Kconfig variables. Rename the file to 'timer-atmel-pit.c' to re-align the driver with code in Linux kernel. 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>
* at91: serial: pullup RX pins, do not pullup TX pinsPeter Rosin2017-02-149-92/+92
| | | | | | | | | | | | | | We have a number of sama5d3 devices that sometimes hangs at the barebox prompt during boot due to floating RX pins. This patch fixes the problem for us (and probably others). It is similar in nature to linux kernel commit 138c2b2f175b ("ARM: dts: at91: fixes dbgu pinctrl, set pullup on rx, clear pullup on tx") While at it, remove pointless waste of power that the pullup of the TX pins causes and fix the signal comments for SAMA5D4. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: at91 bootstrap: Fix menu titleSascha Hauer2017-01-101-1/+2
| | | | | | | It's no longer possible to assign a string to menu->display, instead menu_add_title() must be called. Fix this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Make generic default environment type a use choiceSascha Hauer2016-10-101-3/+0
| | | | | | | | So far it was hardcoded for each board if defenv-1 or defenv-2 is used. Make this a user choice so that a particular board no longer enforces a defenv type. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* stdio: rename getc to getcharSascha Hauer2016-04-151-8/+8
| | | | | | | The function we have implemented as getc has the semantics of the standard function getchar, so rename it accorgingly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* driver: replace dev_request_mem_region with dev_request_mem_resourceSascha Hauer2016-03-071-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dev_request_mem_region doesn't work properly one some SoCs on which PTR_ERR() values clash with valid return values from dev_request_mem_region. Replace them with dev_request_mem_resource where possible. This patch has been generated with the following semantic patch: // <smpl> @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) { ... - return PTR_ERR(io); -} + return PTR_ERR(iores); +} +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) - return PTR_ERR(io); -} + return PTR_ERR(iores); +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { - ret = PTR_ERR(io); +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) { + ret = PTR_ERR(iores); ... } +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) + return PTR_ERR(iores); +io = IOMEM(iores->start); ...+> } @@ identifier func; @@ func(...) { <+... struct resource *iores; -struct resource *iores; ...+> } // </smpl> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootstrap: Boot barebox with kernel calling conventionTrent Piepho2015-12-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | In commit 8e3ddc13eb8239177ed20f119e3a3d02518b941d the bootm code was changed to boot barebox using the same calling convention as the kernel. Which on ARM is to pass three arguments which are zero, an architecture code, and a params pointer. A 2nd stage barebox can be booted using lib/bootstrap, which is different code from bootm. This code just leaves garbage in the first three parameters and so doesn't follow the convention. Change it to be compatible with the ARM kernel booting convention. This just sends a zero for the architecture, since the code for architectures depends on boot[zmu] and something using bootstrap wouldn't have those too. And it just passes NULL for the params since we don't have a way to pass a device tree from the preloader. All users of bootstrap are ARM based, but the code is in lib so a non-ARM board might someday make use of it. If the current code would work for them, then the change here will be ok too. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.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>
* Merge branch 'for-next/restart'Sascha Hauer2015-09-015-8/+26
|\
| * restart: replace reset_cpu with registered restart handlersSascha Hauer2015-08-275-8/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces the reset_cpu() function which every SoC or board must provide with registered handlers. This makes it possible to have multiple reset functions for boards which have multiple ways to reset the machine. Also boards which have no way at all to reset the machine no longer have to provide a dummy reset_cpu() function. The problem this solves is that some machines have external PMICs or similar to reset the system which have to be preferred over the internal SoC reset, because the PMIC can reset not only the SoC but also the external devices. To pick the right way to reset a machine each handler has a priority. The default priority is 100 and all currently existing restart handlers are registered with this priority. of_get_restart_priority() allows to retrieve the priority from the device tree which makes it possible for boards to give certain restart handlers a higher priority in order to use this one instead of the default one. 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: sama5d4_xplained: switch to env2Bo Shen2015-03-121-0/+1
| | | | | | | Switch sama5d4 xplained board to use default environment 2. Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/at91'Sascha Hauer2015-03-062-0/+24
|\
| * ARM: atmel: at91sam9n12: add subtype supportBo Shen2015-02-112-0/+24
| | | | | | | | | | | | | | | | 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>
* | SAMA5D4EK - Now uses the new environment.Doug Brainard2015-02-241-0/+1
|/ | | | | | | | | This patch switches the SAMA5D4EK development board to the newer environment method. This patch depends on "mtd partition handling updates" patch series from Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Doug Brainard <dbrainard@brainardinsight.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add support for the haba-knx-lite controllerGregory Hermant2015-01-161-0/+5
| | | | | Signed-off-by: Gregory Hermant <gregory.hermant@calao-systems.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2015-01-0919-19/+19
|\
| * sizes.h: move include/sizes.h to include/linux/sizes.hMasahiro Yamada2015-01-0819-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | driver: workaroud resource request that conflicts with errno PTRJean-Christophe PLAGNIOL-VILLARD2015-01-081-3/+3
|/ | | | | | | | | | | | | | | | broken since commit ed6e965824303255cacc1c1a195d3684caa26bce Author: Sascha Hauer <s.hauer@pengutronix.de> resource: Let dev_request_mem_region return an error pointer Introduce dev_request_mem_region_err_null only used on platform like at91 where the resource address conflicts with errno PTR. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/randconfig-1'Sascha Hauer2014-12-081-8/+7
|\
| * ARM: AT91: Always provide clk_set_rate stubSascha Hauer2014-11-281-8/+7
| | | | | | | | | | | | | | Some drivers need clk_set_rate. To be able to link with these drivers enabled provide a clk_set_rate stub. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | treewide: Reuse init_clock() return value for clocksource driversAlexander Shiyan2014-11-102-6/+2
|/ | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2014-11-051-0/+5
|\
| * ARM: atmel: add sama5d4 xplained ultra board supportBo Shen2014-11-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | The sama5d4 xplained ultra board support following features: - NAND flash support - SPI flash support - MMC card support (MCI1) - LCD display support (with QT1070) - Ethernet support Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | arm: at91: remove unused variableLucas Stach2014-10-211-4/+0
|/ | | | | | Signed-off-by: Lucas Stach <dev@lynxeye.de> Acked-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/resource-err-ptr'Sascha Hauer2014-10-022-2/+5
|\
| * resource: Let dev_request_mem_region return an error pointerSascha Hauer2014-09-162-2/+5
| | | | | | | | | | | | For all users fix or add the error check. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: at91: add sama5d4ek board supportBo Shen2014-09-242-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | Add Atmel sama5d4ek board support, which include following features: - NAND flash support - SPI flash support - MMC card support (MCI1) - LCD display support (with QT1070) - Ethernet support Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: at91: add sama5d4 soc support #2Bo Shen2014-09-243-0/+933
| | | | | | | | | | 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-248-21/+142
| | | | | | | | | | Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: at91: clock: use cpu_has_pcr for pcr1 checkingBo Shen2014-09-221-7/+9
| | | | | | | | | | 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-223-3/+3
| | | | | | | | | | | | | | | | 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>
* | mach-at91: declare device tree clockRaphaël Poggi2014-09-101-5/+8
|/ | | | | | | This commit use the clkdev_add_physbase function, to declare device tree and non device tree gpio clocks. Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: AT91: Make gpio mux functions inlineSascha Hauer2014-09-092-24/+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: AT91: Add missing includeSascha Hauer2014-09-091-0/+1
| | | | | | | the gpio mux functions were moved to mach/gpio.h. Add the missing include. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* pinctrl: at91: add pinctrl driverRaphaël Poggi2014-09-042-671/+1
| | | | | | | | | This driver is based on mach-at91/gpio.c and linux pinctrl driver. The driver contains the gpio and pinctrl parts (like in linux) because the two parts share some structures and logics. Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: mach-at91: move gpio.h to include folderRaphaël Poggi2014-09-033-149/+150
| | | | | | | | 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>