Commit Graph

28064 Commits

Author SHA1 Message Date
Ming Lei 63c181922f ARM: DMA-mapping: mark all !DMA_TO_DEVICE pages in unmapping as clean
It is common for one sg to include many pages, so mark all these
pages as clean to avoid unnecessary flushing on them in
set_pte_at() or update_mmu_cache().

The patch might improve loading performance of applciation code a bit.

On the below test code to read file(~1GByte size) from usb mass storage
disk to buffer created with mmap(PROT_READ | PROT_EXEC) on
Pandaboard, average ~1% improvement can be observed with the patch on
10 times test.

unsigned int sum = 0;

static unsigned long tv_diff(struct timeval *tv1, struct timeval *tv2)
{
	return (tv2->tv_sec - tv1->tv_sec) * 1000000 +
		(tv2->tv_usec - tv1->tv_usec);
}

int main(int argc, char *argv[])
{
	char *mbuffer;
	int fd;
	int i;
	unsigned long page_size, size;
	struct stat stat;
	struct timeval t1, t2;

	page_size = getpagesize();
	fd = open(argv[1], O_RDONLY);
	assert(fd >= 0);

	fstat(fd, &stat);
	size = stat.st_size;
	printf("%s: file %s, file size %lu, page size %lu\n", argv[0],
		read_filename, size, page_size);

	gettimeofday(&t1, NULL);
	mbuffer = mmap(NULL, size, PROT_READ | PROT_EXEC, MAP_SHARED, fd, 0);
	for (i = 0 ; i < size ; i += page_size)
		sum += mbuffer[i];
	munmap(mbuffer, page_size);
	gettimeofday(&t2, NULL);
	printf("\tread mmaped time: %luus\n", tv_diff(&t1, &t2));

	close(fd);
}

Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2013-06-28 15:14:28 +02:00
Will Deacon 9e4b259d4f ARM: dma-mapping: NULLify dev->archdata.mapping pointer on detach
The current code only clobbers a local variable, so the device is left
with a stale mapping pointer.

Cc: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Acked-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2013-06-28 15:14:27 +02:00
Will Deacon 13987d68bc ARM: dma-mapping: convert DMA direction into IOMMU protection attributes
IOMMU mappings take a prot parameter, identifying the protection bits
to enforce on the newly created mapping (READ or WRITE). The ARM
dma-mapping framework currently just passes 0 as the prot argument,
resulting in faulting mappings.

This patch infers the protection attributes based on the direction of
the DMA transfer.

Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2013-06-28 15:14:27 +02:00
YoungJun Cho 836bfa0d29 ARM: dma-mapping: Get pages if the cpu_addr is out of atomic_pool
In __iommu_get_pages(), the cpu_addr is checked wheather in
atomic_pool range or not. So if the cpu_addr is in atomic_pool
range, it does not need to check twice.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2013-06-28 15:14:27 +02:00
Rafael J. Wysocki e52cff8bdd Merge branch 'pm-assorted'
* pm-assorted:
  PM / QoS: Add pm_qos and dev_pm_qos to events-power.txt
  PM / QoS: Add dev_pm_qos_request tracepoints
  PM / QoS: Add pm_qos_request tracepoints
  PM / QoS: Add pm_qos_update_target/flags tracepoints
  PM / QoS: Update Documentation/power/pm_qos_interface.txt
  PM / Sleep: Print last wakeup source on failed wakeup_count write
  PM / QoS: correct the valid range of pm_qos_class
  PM / wakeup: Adjust messaging for wake events during suspend
  PM / Runtime: Update .runtime_idle() callback documentation
  PM / Runtime: Rework the "runtime idle" helper routine
  PM / Hibernate: print physical addresses consistently with other parts of kernel
2013-06-28 13:01:40 +02:00
Rafael J. Wysocki 405a1086bd Merge branch 'pm-cpufreq'
* pm-cpufreq: (41 commits)
  cpufreq: tegra: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: s3c64xx: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: omap: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: imx6q: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: exynos: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: dbx500: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: davinci: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: arm-big-little: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: powernow-k8: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: pcc: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: e_powersaver: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: ACPI: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: s3c2416: fix forgotten driver_data conversions
  cpufreq: make __cpufreq_notify_transition() static
  cpufreq: Fix minor formatting issues
  cpufreq: Fix governor start/stop race condition
  cpufreq: Simplify userspace governor
  cpufreq: X86_AMD_FREQ_SENSITIVITY: select CPU_FREQ_TABLE
  cpufreq: tegra: create CONFIG_ARM_TEGRA_CPUFREQ
  cpufreq: S3C2416/S3C64XX: select CPU_FREQ_TABLE
  ...
2013-06-28 13:01:34 +02:00
Rafael J. Wysocki 52388492ea Merge branch 'pm-omap'
* pm-omap:
  PM / AVS: SmartReflex: use devm_* API to initialize SmartReflex
  PM / AVS: SmartReflex: use omap_sr * for enable/disable interface
  PM / AVS: SmartReflex: use omap_sr * for minmax interfaces
  PM / AVS: SmartReflex: use omap_sr * for errgen interfaces
  PM / AVS: SmartReflex: fix driver name
  PM / AVS: SmartReflex: disable runtime PM on driver remove
  PM / AVS: SmartReflex: disable errgen before vpbound disable
2013-06-28 13:01:22 +02:00
Geert Uytterhoeven ee89bd6bc7 lib: Move fonts from drivers/video/console/ to lib/fonts/
Several drivers need font support independent of CONFIG_VT, cfr. commit
9cbce8d7e1dae0744ca4f68d62aa7de18196b6f4, "console/font: Refactor font
support code selection logic").
Hence move the fonts and their support logic from drivers/video/console/ to
its own library directory lib/fonts/.
This also allows to limit processing of drivers/video/console/Makefile to
CONFIG_VT=y again.

[Kevin Hilman <khilman@linaro.org>: Update arch/arm/boot/compressed/Makefile]
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-06-28 10:28:22 +02:00
Dmitry Torokhov 31881d74b6 Merge branch 'for-next' of git://github.com/rydberg/linux into next
Pull in changes from Henrik: "a trivial MT documentation fix".
2013-06-27 23:00:25 -07:00
Olof Johansson 8c3d913888 MSM clock updates for 3.11.
Per Stephen Boyd's coverletter:
 
 Resending to collect higher level maintainer acks per Olof's request.
 The plan is to push this patchset through MSM to the arm-soc tree.
 
 This patchset moves the existing MSM clock code and affected drivers
 to the common clock framework. A prerequisite of moving to the common
 clock framework is to use clk_prepare() and clk_enable() so the first
 few patches migrate drivers to that call (clk_prepare() is a no-op on
 MSM right now). It also removes some custom clock APIs that MSM
 provides and finally moves the proc_comm clock code to the common
 struct clk.
 
 This patch series will be used as the foundation of the MSM 8660/8960
 clock code that I plan to send out after this series.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJRyK/7AAoJEOa6n1xeVN+Cu1UQALf7pzve7+JMbpHp9HtQPTCk
 GxGBBZ5ay0yWYYSSDRNqMbxNAHxhTuz26AW1CSSAHNpxotMB9t1y4AGkbSqxl3H8
 gZZ+9PwSBGN6kABSjfrae1kPxnU6Mg/9J56E5iXFLst0qIvgDejUGG8BXLHDuzjM
 weQZJf6p6t9SZIHc/80RUsiVmRkqKM9Mp6NvyO4irQOKwfvQ76mjWNqiUrQS7wwA
 +glbwR3PMg31bvUXOcWuoBp3zbZYvN65bUSwZMIagynqYqU8g+bwDA2NQKjFzoXM
 ActLyurznSytcER+/+3JbRh32kMI1Bh/jnH2VbqS4TNQbtIuJd6VjYP4kE4HsRsZ
 MkK2pEUS4GuMEdLqeJW3d5ch+u45CQVdtDLuSUH0e9j3RqQNHmZWIvp3IhXouKG+
 HMeeo2RQfdn3Y7A+TJ18llVUW/2BTBKjnr1MvR+9JoZmMpkV0tnVnD19MQcKvEXK
 dM7Qp7apAS5KpXPTsWvRXwT4uFHoGiRpyluI2UrqEjOVhYQW4DBzfJ/GQDJ80Wd8
 HFH0ZPjvi2W3jLeFqOwGYzbcMgyGe4pvkkUm1yj/EV3j5GyFSCPxOhqn4t/fJegk
 Vg2AMDeSf+cb504pr8AkfYF0Z0RqGBTgyKOwslgGwaRCppOHW7DZL0R6M3/5a48H
 9C4z3RJ4UcTt1a93ZaV3
 =0OVE
 -----END PGP SIGNATURE-----

Merge tag 'msm-clock-for-3.11b' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm into next/late

From David Brown:
MSM clock updates for 3.11.

Per Stephen Boyd's coverletter:

Resending to collect higher level maintainer acks per Olof's request.
The plan is to push this patchset through MSM to the arm-soc tree.

This patchset moves the existing MSM clock code and affected drivers
to the common clock framework. A prerequisite of moving to the common
clock framework is to use clk_prepare() and clk_enable() so the first
few patches migrate drivers to that call (clk_prepare() is a no-op on
MSM right now). It also removes some custom clock APIs that MSM
provides and finally moves the proc_comm clock code to the common
struct clk.

This patch series will be used as the foundation of the MSM 8660/8960
clock code that I plan to send out after this series.

* tag 'msm-clock-for-3.11b' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm:
  ARM: msm: Migrate to common clock framework
  ARM: msm: Make proc_comm clock control into a platform driver
  ARM: msm: Prepare clk_get() users in mach-msm for clock-pcom driver
  ARM: msm: Remove clock-7x30.h include file
  ARM: msm: Remove custom clk_set_{max,min}_rate() API
  ARM: msm: Remove custom clk_set_flags() API
  msm: iommu: Use clk_set_rate() instead of clk_set_min_rate()
  msm: iommu: Convert to clk_prepare/unprepare
  msm_sdcc: Convert to clk_prepare/unprepare
  usb: otg: msm: Convert to clk_prepare/unprepare
  msm_serial: Use devm_clk_get() and properly return errors
  msm_serial: Convert to clk_prepare/unprepare

Acked-by: Chris Ball <cjb@laptop.org> # for msm_sdcc.c
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-27 17:04:27 -07:00
Olof Johansson fbd1a04b21 Merge branch 'msm/fixes' into next/late
Merging in msm/fixes to avoid silly conflicts at top level.

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-27 17:04:00 -07:00
Rafael J. Wysocki 39a95f4861 Merge branch 'pm-cpufreq-assorted' into pm-cpufreq
* pm-cpufreq-assorted: (21 commits)
  cpufreq: powernow-k8: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: pcc: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: e_powersaver: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: ACPI: call CPUFREQ_POSTCHANGE notfier in error cases
  cpufreq: make __cpufreq_notify_transition() static
  cpufreq: Fix minor formatting issues
  cpufreq: Fix governor start/stop race condition
  cpufreq: Simplify userspace governor
  cpufreq: powerpc: move cpufreq driver to drivers/cpufreq
  cpufreq: kirkwood: Select CPU_FREQ_TABLE option
  cpufreq: big.LITTLE needs cpufreq table
  cpufreq: SPEAr needs cpufreq table
  cpufreq: powerpc: Add cpufreq driver for Freescale e500mc SoCs
  cpufreq: remove unnecessary cpufreq_cpu_{get|put}() calls
  cpufreq: MAINTAINERS: Add git tree path for ARM specific updates
  cpufreq: rename index as driver_data in cpufreq_frequency_table
  cpufreq: Don't create empty /sys/devices/system/cpu/cpufreq directory
  cpufreq: Move get_cpu_idle_time() to cpufreq.c
  cpufreq: governors: Move get_governor_parent_kobj() to cpufreq.c
  cpufreq: Add EXPORT_SYMBOL_GPL for have_governor_per_policy
  ...
2013-06-27 21:46:45 +02:00
Rafael J. Wysocki 7ae9b27b2a Merge branch 'pm-cpufreq-Kconfig' into pm-cpufreq
* pm-cpufreq-Kconfig:
  cpufreq: X86_AMD_FREQ_SENSITIVITY: select CPU_FREQ_TABLE
  cpufreq: tegra: create CONFIG_ARM_TEGRA_CPUFREQ
  cpufreq: S3C2416/S3C64XX: select CPU_FREQ_TABLE
  cpufreq: pxa: select CPU_FREQ_TABLE
  cpufreq: powerpc: CBE_RAS: select CPU_FREQ_TABLE
  cpufreq: imx: select CPU_FREQ_TABLE
  cpufreq: highbank: remove select CPU_FREQ_TABLE
  cpufreq: exynos: select CPU_FREQ_TABLE
  cpufreq: davinci: select CPU_FREQ_TABLE
  cpufreq: cris: select CPU_FREQ_TABLE
  cpufreq: blackfin: enable driver for CONFIG_BFIN_CPU_FREQ
2013-06-27 21:44:48 +02:00
Arnd Bergmann b88923451f Device Tree updates for DaVinci
This patch set updates da850 DTS files to enable use of
 C pre-processor. Also updates pinctrl-single DT data
 to go with changes done in that module to enable a
 single register to service configuration of multiple
 pins.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJRyzY7AAoJEGFBu2jqvgRNsZsP/05zTYOFWNm0EbchMh1HgFkw
 2oXJG+i8SoC/lm9cW8Lad1fRHANMs2fYdKScH0t838wCH1ldfovFWTSHym9U5tp+
 bh8rPV8On9dhPsTcXCNzgt4CE4BJ2FTHUfgdQITifyu84hDYmC67XFF+MdfHo8sU
 J+HoVg3595Uv0m62UfPvzPUfEG/ckeigB2M8OeN3T8hVFccNp5KB1/od5AtB1qgk
 6OAsahD02S1oTaAOLMdkYV/7M665r351PC+MjMJWuV0ee55lVViqBG+jMn0O+Hx5
 IxkcDFLrp+V7Z9WXqH/NC9A9hJmx1n9nrRRUydbDmWeHkQOKUN5r8VAA7q5O/QSy
 VCEhxvEnJd1oNZqpfxLTZLX71OqjC1bMNKX5x+nVwLA7EKJ4r0ZA9vzGeS+D6Ca3
 ds+fP/k8NrP+xt1vecR4kCwOCg7eLYC+9LQHtLiTe55BkD54IUx58JqKZ1DiePK8
 4uPGoBGvgNBk2ZF9EvrlloNrxeSsgbk2n3EkgVv9NYJ1V1e/T8bUSrBk7MGCgJmv
 HQwlCPgU4qbw6KqszTEv3b3gSOx8XfR89g8w6GM50XuIonknx6QybCOhxhnYfKei
 Rk9C5BKcW5IUd9PowwiNV5NMga4Yaw1nZHb1SIKrRfi4McSa47aq9reo0IX+lCyd
 yz3MtBHOrkshgscnFgMz
 =RU+m
 -----END PGP SIGNATURE-----

Merge tag 'davinci-for-v3.11/dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/late

From Sekhar Nori:

Device Tree updates for DaVinci

This patch set updates da850 DTS files to enable use of
C pre-processor. Also updates pinctrl-single DT data
to go with changes done in that module to enable a
single register to service configuration of multiple
pins.

* tag 'davinci-for-v3.11/dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci:
  ARM: davinci: da850: adopt to pinctrl-single change for configuring multiple pins
  ARM: davinci: da850: Use #include for all device trees

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-27 15:09:52 +02:00
Arnd Bergmann 6b9a39de73 Several fixes for:
- external irq on non-DT boards
 - cpuidle code in some circumstances
 - PMC code in relation with PLLB/PLL_UTMI/USB:
   mainly for SAMA5D3 and AT91SAM9N12
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJRyuyOAAoJEAf03oE53VmQDOgIALT6Ql8reZiaLcB9cuhpPVy1
 vJAx8jxmJy0V1eXiD/Gl00261vb2tw7YJK9gt3zfLP0upqsYWrV5sV7f8UhR73RQ
 rrJSfWfLkPFPBORYyKiHw9kWQUMBczybz9hhv3HbbxdVHmpD7LnaPRWXat71u1u/
 Uh8UpF5d2s3lAE1BBqTr9Ec6n3r7vKqI/0MO2pWnyf11nfNZMI705zG9ehrQZHZx
 v8hovwjWuQ/o06GD45xMJuunEp6IVHl01A2ZRcppuvQD4CtNBXo3AnlNLQ6TK7iz
 9qOVhAiD8/1Td3CXSOOMiInCDBIVOXI/bbkKrAFJcTgGdL1jkAKEN3A1xUxXYVQ=
 =28Xo
 -----END PGP SIGNATURE-----

Merge tag 'at91-fixes' of git://github.com/at91linux/linux-at91 into next/fixes-non-critical

From Nicolas Ferre:

Several fixes for:
- external irq on non-DT boards
- cpuidle code in some circumstances
- PMC code in relation with PLLB/PLL_UTMI/USB:
  mainly for SAMA5D3 and AT91SAM9N12

* tag 'at91-fixes' of git://github.com/at91linux/linux-at91:
  ARM: at91/PMC: use at91_usb_rate() for UTMI PLL
  ARM: at91/PMC: fix at91sam9n12 USB FS init
  ARM: at91/PMC: at91sam9n12 family has a PLLB
  ARM: at91/PMC: sama5d3 family doesn't have a PLLB
  ARM: at91: cpuidle: Fix target_residency
  ARM: at91: fix at91_extern_irq usage for non-dt boards

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-27 15:03:13 +02:00
Linus Walleij 31c72abbca ARM: ux500: bail out on alien cpus
This makes the l2x0 initialization fail gracefully on non-ux500
systems.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-27 15:00:56 +02:00
Arnd Bergmann 0ad578ef25 Renesas sh-sci updates for v3.11
HSCIF support by Ulrich Hecht.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRyqpMAAoJENfPZGlqN0++KbMP/3XPeCGPyiAvoEYFT68CTUE3
 vtyVU5APL7rJ7eCkuxXvBriJ8GRcL95NUwK7kss3kPDpSTkNf4UmVCgrs1mj2gjl
 8PxjxGzyeryDl/cILx1EOJYkmhm6TUjbeFrd2uFOxntbhItnCrEAHDwx7AxQhI79
 Enz3L0moU1v8rq/MBiyGKh1wD2UFgyzcqbxhsdxhDurgbhElfnccWxjK9DVXxCAP
 c9Lyc0GIC5CniI+LITgcbay93/2//5/ytSQTc3gDfbNkVk/8sa4HWyV4XLDNNCAz
 EclVD9fLBXHITVtid6c/Nxqnn+6W31LKKsR52XDYs8anT61YxoO6QHzEiXPpzEvF
 3NbR9Vv3EpgIe6NXn0JB5GwOvggJxWHNg9/8LspyZujtzS99fLe00L0ICEftfsVp
 62wUnvC/477DuXr5e/o8YrSvWxnKq51tqoFthWUEn6FkjoUYC8eNuCAnvKrODf4i
 y5FokvDepmhElLFOFWuCDahPeSy512WKtsGNLKzulwLF0zEmpkAitw6gtE044fsk
 FLtaA8SpmdgbH0NiLW0jFuNR4w36vPZ2g7mCqWGlkAxMC9jlitfWDvSG+KssqEL6
 ObgR3GyuYrHqVgB7vqGztqvZWekBSsQXdk5Y80mN15M+3qO5KwYjKo89U8lWMS4W
 zMq5g9o/qW7C9NnHCPA2
 =bnU/
 -----END PGP SIGNATURE-----

Merge tag 'renesas-sh-sci-for-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/late

Renesas sh-sci updates for v3.11

HSCIF support by Ulrich Hecht.

* tag 'renesas-sh-sci-for-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  serial: sh-sci: Initialise variables before access in sci_set_termios()
  ARM: shmobile: r8a7790: don't use external clock for SCIFs
  ARM: shmobile: r8a7790: HSCIF support
  serial: sh-sci: HSCIF support

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-27 14:26:33 +02:00
Arnd Bergmann 4022acdb5b Merge branch 'renesas/boards2' into next/late
Conflicts:
	arch/arm/mach-shmobile/setup-r8a7778.c

This is a dependency for the Renesas sh-sci updates.

Signedf-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-27 14:26:06 +02:00
Linus Walleij 1eb92b24e2 ARM: integrator: let pciv3 use mem/premem from device tree
Instead of relying on the hard-coded mem/premem bases for
the PCI side, read in these from the device tree in the
DT probe path. Hard-code the old values on the non-DT probe
path. Introduce some static locals to hold these addresses
instead of the earlier static #defines.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-27 14:19:54 +02:00
Linus Walleij 56ce3ffbd5 ARM: integrator: set local side PCI addresses right
This alters the local side address of the iospace to zero,
non prefetchable memory local side address to 0x00000000 and
prefetchable memory local side address to 0x10000000,
so as to match the values actually poked in by the driver.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-27 14:19:12 +02:00
Manjunathappa, Prakash 055cb2a9e0 ARM: davinci: da850: adopt to pinctrl-single change for configuring multiple pins
function-mask DT property is now a mask for a pin at each pin offset
inside a given pincontrol register. Fix DA850 DT data to reflect
this change.

Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
[nsekhar@ti.com: reword commit message for clarity]
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2013-06-26 23:56:31 +05:30
Jingoo Han b342e64c67 ARM: dts: Add pcie controller node for exynos5440-ssdk5440
This patch adds pcie controller node for exynos5440-ssdk5440,
and also adds a phandle for pin controller node.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-26 20:16:31 +02:00
Jingoo Han 406a9324b4 ARM: dts: Add pcie controller node for Samsung EXYNOS5440 SoC
Exynos5440 has two PCIe controllers which can be used as root complex
for PCIe interface.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-26 20:16:25 +02:00
Jingoo Han 3f06d15782 ARM: EXYNOS: Enable PCIe support for Exynos5440
Enable PCIe support for Exynos5440 which has two PCIe controllers.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-26 20:15:51 +02:00
Arnd Bergmann 8bd4ffd6b3 ARM: kvm: don't include drivers/virtio/Kconfig
The virtio configuration has recently moved and is now visible everywhere.
Including the file again from KVM as we used to need earlier now causes
dependency problems:

warning: (CAIF_VIRTIO && VIRTIO_PCI && VIRTIO_MMIO && REMOTEPROC && RPMSG)
selects VIRTIO which has unmet direct dependencies (VIRTUALIZATION)

Cc: Christoffer Dall <cdall@cs.columbia.edu>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2013-06-26 10:50:06 -07:00
Geoff Levand f2dda9d829 arm/kvm: Cleanup KVM_ARM_MAX_VCPUS logic
Commit d21a1c83c7 (ARM: KVM: define KVM_ARM_MAX_VCPUS
unconditionally) changed the Kconfig logic for KVM_ARM_MAX_VCPUS to work around a
build error arising from the use of KVM_ARM_MAX_VCPUS when CONFIG_KVM=n.  The
resulting Kconfig logic is a bit awkward and leaves a KVM_ARM_MAX_VCPUS always
defined in the kernel config file.

This change reverts the Kconfig logic back and adds a simple preprocessor
conditional in kvm_host.h to handle when CONFIG_KVM_ARM_MAX_VCPUS is undefined.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2013-06-26 10:50:05 -07:00
Marc Zyngier 22cfbb6d73 ARM: KVM: clear exclusive monitor on all exception returns
Make sure we clear the exclusive monitor on all exception returns,
which otherwise could lead to lock corruptions.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2013-06-26 10:50:05 -07:00
Marc Zyngier 479c5ae2f8 ARM: KVM: add missing dsb before invalidating Stage-2 TLBs
When performing a Stage-2 TLB invalidation, it is necessary to
make sure the write to the page tables is observable by all CPUs.

For this purpose, add a dsb instruction to __kvm_tlb_flush_vmid_ipa
before doing the TLB invalidation itself.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2013-06-26 10:50:04 -07:00
Marc Zyngier 6a077e4ab9 ARM: KVM: perform save/restore of PAR
Not saving PAR is an unfortunate oversight. If the guest performs
an AT* operation and gets scheduled out before reading the result
of the translation from PAR, it could become corrupted by another
guest or the host.

Saving this register is made slightly more complicated as KVM also
uses it on the permission fault handling path, leading to an ugly
"stash and restore" sequence. Fortunately, this is already a slow
path so we don't really care. Also, Linux doesn't do any AT*
operation, so Linux guests are not impacted by this bug.

  [ Slightly tweaked to use an even register as first operand to ldrd
    and strd operations in interrupts_head.S - Christoffer ]

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2013-06-26 10:50:04 -07:00
Marc Zyngier 4db845c3d8 ARM: KVM: get rid of S2_PGD_SIZE
S2_PGD_SIZE defines the number of pages used by a stage-2 PGD
and is unused, except for a VM_BUG_ON check that missuses the
define.

As the check is very unlikely to ever triggered except in
circumstances where KVM is the least of our worries, just kill
both the define and the VM_BUG_ON check.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
2013-06-26 10:50:04 -07:00
Marc Zyngier 8734f16fb2 ARM: KVM: don't special case PC when doing an MMIO
Admitedly, reading a MMIO register to load PC is very weird.
Writing PC to a MMIO register is probably even worse. But
the architecture doesn't forbid any of these, and injecting
a Prefetch Abort is the wrong thing to do anyway.

Remove this check altogether, and let the adventurous guest
wander into LaLaLand if they feel compelled to do so.

Reported-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
2013-06-26 10:50:03 -07:00
Marc Zyngier dac288f7b3 ARM: KVM: use phys_addr_t instead of unsigned long long for HYP PGDs
HYP PGDs are passed around as phys_addr_t, except just before calling
into the hypervisor init code, where they are cast to a rather weird
unsigned long long.

Just keep them around as phys_addr_t, which is what makes the most
sense.

Reported-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
2013-06-26 10:50:03 -07:00
Marc Zyngier 368074d908 ARM: KVM: remove dead prototype for __kvm_tlb_flush_vmid
__kvm_tlb_flush_vmid has been renamed to __kvm_tlb_flush_vmid_ipa,
and the old prototype should have been removed when the code was
modified.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
2013-06-26 10:50:02 -07:00
Dave P Martin 24a7f67575 ARM: KVM: Don't handle PSCI calls via SMC
Currently, kvmtool unconditionally declares that HVC should be used
to call PSCI, so the function numbers in the DT tell the guest
nothing about the function ID namespace or calling convention for
SMC.

We already assume that the guest will examine and honour the DT,
since there is no way it could possibly guess the KVM-specific PSCI
function IDs otherwise.  So let's not encourage guests to violate
what's specified in the DT by using SMC to make the call.

[ Modified to apply to top of kvm/arm tree - Christoffer ]

Signed-off-by: Dave P Martin <Dave.Martin@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
2013-06-26 10:50:02 -07:00
Anup Patel 5ae7f87a56 ARM: KVM: Allow host virt timer irq to be different from guest timer virt irq
The arch_timer irq numbers (or PPI numbers) are implementation dependent,
so the host virtual timer irq number can be different from guest virtual
timer irq number.

This patch ensures that host virtual timer irq number is read from DTB and
guest virtual timer irq is determined based on vcpu target type.

Signed-off-by: Anup Patel <anup.patel@linaro.org>
Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
2013-06-26 10:50:02 -07:00
Arnd Bergmann 9686bb66a4 - more SPI DT activation for rm9200
- SPI DMA for at91sam9n12/sama5d3
 And one little fix for SPI compatibility string
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJRyqz5AAoJEAf03oE53VmQhbkH/jpF1jLBT6h0m29BQ4MIcpx5
 8TzF75XkB7HeQnZNRgfbfEhhhOqhKvEzp9imOqTUCXN0X7zUjsRWpKeUzYt52PnK
 3fjN+Hb8p1fWmGwD6VuxOp+TDy5LQ8wtl5bq6PDtWCHHB8cueEXv9EJATF4B8geX
 2RSfzorG5ntyxJQNv+/3xBhO02QSkCB2QxgnQUeLRHvI4sddl1qHebNECsvHn4eS
 TlsX1XZP8VjC56Iyx+D6tdqLAhtbA1McYH6cAYDuk6lmr2JRaSiWfTtmP/KIxdQi
 wdomUcngSsVfNVXSTv/dKZX4XeZ6tAul/4177jM6jFY3T2TQetfnLgMMxphHy1A=
 =YgfS
 -----END PGP SIGNATURE-----

Merge tag 'at91-dt' of git://github.com/at91linux/linux-at91 into next/dt

From Nicolas Ferre:

- more SPI DT activation for rm9200
- SPI DMA for at91sam9n12/sama5d3
And one little fix for SPI compatibility string

* tag 'at91-dt' of git://github.com/at91linux/linux-at91:
  ARM: at91: dt: rm9200ek: add spi support
  ARM: at91: dt: rm9200: add spi support
  ARM: at91/DT: at91sam9n12: add SPI DMA client infos
  ARM: at91/DT: sama5d3: add SPI DMA client infos
  ARM: at91/DT: fix SPI compatibility string

Conflicts:
	arch/arm/boot/dts/sama5d3.dtsi

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-26 16:56:24 +02:00
Arnd Bergmann ece585df6e OMAP5: PM: fix boot by removing unneeded dummy voltage domain data
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRyjKeAAoJEFk3GJrT+8Zlu50P/RGxbLxptFqmGuHeahIctkMX
 DU6qW5oCC8TAGeXMlHEYqS06xMM8gJYJ0PNDS1iFgXy9xqgvwpQR6XfPHrwZYbon
 cgV5WbynaLq+RvuC3B8D1Q/jQx+D3eH/OoTzjb8yiU8QAEVbn6lRgSMjKZrrlrSv
 hVejObFybfB5wDqApnHq/iV72oXUIoSuZvyOQMHoZD66GrUlIT55nb8rUZAgH9vA
 12t72wXIXeb7LVab/ckt+/boH4QJt/2/+HHYYAAP8CWEF+trQkuMFim565d0YbTi
 DZAD+wMC4/Isgry9pF2Hxg+u94vc598aNokCDWgVCMZJUXhSd+sIp/01gVKbqMIz
 JWy6fP9bA8b94VBSGedybVhuD9elCiJOVw0yGxKedHV5O/bFKHF9p/NIeEtYmtRN
 2V1D4LtZOyI0lEpdKZBf4EJ0bwPdNFMWDAc9Nk6hRhClt4LfxKKGQwKeaI6fkX8M
 6Q20QnJjEJdY5ZZl8Kij6GU/Q07cyf3jzfvajM6opVxqscXhlJ7vAGK4/dbzGWC9
 2PLSoKFsy/zGuSMae2J0La6KHlp9vU4QhhbDE8feFxiDGyVuHYufEb9A+FLRb9b7
 ZI1vWkQd1758xI8mN1GUf3S/V7wFZoEB3MTMr+u69cOiRPP9zBmeaLlN/wUJip+x
 kA1D/1JPb8P6mWV8S3nF
 =lY3O
 -----END PGP SIGNATURE-----

Merge tag 'omap-pm-v3.11/fixes/omap5-voltdm' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into next/soc

From Kevin Hilman:

OMAP5: PM: fix boot by removing unneeded dummy voltage domain data

* tag 'omap-pm-v3.11/fixes/omap5-voltdm' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm:
  ARM: OMAP5: voltagedomain data: remove temporary OMAP4 voltage data

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-26 16:52:01 +02:00
Nicolas Ferre bd2da9ca13 ARM: at91/PMC: use at91_usb_rate() for UTMI PLL
We are using this function, now that we have introduced
the support for UTMI clock for computing the USB host rate.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Tested-by: Bo Shen <voice.shen@atmel.com>
2013-06-26 15:24:11 +02:00
Nicolas Ferre d04e5b694e ARM: at91/PMC: fix at91sam9n12 USB FS init
at91sam9n12 has Full-speed only USB. So we should add
it to the list in at91_pllb_usbfs_clock_init() function.
Moreover, at91sam9n12 has an unusual PMC in the sense that it
has a PLLB but also has a USB clock register.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Tested-by: Bo Shen <voice.shen@atmel.com>
2013-06-26 15:23:18 +02:00
Nicolas Ferre 7319ee0495 ARM: at91/PMC: at91sam9n12 family has a PLLB
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
2013-06-26 15:22:51 +02:00
Nicolas Ferre ed4a2af5fc ARM: at91/PMC: sama5d3 family doesn't have a PLLB
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
2013-06-26 15:22:15 +02:00
Jean-Christophe PLAGNIOL-VILLARD 26e3326cc0 ARM: at91: dt: rm9200ek: add spi support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2013-06-26 10:13:39 +02:00
Jean-Christophe PLAGNIOL-VILLARD 32a86877d8 ARM: at91: dt: rm9200: add spi support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2013-06-26 10:13:14 +02:00
Nicolas Ferre c07b000ffe ARM: at91/DT: at91sam9n12: add SPI DMA client infos
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2013-06-26 09:30:19 +02:00
Nicolas Ferre e543a73a7e ARM: at91/DT: sama5d3: add SPI DMA client infos
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Tested-by: Wenyou Yang <wenyou.yang@atmel.com>
2013-06-26 09:30:11 +02:00
Nicolas Ferre b7ef678e42 ARM: at91/DT: fix SPI compatibility string
In previous version of SPI driver we where using different compatibility stings
for finding SPI features. We are now using the IP revision information.
So we stay with the unique compatibility string for this driver:
"atmel,at91rm9200-spi".

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Tested-by: Wenyou Yang <wenyou.yang@atmel.com>
2013-06-26 09:29:23 +02:00
Nishanth Menon 2ac524f151 ARM: OMAP5: voltagedomain data: remove temporary OMAP4 voltage data
commit 20d49e9ccf
(ARM: OMAP5: voltagedomain data: Add OMAP5 voltage domain data)

Introduced dummy volt data for OMAP5 with OMAP4460 voltage information.

However with the fixes introduced in later patches

commit cd8abed1da
(ARM: OMAP2+: Powerdomain: Remove the need to always have a voltdm
 associated to a pwrdm)

We are no longer restricted in that respect. Further, OPP voltage
information is supposed to be provided by dts information. This needs
to be added in future patches as various voltage modules are converted
to dts.

This also fixes the build breakage for voltagedomains54xx_data.c when just
OMAP5 SoC is enabled: https://patchwork.kernel.org/patch/2764191/

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Nishanth Menon <nm@ti.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org
Signed-off-by: Kevin Hilman <khilman@linaro.org>
2013-06-25 17:11:06 -07:00
Olof Johansson 37c5a9f7d7 Merge branch 'sti/soc' into next/late
From Srinivas Kandagatla <srinivas.kandagatla@st.com>:

This patch-set adds basic support for STMicroelectronics STi series SOCs
which includes STiH415 and STiH416 with B2000 and B2020 board support.

STiH415 and STiH416 are dual-core ARM Cortex-A9 CPU, designed for
use in Set-top-boxes. The SOC support is available in mach-sti which
contains support code for STiH415, STiH416 SOCs including the generic
board support.

The reason for adding two SOCs at this patch set is to show that no new
C code is required for second SOC(STiH416) support.

* sti/soc:
  ARM: stih41x: Add B2020 board support
  ARM: stih41x: Add B2000 board support
  ARM: sti: Add DEBUG_LL console support
  ARM: sti: Add STiH416 SOC support
  ARM: sti: Add STiH415 SOC support

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-25 13:43:28 -07:00
Olof Johansson 2655e82835 Merge branch 'nspire/soc' into next/late
From Daniel Tang <dt.tangr@gmail.com>

This is the initial platform code for the TI-Nspire graphing
calculators. The platform support is rather unspectacular, but still
contains platform data for the LCD panel, which will get removed once
there is a DT binding for the AMBA CLCD driver.

* nspire/soc:
  arm: Add Initial TI-Nspire support
  arm: Add device trees for TI-Nspire hardware

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-25 13:43:18 -07:00
Srinivas Kandagatla 40e3e67253 ARM: stih41x: Add B2020 board support
B2020 ADI board is reference board for STIH415/416 SOCs, it has 2 x
UART, 4x USB, 1 x Ethernet, 1 x SATA, 1 x PCIe, and 2GB RAM  with
standard set-top box IPs.

This patch adds initial support to B2020 with STiH415/416 with SBC_UART1
as console and a heard beat LED.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
CC: Stephen Gallimore <stephen.gallimore@st.com>
CC: Stuart Menefy <stuart.menefy@st.com>
CC: Arnd Bergmann <arnd@arndb.de>

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-25 13:42:51 -07:00
Srinivas Kandagatla f1148dba64 ARM: stih41x: Add B2000 board support
B2000 board is reference board for STIH415/416 SOCs, it has
2 x UART, 4x USB, 2 x Ethernet, 1 x SATA, 1 x PCIe, and 1GB RAM.

This patch add initial support to b2000 with STiH415/416 with UART2 as
console and a heard beat LED.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
CC: Stephen Gallimore <stephen.gallimore@st.com>
CC: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-25 13:42:50 -07:00
Srinivas Kandagatla 5026aecf9b ARM: sti: Add DEBUG_LL console support
This patch adds low level debug uart support to sti based SOCs.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
CC: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-25 13:27:02 -07:00
Srinivas Kandagatla 15969b4577 ARM: sti: Add STiH416 SOC support
The STiH416 is advanced HD AVC processor with 3D graphics acceleration
and 1.2-GHz ARM Cortex-A9 SMP CPU.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
CC: Stephen Gallimore <stephen.gallimore@st.com>
CC: Stuart Menefy <stuart.menefy@st.com>
CC: Arnd Bergmann <arnd@arndb.de>
CC: Linus Walleij <linus.walleij@linaro.org>

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-25 13:26:58 -07:00
Srinivas Kandagatla 65ebcc1158 ARM: sti: Add STiH415 SOC support
The STiH415 is the next generation of HD, AVC set-top box processors for
satellite, cable, terrestrial and IP-STB markets. It is an ARM Cortex-A9
1.0 GHz, dual-core CPU.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
CC: Stephen Gallimore <stephen.gallimore@st.com>
CC: Stuart Menefy <stuart.menefy@st.com>
CC: Arnd Bergmann <arnd@arndb.de>
CC: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-25 13:26:47 -07:00
Stephen Warren 1d54e0895b ARM: tegra: fix section mismatch in tegra_pmc_parse_dt
tegra_pmc_parse_dt() references __initconst data. Fix it to be __init.
This matches its only usage; a call from tegra_pmc_init() which is
already __init. This fixes:

WARNING: vmlinux.o(.text.unlikely+0x580): Section mismatch in reference
from the function tegra_pmc_parse_dt() to the (unknown reference)
.init.rodata:(unknown)

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-25 11:16:15 -07:00
Olof Johansson a6f9061408 mvebu fixes non-critical for v3.11 (round 2)
- mvebu
     - mv78260: catch missing fix for mvneta register length
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.20 (GNU/Linux)
 
 iQEcBAABAgAGBQJRx20mAAoJEAi3KVZQDZAe1lEH/0oOI0tNUTDv2v/eYAHBTemw
 nc/9aOaYTVCEmz1U2APTuHgl3+d75epnt0u5DcBmfaX/Jd3S3JEK9BmYgOVneNmL
 AYrQH29VF8lOOWQt2nRvZmgRMvgtcHVJrZbwtxSo5oPrvzPd9a64jwCg3/HeLubX
 2zIj6GZhumKJZf7nKb1OjmYjNH4V2SjzB466I1wsqjkKPRkeKSk/rs2glVssEsb4
 cWE12zABBuPKeUF/be26gOttAjzeAoTpVx3ikfq8Tn19W56C1Jn2GesSw74W1bcS
 /aFZHy/eOGU/SNkP1tPmlMP19HXzzGLtHa0BR8aYrKa75clFBSK4+AsSkwzZGSA=
 =T/gM
 -----END PGP SIGNATURE-----

Merge tag 'fixes-non-3.11-2' of git://git.infradead.org/users/jcooper/linux into next/fixes-non-critical

From Jason Cooper:
 - mv78260: catch missing fix for mvneta register length

* tag 'fixes-non-3.11-2' of git://git.infradead.org/users/jcooper/linux:
  ARM: mvebu: fix length of ethernet registers in mv78260 dtsi

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-25 10:08:26 -07:00
Olof Johansson cbe461f654 based on tags/soc-exynos5420-1
- add pinctrl support for exynos5420
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRwcGBAAoJEA0Cl+kVi2xqrwEQAILUD5hNqsBIt9ddPQPpgBMf
 ZPpKSCRLGlQ944HMHS7Yu0qCuT19iXtVXYT9sEcyRLY5/GujfeQt5XfaX8Cd5yNS
 3ydDQuDBRZ5ffnzP1eTvxV8Q+A4RQMPk+yqOLad4JJ+5FORoqNcxnibJtSvc9Qgn
 J179aOwZ7DdtoODgVG5/tczf97lOHcscSYFt0PmJxVuWeZxU+Ya9BdizuFWChNEX
 I6VfYNprcYdbsz3UuW6vQsCs/sDZ1kTX4iA5GcfcpnGgfCjEbq9GXPI29F/tqV0F
 +7qz5pwS0uDoLcbGClUGsGFwBuz0TQEsg15gSvG9h15B87Ur+k4ZjA9Lhfo+mpX+
 VmT7m/rbsFDyuzts3aIEyTEc1W5f3w0Mw2qd216GxtaJfto89Qji6w+kj2GDU1zx
 NU7f/s35htJ4YGwgIPQmZTSrmPsFpN8O2AHxrKDh7YNRfL3uoaPA7YudI4ZSuBXT
 ICM9vJTc1Ju6TWnjiuHtGngwkns6P7KWepia0s5KqfH4G/hissJ3BeK6DcVeKR6E
 zVVFGW4umqVQDFRQaM6rkqmUrFddGmdL9ibvjJVuoAb3RFLApHoocv+QtLbgHAj5
 aiozoHEKTcgmpKzUwa3PIRe75CiO9mUUlOws6DEz1gtOnWUga76+u4Wz7QoOr9Ao
 E5MjB62BUGeZVt5cG1Z4
 =Dvn4
 -----END PGP SIGNATURE-----

Merge tag 'soc-exynos5420-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/late

From Kukjin Kim, this adds pinctrl support for Exynos 5420.

* tag 'soc-exynos5420-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  pinctrl: exynos: add exynos5420 SoC specific data
  ARM: dts: add pinctrl support to EXYNOS5420

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-25 08:50:18 -07:00
Javier Martinez Canillas f88704c95b arm: orion: Use irq_get_trigger_type() to get IRQ flags
Use irq_get_trigger_type() to get the IRQ trigger type flags
instead calling irqd_get_trigger_type(irq_get_irq_data(irq))

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mips@linux-mips.org
Link: http://lkml.kernel.org/r/1371228049-27080-6-git-send-email-javier.martinez@collabora.co.uk
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2013-06-25 11:48:25 +02:00
Greg Kroah-Hartman f797d37ead Merge 3.10-rc7 into usb-next
We want the USB fixes and other good stuff in this branch as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-24 15:20:26 -07:00
Greg Kroah-Hartman b5aef682e0 Merge 3.10-rc7 into driver-core-next
We want the firmware merge fixes, and other bits, in here now.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-24 15:14:43 -07:00
Stephen Boyd 8cc7f5338e ARM: msm: Migrate to common clock framework
Move the existing clock code in mach-msm to the common clock
framework. We lose our capability to set the rate of and enable a
clock through debugfs. This is ok though because the debugfs
features are mainly used for testing and development of new clock
code.

To maintain compatibility with the original MSM clock code we
make a wrapper for clk_reset() that calls the struct msm_clk
specific reset function. This is necessary for the usb and sdcc
devices on MSM until a better suited API is made available.

Cc: Saravana Kannan <skannan@codeaurora.org>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-06-24 13:08:05 -07:00
Stephen Boyd 421faca0b5 ARM: msm: Make proc_comm clock control into a platform driver
To move closer to the generic struct clock framework move the
proc_comm based clock code to a platform driver. The data
describing the struct clks still live in the devices-$ARCH file,
but the clock initialization is done at driver binding time.

Cc: Saravana Kannan <skannan@codeaurora.org>
Reviewed-by: Pankaj Jangra <jangra.pankaj9@gmail.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-06-24 13:07:53 -07:00
Stephen Boyd 2dfd9c1f77 ARM: msm: Prepare clk_get() users in mach-msm for clock-pcom driver
In the near future we'll be moving clock-pcom to a platform
driver, in which case these two users of clk_get() in mach-msm
need to be updated. Have board-trout-panel.c make the proc_comm
call directly so that we don't have to port this board specific
code to the driver right now and reorder the initcall order of
dma.c so that it initializes after the clock driver probes but
before any drivers use dma APIs.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-06-24 13:06:43 -07:00
Stephen Boyd 42a9ed5dbe ARM: msm: Remove clock-7x30.h include file
This file is not used outside of the two users in the clock-7x30
array. Those two clocks are virtual "source" clocks that don't
really need to exist outside of the clock driver. Let's remove
them from the array, since they're not doing anything anyway, and
then remove the clock-7x30.h include file along with it.

Cc: Saravana Kannan <skannan@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-06-24 13:06:43 -07:00
Stephen Boyd 2f8b6fe4a9 ARM: msm: Remove custom clk_set_{max,min}_rate() API
There are no users of this API anymore so let's just remove it.
If a need arises in the future we can extend the common clock API
to handle it.

Acked-by: Saravana Kannan <skannan@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-06-24 13:06:43 -07:00
Stephen Boyd 85a7df1f85 ARM: msm: Remove custom clk_set_flags() API
Nobody is using this API upstream and it's just contributing
cruft. Remove it so the MSM clock API is closer to the generic
struct clock API.

Acked-by: Saravana Kannan <skannan@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-06-24 13:06:42 -07:00
Arnd Bergmann 8ecb6ca61a DaVinci SoC updates for v3.11 - part 2
--------------------------------------
 
 This pull request adds DT and runtime PM to
 EDMA ARM private API so it can be used on
 DT enabled DaVinci and OMAP platforms.
 
 Also adds DMA channel crossbar mapping
 support to be used by DT-enabled platforms
 which use it.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJRyFgNAAoJEGFBu2jqvgRNKuEP/0qZpKwS9dlNu25+hQYG6P8K
 QhWs7/1t6flWCUpGxx06RMDbMdLndALEaJay/L2/2kZr3LRZ+o/PB/yzPqcPIA0W
 +3w86mPSbnmVob10u4mwcdMOk2pV6cKIBA0D4Q2Kkkr/UrkrpkFkEkBEDePJaTcP
 e3u6jzOU8XCtsYz7DRV6w/YxJ926f572KQ5PNlwB4o7zOk4QAhuKvV3RbmbQxSLu
 hqprR2Vi+xnifA2QDPWFCGI7eneCmR9HgMhrrmwCXYdHRk7mVA6O6n3O8J+wTKT+
 fFfzVkZ688EKUg18WAzGFrzzS/NA3qIkPmHPdKFp4dwRxyXDD6m/wiPkUpjSMcQr
 N9XtZkNPDj7j9DMony8nSkEj7S0Qf68GekGR7XSPbE2pVvJhdYGxgnWx52KXgM09
 3zVY4ZTL6z+F4mI4rY390YO5ttGsNmitnFvv1vgct6ZcDlIFnEo9pZm94LCtG99D
 9ZWpxZZPXpejY1IgnfX1AA5ab2ifbRe4UDJVurqOrlyR4SUUoDuob17qBh8iUYSI
 LzJe6qksUTYgWH6j8XzeGH5+lF1hBjltvArsh2UtBhn96KRdw1XnEuJZBtsKilng
 0SxuQDKR3aELGIOJ+8oImO9pojkLzY4+2eCXhJXLNGv6BCv/vWleHNpT4IlvYIZa
 QPbK1I5Y5oEwBePUnUfw
 =h9EO
 -----END PGP SIGNATURE-----

Merge tag 'davinci-for-v3.11/soc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/soc

From Sekhar Nori:

DaVinci SoC updates for v3.11 - part 2

This pull request adds DT and runtime PM to
EDMA ARM private API so it can be used on
DT enabled DaVinci and OMAP platforms.

Also adds DMA channel crossbar mapping
support to be used by DT-enabled platforms
which use it.

* tag 'davinci-for-v3.11/soc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci:
  dmaengine: edma: enable build for AM33XX
  ARM: edma: Add EDMA crossbar event mux support
  ARM: edma: Add DT and runtime PM support to the private EDMA API
  dmaengine: edma: Add TI EDMA device tree binding
  ARM: edma: Convert to devm_* api

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-24 16:46:23 +02:00
Marc Zyngier 52c08a9e39 ARM: 7770/1: remove residual ARMv2 support from decompressor
arm26 support in Linux is long gone, yet it left an interresting,
fossilized trace in the decompressor.

Remove it so people won't get confused about what teqp is actually
doing here...

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-06-24 15:28:24 +01:00
Marc Zyngier 0d0752bca1 ARM: 7769/1: Cortex-A15: fix erratum 798181 implementation
Looking into the active_asids array is not enough, as we also need
to look into the reserved_asids array (they both represent processes
that are currently running).

Also, not holding the ASID allocator lock is racy, as another CPU
could schedule that process and trigger a rollover, making the erratum
workaround miss an IPI.

Exposing this outside of context.c is a little ugly on the side, so
let's define a new entry point that the erratum workaround can call
to obtain the cpumask.

Cc: <stable@vger.kernel.org> # 3.9
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-06-24 15:27:35 +01:00
Marc Zyngier b8e4a4740f ARM: 7768/1: prevent risks of out-of-bound access in ASID allocator
On a CPU that never ran anything, both the active and reserved ASID
fields are set to zero. In this case the ASID_TO_IDX() macro will
return -1, which is not a very useful value to index a bitmap.

Instead of trying to offset the ASID so that ASID #1 is actually
bit 0 in the asid_map bitmap, just always ignore bit 0 and start
the search from bit 1. This makes the code a bit more readable,
and without risk of OoB access.

Cc: <stable@vger.kernel.org> # 3.9
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-06-24 15:26:41 +01:00
Marc Zyngier ae120d9edf ARM: 7767/1: let the ASID allocator handle suspended animation
When a CPU is running a process, the ASID for that process is
held in a per-CPU variable (the "active ASIDs" array). When
the ASID allocator handles a rollover, it copies the active
ASIDs into a "reserved ASIDs" array to ensure that a process
currently running on another CPU will continue to run unaffected.
The active array is zero-ed to indicate that a rollover occurred.

Because of this mechanism, a reserved ASID is only remembered for
a single rollover. A subsequent rollover will completely refill
the reserved ASIDs array.

In a severely oversubscribed environment where a CPU can be
prevented from running for extended periods of time (think virtual
machines), the above has a horrible side effect:

[P{a} denotes process P running with ASID a]

	CPU-0		CPU-1

	A{x}				[active = <x 0>]

	[suspended]	runs B{y}	[active = <x y>]

					[rollover:
					 active = <0 0>
					 reserved = <x y>]

			runs B{y}	[active = <0 y>
					 reserved = <x y>]

					[rollover:
					 active = <0 0>
					 reserved = <0 y>]

			runs C{x}	[active = <0 x>]

	[resumes]

	runs A{x}

At that stage, both A and C have the same ASID, with deadly
consequences.

The fix is to preserve reserved ASIDs across rollovers if
the CPU doesn't have an active ASID when the rollover occurs.

Cc: <stable@vger.kernel.org> # 3.9
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Catalin Carinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-06-24 15:24:54 +01:00
Mark Rutland 8121cf312a ARM: 7766/1: versatile: don't mark pen as __INIT
When booting fewer cores than are physically present on a versatile
platform (e.g. when passing maxcpus=N on the command line), some
secondary cores may remain in the holding pen, which is marked __INIT,
as each CPU's gic cpumask is initialised to 0xff, and thus an IPI to any
CPU will wake up *all* secondaries. This behaviour is crucial to the GIC
cpumask self-discovery. Late in the boot process, the memory comprising
the holding pen will be released to the kernel for more general use, and
may be overwritten with arbitrary data, which can cause the held
secondaries to start behaving unpredictably. This can lead to all manner
of odd behaviour from the kernel.

As preventing cpus from entering the pen would require invasive changes
to the GIC driver and to existing dts used in the wild, we instead
remove the __INIT marker from the pen, keeping it around and leaving the
unused secondary CPUs dormant.

Link: http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/175039.html

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Pawel Moll <pawel.moll@arm.com>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-06-24 15:23:56 +01:00
Santosh Shilimkar 3aae7ab0f1 ARM: keystone: Move CPU bringup code to dedicated asm file
Because of inline asm usage in platsmp.c, smc instruction
creates build failure for ARM V6+V7 build where as using instruction
encoding for smc breaks the thumb2 build.

So move the code snippet to separate asm file and mark
it with 'armv7-a$(plus_sec)' to avoid any build issues.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-24 16:23:36 +02:00
Jed Davis c5f927a6f6 ARM: 7765/1: perf: Record the user-mode PC in the call chain.
With this change, we no longer lose the innermost entry in the user-mode
part of the call chain.  See also the x86 port, which includes the ip.

It's possible to partially work around this problem by post-processing
the data to use the PERF_SAMPLE_IP value, but this works only if the CPU
wasn't in the kernel when the sample was taken.

Cc: <stable@vger.kernel.org>
Signed-off-by: Jed Davis <jld@mozilla.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-06-24 15:23:29 +01:00
André Hentschel a4780adeef ARM: 7735/2: Preserve the user r/w register TPIDRURW on context switch and fork
Since commit 6a1c53124a the user writeable TLS register was zeroed to
prevent it from being used as a covert channel between two tasks.

There are more and more applications coming to Windows RT,
Wine could support them, but mostly they expect to have
the thread environment block (TEB) in TPIDRURW.

This patch preserves that register per thread instead of clearing it.
Unlike the TPIDRURO, which is already switched, the TPIDRURW
can be updated from userspace so needs careful treatment in the case that we
modify TPIDRURW and call fork(). To avoid this we must always read
TPIDRURW in copy_thread.

Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-06-24 15:21:59 +01:00
Arnd Bergmann 24e860fbfd ARM: multiplatform: always pick one CPU type
With the new default platform code, we can always boot using DT
without requiring a board file, but we cannot build a kernel
unless we select at least one CPU core, which breaks some
"randconfig" builds.

This adapts the ARCH_MULTI_V4T and ARCH_MULTI_V5 options so we
always default to a common CPU core if no platform was enabled
that picks something else. The default we pick for ARMv4T is
ARM920T, while for ARMv5 we pick ARM926T.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-24 16:15:19 +02:00
Arnd Bergmann 0626494d5f ARM: imx: select syscon for IMX6SL
This is required for building a kernel that enables only
IMX6SL but not IMX6Q, which would get a build error when
syscon is not available.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
2013-06-24 16:14:40 +02:00
Arnd Bergmann ec711d6e7b ARM: keystone: select ARM_ERRATA_798181 only for SMP
Selecting this symbol causes a build warning without SMP:

warning: (ARCH_KEYSTONE) selects ARM_ERRATA_798181 which has unmet direct dependencies (CPU_V7 && SMP)

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
2013-06-24 16:14:01 +02:00
Arnd Bergmann 123860e1d3 ARM: imx: Synertronixx scb9328 needs to select SOC_IMX1
This is required for building a kernel that enables only
scb9328 and would not get the i.MX1 specific files
otherwise.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Sascha Hauer <kernel@pengutronix.de>
2013-06-24 16:13:14 +02:00
Mohammed, Afzal 22fe3b8969 ARM: OMAP2+: AM43x: resolve SMP related build error
If AM43x and SMP is selected, OMAP4 & OMAP5 deselected, build error as
follows,

arch/arm/mach-omap2/built-in.o: In function `scu_gp_set':
arch/arm/mach-omap2/sleep44xx.S:131: undefined reference to `omap4_get_scu_base'
arch/arm/mach-omap2/sleep44xx.S:132: undefined reference to `scu_power_mode'
arch/arm/mach-omap2/built-in.o: In function `scu_gp_clear':
arch/arm/mach-omap2/sleep44xx.S:227: undefined reference to `omap4_get_scu_base'
arch/arm/mach-omap2/sleep44xx.S:229: undefined reference to `scu_power_mode'

Resolve it by building sleep44xx.S only for OMAP4 & OMAP5.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-24 16:11:21 +02:00
Arnd Bergmann ab1824636d ARM: mxs: don't select HAVE_PWM
The HAVE_PWM symbol is only for legacy platforms that provide
the PWM API without using the generic framework. MXS actually
uses that framework, and selecting the symbol anyway might
cause build errors like

drivers/built-in.o: In function `pwm_beeper_resume':
:(.text+0x1f4fc0): undefined reference to `pwm_config'
:(.text+0x1f4fc8): undefined reference to `pwm_enable'
drivers/built-in.o: In function `pwm_beeper_suspend':
:(.text+0x1f4ffc): undefined reference to `pwm_disable'

when CONFIG_PWM is disabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
2013-06-24 16:04:12 +02:00
Arnd Bergmann 7a9caf59f6 ARM: mxs: stub out mxs_pm_init for !CONFIG_PM
When building a kernel without CONFIG_PM, we get a link
error from referencing mxs_pm_init in the machine
descriptor. This defines a macro to NULL for that case.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
2013-06-24 16:03:13 +02:00
Gregory CLEMENT 3e0a07f8c4 ARM: 7773/1: PJ4B: Add support for errata 4742
This commit fixes the regression on Armada 370 (the kernal hang during
boot) introduced by the commit: "ARM: 7691/1: mm: kill unused
TLB_CAN_READ_FROM_L1_CACHE and use ALT_SMP instead".

When coming out of either a Wait for Interrupt (WFI) or a Wait for
Event (WFE) IDLE states, a specific timing sensitivity exists between
the retiring WFI/WFE instructions and the newly issued subsequent
instructions. This sensitivity can result in a CPU hang scenario.  The
workaround is to insert either a Data Synchronization Barrier (DSB) or
Data Memory Barrier (DMB) command immediately after the WFI/WFE
instruction.

This commit was based on the work of Lior Amsalem, but heavily
modified to apply the errata fix dynamically according to the
processor type thanks to the suggestions of Russell King and Nicolas
Pitre.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Willy Tarreau <w@1wt.eu>
Cc: <stable@vger.kernel.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-06-24 14:28:46 +01:00
Simon Baatz 63384fd0b1 ARM: 7772/1: Fix missing flush_kernel_dcache_page() for noMMU
Commit 1bc3974 (ARM: 7755/1: handle user space mapped pages in
flush_kernel_dcache_page) moved the implementation of
flush_kernel_dcache_page() into mm/flush.c but did not implement it
on noMMU ARM.

Signed-off-by: Simon Baatz <gmbnomis@gmail.com>
Acked-by: Kevin Hilman <khilman@linaro.org>
Cc: <stable@vger.kernel.org> # 3.2+: 1bc3974: ARM: 7755/1
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-06-24 14:28:44 +01:00
Lorenzo Pieralisi 18d7f152df ARM: 7763/1: kernel: fix __cpu_logical_map default initialization
The __cpu_logical_map array is statically initialized to 0, which is a valid
MPIDR value. To prevent issues with the current implementation, this patch
defines an MPIDR_INVALID value, and statically initializes the
__cpu_logical_map[] array to it. Entries in the arm_dt_init_cpu_maps()
tmp_map array used to stash DT reg properties while parsing DT are initialized
with the MPIDR_INVALID value as well for consistency.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-06-24 14:28:43 +01:00
Lorenzo Pieralisi 1ba9bf0a9a ARM: 7762/1: kernel: fix arm_dt_init_cpu_maps() to skip non-cpu nodes
The introduction of the cpu-map topology node in the cpus node implies
that cpus node might have children that are not cpu nodes. The DT
parsing code needs updating otherwise it would check for cpu nodes
properties in nodes that are not required to contain them, resulting
in warnings that have no bearing on bindings defined in the dts source file.

Cc: <stable@vger.kernel.org> [3.8+]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-06-24 14:25:42 +01:00
Jonas Jensen 8182a34d85 ARM: 7760/1: cpu_fa526_do_idle: remove WFI
As it was already suggested by Russell King and Arnd Bergmann:

https://lkml.org/lkml/2013/5/16/133

moxart and gemini seem to be the only platforms using CPU_FA526,
and instead of pointing arm_pm_idle to an empty function from
platform code, it makes sense to remove WFI code from the processor
specific idle function.

Applies to arm-soc/for-next (and 3.10-rc1).

Changes since v1:

1. remove WFI but make sure cpu_fa526_do_idle do not fall through
   to cpu_fa526_dcache_clean_area

Note: moxart boots and prints to UART without this patch, but input is broken.

Signed-off-by: Jonas Jensen <jonas.jensen@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-06-24 14:25:41 +01:00
Matt Porter e65abbbc52 dmaengine: edma: enable build for AM33XX
Enable TI EDMA option on OMAP and TI_PRIV_EDMA

Signed-off-by: Matt Porter <mporter@ti.com>
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2013-06-24 15:55:08 +05:30
Matt Porter 2646a0e52b ARM: edma: Add EDMA crossbar event mux support
EDMA supports a cross bar which provides ability
to mux additional events into physical channels
present in the channel controller.

This is required when the number of events present
in the system are more than number of available
physical channels.

Changes by Joel:
* Split EDMA xbar support out of original EDMA DT parsing patch
to keep it easier for review.
* Rewrite shift and offset calculation.

Suggested-by: Sekhar Nori <nsekhar@ti.com>
Suggested by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
[nsekhar@ti.com: fix checkpatch errors and a minor coding improvement]
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2013-06-24 14:08:34 +05:30
Matt Porter 6cba435506 ARM: edma: Add DT and runtime PM support to the private EDMA API
Adds support for parsing the TI EDMA DT data into the required EDMA
private API platform data. Enables runtime PM support to initialize
the EDMA hwmod. Enables build on OMAP.

Changes by Joel:
* Setup default one-to-one mapping for queue_priority and queue_tc
mapping as discussed in [1].
* Split out xbar stuff to separate patch. [1]
* Dropped unused DT helper to convert to array
* Fixed dangling pointer issue with Sekhar's changes

[1] https://patchwork.kernel.org/patch/2226761/

Signed-off-by: Matt Porter <mporter@ti.com>
[nsekhar@ti.com: fix checkpatch errors, build breakages. Introduce
edma_setup_info_from_dt() as part of that effort]
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2013-06-24 14:08:26 +05:30
Ezequiel Garcia cdd8e498c9 ARM: mvebu: fix length of ethernet registers in mv78260 dtsi
The length of the registers area for the Marvell 370/XP Ethernet controller
was incorrect in the .dtsi: 0x2500, while it should have been 0x4000.
This problem wasn't noticed because there used to be a static mapping for
all the MMIO register region set up by ->map_io().

The register length was fixed in all the other device tree files,
except from the armada-xp-mv78260.dtsi, in the following commit:

  commit cf8088c5ca
  Author: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  Date:   Tue May 21 12:33:27 2013 +0200

    arm: mvebu: fix length of Ethernet registers area in .dtsi

This commit fixes a kernel panic in mvneta_probe(), when the kernel
tries to access the unmapped registers:

[  163.639092] mvneta d0070000.ethernet eth0: mac: 6e:3c:4f:87:17:2e
[  163.646962] mvneta d0074000.ethernet eth1: mac: 6a:04:4e:6f:f5:ef
[  163.654853] mvneta d0030000.ethernet eth2: mac: 2a:99:19:19:fc:4c
[  163.661258] Unable to handle kernel paging request at virtual address f011bcf0
[  163.668523] pgd = c0004000
[  163.671237] [f011bcf0] *pgd=2f006811, *pte=00000000, *ppte=00000000
[  163.677565] Internal error: Oops: 807 [#1] SMP ARM
[  163.682370] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.0-rc6-01850-gba0682e #11
[  163.690046] task: ef04c000 ti: ef03e000 task.ti: ef03e000
[  163.695467] PC is at mvneta_probe+0x34c/0xabc
[...]

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-06-23 21:46:12 +00:00
Linus Torvalds f3c15b0a12 ARM: SoC fixes for 3.10-rc
These are two fixes that came in this week, one for a regression we
 introduced in 3.10 in the GIC interrupt code, and the other one
 fixes a typo in newly introduced code.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAUcR9uWCrR//JCVInAQJPOQ/7BQfqxNbQn+DkHK3I3HBYDzFgaVr4Up9N
 JXgQnjrSjdGL0B0IaBaCTx95wv7DW9vsQk0sz6Hb38OFYpI5vn/77am35AEAmOtX
 0OpFsTWM6iPiJMW0js4xWtDMDICNaFpnUWHMmO3dKMQJztvyHnzhsoWfWqlIZImV
 ml2HLeCYnFfM6vYUwTV5AHyCXMa4n7ODyIMouptCPlzIdPyTROUCBbP3obREW3AO
 RTnoOXsZnPkIrAySPtuCflGaUCKQzorvHQiQd+ye3KBbpgwwMHyl8SDKZws6Aes1
 f4P539YnuIrm7Sh418MOsKx7/Vo4c+8GxONKSX4fduX6bSlkAba7zBQUcS2FGF8C
 RzVeF4lfBCv3F/QcnDWzI0qMvbUgvYXbMH9HUv5BiNed412oUXAaPbZ7/3TpLSq+
 nsip8SY+HTo10e+k2dunBgSYk6EyP6aGoNEgS3STOlO5PAQVoy7urK7CjwLUmBrM
 IYaX/lmNWJjoWqMJtLYBVvr/n59420WO2VkmBh6OM/jKVE/ZO323AsIorGmlNmoY
 p2jtQ2q/x7rJ7PVlDgqUf18siiqyada4RwmvapmZkQwbMYppX4GPbF0KjylQO+g5
 9EH1xH9NK5GOr6JxqyMoDyl0EPOtfveie0xKPhnNVxmi6cgnmlu04HymYO9V5c7K
 1A47eYCn1pc=
 =+4ED
 -----END PGP SIGNATURE-----

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

Pull ARM SoC fixes from Arnd Bergmann:
 "These are two fixes that came in this week, one for a regression we
  introduced in 3.10 in the GIC interrupt code, and the other one fixes
  a typo in newly introduced code"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  irqchip: gic: call gic_cpu_init() as well in CPU_STARTING_FROZEN case
  ARM: dts: Correct the base address of pinctrl_3 on Exynos5250
2013-06-22 09:44:45 -10:00
Daniel Tang 9851ca5774 arm: Add Initial TI-Nspire support
This patch adds support for the TI-Nspire platform.

Changes between v1 and v2:
* Added GENERIC_IRQ_CHIP to platform Kconfig

Signed-off-by: Daniel Tang <dt.tangr@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-21 20:06:30 +02:00
Daniel Tang d907849e0d arm: Add device trees for TI-Nspire hardware
This patch adds device trees for describing the TI-Nspire hardware.

Changes between v1 and v2:
* Change "keymap" binding to the standard "linux,keymap" binding.

Signed-off-by: Daniel Tang <dt.tangr@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-21 20:06:29 +02:00
Arnd Bergmann 4de1236010 mvebu register map changes for v3.11 (round 2)
This series removes the hardcoded register base address for mvebu.
 
 For round 2:
  - multiplatform
     - fix booting on anything other than mvebu
 
 Depends (none new for round 2):
  - mvebu/fixes-non-critical (up to tags/fixes-non-3.11-1)
  - mvebu/cleanup (up to tags/cleanup-3.11-3)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.20 (GNU/Linux)
 
 iQEcBAABAgAGBQJRxICoAAoJEAi3KVZQDZAeOK8H/0k4YVpRqGlOvJ4iyeO0YTx/
 n0Mz+piw6Ra5U+EiaAZ0sDNO9eceDj88mZza0xEm2bfYCy2Lr2UA0TDCG/3V2WPM
 ye8Avr9PyCVAGgS9SuNH9oBIxFa5nVOsPje/qsZDEKsU9LrbjCXBudtRTyiH+E8K
 rfLi822eXS1Ckh2rpYL0XxIho2630vduAZpCecaRvvjXFqWRBfoR3N9k2LOgJC3l
 SSmBQs7H+C7QYh1iZwemMixh2W+Ck0qiGttfIrEYeKuWpo9+5hyLvvqLZVpjA67D
 kyYnyJ/OPMP4W4DoATtiGgKsCTj3IMPiC/yMCgFMocl5gUXuLqf//d3g2Uc/3UY=
 =SY7t
 -----END PGP SIGNATURE-----

Merge tag 'regmap-3.11-2' of git://git.infradead.org/users/jcooper/linux into next/soc

From Jason Cooper:

mvebu register map changes for v3.11 (round 2)

This series removes the hardcoded register base address for mvebu.

For round 2:
 - multiplatform
    - fix booting on anything other than mvebu

Depends (none new for round 2):
 - mvebu/fixes-non-critical (up to tags/fixes-non-3.11-1)
 - mvebu/cleanup (up to tags/cleanup-3.11-3)

* tag 'regmap-3.11-2' of git://git.infradead.org/users/jcooper/linux:
  arm: mvebu: fix coherency_late_init() for multiplatform

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-21 20:00:08 +02:00
Arnd Bergmann f7bea65be7 mvebu dt changes for v3.11 (round 6)
- mvebu
     - mini-PCIe connectors on Armada 370 RD
 
  - kirkwood
     - correct internal register ranges translation
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.20 (GNU/Linux)
 
 iQEcBAABAgAGBQJRxIGAAAoJEAi3KVZQDZAeOPQH/0lp/jZ2SGWWV9K/son9w+De
 /mAHe6jK0tlpSDJZATGN2+zTt8f74ElADVyxHdojsMZelzC3TTq12WLWpRD/fvAI
 lwCTVQnRwNzFX9x/rjEYv/RsbhlSSvv8lGn3OGm8Mw0B6BSikgHDsralGG0NfaQB
 mHoqL0lmE9BZnMuuHZrEu6S4Sp7fNombMgL7WmbAh1O1IDJpifBlu1Pa10LKo0/D
 cCZutG2FSqBLekTiCv3Uz7NovIGManHnezVUkxtyoeUohdKA8Q0U0dGpNcxl4dh2
 ZJeU35n3EZBEWbHh4HPnZrtil/7okr6fDG9jI6s4OQVKy6glAq9KcF6v2UjSXnI=
 =APBh
 -----END PGP SIGNATURE-----

Merge tag 'dt-3.11-6' of git://git.infradead.org/users/jcooper/linux into next/dt

From Jason Cooper:

mvebu dt changes for v3.11 (round 6)

 - mvebu
    - mini-PCIe connectors on Armada 370 RD

 - kirkwood
    - correct internal register ranges translation

* tag 'dt-3.11-6' of git://git.infradead.org/users/jcooper/linux:
  ARM: Kirkwood: Fix the internal register ranges translation
  arm: mvebu: enable mini-PCIe connectors on Armada 370 RD

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-21 19:54:13 +02:00
Stephen Boyd 629a6a2b77 sched_clock: Add temporary asm/sched_clock.h
Some new users of the ARM sched_clock framework are going through
the arm-soc tree. Before 38ff87f (sched_clock: Make ARM's
sched_clock generic for all architectures, 2013-06-01) the header
file was in asm, but now it's in linux. One solution would be to
do an evil merge of the arm-soc tree and fix up the asm users,
but it's easier to add a temporary asm header that we can remove
along with the few stragglers after the merge window is over.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
2013-06-21 10:17:44 -07:00
Ezequiel Garcia 01db527e65 ARM: Kirkwood: Fix the internal register ranges translation
Although the internal register window size is 1 MiB, the previous
ranges translation for the internal register space had a size of
0x4000000. This was done to allow the crypto and nand node to access
the corresponding 'sram' and 'nand' decoding windows.

In order to describe the hardware more accurately, we declare the
real 1 MiB internal register space in the ranges, and add a translation
entry for the nand node to access the 'nand' window.

This commit will make future improvements on the MBus DT binding easier.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-06-21 15:38:20 +00:00
Daniel Lezcano a008dad702 ARM: at91: cpuidle: Fix target_residency
The following commit:

commit 7e348b9012
Author: Robert Lee <rob.lee@linaro.org>
Date:   Tue Mar 20 15:22:43 2012 -0500

    ARM: at91: Consolidate time keeping and irq enable

    Enable core cpuidle timekeeping and irq enabling and remove that
    handling from this code.

introduced an additional zero to the state1 (suspend) target residency.

With a periodic tick, the cpu never enters the state1 with both 10000 and
100000.

With a tickless system, it enters to state1 much more often with the
initial value, roughly x7 more.

Fix it by setting the value to 10ms again.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
[nicola.ferre@atmel.com: add precisions given by Daniel to commit message]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2013-06-21 16:52:00 +02:00
Jean-Christophe PLAGNIOL-VILLARD 546c830c90 ARM: at91: fix at91_extern_irq usage for non-dt boards
Since 4b68520dc0ec96153bc0d87bca5ffba508edfcf
ARM: at91: add AIC5 support

we allocate the at91_extern_irq.

This patch makes it static and stores the non-dt extern irq in the soc
structure. It is then possible to use a at91_get_extern_irq() function
to get the value for outside of the irq driver. It is useful for passing
its value to at91_aic_init().

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
[nicolas.ferre@atmel.com: rework commit message]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2013-06-21 16:35:26 +02:00