forked from Minki/linux
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Four minor merge conflicts: 1) qca_spi.c renamed the local variable used for the SPI device from spi_device to spi, meanwhile the spi_set_drvdata() call got moved further up in the probe function. 2) Two changes were both adding new members to codel params structure, and thus we had overlapping changes to the initializer function. 3) 'net' was making a fix to sk_release_kernel() which is completely removed in 'net-next'. 4) In net_namespace.c, the rtnl_net_fill() call for GET operations had the command value fixed, meanwhile 'net-next' adjusted the argument signature a bit. This also matches example merge resolutions posted by Stephen Rothwell over the past two days. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
b04096ff33
7
CREDITS
7
CREDITS
@ -3709,6 +3709,13 @@ N: Dirk Verworner
|
|||||||
D: Co-author of German book ``Linux-Kernel-Programmierung''
|
D: Co-author of German book ``Linux-Kernel-Programmierung''
|
||||||
D: Co-founder of Berlin Linux User Group
|
D: Co-founder of Berlin Linux User Group
|
||||||
|
|
||||||
|
N: Andrew Victor
|
||||||
|
E: linux@maxim.org.za
|
||||||
|
W: http://maxim.org.za/at91_26.html
|
||||||
|
D: First maintainer of Atmel ARM-based SoC, aka AT91
|
||||||
|
D: Introduced support for at91rm9200, the first chip of AT91 family
|
||||||
|
S: South Africa
|
||||||
|
|
||||||
N: Riku Voipio
|
N: Riku Voipio
|
||||||
E: riku.voipio@iki.fi
|
E: riku.voipio@iki.fi
|
||||||
D: Author of PCA9532 LED and Fintek f75375s hwmon driver
|
D: Author of PCA9532 LED and Fintek f75375s hwmon driver
|
||||||
|
@ -505,7 +505,10 @@ at module load time (for a module) with:
|
|||||||
|
|
||||||
The addresses are normal I2C addresses. The adapter is the string
|
The addresses are normal I2C addresses. The adapter is the string
|
||||||
name of the adapter, as shown in /sys/class/i2c-adapter/i2c-<n>/name.
|
name of the adapter, as shown in /sys/class/i2c-adapter/i2c-<n>/name.
|
||||||
It is *NOT* i2c-<n> itself.
|
It is *NOT* i2c-<n> itself. Also, the comparison is done ignoring
|
||||||
|
spaces, so if the name is "This is an I2C chip" you can say
|
||||||
|
adapter_name=ThisisanI2cchip. This is because it's hard to pass in
|
||||||
|
spaces in kernel parameters.
|
||||||
|
|
||||||
The debug flags are bit flags for each BMC found, they are:
|
The debug flags are bit flags for each BMC found, they are:
|
||||||
IPMI messages: 1, driver state: 2, timing: 4, I2C probe: 8
|
IPMI messages: 1, driver state: 2, timing: 4, I2C probe: 8
|
||||||
|
@ -253,7 +253,7 @@ input driver:
|
|||||||
GPIO support
|
GPIO support
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
ACPI 5 introduced two new resources to describe GPIO connections: GpioIo
|
ACPI 5 introduced two new resources to describe GPIO connections: GpioIo
|
||||||
and GpioInt. These resources are used be used to pass GPIO numbers used by
|
and GpioInt. These resources can be used to pass GPIO numbers used by
|
||||||
the device to the driver. ACPI 5.1 extended this with _DSD (Device
|
the device to the driver. ACPI 5.1 extended this with _DSD (Device
|
||||||
Specific Data) which made it possible to name the GPIOs among other things.
|
Specific Data) which made it possible to name the GPIOs among other things.
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
_DSD Device Properties Related to GPIO
|
_DSD Device Properties Related to GPIO
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
|
||||||
With the release of ACPI 5.1 and the _DSD configuration objecte names
|
With the release of ACPI 5.1, the _DSD configuration object finally
|
||||||
can finally be given to GPIOs (and other things as well) returned by
|
allows names to be given to GPIOs (and other things as well) returned
|
||||||
_CRS. Previously, we were only able to use an integer index to find
|
by _CRS. Previously, we were only able to use an integer index to find
|
||||||
the corresponding GPIO, which is pretty error prone (it depends on
|
the corresponding GPIO, which is pretty error prone (it depends on
|
||||||
the _CRS output ordering, for example).
|
the _CRS output ordering, for example).
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ provided by Arteris.
|
|||||||
Required properties:
|
Required properties:
|
||||||
- compatible : Should be "ti,omap3-l3-smx" for OMAP3 family
|
- compatible : Should be "ti,omap3-l3-smx" for OMAP3 family
|
||||||
Should be "ti,omap4-l3-noc" for OMAP4 family
|
Should be "ti,omap4-l3-noc" for OMAP4 family
|
||||||
|
Should be "ti,omap5-l3-noc" for OMAP5 family
|
||||||
Should be "ti,dra7-l3-noc" for DRA7 family
|
Should be "ti,dra7-l3-noc" for DRA7 family
|
||||||
Should be "ti,am4372-l3-noc" for AM43 family
|
Should be "ti,am4372-l3-noc" for AM43 family
|
||||||
- reg: Contains L3 register address range for each noc domain.
|
- reg: Contains L3 register address range for each noc domain.
|
||||||
|
@ -38,7 +38,7 @@ dma_apbx: dma-apbx@80024000 {
|
|||||||
80 81 68 69
|
80 81 68 69
|
||||||
70 71 72 73
|
70 71 72 73
|
||||||
74 75 76 77>;
|
74 75 76 77>;
|
||||||
interrupt-names = "auart4-rx", "aurat4-tx", "spdif-tx", "empty",
|
interrupt-names = "auart4-rx", "auart4-tx", "spdif-tx", "empty",
|
||||||
"saif0", "saif1", "i2c0", "i2c1",
|
"saif0", "saif1", "i2c0", "i2c1",
|
||||||
"auart0-rx", "auart0-tx", "auart1-rx", "auart1-tx",
|
"auart0-rx", "auart0-tx", "auart1-rx", "auart1-tx",
|
||||||
"auart2-rx", "auart2-tx", "auart3-rx", "auart3-tx";
|
"auart2-rx", "auart2-tx", "auart3-rx", "auart3-tx";
|
||||||
|
30
Documentation/devicetree/bindings/rtc/abracon,abx80x.txt
Normal file
30
Documentation/devicetree/bindings/rtc/abracon,abx80x.txt
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
Abracon ABX80X I2C ultra low power RTC/Alarm chip
|
||||||
|
|
||||||
|
The Abracon ABX80X family consist of the ab0801, ab0803, ab0804, ab0805, ab1801,
|
||||||
|
ab1803, ab1804 and ab1805. The ab0805 is the superset of ab080x and the ab1805
|
||||||
|
is the superset of ab180x.
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
|
||||||
|
- "compatible": should one of:
|
||||||
|
"abracon,abx80x"
|
||||||
|
"abracon,ab0801"
|
||||||
|
"abracon,ab0803"
|
||||||
|
"abracon,ab0804"
|
||||||
|
"abracon,ab0805"
|
||||||
|
"abracon,ab1801"
|
||||||
|
"abracon,ab1803"
|
||||||
|
"abracon,ab1804"
|
||||||
|
"abracon,ab1805"
|
||||||
|
Using "abracon,abx80x" will enable chip autodetection.
|
||||||
|
- "reg": I2C bus address of the device
|
||||||
|
|
||||||
|
Optional properties:
|
||||||
|
|
||||||
|
The abx804 and abx805 have a trickle charger that is able to charge the
|
||||||
|
connected battery or supercap. Both the following properties have to be defined
|
||||||
|
and valid to enable charging:
|
||||||
|
|
||||||
|
- "abracon,tc-diode": should be "standard" (0.6V) or "schottky" (0.3V)
|
||||||
|
- "abracon,tc-resistor": should be <0>, <3>, <6> or <11>. 0 disables the output
|
||||||
|
resistor, the other values are in ohm.
|
@ -9,7 +9,9 @@ a fast and comprehensive solution for finding use-after-free and out-of-bounds
|
|||||||
bugs.
|
bugs.
|
||||||
|
|
||||||
KASan uses compile-time instrumentation for checking every memory access,
|
KASan uses compile-time instrumentation for checking every memory access,
|
||||||
therefore you will need a certain version of GCC > 4.9.2
|
therefore you will need a gcc version of 4.9.2 or later. KASan could detect out
|
||||||
|
of bounds accesses to stack or global variables, but only if gcc 5.0 or later was
|
||||||
|
used to built the kernel.
|
||||||
|
|
||||||
Currently KASan is supported only for x86_64 architecture and requires that the
|
Currently KASan is supported only for x86_64 architecture and requires that the
|
||||||
kernel be built with the SLUB allocator.
|
kernel be built with the SLUB allocator.
|
||||||
@ -23,8 +25,8 @@ To enable KASAN configure kernel with:
|
|||||||
|
|
||||||
and choose between CONFIG_KASAN_OUTLINE and CONFIG_KASAN_INLINE. Outline/inline
|
and choose between CONFIG_KASAN_OUTLINE and CONFIG_KASAN_INLINE. Outline/inline
|
||||||
is compiler instrumentation types. The former produces smaller binary the
|
is compiler instrumentation types. The former produces smaller binary the
|
||||||
latter is 1.1 - 2 times faster. Inline instrumentation requires GCC 5.0 or
|
latter is 1.1 - 2 times faster. Inline instrumentation requires a gcc version
|
||||||
latter.
|
of 5.0 or later.
|
||||||
|
|
||||||
Currently KASAN works only with the SLUB memory allocator.
|
Currently KASAN works only with the SLUB memory allocator.
|
||||||
For better bug detection and nicer report, enable CONFIG_STACKTRACE and put
|
For better bug detection and nicer report, enable CONFIG_STACKTRACE and put
|
||||||
|
@ -74,23 +74,22 @@ Causes of transaction aborts
|
|||||||
Syscalls
|
Syscalls
|
||||||
========
|
========
|
||||||
|
|
||||||
Syscalls made from within an active transaction will not be performed and the
|
Performing syscalls from within transaction is not recommended, and can lead
|
||||||
transaction will be doomed by the kernel with the failure code TM_CAUSE_SYSCALL
|
to unpredictable results.
|
||||||
| TM_CAUSE_PERSISTENT.
|
|
||||||
|
|
||||||
Syscalls made from within a suspended transaction are performed as normal and
|
Syscalls do not by design abort transactions, but beware: The kernel code will
|
||||||
the transaction is not explicitly doomed by the kernel. However, what the
|
not be running in transactional state. The effect of syscalls will always
|
||||||
kernel does to perform the syscall may result in the transaction being doomed
|
remain visible, but depending on the call they may abort your transaction as a
|
||||||
by the hardware. The syscall is performed in suspended mode so any side
|
side-effect, read soon-to-be-aborted transactional data that should not remain
|
||||||
effects will be persistent, independent of transaction success or failure. No
|
invisible, etc. If you constantly retry a transaction that constantly aborts
|
||||||
guarantees are provided by the kernel about which syscalls will affect
|
itself by calling a syscall, you'll have a livelock & make no progress.
|
||||||
transaction success.
|
|
||||||
|
|
||||||
Care must be taken when relying on syscalls to abort during active transactions
|
Simple syscalls (e.g. sigprocmask()) "could" be OK. Even things like write()
|
||||||
if the calls are made via a library. Libraries may cache values (which may
|
from, say, printf() should be OK as long as the kernel does not access any
|
||||||
give the appearance of success) or perform operations that cause transaction
|
memory that was accessed transactionally.
|
||||||
failure before entering the kernel (which may produce different failure codes).
|
|
||||||
Examples are glibc's getpid() and lazy symbol resolution.
|
Consider any syscalls that happen to work as debug-only -- not recommended for
|
||||||
|
production use. Best to queue them up till after the transaction is over.
|
||||||
|
|
||||||
|
|
||||||
Signals
|
Signals
|
||||||
@ -177,7 +176,8 @@ kernel aborted a transaction:
|
|||||||
TM_CAUSE_RESCHED Thread was rescheduled.
|
TM_CAUSE_RESCHED Thread was rescheduled.
|
||||||
TM_CAUSE_TLBI Software TLB invalid.
|
TM_CAUSE_TLBI Software TLB invalid.
|
||||||
TM_CAUSE_FAC_UNAV FP/VEC/VSX unavailable trap.
|
TM_CAUSE_FAC_UNAV FP/VEC/VSX unavailable trap.
|
||||||
TM_CAUSE_SYSCALL Syscall from active transaction.
|
TM_CAUSE_SYSCALL Currently unused; future syscalls that must abort
|
||||||
|
transactions for consistency will use this.
|
||||||
TM_CAUSE_SIGNAL Signal delivered.
|
TM_CAUSE_SIGNAL Signal delivered.
|
||||||
TM_CAUSE_MISC Currently unused.
|
TM_CAUSE_MISC Currently unused.
|
||||||
TM_CAUSE_ALIGNMENT Alignment fault.
|
TM_CAUSE_ALIGNMENT Alignment fault.
|
||||||
|
58
MAINTAINERS
58
MAINTAINERS
@ -892,11 +892,10 @@ S: Maintained
|
|||||||
F: arch/arm/mach-alpine/
|
F: arch/arm/mach-alpine/
|
||||||
|
|
||||||
ARM/ATMEL AT91RM9200 AND AT91SAM ARM ARCHITECTURES
|
ARM/ATMEL AT91RM9200 AND AT91SAM ARM ARCHITECTURES
|
||||||
M: Andrew Victor <linux@maxim.org.za>
|
|
||||||
M: Nicolas Ferre <nicolas.ferre@atmel.com>
|
M: Nicolas Ferre <nicolas.ferre@atmel.com>
|
||||||
|
M: Alexandre Belloni <alexandre.belloni@free-electrons.com>
|
||||||
M: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
|
M: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
|
||||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||||
W: http://maxim.org.za/at91_26.html
|
|
||||||
W: http://www.linux4sam.org
|
W: http://www.linux4sam.org
|
||||||
S: Supported
|
S: Supported
|
||||||
F: arch/arm/mach-at91/
|
F: arch/arm/mach-at91/
|
||||||
@ -990,6 +989,12 @@ F: drivers/clocksource/timer-prima2.c
|
|||||||
F: drivers/clocksource/timer-atlas7.c
|
F: drivers/clocksource/timer-atlas7.c
|
||||||
N: [^a-z]sirf
|
N: [^a-z]sirf
|
||||||
|
|
||||||
|
ARM/CONEXANT DIGICOLOR MACHINE SUPPORT
|
||||||
|
M: Baruch Siach <baruch@tkos.co.il>
|
||||||
|
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||||
|
S: Maintained
|
||||||
|
N: digicolor
|
||||||
|
|
||||||
ARM/EBSA110 MACHINE SUPPORT
|
ARM/EBSA110 MACHINE SUPPORT
|
||||||
M: Russell King <linux@arm.linux.org.uk>
|
M: Russell King <linux@arm.linux.org.uk>
|
||||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||||
@ -1439,9 +1444,10 @@ ARM/SOCFPGA ARCHITECTURE
|
|||||||
M: Dinh Nguyen <dinguyen@opensource.altera.com>
|
M: Dinh Nguyen <dinguyen@opensource.altera.com>
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: arch/arm/mach-socfpga/
|
F: arch/arm/mach-socfpga/
|
||||||
|
F: arch/arm/boot/dts/socfpga*
|
||||||
|
F: arch/arm/configs/socfpga_defconfig
|
||||||
W: http://www.rocketboards.org
|
W: http://www.rocketboards.org
|
||||||
T: git://git.rocketboards.org/linux-socfpga.git
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux.git
|
||||||
T: git://git.rocketboards.org/linux-socfpga-next.git
|
|
||||||
|
|
||||||
ARM/SOCFPGA CLOCK FRAMEWORK SUPPORT
|
ARM/SOCFPGA CLOCK FRAMEWORK SUPPORT
|
||||||
M: Dinh Nguyen <dinguyen@opensource.altera.com>
|
M: Dinh Nguyen <dinguyen@opensource.altera.com>
|
||||||
@ -2116,8 +2122,9 @@ S: Supported
|
|||||||
F: drivers/net/ethernet/broadcom/bnx2x/
|
F: drivers/net/ethernet/broadcom/bnx2x/
|
||||||
|
|
||||||
BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITECTURE
|
BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITECTURE
|
||||||
M: Christian Daudt <bcm@fixthebug.org>
|
|
||||||
M: Florian Fainelli <f.fainelli@gmail.com>
|
M: Florian Fainelli <f.fainelli@gmail.com>
|
||||||
|
M: Ray Jui <rjui@broadcom.com>
|
||||||
|
M: Scott Branden <sbranden@broadcom.com>
|
||||||
L: bcm-kernel-feedback-list@broadcom.com
|
L: bcm-kernel-feedback-list@broadcom.com
|
||||||
T: git git://github.com/broadcom/mach-bcm
|
T: git git://github.com/broadcom/mach-bcm
|
||||||
S: Maintained
|
S: Maintained
|
||||||
@ -2168,7 +2175,6 @@ S: Maintained
|
|||||||
F: drivers/usb/gadget/udc/bcm63xx_udc.*
|
F: drivers/usb/gadget/udc/bcm63xx_udc.*
|
||||||
|
|
||||||
BROADCOM BCM7XXX ARM ARCHITECTURE
|
BROADCOM BCM7XXX ARM ARCHITECTURE
|
||||||
M: Marc Carino <marc.ceeeee@gmail.com>
|
|
||||||
M: Brian Norris <computersforpeace@gmail.com>
|
M: Brian Norris <computersforpeace@gmail.com>
|
||||||
M: Gregory Fong <gregory.0xf0@gmail.com>
|
M: Gregory Fong <gregory.0xf0@gmail.com>
|
||||||
M: Florian Fainelli <f.fainelli@gmail.com>
|
M: Florian Fainelli <f.fainelli@gmail.com>
|
||||||
@ -3413,6 +3419,13 @@ F: drivers/gpu/drm/rcar-du/
|
|||||||
F: drivers/gpu/drm/shmobile/
|
F: drivers/gpu/drm/shmobile/
|
||||||
F: include/linux/platform_data/shmob_drm.h
|
F: include/linux/platform_data/shmob_drm.h
|
||||||
|
|
||||||
|
DRM DRIVERS FOR ROCKCHIP
|
||||||
|
M: Mark Yao <mark.yao@rock-chips.com>
|
||||||
|
L: dri-devel@lists.freedesktop.org
|
||||||
|
S: Maintained
|
||||||
|
F: drivers/gpu/drm/rockchip/
|
||||||
|
F: Documentation/devicetree/bindings/video/rockchip*
|
||||||
|
|
||||||
DSBR100 USB FM RADIO DRIVER
|
DSBR100 USB FM RADIO DRIVER
|
||||||
M: Alexey Klimov <klimov.linux@gmail.com>
|
M: Alexey Klimov <klimov.linux@gmail.com>
|
||||||
L: linux-media@vger.kernel.org
|
L: linux-media@vger.kernel.org
|
||||||
@ -4364,11 +4377,10 @@ F: fs/gfs2/
|
|||||||
F: include/uapi/linux/gfs2_ondisk.h
|
F: include/uapi/linux/gfs2_ondisk.h
|
||||||
|
|
||||||
GIGASET ISDN DRIVERS
|
GIGASET ISDN DRIVERS
|
||||||
M: Hansjoerg Lipp <hjlipp@web.de>
|
M: Paul Bolle <pebolle@tiscali.nl>
|
||||||
M: Tilman Schmidt <tilman@imap.cc>
|
|
||||||
L: gigaset307x-common@lists.sourceforge.net
|
L: gigaset307x-common@lists.sourceforge.net
|
||||||
W: http://gigaset307x.sourceforge.net/
|
W: http://gigaset307x.sourceforge.net/
|
||||||
S: Maintained
|
S: Odd Fixes
|
||||||
F: Documentation/isdn/README.gigaset
|
F: Documentation/isdn/README.gigaset
|
||||||
F: drivers/isdn/gigaset/
|
F: drivers/isdn/gigaset/
|
||||||
F: include/uapi/linux/gigaset_dev.h
|
F: include/uapi/linux/gigaset_dev.h
|
||||||
@ -5035,17 +5047,19 @@ S: Orphan
|
|||||||
F: drivers/video/fbdev/imsttfb.c
|
F: drivers/video/fbdev/imsttfb.c
|
||||||
|
|
||||||
INFINIBAND SUBSYSTEM
|
INFINIBAND SUBSYSTEM
|
||||||
M: Roland Dreier <roland@kernel.org>
|
M: Doug Ledford <dledford@redhat.com>
|
||||||
M: Sean Hefty <sean.hefty@intel.com>
|
M: Sean Hefty <sean.hefty@intel.com>
|
||||||
M: Hal Rosenstock <hal.rosenstock@gmail.com>
|
M: Hal Rosenstock <hal.rosenstock@gmail.com>
|
||||||
L: linux-rdma@vger.kernel.org
|
L: linux-rdma@vger.kernel.org
|
||||||
W: http://www.openfabrics.org/
|
W: http://www.openfabrics.org/
|
||||||
Q: http://patchwork.kernel.org/project/linux-rdma/list/
|
Q: http://patchwork.kernel.org/project/linux-rdma/list/
|
||||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma.git
|
||||||
S: Supported
|
S: Supported
|
||||||
F: Documentation/infiniband/
|
F: Documentation/infiniband/
|
||||||
F: drivers/infiniband/
|
F: drivers/infiniband/
|
||||||
F: include/uapi/linux/if_infiniband.h
|
F: include/uapi/linux/if_infiniband.h
|
||||||
|
F: include/uapi/rdma/
|
||||||
|
F: include/rdma/
|
||||||
|
|
||||||
INOTIFY
|
INOTIFY
|
||||||
M: John McCutchan <john@johnmccutchan.com>
|
M: John McCutchan <john@johnmccutchan.com>
|
||||||
@ -5798,6 +5812,7 @@ F: drivers/scsi/53c700*
|
|||||||
LED SUBSYSTEM
|
LED SUBSYSTEM
|
||||||
M: Bryan Wu <cooloney@gmail.com>
|
M: Bryan Wu <cooloney@gmail.com>
|
||||||
M: Richard Purdie <rpurdie@rpsys.net>
|
M: Richard Purdie <rpurdie@rpsys.net>
|
||||||
|
M: Jacek Anaszewski <j.anaszewski@samsung.com>
|
||||||
L: linux-leds@vger.kernel.org
|
L: linux-leds@vger.kernel.org
|
||||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds.git
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds.git
|
||||||
S: Maintained
|
S: Maintained
|
||||||
@ -6943,6 +6958,17 @@ T: git git://git.rocketboards.org/linux-socfpga-next.git
|
|||||||
S: Maintained
|
S: Maintained
|
||||||
F: arch/nios2/
|
F: arch/nios2/
|
||||||
|
|
||||||
|
NOKIA N900 POWER SUPPLY DRIVERS
|
||||||
|
M: Pali Rohár <pali.rohar@gmail.com>
|
||||||
|
S: Maintained
|
||||||
|
F: include/linux/power/bq2415x_charger.h
|
||||||
|
F: include/linux/power/bq27x00_battery.h
|
||||||
|
F: include/linux/power/isp1704_charger.h
|
||||||
|
F: drivers/power/bq2415x_charger.c
|
||||||
|
F: drivers/power/bq27x00_battery.c
|
||||||
|
F: drivers/power/isp1704_charger.c
|
||||||
|
F: drivers/power/rx51_battery.c
|
||||||
|
|
||||||
NTB DRIVER
|
NTB DRIVER
|
||||||
M: Jon Mason <jdmason@kudzu.us>
|
M: Jon Mason <jdmason@kudzu.us>
|
||||||
M: Dave Jiang <dave.jiang@intel.com>
|
M: Dave Jiang <dave.jiang@intel.com>
|
||||||
@ -8800,10 +8826,11 @@ W: http://www.emulex.com
|
|||||||
S: Supported
|
S: Supported
|
||||||
F: drivers/scsi/be2iscsi/
|
F: drivers/scsi/be2iscsi/
|
||||||
|
|
||||||
SERVER ENGINES 10Gbps NIC - BladeEngine 2 DRIVER
|
Emulex 10Gbps NIC BE2, BE3-R, Lancer, Skyhawk-R DRIVER
|
||||||
M: Sathya Perla <sathya.perla@emulex.com>
|
M: Sathya Perla <sathya.perla@avagotech.com>
|
||||||
M: Subbu Seetharaman <subbu.seetharaman@emulex.com>
|
M: Ajit Khaparde <ajit.khaparde@avagotech.com>
|
||||||
M: Ajit Khaparde <ajit.khaparde@emulex.com>
|
M: Padmanabh Ratnakar <padmanabh.ratnakar@avagotech.com>
|
||||||
|
M: Sriharsha Basavapatna <sriharsha.basavapatna@avagotech.com>
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
W: http://www.emulex.com
|
W: http://www.emulex.com
|
||||||
S: Supported
|
S: Supported
|
||||||
@ -11030,6 +11057,7 @@ F: drivers/media/pci/zoran/
|
|||||||
ZRAM COMPRESSED RAM BLOCK DEVICE DRVIER
|
ZRAM COMPRESSED RAM BLOCK DEVICE DRVIER
|
||||||
M: Minchan Kim <minchan@kernel.org>
|
M: Minchan Kim <minchan@kernel.org>
|
||||||
M: Nitin Gupta <ngupta@vflare.org>
|
M: Nitin Gupta <ngupta@vflare.org>
|
||||||
|
R: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
|
||||||
L: linux-kernel@vger.kernel.org
|
L: linux-kernel@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/block/zram/
|
F: drivers/block/zram/
|
||||||
|
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
|||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 1
|
PATCHLEVEL = 1
|
||||||
SUBLEVEL = 0
|
SUBLEVEL = 0
|
||||||
EXTRAVERSION = -rc1
|
EXTRAVERSION = -rc3
|
||||||
NAME = Hurr durr I'ma sheep
|
NAME = Hurr durr I'ma sheep
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
pinctrl-0 = <&matrix_keypad_pins>;
|
pinctrl-0 = <&matrix_keypad_pins>;
|
||||||
|
|
||||||
debounce-delay-ms = <5>;
|
debounce-delay-ms = <5>;
|
||||||
col-scan-delay-us = <1500>;
|
col-scan-delay-us = <5>;
|
||||||
|
|
||||||
row-gpios = <&gpio5 5 GPIO_ACTIVE_HIGH /* Bank5, pin5 */
|
row-gpios = <&gpio5 5 GPIO_ACTIVE_HIGH /* Bank5, pin5 */
|
||||||
&gpio5 6 GPIO_ACTIVE_HIGH>; /* Bank5, pin6 */
|
&gpio5 6 GPIO_ACTIVE_HIGH>; /* Bank5, pin6 */
|
||||||
@ -473,7 +473,7 @@
|
|||||||
interrupt-parent = <&gpio0>;
|
interrupt-parent = <&gpio0>;
|
||||||
interrupts = <31 0>;
|
interrupts = <31 0>;
|
||||||
|
|
||||||
wake-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
|
reset-gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
|
||||||
|
|
||||||
touchscreen-size-x = <480>;
|
touchscreen-size-x = <480>;
|
||||||
touchscreen-size-y = <272>;
|
touchscreen-size-y = <272>;
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
aliases {
|
aliases {
|
||||||
rtc0 = &mcp_rtc;
|
rtc0 = &mcp_rtc;
|
||||||
rtc1 = &tps659038_rtc;
|
rtc1 = &tps659038_rtc;
|
||||||
|
rtc2 = &rtc;
|
||||||
};
|
};
|
||||||
|
|
||||||
memory {
|
memory {
|
||||||
@ -83,7 +84,7 @@
|
|||||||
gpio_fan: gpio_fan {
|
gpio_fan: gpio_fan {
|
||||||
/* Based on 5v 500mA AFB02505HHB */
|
/* Based on 5v 500mA AFB02505HHB */
|
||||||
compatible = "gpio-fan";
|
compatible = "gpio-fan";
|
||||||
gpios = <&tps659038_gpio 1 GPIO_ACTIVE_HIGH>;
|
gpios = <&tps659038_gpio 2 GPIO_ACTIVE_HIGH>;
|
||||||
gpio-fan,speed-map = <0 0>,
|
gpio-fan,speed-map = <0 0>,
|
||||||
<13000 1>;
|
<13000 1>;
|
||||||
#cooling-cells = <2>;
|
#cooling-cells = <2>;
|
||||||
@ -130,8 +131,8 @@
|
|||||||
|
|
||||||
uart3_pins_default: uart3_pins_default {
|
uart3_pins_default: uart3_pins_default {
|
||||||
pinctrl-single,pins = <
|
pinctrl-single,pins = <
|
||||||
0x248 (PIN_INPUT_SLEW | MUX_MODE0) /* uart3_rxd.rxd */
|
0x3f8 (PIN_INPUT_SLEW | MUX_MODE2) /* uart2_ctsn.uart3_rxd */
|
||||||
0x24c (PIN_INPUT_SLEW | MUX_MODE0) /* uart3_txd.txd */
|
0x3fc (PIN_INPUT_SLEW | MUX_MODE1) /* uart2_rtsn.uart3_txd */
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -455,7 +456,7 @@
|
|||||||
mcp_rtc: rtc@6f {
|
mcp_rtc: rtc@6f {
|
||||||
compatible = "microchip,mcp7941x";
|
compatible = "microchip,mcp7941x";
|
||||||
reg = <0x6f>;
|
reg = <0x6f>;
|
||||||
interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_LOW>; /* IRQ_SYS_1N */
|
interrupts = <GIC_SPI 2 IRQ_TYPE_EDGE_RISING>; /* IRQ_SYS_1N */
|
||||||
|
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&mcp79410_pins_default>;
|
pinctrl-0 = <&mcp79410_pins_default>;
|
||||||
@ -478,7 +479,7 @@
|
|||||||
&uart3 {
|
&uart3 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
interrupts-extended = <&crossbar_mpu GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
|
interrupts-extended = <&crossbar_mpu GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
|
||||||
<&dra7_pmx_core 0x248>;
|
<&dra7_pmx_core 0x3f8>;
|
||||||
|
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&uart3_pins_default>;
|
pinctrl-0 = <&uart3_pins_default>;
|
||||||
|
@ -105,6 +105,10 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
internal-regs {
|
internal-regs {
|
||||||
|
rtc@10300 {
|
||||||
|
/* No crystal connected to the internal RTC */
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
serial@12000 {
|
serial@12000 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
@ -911,7 +911,7 @@
|
|||||||
ti,clock-cycles = <16>;
|
ti,clock-cycles = <16>;
|
||||||
|
|
||||||
reg = <0x4ae07ddc 0x4>, <0x4ae07de0 0x4>,
|
reg = <0x4ae07ddc 0x4>, <0x4ae07de0 0x4>,
|
||||||
<0x4ae06014 0x4>, <0x4a003b20 0x8>,
|
<0x4ae06014 0x4>, <0x4a003b20 0xc>,
|
||||||
<0x4ae0c158 0x4>;
|
<0x4ae0c158 0x4>;
|
||||||
reg-names = "setup-address", "control-address",
|
reg-names = "setup-address", "control-address",
|
||||||
"int-address", "efuse-address",
|
"int-address", "efuse-address",
|
||||||
@ -944,7 +944,7 @@
|
|||||||
ti,clock-cycles = <16>;
|
ti,clock-cycles = <16>;
|
||||||
|
|
||||||
reg = <0x4ae07e34 0x4>, <0x4ae07e24 0x4>,
|
reg = <0x4ae07e34 0x4>, <0x4ae07e24 0x4>,
|
||||||
<0x4ae06010 0x4>, <0x4a0025cc 0x8>,
|
<0x4ae06010 0x4>, <0x4a0025cc 0xc>,
|
||||||
<0x4a002470 0x4>;
|
<0x4a002470 0x4>;
|
||||||
reg-names = "setup-address", "control-address",
|
reg-names = "setup-address", "control-address",
|
||||||
"int-address", "efuse-address",
|
"int-address", "efuse-address",
|
||||||
@ -977,7 +977,7 @@
|
|||||||
ti,clock-cycles = <16>;
|
ti,clock-cycles = <16>;
|
||||||
|
|
||||||
reg = <0x4ae07e30 0x4>, <0x4ae07e20 0x4>,
|
reg = <0x4ae07e30 0x4>, <0x4ae07e20 0x4>,
|
||||||
<0x4ae06010 0x4>, <0x4a0025e0 0x8>,
|
<0x4ae06010 0x4>, <0x4a0025e0 0xc>,
|
||||||
<0x4a00246c 0x4>;
|
<0x4a00246c 0x4>;
|
||||||
reg-names = "setup-address", "control-address",
|
reg-names = "setup-address", "control-address",
|
||||||
"int-address", "efuse-address",
|
"int-address", "efuse-address",
|
||||||
@ -1010,7 +1010,7 @@
|
|||||||
ti,clock-cycles = <16>;
|
ti,clock-cycles = <16>;
|
||||||
|
|
||||||
reg = <0x4ae07de4 0x4>, <0x4ae07de8 0x4>,
|
reg = <0x4ae07de4 0x4>, <0x4ae07de8 0x4>,
|
||||||
<0x4ae06010 0x4>, <0x4a003b08 0x8>,
|
<0x4ae06010 0x4>, <0x4a003b08 0xc>,
|
||||||
<0x4ae0c154 0x4>;
|
<0x4ae0c154 0x4>;
|
||||||
reg-names = "setup-address", "control-address",
|
reg-names = "setup-address", "control-address",
|
||||||
"int-address", "efuse-address",
|
"int-address", "efuse-address",
|
||||||
@ -1203,7 +1203,7 @@
|
|||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
rtc@48838000 {
|
rtc: rtc@48838000 {
|
||||||
compatible = "ti,am3352-rtc";
|
compatible = "ti,am3352-rtc";
|
||||||
reg = <0x48838000 0x100>;
|
reg = <0x48838000 0x100>;
|
||||||
interrupts = <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
|
interrupts = <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include <dt-bindings/sound/samsung-i2s.h>
|
#include <dt-bindings/sound/samsung-i2s.h>
|
||||||
#include <dt-bindings/input/input.h>
|
#include <dt-bindings/input/input.h>
|
||||||
|
#include <dt-bindings/clock/maxim,max77686.h>
|
||||||
#include "exynos4412.dtsi"
|
#include "exynos4412.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
@ -105,6 +106,8 @@
|
|||||||
|
|
||||||
rtc@10070000 {
|
rtc@10070000 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
clocks = <&clock CLK_RTC>, <&max77686 MAX77686_CLK_AP>;
|
||||||
|
clock-names = "rtc", "rtc_src";
|
||||||
};
|
};
|
||||||
|
|
||||||
g2d@10800000 {
|
g2d@10800000 {
|
||||||
|
@ -567,6 +567,7 @@
|
|||||||
num-slots = <1>;
|
num-slots = <1>;
|
||||||
broken-cd;
|
broken-cd;
|
||||||
cap-sdio-irq;
|
cap-sdio-irq;
|
||||||
|
keep-power-in-suspend;
|
||||||
card-detect-delay = <200>;
|
card-detect-delay = <200>;
|
||||||
samsung,dw-mshc-ciu-div = <3>;
|
samsung,dw-mshc-ciu-div = <3>;
|
||||||
samsung,dw-mshc-sdr-timing = <2 3>;
|
samsung,dw-mshc-sdr-timing = <2 3>;
|
||||||
|
@ -28,7 +28,7 @@ trips {
|
|||||||
type = "active";
|
type = "active";
|
||||||
};
|
};
|
||||||
cpu-crit-0 {
|
cpu-crit-0 {
|
||||||
temperature = <1200000>; /* millicelsius */
|
temperature = <120000>; /* millicelsius */
|
||||||
hysteresis = <0>; /* millicelsius */
|
hysteresis = <0>; /* millicelsius */
|
||||||
type = "critical";
|
type = "critical";
|
||||||
};
|
};
|
||||||
|
@ -536,6 +536,7 @@
|
|||||||
clock-names = "dp";
|
clock-names = "dp";
|
||||||
phys = <&dp_phy>;
|
phys = <&dp_phy>;
|
||||||
phy-names = "dp";
|
phy-names = "dp";
|
||||||
|
power-domains = <&disp_pd>;
|
||||||
};
|
};
|
||||||
|
|
||||||
mipi_phy: video-phy@10040714 {
|
mipi_phy: video-phy@10040714 {
|
||||||
|
@ -18,7 +18,7 @@ trips {
|
|||||||
type = "active";
|
type = "active";
|
||||||
};
|
};
|
||||||
cpu-crit-0 {
|
cpu-crit-0 {
|
||||||
temperature = <1050000>; /* millicelsius */
|
temperature = <105000>; /* millicelsius */
|
||||||
hysteresis = <0>; /* millicelsius */
|
hysteresis = <0>; /* millicelsius */
|
||||||
type = "critical";
|
type = "critical";
|
||||||
};
|
};
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
#include "imx23.dtsi"
|
#include "imx23.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
@ -93,6 +94,7 @@
|
|||||||
|
|
||||||
ahb@80080000 {
|
ahb@80080000 {
|
||||||
usb0: usb@80080000 {
|
usb0: usb@80080000 {
|
||||||
|
dr_mode = "host";
|
||||||
vbus-supply = <®_usb0_vbus>;
|
vbus-supply = <®_usb0_vbus>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
@ -122,7 +124,7 @@
|
|||||||
|
|
||||||
user {
|
user {
|
||||||
label = "green";
|
label = "green";
|
||||||
gpios = <&gpio2 1 1>;
|
gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -428,6 +428,7 @@
|
|||||||
|
|
||||||
pwm4: pwm@53fc8000 {
|
pwm4: pwm@53fc8000 {
|
||||||
compatible = "fsl,imx25-pwm", "fsl,imx27-pwm";
|
compatible = "fsl,imx25-pwm", "fsl,imx27-pwm";
|
||||||
|
#pwm-cells = <2>;
|
||||||
reg = <0x53fc8000 0x4000>;
|
reg = <0x53fc8000 0x4000>;
|
||||||
clocks = <&clks 108>, <&clks 52>;
|
clocks = <&clks 108>, <&clks 52>;
|
||||||
clock-names = "ipg", "per";
|
clock-names = "ipg", "per";
|
||||||
|
@ -913,7 +913,7 @@
|
|||||||
80 81 68 69
|
80 81 68 69
|
||||||
70 71 72 73
|
70 71 72 73
|
||||||
74 75 76 77>;
|
74 75 76 77>;
|
||||||
interrupt-names = "auart4-rx", "aurat4-tx", "spdif-tx", "empty",
|
interrupt-names = "auart4-rx", "auart4-tx", "spdif-tx", "empty",
|
||||||
"saif0", "saif1", "i2c0", "i2c1",
|
"saif0", "saif1", "i2c0", "i2c1",
|
||||||
"auart0-rx", "auart0-tx", "auart1-rx", "auart1-tx",
|
"auart0-rx", "auart0-tx", "auart1-rx", "auart1-tx",
|
||||||
"auart2-rx", "auart2-tx", "auart3-rx", "auart3-tx";
|
"auart2-rx", "auart2-tx", "auart3-rx", "auart3-tx";
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
regulator-min-microvolt = <5000000>;
|
regulator-min-microvolt = <5000000>;
|
||||||
regulator-max-microvolt = <5000000>;
|
regulator-max-microvolt = <5000000>;
|
||||||
gpio = <&gpio4 15 0>;
|
gpio = <&gpio4 15 0>;
|
||||||
|
enable-active-high;
|
||||||
};
|
};
|
||||||
|
|
||||||
reg_usb_h1_vbus: regulator@1 {
|
reg_usb_h1_vbus: regulator@1 {
|
||||||
@ -40,6 +41,7 @@
|
|||||||
regulator-min-microvolt = <5000000>;
|
regulator-min-microvolt = <5000000>;
|
||||||
regulator-max-microvolt = <5000000>;
|
regulator-max-microvolt = <5000000>;
|
||||||
gpio = <&gpio1 0 0>;
|
gpio = <&gpio1 0 0>;
|
||||||
|
enable-active-high;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -185,7 +185,6 @@
|
|||||||
&i2c3 {
|
&i2c3 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pinctrl_i2c3>;
|
pinctrl-0 = <&pinctrl_i2c3>;
|
||||||
pinctrl-assert-gpios = <&gpio5 4 GPIO_ACTIVE_HIGH>;
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
max7310_a: gpio@30 {
|
max7310_a: gpio@30 {
|
||||||
|
@ -498,6 +498,8 @@
|
|||||||
DRVDD-supply = <&vmmc2>;
|
DRVDD-supply = <&vmmc2>;
|
||||||
IOVDD-supply = <&vio>;
|
IOVDD-supply = <&vio>;
|
||||||
DVDD-supply = <&vio>;
|
DVDD-supply = <&vio>;
|
||||||
|
|
||||||
|
ai3x-micbias-vg = <1>;
|
||||||
};
|
};
|
||||||
|
|
||||||
tlv320aic3x_aux: tlv320aic3x@19 {
|
tlv320aic3x_aux: tlv320aic3x@19 {
|
||||||
@ -509,6 +511,8 @@
|
|||||||
DRVDD-supply = <&vmmc2>;
|
DRVDD-supply = <&vmmc2>;
|
||||||
IOVDD-supply = <&vio>;
|
IOVDD-supply = <&vio>;
|
||||||
DVDD-supply = <&vio>;
|
DVDD-supply = <&vio>;
|
||||||
|
|
||||||
|
ai3x-micbias-vg = <2>;
|
||||||
};
|
};
|
||||||
|
|
||||||
tsl2563: tsl2563@29 {
|
tsl2563: tsl2563@29 {
|
||||||
|
@ -456,6 +456,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
mmu_isp: mmu@480bd400 {
|
mmu_isp: mmu@480bd400 {
|
||||||
|
#iommu-cells = <0>;
|
||||||
compatible = "ti,omap2-iommu";
|
compatible = "ti,omap2-iommu";
|
||||||
reg = <0x480bd400 0x80>;
|
reg = <0x480bd400 0x80>;
|
||||||
interrupts = <24>;
|
interrupts = <24>;
|
||||||
@ -464,6 +465,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
mmu_iva: mmu@5d000000 {
|
mmu_iva: mmu@5d000000 {
|
||||||
|
#iommu-cells = <0>;
|
||||||
compatible = "ti,omap2-iommu";
|
compatible = "ti,omap2-iommu";
|
||||||
reg = <0x5d000000 0x80>;
|
reg = <0x5d000000 0x80>;
|
||||||
interrupts = <28>;
|
interrupts = <28>;
|
||||||
|
@ -128,7 +128,7 @@
|
|||||||
* hierarchy.
|
* hierarchy.
|
||||||
*/
|
*/
|
||||||
ocp {
|
ocp {
|
||||||
compatible = "ti,omap4-l3-noc", "simple-bus";
|
compatible = "ti,omap5-l3-noc", "simple-bus";
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
ranges;
|
ranges;
|
||||||
|
@ -545,7 +545,7 @@
|
|||||||
compatible = "adi,adv7511w";
|
compatible = "adi,adv7511w";
|
||||||
reg = <0x39>;
|
reg = <0x39>;
|
||||||
interrupt-parent = <&gpio3>;
|
interrupt-parent = <&gpio3>;
|
||||||
interrupts = <29 IRQ_TYPE_EDGE_FALLING>;
|
interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
|
||||||
|
|
||||||
adi,input-depth = <8>;
|
adi,input-depth = <8>;
|
||||||
adi,input-colorspace = "rgb";
|
adi,input-colorspace = "rgb";
|
||||||
|
@ -1017,23 +1017,6 @@
|
|||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
vmmci: regulator-gpio {
|
|
||||||
compatible = "regulator-gpio";
|
|
||||||
|
|
||||||
regulator-min-microvolt = <1800000>;
|
|
||||||
regulator-max-microvolt = <2900000>;
|
|
||||||
regulator-name = "mmci-reg";
|
|
||||||
regulator-type = "voltage";
|
|
||||||
|
|
||||||
startup-delay-us = <100>;
|
|
||||||
enable-active-high;
|
|
||||||
|
|
||||||
states = <1800000 0x1
|
|
||||||
2900000 0x0>;
|
|
||||||
|
|
||||||
status = "disabled";
|
|
||||||
};
|
|
||||||
|
|
||||||
mcde@a0350000 {
|
mcde@a0350000 {
|
||||||
compatible = "stericsson,mcde";
|
compatible = "stericsson,mcde";
|
||||||
reg = <0xa0350000 0x1000>, /* MCDE */
|
reg = <0xa0350000 0x1000>, /* MCDE */
|
||||||
|
@ -111,6 +111,21 @@
|
|||||||
pinctrl-1 = <&i2c3_sleep_mode>;
|
pinctrl-1 = <&i2c3_sleep_mode>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
vmmci: regulator-gpio {
|
||||||
|
compatible = "regulator-gpio";
|
||||||
|
|
||||||
|
regulator-min-microvolt = <1800000>;
|
||||||
|
regulator-max-microvolt = <2900000>;
|
||||||
|
regulator-name = "mmci-reg";
|
||||||
|
regulator-type = "voltage";
|
||||||
|
|
||||||
|
startup-delay-us = <100>;
|
||||||
|
enable-active-high;
|
||||||
|
|
||||||
|
states = <1800000 0x1
|
||||||
|
2900000 0x0>;
|
||||||
|
};
|
||||||
|
|
||||||
// External Micro SD slot
|
// External Micro SD slot
|
||||||
sdi0_per1@80126000 {
|
sdi0_per1@80126000 {
|
||||||
arm,primecell-periphid = <0x10480180>;
|
arm,primecell-periphid = <0x10480180>;
|
||||||
|
@ -146,8 +146,21 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
vmmci: regulator-gpio {
|
vmmci: regulator-gpio {
|
||||||
|
compatible = "regulator-gpio";
|
||||||
|
|
||||||
gpios = <&gpio7 4 0x4>;
|
gpios = <&gpio7 4 0x4>;
|
||||||
enable-gpio = <&gpio6 25 0x4>;
|
enable-gpio = <&gpio6 25 0x4>;
|
||||||
|
|
||||||
|
regulator-min-microvolt = <1800000>;
|
||||||
|
regulator-max-microvolt = <2900000>;
|
||||||
|
regulator-name = "mmci-reg";
|
||||||
|
regulator-type = "voltage";
|
||||||
|
|
||||||
|
startup-delay-us = <100>;
|
||||||
|
enable-active-high;
|
||||||
|
|
||||||
|
states = <1800000 0x1
|
||||||
|
2900000 0x0>;
|
||||||
};
|
};
|
||||||
|
|
||||||
// External Micro SD slot
|
// External Micro SD slot
|
||||||
|
@ -39,11 +39,14 @@ CONFIG_ARCH_HIP04=y
|
|||||||
CONFIG_ARCH_KEYSTONE=y
|
CONFIG_ARCH_KEYSTONE=y
|
||||||
CONFIG_ARCH_MESON=y
|
CONFIG_ARCH_MESON=y
|
||||||
CONFIG_ARCH_MXC=y
|
CONFIG_ARCH_MXC=y
|
||||||
|
CONFIG_SOC_IMX50=y
|
||||||
CONFIG_SOC_IMX51=y
|
CONFIG_SOC_IMX51=y
|
||||||
CONFIG_SOC_IMX53=y
|
CONFIG_SOC_IMX53=y
|
||||||
CONFIG_SOC_IMX6Q=y
|
CONFIG_SOC_IMX6Q=y
|
||||||
CONFIG_SOC_IMX6SL=y
|
CONFIG_SOC_IMX6SL=y
|
||||||
|
CONFIG_SOC_IMX6SX=y
|
||||||
CONFIG_SOC_VF610=y
|
CONFIG_SOC_VF610=y
|
||||||
|
CONFIG_SOC_LS1021A=y
|
||||||
CONFIG_ARCH_OMAP3=y
|
CONFIG_ARCH_OMAP3=y
|
||||||
CONFIG_ARCH_OMAP4=y
|
CONFIG_ARCH_OMAP4=y
|
||||||
CONFIG_SOC_OMAP5=y
|
CONFIG_SOC_OMAP5=y
|
||||||
|
@ -393,7 +393,7 @@ CONFIG_TI_EDMA=y
|
|||||||
CONFIG_DMA_OMAP=y
|
CONFIG_DMA_OMAP=y
|
||||||
# CONFIG_IOMMU_SUPPORT is not set
|
# CONFIG_IOMMU_SUPPORT is not set
|
||||||
CONFIG_EXTCON=m
|
CONFIG_EXTCON=m
|
||||||
CONFIG_EXTCON_GPIO=m
|
CONFIG_EXTCON_USB_GPIO=m
|
||||||
CONFIG_EXTCON_PALMAS=m
|
CONFIG_EXTCON_PALMAS=m
|
||||||
CONFIG_TI_EMIF=m
|
CONFIG_TI_EMIF=m
|
||||||
CONFIG_PWM=y
|
CONFIG_PWM=y
|
||||||
|
@ -25,7 +25,7 @@ struct dma_iommu_mapping {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct dma_iommu_mapping *
|
struct dma_iommu_mapping *
|
||||||
arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, size_t size);
|
arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, u64 size);
|
||||||
|
|
||||||
void arm_iommu_release_mapping(struct dma_iommu_mapping *mapping);
|
void arm_iommu_release_mapping(struct dma_iommu_mapping *mapping);
|
||||||
|
|
||||||
|
@ -110,5 +110,6 @@ static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn)
|
|||||||
bool xen_arch_need_swiotlb(struct device *dev,
|
bool xen_arch_need_swiotlb(struct device *dev,
|
||||||
unsigned long pfn,
|
unsigned long pfn,
|
||||||
unsigned long mfn);
|
unsigned long mfn);
|
||||||
|
unsigned long xen_get_swiotlb_free_pages(unsigned int order);
|
||||||
|
|
||||||
#endif /* _ASM_ARM_XEN_PAGE_H */
|
#endif /* _ASM_ARM_XEN_PAGE_H */
|
||||||
|
@ -303,12 +303,17 @@ static int probe_current_pmu(struct arm_pmu *pmu)
|
|||||||
|
|
||||||
static int of_pmu_irq_cfg(struct platform_device *pdev)
|
static int of_pmu_irq_cfg(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
int i;
|
int i, irq;
|
||||||
int *irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL);
|
int *irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL);
|
||||||
|
|
||||||
if (!irqs)
|
if (!irqs)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
/* Don't bother with PPIs; they're already affine */
|
||||||
|
irq = platform_get_irq(pdev, 0);
|
||||||
|
if (irq >= 0 && irq_is_percpu(irq))
|
||||||
|
return 0;
|
||||||
|
|
||||||
for (i = 0; i < pdev->num_resources; ++i) {
|
for (i = 0; i < pdev->num_resources; ++i) {
|
||||||
struct device_node *dn;
|
struct device_node *dn;
|
||||||
int cpu;
|
int cpu;
|
||||||
@ -317,7 +322,7 @@ static int of_pmu_irq_cfg(struct platform_device *pdev)
|
|||||||
i);
|
i);
|
||||||
if (!dn) {
|
if (!dn) {
|
||||||
pr_warn("Failed to parse %s/interrupt-affinity[%d]\n",
|
pr_warn("Failed to parse %s/interrupt-affinity[%d]\n",
|
||||||
of_node_full_name(dn), i);
|
of_node_full_name(pdev->dev.of_node), i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2010 Pengutronix, Wolfram Sang <w.sang@pengutronix.de>
|
* Copyright (C) 2010 Pengutronix, Wolfram Sang <kernel@pengutronix.de>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it under
|
* This program is free software; you can redistribute it and/or modify it under
|
||||||
* the terms of the GNU General Public License version 2 as published by the
|
* the terms of the GNU General Public License version 2 as published by the
|
||||||
|
@ -112,6 +112,7 @@
|
|||||||
#define OMAP3430_VC_CMD_ONLP_SHIFT 16
|
#define OMAP3430_VC_CMD_ONLP_SHIFT 16
|
||||||
#define OMAP3430_VC_CMD_RET_SHIFT 8
|
#define OMAP3430_VC_CMD_RET_SHIFT 8
|
||||||
#define OMAP3430_VC_CMD_OFF_SHIFT 0
|
#define OMAP3430_VC_CMD_OFF_SHIFT 0
|
||||||
|
#define OMAP3430_SREN_MASK (1 << 4)
|
||||||
#define OMAP3430_HSEN_MASK (1 << 3)
|
#define OMAP3430_HSEN_MASK (1 << 3)
|
||||||
#define OMAP3430_MCODE_MASK (0x7 << 0)
|
#define OMAP3430_MCODE_MASK (0x7 << 0)
|
||||||
#define OMAP3430_VALID_MASK (1 << 24)
|
#define OMAP3430_VALID_MASK (1 << 24)
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#define OMAP4430_GLOBAL_WARM_SW_RST_SHIFT 1
|
#define OMAP4430_GLOBAL_WARM_SW_RST_SHIFT 1
|
||||||
#define OMAP4430_GLOBAL_WUEN_MASK (1 << 16)
|
#define OMAP4430_GLOBAL_WUEN_MASK (1 << 16)
|
||||||
#define OMAP4430_HSMCODE_MASK (0x7 << 0)
|
#define OMAP4430_HSMCODE_MASK (0x7 << 0)
|
||||||
|
#define OMAP4430_SRMODEEN_MASK (1 << 4)
|
||||||
#define OMAP4430_HSMODEEN_MASK (1 << 3)
|
#define OMAP4430_HSMODEEN_MASK (1 << 3)
|
||||||
#define OMAP4430_HSSCLL_SHIFT 24
|
#define OMAP4430_HSSCLL_SHIFT 24
|
||||||
#define OMAP4430_ICEPICK_RST_SHIFT 9
|
#define OMAP4430_ICEPICK_RST_SHIFT 9
|
||||||
|
@ -316,7 +316,8 @@ static void __init omap3_vc_init_pmic_signaling(struct voltagedomain *voltdm)
|
|||||||
* idle. And we can also scale voltages to zero for off-idle.
|
* idle. And we can also scale voltages to zero for off-idle.
|
||||||
* Note that no actual voltage scaling during off-idle will
|
* Note that no actual voltage scaling during off-idle will
|
||||||
* happen unless the board specific twl4030 PMIC scripts are
|
* happen unless the board specific twl4030 PMIC scripts are
|
||||||
* loaded.
|
* loaded. See also omap_vc_i2c_init for comments regarding
|
||||||
|
* erratum i531.
|
||||||
*/
|
*/
|
||||||
val = voltdm->read(OMAP3_PRM_VOLTCTRL_OFFSET);
|
val = voltdm->read(OMAP3_PRM_VOLTCTRL_OFFSET);
|
||||||
if (!(val & OMAP3430_PRM_VOLTCTRL_SEL_OFF)) {
|
if (!(val & OMAP3430_PRM_VOLTCTRL_SEL_OFF)) {
|
||||||
@ -704,9 +705,16 @@ static void __init omap_vc_i2c_init(struct voltagedomain *voltdm)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Note that for omap3 OMAP3430_SREN_MASK clears SREN to work around
|
||||||
|
* erratum i531 "Extra Power Consumed When Repeated Start Operation
|
||||||
|
* Mode Is Enabled on I2C Interface Dedicated for Smart Reflex (I2C4)".
|
||||||
|
* Otherwise I2C4 eventually leads into about 23mW extra power being
|
||||||
|
* consumed even during off idle using VMODE.
|
||||||
|
*/
|
||||||
i2c_high_speed = voltdm->pmic->i2c_high_speed;
|
i2c_high_speed = voltdm->pmic->i2c_high_speed;
|
||||||
if (i2c_high_speed)
|
if (i2c_high_speed)
|
||||||
voltdm->rmw(vc->common->i2c_cfg_hsen_mask,
|
voltdm->rmw(vc->common->i2c_cfg_clear_mask,
|
||||||
vc->common->i2c_cfg_hsen_mask,
|
vc->common->i2c_cfg_hsen_mask,
|
||||||
vc->common->i2c_cfg_reg);
|
vc->common->i2c_cfg_reg);
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ struct voltagedomain;
|
|||||||
* @cmd_ret_shift: RET field shift in PRM_VC_CMD_VAL_* register
|
* @cmd_ret_shift: RET field shift in PRM_VC_CMD_VAL_* register
|
||||||
* @cmd_off_shift: OFF field shift in PRM_VC_CMD_VAL_* register
|
* @cmd_off_shift: OFF field shift in PRM_VC_CMD_VAL_* register
|
||||||
* @i2c_cfg_reg: I2C configuration register offset
|
* @i2c_cfg_reg: I2C configuration register offset
|
||||||
|
* @i2c_cfg_clear_mask: high-speed mode bit clear mask in I2C config register
|
||||||
* @i2c_cfg_hsen_mask: high-speed mode bit field mask in I2C config register
|
* @i2c_cfg_hsen_mask: high-speed mode bit field mask in I2C config register
|
||||||
* @i2c_mcode_mask: MCODE field mask for I2C config register
|
* @i2c_mcode_mask: MCODE field mask for I2C config register
|
||||||
*
|
*
|
||||||
@ -52,6 +53,7 @@ struct omap_vc_common {
|
|||||||
u8 cmd_ret_shift;
|
u8 cmd_ret_shift;
|
||||||
u8 cmd_off_shift;
|
u8 cmd_off_shift;
|
||||||
u8 i2c_cfg_reg;
|
u8 i2c_cfg_reg;
|
||||||
|
u8 i2c_cfg_clear_mask;
|
||||||
u8 i2c_cfg_hsen_mask;
|
u8 i2c_cfg_hsen_mask;
|
||||||
u8 i2c_mcode_mask;
|
u8 i2c_mcode_mask;
|
||||||
};
|
};
|
||||||
|
@ -40,6 +40,7 @@ static struct omap_vc_common omap3_vc_common = {
|
|||||||
.cmd_onlp_shift = OMAP3430_VC_CMD_ONLP_SHIFT,
|
.cmd_onlp_shift = OMAP3430_VC_CMD_ONLP_SHIFT,
|
||||||
.cmd_ret_shift = OMAP3430_VC_CMD_RET_SHIFT,
|
.cmd_ret_shift = OMAP3430_VC_CMD_RET_SHIFT,
|
||||||
.cmd_off_shift = OMAP3430_VC_CMD_OFF_SHIFT,
|
.cmd_off_shift = OMAP3430_VC_CMD_OFF_SHIFT,
|
||||||
|
.i2c_cfg_clear_mask = OMAP3430_SREN_MASK | OMAP3430_HSEN_MASK,
|
||||||
.i2c_cfg_hsen_mask = OMAP3430_HSEN_MASK,
|
.i2c_cfg_hsen_mask = OMAP3430_HSEN_MASK,
|
||||||
.i2c_cfg_reg = OMAP3_PRM_VC_I2C_CFG_OFFSET,
|
.i2c_cfg_reg = OMAP3_PRM_VC_I2C_CFG_OFFSET,
|
||||||
.i2c_mcode_mask = OMAP3430_MCODE_MASK,
|
.i2c_mcode_mask = OMAP3430_MCODE_MASK,
|
||||||
|
@ -42,6 +42,7 @@ static const struct omap_vc_common omap4_vc_common = {
|
|||||||
.cmd_ret_shift = OMAP4430_RET_SHIFT,
|
.cmd_ret_shift = OMAP4430_RET_SHIFT,
|
||||||
.cmd_off_shift = OMAP4430_OFF_SHIFT,
|
.cmd_off_shift = OMAP4430_OFF_SHIFT,
|
||||||
.i2c_cfg_reg = OMAP4_PRM_VC_CFG_I2C_MODE_OFFSET,
|
.i2c_cfg_reg = OMAP4_PRM_VC_CFG_I2C_MODE_OFFSET,
|
||||||
|
.i2c_cfg_clear_mask = OMAP4430_SRMODEEN_MASK | OMAP4430_HSMODEEN_MASK,
|
||||||
.i2c_cfg_hsen_mask = OMAP4430_HSMODEEN_MASK,
|
.i2c_cfg_hsen_mask = OMAP4430_HSMODEEN_MASK,
|
||||||
.i2c_mcode_mask = OMAP4430_HSMCODE_MASK,
|
.i2c_mcode_mask = OMAP4430_HSMCODE_MASK,
|
||||||
};
|
};
|
||||||
|
@ -691,4 +691,13 @@ config SHARPSL_PM_MAX1111
|
|||||||
config PXA310_ULPI
|
config PXA310_ULPI
|
||||||
bool
|
bool
|
||||||
|
|
||||||
|
config PXA_SYSTEMS_CPLDS
|
||||||
|
tristate "Motherboard cplds"
|
||||||
|
default ARCH_LUBBOCK || MACH_MAINSTONE
|
||||||
|
help
|
||||||
|
This driver supports the Lubbock and Mainstone multifunction chip
|
||||||
|
found on the pxa25x development platform system (Lubbock) and pxa27x
|
||||||
|
development platform system (Mainstone). This IO board supports the
|
||||||
|
interrupts handling, ethernet controller, flash chips, etc ...
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@ -90,4 +90,5 @@ obj-$(CONFIG_MACH_RAUMFELD_CONNECTOR) += raumfeld.o
|
|||||||
obj-$(CONFIG_MACH_RAUMFELD_SPEAKER) += raumfeld.o
|
obj-$(CONFIG_MACH_RAUMFELD_SPEAKER) += raumfeld.o
|
||||||
obj-$(CONFIG_MACH_ZIPIT2) += z2.o
|
obj-$(CONFIG_MACH_ZIPIT2) += z2.o
|
||||||
|
|
||||||
|
obj-$(CONFIG_PXA_SYSTEMS_CPLDS) += pxa_cplds_irqs.o
|
||||||
obj-$(CONFIG_TOSA_BT) += tosa-bt.o
|
obj-$(CONFIG_TOSA_BT) += tosa-bt.o
|
||||||
|
@ -37,7 +37,9 @@
|
|||||||
#define LUB_GP __LUB_REG(LUBBOCK_FPGA_PHYS + 0x100)
|
#define LUB_GP __LUB_REG(LUBBOCK_FPGA_PHYS + 0x100)
|
||||||
|
|
||||||
/* Board specific IRQs */
|
/* Board specific IRQs */
|
||||||
#define LUBBOCK_IRQ(x) (IRQ_BOARD_START + (x))
|
#define LUBBOCK_NR_IRQS IRQ_BOARD_START
|
||||||
|
|
||||||
|
#define LUBBOCK_IRQ(x) (LUBBOCK_NR_IRQS + (x))
|
||||||
#define LUBBOCK_SD_IRQ LUBBOCK_IRQ(0)
|
#define LUBBOCK_SD_IRQ LUBBOCK_IRQ(0)
|
||||||
#define LUBBOCK_SA1111_IRQ LUBBOCK_IRQ(1)
|
#define LUBBOCK_SA1111_IRQ LUBBOCK_IRQ(1)
|
||||||
#define LUBBOCK_USB_IRQ LUBBOCK_IRQ(2) /* usb connect */
|
#define LUBBOCK_USB_IRQ LUBBOCK_IRQ(2) /* usb connect */
|
||||||
@ -47,8 +49,7 @@
|
|||||||
#define LUBBOCK_USB_DISC_IRQ LUBBOCK_IRQ(6) /* usb disconnect */
|
#define LUBBOCK_USB_DISC_IRQ LUBBOCK_IRQ(6) /* usb disconnect */
|
||||||
#define LUBBOCK_LAST_IRQ LUBBOCK_IRQ(6)
|
#define LUBBOCK_LAST_IRQ LUBBOCK_IRQ(6)
|
||||||
|
|
||||||
#define LUBBOCK_SA1111_IRQ_BASE (IRQ_BOARD_START + 16)
|
#define LUBBOCK_SA1111_IRQ_BASE (LUBBOCK_NR_IRQS + 32)
|
||||||
#define LUBBOCK_NR_IRQS (IRQ_BOARD_START + 16 + 55)
|
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
extern void lubbock_set_misc_wr(unsigned int mask, unsigned int set);
|
extern void lubbock_set_misc_wr(unsigned int mask, unsigned int set);
|
||||||
|
@ -120,7 +120,9 @@
|
|||||||
#define MST_PCMCIA_PWR_VCC_50 0x4 /* voltage VCC = 5.0V */
|
#define MST_PCMCIA_PWR_VCC_50 0x4 /* voltage VCC = 5.0V */
|
||||||
|
|
||||||
/* board specific IRQs */
|
/* board specific IRQs */
|
||||||
#define MAINSTONE_IRQ(x) (IRQ_BOARD_START + (x))
|
#define MAINSTONE_NR_IRQS IRQ_BOARD_START
|
||||||
|
|
||||||
|
#define MAINSTONE_IRQ(x) (MAINSTONE_NR_IRQS + (x))
|
||||||
#define MAINSTONE_MMC_IRQ MAINSTONE_IRQ(0)
|
#define MAINSTONE_MMC_IRQ MAINSTONE_IRQ(0)
|
||||||
#define MAINSTONE_USIM_IRQ MAINSTONE_IRQ(1)
|
#define MAINSTONE_USIM_IRQ MAINSTONE_IRQ(1)
|
||||||
#define MAINSTONE_USBC_IRQ MAINSTONE_IRQ(2)
|
#define MAINSTONE_USBC_IRQ MAINSTONE_IRQ(2)
|
||||||
@ -136,6 +138,4 @@
|
|||||||
#define MAINSTONE_S1_STSCHG_IRQ MAINSTONE_IRQ(14)
|
#define MAINSTONE_S1_STSCHG_IRQ MAINSTONE_IRQ(14)
|
||||||
#define MAINSTONE_S1_IRQ MAINSTONE_IRQ(15)
|
#define MAINSTONE_S1_IRQ MAINSTONE_IRQ(15)
|
||||||
|
|
||||||
#define MAINSTONE_NR_IRQS (IRQ_BOARD_START + 16)
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
* published by the Free Software Foundation.
|
* published by the Free Software Foundation.
|
||||||
*/
|
*/
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
|
#include <linux/gpio/machine.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
@ -123,84 +124,6 @@ void lubbock_set_misc_wr(unsigned int mask, unsigned int set)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(lubbock_set_misc_wr);
|
EXPORT_SYMBOL(lubbock_set_misc_wr);
|
||||||
|
|
||||||
static unsigned long lubbock_irq_enabled;
|
|
||||||
|
|
||||||
static void lubbock_mask_irq(struct irq_data *d)
|
|
||||||
{
|
|
||||||
int lubbock_irq = (d->irq - LUBBOCK_IRQ(0));
|
|
||||||
LUB_IRQ_MASK_EN = (lubbock_irq_enabled &= ~(1 << lubbock_irq));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void lubbock_unmask_irq(struct irq_data *d)
|
|
||||||
{
|
|
||||||
int lubbock_irq = (d->irq - LUBBOCK_IRQ(0));
|
|
||||||
/* the irq can be acknowledged only if deasserted, so it's done here */
|
|
||||||
LUB_IRQ_SET_CLR &= ~(1 << lubbock_irq);
|
|
||||||
LUB_IRQ_MASK_EN = (lubbock_irq_enabled |= (1 << lubbock_irq));
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct irq_chip lubbock_irq_chip = {
|
|
||||||
.name = "FPGA",
|
|
||||||
.irq_ack = lubbock_mask_irq,
|
|
||||||
.irq_mask = lubbock_mask_irq,
|
|
||||||
.irq_unmask = lubbock_unmask_irq,
|
|
||||||
};
|
|
||||||
|
|
||||||
static void lubbock_irq_handler(unsigned int irq, struct irq_desc *desc)
|
|
||||||
{
|
|
||||||
unsigned long pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled;
|
|
||||||
do {
|
|
||||||
/* clear our parent irq */
|
|
||||||
desc->irq_data.chip->irq_ack(&desc->irq_data);
|
|
||||||
if (likely(pending)) {
|
|
||||||
irq = LUBBOCK_IRQ(0) + __ffs(pending);
|
|
||||||
generic_handle_irq(irq);
|
|
||||||
}
|
|
||||||
pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled;
|
|
||||||
} while (pending);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __init lubbock_init_irq(void)
|
|
||||||
{
|
|
||||||
int irq;
|
|
||||||
|
|
||||||
pxa25x_init_irq();
|
|
||||||
|
|
||||||
/* setup extra lubbock irqs */
|
|
||||||
for (irq = LUBBOCK_IRQ(0); irq <= LUBBOCK_LAST_IRQ; irq++) {
|
|
||||||
irq_set_chip_and_handler(irq, &lubbock_irq_chip,
|
|
||||||
handle_level_irq);
|
|
||||||
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
|
|
||||||
}
|
|
||||||
|
|
||||||
irq_set_chained_handler(PXA_GPIO_TO_IRQ(0), lubbock_irq_handler);
|
|
||||||
irq_set_irq_type(PXA_GPIO_TO_IRQ(0), IRQ_TYPE_EDGE_FALLING);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
|
||||||
|
|
||||||
static void lubbock_irq_resume(void)
|
|
||||||
{
|
|
||||||
LUB_IRQ_MASK_EN = lubbock_irq_enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct syscore_ops lubbock_irq_syscore_ops = {
|
|
||||||
.resume = lubbock_irq_resume,
|
|
||||||
};
|
|
||||||
|
|
||||||
static int __init lubbock_irq_device_init(void)
|
|
||||||
{
|
|
||||||
if (machine_is_lubbock()) {
|
|
||||||
register_syscore_ops(&lubbock_irq_syscore_ops);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return -ENODEV;
|
|
||||||
}
|
|
||||||
|
|
||||||
device_initcall(lubbock_irq_device_init);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int lubbock_udc_is_connected(void)
|
static int lubbock_udc_is_connected(void)
|
||||||
{
|
{
|
||||||
return (LUB_MISC_RD & (1 << 9)) == 0;
|
return (LUB_MISC_RD & (1 << 9)) == 0;
|
||||||
@ -383,11 +306,38 @@ static struct platform_device lubbock_flash_device[2] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct resource lubbock_cplds_resources[] = {
|
||||||
|
[0] = {
|
||||||
|
.start = LUBBOCK_FPGA_PHYS + 0xc0,
|
||||||
|
.end = LUBBOCK_FPGA_PHYS + 0xe0 - 1,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
[1] = {
|
||||||
|
.start = PXA_GPIO_TO_IRQ(0),
|
||||||
|
.end = PXA_GPIO_TO_IRQ(0),
|
||||||
|
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
|
||||||
|
},
|
||||||
|
[2] = {
|
||||||
|
.start = LUBBOCK_IRQ(0),
|
||||||
|
.end = LUBBOCK_IRQ(6),
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device lubbock_cplds_device = {
|
||||||
|
.name = "pxa_cplds_irqs",
|
||||||
|
.id = -1,
|
||||||
|
.resource = &lubbock_cplds_resources[0],
|
||||||
|
.num_resources = 3,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
static struct platform_device *devices[] __initdata = {
|
static struct platform_device *devices[] __initdata = {
|
||||||
&sa1111_device,
|
&sa1111_device,
|
||||||
&smc91x_device,
|
&smc91x_device,
|
||||||
&lubbock_flash_device[0],
|
&lubbock_flash_device[0],
|
||||||
&lubbock_flash_device[1],
|
&lubbock_flash_device[1],
|
||||||
|
&lubbock_cplds_device,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct pxafb_mode_info sharp_lm8v31_mode = {
|
static struct pxafb_mode_info sharp_lm8v31_mode = {
|
||||||
@ -648,7 +598,7 @@ MACHINE_START(LUBBOCK, "Intel DBPXA250 Development Platform (aka Lubbock)")
|
|||||||
/* Maintainer: MontaVista Software Inc. */
|
/* Maintainer: MontaVista Software Inc. */
|
||||||
.map_io = lubbock_map_io,
|
.map_io = lubbock_map_io,
|
||||||
.nr_irqs = LUBBOCK_NR_IRQS,
|
.nr_irqs = LUBBOCK_NR_IRQS,
|
||||||
.init_irq = lubbock_init_irq,
|
.init_irq = pxa25x_init_irq,
|
||||||
.handle_irq = pxa25x_handle_irq,
|
.handle_irq = pxa25x_handle_irq,
|
||||||
.init_time = pxa_timer_init,
|
.init_time = pxa_timer_init,
|
||||||
.init_machine = lubbock_init,
|
.init_machine = lubbock_init,
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
* published by the Free Software Foundation.
|
* published by the Free Software Foundation.
|
||||||
*/
|
*/
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
|
#include <linux/gpio/machine.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/syscore_ops.h>
|
#include <linux/syscore_ops.h>
|
||||||
@ -122,92 +123,6 @@ static unsigned long mainstone_pin_config[] = {
|
|||||||
GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH,
|
GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH,
|
||||||
};
|
};
|
||||||
|
|
||||||
static unsigned long mainstone_irq_enabled;
|
|
||||||
|
|
||||||
static void mainstone_mask_irq(struct irq_data *d)
|
|
||||||
{
|
|
||||||
int mainstone_irq = (d->irq - MAINSTONE_IRQ(0));
|
|
||||||
MST_INTMSKENA = (mainstone_irq_enabled &= ~(1 << mainstone_irq));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void mainstone_unmask_irq(struct irq_data *d)
|
|
||||||
{
|
|
||||||
int mainstone_irq = (d->irq - MAINSTONE_IRQ(0));
|
|
||||||
/* the irq can be acknowledged only if deasserted, so it's done here */
|
|
||||||
MST_INTSETCLR &= ~(1 << mainstone_irq);
|
|
||||||
MST_INTMSKENA = (mainstone_irq_enabled |= (1 << mainstone_irq));
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct irq_chip mainstone_irq_chip = {
|
|
||||||
.name = "FPGA",
|
|
||||||
.irq_ack = mainstone_mask_irq,
|
|
||||||
.irq_mask = mainstone_mask_irq,
|
|
||||||
.irq_unmask = mainstone_unmask_irq,
|
|
||||||
};
|
|
||||||
|
|
||||||
static void mainstone_irq_handler(unsigned int irq, struct irq_desc *desc)
|
|
||||||
{
|
|
||||||
unsigned long pending = MST_INTSETCLR & mainstone_irq_enabled;
|
|
||||||
do {
|
|
||||||
/* clear useless edge notification */
|
|
||||||
desc->irq_data.chip->irq_ack(&desc->irq_data);
|
|
||||||
if (likely(pending)) {
|
|
||||||
irq = MAINSTONE_IRQ(0) + __ffs(pending);
|
|
||||||
generic_handle_irq(irq);
|
|
||||||
}
|
|
||||||
pending = MST_INTSETCLR & mainstone_irq_enabled;
|
|
||||||
} while (pending);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __init mainstone_init_irq(void)
|
|
||||||
{
|
|
||||||
int irq;
|
|
||||||
|
|
||||||
pxa27x_init_irq();
|
|
||||||
|
|
||||||
/* setup extra Mainstone irqs */
|
|
||||||
for(irq = MAINSTONE_IRQ(0); irq <= MAINSTONE_IRQ(15); irq++) {
|
|
||||||
irq_set_chip_and_handler(irq, &mainstone_irq_chip,
|
|
||||||
handle_level_irq);
|
|
||||||
if (irq == MAINSTONE_IRQ(10) || irq == MAINSTONE_IRQ(14))
|
|
||||||
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE | IRQF_NOAUTOEN);
|
|
||||||
else
|
|
||||||
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
|
|
||||||
}
|
|
||||||
set_irq_flags(MAINSTONE_IRQ(8), 0);
|
|
||||||
set_irq_flags(MAINSTONE_IRQ(12), 0);
|
|
||||||
|
|
||||||
MST_INTMSKENA = 0;
|
|
||||||
MST_INTSETCLR = 0;
|
|
||||||
|
|
||||||
irq_set_chained_handler(PXA_GPIO_TO_IRQ(0), mainstone_irq_handler);
|
|
||||||
irq_set_irq_type(PXA_GPIO_TO_IRQ(0), IRQ_TYPE_EDGE_FALLING);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
|
||||||
|
|
||||||
static void mainstone_irq_resume(void)
|
|
||||||
{
|
|
||||||
MST_INTMSKENA = mainstone_irq_enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct syscore_ops mainstone_irq_syscore_ops = {
|
|
||||||
.resume = mainstone_irq_resume,
|
|
||||||
};
|
|
||||||
|
|
||||||
static int __init mainstone_irq_device_init(void)
|
|
||||||
{
|
|
||||||
if (machine_is_mainstone())
|
|
||||||
register_syscore_ops(&mainstone_irq_syscore_ops);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
device_initcall(mainstone_irq_device_init);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
static struct resource smc91x_resources[] = {
|
static struct resource smc91x_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.start = (MST_ETH_PHYS + 0x300),
|
.start = (MST_ETH_PHYS + 0x300),
|
||||||
@ -487,11 +402,37 @@ static struct platform_device mst_gpio_keys_device = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct resource mst_cplds_resources[] = {
|
||||||
|
[0] = {
|
||||||
|
.start = MST_FPGA_PHYS + 0xc0,
|
||||||
|
.end = MST_FPGA_PHYS + 0xe0 - 1,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
[1] = {
|
||||||
|
.start = PXA_GPIO_TO_IRQ(0),
|
||||||
|
.end = PXA_GPIO_TO_IRQ(0),
|
||||||
|
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
|
||||||
|
},
|
||||||
|
[2] = {
|
||||||
|
.start = MAINSTONE_IRQ(0),
|
||||||
|
.end = MAINSTONE_IRQ(15),
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device mst_cplds_device = {
|
||||||
|
.name = "pxa_cplds_irqs",
|
||||||
|
.id = -1,
|
||||||
|
.resource = &mst_cplds_resources[0],
|
||||||
|
.num_resources = 3,
|
||||||
|
};
|
||||||
|
|
||||||
static struct platform_device *platform_devices[] __initdata = {
|
static struct platform_device *platform_devices[] __initdata = {
|
||||||
&smc91x_device,
|
&smc91x_device,
|
||||||
&mst_flash_device[0],
|
&mst_flash_device[0],
|
||||||
&mst_flash_device[1],
|
&mst_flash_device[1],
|
||||||
&mst_gpio_keys_device,
|
&mst_gpio_keys_device,
|
||||||
|
&mst_cplds_device,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct pxaohci_platform_data mainstone_ohci_platform_data = {
|
static struct pxaohci_platform_data mainstone_ohci_platform_data = {
|
||||||
@ -718,7 +659,7 @@ MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)")
|
|||||||
.atag_offset = 0x100, /* BLOB boot parameter setting */
|
.atag_offset = 0x100, /* BLOB boot parameter setting */
|
||||||
.map_io = mainstone_map_io,
|
.map_io = mainstone_map_io,
|
||||||
.nr_irqs = MAINSTONE_NR_IRQS,
|
.nr_irqs = MAINSTONE_NR_IRQS,
|
||||||
.init_irq = mainstone_init_irq,
|
.init_irq = pxa27x_init_irq,
|
||||||
.handle_irq = pxa27x_handle_irq,
|
.handle_irq = pxa27x_handle_irq,
|
||||||
.init_time = pxa_timer_init,
|
.init_time = pxa_timer_init,
|
||||||
.init_machine = mainstone_init,
|
.init_machine = mainstone_init,
|
||||||
|
200
arch/arm/mach-pxa/pxa_cplds_irqs.c
Normal file
200
arch/arm/mach-pxa/pxa_cplds_irqs.c
Normal file
@ -0,0 +1,200 @@
|
|||||||
|
/*
|
||||||
|
* Intel Reference Systems cplds
|
||||||
|
*
|
||||||
|
* Copyright (C) 2014 Robert Jarzmik
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Cplds motherboard driver, supporting lubbock and mainstone SoC board.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/bitops.h>
|
||||||
|
#include <linux/gpio.h>
|
||||||
|
#include <linux/gpio/consumer.h>
|
||||||
|
#include <linux/interrupt.h>
|
||||||
|
#include <linux/io.h>
|
||||||
|
#include <linux/irq.h>
|
||||||
|
#include <linux/irqdomain.h>
|
||||||
|
#include <linux/mfd/core.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/of_platform.h>
|
||||||
|
|
||||||
|
#define FPGA_IRQ_MASK_EN 0x0
|
||||||
|
#define FPGA_IRQ_SET_CLR 0x10
|
||||||
|
|
||||||
|
#define CPLDS_NB_IRQ 32
|
||||||
|
|
||||||
|
struct cplds {
|
||||||
|
void __iomem *base;
|
||||||
|
int irq;
|
||||||
|
unsigned int irq_mask;
|
||||||
|
struct gpio_desc *gpio0;
|
||||||
|
struct irq_domain *irqdomain;
|
||||||
|
};
|
||||||
|
|
||||||
|
static irqreturn_t cplds_irq_handler(int in_irq, void *d)
|
||||||
|
{
|
||||||
|
struct cplds *fpga = d;
|
||||||
|
unsigned long pending;
|
||||||
|
unsigned int bit;
|
||||||
|
|
||||||
|
pending = readl(fpga->base + FPGA_IRQ_SET_CLR) & fpga->irq_mask;
|
||||||
|
for_each_set_bit(bit, &pending, CPLDS_NB_IRQ)
|
||||||
|
generic_handle_irq(irq_find_mapping(fpga->irqdomain, bit));
|
||||||
|
|
||||||
|
return IRQ_HANDLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void cplds_irq_mask_ack(struct irq_data *d)
|
||||||
|
{
|
||||||
|
struct cplds *fpga = irq_data_get_irq_chip_data(d);
|
||||||
|
unsigned int cplds_irq = irqd_to_hwirq(d);
|
||||||
|
unsigned int set, bit = BIT(cplds_irq);
|
||||||
|
|
||||||
|
fpga->irq_mask &= ~bit;
|
||||||
|
writel(fpga->irq_mask, fpga->base + FPGA_IRQ_MASK_EN);
|
||||||
|
set = readl(fpga->base + FPGA_IRQ_SET_CLR);
|
||||||
|
writel(set & ~bit, fpga->base + FPGA_IRQ_SET_CLR);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void cplds_irq_unmask(struct irq_data *d)
|
||||||
|
{
|
||||||
|
struct cplds *fpga = irq_data_get_irq_chip_data(d);
|
||||||
|
unsigned int cplds_irq = irqd_to_hwirq(d);
|
||||||
|
unsigned int bit = BIT(cplds_irq);
|
||||||
|
|
||||||
|
fpga->irq_mask |= bit;
|
||||||
|
writel(fpga->irq_mask, fpga->base + FPGA_IRQ_MASK_EN);
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct irq_chip cplds_irq_chip = {
|
||||||
|
.name = "pxa_cplds",
|
||||||
|
.irq_mask_ack = cplds_irq_mask_ack,
|
||||||
|
.irq_unmask = cplds_irq_unmask,
|
||||||
|
.flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_SKIP_SET_WAKE,
|
||||||
|
};
|
||||||
|
|
||||||
|
static int cplds_irq_domain_map(struct irq_domain *d, unsigned int irq,
|
||||||
|
irq_hw_number_t hwirq)
|
||||||
|
{
|
||||||
|
struct cplds *fpga = d->host_data;
|
||||||
|
|
||||||
|
irq_set_chip_and_handler(irq, &cplds_irq_chip, handle_level_irq);
|
||||||
|
irq_set_chip_data(irq, fpga);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct irq_domain_ops cplds_irq_domain_ops = {
|
||||||
|
.xlate = irq_domain_xlate_twocell,
|
||||||
|
.map = cplds_irq_domain_map,
|
||||||
|
};
|
||||||
|
|
||||||
|
static int cplds_resume(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
struct cplds *fpga = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
|
writel(fpga->irq_mask, fpga->base + FPGA_IRQ_MASK_EN);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int cplds_probe(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
struct resource *res;
|
||||||
|
struct cplds *fpga;
|
||||||
|
int ret;
|
||||||
|
unsigned int base_irq = 0;
|
||||||
|
unsigned long irqflags = 0;
|
||||||
|
|
||||||
|
fpga = devm_kzalloc(&pdev->dev, sizeof(*fpga), GFP_KERNEL);
|
||||||
|
if (!fpga)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
||||||
|
if (res) {
|
||||||
|
fpga->irq = (unsigned int)res->start;
|
||||||
|
irqflags = res->flags;
|
||||||
|
}
|
||||||
|
if (!fpga->irq)
|
||||||
|
return -ENODEV;
|
||||||
|
|
||||||
|
base_irq = platform_get_irq(pdev, 1);
|
||||||
|
if (base_irq < 0)
|
||||||
|
base_irq = 0;
|
||||||
|
|
||||||
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
|
fpga->base = devm_ioremap_resource(&pdev->dev, res);
|
||||||
|
if (IS_ERR(fpga->base))
|
||||||
|
return PTR_ERR(fpga->base);
|
||||||
|
|
||||||
|
platform_set_drvdata(pdev, fpga);
|
||||||
|
|
||||||
|
writel(fpga->irq_mask, fpga->base + FPGA_IRQ_MASK_EN);
|
||||||
|
writel(0, fpga->base + FPGA_IRQ_SET_CLR);
|
||||||
|
|
||||||
|
ret = devm_request_irq(&pdev->dev, fpga->irq, cplds_irq_handler,
|
||||||
|
irqflags, dev_name(&pdev->dev), fpga);
|
||||||
|
if (ret == -ENOSYS)
|
||||||
|
return -EPROBE_DEFER;
|
||||||
|
|
||||||
|
if (ret) {
|
||||||
|
dev_err(&pdev->dev, "couldn't request main irq%d: %d\n",
|
||||||
|
fpga->irq, ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
irq_set_irq_wake(fpga->irq, 1);
|
||||||
|
fpga->irqdomain = irq_domain_add_linear(pdev->dev.of_node,
|
||||||
|
CPLDS_NB_IRQ,
|
||||||
|
&cplds_irq_domain_ops, fpga);
|
||||||
|
if (!fpga->irqdomain)
|
||||||
|
return -ENODEV;
|
||||||
|
|
||||||
|
if (base_irq) {
|
||||||
|
ret = irq_create_strict_mappings(fpga->irqdomain, base_irq, 0,
|
||||||
|
CPLDS_NB_IRQ);
|
||||||
|
if (ret) {
|
||||||
|
dev_err(&pdev->dev, "couldn't create the irq mapping %d..%d\n",
|
||||||
|
base_irq, base_irq + CPLDS_NB_IRQ);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int cplds_remove(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
struct cplds *fpga = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
|
irq_set_chip_and_handler(fpga->irq, NULL, NULL);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct of_device_id cplds_id_table[] = {
|
||||||
|
{ .compatible = "intel,lubbock-cplds-irqs", },
|
||||||
|
{ .compatible = "intel,mainstone-cplds-irqs", },
|
||||||
|
{ }
|
||||||
|
};
|
||||||
|
MODULE_DEVICE_TABLE(of, cplds_id_table);
|
||||||
|
|
||||||
|
static struct platform_driver cplds_driver = {
|
||||||
|
.driver = {
|
||||||
|
.name = "pxa_cplds_irqs",
|
||||||
|
.of_match_table = of_match_ptr(cplds_id_table),
|
||||||
|
},
|
||||||
|
.probe = cplds_probe,
|
||||||
|
.remove = cplds_remove,
|
||||||
|
.resume = cplds_resume,
|
||||||
|
};
|
||||||
|
|
||||||
|
module_platform_driver(cplds_driver);
|
||||||
|
|
||||||
|
MODULE_DESCRIPTION("PXA Cplds interrupts driver");
|
||||||
|
MODULE_AUTHOR("Robert Jarzmik <robert.jarzmik@free.fr>");
|
||||||
|
MODULE_LICENSE("GPL");
|
@ -44,9 +44,11 @@ static void __iomem *rk3288_bootram_base;
|
|||||||
static phys_addr_t rk3288_bootram_phy;
|
static phys_addr_t rk3288_bootram_phy;
|
||||||
|
|
||||||
static struct regmap *pmu_regmap;
|
static struct regmap *pmu_regmap;
|
||||||
|
static struct regmap *grf_regmap;
|
||||||
static struct regmap *sgrf_regmap;
|
static struct regmap *sgrf_regmap;
|
||||||
|
|
||||||
static u32 rk3288_pmu_pwr_mode_con;
|
static u32 rk3288_pmu_pwr_mode_con;
|
||||||
|
static u32 rk3288_grf_soc_con0;
|
||||||
static u32 rk3288_sgrf_soc_con0;
|
static u32 rk3288_sgrf_soc_con0;
|
||||||
|
|
||||||
static inline u32 rk3288_l2_config(void)
|
static inline u32 rk3288_l2_config(void)
|
||||||
@ -70,11 +72,25 @@ static void rk3288_slp_mode_set(int level)
|
|||||||
{
|
{
|
||||||
u32 mode_set, mode_set1;
|
u32 mode_set, mode_set1;
|
||||||
|
|
||||||
|
regmap_read(grf_regmap, RK3288_GRF_SOC_CON0, &rk3288_grf_soc_con0);
|
||||||
|
|
||||||
regmap_read(sgrf_regmap, RK3288_SGRF_SOC_CON0, &rk3288_sgrf_soc_con0);
|
regmap_read(sgrf_regmap, RK3288_SGRF_SOC_CON0, &rk3288_sgrf_soc_con0);
|
||||||
|
|
||||||
regmap_read(pmu_regmap, RK3288_PMU_PWRMODE_CON,
|
regmap_read(pmu_regmap, RK3288_PMU_PWRMODE_CON,
|
||||||
&rk3288_pmu_pwr_mode_con);
|
&rk3288_pmu_pwr_mode_con);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We need set this bit GRF_FORCE_JTAG here, for the debug module,
|
||||||
|
* otherwise, it may become inaccessible after resume.
|
||||||
|
* This creates a potential security issue, as the sdmmc pins may
|
||||||
|
* accept jtag data for a short time during resume if no card is
|
||||||
|
* inserted.
|
||||||
|
* But this is of course also true for the regular boot, before we
|
||||||
|
* turn of the jtag/sdmmc autodetect.
|
||||||
|
*/
|
||||||
|
regmap_write(grf_regmap, RK3288_GRF_SOC_CON0, GRF_FORCE_JTAG |
|
||||||
|
GRF_FORCE_JTAG_WRITE);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SGRF_FAST_BOOT_EN - system to boot from FAST_BOOT_ADDR
|
* SGRF_FAST_BOOT_EN - system to boot from FAST_BOOT_ADDR
|
||||||
* PCLK_WDT_GATE - disable WDT during suspend.
|
* PCLK_WDT_GATE - disable WDT during suspend.
|
||||||
@ -83,6 +99,13 @@ static void rk3288_slp_mode_set(int level)
|
|||||||
SGRF_PCLK_WDT_GATE | SGRF_FAST_BOOT_EN
|
SGRF_PCLK_WDT_GATE | SGRF_FAST_BOOT_EN
|
||||||
| SGRF_PCLK_WDT_GATE_WRITE | SGRF_FAST_BOOT_EN_WRITE);
|
| SGRF_PCLK_WDT_GATE_WRITE | SGRF_FAST_BOOT_EN_WRITE);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The dapswjdp can not auto reset before resume, that cause it may
|
||||||
|
* access some illegal address during resume. Let's disable it before
|
||||||
|
* suspend, and the MASKROM will enable it back.
|
||||||
|
*/
|
||||||
|
regmap_write(sgrf_regmap, RK3288_SGRF_CPU_CON0, SGRF_DAPDEVICEEN_WRITE);
|
||||||
|
|
||||||
/* booting address of resuming system is from this register value */
|
/* booting address of resuming system is from this register value */
|
||||||
regmap_write(sgrf_regmap, RK3288_SGRF_FAST_BOOT_ADDR,
|
regmap_write(sgrf_regmap, RK3288_SGRF_FAST_BOOT_ADDR,
|
||||||
rk3288_bootram_phy);
|
rk3288_bootram_phy);
|
||||||
@ -128,6 +151,9 @@ static void rk3288_slp_mode_set_resume(void)
|
|||||||
regmap_write(sgrf_regmap, RK3288_SGRF_SOC_CON0,
|
regmap_write(sgrf_regmap, RK3288_SGRF_SOC_CON0,
|
||||||
rk3288_sgrf_soc_con0 | SGRF_PCLK_WDT_GATE_WRITE
|
rk3288_sgrf_soc_con0 | SGRF_PCLK_WDT_GATE_WRITE
|
||||||
| SGRF_FAST_BOOT_EN_WRITE);
|
| SGRF_FAST_BOOT_EN_WRITE);
|
||||||
|
|
||||||
|
regmap_write(grf_regmap, RK3288_GRF_SOC_CON0, rk3288_grf_soc_con0 |
|
||||||
|
GRF_FORCE_JTAG_WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rockchip_lpmode_enter(unsigned long arg)
|
static int rockchip_lpmode_enter(unsigned long arg)
|
||||||
@ -186,6 +212,13 @@ static int rk3288_suspend_init(struct device_node *np)
|
|||||||
return PTR_ERR(pmu_regmap);
|
return PTR_ERR(pmu_regmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
grf_regmap = syscon_regmap_lookup_by_compatible(
|
||||||
|
"rockchip,rk3288-grf");
|
||||||
|
if (IS_ERR(grf_regmap)) {
|
||||||
|
pr_err("%s: could not find grf regmap\n", __func__);
|
||||||
|
return PTR_ERR(pmu_regmap);
|
||||||
|
}
|
||||||
|
|
||||||
sram_np = of_find_compatible_node(NULL, NULL,
|
sram_np = of_find_compatible_node(NULL, NULL,
|
||||||
"rockchip,rk3288-pmu-sram");
|
"rockchip,rk3288-pmu-sram");
|
||||||
if (!sram_np) {
|
if (!sram_np) {
|
||||||
|
@ -48,6 +48,10 @@ static inline void rockchip_suspend_init(void)
|
|||||||
#define RK3288_PMU_WAKEUP_RST_CLR_CNT 0x44
|
#define RK3288_PMU_WAKEUP_RST_CLR_CNT 0x44
|
||||||
#define RK3288_PMU_PWRMODE_CON1 0x90
|
#define RK3288_PMU_PWRMODE_CON1 0x90
|
||||||
|
|
||||||
|
#define RK3288_GRF_SOC_CON0 0x244
|
||||||
|
#define GRF_FORCE_JTAG BIT(12)
|
||||||
|
#define GRF_FORCE_JTAG_WRITE BIT(28)
|
||||||
|
|
||||||
#define RK3288_SGRF_SOC_CON0 (0x0000)
|
#define RK3288_SGRF_SOC_CON0 (0x0000)
|
||||||
#define RK3288_SGRF_FAST_BOOT_ADDR (0x0120)
|
#define RK3288_SGRF_FAST_BOOT_ADDR (0x0120)
|
||||||
#define SGRF_PCLK_WDT_GATE BIT(6)
|
#define SGRF_PCLK_WDT_GATE BIT(6)
|
||||||
@ -55,6 +59,10 @@ static inline void rockchip_suspend_init(void)
|
|||||||
#define SGRF_FAST_BOOT_EN BIT(8)
|
#define SGRF_FAST_BOOT_EN BIT(8)
|
||||||
#define SGRF_FAST_BOOT_EN_WRITE BIT(24)
|
#define SGRF_FAST_BOOT_EN_WRITE BIT(24)
|
||||||
|
|
||||||
|
#define RK3288_SGRF_CPU_CON0 (0x40)
|
||||||
|
#define SGRF_DAPDEVICEEN BIT(0)
|
||||||
|
#define SGRF_DAPDEVICEEN_WRITE BIT(16)
|
||||||
|
|
||||||
#define RK3288_CRU_MODE_CON 0x50
|
#define RK3288_CRU_MODE_CON 0x50
|
||||||
#define RK3288_CRU_SEL0_CON 0x60
|
#define RK3288_CRU_SEL0_CON 0x60
|
||||||
#define RK3288_CRU_SEL1_CON 0x64
|
#define RK3288_CRU_SEL1_CON 0x64
|
||||||
|
@ -30,11 +30,30 @@
|
|||||||
#include "pm.h"
|
#include "pm.h"
|
||||||
|
|
||||||
#define RK3288_GRF_SOC_CON0 0x244
|
#define RK3288_GRF_SOC_CON0 0x244
|
||||||
|
#define RK3288_TIMER6_7_PHYS 0xff810000
|
||||||
|
|
||||||
static void __init rockchip_timer_init(void)
|
static void __init rockchip_timer_init(void)
|
||||||
{
|
{
|
||||||
if (of_machine_is_compatible("rockchip,rk3288")) {
|
if (of_machine_is_compatible("rockchip,rk3288")) {
|
||||||
struct regmap *grf;
|
struct regmap *grf;
|
||||||
|
void __iomem *reg_base;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Most/all uboot versions for rk3288 don't enable timer7
|
||||||
|
* which is needed for the architected timer to work.
|
||||||
|
* So make sure it is running during early boot.
|
||||||
|
*/
|
||||||
|
reg_base = ioremap(RK3288_TIMER6_7_PHYS, SZ_16K);
|
||||||
|
if (reg_base) {
|
||||||
|
writel(0, reg_base + 0x30);
|
||||||
|
writel(0xffffffff, reg_base + 0x20);
|
||||||
|
writel(0xffffffff, reg_base + 0x24);
|
||||||
|
writel(1, reg_base + 0x30);
|
||||||
|
dsb();
|
||||||
|
iounmap(reg_base);
|
||||||
|
} else {
|
||||||
|
pr_err("rockchip: could not map timer7 registers\n");
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Disable auto jtag/sdmmc switching that causes issues
|
* Disable auto jtag/sdmmc switching that causes issues
|
||||||
|
@ -1878,7 +1878,7 @@ struct dma_map_ops iommu_coherent_ops = {
|
|||||||
* arm_iommu_attach_device function.
|
* arm_iommu_attach_device function.
|
||||||
*/
|
*/
|
||||||
struct dma_iommu_mapping *
|
struct dma_iommu_mapping *
|
||||||
arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, size_t size)
|
arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, u64 size)
|
||||||
{
|
{
|
||||||
unsigned int bits = size >> PAGE_SHIFT;
|
unsigned int bits = size >> PAGE_SHIFT;
|
||||||
unsigned int bitmap_size = BITS_TO_LONGS(bits) * sizeof(long);
|
unsigned int bitmap_size = BITS_TO_LONGS(bits) * sizeof(long);
|
||||||
@ -1886,6 +1886,10 @@ arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, size_t size)
|
|||||||
int extensions = 1;
|
int extensions = 1;
|
||||||
int err = -ENOMEM;
|
int err = -ENOMEM;
|
||||||
|
|
||||||
|
/* currently only 32-bit DMA address space is supported */
|
||||||
|
if (size > DMA_BIT_MASK(32) + 1)
|
||||||
|
return ERR_PTR(-ERANGE);
|
||||||
|
|
||||||
if (!bitmap_size)
|
if (!bitmap_size)
|
||||||
return ERR_PTR(-EINVAL);
|
return ERR_PTR(-EINVAL);
|
||||||
|
|
||||||
@ -2057,13 +2061,6 @@ static bool arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, u64 size,
|
|||||||
if (!iommu)
|
if (!iommu)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/*
|
|
||||||
* currently arm_iommu_create_mapping() takes a max of size_t
|
|
||||||
* for size param. So check this limit for now.
|
|
||||||
*/
|
|
||||||
if (size > SIZE_MAX)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
mapping = arm_iommu_create_mapping(dev->bus, dma_base, size);
|
mapping = arm_iommu_create_mapping(dev->bus, dma_base, size);
|
||||||
if (IS_ERR(mapping)) {
|
if (IS_ERR(mapping)) {
|
||||||
pr_warn("Failed to create %llu-byte IOMMU mapping for device %s\n",
|
pr_warn("Failed to create %llu-byte IOMMU mapping for device %s\n",
|
||||||
|
@ -22,8 +22,6 @@
|
|||||||
*
|
*
|
||||||
* These are the low level assembler for performing cache and TLB
|
* These are the low level assembler for performing cache and TLB
|
||||||
* functions on the arm1020.
|
* functions on the arm1020.
|
||||||
*
|
|
||||||
* CONFIG_CPU_ARM1020_CPU_IDLE -> nohlt
|
|
||||||
*/
|
*/
|
||||||
#include <linux/linkage.h>
|
#include <linux/linkage.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
|
@ -22,8 +22,6 @@
|
|||||||
*
|
*
|
||||||
* These are the low level assembler for performing cache and TLB
|
* These are the low level assembler for performing cache and TLB
|
||||||
* functions on the arm1020e.
|
* functions on the arm1020e.
|
||||||
*
|
|
||||||
* CONFIG_CPU_ARM1020_CPU_IDLE -> nohlt
|
|
||||||
*/
|
*/
|
||||||
#include <linux/linkage.h>
|
#include <linux/linkage.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
|
@ -441,9 +441,6 @@ ENTRY(cpu_arm925_set_pte_ext)
|
|||||||
.type __arm925_setup, #function
|
.type __arm925_setup, #function
|
||||||
__arm925_setup:
|
__arm925_setup:
|
||||||
mov r0, #0
|
mov r0, #0
|
||||||
#if defined(CONFIG_CPU_ICACHE_STREAMING_DISABLE)
|
|
||||||
orr r0,r0,#1 << 7
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Transparent on, D-cache clean & flush mode. See NOTE2 above */
|
/* Transparent on, D-cache clean & flush mode. See NOTE2 above */
|
||||||
orr r0,r0,#1 << 1 @ transparent mode on
|
orr r0,r0,#1 << 1 @ transparent mode on
|
||||||
|
@ -602,7 +602,6 @@ __\name\()_proc_info:
|
|||||||
PMD_SECT_AP_WRITE | \
|
PMD_SECT_AP_WRITE | \
|
||||||
PMD_SECT_AP_READ
|
PMD_SECT_AP_READ
|
||||||
initfn __feroceon_setup, __\name\()_proc_info
|
initfn __feroceon_setup, __\name\()_proc_info
|
||||||
.long __feroceon_setup
|
|
||||||
.long cpu_arch_name
|
.long cpu_arch_name
|
||||||
.long cpu_elf_name
|
.long cpu_elf_name
|
||||||
.long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
|
.long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
|
||||||
|
@ -54,6 +54,7 @@
|
|||||||
#define SEEN_DATA (1 << (BPF_MEMWORDS + 3))
|
#define SEEN_DATA (1 << (BPF_MEMWORDS + 3))
|
||||||
|
|
||||||
#define FLAG_NEED_X_RESET (1 << 0)
|
#define FLAG_NEED_X_RESET (1 << 0)
|
||||||
|
#define FLAG_IMM_OVERFLOW (1 << 1)
|
||||||
|
|
||||||
struct jit_ctx {
|
struct jit_ctx {
|
||||||
const struct bpf_prog *skf;
|
const struct bpf_prog *skf;
|
||||||
@ -293,6 +294,15 @@ static u16 imm_offset(u32 k, struct jit_ctx *ctx)
|
|||||||
/* PC in ARM mode == address of the instruction + 8 */
|
/* PC in ARM mode == address of the instruction + 8 */
|
||||||
imm = offset - (8 + ctx->idx * 4);
|
imm = offset - (8 + ctx->idx * 4);
|
||||||
|
|
||||||
|
if (imm & ~0xfff) {
|
||||||
|
/*
|
||||||
|
* literal pool is too far, signal it into flags. we
|
||||||
|
* can only detect it on the second pass unfortunately.
|
||||||
|
*/
|
||||||
|
ctx->flags |= FLAG_IMM_OVERFLOW;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return imm;
|
return imm;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -449,10 +459,21 @@ static inline void emit_udiv(u8 rd, u8 rm, u8 rn, struct jit_ctx *ctx)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (rm != ARM_R0)
|
|
||||||
emit(ARM_MOV_R(ARM_R0, rm), ctx);
|
/*
|
||||||
|
* For BPF_ALU | BPF_DIV | BPF_K instructions, rm is ARM_R4
|
||||||
|
* (r_A) and rn is ARM_R0 (r_scratch) so load rn first into
|
||||||
|
* ARM_R1 to avoid accidentally overwriting ARM_R0 with rm
|
||||||
|
* before using it as a source for ARM_R1.
|
||||||
|
*
|
||||||
|
* For BPF_ALU | BPF_DIV | BPF_X rm is ARM_R4 (r_A) and rn is
|
||||||
|
* ARM_R5 (r_X) so there is no particular register overlap
|
||||||
|
* issues.
|
||||||
|
*/
|
||||||
if (rn != ARM_R1)
|
if (rn != ARM_R1)
|
||||||
emit(ARM_MOV_R(ARM_R1, rn), ctx);
|
emit(ARM_MOV_R(ARM_R1, rn), ctx);
|
||||||
|
if (rm != ARM_R0)
|
||||||
|
emit(ARM_MOV_R(ARM_R0, rm), ctx);
|
||||||
|
|
||||||
ctx->seen |= SEEN_CALL;
|
ctx->seen |= SEEN_CALL;
|
||||||
emit_mov_i(ARM_R3, (u32)jit_udiv, ctx);
|
emit_mov_i(ARM_R3, (u32)jit_udiv, ctx);
|
||||||
@ -865,6 +886,14 @@ b_epilogue:
|
|||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ctx->flags & FLAG_IMM_OVERFLOW)
|
||||||
|
/*
|
||||||
|
* this instruction generated an overflow when
|
||||||
|
* trying to access the literal pool, so
|
||||||
|
* delegate this filter to the kernel interpreter.
|
||||||
|
*/
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* compute offsets only during the first pass */
|
/* compute offsets only during the first pass */
|
||||||
@ -927,7 +956,14 @@ void bpf_jit_compile(struct bpf_prog *fp)
|
|||||||
ctx.idx = 0;
|
ctx.idx = 0;
|
||||||
|
|
||||||
build_prologue(&ctx);
|
build_prologue(&ctx);
|
||||||
build_body(&ctx);
|
if (build_body(&ctx) < 0) {
|
||||||
|
#if __LINUX_ARM_ARCH__ < 7
|
||||||
|
if (ctx.imm_count)
|
||||||
|
kfree(ctx.imms);
|
||||||
|
#endif
|
||||||
|
bpf_jit_binary_free(header);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
build_epilogue(&ctx);
|
build_epilogue(&ctx);
|
||||||
|
|
||||||
flush_icache_range((u32)ctx.target, (u32)(ctx.target + ctx.idx));
|
flush_icache_range((u32)ctx.target, (u32)(ctx.target + ctx.idx));
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <linux/gfp.h>
|
#include <linux/gfp.h>
|
||||||
#include <linux/highmem.h>
|
#include <linux/highmem.h>
|
||||||
#include <linux/export.h>
|
#include <linux/export.h>
|
||||||
|
#include <linux/memblock.h>
|
||||||
#include <linux/of_address.h>
|
#include <linux/of_address.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
@ -21,6 +22,20 @@
|
|||||||
#include <asm/xen/hypercall.h>
|
#include <asm/xen/hypercall.h>
|
||||||
#include <asm/xen/interface.h>
|
#include <asm/xen/interface.h>
|
||||||
|
|
||||||
|
unsigned long xen_get_swiotlb_free_pages(unsigned int order)
|
||||||
|
{
|
||||||
|
struct memblock_region *reg;
|
||||||
|
gfp_t flags = __GFP_NOWARN;
|
||||||
|
|
||||||
|
for_each_memblock(memory, reg) {
|
||||||
|
if (reg->base < (phys_addr_t)0xffffffff) {
|
||||||
|
flags |= __GFP_DMA;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return __get_free_pages(flags, order);
|
||||||
|
}
|
||||||
|
|
||||||
enum dma_cache_op {
|
enum dma_cache_op {
|
||||||
DMA_UNMAP,
|
DMA_UNMAP,
|
||||||
DMA_MAP,
|
DMA_MAP,
|
||||||
|
@ -147,13 +147,21 @@ static int chksum_final(struct shash_desc *desc, u8 *out)
|
|||||||
{
|
{
|
||||||
struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
|
struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
|
||||||
|
|
||||||
|
put_unaligned_le32(ctx->crc, out);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int chksumc_final(struct shash_desc *desc, u8 *out)
|
||||||
|
{
|
||||||
|
struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
|
||||||
|
|
||||||
put_unaligned_le32(~ctx->crc, out);
|
put_unaligned_le32(~ctx->crc, out);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __chksum_finup(u32 crc, const u8 *data, unsigned int len, u8 *out)
|
static int __chksum_finup(u32 crc, const u8 *data, unsigned int len, u8 *out)
|
||||||
{
|
{
|
||||||
put_unaligned_le32(~crc32_arm64_le_hw(crc, data, len), out);
|
put_unaligned_le32(crc32_arm64_le_hw(crc, data, len), out);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,6 +207,14 @@ static int crc32_cra_init(struct crypto_tfm *tfm)
|
|||||||
{
|
{
|
||||||
struct chksum_ctx *mctx = crypto_tfm_ctx(tfm);
|
struct chksum_ctx *mctx = crypto_tfm_ctx(tfm);
|
||||||
|
|
||||||
|
mctx->key = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int crc32c_cra_init(struct crypto_tfm *tfm)
|
||||||
|
{
|
||||||
|
struct chksum_ctx *mctx = crypto_tfm_ctx(tfm);
|
||||||
|
|
||||||
mctx->key = ~0;
|
mctx->key = ~0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -229,7 +245,7 @@ static struct shash_alg crc32c_alg = {
|
|||||||
.setkey = chksum_setkey,
|
.setkey = chksum_setkey,
|
||||||
.init = chksum_init,
|
.init = chksum_init,
|
||||||
.update = chksumc_update,
|
.update = chksumc_update,
|
||||||
.final = chksum_final,
|
.final = chksumc_final,
|
||||||
.finup = chksumc_finup,
|
.finup = chksumc_finup,
|
||||||
.digest = chksumc_digest,
|
.digest = chksumc_digest,
|
||||||
.descsize = sizeof(struct chksum_desc_ctx),
|
.descsize = sizeof(struct chksum_desc_ctx),
|
||||||
@ -241,7 +257,7 @@ static struct shash_alg crc32c_alg = {
|
|||||||
.cra_alignmask = 0,
|
.cra_alignmask = 0,
|
||||||
.cra_ctxsize = sizeof(struct chksum_ctx),
|
.cra_ctxsize = sizeof(struct chksum_ctx),
|
||||||
.cra_module = THIS_MODULE,
|
.cra_module = THIS_MODULE,
|
||||||
.cra_init = crc32_cra_init,
|
.cra_init = crc32c_cra_init,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -74,6 +74,9 @@ static int sha1_ce_finup(struct shash_desc *desc, const u8 *data,
|
|||||||
|
|
||||||
static int sha1_ce_final(struct shash_desc *desc, u8 *out)
|
static int sha1_ce_final(struct shash_desc *desc, u8 *out)
|
||||||
{
|
{
|
||||||
|
struct sha1_ce_state *sctx = shash_desc_ctx(desc);
|
||||||
|
|
||||||
|
sctx->finalize = 0;
|
||||||
kernel_neon_begin_partial(16);
|
kernel_neon_begin_partial(16);
|
||||||
sha1_base_do_finalize(desc, (sha1_block_fn *)sha1_ce_transform);
|
sha1_base_do_finalize(desc, (sha1_block_fn *)sha1_ce_transform);
|
||||||
kernel_neon_end();
|
kernel_neon_end();
|
||||||
|
@ -75,6 +75,9 @@ static int sha256_ce_finup(struct shash_desc *desc, const u8 *data,
|
|||||||
|
|
||||||
static int sha256_ce_final(struct shash_desc *desc, u8 *out)
|
static int sha256_ce_final(struct shash_desc *desc, u8 *out)
|
||||||
{
|
{
|
||||||
|
struct sha256_ce_state *sctx = shash_desc_ctx(desc);
|
||||||
|
|
||||||
|
sctx->finalize = 0;
|
||||||
kernel_neon_begin_partial(28);
|
kernel_neon_begin_partial(28);
|
||||||
sha256_base_do_finalize(desc, (sha256_block_fn *)sha2_ce_transform);
|
sha256_base_do_finalize(desc, (sha256_block_fn *)sha2_ce_transform);
|
||||||
kernel_neon_end();
|
kernel_neon_end();
|
||||||
|
@ -45,7 +45,7 @@ static volatile unsigned long flushcache_cpumask = 0;
|
|||||||
/*
|
/*
|
||||||
* For flush_tlb_others()
|
* For flush_tlb_others()
|
||||||
*/
|
*/
|
||||||
static volatile cpumask_t flush_cpumask;
|
static cpumask_t flush_cpumask;
|
||||||
static struct mm_struct *flush_mm;
|
static struct mm_struct *flush_mm;
|
||||||
static struct vm_area_struct *flush_vma;
|
static struct vm_area_struct *flush_vma;
|
||||||
static volatile unsigned long flush_va;
|
static volatile unsigned long flush_va;
|
||||||
@ -415,7 +415,7 @@ static void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm,
|
|||||||
*/
|
*/
|
||||||
send_IPI_mask(&cpumask, INVALIDATE_TLB_IPI, 0);
|
send_IPI_mask(&cpumask, INVALIDATE_TLB_IPI, 0);
|
||||||
|
|
||||||
while (!cpumask_empty((cpumask_t*)&flush_cpumask)) {
|
while (!cpumask_empty(&flush_cpumask)) {
|
||||||
/* nothing. lockup detection does not belong here */
|
/* nothing. lockup detection does not belong here */
|
||||||
mb();
|
mb();
|
||||||
}
|
}
|
||||||
@ -468,7 +468,7 @@ void smp_invalidate_interrupt(void)
|
|||||||
__flush_tlb_page(va);
|
__flush_tlb_page(va);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cpumask_clear_cpu(cpu_id, (cpumask_t*)&flush_cpumask);
|
cpumask_clear_cpu(cpu_id, &flush_cpumask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
|
||||||
|
@ -45,7 +45,7 @@ extern int __cpu_logical_map[NR_CPUS];
|
|||||||
#define SMP_DUMP 0x8
|
#define SMP_DUMP 0x8
|
||||||
#define SMP_ASK_C0COUNT 0x10
|
#define SMP_ASK_C0COUNT 0x10
|
||||||
|
|
||||||
extern volatile cpumask_t cpu_callin_map;
|
extern cpumask_t cpu_callin_map;
|
||||||
|
|
||||||
/* Mask of CPUs which are currently definitely operating coherently */
|
/* Mask of CPUs which are currently definitely operating coherently */
|
||||||
extern cpumask_t cpu_coherent_mask;
|
extern cpumask_t cpu_coherent_mask;
|
||||||
|
@ -76,14 +76,6 @@ int arch_elf_pt_proc(void *_ehdr, void *_phdr, struct file *elf,
|
|||||||
|
|
||||||
/* Lets see if this is an O32 ELF */
|
/* Lets see if this is an O32 ELF */
|
||||||
if (ehdr32->e_ident[EI_CLASS] == ELFCLASS32) {
|
if (ehdr32->e_ident[EI_CLASS] == ELFCLASS32) {
|
||||||
/* FR = 1 for N32 */
|
|
||||||
if (ehdr32->e_flags & EF_MIPS_ABI2)
|
|
||||||
state->overall_fp_mode = FP_FR1;
|
|
||||||
else
|
|
||||||
/* Set a good default FPU mode for O32 */
|
|
||||||
state->overall_fp_mode = cpu_has_mips_r6 ?
|
|
||||||
FP_FRE : FP_FR0;
|
|
||||||
|
|
||||||
if (ehdr32->e_flags & EF_MIPS_FP64) {
|
if (ehdr32->e_flags & EF_MIPS_FP64) {
|
||||||
/*
|
/*
|
||||||
* Set MIPS_ABI_FP_OLD_64 for EF_MIPS_FP64. We will override it
|
* Set MIPS_ABI_FP_OLD_64 for EF_MIPS_FP64. We will override it
|
||||||
@ -104,9 +96,6 @@ int arch_elf_pt_proc(void *_ehdr, void *_phdr, struct file *elf,
|
|||||||
(char *)&abiflags,
|
(char *)&abiflags,
|
||||||
sizeof(abiflags));
|
sizeof(abiflags));
|
||||||
} else {
|
} else {
|
||||||
/* FR=1 is really the only option for 64-bit */
|
|
||||||
state->overall_fp_mode = FP_FR1;
|
|
||||||
|
|
||||||
if (phdr64->p_type != PT_MIPS_ABIFLAGS)
|
if (phdr64->p_type != PT_MIPS_ABIFLAGS)
|
||||||
return 0;
|
return 0;
|
||||||
if (phdr64->p_filesz < sizeof(abiflags))
|
if (phdr64->p_filesz < sizeof(abiflags))
|
||||||
@ -137,6 +126,7 @@ int arch_check_elf(void *_ehdr, bool has_interpreter,
|
|||||||
struct elf32_hdr *ehdr = _ehdr;
|
struct elf32_hdr *ehdr = _ehdr;
|
||||||
struct mode_req prog_req, interp_req;
|
struct mode_req prog_req, interp_req;
|
||||||
int fp_abi, interp_fp_abi, abi0, abi1, max_abi;
|
int fp_abi, interp_fp_abi, abi0, abi1, max_abi;
|
||||||
|
bool is_mips64;
|
||||||
|
|
||||||
if (!config_enabled(CONFIG_MIPS_O32_FP64_SUPPORT))
|
if (!config_enabled(CONFIG_MIPS_O32_FP64_SUPPORT))
|
||||||
return 0;
|
return 0;
|
||||||
@ -152,10 +142,22 @@ int arch_check_elf(void *_ehdr, bool has_interpreter,
|
|||||||
abi0 = abi1 = fp_abi;
|
abi0 = abi1 = fp_abi;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ABI limits. O32 = FP_64A, N32/N64 = FP_SOFT */
|
is_mips64 = (ehdr->e_ident[EI_CLASS] == ELFCLASS64) ||
|
||||||
max_abi = ((ehdr->e_ident[EI_CLASS] == ELFCLASS32) &&
|
(ehdr->e_flags & EF_MIPS_ABI2);
|
||||||
(!(ehdr->e_flags & EF_MIPS_ABI2))) ?
|
|
||||||
MIPS_ABI_FP_64A : MIPS_ABI_FP_SOFT;
|
if (is_mips64) {
|
||||||
|
/* MIPS64 code always uses FR=1, thus the default is easy */
|
||||||
|
state->overall_fp_mode = FP_FR1;
|
||||||
|
|
||||||
|
/* Disallow access to the various FPXX & FP64 ABIs */
|
||||||
|
max_abi = MIPS_ABI_FP_SOFT;
|
||||||
|
} else {
|
||||||
|
/* Default to a mode capable of running code expecting FR=0 */
|
||||||
|
state->overall_fp_mode = cpu_has_mips_r6 ? FP_FRE : FP_FR0;
|
||||||
|
|
||||||
|
/* Allow all ABIs we know about */
|
||||||
|
max_abi = MIPS_ABI_FP_64A;
|
||||||
|
}
|
||||||
|
|
||||||
if ((abi0 > max_abi && abi0 != MIPS_ABI_FP_UNKNOWN) ||
|
if ((abi0 > max_abi && abi0 != MIPS_ABI_FP_UNKNOWN) ||
|
||||||
(abi1 > max_abi && abi1 != MIPS_ABI_FP_UNKNOWN))
|
(abi1 > max_abi && abi1 != MIPS_ABI_FP_UNKNOWN))
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
#include <asm/time.h>
|
#include <asm/time.h>
|
||||||
#include <asm/setup.h>
|
#include <asm/setup.h>
|
||||||
|
|
||||||
volatile cpumask_t cpu_callin_map; /* Bitmask of started secondaries */
|
cpumask_t cpu_callin_map; /* Bitmask of started secondaries */
|
||||||
|
|
||||||
int __cpu_number_map[NR_CPUS]; /* Map physical to logical */
|
int __cpu_number_map[NR_CPUS]; /* Map physical to logical */
|
||||||
EXPORT_SYMBOL(__cpu_number_map);
|
EXPORT_SYMBOL(__cpu_number_map);
|
||||||
@ -218,8 +218,10 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
|
|||||||
/*
|
/*
|
||||||
* Trust is futile. We should really have timeouts ...
|
* Trust is futile. We should really have timeouts ...
|
||||||
*/
|
*/
|
||||||
while (!cpumask_test_cpu(cpu, &cpu_callin_map))
|
while (!cpumask_test_cpu(cpu, &cpu_callin_map)) {
|
||||||
udelay(100);
|
udelay(100);
|
||||||
|
schedule();
|
||||||
|
}
|
||||||
|
|
||||||
synchronise_count_master(cpu);
|
synchronise_count_master(cpu);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#define TM_CAUSE_RESCHED 0xde
|
#define TM_CAUSE_RESCHED 0xde
|
||||||
#define TM_CAUSE_TLBI 0xdc
|
#define TM_CAUSE_TLBI 0xdc
|
||||||
#define TM_CAUSE_FAC_UNAV 0xda
|
#define TM_CAUSE_FAC_UNAV 0xda
|
||||||
#define TM_CAUSE_SYSCALL 0xd8
|
#define TM_CAUSE_SYSCALL 0xd8 /* future use */
|
||||||
#define TM_CAUSE_MISC 0xd6 /* future use */
|
#define TM_CAUSE_MISC 0xd6 /* future use */
|
||||||
#define TM_CAUSE_SIGNAL 0xd4
|
#define TM_CAUSE_SIGNAL 0xd4
|
||||||
#define TM_CAUSE_ALIGNMENT 0xd2
|
#define TM_CAUSE_ALIGNMENT 0xd2
|
||||||
|
@ -749,21 +749,24 @@ int pcibios_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state stat
|
|||||||
eeh_unfreeze_pe(pe, false);
|
eeh_unfreeze_pe(pe, false);
|
||||||
eeh_pe_state_clear(pe, EEH_PE_CFG_BLOCKED);
|
eeh_pe_state_clear(pe, EEH_PE_CFG_BLOCKED);
|
||||||
eeh_pe_dev_traverse(pe, eeh_restore_dev_state, dev);
|
eeh_pe_dev_traverse(pe, eeh_restore_dev_state, dev);
|
||||||
|
eeh_pe_state_clear(pe, EEH_PE_ISOLATED);
|
||||||
break;
|
break;
|
||||||
case pcie_hot_reset:
|
case pcie_hot_reset:
|
||||||
|
eeh_pe_state_mark(pe, EEH_PE_ISOLATED);
|
||||||
eeh_ops->set_option(pe, EEH_OPT_FREEZE_PE);
|
eeh_ops->set_option(pe, EEH_OPT_FREEZE_PE);
|
||||||
eeh_pe_dev_traverse(pe, eeh_disable_and_save_dev_state, dev);
|
eeh_pe_dev_traverse(pe, eeh_disable_and_save_dev_state, dev);
|
||||||
eeh_pe_state_mark(pe, EEH_PE_CFG_BLOCKED);
|
eeh_pe_state_mark(pe, EEH_PE_CFG_BLOCKED);
|
||||||
eeh_ops->reset(pe, EEH_RESET_HOT);
|
eeh_ops->reset(pe, EEH_RESET_HOT);
|
||||||
break;
|
break;
|
||||||
case pcie_warm_reset:
|
case pcie_warm_reset:
|
||||||
|
eeh_pe_state_mark(pe, EEH_PE_ISOLATED);
|
||||||
eeh_ops->set_option(pe, EEH_OPT_FREEZE_PE);
|
eeh_ops->set_option(pe, EEH_OPT_FREEZE_PE);
|
||||||
eeh_pe_dev_traverse(pe, eeh_disable_and_save_dev_state, dev);
|
eeh_pe_dev_traverse(pe, eeh_disable_and_save_dev_state, dev);
|
||||||
eeh_pe_state_mark(pe, EEH_PE_CFG_BLOCKED);
|
eeh_pe_state_mark(pe, EEH_PE_CFG_BLOCKED);
|
||||||
eeh_ops->reset(pe, EEH_RESET_FUNDAMENTAL);
|
eeh_ops->reset(pe, EEH_RESET_FUNDAMENTAL);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
eeh_pe_state_clear(pe, EEH_PE_CFG_BLOCKED);
|
eeh_pe_state_clear(pe, EEH_PE_ISOLATED | EEH_PE_CFG_BLOCKED);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1058,6 +1061,9 @@ void eeh_add_device_early(struct pci_dn *pdn)
|
|||||||
if (!edev || !eeh_enabled())
|
if (!edev || !eeh_enabled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!eeh_has_flag(EEH_PROBE_MODE_DEVTREE))
|
||||||
|
return;
|
||||||
|
|
||||||
/* USB Bus children of PCI devices will not have BUID's */
|
/* USB Bus children of PCI devices will not have BUID's */
|
||||||
phb = edev->phb;
|
phb = edev->phb;
|
||||||
if (NULL == phb ||
|
if (NULL == phb ||
|
||||||
@ -1112,6 +1118,9 @@ void eeh_add_device_late(struct pci_dev *dev)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (eeh_has_flag(EEH_PROBE_MODE_DEV))
|
||||||
|
eeh_ops->probe(pdn, NULL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The EEH cache might not be removed correctly because of
|
* The EEH cache might not be removed correctly because of
|
||||||
* unbalanced kref to the device during unplug time, which
|
* unbalanced kref to the device during unplug time, which
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
#include <asm/ftrace.h>
|
#include <asm/ftrace.h>
|
||||||
#include <asm/hw_irq.h>
|
#include <asm/hw_irq.h>
|
||||||
#include <asm/context_tracking.h>
|
#include <asm/context_tracking.h>
|
||||||
#include <asm/tm.h>
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* System calls.
|
* System calls.
|
||||||
@ -146,24 +145,6 @@ END_FW_FTR_SECTION_IFSET(FW_FEATURE_SPLPAR)
|
|||||||
andi. r11,r10,_TIF_SYSCALL_DOTRACE
|
andi. r11,r10,_TIF_SYSCALL_DOTRACE
|
||||||
bne syscall_dotrace
|
bne syscall_dotrace
|
||||||
.Lsyscall_dotrace_cont:
|
.Lsyscall_dotrace_cont:
|
||||||
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
|
||||||
BEGIN_FTR_SECTION
|
|
||||||
b 1f
|
|
||||||
END_FTR_SECTION_IFCLR(CPU_FTR_TM)
|
|
||||||
extrdi. r11, r12, 1, (63-MSR_TS_T_LG) /* transaction active? */
|
|
||||||
beq+ 1f
|
|
||||||
|
|
||||||
/* Doom the transaction and don't perform the syscall: */
|
|
||||||
mfmsr r11
|
|
||||||
li r12, 1
|
|
||||||
rldimi r11, r12, MSR_TM_LG, 63-MSR_TM_LG
|
|
||||||
mtmsrd r11, 0
|
|
||||||
li r11, (TM_CAUSE_SYSCALL|TM_CAUSE_PERSISTENT)
|
|
||||||
TABORT(R11)
|
|
||||||
|
|
||||||
b .Lsyscall_exit
|
|
||||||
1:
|
|
||||||
#endif
|
|
||||||
cmpldi 0,r0,NR_syscalls
|
cmpldi 0,r0,NR_syscalls
|
||||||
bge- syscall_enosys
|
bge- syscall_enosys
|
||||||
|
|
||||||
|
@ -501,9 +501,11 @@ BEGIN_FTR_SECTION
|
|||||||
CHECK_HMI_INTERRUPT
|
CHECK_HMI_INTERRUPT
|
||||||
END_FTR_SECTION_IFSET(CPU_FTR_HVMODE)
|
END_FTR_SECTION_IFSET(CPU_FTR_HVMODE)
|
||||||
ld r1,PACAR1(r13)
|
ld r1,PACAR1(r13)
|
||||||
|
ld r6,_CCR(r1)
|
||||||
ld r4,_MSR(r1)
|
ld r4,_MSR(r1)
|
||||||
ld r5,_NIP(r1)
|
ld r5,_NIP(r1)
|
||||||
addi r1,r1,INT_FRAME_SIZE
|
addi r1,r1,INT_FRAME_SIZE
|
||||||
|
mtcr r6
|
||||||
mtspr SPRN_SRR1,r4
|
mtspr SPRN_SRR1,r4
|
||||||
mtspr SPRN_SRR0,r5
|
mtspr SPRN_SRR0,r5
|
||||||
rfid
|
rfid
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
#include <linux/gfp.h>
|
#include <linux/gfp.h>
|
||||||
#include <linux/anon_inodes.h>
|
#include <linux/anon_inodes.h>
|
||||||
|
#include <linux/spinlock.h>
|
||||||
|
|
||||||
#include <asm/uaccess.h>
|
#include <asm/uaccess.h>
|
||||||
#include <asm/kvm_book3s.h>
|
#include <asm/kvm_book3s.h>
|
||||||
@ -20,7 +21,6 @@
|
|||||||
#include <asm/xics.h>
|
#include <asm/xics.h>
|
||||||
#include <asm/debug.h>
|
#include <asm/debug.h>
|
||||||
#include <asm/time.h>
|
#include <asm/time.h>
|
||||||
#include <asm/spinlock.h>
|
|
||||||
|
|
||||||
#include <linux/debugfs.h>
|
#include <linux/debugfs.h>
|
||||||
#include <linux/seq_file.h>
|
#include <linux/seq_file.h>
|
||||||
|
@ -2693,7 +2693,6 @@ static void __init pnv_pci_init_ioda_phb(struct device_node *np,
|
|||||||
hose->last_busno = 0xff;
|
hose->last_busno = 0xff;
|
||||||
}
|
}
|
||||||
hose->private_data = phb;
|
hose->private_data = phb;
|
||||||
hose->controller_ops = pnv_pci_controller_ops;
|
|
||||||
phb->hub_id = hub_id;
|
phb->hub_id = hub_id;
|
||||||
phb->opal_id = phb_id;
|
phb->opal_id = phb_id;
|
||||||
phb->type = ioda_type;
|
phb->type = ioda_type;
|
||||||
@ -2812,6 +2811,7 @@ static void __init pnv_pci_init_ioda_phb(struct device_node *np,
|
|||||||
pnv_pci_controller_ops.enable_device_hook = pnv_pci_enable_device_hook;
|
pnv_pci_controller_ops.enable_device_hook = pnv_pci_enable_device_hook;
|
||||||
pnv_pci_controller_ops.window_alignment = pnv_pci_window_alignment;
|
pnv_pci_controller_ops.window_alignment = pnv_pci_window_alignment;
|
||||||
pnv_pci_controller_ops.reset_secondary_bus = pnv_pci_reset_secondary_bus;
|
pnv_pci_controller_ops.reset_secondary_bus = pnv_pci_reset_secondary_bus;
|
||||||
|
hose->controller_ops = pnv_pci_controller_ops;
|
||||||
|
|
||||||
#ifdef CONFIG_PCI_IOV
|
#ifdef CONFIG_PCI_IOV
|
||||||
ppc_md.pcibios_fixup_sriov = pnv_pci_ioda_fixup_iov_resources;
|
ppc_md.pcibios_fixup_sriov = pnv_pci_ioda_fixup_iov_resources;
|
||||||
|
@ -412,6 +412,10 @@ static ssize_t dlpar_cpu_probe(const char *buf, size_t count)
|
|||||||
if (rc)
|
if (rc)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
rc = dlpar_acquire_drc(drc_index);
|
||||||
|
if (rc)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
parent = of_find_node_by_path("/cpus");
|
parent = of_find_node_by_path("/cpus");
|
||||||
if (!parent)
|
if (!parent)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
@ -422,12 +426,6 @@ static ssize_t dlpar_cpu_probe(const char *buf, size_t count)
|
|||||||
|
|
||||||
of_node_put(parent);
|
of_node_put(parent);
|
||||||
|
|
||||||
rc = dlpar_acquire_drc(drc_index);
|
|
||||||
if (rc) {
|
|
||||||
dlpar_free_cc_nodes(dn);
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
rc = dlpar_attach_node(dn);
|
rc = dlpar_attach_node(dn);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
dlpar_release_drc(drc_index);
|
dlpar_release_drc(drc_index);
|
||||||
|
@ -1109,6 +1109,8 @@ struct boot_params *make_boot_params(struct efi_config *c)
|
|||||||
if (!cmdline_ptr)
|
if (!cmdline_ptr)
|
||||||
goto fail;
|
goto fail;
|
||||||
hdr->cmd_line_ptr = (unsigned long)cmdline_ptr;
|
hdr->cmd_line_ptr = (unsigned long)cmdline_ptr;
|
||||||
|
/* Fill in upper bits of command line address, NOP on 32 bit */
|
||||||
|
boot_params->ext_cmd_line_ptr = (u64)(unsigned long)cmdline_ptr >> 32;
|
||||||
|
|
||||||
hdr->ramdisk_image = 0;
|
hdr->ramdisk_image = 0;
|
||||||
hdr->ramdisk_size = 0;
|
hdr->ramdisk_size = 0;
|
||||||
|
@ -50,7 +50,7 @@ extern const struct hypervisor_x86 *x86_hyper;
|
|||||||
/* Recognized hypervisors */
|
/* Recognized hypervisors */
|
||||||
extern const struct hypervisor_x86 x86_hyper_vmware;
|
extern const struct hypervisor_x86 x86_hyper_vmware;
|
||||||
extern const struct hypervisor_x86 x86_hyper_ms_hyperv;
|
extern const struct hypervisor_x86 x86_hyper_ms_hyperv;
|
||||||
extern const struct hypervisor_x86 x86_hyper_xen_hvm;
|
extern const struct hypervisor_x86 x86_hyper_xen;
|
||||||
extern const struct hypervisor_x86 x86_hyper_kvm;
|
extern const struct hypervisor_x86 x86_hyper_kvm;
|
||||||
|
|
||||||
extern void init_hypervisor(struct cpuinfo_x86 *c);
|
extern void init_hypervisor(struct cpuinfo_x86 *c);
|
||||||
|
@ -169,7 +169,7 @@ static inline int arch_spin_is_contended(arch_spinlock_t *lock)
|
|||||||
struct __raw_tickets tmp = READ_ONCE(lock->tickets);
|
struct __raw_tickets tmp = READ_ONCE(lock->tickets);
|
||||||
|
|
||||||
tmp.head &= ~TICKET_SLOWPATH_FLAG;
|
tmp.head &= ~TICKET_SLOWPATH_FLAG;
|
||||||
return (tmp.tail - tmp.head) > TICKET_LOCK_INC;
|
return (__ticket_t)(tmp.tail - tmp.head) > TICKET_LOCK_INC;
|
||||||
}
|
}
|
||||||
#define arch_spin_is_contended arch_spin_is_contended
|
#define arch_spin_is_contended arch_spin_is_contended
|
||||||
|
|
||||||
|
@ -269,4 +269,9 @@ static inline bool xen_arch_need_swiotlb(struct device *dev,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline unsigned long xen_get_swiotlb_free_pages(unsigned int order)
|
||||||
|
{
|
||||||
|
return __get_free_pages(__GFP_NOWARN, order);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* _ASM_X86_XEN_PAGE_H */
|
#endif /* _ASM_X86_XEN_PAGE_H */
|
||||||
|
@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
static const __initconst struct hypervisor_x86 * const hypervisors[] =
|
static const __initconst struct hypervisor_x86 * const hypervisors[] =
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_XEN_PVHVM
|
#ifdef CONFIG_XEN
|
||||||
&x86_hyper_xen_hvm,
|
&x86_hyper_xen,
|
||||||
#endif
|
#endif
|
||||||
&x86_hyper_vmware,
|
&x86_hyper_vmware,
|
||||||
&x86_hyper_ms_hyperv,
|
&x86_hyper_ms_hyperv,
|
||||||
|
@ -2533,34 +2533,6 @@ ssize_t intel_event_sysfs_show(char *page, u64 config)
|
|||||||
return x86_event_sysfs_show(page, config, event);
|
return x86_event_sysfs_show(page, config, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
static __initconst const struct x86_pmu core_pmu = {
|
|
||||||
.name = "core",
|
|
||||||
.handle_irq = x86_pmu_handle_irq,
|
|
||||||
.disable_all = x86_pmu_disable_all,
|
|
||||||
.enable_all = core_pmu_enable_all,
|
|
||||||
.enable = core_pmu_enable_event,
|
|
||||||
.disable = x86_pmu_disable_event,
|
|
||||||
.hw_config = x86_pmu_hw_config,
|
|
||||||
.schedule_events = x86_schedule_events,
|
|
||||||
.eventsel = MSR_ARCH_PERFMON_EVENTSEL0,
|
|
||||||
.perfctr = MSR_ARCH_PERFMON_PERFCTR0,
|
|
||||||
.event_map = intel_pmu_event_map,
|
|
||||||
.max_events = ARRAY_SIZE(intel_perfmon_event_map),
|
|
||||||
.apic = 1,
|
|
||||||
/*
|
|
||||||
* Intel PMCs cannot be accessed sanely above 32 bit width,
|
|
||||||
* so we install an artificial 1<<31 period regardless of
|
|
||||||
* the generic event period:
|
|
||||||
*/
|
|
||||||
.max_period = (1ULL << 31) - 1,
|
|
||||||
.get_event_constraints = intel_get_event_constraints,
|
|
||||||
.put_event_constraints = intel_put_event_constraints,
|
|
||||||
.event_constraints = intel_core_event_constraints,
|
|
||||||
.guest_get_msrs = core_guest_get_msrs,
|
|
||||||
.format_attrs = intel_arch_formats_attr,
|
|
||||||
.events_sysfs_show = intel_event_sysfs_show,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct intel_shared_regs *allocate_shared_regs(int cpu)
|
struct intel_shared_regs *allocate_shared_regs(int cpu)
|
||||||
{
|
{
|
||||||
struct intel_shared_regs *regs;
|
struct intel_shared_regs *regs;
|
||||||
@ -2743,6 +2715,44 @@ static struct attribute *intel_arch3_formats_attr[] = {
|
|||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static __initconst const struct x86_pmu core_pmu = {
|
||||||
|
.name = "core",
|
||||||
|
.handle_irq = x86_pmu_handle_irq,
|
||||||
|
.disable_all = x86_pmu_disable_all,
|
||||||
|
.enable_all = core_pmu_enable_all,
|
||||||
|
.enable = core_pmu_enable_event,
|
||||||
|
.disable = x86_pmu_disable_event,
|
||||||
|
.hw_config = x86_pmu_hw_config,
|
||||||
|
.schedule_events = x86_schedule_events,
|
||||||
|
.eventsel = MSR_ARCH_PERFMON_EVENTSEL0,
|
||||||
|
.perfctr = MSR_ARCH_PERFMON_PERFCTR0,
|
||||||
|
.event_map = intel_pmu_event_map,
|
||||||
|
.max_events = ARRAY_SIZE(intel_perfmon_event_map),
|
||||||
|
.apic = 1,
|
||||||
|
/*
|
||||||
|
* Intel PMCs cannot be accessed sanely above 32-bit width,
|
||||||
|
* so we install an artificial 1<<31 period regardless of
|
||||||
|
* the generic event period:
|
||||||
|
*/
|
||||||
|
.max_period = (1ULL<<31) - 1,
|
||||||
|
.get_event_constraints = intel_get_event_constraints,
|
||||||
|
.put_event_constraints = intel_put_event_constraints,
|
||||||
|
.event_constraints = intel_core_event_constraints,
|
||||||
|
.guest_get_msrs = core_guest_get_msrs,
|
||||||
|
.format_attrs = intel_arch_formats_attr,
|
||||||
|
.events_sysfs_show = intel_event_sysfs_show,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Virtual (or funny metal) CPU can define x86_pmu.extra_regs
|
||||||
|
* together with PMU version 1 and thus be using core_pmu with
|
||||||
|
* shared_regs. We need following callbacks here to allocate
|
||||||
|
* it properly.
|
||||||
|
*/
|
||||||
|
.cpu_prepare = intel_pmu_cpu_prepare,
|
||||||
|
.cpu_starting = intel_pmu_cpu_starting,
|
||||||
|
.cpu_dying = intel_pmu_cpu_dying,
|
||||||
|
};
|
||||||
|
|
||||||
static __initconst const struct x86_pmu intel_pmu = {
|
static __initconst const struct x86_pmu intel_pmu = {
|
||||||
.name = "Intel",
|
.name = "Intel",
|
||||||
.handle_irq = intel_pmu_handle_irq,
|
.handle_irq = intel_pmu_handle_irq,
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* Nehalem/SandBridge/Haswell uncore support */
|
/* Nehalem/SandBridge/Haswell uncore support */
|
||||||
#include "perf_event_intel_uncore.h"
|
#include "perf_event_intel_uncore.h"
|
||||||
|
|
||||||
|
/* Uncore IMC PCI IDs */
|
||||||
|
#define PCI_DEVICE_ID_INTEL_SNB_IMC 0x0100
|
||||||
|
#define PCI_DEVICE_ID_INTEL_IVB_IMC 0x0154
|
||||||
|
#define PCI_DEVICE_ID_INTEL_IVB_E3_IMC 0x0150
|
||||||
|
#define PCI_DEVICE_ID_INTEL_HSW_IMC 0x0c00
|
||||||
|
#define PCI_DEVICE_ID_INTEL_HSW_U_IMC 0x0a04
|
||||||
|
|
||||||
/* SNB event control */
|
/* SNB event control */
|
||||||
#define SNB_UNC_CTL_EV_SEL_MASK 0x000000ff
|
#define SNB_UNC_CTL_EV_SEL_MASK 0x000000ff
|
||||||
#define SNB_UNC_CTL_UMASK_MASK 0x0000ff00
|
#define SNB_UNC_CTL_UMASK_MASK 0x0000ff00
|
||||||
@ -472,6 +479,10 @@ static const struct pci_device_id hsw_uncore_pci_ids[] = {
|
|||||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HSW_IMC),
|
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HSW_IMC),
|
||||||
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||||
},
|
},
|
||||||
|
{ /* IMC */
|
||||||
|
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HSW_U_IMC),
|
||||||
|
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||||
|
},
|
||||||
{ /* end: all zeroes */ },
|
{ /* end: all zeroes */ },
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -502,6 +513,7 @@ static const struct imc_uncore_pci_dev desktop_imc_pci_ids[] = {
|
|||||||
IMC_DEV(IVB_IMC, &ivb_uncore_pci_driver), /* 3rd Gen Core processor */
|
IMC_DEV(IVB_IMC, &ivb_uncore_pci_driver), /* 3rd Gen Core processor */
|
||||||
IMC_DEV(IVB_E3_IMC, &ivb_uncore_pci_driver), /* Xeon E3-1200 v2/3rd Gen Core processor */
|
IMC_DEV(IVB_E3_IMC, &ivb_uncore_pci_driver), /* Xeon E3-1200 v2/3rd Gen Core processor */
|
||||||
IMC_DEV(HSW_IMC, &hsw_uncore_pci_driver), /* 4th Gen Core Processor */
|
IMC_DEV(HSW_IMC, &hsw_uncore_pci_driver), /* 4th Gen Core Processor */
|
||||||
|
IMC_DEV(HSW_U_IMC, &hsw_uncore_pci_driver), /* 4th Gen Core ULT Mobile Processor */
|
||||||
{ /* end marker */ }
|
{ /* end marker */ }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ __visible DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, cpu_tss) = {
|
|||||||
.io_bitmap = { [0 ... IO_BITMAP_LONGS] = ~0 },
|
.io_bitmap = { [0 ... IO_BITMAP_LONGS] = ~0 },
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
EXPORT_PER_CPU_SYMBOL_GPL(cpu_tss);
|
EXPORT_PER_CPU_SYMBOL(cpu_tss);
|
||||||
|
|
||||||
#ifdef CONFIG_X86_64
|
#ifdef CONFIG_X86_64
|
||||||
static DEFINE_PER_CPU(unsigned char, is_idle);
|
static DEFINE_PER_CPU(unsigned char, is_idle);
|
||||||
@ -156,11 +156,13 @@ void flush_thread(void)
|
|||||||
/* FPU state will be reallocated lazily at the first use. */
|
/* FPU state will be reallocated lazily at the first use. */
|
||||||
drop_fpu(tsk);
|
drop_fpu(tsk);
|
||||||
free_thread_xstate(tsk);
|
free_thread_xstate(tsk);
|
||||||
} else if (!used_math()) {
|
} else {
|
||||||
/* kthread execs. TODO: cleanup this horror. */
|
if (!tsk_used_math(tsk)) {
|
||||||
if (WARN_ON(init_fpu(tsk)))
|
/* kthread execs. TODO: cleanup this horror. */
|
||||||
force_sig(SIGKILL, tsk);
|
if (WARN_ON(init_fpu(tsk)))
|
||||||
user_fpu_begin();
|
force_sig(SIGKILL, tsk);
|
||||||
|
user_fpu_begin();
|
||||||
|
}
|
||||||
restore_init_xstate();
|
restore_init_xstate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -351,18 +351,20 @@ int arch_ioremap_pmd_supported(void)
|
|||||||
*/
|
*/
|
||||||
void *xlate_dev_mem_ptr(phys_addr_t phys)
|
void *xlate_dev_mem_ptr(phys_addr_t phys)
|
||||||
{
|
{
|
||||||
void *addr;
|
unsigned long start = phys & PAGE_MASK;
|
||||||
unsigned long start = phys & PAGE_MASK;
|
unsigned long offset = phys & ~PAGE_MASK;
|
||||||
|
unsigned long vaddr;
|
||||||
|
|
||||||
/* If page is RAM, we can use __va. Otherwise ioremap and unmap. */
|
/* If page is RAM, we can use __va. Otherwise ioremap and unmap. */
|
||||||
if (page_is_ram(start >> PAGE_SHIFT))
|
if (page_is_ram(start >> PAGE_SHIFT))
|
||||||
return __va(phys);
|
return __va(phys);
|
||||||
|
|
||||||
addr = (void __force *)ioremap_cache(start, PAGE_SIZE);
|
vaddr = (unsigned long)ioremap_cache(start, PAGE_SIZE);
|
||||||
if (addr)
|
/* Only add the offset on success and return NULL if the ioremap() failed: */
|
||||||
addr = (void *)((unsigned long)addr | (phys & ~PAGE_MASK));
|
if (vaddr)
|
||||||
|
vaddr += offset;
|
||||||
|
|
||||||
return addr;
|
return (void *)vaddr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr)
|
void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr)
|
||||||
|
@ -559,6 +559,13 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
|
|||||||
if (is_ereg(dst_reg))
|
if (is_ereg(dst_reg))
|
||||||
EMIT1(0x41);
|
EMIT1(0x41);
|
||||||
EMIT3(0xC1, add_1reg(0xC8, dst_reg), 8);
|
EMIT3(0xC1, add_1reg(0xC8, dst_reg), 8);
|
||||||
|
|
||||||
|
/* emit 'movzwl eax, ax' */
|
||||||
|
if (is_ereg(dst_reg))
|
||||||
|
EMIT3(0x45, 0x0F, 0xB7);
|
||||||
|
else
|
||||||
|
EMIT2(0x0F, 0xB7);
|
||||||
|
EMIT1(add_2reg(0xC0, dst_reg, dst_reg));
|
||||||
break;
|
break;
|
||||||
case 32:
|
case 32:
|
||||||
/* emit 'bswap eax' to swap lower 4 bytes */
|
/* emit 'bswap eax' to swap lower 4 bytes */
|
||||||
@ -577,6 +584,27 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case BPF_ALU | BPF_END | BPF_FROM_LE:
|
case BPF_ALU | BPF_END | BPF_FROM_LE:
|
||||||
|
switch (imm32) {
|
||||||
|
case 16:
|
||||||
|
/* emit 'movzwl eax, ax' to zero extend 16-bit
|
||||||
|
* into 64 bit
|
||||||
|
*/
|
||||||
|
if (is_ereg(dst_reg))
|
||||||
|
EMIT3(0x45, 0x0F, 0xB7);
|
||||||
|
else
|
||||||
|
EMIT2(0x0F, 0xB7);
|
||||||
|
EMIT1(add_2reg(0xC0, dst_reg, dst_reg));
|
||||||
|
break;
|
||||||
|
case 32:
|
||||||
|
/* emit 'mov eax, eax' to clear upper 32-bits */
|
||||||
|
if (is_ereg(dst_reg))
|
||||||
|
EMIT1(0x45);
|
||||||
|
EMIT2(0x89, add_2reg(0xC0, dst_reg, dst_reg));
|
||||||
|
break;
|
||||||
|
case 64:
|
||||||
|
/* nop */
|
||||||
|
break;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* ST: *(u8*)(dst_reg + off) = imm */
|
/* ST: *(u8*)(dst_reg + off) = imm */
|
||||||
|
@ -325,6 +325,26 @@ static void release_pci_root_info(struct pci_host_bridge *bridge)
|
|||||||
kfree(info);
|
kfree(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* An IO port or MMIO resource assigned to a PCI host bridge may be
|
||||||
|
* consumed by the host bridge itself or available to its child
|
||||||
|
* bus/devices. The ACPI specification defines a bit (Producer/Consumer)
|
||||||
|
* to tell whether the resource is consumed by the host bridge itself,
|
||||||
|
* but firmware hasn't used that bit consistently, so we can't rely on it.
|
||||||
|
*
|
||||||
|
* On x86 and IA64 platforms, all IO port and MMIO resources are assumed
|
||||||
|
* to be available to child bus/devices except one special case:
|
||||||
|
* IO port [0xCF8-0xCFF] is consumed by the host bridge itself
|
||||||
|
* to access PCI configuration space.
|
||||||
|
*
|
||||||
|
* So explicitly filter out PCI CFG IO ports[0xCF8-0xCFF].
|
||||||
|
*/
|
||||||
|
static bool resource_is_pcicfg_ioport(struct resource *res)
|
||||||
|
{
|
||||||
|
return (res->flags & IORESOURCE_IO) &&
|
||||||
|
res->start == 0xCF8 && res->end == 0xCFF;
|
||||||
|
}
|
||||||
|
|
||||||
static void probe_pci_root_info(struct pci_root_info *info,
|
static void probe_pci_root_info(struct pci_root_info *info,
|
||||||
struct acpi_device *device,
|
struct acpi_device *device,
|
||||||
int busnum, int domain,
|
int busnum, int domain,
|
||||||
@ -346,8 +366,8 @@ static void probe_pci_root_info(struct pci_root_info *info,
|
|||||||
"no IO and memory resources present in _CRS\n");
|
"no IO and memory resources present in _CRS\n");
|
||||||
else
|
else
|
||||||
resource_list_for_each_entry_safe(entry, tmp, list) {
|
resource_list_for_each_entry_safe(entry, tmp, list) {
|
||||||
if ((entry->res->flags & IORESOURCE_WINDOW) == 0 ||
|
if ((entry->res->flags & IORESOURCE_DISABLED) ||
|
||||||
(entry->res->flags & IORESOURCE_DISABLED))
|
resource_is_pcicfg_ioport(entry->res))
|
||||||
resource_list_destroy_entry(entry);
|
resource_list_destroy_entry(entry);
|
||||||
else
|
else
|
||||||
entry->res->name = info->name;
|
entry->res->name = info->name;
|
||||||
|
@ -1760,6 +1760,9 @@ static struct notifier_block xen_hvm_cpu_notifier = {
|
|||||||
|
|
||||||
static void __init xen_hvm_guest_init(void)
|
static void __init xen_hvm_guest_init(void)
|
||||||
{
|
{
|
||||||
|
if (xen_pv_domain())
|
||||||
|
return;
|
||||||
|
|
||||||
init_hvm_pv_info();
|
init_hvm_pv_info();
|
||||||
|
|
||||||
xen_hvm_init_shared_info();
|
xen_hvm_init_shared_info();
|
||||||
@ -1775,6 +1778,7 @@ static void __init xen_hvm_guest_init(void)
|
|||||||
xen_hvm_init_time_ops();
|
xen_hvm_init_time_ops();
|
||||||
xen_hvm_init_mmu_ops();
|
xen_hvm_init_mmu_ops();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static bool xen_nopv = false;
|
static bool xen_nopv = false;
|
||||||
static __init int xen_parse_nopv(char *arg)
|
static __init int xen_parse_nopv(char *arg)
|
||||||
@ -1784,14 +1788,11 @@ static __init int xen_parse_nopv(char *arg)
|
|||||||
}
|
}
|
||||||
early_param("xen_nopv", xen_parse_nopv);
|
early_param("xen_nopv", xen_parse_nopv);
|
||||||
|
|
||||||
static uint32_t __init xen_hvm_platform(void)
|
static uint32_t __init xen_platform(void)
|
||||||
{
|
{
|
||||||
if (xen_nopv)
|
if (xen_nopv)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (xen_pv_domain())
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return xen_cpuid_base();
|
return xen_cpuid_base();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1809,11 +1810,19 @@ bool xen_hvm_need_lapic(void)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(xen_hvm_need_lapic);
|
EXPORT_SYMBOL_GPL(xen_hvm_need_lapic);
|
||||||
|
|
||||||
const struct hypervisor_x86 x86_hyper_xen_hvm __refconst = {
|
static void xen_set_cpu_features(struct cpuinfo_x86 *c)
|
||||||
.name = "Xen HVM",
|
{
|
||||||
.detect = xen_hvm_platform,
|
if (xen_pv_domain())
|
||||||
|
clear_cpu_bug(c, X86_BUG_SYSRET_SS_ATTRS);
|
||||||
|
}
|
||||||
|
|
||||||
|
const struct hypervisor_x86 x86_hyper_xen = {
|
||||||
|
.name = "Xen",
|
||||||
|
.detect = xen_platform,
|
||||||
|
#ifdef CONFIG_XEN_PVHVM
|
||||||
.init_platform = xen_hvm_guest_init,
|
.init_platform = xen_hvm_guest_init,
|
||||||
.x2apic_available = xen_x2apic_para_available,
|
|
||||||
};
|
|
||||||
EXPORT_SYMBOL(x86_hyper_xen_hvm);
|
|
||||||
#endif
|
#endif
|
||||||
|
.x2apic_available = xen_x2apic_para_available,
|
||||||
|
.set_cpu_features = xen_set_cpu_features,
|
||||||
|
};
|
||||||
|
EXPORT_SYMBOL(x86_hyper_xen);
|
||||||
|
@ -88,7 +88,17 @@ static void xen_vcpu_notify_restore(void *data)
|
|||||||
tick_resume_local();
|
tick_resume_local();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void xen_vcpu_notify_suspend(void *data)
|
||||||
|
{
|
||||||
|
tick_suspend_local();
|
||||||
|
}
|
||||||
|
|
||||||
void xen_arch_resume(void)
|
void xen_arch_resume(void)
|
||||||
{
|
{
|
||||||
on_each_cpu(xen_vcpu_notify_restore, NULL, 1);
|
on_each_cpu(xen_vcpu_notify_restore, NULL, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void xen_arch_suspend(void)
|
||||||
|
{
|
||||||
|
on_each_cpu(xen_vcpu_notify_suspend, NULL, 1);
|
||||||
|
}
|
||||||
|
@ -552,6 +552,8 @@ void blk_cleanup_queue(struct request_queue *q)
|
|||||||
q->queue_lock = &q->__queue_lock;
|
q->queue_lock = &q->__queue_lock;
|
||||||
spin_unlock_irq(lock);
|
spin_unlock_irq(lock);
|
||||||
|
|
||||||
|
bdi_destroy(&q->backing_dev_info);
|
||||||
|
|
||||||
/* @q is and will stay empty, shutdown and put */
|
/* @q is and will stay empty, shutdown and put */
|
||||||
blk_put_queue(q);
|
blk_put_queue(q);
|
||||||
}
|
}
|
||||||
|
@ -677,8 +677,11 @@ static void blk_mq_rq_timer(unsigned long priv)
|
|||||||
data.next = blk_rq_timeout(round_jiffies_up(data.next));
|
data.next = blk_rq_timeout(round_jiffies_up(data.next));
|
||||||
mod_timer(&q->timeout, data.next);
|
mod_timer(&q->timeout, data.next);
|
||||||
} else {
|
} else {
|
||||||
queue_for_each_hw_ctx(q, hctx, i)
|
queue_for_each_hw_ctx(q, hctx, i) {
|
||||||
blk_mq_tag_idle(hctx);
|
/* the hctx may be unmapped, so check it here */
|
||||||
|
if (blk_mq_hw_queue_mapped(hctx))
|
||||||
|
blk_mq_tag_idle(hctx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -855,6 +858,16 @@ static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx)
|
|||||||
spin_lock(&hctx->lock);
|
spin_lock(&hctx->lock);
|
||||||
list_splice(&rq_list, &hctx->dispatch);
|
list_splice(&rq_list, &hctx->dispatch);
|
||||||
spin_unlock(&hctx->lock);
|
spin_unlock(&hctx->lock);
|
||||||
|
/*
|
||||||
|
* the queue is expected stopped with BLK_MQ_RQ_QUEUE_BUSY, but
|
||||||
|
* it's possible the queue is stopped and restarted again
|
||||||
|
* before this. Queue restart will dispatch requests. And since
|
||||||
|
* requests in rq_list aren't added into hctx->dispatch yet,
|
||||||
|
* the requests in rq_list might get lost.
|
||||||
|
*
|
||||||
|
* blk_mq_run_hw_queue() already checks the STOPPED bit
|
||||||
|
**/
|
||||||
|
blk_mq_run_hw_queue(hctx, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1571,22 +1584,6 @@ static int blk_mq_hctx_cpu_offline(struct blk_mq_hw_ctx *hctx, int cpu)
|
|||||||
return NOTIFY_OK;
|
return NOTIFY_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int blk_mq_hctx_cpu_online(struct blk_mq_hw_ctx *hctx, int cpu)
|
|
||||||
{
|
|
||||||
struct request_queue *q = hctx->queue;
|
|
||||||
struct blk_mq_tag_set *set = q->tag_set;
|
|
||||||
|
|
||||||
if (set->tags[hctx->queue_num])
|
|
||||||
return NOTIFY_OK;
|
|
||||||
|
|
||||||
set->tags[hctx->queue_num] = blk_mq_init_rq_map(set, hctx->queue_num);
|
|
||||||
if (!set->tags[hctx->queue_num])
|
|
||||||
return NOTIFY_STOP;
|
|
||||||
|
|
||||||
hctx->tags = set->tags[hctx->queue_num];
|
|
||||||
return NOTIFY_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int blk_mq_hctx_notify(void *data, unsigned long action,
|
static int blk_mq_hctx_notify(void *data, unsigned long action,
|
||||||
unsigned int cpu)
|
unsigned int cpu)
|
||||||
{
|
{
|
||||||
@ -1594,8 +1591,11 @@ static int blk_mq_hctx_notify(void *data, unsigned long action,
|
|||||||
|
|
||||||
if (action == CPU_DEAD || action == CPU_DEAD_FROZEN)
|
if (action == CPU_DEAD || action == CPU_DEAD_FROZEN)
|
||||||
return blk_mq_hctx_cpu_offline(hctx, cpu);
|
return blk_mq_hctx_cpu_offline(hctx, cpu);
|
||||||
else if (action == CPU_ONLINE || action == CPU_ONLINE_FROZEN)
|
|
||||||
return blk_mq_hctx_cpu_online(hctx, cpu);
|
/*
|
||||||
|
* In case of CPU online, tags may be reallocated
|
||||||
|
* in blk_mq_map_swqueue() after mapping is updated.
|
||||||
|
*/
|
||||||
|
|
||||||
return NOTIFY_OK;
|
return NOTIFY_OK;
|
||||||
}
|
}
|
||||||
@ -1775,6 +1775,7 @@ static void blk_mq_map_swqueue(struct request_queue *q)
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
struct blk_mq_hw_ctx *hctx;
|
struct blk_mq_hw_ctx *hctx;
|
||||||
struct blk_mq_ctx *ctx;
|
struct blk_mq_ctx *ctx;
|
||||||
|
struct blk_mq_tag_set *set = q->tag_set;
|
||||||
|
|
||||||
queue_for_each_hw_ctx(q, hctx, i) {
|
queue_for_each_hw_ctx(q, hctx, i) {
|
||||||
cpumask_clear(hctx->cpumask);
|
cpumask_clear(hctx->cpumask);
|
||||||
@ -1803,16 +1804,20 @@ static void blk_mq_map_swqueue(struct request_queue *q)
|
|||||||
* disable it and free the request entries.
|
* disable it and free the request entries.
|
||||||
*/
|
*/
|
||||||
if (!hctx->nr_ctx) {
|
if (!hctx->nr_ctx) {
|
||||||
struct blk_mq_tag_set *set = q->tag_set;
|
|
||||||
|
|
||||||
if (set->tags[i]) {
|
if (set->tags[i]) {
|
||||||
blk_mq_free_rq_map(set, set->tags[i], i);
|
blk_mq_free_rq_map(set, set->tags[i], i);
|
||||||
set->tags[i] = NULL;
|
set->tags[i] = NULL;
|
||||||
hctx->tags = NULL;
|
|
||||||
}
|
}
|
||||||
|
hctx->tags = NULL;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* unmapped hw queue can be remapped after CPU topo changed */
|
||||||
|
if (!set->tags[i])
|
||||||
|
set->tags[i] = blk_mq_init_rq_map(set, i);
|
||||||
|
hctx->tags = set->tags[i];
|
||||||
|
WARN_ON(!hctx->tags);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the map size to the number of mapped software queues.
|
* Set the map size to the number of mapped software queues.
|
||||||
* This is more accurate and more efficient than looping
|
* This is more accurate and more efficient than looping
|
||||||
@ -2090,9 +2095,16 @@ static int blk_mq_queue_reinit_notify(struct notifier_block *nb,
|
|||||||
*/
|
*/
|
||||||
list_for_each_entry(q, &all_q_list, all_q_node)
|
list_for_each_entry(q, &all_q_list, all_q_node)
|
||||||
blk_mq_freeze_queue_start(q);
|
blk_mq_freeze_queue_start(q);
|
||||||
list_for_each_entry(q, &all_q_list, all_q_node)
|
list_for_each_entry(q, &all_q_list, all_q_node) {
|
||||||
blk_mq_freeze_queue_wait(q);
|
blk_mq_freeze_queue_wait(q);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* timeout handler can't touch hw queue during the
|
||||||
|
* reinitialization
|
||||||
|
*/
|
||||||
|
del_timer_sync(&q->timeout);
|
||||||
|
}
|
||||||
|
|
||||||
list_for_each_entry(q, &all_q_list, all_q_node)
|
list_for_each_entry(q, &all_q_list, all_q_node)
|
||||||
blk_mq_queue_reinit(q);
|
blk_mq_queue_reinit(q);
|
||||||
|
|
||||||
|
@ -522,8 +522,6 @@ static void blk_release_queue(struct kobject *kobj)
|
|||||||
|
|
||||||
blk_trace_shutdown(q);
|
blk_trace_shutdown(q);
|
||||||
|
|
||||||
bdi_destroy(&q->backing_dev_info);
|
|
||||||
|
|
||||||
ida_simple_remove(&blk_queue_ida, q->id);
|
ida_simple_remove(&blk_queue_ida, q->id);
|
||||||
call_rcu(&q->rcu_head, blk_free_queue_rcu);
|
call_rcu(&q->rcu_head, blk_free_queue_rcu);
|
||||||
}
|
}
|
||||||
|
@ -221,8 +221,8 @@ bounce:
|
|||||||
if (page_to_pfn(page) <= queue_bounce_pfn(q) && !force)
|
if (page_to_pfn(page) <= queue_bounce_pfn(q) && !force)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
inc_zone_page_state(to->bv_page, NR_BOUNCE);
|
|
||||||
to->bv_page = mempool_alloc(pool, q->bounce_gfp);
|
to->bv_page = mempool_alloc(pool, q->bounce_gfp);
|
||||||
|
inc_zone_page_state(to->bv_page, NR_BOUNCE);
|
||||||
|
|
||||||
if (rw == WRITE) {
|
if (rw == WRITE) {
|
||||||
char *vto, *vfrom;
|
char *vto, *vfrom;
|
||||||
|
@ -157,7 +157,7 @@ struct elevator_queue *elevator_alloc(struct request_queue *q,
|
|||||||
|
|
||||||
eq = kzalloc_node(sizeof(*eq), GFP_KERNEL, q->node);
|
eq = kzalloc_node(sizeof(*eq), GFP_KERNEL, q->node);
|
||||||
if (unlikely(!eq))
|
if (unlikely(!eq))
|
||||||
goto err;
|
return NULL;
|
||||||
|
|
||||||
eq->type = e;
|
eq->type = e;
|
||||||
kobject_init(&eq->kobj, &elv_ktype);
|
kobject_init(&eq->kobj, &elv_ktype);
|
||||||
@ -165,10 +165,6 @@ struct elevator_queue *elevator_alloc(struct request_queue *q,
|
|||||||
hash_init(eq->hash);
|
hash_init(eq->hash);
|
||||||
|
|
||||||
return eq;
|
return eq;
|
||||||
err:
|
|
||||||
kfree(eq);
|
|
||||||
elevator_put(e);
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(elevator_alloc);
|
EXPORT_SYMBOL(elevator_alloc);
|
||||||
|
|
||||||
|
@ -304,6 +304,8 @@ static const struct acpi_device_id acpi_pnp_device_ids[] = {
|
|||||||
{"PNPb006"},
|
{"PNPb006"},
|
||||||
/* cs423x-pnpbios */
|
/* cs423x-pnpbios */
|
||||||
{"CSC0100"},
|
{"CSC0100"},
|
||||||
|
{"CSC0103"},
|
||||||
|
{"CSC0110"},
|
||||||
{"CSC0000"},
|
{"CSC0000"},
|
||||||
{"GIM0100"}, /* Guillemot Turtlebeach something appears to be cs4232 compatible */
|
{"GIM0100"}, /* Guillemot Turtlebeach something appears to be cs4232 compatible */
|
||||||
/* es18xx-pnpbios */
|
/* es18xx-pnpbios */
|
||||||
|
@ -573,7 +573,7 @@ EXPORT_SYMBOL_GPL(acpi_dev_get_resources);
|
|||||||
* @ares: Input ACPI resource object.
|
* @ares: Input ACPI resource object.
|
||||||
* @types: Valid resource types of IORESOURCE_XXX
|
* @types: Valid resource types of IORESOURCE_XXX
|
||||||
*
|
*
|
||||||
* This is a hepler function to support acpi_dev_get_resources(), which filters
|
* This is a helper function to support acpi_dev_get_resources(), which filters
|
||||||
* ACPI resource objects according to resource types.
|
* ACPI resource objects according to resource types.
|
||||||
*/
|
*/
|
||||||
int acpi_dev_filter_resource_type(struct acpi_resource *ares,
|
int acpi_dev_filter_resource_type(struct acpi_resource *ares,
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
|
#include <linux/dmi.h>
|
||||||
#include "sbshc.h"
|
#include "sbshc.h"
|
||||||
|
|
||||||
#define PREFIX "ACPI: "
|
#define PREFIX "ACPI: "
|
||||||
@ -87,6 +88,8 @@ enum acpi_smb_offset {
|
|||||||
ACPI_SMB_ALARM_DATA = 0x26, /* 2 bytes alarm data */
|
ACPI_SMB_ALARM_DATA = 0x26, /* 2 bytes alarm data */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static bool macbook;
|
||||||
|
|
||||||
static inline int smb_hc_read(struct acpi_smb_hc *hc, u8 address, u8 *data)
|
static inline int smb_hc_read(struct acpi_smb_hc *hc, u8 address, u8 *data)
|
||||||
{
|
{
|
||||||
return ec_read(hc->offset + address, data);
|
return ec_read(hc->offset + address, data);
|
||||||
@ -132,6 +135,8 @@ static int acpi_smbus_transaction(struct acpi_smb_hc *hc, u8 protocol,
|
|||||||
}
|
}
|
||||||
|
|
||||||
mutex_lock(&hc->lock);
|
mutex_lock(&hc->lock);
|
||||||
|
if (macbook)
|
||||||
|
udelay(5);
|
||||||
if (smb_hc_read(hc, ACPI_SMB_PROTOCOL, &temp))
|
if (smb_hc_read(hc, ACPI_SMB_PROTOCOL, &temp))
|
||||||
goto end;
|
goto end;
|
||||||
if (temp) {
|
if (temp) {
|
||||||
@ -257,12 +262,29 @@ extern int acpi_ec_add_query_handler(struct acpi_ec *ec, u8 query_bit,
|
|||||||
acpi_handle handle, acpi_ec_query_func func,
|
acpi_handle handle, acpi_ec_query_func func,
|
||||||
void *data);
|
void *data);
|
||||||
|
|
||||||
|
static int macbook_dmi_match(const struct dmi_system_id *d)
|
||||||
|
{
|
||||||
|
pr_debug("Detected MacBook, enabling workaround\n");
|
||||||
|
macbook = true;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct dmi_system_id acpi_smbus_dmi_table[] = {
|
||||||
|
{ macbook_dmi_match, "Apple MacBook", {
|
||||||
|
DMI_MATCH(DMI_BOARD_VENDOR, "Apple"),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "MacBook") },
|
||||||
|
},
|
||||||
|
{ },
|
||||||
|
};
|
||||||
|
|
||||||
static int acpi_smbus_hc_add(struct acpi_device *device)
|
static int acpi_smbus_hc_add(struct acpi_device *device)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
unsigned long long val;
|
unsigned long long val;
|
||||||
struct acpi_smb_hc *hc;
|
struct acpi_smb_hc *hc;
|
||||||
|
|
||||||
|
dmi_check_system(acpi_smbus_dmi_table);
|
||||||
|
|
||||||
if (!device)
|
if (!device)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -270,6 +270,7 @@ config ATA_PIIX
|
|||||||
config SATA_DWC
|
config SATA_DWC
|
||||||
tristate "DesignWare Cores SATA support"
|
tristate "DesignWare Cores SATA support"
|
||||||
depends on 460EX
|
depends on 460EX
|
||||||
|
select DW_DMAC
|
||||||
help
|
help
|
||||||
This option enables support for the on-chip SATA controller of the
|
This option enables support for the on-chip SATA controller of the
|
||||||
AppliedMicro processor 460EX.
|
AppliedMicro processor 460EX.
|
||||||
@ -729,15 +730,6 @@ config PATA_SC1200
|
|||||||
|
|
||||||
If unsure, say N.
|
If unsure, say N.
|
||||||
|
|
||||||
config PATA_SCC
|
|
||||||
tristate "Toshiba's Cell Reference Set IDE support"
|
|
||||||
depends on PCI && PPC_CELLEB
|
|
||||||
help
|
|
||||||
This option enables support for the built-in IDE controller on
|
|
||||||
Toshiba Cell Reference Board.
|
|
||||||
|
|
||||||
If unsure, say N.
|
|
||||||
|
|
||||||
config PATA_SCH
|
config PATA_SCH
|
||||||
tristate "Intel SCH PATA support"
|
tristate "Intel SCH PATA support"
|
||||||
depends on PCI
|
depends on PCI
|
||||||
|
@ -75,7 +75,6 @@ obj-$(CONFIG_PATA_PDC_OLD) += pata_pdc202xx_old.o
|
|||||||
obj-$(CONFIG_PATA_RADISYS) += pata_radisys.o
|
obj-$(CONFIG_PATA_RADISYS) += pata_radisys.o
|
||||||
obj-$(CONFIG_PATA_RDC) += pata_rdc.o
|
obj-$(CONFIG_PATA_RDC) += pata_rdc.o
|
||||||
obj-$(CONFIG_PATA_SC1200) += pata_sc1200.o
|
obj-$(CONFIG_PATA_SC1200) += pata_sc1200.o
|
||||||
obj-$(CONFIG_PATA_SCC) += pata_scc.o
|
|
||||||
obj-$(CONFIG_PATA_SCH) += pata_sch.o
|
obj-$(CONFIG_PATA_SCH) += pata_sch.o
|
||||||
obj-$(CONFIG_PATA_SERVERWORKS) += pata_serverworks.o
|
obj-$(CONFIG_PATA_SERVERWORKS) += pata_serverworks.o
|
||||||
obj-$(CONFIG_PATA_SIL680) += pata_sil680.o
|
obj-$(CONFIG_PATA_SIL680) += pata_sil680.o
|
||||||
|
@ -66,6 +66,7 @@ enum board_ids {
|
|||||||
board_ahci_yes_fbs,
|
board_ahci_yes_fbs,
|
||||||
|
|
||||||
/* board IDs for specific chipsets in alphabetical order */
|
/* board IDs for specific chipsets in alphabetical order */
|
||||||
|
board_ahci_avn,
|
||||||
board_ahci_mcp65,
|
board_ahci_mcp65,
|
||||||
board_ahci_mcp77,
|
board_ahci_mcp77,
|
||||||
board_ahci_mcp89,
|
board_ahci_mcp89,
|
||||||
@ -84,6 +85,8 @@ enum board_ids {
|
|||||||
static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
|
static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
|
||||||
static int ahci_vt8251_hardreset(struct ata_link *link, unsigned int *class,
|
static int ahci_vt8251_hardreset(struct ata_link *link, unsigned int *class,
|
||||||
unsigned long deadline);
|
unsigned long deadline);
|
||||||
|
static int ahci_avn_hardreset(struct ata_link *link, unsigned int *class,
|
||||||
|
unsigned long deadline);
|
||||||
static void ahci_mcp89_apple_enable(struct pci_dev *pdev);
|
static void ahci_mcp89_apple_enable(struct pci_dev *pdev);
|
||||||
static bool is_mcp89_apple(struct pci_dev *pdev);
|
static bool is_mcp89_apple(struct pci_dev *pdev);
|
||||||
static int ahci_p5wdh_hardreset(struct ata_link *link, unsigned int *class,
|
static int ahci_p5wdh_hardreset(struct ata_link *link, unsigned int *class,
|
||||||
@ -107,6 +110,11 @@ static struct ata_port_operations ahci_p5wdh_ops = {
|
|||||||
.hardreset = ahci_p5wdh_hardreset,
|
.hardreset = ahci_p5wdh_hardreset,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct ata_port_operations ahci_avn_ops = {
|
||||||
|
.inherits = &ahci_ops,
|
||||||
|
.hardreset = ahci_avn_hardreset,
|
||||||
|
};
|
||||||
|
|
||||||
static const struct ata_port_info ahci_port_info[] = {
|
static const struct ata_port_info ahci_port_info[] = {
|
||||||
/* by features */
|
/* by features */
|
||||||
[board_ahci] = {
|
[board_ahci] = {
|
||||||
@ -151,6 +159,12 @@ static const struct ata_port_info ahci_port_info[] = {
|
|||||||
.port_ops = &ahci_ops,
|
.port_ops = &ahci_ops,
|
||||||
},
|
},
|
||||||
/* by chipsets */
|
/* by chipsets */
|
||||||
|
[board_ahci_avn] = {
|
||||||
|
.flags = AHCI_FLAG_COMMON,
|
||||||
|
.pio_mask = ATA_PIO4,
|
||||||
|
.udma_mask = ATA_UDMA6,
|
||||||
|
.port_ops = &ahci_avn_ops,
|
||||||
|
},
|
||||||
[board_ahci_mcp65] = {
|
[board_ahci_mcp65] = {
|
||||||
AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA | AHCI_HFLAG_NO_PMP |
|
AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA | AHCI_HFLAG_NO_PMP |
|
||||||
AHCI_HFLAG_YES_NCQ),
|
AHCI_HFLAG_YES_NCQ),
|
||||||
@ -290,14 +304,14 @@ static const struct pci_device_id ahci_pci_tbl[] = {
|
|||||||
{ PCI_VDEVICE(INTEL, 0x1f27), board_ahci }, /* Avoton RAID */
|
{ PCI_VDEVICE(INTEL, 0x1f27), board_ahci }, /* Avoton RAID */
|
||||||
{ PCI_VDEVICE(INTEL, 0x1f2e), board_ahci }, /* Avoton RAID */
|
{ PCI_VDEVICE(INTEL, 0x1f2e), board_ahci }, /* Avoton RAID */
|
||||||
{ PCI_VDEVICE(INTEL, 0x1f2f), board_ahci }, /* Avoton RAID */
|
{ PCI_VDEVICE(INTEL, 0x1f2f), board_ahci }, /* Avoton RAID */
|
||||||
{ PCI_VDEVICE(INTEL, 0x1f32), board_ahci }, /* Avoton AHCI */
|
{ PCI_VDEVICE(INTEL, 0x1f32), board_ahci_avn }, /* Avoton AHCI */
|
||||||
{ PCI_VDEVICE(INTEL, 0x1f33), board_ahci }, /* Avoton AHCI */
|
{ PCI_VDEVICE(INTEL, 0x1f33), board_ahci_avn }, /* Avoton AHCI */
|
||||||
{ PCI_VDEVICE(INTEL, 0x1f34), board_ahci }, /* Avoton RAID */
|
{ PCI_VDEVICE(INTEL, 0x1f34), board_ahci_avn }, /* Avoton RAID */
|
||||||
{ PCI_VDEVICE(INTEL, 0x1f35), board_ahci }, /* Avoton RAID */
|
{ PCI_VDEVICE(INTEL, 0x1f35), board_ahci_avn }, /* Avoton RAID */
|
||||||
{ PCI_VDEVICE(INTEL, 0x1f36), board_ahci }, /* Avoton RAID */
|
{ PCI_VDEVICE(INTEL, 0x1f36), board_ahci_avn }, /* Avoton RAID */
|
||||||
{ PCI_VDEVICE(INTEL, 0x1f37), board_ahci }, /* Avoton RAID */
|
{ PCI_VDEVICE(INTEL, 0x1f37), board_ahci_avn }, /* Avoton RAID */
|
||||||
{ PCI_VDEVICE(INTEL, 0x1f3e), board_ahci }, /* Avoton RAID */
|
{ PCI_VDEVICE(INTEL, 0x1f3e), board_ahci_avn }, /* Avoton RAID */
|
||||||
{ PCI_VDEVICE(INTEL, 0x1f3f), board_ahci }, /* Avoton RAID */
|
{ PCI_VDEVICE(INTEL, 0x1f3f), board_ahci_avn }, /* Avoton RAID */
|
||||||
{ PCI_VDEVICE(INTEL, 0x2823), board_ahci }, /* Wellsburg RAID */
|
{ PCI_VDEVICE(INTEL, 0x2823), board_ahci }, /* Wellsburg RAID */
|
||||||
{ PCI_VDEVICE(INTEL, 0x2827), board_ahci }, /* Wellsburg RAID */
|
{ PCI_VDEVICE(INTEL, 0x2827), board_ahci }, /* Wellsburg RAID */
|
||||||
{ PCI_VDEVICE(INTEL, 0x8d02), board_ahci }, /* Wellsburg AHCI */
|
{ PCI_VDEVICE(INTEL, 0x8d02), board_ahci }, /* Wellsburg AHCI */
|
||||||
@ -670,6 +684,79 @@ static int ahci_p5wdh_hardreset(struct ata_link *link, unsigned int *class,
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ahci_avn_hardreset - attempt more aggressive recovery of Avoton ports.
|
||||||
|
*
|
||||||
|
* It has been observed with some SSDs that the timing of events in the
|
||||||
|
* link synchronization phase can leave the port in a state that can not
|
||||||
|
* be recovered by a SATA-hard-reset alone. The failing signature is
|
||||||
|
* SStatus.DET stuck at 1 ("Device presence detected but Phy
|
||||||
|
* communication not established"). It was found that unloading and
|
||||||
|
* reloading the driver when this problem occurs allows the drive
|
||||||
|
* connection to be recovered (DET advanced to 0x3). The critical
|
||||||
|
* component of reloading the driver is that the port state machines are
|
||||||
|
* reset by bouncing "port enable" in the AHCI PCS configuration
|
||||||
|
* register. So, reproduce that effect by bouncing a port whenever we
|
||||||
|
* see DET==1 after a reset.
|
||||||
|
*/
|
||||||
|
static int ahci_avn_hardreset(struct ata_link *link, unsigned int *class,
|
||||||
|
unsigned long deadline)
|
||||||
|
{
|
||||||
|
const unsigned long *timing = sata_ehc_deb_timing(&link->eh_context);
|
||||||
|
struct ata_port *ap = link->ap;
|
||||||
|
struct ahci_port_priv *pp = ap->private_data;
|
||||||
|
struct ahci_host_priv *hpriv = ap->host->private_data;
|
||||||
|
u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG;
|
||||||
|
unsigned long tmo = deadline - jiffies;
|
||||||
|
struct ata_taskfile tf;
|
||||||
|
bool online;
|
||||||
|
int rc, i;
|
||||||
|
|
||||||
|
DPRINTK("ENTER\n");
|
||||||
|
|
||||||
|
ahci_stop_engine(ap);
|
||||||
|
|
||||||
|
for (i = 0; i < 2; i++) {
|
||||||
|
u16 val;
|
||||||
|
u32 sstatus;
|
||||||
|
int port = ap->port_no;
|
||||||
|
struct ata_host *host = ap->host;
|
||||||
|
struct pci_dev *pdev = to_pci_dev(host->dev);
|
||||||
|
|
||||||
|
/* clear D2H reception area to properly wait for D2H FIS */
|
||||||
|
ata_tf_init(link->device, &tf);
|
||||||
|
tf.command = ATA_BUSY;
|
||||||
|
ata_tf_to_fis(&tf, 0, 0, d2h_fis);
|
||||||
|
|
||||||
|
rc = sata_link_hardreset(link, timing, deadline, &online,
|
||||||
|
ahci_check_ready);
|
||||||
|
|
||||||
|
if (sata_scr_read(link, SCR_STATUS, &sstatus) != 0 ||
|
||||||
|
(sstatus & 0xf) != 1)
|
||||||
|
break;
|
||||||
|
|
||||||
|
ata_link_printk(link, KERN_INFO, "avn bounce port%d\n",
|
||||||
|
port);
|
||||||
|
|
||||||
|
pci_read_config_word(pdev, 0x92, &val);
|
||||||
|
val &= ~(1 << port);
|
||||||
|
pci_write_config_word(pdev, 0x92, val);
|
||||||
|
ata_msleep(ap, 1000);
|
||||||
|
val |= 1 << port;
|
||||||
|
pci_write_config_word(pdev, 0x92, val);
|
||||||
|
deadline += tmo;
|
||||||
|
}
|
||||||
|
|
||||||
|
hpriv->start_engine(ap);
|
||||||
|
|
||||||
|
if (online)
|
||||||
|
*class = ahci_dev_classify(ap);
|
||||||
|
|
||||||
|
DPRINTK("EXIT, rc=%d, class=%u\n", rc, *class);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
|
static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
|
||||||
{
|
{
|
||||||
|
@ -37,7 +37,6 @@ struct st_ahci_drv_data {
|
|||||||
struct reset_control *pwr;
|
struct reset_control *pwr;
|
||||||
struct reset_control *sw_rst;
|
struct reset_control *sw_rst;
|
||||||
struct reset_control *pwr_rst;
|
struct reset_control *pwr_rst;
|
||||||
struct ahci_host_priv *hpriv;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void st_ahci_configure_oob(void __iomem *mmio)
|
static void st_ahci_configure_oob(void __iomem *mmio)
|
||||||
@ -55,9 +54,10 @@ static void st_ahci_configure_oob(void __iomem *mmio)
|
|||||||
writel(new_val, mmio + ST_AHCI_OOBR);
|
writel(new_val, mmio + ST_AHCI_OOBR);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int st_ahci_deassert_resets(struct device *dev)
|
static int st_ahci_deassert_resets(struct ahci_host_priv *hpriv,
|
||||||
|
struct device *dev)
|
||||||
{
|
{
|
||||||
struct st_ahci_drv_data *drv_data = dev_get_drvdata(dev);
|
struct st_ahci_drv_data *drv_data = hpriv->plat_data;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
if (drv_data->pwr) {
|
if (drv_data->pwr) {
|
||||||
@ -90,8 +90,8 @@ static int st_ahci_deassert_resets(struct device *dev)
|
|||||||
static void st_ahci_host_stop(struct ata_host *host)
|
static void st_ahci_host_stop(struct ata_host *host)
|
||||||
{
|
{
|
||||||
struct ahci_host_priv *hpriv = host->private_data;
|
struct ahci_host_priv *hpriv = host->private_data;
|
||||||
|
struct st_ahci_drv_data *drv_data = hpriv->plat_data;
|
||||||
struct device *dev = host->dev;
|
struct device *dev = host->dev;
|
||||||
struct st_ahci_drv_data *drv_data = dev_get_drvdata(dev);
|
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
if (drv_data->pwr) {
|
if (drv_data->pwr) {
|
||||||
@ -103,29 +103,30 @@ static void st_ahci_host_stop(struct ata_host *host)
|
|||||||
ahci_platform_disable_resources(hpriv);
|
ahci_platform_disable_resources(hpriv);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int st_ahci_probe_resets(struct platform_device *pdev)
|
static int st_ahci_probe_resets(struct ahci_host_priv *hpriv,
|
||||||
|
struct device *dev)
|
||||||
{
|
{
|
||||||
struct st_ahci_drv_data *drv_data = platform_get_drvdata(pdev);
|
struct st_ahci_drv_data *drv_data = hpriv->plat_data;
|
||||||
|
|
||||||
drv_data->pwr = devm_reset_control_get(&pdev->dev, "pwr-dwn");
|
drv_data->pwr = devm_reset_control_get(dev, "pwr-dwn");
|
||||||
if (IS_ERR(drv_data->pwr)) {
|
if (IS_ERR(drv_data->pwr)) {
|
||||||
dev_info(&pdev->dev, "power reset control not defined\n");
|
dev_info(dev, "power reset control not defined\n");
|
||||||
drv_data->pwr = NULL;
|
drv_data->pwr = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
drv_data->sw_rst = devm_reset_control_get(&pdev->dev, "sw-rst");
|
drv_data->sw_rst = devm_reset_control_get(dev, "sw-rst");
|
||||||
if (IS_ERR(drv_data->sw_rst)) {
|
if (IS_ERR(drv_data->sw_rst)) {
|
||||||
dev_info(&pdev->dev, "soft reset control not defined\n");
|
dev_info(dev, "soft reset control not defined\n");
|
||||||
drv_data->sw_rst = NULL;
|
drv_data->sw_rst = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
drv_data->pwr_rst = devm_reset_control_get(&pdev->dev, "pwr-rst");
|
drv_data->pwr_rst = devm_reset_control_get(dev, "pwr-rst");
|
||||||
if (IS_ERR(drv_data->pwr_rst)) {
|
if (IS_ERR(drv_data->pwr_rst)) {
|
||||||
dev_dbg(&pdev->dev, "power soft reset control not defined\n");
|
dev_dbg(dev, "power soft reset control not defined\n");
|
||||||
drv_data->pwr_rst = NULL;
|
drv_data->pwr_rst = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return st_ahci_deassert_resets(&pdev->dev);
|
return st_ahci_deassert_resets(hpriv, dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct ata_port_operations st_ahci_port_ops = {
|
static struct ata_port_operations st_ahci_port_ops = {
|
||||||
@ -154,15 +155,12 @@ static int st_ahci_probe(struct platform_device *pdev)
|
|||||||
if (!drv_data)
|
if (!drv_data)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
platform_set_drvdata(pdev, drv_data);
|
|
||||||
|
|
||||||
hpriv = ahci_platform_get_resources(pdev);
|
hpriv = ahci_platform_get_resources(pdev);
|
||||||
if (IS_ERR(hpriv))
|
if (IS_ERR(hpriv))
|
||||||
return PTR_ERR(hpriv);
|
return PTR_ERR(hpriv);
|
||||||
|
hpriv->plat_data = drv_data;
|
||||||
|
|
||||||
drv_data->hpriv = hpriv;
|
err = st_ahci_probe_resets(hpriv, &pdev->dev);
|
||||||
|
|
||||||
err = st_ahci_probe_resets(pdev);
|
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
@ -170,7 +168,7 @@ static int st_ahci_probe(struct platform_device *pdev)
|
|||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
st_ahci_configure_oob(drv_data->hpriv->mmio);
|
st_ahci_configure_oob(hpriv->mmio);
|
||||||
|
|
||||||
err = ahci_platform_init_host(pdev, hpriv, &st_ahci_port_info,
|
err = ahci_platform_init_host(pdev, hpriv, &st_ahci_port_info,
|
||||||
&ahci_platform_sht);
|
&ahci_platform_sht);
|
||||||
@ -185,8 +183,9 @@ static int st_ahci_probe(struct platform_device *pdev)
|
|||||||
#ifdef CONFIG_PM_SLEEP
|
#ifdef CONFIG_PM_SLEEP
|
||||||
static int st_ahci_suspend(struct device *dev)
|
static int st_ahci_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct st_ahci_drv_data *drv_data = dev_get_drvdata(dev);
|
struct ata_host *host = dev_get_drvdata(dev);
|
||||||
struct ahci_host_priv *hpriv = drv_data->hpriv;
|
struct ahci_host_priv *hpriv = host->private_data;
|
||||||
|
struct st_ahci_drv_data *drv_data = hpriv->plat_data;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = ahci_platform_suspend_host(dev);
|
err = ahci_platform_suspend_host(dev);
|
||||||
@ -208,21 +207,21 @@ static int st_ahci_suspend(struct device *dev)
|
|||||||
|
|
||||||
static int st_ahci_resume(struct device *dev)
|
static int st_ahci_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct st_ahci_drv_data *drv_data = dev_get_drvdata(dev);
|
struct ata_host *host = dev_get_drvdata(dev);
|
||||||
struct ahci_host_priv *hpriv = drv_data->hpriv;
|
struct ahci_host_priv *hpriv = host->private_data;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = ahci_platform_enable_resources(hpriv);
|
err = ahci_platform_enable_resources(hpriv);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
err = st_ahci_deassert_resets(dev);
|
err = st_ahci_deassert_resets(hpriv, dev);
|
||||||
if (err) {
|
if (err) {
|
||||||
ahci_platform_disable_resources(hpriv);
|
ahci_platform_disable_resources(hpriv);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
st_ahci_configure_oob(drv_data->hpriv->mmio);
|
st_ahci_configure_oob(hpriv->mmio);
|
||||||
|
|
||||||
return ahci_platform_resume_host(dev);
|
return ahci_platform_resume_host(dev);
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user