summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-04-05clocksource: atmel-st: select MFD_SYSCONAlexandre Belloni
Enforce MFD_SYSCON selection as the driver needs it. Else, it will still compile with some warning about X1, x2 or sr being used uninitialized. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-16ARM: at91: remove useless includeAlexandre Belloni
Both drivers using the system timer are now converted to an MFD. mach/at91_st.h is now useless. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-16clocksource: atmel-st: remove mach/hardware dependencyAlexandre Belloni
Remove the mach/hardware dependency to prepare the driver for multiplatform support. Also switch from setup_irq() to request_irq() Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-16clocksource: atmel-st: use syscon/regmapAlexandre Belloni
The register range from the system timer is also used by the watchdog driver. Use a regmap to handle concurrent accesses. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-16ARM: at91: time: move the system timer driver to drivers/clocksourceAlexandre Belloni
Import at91rm9200_time.c from mach-at91 as timer-atmel-st.c. Further cleanup is required to get rid of the mach-at91 headers. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-16ARM: at91: properly initialize timerAlexandre Belloni
Use clocksource_of_init to initialize the system timer instead of relying on a custom function. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-16ARM: at91: at91rm9200: remove deprecated arm_pm_restartAlexandre Belloni
Now that a proper driver is available, remove at91rm9200_restart. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-16watchdog: at91rm9200: implement restart handlerAlexandre Belloni
Restarting the at91rm9200 is done through programming the watchdog and waiting for it to reset. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-16watchdog: at91rm9200: use the system timer sysconAlexandre Belloni
Use a syscon regmap to access the system timer registers. Also, rename the driver atmel_st_watchdog to stop conflicting with at91sam9_wdt.c Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-16mfd: syscon: Add atmel system timer registers definitionAlexandre Belloni
AT91RM920 has a memory range reserved for timer and watchdog configuration. Expose those registers so that drivers can make use of the system timer syscon declared in at91 DTs. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-16ARM: at91/dt: declare atmel,at91rm9200-st as a sysconAlexandre Belloni
The system timer register range is used to handle three different functionalities: Periodic Interval Timer, Real Time Timer and watchdog. Declare it as a syscon to be able to get a regmap. Also declare it as a simple-mfd and its watchdog subnode. Finally, document the watchdog compatible string. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91: remove old setupAlexandre Belloni
The old setup is not used anymore, remove it Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91: sama5d4: remove useless map_ioAlexandre Belloni
All the peripheral remapped at io_map are taken care of by their respective drivers. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91: sama5 use SoC detection infrastructureAlexandre Belloni
Use the soc detection infrastructure for sama5 initialization. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91: at91sam9: use SoC detection infrastructureAlexandre Belloni
Use the soc detection infrastructure for at91sam9 initialization. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91: at91rm9200 use SoC detection infrastructureAlexandre Belloni
Use the soc detection infrastructure for at91rm9200 initialization. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91: add soc detection infrastructureBoris BREZILLON
Add new structures and functions to handle AT91 SoC detection. [alexandre.belloni@free-electrons.com: reworked DBGU detection] Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91/dt: introduce atmel,<chip>-dbguAlexandre Belloni
The DBGU is not a simple UART and we need to be able to distinguish it from the other UARTs, in particular to get its address and check the chip id. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91: remove unused _matrix.h headersAlexandre Belloni
The matrix headers are not used anymore, remove them. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91: remove unused at91_ioremap_matrix and headerAlexandre Belloni
at91_ioremap_matrix and the at91_matrix.h header are not used anymore, remove them. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91: remove NEED_MACH_IO_HArnd Bergmann
The mach/io.h header on at91 is used to support a nonstandard I/O space window for the cf card driver. This changes the driver to use pci_ioremap_io in order to have the standard location, and then removes the custom mach/io.h. [alexandre.belloni@free-electrons.com: Added PCI dependency] Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91/pm: flush data cache and clean, invalidate and disable the L2 cacheWenyou Yang
Flush data cache, and clean, invalidate and disable the L2 cache before going to suspend. Restore the L2 cache configuration and re-enable the L2 cache after waking up. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Tested-by: Sylvain Rochet <sylvain.rochet@finsecur.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91/pm_suspend: add the WFI instruction support for ARMv7Wenyou Yang
Add the WFI instruction to make the cpu to the idle state. In the meanwhile, disable the processor's clock. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Tested-by: Sylvain Rochet <sylvain.rochet@finsecur.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91/pm: remove unused void (*at91_pm_standby)(void)Wenyou Yang
Because the standby mode use the same sram function as the suspend to memory mode, void (*at91_pm_standby)(void) doesn't need, remove it. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Tested-by: Sylvain Rochet <sylvain.rochet@finsecur.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91/pm: rename function name: at91_slow_clock() --> ↵Wenyou Yang
at91_pm_suspend_sram_fn() As the file name is renamed, rename the function name at91_slow_clock() --> at91_pm_suspend_sram_fn(), rename the function handler's name at the same time. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Tested-by: Sylvain Rochet <sylvain.rochet@finsecur.com> [nicolas.ferre@atmel.com: little update of the commit message] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91/pm: rename file name: pm_slowclock.S --> pm_suspend.SWenyou Yang
Because the sram function is used for both suspend to memory and the suspend to standby mode, renaming is more elegant. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Tested-by: Sylvain Rochet <sylvain.rochet@finsecur.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91/pm: standby mode uses same sram function as suspend to memory modeWenyou Yang
To simply the PM code, the suspend to standby mode uses same sram function as the suspend to memory mode, running in the internal SRAM, instead of the respective code for each mode. For the suspend to standby mode, the master clock doesn't switch to the slow clock, and PLLA and the main oscillator doesn't turn off as well. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Tested-by: Sylvain Rochet <sylvain.rochet@finsecur.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91/pm: move the copying the sram function to the sram initialization ↵Wenyou Yang
phase To decrease the suspend time, move copying the sram function to the sram initialization phase, instead of every time go to suspend. In the meanwhile, substitute fncpy() for memcpy(). If there is no sram allocated for PM, the PM is not supported. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Tested-by: Sylvain Rochet <sylvain.rochet@finsecur.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91/pm_slowclock: create the procedure to handle the sdram self-refreshWenyou Yang
To decrease the duplicated code, create the procedure to contain both activing and exiting the sdram self-refresh mode. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Tested-by: Sylvain Rochet <sylvain.rochet@finsecur.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91/pm_slowclock: remove clocks which are already stopped when ↵Sylvain Rochet
entering slow clock mode Assume USB PLL and PLL B are already stopped before entering sleep mode. Removed PLL B from slow clock code, all drivers are supposed to properly unprepare clocks. Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com> Acked-by: Wenyou.Yang <wenyou.yang@atmel.com> [nicolas.ferre@atmel.com: remove the warning printed in pm.c] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91/pm: remove CONFIG_AT91_SLOW_CLOCK config optionWenyou Yang
The slow clock always exists, selecting CONFIG_AT91_SLOW_CLOCK config is unnecessary for the suspend to memory mode. For this mode the master clock should always switch to the slow clock. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Tested-by: Sylvain Rochet <sylvain.rochet@finsecur.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91: move "select SRAM" under SOC_AT91SAM9 and SOC_SAMA5Wenyou Yang
To simply the PM config the CONFIG_AT91_SLOW_CLOCK option will be removed, so move "select SRAM" from under AT91_SLOW_CLOCK, add "select SRAM if PM" under SOC_AT91SAM9 and SOC_SAMA5 Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Tested-by: Sylvain Rochet <sylvain.rochet@finsecur.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-13ARM: at91/pm_slowclock: remove the unused code related with ↵Wenyou Yang
SLOWDOWN_MASTER_CLOCK The SLOWDOWN_MASTER_CLOCK definition is not used, remove the redundant code. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Tested-by: Sylvain Rochet <sylvain.rochet@finsecur.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-12ARM: at91: pm: change at91_pm_set_standby() to staticWenyou Yang
Since at91_pm_set_standby() will not be used out of the pm.c file, change its attribute from extern to static, remove its declaration as well. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-12ARM: at91: remove ksz8081 phy fixup registration for sama5d4ek boardBoris Brezillon
Commit 2b0ba96cea60 ("net: phy: micrel: disable NAND-tree for KSZ8021, KSZ8031, KSZ8051, KSZ8081") automated the NAND-tree mode deactivation process, thus making this phy fixup useless. Remove it along with the associated headers inclusion. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> [nicolas.ferre@atmel.com: remove selection of PHYLIB in at91 Kconfig] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-12Merge tag 'at91-fixes3' into at91-4.1-cleanupNicolas Ferre
Third fixes batch for AT91 on 4.0: - clock fixes for USB - compatible string changes for handling USB IP differences (+ needed AHB matrix syscon) - fix of a compilation error in PM code
2015-03-12Merge tag 'at91-fixes2' into at91-4.1-cleanupNicolas Ferre
Second fixes batch for AT91 on 4.0: - little fix for !MMU debug: may also help for randconfig - fix of 2 errors in LCD clock definitions - in PM code, not writing the key leads to not execute the action
2015-03-12Merge tag 'at91-fixes' into at91-4.1-cleanupNicolas Ferre
First fixes batch for AT91 on 4.0: - PM slowclock fixes for DDR and timeouts - fix some DT entries - little defconfig updates - the removal of a harmful watchdog option + its detailed documentation
2015-03-11ARM: at91: pm_slowclock: fix the compilation errorWenyou Yang
When compiling the kernel in thumb2 (CONFIG_THUMB2_KERNEL option activated), we hit a compilation crash. The error message is listed below: ---8< ----- Error: cannot use register index with PC-relative addressing -- `str r0,.saved_lpr' --->8---- Add the .arm directive in the assembly files related to power management. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-11ARM: at91/dt: fix USB high-speed clock to select UTMINicolas Ferre
The UTMI clock must be selected by any high-speed USB IP. The logic behind it needs this particular clock. So, correct the clock in the device tree files affected. Reported-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: <stable@vger.kernel.org> #3.18
2015-03-11ARM: at91/dt: fix at91 udc compatible stringsBoris Brezillon
The at91rm9200, at91sam9260, at91sam9261 and at91sam9263 SoCs have slightly different UDC IPs. Those differences were previously handled with cpu_is_at91xx macro which are about to be dropped for multi-platform support, thus we need to change compatible strings. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-11ARM: at91/dt: declare matrix node as a syscon deviceBoris Brezillon
There is no specific driver handling the AHB matrix, this is a simple syscon device. the matrix is needed by several other drivers including the USB on some SoCs (at91sam9261 for instance). Without this definition, the USB will not work on these SoCs. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-09ARM: at91/dt: at91sam9261: fix clocks and clock-names in udc definitionBoris Brezillon
Peripheral clock is named pclk and system clock is named hclk (those are the names expected by the at91_udc driver). Drop the deprecated usb_clk (formerly used to configure the usb clock rate which is now directly configurable through hclk). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-05ARM: at91/pm: MOR register KEY was missingPatrice Vilchez
Because writing the MOR register requires the PASSWD(0x37), if missed, the write operation will be aborted. Signed-off-by: Patrice Vilchez <patrice.vilchez@atmel.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-05ARM: at91/dt: sama5d4: fix lcdck clock definitionBoris BREZILLON
lcdck takes mck (not smd) as its parent. It is also assigned id 3 and not 4. Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com> [nicolas.ferre@atmel.com: squashed 2 related patches] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-05ARM: at91/dt: sama5d4: rename lcd_clk into lcdc_clkBoris BREZILLON
Rename lcd_clk into lcdc_clk to be consistent with sama5d3 clock definitions. Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-05ARM: at91: debug: fix non MMU debugAlexandre Belloni
Linux may be used without MMU on atmel SoCs, fix debug in this configuration. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-04ARM: at91/dt: keep watchdog running in idle modeMichel Marti
Since turning on idle-halt in commit fe46aa679f12 (ARM: at91/dt: add sam9 watchdog default options to SoCs), SoCs compatible with at91sam9260-wdt no longer reboot if the watchdog times out while the CPU is in idle state. Removing the 'idle-halt' flag that was set by default fixes this. Signed-off-by: Michel Marti <mma@objectxp.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Sylvain Rochet <sylvain.rochet@finsecur.com> [nicolas.ferre@atmel.com: rework the commit message] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-04dts: Documentation: AT91 Watchdog, explain what atmel,idle-halt property ↵Sylvain Rochet
really do atmel,idle-halt property should be used with care, it actually makes the watchdog not counting when the CPU is in idle state, therefore the watchdog reset time depends on mean CPU usage and will not reset at all of the CPU stop working while it is in idle state, which is probably not what you want. Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-04ARM: at91/defconfig: add at91rm9200 ethernet supportAlexandre Belloni
There is now only one defconfig for the at91rm9200 and at91sam9. Add ethernet support for the at91rm9200. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>