Commit graph

1135 commits

Author SHA1 Message Date
Alexandre Belloni d18032d62f ARM: at91: at91sam9: use SoC detection infrastructure
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-13 15:11:05 +01:00
Alexandre Belloni 7735f03822 ARM: at91: at91rm9200 use SoC detection infrastructure
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-13 15:11:04 +01:00
Boris BREZILLON ea4abe7f3a ARM: at91: add soc detection infrastructure
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-13 15:11:04 +01:00
Alexandre Belloni b7e9def923 ARM: at91: remove unused _matrix.h headers
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-13 15:11:04 +01:00
Alexandre Belloni 0d3441928b ARM: at91: remove unused at91_ioremap_matrix and header
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-13 15:11:04 +01:00
Arnd Bergmann 1be27c62d6 ARM: at91: remove NEED_MACH_IO_H
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-13 15:11:04 +01:00
Wenyou Yang 385acc0dac ARM: at91/pm: flush data cache and clean, invalidate and disable the L2 cache
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-13 13:34:55 +01:00
Wenyou Yang 20567658b8 ARM: at91/pm_suspend: add the WFI instruction support for ARMv7
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-13 13:34:55 +01:00
Wenyou Yang e32d995cf9 ARM: at91/pm: remove unused void (*at91_pm_standby)(void)
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-13 13:34:55 +01:00
Wenyou Yang 5726a8b968 ARM: at91/pm: rename function name: at91_slow_clock() --> 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-13 13:34:54 +01:00
Wenyou Yang 828b98fa38 ARM: at91/pm: rename file name: pm_slowclock.S --> pm_suspend.S
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-13 13:34:54 +01:00
Wenyou Yang 23be4be5a6 ARM: at91/pm: standby mode uses same sram function as suspend to memory mode
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-13 13:34:53 +01:00
Wenyou Yang d94e688cae ARM: at91/pm: move the copying the sram function to the sram initialization 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-13 13:34:22 +01:00
Wenyou Yang 0ab285c2fa ARM: at91/pm_slowclock: create the procedure to handle the sdram self-refresh
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-13 11:12:07 +01:00
Sylvain Rochet d18c570ef3 ARM: at91/pm_slowclock: remove clocks which are already stopped when 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-13 11:12:06 +01:00
Wenyou Yang 09fc78a601 ARM: at91/pm: remove CONFIG_AT91_SLOW_CLOCK config option
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-13 11:12:06 +01:00
Wenyou Yang 896bc871a4 ARM: at91: move "select SRAM" under SOC_AT91SAM9 and SOC_SAMA5
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-13 11:12:05 +01:00
Wenyou Yang 05d5970c72 ARM: at91/pm_slowclock: remove the unused code related with 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-13 11:11:57 +01:00
Wenyou Yang 047794e136 ARM: at91: pm: change at91_pm_set_standby() to static
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-12 15:30:38 +01:00
Boris Brezillon 936748fd34 ARM: at91: remove ksz8081 phy fixup registration for sama5d4ek board
Commit 2b0ba96cea ("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-12 15:30:32 +01:00
Wenyou Yang e7b848d731 ARM: at91: pm_slowclock: fix the compilation error
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-11 15:49:47 +01:00
Patrice Vilchez 5957457a2d ARM: at91/pm: MOR register KEY was missing
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-05 11:43:02 +01:00
Alexandre Belloni 4a031f7dbe ARM: at91: pm: fix SRAM allocation
On some platforms, there are multiple SRAM nodes defined in the device tree but
some of them are disabled, leading to allocation failure. Try to find the first
enabled SRAM node and allocate from it.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Tested-by: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-03 20:07:13 +01:00
Alexandre Belloni 84e871660b ARM: at91: pm: fix at91rm9200 standby
at91rm9200 standby and suspend to ram has been broken since
00482a4078. It is wrongly using AT91_BASE_SYS which is a physical address
and actually doesn't correspond to any register on at91rm9200.

Use the correct at91_ramc_base[0] instead.

Fixes: 00482a4078 (ARM: at91: implement the standby function for pm/cpuidle)

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-03 20:07:13 +01:00
Peter Rosin 02f513a097 pm: at91: Workaround DDRSDRC self-refresh bug with LPDDR1 memories.
The DDRSDR controller fails miserably to put LPDDR1 memories in
self-refresh. Force the controller to think it has DDR2 memories
during the self-refresh period, as the DDR2 self-refresh spec is
equivalent to LPDDR1, and is correctly implemented in the
controller.

Assume that the second controller has the same fault, but that is
untested.

Signed-off-by: Peter Rosin <peda@axentia.se>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-03 19:43:59 +01:00
Sylvain Rochet ad4a38d218 pm: at91: pm_slowclock: fix suspend/resume hang up in timeouts
Removed timeout on XTAL, PLL lock and Master Clock Ready, hang if
something went wrong instead of continuing in unknown condition. There
is not much we can do if a PLL lock never ends, we are running in SRAM
and we will not be able to connect back the sdram or ddram in order to
be able to fire up a message or just panic.

As a bonus, not decounting the timeout register in slow clock mode
reduce cumulated suspend time and resume time from ~17ms to ~15ms.

Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
Acked-by: Wenyou.Yang <wenyou.yang@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-03-03 19:43:59 +01:00
Uwe Kleine-König 444d2d33d8 ARM: make of_device_ids const
of_device_ids (i.e. compatible strings and the respective data) are not
supposed to change at runtime. All functions working with of_device_ids
provided by <linux/of.h> work with const of_device_ids. So mark the
non-const structs in arch/arm as const, too.

While at it also add some __initconst annotations.

Acked-by: Jason Cooper <jason@lakedameon.net>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2015-02-19 09:44:25 +01:00
Paul Bolle d88d6cfc91 ARM: mm: Remove Kconfig symbol CACHE_PL310
Commit 20e783e39e ("ARM: 8296/1: cache-l2x0: clean up aurora cache
handling") removed the only user of the Kconfig symbol CACHE_PL310.
Setting CACHE_PL310 is now pointless. Remove its Kconfig entry, and one
select of this symbol.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2015-02-18 12:24:29 +01:00
Arnd Bergmann a91c5824dd ARM: at91: fix pm declarations
In a recent rearrangement of the at91 pm initialization code, a broken
set of declarations was added for the !CONFIG_PM-case, leading to
this link error:

arch/arm/mach-at91/board-dt-sama5.o: In function `at91_rm9200_pm_init':
arch/arm/mach-at91/generic.h:40: multiple definition of `at91_rm9200_pm_init'
arch/arm/mach-at91/setup.o:arch/arm/mach-at91/generic.h:40: first defined here
arch/arm/mach-at91/board-dt-sama5.o: In function `at91_sam9260_pm_init':
arch/arm/mach-at91/generic.h:41: multiple definition of `at91_sam9260_pm_init'
arch/arm/mach-at91/setup.o:arch/arm/mach-at91/generic.h:41: first defined here
arch/arm/mach-at91/board-dt-sama5.o: In function `at91_sam9g45_pm_init':
arch/arm/mach-at91/generic.h:42: multiple definition of `at91_sam9g45_pm_init'
arch/arm/mach-at91/setup.o:arch/arm/mach-at91/generic.h:42: first defined here

This adds the missing 'static inline' to the declarations to avoid
creating a copy of the functions in each file that includes the
header.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 4db0ba22da ("ARM: at91: pm: prepare for multiplatform")
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-02-18 12:20:26 +01:00
Nicolas Ferre ad3fc3e316 ARM: at91/trivial: unify functions and machine names
Remove the string "(Device Tree)" after the machine name because all AT91
machines use the DT nowadays.
Also change some function names to unify following the convention:
- at91sam9xxx aren't named sam9, 9xxx but with the full name
- sama5 are the ones that don't have the at91 prefix anymore.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-02-02 11:01:29 +01:00
Alexandre Belloni 827de1f123 ARM: at91: remove at91_dt_initialize and machine init_early()
Move the ramc initialization to pm.c as it is the only user left.
This allows us to get rid of at91_dt_initialize() that was the only one called
by the init_early() function pointer of struct machine_desc.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
[nicolas.ferre@atmel.com: adapt patch to newer series]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-02-02 11:01:29 +01:00
Nicolas Ferre cac0172389 ARM: at91: change board files into SoC files
As board files are now DT only and can address all aspects of the SoC family,
we can rename them so that the mach-at91 directory looks cleaner.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-02-02 11:01:28 +01:00
Alexandre Belloni edd942247f ARM: at91: remove at91_boot_soc
at91_boot_soc and at91_init_soc structures are not used by any SoC, remove
their use. Also remove all the now empty SoC files.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
[nicolas.ferre@atmel.com: different organization of the patches]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-02-02 11:01:28 +01:00
Nicolas Ferre 6bd3e3f491 ARM: at91: move alternative initial mapping to board-dt-sama5.c
For sama5d4, remove an indirection and the remaining need for at91_boot_soc
structure.
This will allow further cleanup.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-02-02 11:01:27 +01:00
Alexandre Belloni 2b019a43cc ARM: at91: merge all SOC_AT91SAM9xxx
Only use SOC_AT91SAM9 for all the at91sam9 SoCs. It removes all the empty
at91sam9xxx.c SoC files. It also removes the useless at91_init_soc affectation
procedure and its "init" function pointer.
Only the SoC detection and display are kept for the at91sam9:
at91_soc_is_enabled() and at91_boot_soc.map_io() function calls are also
removed.

It enables HAVE_AT91_SMD and HAVE_AT91_UTMI for all the sam9 SoCs but this only
represents 96 bytes of uncompressed kernel code.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
[nicolas.ferre@atmel.com: different organization of the patches]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-02-02 11:01:26 +01:00
Alexandre Belloni 7d7ffd7bae ARM: at91: at91rm9200: set idle and restart from rm9200_dt_device_init()
Setup arm_pm_idle and arm_pm_restart function pointers from
rm9200_dt_device_init() function to simplify the at91rm9200 initialization
process.
This same move is already done for the sam9s.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
[nicolas.ferre@atmel.com: adapt patch to newer series]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-02-02 11:01:26 +01:00
Nicolas Ferre 980657d8cd Third batch of cleanup/soc for 3.20:
- several fixes and adjustments following the last cleanup batch
 - removal of some unused Kconfig options
 - slight PM and pm_idle rework to ease future rework
 - removal of unneeded mach/system_rev.h
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJUxjj9AAoJEAf03oE53VmQGEAH/3nLneCOQeyuq60adx+Lxcdn
 Q9sMMzrw4B6bQnJee7+PQD3/QU7fmF8qNKlMKYAlILFHGNQplASi4uAfRTykUA0j
 RQHpS9n20ODVfX+yePJ/o8h2r1BkT2wUIDXxaZCj2RoPmEz1aiFDNa2pPsUfprRd
 gpbh+ZU43LRowYwH9UHPV55PQ0ZwMq3ry2DOYY5Al1+bKQ8TFvAdDMUu3rGZU7A4
 dMYiQCQ6Fv0EI1NY0IHSf/u/jujlPE2H0TSR38w8lYfIPzBx2tHkLSupuxKh7R1N
 QYibgZXWR0PqHOXMpOHYBqJFj5c3f/aOZ/dO4RJha+S7YHNQnIFzLsm122njgKQ=
 =KgUm
 -----END PGP SIGNATURE-----

Merge tag 'at91-cleanup3' into at91-3.20-soc
2015-02-02 10:59:34 +01:00
Alexandre Belloni 9726b6892b ARM: at91: pm: remove warning to remove SOC_AT91SAM9263 usage
The SOC_AT91SAM9263 is being removed, stop using it.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-26 13:44:19 +01:00
Alexandre Belloni 3129437b31 ARM: at91: remove unused mach/system_rev.h
mach/system_rev.h is not used, remove it.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-26 13:43:36 +01:00
Alexandre Belloni ae57d0c609 ARM: at91: stop using HAVE_AT91_DBGUx
In order to remove SOC_SAM9xxx options, stop using HAVE_AT91_DBGUx.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-26 13:43:35 +01:00
Nicolas Ferre ea69f99849 ARM: at91: fix ordering of SRAM and PM initialization
The PM initialization needs internal SRAM for allocating a gen_pool and
use it to store its PM code. So we need to have of_platform_populate() before
this code.

Suggested-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-26 13:43:35 +01:00
Alexandre Belloni b9f122cc63 ARM: at91: sam9: set arm_pm_idle from sam9_dt_device_init
As all sam9 SoCs are setting arm_pm_idle to at91sam9_idle(), do it from
sam9_dt_device_init().

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
[nicolas.ferre@atmel.com: adapt patch to newer series]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-26 13:43:34 +01:00
Alexandre Belloni 4fe604c8b3 ARM: at91: fix sam9n12 and sam9x5 arm_pm_idle
sam9n12 and sam9x5 don't set arm_pm_idle because of an oversight, fix that.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-26 13:43:34 +01:00
Alexandre Belloni 37e9c4d947 ARM: at91: mark const init data with __initconst instead of __initdata
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with

error: $variablename causes a section type conflict

because a section containing const variables is marked read only and so
cannot contain non-const variables.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
[nicolas.ferre@atmel.com: update the paths after having re-arranged the patches]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-26 13:43:33 +01:00
Nicolas Ferre bf02280e43 ARM: at91: fix PM initialization for newer SoCs
Newer SoCs: at91sam9x5, at91sam9n12, sama5d3 and sama5d4 embed a DDR controller
and have a different PMC status register layout than the at91sam9g45. Create
another at91_sam9x5_pm_init() function to match this compatibility.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-26 13:43:33 +01:00
Alexandre Belloni 29ee506d0d ARM: at91: move at91rm9200_idle() to clk/at91/pmc.c
Move at91rm9200_idle() along with at91sam9_idle() in clk/at91/pmc.c.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Michael Turquette <mturquette@linaro.org>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-16 18:08:42 +01:00
Alexandre Belloni 0be0b8cd49 ARM: at91: remove unused at91_init_sram
SRAM initialization is now done through the mmio-sram driver and
at91_init_sram() is not called anymore, remove it.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-16 18:08:42 +01:00
Alexandre Belloni 84fb0dc7c8 ARM: at91: sama5d4: remove useless call to at91_init_sram
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-16 18:08:41 +01:00
Alexandre Belloni 14efc54a94 ARM: at91: remove useless map_io
Now that the SRAM is initialized by the mmio-sram driver, .map_io is useless.
remove it.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-16 18:08:41 +01:00
Alexandre Belloni 4db0ba22da ARM: at91: pm: prepare for multiplatform
Split at91_pm_init() in three variants that are called by the respective SoCs
.init_machine. This allows to remove the of_machine_is_compatible() calls and
move at91_pm_init() out of arch_initcall() which is required for multiplatform.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-16 18:08:40 +01:00
Alexandre Belloni a63ba41146 ARM: at91: pm: add UDP and UHP checks to newer SoCs
Check UDP and UHP on sam9x5, sam9n12 and the sama5 series.
Check UHP on the sam9g45.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-16 18:07:25 +01:00
Alexandre Belloni d2e4679055 ARM: at91: pm: use the mmio-sram pool to access SRAM
Now that the SRAM is part of a genpool, use it to allocate memory to use for the
slowclock implementation.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-16 18:07:24 +01:00
Alexandre Belloni f5598d346e ARM: at91: pm: rework cpu detection
Store SoC differences in a struct to remove cpu_is_* usage.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-16 18:07:24 +01:00
Alexandre Belloni bd87373229 ARM: at91: remove useless at91rm9200_set_type()
Since all rm9200 board files have been removed, there is no user of
at91rm9200_set_type() left. Remove it

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-15 15:24:06 +01:00
Alexandre Belloni 427accd3c4 ARM: at91: remove useless at91rm9200_dt_initialize()
at91rm9200_dt_initialize() is doing the same as at91_dt_initialize(), use that
one instead.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-15 15:24:06 +01:00
Alexandre Belloni 5f58c97099 ARM: at91: move debug-macro.S into the common space
Move debug-macro.S from include/mach/ to include/debug where all other common
debug macros are.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-15 15:24:06 +01:00
Alexandre Belloni 415c947435 ARM: at91: remove useless at91_sysirq_mask_rtx
The irq fixup from at91_sysirq_mask_rtc and at91_sysirq_mask_rtt is now handled
by aic_common_rtc_irq_fixup and aic_common_rtt_irq_fixup. Remove those useless
functions.
Also remove the now unused mach/at91_rtt.h header.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-15 15:24:05 +01:00
Alexandre Belloni c46317b774 ARM: at91: remove useless config MACH_AT91SAM9_DT
Now that at91sam9 SoCs are only supported through DT, remove
CONFIG_MACH_AT91SAM9_DT and use CONFIG_SOC_AT91SAM9 instead.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-15 15:24:04 +01:00
Alexandre Belloni 30edcdcc05 ARM: at91: remove useless config MACH_AT91RM9200_DT
Now that rm9200 is only supported through DT, remove CONFIG_MACH_AT91RM9200_DT
and use CONFIG_SOC_AT91RM9200 instead.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-15 15:24:04 +01:00
Alexandre Belloni e822aaef0c ARM: at91: remove unused mach/memory.h
CONFIG_NEED_MACH_MEMORY_H is not set by any at91 platform, remove mach/memory.h

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-15 15:24:04 +01:00
Boris Brezillon 0b4d5cdce7 ARM: at91: remove useless header file includes
Since removal of !DT boards, asm/irq.h inclusion is not needed in these product
files.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-15 15:24:03 +01:00
Nicolas Ferre ccf7222412 ARM: at91: remove unneeded header file
These GPIO pin descriptions are now moved with the pinctrl driver. We can
safely remove this useless header file.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-15 15:24:03 +01:00
Wenyou Yang b8659752c3 ARM: at91: board-dt-sama5: add phy_fixup to override NAND_Tree
Appearance: On some SAMA5D4EK boards, after power up, the Eth1 doesn't work.

Reason: The PIOE2 pin is connected to the NAND_Tree# of KSZ8081,
But it outputs LOW during the reset period, which cause the NAND_Tree# enabled.

Add phy_fixup() to disable NAND_Tree by overriding the Operation
Mode Strap Override register(i.e. Register 16h) to clear the NAND_Tree bit.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-12 15:50:23 +01:00
Linus Torvalds 6c9e92476b ARM: SoC cleanups for 3.19
The remaining cleanups for 3.19 are to a large part result of
 devicetree conversion nearing completion on two other platforms
 besides AT91:
 
 * Like AT91, Renesas shmobile is in the process to migrate to DT and
   multiplatform, but using a different approach of doing it one
   SoC at a time. For 3.19, the r8a7791 platform and associated\
   "Koelsch" board are considered complete and we remove the non-DT
   non-multiplatform support for this.
 
 * The ARM Versatile Express has supported DT and multiplatform
   for a long time, but we have still kept the legacy board files
   around, because not all drivers were fully working before. We
   have finally taken the last step to remove the board files.
 
 Other changes in this branch are preparation for the later branches
 or just unrelated to the more interesting changes:
 * The dts files for arm64 get moved into per-vendor directories for
   a clearer structure.
 * Some dead code removal (zynq, exynos, davinci, imx)
 * Using pr_*() macros more consistently instead of printk(KERN_*)
   in some platform code.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAVIdpgGCrR//JCVInAQIr/BAA3UZvPPf5dwy5OkULPTghvWueeL9NWZHr
 8KwNWIIkIzCgr8zUf2HrMRRLtG429WQWHWxNA+TH9HpcHFGo/zJDBPaJ63cb3Rv1
 YLDGJ0zYPXjOsiWUWHm2M5B4hWj0Is5CwYnuozcpLykzQ9QsLMTIv2CAXoJXpH9S
 sAdx/B5e9G7IqzlJRgbvCPNAZleLYUneYoIW5L68MaFIjfKXVrHzY6w0CJFt/UDa
 CVbP0iwVQNnL1Opr3ABAkBkJ7rrFU17jpBWMtrNsyyMCZQADiV5Z4+IBnW0uWSZj
 zn92dycwOSYRmrgOrI2J6r5vFtxWRyWfR5Au5rD02oQTIucGiLmaKMV5gNhoQrEq
 v53IknDZzqv+xbiARGnJKGdJs70AYjrurpNgXXzJt3W4dZ6vssotxhiYEXbpPPDN
 v5QxrOStePY+qBHeMLuQi8VoV9SI+j/YAiaXak4QWmiGHVDzvBfZ2P3wMCbj04Jp
 oxCZ6IGMczYwvqQ8vWXJOueLm+IfM0GcEFwslUwO95rMRMv7JRCXdvfNhL7wLlu8
 f2Hd/Pk/u0bOUQXhZlFKNRFg78t4hgD1hMKHgmpEDTZ8P1XMuIrWoQu0xkSQZsYG
 MiGIqwRd5Ow9OWzWq3DNJ4EjhmvPYv2X/Dcvu7Jv4yq1zZQ8G6OnWkmWWn5ghq6M
 grvB27RnbuE=
 =Apdh
 -----END PGP SIGNATURE-----

Merge tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC cleanups from Arnd Bergmann:
 "The remaining cleanups for 3.19 are to a large part result of
  devicetree conversion nearing completion on two other platforms
  besides AT91:

   - Like AT91, Renesas shmobile is in the process to migrate to DT and
     multiplatform, but using a different approach of doing it one SoC
     at a time.  For 3.19, the r8a7791 platform and associated "Koelsch"
     board are considered complete and we remove the non-DT
     non-multiplatform support for this.

   - The ARM Versatile Express has supported DT and multiplatform for a
     long time, but we have still kept the legacy board files around,
     because not all drivers were fully working before.  We have finally
     taken the last step to remove the board files.

  Other changes in this branch are preparation for the later branches or
  just unrelated to the more interesting changes:

   - The dts files for arm64 get moved into per-vendor directories for a
     clearer structure.

   - Some dead code removal (zynq, exynos, davinci, imx)

   - Using pr_*() macros more consistently instead of printk(KERN_*) in
     some platform code"

* tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (71 commits)
  ARM: zynq: Remove secondary_startup() declaration from header
  ARM: vexpress: Enable regulator framework when MMCI is in use
  ARM: vexpress: Remove non-DT code
  ARM: imx: Remove unneeded .map_io initialization
  ARM: dts: imx6qdl-sabresd: Fix the microphone route
  ARM: imx: refactor mxc_iomux_mode()
  ARM: imx: simplify clk_pllv3_prepare()
  ARM: imx6q: drop unnecessary semicolon
  ARM: imx: clean up machine mxc_arch_reset_init_dt reset init
  ARM: dts: imx6qdl-rex: Remove unneeded 'fsl,mode' property
  ARM: dts: imx6qdl-gw5x: Remove unneeded 'fsl,mode' property
  ARM: dts: imx6qdl-sabresd: Use IMX6QDL_CLK_CKO define
  ARM: at91: remove useless init_time for DT-only SoCs
  ARM: davinci: Remove redundant casts
  ARM: davinci: Use standard logging styles
  ARM: shmobile: r8a7779: Spelling/grammar s/entity/identity/, s/map/mapping/
  ARM: shmobile: sh7372: Spelling/grammar s/entity map/identity mapping/
  ARM: shmobile: sh73a0: Spelling/grammar s/entity map/identity mapping/
  ARM: EXYNOS: Remove unused static iomapping
  ARM: at91: fix build breakage due to legacy board removals
  ...
2014-12-09 14:18:35 -08:00
Linus Torvalds 0563fdc0d9 ARM: SoC cleanup on mach-at91 for 3.19
On Atmel AT91, the conversion to device tree is now considered complete,
 and all machines that were not already converted in 3.18 are assumed to
 be unused and dropped by the maintainer.
 
 All remaining board files that were written in C are dropped, and the
 ancient at91x40 sub-platform (based on an MMU-less ARM7) is removed
 altogether.  Cleaning up the last pieces was great fun, so I took the
 time to do some of the coding myself and removed several hundred code
 lines that ended up unused after the board files were done.
 
 There are still a couple of AT91 specific device drivers that are not
 converted to DT (CF, USB-OTG) and currently not working, and the platform
 itself is not "multiplatform"-enabled, but both issues are going to be
 taken care of in the 3.20 cycle.
 
 This is split out from the other cleanups purely based on the size
 of the branch.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iD8DBQBUhyNX5t5GS2LDRf4RAnjxAKCER7eoLNadu1/93n/a9d1nUz4MoQCcCZUq
 BolxCOi0wr4YTcQtp7rHzWI=
 =ykAB
 -----END PGP SIGNATURE-----

Merge tag 'at91-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC cleanup on mach-at91 from Arnd Bergmann:
 "On Atmel AT91, the conversion to device tree is now considered
  complete, and all machines that were not already converted in 3.18 are
  assumed to be unused and dropped by the maintainer.

  All remaining board files that were written in C are dropped, and the
  ancient at91x40 sub-platform (based on an MMU-less ARM7) is removed
  altogether.  Cleaning up the last pieces was great fun, so I took the
  time to do some of the coding myself and removed several hundred code
  lines that ended up unused after the board files were done.

  There are still a couple of AT91 specific device drivers that are not
  converted to DT (CF, USB-OTG) and currently not working, and the
  platform itself is not "multiplatform"-enabled, but both issues are
  going to be taken care of in the 3.20 cycle.

  This is split out from the other cleanups purely based on the size of
  the branch"

* tag 'at91-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (33 commits)
  ARM: at91: remove unused board.h file
  ARM: at91: remove unneeded header files
  ARM: at91/clocksource: remove !DT PIT initializations
  ARM: at91: at91rm9200 ST initialization is now DT only
  ARM: at91: remove old AT91-specific drivers
  ARM: at91: cleanup initilisation code by removing dead code
  ARM: at91/Kconfig: select board files automatically
  ARM: at91: remove unused IRQ function declarations
  ARM: at91: remove legacy IRQ driver and related code
  ARM: at91: remove old at91-specific clock driver
  ARM: at91: remove clock data in at91sam9n12.c and at91sam9x5.c files
  ARM: at91: remove all !DT related configuration options
  ARM: at91/trivial: update Kconfig comment to mention SAMA5
  ARM: at91: always USE_OF from now on
  ARM: at91/Kconfig: remove ARCH_AT91RM9200 option for drivers
  ARM: at91: switch configuration option to SOC_AT91RM9200
  ARM: at91: remove at91rm9200 legacy board support
  ARM: at91: remove at91rm9200 legacy boards files
  ARM: at91/Kconfig: remove useless fbdev Kconfig options
  ARM: at91: remove at91sam9261/at91sam9g10 legacy board support
  ...
2014-12-09 14:17:12 -08:00
Arnd Bergmann ef1dfa7332 Fifth batch of cleanup/SoC for 3.19:
- removal of now dead code and AT91-specific driver
 - removal of !DT initialization in some core AT91 drivers
 - simplification of Kconfig DT board file selection: now automatic
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJUgJyWAAoJEAf03oE53VmQ/o0IAK56Q3+fTgTi5uT5RwvYpFI+
 U3Zosn6UNe2kxNpJMtsaWM7vCrmMdHb6LPaf4dy66e4tL4sBhYmyXhWU9UTEiwtw
 l3Y5QCVqOpOKtVc/cYOtYtHYkcHyqyVa0qRb3XITvwpUeG0iJxrtcMRYTlDUpKD4
 pJEfRK2CcHUrNXnnOcHkYaj0d5dXlJ2wJeGiAkCI0iuVWh4f44ipOAPI/0vZLO39
 OIFBZRwXmQpWwncLlbVrwScK7ZD8I/qersrH72c3RdIBp0K6tbuNSXkLFL7pZhp0
 pJ1Yh44HLmAklx4G0Ui0h4fWu5wMCrT7YBUXZ3Jv+RTRwW1Sr9pAhZdGxXtAYXo=
 =CEE6
 -----END PGP SIGNATURE-----

Merge tag 'at91-cleanup5' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91 into next/cleanup

Pull "Fifth batch of cleanup/SoC for 3.19" from Nicolas Ferre:

- removal of now dead code and AT91-specific driver
- removal of !DT initialization in some core AT91 drivers
- simplification of Kconfig DT board file selection: now automatic

* tag 'at91-cleanup5' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91:
  ARM: at91: remove unused board.h file
  ARM: at91: remove unneeded header files
  ARM: at91/clocksource: remove !DT PIT initializations
  ARM: at91: at91rm9200 ST initialization is now DT only
  ARM: at91: remove old AT91-specific drivers
  ARM: at91: cleanup initilisation code by removing dead code
  ARM: at91/Kconfig: select board files automatically

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-12-04 19:11:03 +01:00
Arnd Bergmann ba62a8593d ARM: at91: remove unused board.h file
All functions declared in this file are gone.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[nicolas.ferre@atmel.com: re-order patches so modify board-dt-sam9]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-12-03 14:16:07 +01:00
Nicolas Ferre f9aaa1a2ad ARM: at91: remove unneeded header files
These files were left behind with no reason. Remove them.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-12-03 14:16:07 +01:00
Arnd Bergmann 50755f6f03 ARM: at91/clocksource: remove !DT PIT initializations
As AT91 !DT code is now removed, cleanup the PIT clocksource driver.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[nicolas.ferre@atmel.com: split patch]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Boris BREZILLON <boris.brezillon@free-electrons.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
2014-12-03 14:15:52 +01:00
Arnd Bergmann 8117bf17fe ARM: at91: at91rm9200 ST initialization is now DT only
As at91rm9200 is now DT only, there is no need to keep old entry point in this
at91rm9200 System Timer (ST) driver.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[nicolas.ferre@atmel.com: split patch]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-12-02 16:59:07 +01:00
Arnd Bergmann 85c4b31e6e ARM: at91: remove old AT91-specific drivers
GPIO and LED drivers were replaced by generic ones for DT boards. These drivers
were remaining: delete them now. Modifications are also done on the
corresponding header files.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[nicolas.ferre@atmel.com: split patch]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-12-02 16:59:06 +01:00
Arnd Bergmann 865a381223 ARM: at91: cleanup initilisation code by removing dead code
The AT91-specific SoC strucutre "struct at91_init_soc" was filled with specific
!DT initilisation functions. Now that we got rid of the !DT board file
description, remove unneeded functions.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[nicolas.ferre@atmel.com: split patch]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-12-02 16:59:06 +01:00
Arnd Bergmann e093d7cf37 ARM: at91/Kconfig: select board files automatically
An explicit selection option is not needed for board files so now we select the
board from SoC option.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[nicolas.ferre@atmel.com: remove option's comments; split patch]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-12-02 16:58:58 +01:00
Arnd Bergmann 00239d9da3 Fourth batch of cleanup/SoC for 3.19:
- removal of legacy board support for the last SoC having board C files: at91rm9200
 - removal or modification of some Kconfig options
 - switch to USE_OF for all the AT91 SoCs
 - removal of the old AT91-specific clocks and IRQ drivers
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJUeGSXAAoJEAf03oE53VmQYwsIAJ+qWzbN2m/1yY8ua19hItG2
 IZ/0bcqvVyyEeVnraaLaxIaJ/gAwDY6HvkAmP0iP6ehpekbSU3Nb8LezKtj84Bz4
 BU8G1JKiCtxN8x3vwAOs7/e1B43fVaXaGdUjYYD5HVijSjyC8GMlRsKq3BzvK8yf
 gQEkRwoBi6vLhslWGzxgCCzFQqcT65jeHMpkQWYpn04LB0YFKQDimqBUH+7Uke6J
 /Imkivt2ZEaI6RMl9fQT88e4yGfBHYCv+922fV6CEaORDRD06P84d96E70CnupMr
 WxLhmTSy7sJJS0VZ7EcHIR2dyGNtQQODXgn8Ce1j/eRiGZBbHJKC1GH5ZfmOems=
 =rwYS
 -----END PGP SIGNATURE-----

Merge tag 'at91-cleanup4' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91 into next/cleanup

Pull "Fourth batch of cleanup/SoC for 3.19" from Nicolas Ferre:

- removal of legacy board support for the last SoC having board C files: at91rm9200
- removal or modification of some Kconfig options
- switch to USE_OF for all the AT91 SoCs
- removal of the old AT91-specific clocks and IRQ drivers

* tag 'at91-cleanup4' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91:
  ARM: at91: remove unused IRQ function declarations
  ARM: at91: remove legacy IRQ driver and related code
  ARM: at91: remove old at91-specific clock driver
  ARM: at91: remove clock data in at91sam9n12.c and at91sam9x5.c files
  ARM: at91: remove all !DT related configuration options
  ARM: at91/trivial: update Kconfig comment to mention SAMA5
  ARM: at91: always USE_OF from now on
  ARM: at91/Kconfig: remove ARCH_AT91RM9200 option for drivers
  ARM: at91: switch configuration option to SOC_AT91RM9200
  ARM: at91: remove at91rm9200 legacy board support
  ARM: at91: remove at91rm9200 legacy boards files

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-11-28 16:18:18 +01:00
Arnd Bergmann e155aee2b2 Third batch of cleanup/SoC for 3.19:
- fixes following legacy board removal
 - removal of legacy board support for at91sam9263, at91sam9260/at91sam9g20
   and at91sam9261/at91sam9g10 SoCs families. Please use DT now.
 - removal of some now useless Kconfig options
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJUde2JAAoJEAf03oE53VmQHDAH/Rx0Rym/iptsgtbYntLHa+x0
 isqP6LJFl8fxrAZLjNa5CerHNEgczvMzU/c9C9hSK5w9GA8zA586siNPxgPTGAVd
 ZAoWwBduZOPz2m0bdwtyPbJR/RO4/PYXqAFCUuWNmYyb0WSychiH7KT9iltJFjDw
 gHM3/W/jCxveAkGAY8BVC31HzL7Xxm3cU6wGGfuGbdt2HVvPKIH13TCTHpFtdaoI
 myNzQhQGIw9/ct4nirItYCeASXFJ2iP337hfKw/Hb72TD1JaqD0TnbD+KY31fB6L
 O30yJePtreN5yrWXFc6v7jS9gwbdw5maMUgDoG1ltT3a5jBSF3x6ia7S8v4+Gds=
 =MEDe
 -----END PGP SIGNATURE-----

Merge tag 'at91-cleanup3' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91 into next/cleanup

Pull "Third batch of cleanup/SoC for 3.19" from Nicolas Ferre:

- fixes following legacy board removal
- removal of legacy board support for at91sam9263, at91sam9260/at91sam9g20
  and at91sam9261/at91sam9g10 SoCs families. Please use DT now.
- removal of some now useless Kconfig options

* tag 'at91-cleanup3' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91:
  ARM: at91/Kconfig: remove useless fbdev Kconfig options
  ARM: at91: remove at91sam9261/at91sam9g10 legacy board support
  ARM: at91/Kconfig: remove unused config options
  ARM: at91: remove at91sam9260/at91sam9g20 legacy board support
  ARM: at91: remove at91sam9260/at91sam9g20 legacy boards files
  ARM: at91: remove at91sam9263 legacy board support
  ARM: at91/at91sam9g45: remove useless header file

Conflicts:
	arch/arm/mach-at91/at91sam9g45.c

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-11-28 16:15:14 +01:00
Nicolas Ferre 4a109c50d1 ARM: at91: remove unused IRQ function declarations
Since 3b26f39b0a (ARM: at91: make use of the new AIC driver for dt enabled
boards) the old IRQ initialisation functions aren't used anymore: remove their
declaration in generic.h.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
2014-11-27 16:33:06 +01:00
Nicolas Ferre 1ccdde057b ARM: at91: remove legacy IRQ driver and related code
Remove irc.c and associated header file. The related code was idendified by
the CONFIG_OLD_IRQ_AT91 option that was removed previously. It has been spotted
by following coccinelle semantic match:

@rule1@
expression E;
statement S;
@@
(
- if (IS_ENABLED(CONFIG_OLD_IRQ_AT91)) S
|
- if (IS_ENABLED(CONFIG_OLD_IRQ_AT91) && E) S
)

Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
2014-11-27 16:18:00 +01:00
Nicolas Ferre ff78a189b0 ARM: at91: remove old at91-specific clock driver
This clock driver collection was specific to AT91 and only used in !DT cases.
All clocks and the clock trees for all Atmel SoCs are now described by drivers
using the common clock framework.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
2014-11-26 18:43:44 +01:00
Nicolas Ferre b31706a281 ARM: at91: remove clock data in at91sam9n12.c and at91sam9x5.c files
As the CONFIG_OLD_CLK_AT91 option is gone, let's completely remove the AT91
old clock driver related data.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
2014-11-26 18:43:44 +01:00
Nicolas Ferre ef7eda2cfe ARM: at91: remove all !DT related configuration options
OLD_CLK_AT91 & OLD_IRQ_AT91 were only selected by entries in Kconfig.non_dt
that are now gone. So we remove all this legacy stuff and select the proper
options in the SOC_ entries.

As USE_OF is now selected directly in arch/arm/Kconfig AT91 entry, we can
safely remove it everywhere in this file.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
2014-11-26 17:15:59 +01:00
Nicolas Ferre e152015b27 ARM: at91: switch configuration option to SOC_AT91RM9200
As the ARCH_AT91RM9200 is removed because being !DT, we use
the SOC_AT91RM9200 variant. This option can certainly be removed
once the ST driver is reworked a bit.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
2014-11-21 17:35:15 +01:00
Nicolas Ferre 5341110fc9 ARM: at91: remove at91rm9200 legacy board support
Second part of at91rm9200 legacy !DT removal. This is the core !DT support
removal for this Atmel SoC.
Note that from now on, the Kconfig.non_dt file and its specialized options are
completely removed.
Use the Device Tree for running this board with newer kernels.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
2014-11-21 17:35:15 +01:00
Nicolas Ferre 37a0186fde ARM: at91: remove at91rm9200 legacy boards files
Remove old board files that use at91rm9200 Atmel SoC. The
device tree is mature on this SoCs. It must be used now.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
2014-11-21 17:35:14 +01:00
Nicolas Ferre 2e591e7b3a ARM: at91: remove at91sam9261/at91sam9g10 legacy board support
Remove legacy support for at91sam9261/at91sam9g10 boards.
This include board files removal plus all legacy code for non DT boards
support.
Use the Device Tree for running this board with newer kernels.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-11-21 12:09:27 +01:00
Arnd Bergmann 2c0b50fcba Second batch of cleanup/SoC for 3.19:
- fixes following legacy board removal
 - removal of an unused config option CONFIG_MACH_SAMA5_DT
 - move of some header files out of include/mach directory
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJUZOvPAAoJEAf03oE53VmQlLMH/Aq/q9FYWyiZqq+DHccUuMvt
 IJG2LjTabKb7ihHbsrwaF6kqddISeF4vrBgIoNhNxqfD836MuG5vBpGR1iTXyfqF
 q/s/CI6Zmw3KWxCTUJSE8ix8Y6KA5vdI84D4dLorjlYhmFj0xXrteSooMlJ0t9uJ
 d8o5gOhaL0nQnhdJ950MsSVopsFzjJ0nzxr0PqsVGx6/DJRB+CyKi9e7419B+Vie
 phULLFux3Ai4m7eOHmFxc8vBFwQwSPam2nBiqgFgT1kKDY1igzjwk8PGv1fkLlIk
 llBzCQsuXnnScV2auDF7UOEOZHue+eMPajYd+iZkjy5khkTYbdLyz5eW6gZiRdw=
 =yqzO
 -----END PGP SIGNATURE-----

Merge tag 'at91-cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91 into next/cleanup

Pull "Second batch of cleanup/SoC for 3.19" from Nicolas Ferre:

- fixes following legacy board removal
- removal of an unused config option CONFIG_MACH_SAMA5_DT
- move of some header files out of include/mach directory

* tag 'at91-cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91:
  ARM: at91: move sdramc/ddrsdr header to include/soc/at91
  ARM: at91: remove CONFIG_MACH_SAMA5_DT
  ARM: at91: remove unused CONFIG_ARCH_AT91SAM9G45 option
  ARM: at91: remove useless init_time for DT-only SoCs
  ARM: at91: fix build breakage due to legacy board removals

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-11-20 13:35:36 +01:00
Boris Brezillon 440ae45119 ARM: at91: remove useless init_time for DT-only SoCs
Commits bcf8c7e770 and
4bf7753b8a introduced compilation errors
("error: 'NR_IRQS_LEGACY' undeclared (first use in this function)") because
they remove the asm/irq.h inclusion while the init_time function needs it
for the NR_IRQS_LEGACY definition.

In the other hand, the point of these commits is to remove board file
support, and init_time is only needed when booting non-DT boards, we can
thus safely remove init_time functions.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-11-19 23:23:59 +01:00
Nicolas Ferre b2026f708e ARM: at91: remove at91sam9260/at91sam9g20 legacy board support
Second part of at91sam9260/at91sam9g20 legacy !DT removal. This is the core !DT
support removal for these two Atmel SoCs.
Use the Device Tree for running this board with newer kernels.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-11-19 11:39:22 +01:00
Nicolas Ferre fb3642ebb5 ARM: at91: remove at91sam9260/at91sam9g20 legacy boards files
Remove old board files that use at91sam9260 or at91sam9g20 Atmel SoCs. The
device tree is mature on these SoCs. It must be used now.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-11-19 11:39:22 +01:00
Nicolas Ferre 4403ac46ed ARM: at91: remove at91sam9263 legacy board support
Remove legacy support for at91sam9263 boards.
This include board files removal plus all legacy code for non DT boards
support.
Use the Device Tree for running this board with newer kernels.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-11-19 11:39:11 +01:00
Nicolas Ferre 469b9c3941 ARM: at91/at91sam9g45: remove useless header file
Remove this useless cpu.h header file forgotten during the !DT support removal.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-11-19 10:40:34 +01:00
Alexandre Belloni f0a0a58e6f ARM: at91: move sdramc/ddrsdr header to include/soc/at91
Move the (DDR) SDRAM controller headers to include/soc/at91 to remove the
dependency on mach/ headers from the at91-reset driver.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-11-13 12:03:44 +01:00
Alexandre Belloni 93d2cf468a ARM: at91: remove CONFIG_MACH_SAMA5_DT
CONFIG_MACH_SAMA5_DT is useless as the only way to boot on sama5 based boards is
to use device tree.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[nicolas.ferre@atmel.com: adapt on top of cleanup branch]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-11-13 11:23:33 +01:00
Nicolas Ferre 4386e1fbcd ARM: at91: remove unused CONFIG_ARCH_AT91SAM9G45 option
The CONFIG_ARCH_AT91SAM9G45 config option was removed by ("ARM: at91: remove
at91sam9g45/9m10 legacy board support") so cleanup the use of it.

Reported-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
2014-11-13 11:08:13 +01:00
Alexandre Belloni 19336880bf ARM: at91: remove mach/atmel-mci.h
Use the generic platform_data header file instead of mach/atmel-mci.h

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2014-11-10 12:40:37 +01:00
Boris Brezillon b75d47b477 ARM: at91: remove useless init_time for DT-only SoCs
init_time is only needed when booting non-DT boards, we can thus safely
remove init_time functions.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-11-10 10:38:41 +01:00
Olof Johansson 7d7ef547d3 ARM: at91: fix build breakage due to legacy board removals
Fixes the following missing includes:

arch/arm/mach-at91/at91sam9g45.c: In function 'at91sam9g45_init_time':
arch/arm/mach-at91/at91sam9g45.c:39:23: error: 'NR_IRQS_LEGACY' undeclared (first use in this function)
  at91sam926x_pit_init(NR_IRQS_LEGACY + AT91_ID_SYS);
                       ^
arch/arm/mach-at91/at91sam9g45.c:39:23: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [arch/arm/mach-at91/at91sam9g45.o] Error 1
arch/arm/mach-at91/at91sam9rl.c: In function 'at91sam9rl_init_time':
arch/arm/mach-at91/at91sam9rl.c:51:23: error: 'NR_IRQS_LEGACY' undeclared (first use in this function)
  at91sam926x_pit_init(NR_IRQS_LEGACY + AT91_ID_SYS);

Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-11-10 10:38:00 +01:00
Olof Johansson 6ac8d6859d ARM: at91: fix build breakage due to legacy board removals
Fixes the following missing includes:

arch/arm/mach-at91/at91sam9g45.c: In function 'at91sam9g45_init_time':
arch/arm/mach-at91/at91sam9g45.c:39:23: error: 'NR_IRQS_LEGACY' undeclared (first use in this function)
  at91sam926x_pit_init(NR_IRQS_LEGACY + AT91_ID_SYS);
                       ^
arch/arm/mach-at91/at91sam9g45.c:39:23: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [arch/arm/mach-at91/at91sam9g45.o] Error 1
arch/arm/mach-at91/at91sam9rl.c: In function 'at91sam9rl_init_time':
arch/arm/mach-at91/at91sam9rl.c:51:23: error: 'NR_IRQS_LEGACY' undeclared (first use in this function)
  at91sam926x_pit_init(NR_IRQS_LEGACY + AT91_ID_SYS);

Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-11-08 22:39:51 -08:00
Nicolas Ferre bcf8c7e770 ARM: at91: remove at91sam9rl legacy board support
Remove legacy support for at91sam9rl boards.
This include board files removal plus all legacy code for non DT boards
support.
Use the Device Tree for running this board with newer kernels.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
[nicolas.ferre@atmel.com: Add sentence about DT]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-11-03 18:48:02 +01:00
Nicolas Ferre 4bf7753b8a ARM: at91: remove at91sam9g45/9m10 legacy board support
Remove legacy support for at91sam9g45/9m10 boards.
This include board files removal plus all legacy code for non DT boards
support (i.e. at91sam9g45.c and at91sam9g45_devices.c).
Use the Device Tree for running this board with newer kernels.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
[nicolas.ferre@atmel.com: Add sentence about DT, removed defconfig]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2014-11-03 18:48:01 +01:00
Nicolas Ferre 7538ec7d1e ARM: at91: remove no-MMU at91x40 support
As there is currently no-one to take care of this old !MMU target and as its
support in recent kernels is a bit rotten, remove this at91x40 support and the
board file associated with it (at91eb01).
There are modern ARM !MMU in Mainline now so this target is not interesting for
building tests anymore. It would be better to start from these modern ARM !MMU
platforms to reintroduce at91x40 support if needed.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2014-11-03 18:48:00 +01:00