Merge remote-tracking branch 'pfdo/drm-rcar-for-v3.12' into drm-next
Merge the rcar stable branch that is being shared with the arm-soc tree. Signed-off-by: Dave Airlie <airlied@redhat.com> * pfdo/drm-rcar-for-v3.12: (220 commits) drm/rcar-du: Add FBDEV emulation support drm/rcar-du: Add internal LVDS encoder support drm/rcar-du: Configure RGB output routing to DPAD0 drm/rcar-du: Rework output routing support drm/rcar-du: Add support for DEFR8 register drm/rcar-du: Add support for multiple groups drm/rcar-du: Fix buffer pitch alignment for R8A7790 DU drm/rcar-du: Add support for the R8A7790 DU drm/rcar-du: Move output routing configuration to group drm/rcar-du: Remove register definitions for the second channel drm/rcar-du: Use dynamic number of CRTCs instead of CRTCs array size drm/rcar-du: Introduce CRTCs groups drm/rcar-du: Rename rcar_du_plane_(init|register) to rcar_du_planes_* drm/rcar-du: Create rcar_du_planes structure drm/rcar-du: Rename platform data fields to match what they describe drm/rcar-du: Merge LVDS and VGA encoder code drm/rcar-du: Split VGA encoder and connector drm/rcar-du: Split LVDS encoder and connector drm/rcar-du: Clarify comment regarding plane Y source coordinate drm/rcar-du: Support per-CRTC clock and IRQ ... Conflicts: drivers/gpu/drm/i915/i915_dma.c drivers/gpu/drm/i915/intel_pm.c drivers/gpu/drm/qxl/qxl_release.c
This commit is contained in:
commit
1dda8d02ac
|
@ -98,6 +98,7 @@ clocks and IDs.
|
|||
fpm 83
|
||||
mpll_osc_sel 84
|
||||
mpll_sel 85
|
||||
spll_gate 86
|
||||
|
||||
Examples:
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ est ESTeem Wireless Modems
|
|||
fsl Freescale Semiconductor
|
||||
GEFanuc GE Fanuc Intelligent Platforms Embedded Systems, Inc.
|
||||
gef GE Fanuc Intelligent Platforms Embedded Systems, Inc.
|
||||
hisilicon Hisilicon Limited.
|
||||
hp Hewlett Packard
|
||||
ibm International Business Machines (IBM)
|
||||
idt Integrated Device Technologies, Inc.
|
||||
|
@ -43,6 +44,7 @@ nxp NXP Semiconductors
|
|||
onnn ON Semiconductor Corp.
|
||||
picochip Picochip Ltd
|
||||
powervr PowerVR (deprecated, use img)
|
||||
qca Qualcomm Atheros, Inc.
|
||||
qcom Qualcomm, Inc.
|
||||
ralink Mediatek/Ralink Technology Corp.
|
||||
ramtron Ramtron International
|
||||
|
|
|
@ -11,14 +11,14 @@ for non English (read: Japanese) speakers and is not intended as a
|
|||
fork. So if you have any comments or updates for this file, please try
|
||||
to update the original English file first.
|
||||
|
||||
Last Updated: 2011/03/31
|
||||
Last Updated: 2013/07/19
|
||||
==================================
|
||||
これは、
|
||||
linux-2.6.38/Documentation/HOWTO
|
||||
linux-3.10/Documentation/HOWTO
|
||||
の和訳です。
|
||||
|
||||
翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ >
|
||||
翻訳日: 2011/3/28
|
||||
翻訳団体: JF プロジェクト < http://linuxjf.sourceforge.jp/ >
|
||||
翻訳日: 2013/7/19
|
||||
翻訳者: Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com>
|
||||
校正者: 松倉さん <nbh--mats at nifty dot com>
|
||||
小林 雅典さん (Masanori Kobayasi) <zap03216 at nifty dot ne dot jp>
|
||||
|
@ -245,7 +245,7 @@ Linux カーネルソースツリーの中に含まれる、きれいにし、
|
|||
自己参照方式で、索引がついた web 形式で、ソースコードを参照することが
|
||||
できます。この最新の素晴しいカーネルコードのリポジトリは以下で見つかり
|
||||
ます-
|
||||
http://sosdg.org/~qiyong/lxr/
|
||||
http://lxr.linux.no/+trees
|
||||
|
||||
開発プロセス
|
||||
-----------------------
|
||||
|
@ -253,24 +253,24 @@ Linux カーネルソースツリーの中に含まれる、きれいにし、
|
|||
Linux カーネルの開発プロセスは現在幾つかの異なるメインカーネル「ブラン
|
||||
チ」と多数のサブシステム毎のカーネルブランチから構成されます。
|
||||
これらのブランチとは-
|
||||
- メインの 2.6.x カーネルツリー
|
||||
- 2.6.x.y -stable カーネルツリー
|
||||
- 2.6.x -git カーネルパッチ
|
||||
- メインの 3.x カーネルツリー
|
||||
- 3.x.y -stable カーネルツリー
|
||||
- 3.x -git カーネルパッチ
|
||||
- サブシステム毎のカーネルツリーとパッチ
|
||||
- 統合テストのための 2.6.x -next カーネルツリー
|
||||
- 統合テストのための 3.x -next カーネルツリー
|
||||
|
||||
2.6.x カーネルツリー
|
||||
3.x カーネルツリー
|
||||
-----------------
|
||||
|
||||
2.6.x カーネルは Linus Torvalds によってメンテナンスされ、kernel.org
|
||||
の pub/linux/kernel/v2.6/ ディレクトリに存在します。この開発プロセスは
|
||||
3.x カーネルは Linus Torvalds によってメンテナンスされ、kernel.org
|
||||
の pub/linux/kernel/v3.x/ ディレクトリに存在します。この開発プロセスは
|
||||
以下のとおり-
|
||||
|
||||
- 新しいカーネルがリリースされた直後に、2週間の特別期間が設けられ、
|
||||
この期間中に、メンテナ達は Linus に大きな差分を送ることができます。
|
||||
このような差分は通常 -next カーネルに数週間含まれてきたパッチです。
|
||||
大きな変更は git(カーネルのソース管理ツール、詳細は
|
||||
http://git-scm.com/ 参照) を使って送るのが好ましいやり方ですが、パッ
|
||||
http://git-scm.com/ 参照) を使って送るのが好ましいやり方ですが、パッ
|
||||
チファイルの形式のまま送るのでも十分です。
|
||||
|
||||
- 2週間後、-rc1 カーネルがリリースされ、この後にはカーネル全体の安定
|
||||
|
@ -302,20 +302,20 @@ Andrew Morton が Linux-kernel メーリングリストにカーネルリリー
|
|||
実に認識されたバグの状況によりリリースされるのであり、前もって決めら
|
||||
れた計画によってリリースされるものではないからです。」
|
||||
|
||||
2.6.x.y -stable カーネルツリー
|
||||
3.x.y -stable カーネルツリー
|
||||
---------------------------
|
||||
|
||||
バージョン番号が4つの数字に分かれているカーネルは -stable カーネルです。
|
||||
これには、2.6.x カーネルで見つかったセキュリティ問題や重大な後戻りに対
|
||||
バージョン番号が3つの数字に分かれているカーネルは -stable カーネルです。
|
||||
これには、3.x カーネルで見つかったセキュリティ問題や重大な後戻りに対
|
||||
する比較的小さい重要な修正が含まれます。
|
||||
|
||||
これは、開発/実験的バージョンのテストに協力することに興味が無く、
|
||||
最新の安定したカーネルを使いたいユーザに推奨するブランチです。
|
||||
|
||||
もし、2.6.x.y カーネルが存在しない場合には、番号が一番大きい 2.6.x が
|
||||
もし、3.x.y カーネルが存在しない場合には、番号が一番大きい 3.x が
|
||||
最新の安定版カーネルです。
|
||||
|
||||
2.6.x.y は "stable" チーム <stable@kernel.org> でメンテされており、必
|
||||
3.x.y は "stable" チーム <stable@kernel.org> でメンテされており、必
|
||||
要に応じてリリースされます。通常のリリース期間は 2週間毎ですが、差し迫っ
|
||||
た問題がなければもう少し長くなることもあります。セキュリティ関連の問題
|
||||
の場合はこれに対してだいたいの場合、すぐにリリースがされます。
|
||||
|
@ -324,7 +324,7 @@ Andrew Morton が Linux-kernel メーリングリストにカーネルリリー
|
|||
イルにはどのような種類の変更が -stable ツリーに受け入れ可能か、またリ
|
||||
リースプロセスがどう動くかが記述されています。
|
||||
|
||||
2.6.x -git パッチ
|
||||
3.x -git パッチ
|
||||
------------------
|
||||
|
||||
git リポジトリで管理されているLinus のカーネルツリーの毎日のスナップ
|
||||
|
@ -358,14 +358,14 @@ quilt シリーズとして公開されているパッチキューも使われ
|
|||
をつけることができます。大部分のこれらの patchwork のサイトは
|
||||
http://patchwork.kernel.org/ でリストされています。
|
||||
|
||||
統合テストのための 2.6.x -next カーネルツリー
|
||||
統合テストのための 3.x -next カーネルツリー
|
||||
---------------------------------------------
|
||||
|
||||
サブシステムツリーの更新内容がメインラインの 2.6.x ツリーにマージされ
|
||||
サブシステムツリーの更新内容がメインラインの 3.x ツリーにマージされ
|
||||
る前に、それらは統合テストされる必要があります。この目的のため、実質的
|
||||
に全サブシステムツリーからほぼ毎日プルされてできる特別なテスト用のリ
|
||||
ポジトリが存在します-
|
||||
http://git.kernel.org/?p=linux/kernel/git/sfr/linux-next.git
|
||||
http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git
|
||||
http://linux.f-seidel.de/linux-next/pmwiki/
|
||||
|
||||
このやり方によって、-next カーネルは次のマージ機会でどんなものがメイン
|
||||
|
|
32
MAINTAINERS
32
MAINTAINERS
|
@ -3622,11 +3622,9 @@ F: drivers/isdn/gigaset/
|
|||
F: include/uapi/linux/gigaset_dev.h
|
||||
|
||||
GPIO SUBSYSTEM
|
||||
M: Grant Likely <grant.likely@linaro.org>
|
||||
M: Linus Walleij <linus.walleij@linaro.org>
|
||||
S: Maintained
|
||||
L: linux-gpio@vger.kernel.org
|
||||
T: git git://git.secretlab.ca/git/linux-2.6.git
|
||||
F: Documentation/gpio.txt
|
||||
F: drivers/gpio/
|
||||
F: include/linux/gpio*
|
||||
|
@ -4472,8 +4470,6 @@ F: drivers/irqchip/
|
|||
|
||||
IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY)
|
||||
M: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
||||
M: Grant Likely <grant.likely@linaro.org>
|
||||
T: git git://git.secretlab.ca/git/linux-2.6.git irqdomain/next
|
||||
S: Maintained
|
||||
F: Documentation/IRQ-domain.txt
|
||||
F: include/linux/irqdomain.h
|
||||
|
@ -4990,7 +4986,7 @@ F: arch/powerpc/platforms/44x/
|
|||
|
||||
LINUX FOR POWERPC EMBEDDED XILINX VIRTEX
|
||||
L: linuxppc-dev@lists.ozlabs.org
|
||||
S: Unmaintained
|
||||
S: Orphan
|
||||
F: arch/powerpc/*/*virtex*
|
||||
F: arch/powerpc/*/*/*virtex*
|
||||
|
||||
|
@ -5886,7 +5882,7 @@ OMAP DEVICE TREE SUPPORT
|
|||
M: Benoît Cousson <b-cousson@ti.com>
|
||||
M: Tony Lindgren <tony@atomide.com>
|
||||
L: linux-omap@vger.kernel.org
|
||||
L: devicetree-discuss@lists.ozlabs.org (moderated for non-subscribers)
|
||||
L: devicetree@vger.kernel.org
|
||||
S: Maintained
|
||||
F: arch/arm/boot/dts/*omap*
|
||||
F: arch/arm/boot/dts/*am3*
|
||||
|
@ -6050,17 +6046,28 @@ F: drivers/i2c/busses/i2c-ocores.c
|
|||
OPEN FIRMWARE AND FLATTENED DEVICE TREE
|
||||
M: Grant Likely <grant.likely@linaro.org>
|
||||
M: Rob Herring <rob.herring@calxeda.com>
|
||||
L: devicetree-discuss@lists.ozlabs.org (moderated for non-subscribers)
|
||||
L: devicetree@vger.kernel.org
|
||||
W: http://fdt.secretlab.ca
|
||||
T: git git://git.secretlab.ca/git/linux-2.6.git
|
||||
S: Maintained
|
||||
F: Documentation/devicetree
|
||||
F: drivers/of
|
||||
F: drivers/of/
|
||||
F: include/linux/of*.h
|
||||
F: scripts/dtc
|
||||
F: scripts/dtc/
|
||||
K: of_get_property
|
||||
K: of_match_table
|
||||
|
||||
OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
|
||||
M: Rob Herring <rob.herring@calxeda.com>
|
||||
M: Pawel Moll <pawel.moll@arm.com>
|
||||
M: Mark Rutland <mark.rutland@arm.com>
|
||||
M: Stephen Warren <swarren@wwwdotorg.org>
|
||||
M: Ian Campbell <ian.campbell@citrix.com>
|
||||
L: devicetree@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/
|
||||
F: arch/*/boot/dts/
|
||||
F: include/dt-bindings/
|
||||
|
||||
OPENRISC ARCHITECTURE
|
||||
M: Jonas Bonn <jonas@southpole.se>
|
||||
W: http://openrisc.net
|
||||
|
@ -7746,7 +7753,6 @@ F: drivers/clk/spear/
|
|||
|
||||
SPI SUBSYSTEM
|
||||
M: Mark Brown <broonie@kernel.org>
|
||||
M: Grant Likely <grant.likely@linaro.org>
|
||||
L: linux-spi@vger.kernel.org
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
|
||||
Q: http://patchwork.kernel.org/project/spi-devel-general/list/
|
||||
|
@ -7812,7 +7818,7 @@ F: drivers/staging/asus_oled/
|
|||
|
||||
STAGING - COMEDI
|
||||
M: Ian Abbott <abbotti@mev.co.uk>
|
||||
M: Mori Hess <fmhess@users.sourceforge.net>
|
||||
M: H Hartley Sweeten <hsweeten@visionengravers.com>
|
||||
S: Odd Fixes
|
||||
F: drivers/staging/comedi/
|
||||
|
||||
|
@ -9288,7 +9294,7 @@ S: Maintained
|
|||
F: drivers/net/ethernet/xilinx/xilinx_axienet*
|
||||
|
||||
XILINX SYSTEMACE DRIVER
|
||||
S: Unmaintained
|
||||
S: Orphan
|
||||
F: drivers/block/xsysace.c
|
||||
|
||||
XILINX UARTLITE SERIAL DRIVER
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
|||
VERSION = 3
|
||||
PATCHLEVEL = 11
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc2
|
||||
EXTRAVERSION = -rc3
|
||||
NAME = Linux for Workgroups
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
|
|
@ -1600,8 +1600,7 @@ config LOCAL_TIMERS
|
|||
config ARCH_NR_GPIO
|
||||
int
|
||||
default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
|
||||
default 512 if SOC_OMAP5
|
||||
default 512 if ARCH_KEYSTONE
|
||||
default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5
|
||||
default 392 if ARCH_U8500
|
||||
default 352 if ARCH_VT8500
|
||||
default 288 if ARCH_SUNXI
|
||||
|
|
|
@ -485,6 +485,12 @@
|
|||
sirf,function = "usp0";
|
||||
};
|
||||
};
|
||||
usp0_uart_nostreamctrl_pins_a: usp0@1 {
|
||||
usp0 {
|
||||
sirf,pins = "usp0_uart_nostreamctrl_grp";
|
||||
sirf,function = "usp0_uart_nostreamctrl";
|
||||
};
|
||||
};
|
||||
usp1_pins_a: usp1@0 {
|
||||
usp1 {
|
||||
sirf,pins = "usp1grp";
|
||||
|
@ -515,16 +521,16 @@
|
|||
sirf,function = "pulse_count";
|
||||
};
|
||||
};
|
||||
cko0_rst_pins_a: cko0_rst@0 {
|
||||
cko0_rst {
|
||||
sirf,pins = "cko0_rstgrp";
|
||||
sirf,function = "cko0_rst";
|
||||
cko0_pins_a: cko0@0 {
|
||||
cko0 {
|
||||
sirf,pins = "cko0grp";
|
||||
sirf,function = "cko0";
|
||||
};
|
||||
};
|
||||
cko1_rst_pins_a: cko1_rst@0 {
|
||||
cko1_rst {
|
||||
sirf,pins = "cko1_rstgrp";
|
||||
sirf,function = "cko1_rst";
|
||||
cko1_pins_a: cko1@0 {
|
||||
cko1 {
|
||||
sirf,pins = "cko1grp";
|
||||
sirf,function = "cko1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -147,7 +147,7 @@
|
|||
reg = <0x0a>;
|
||||
VDDA-supply = <®_3p3v>;
|
||||
VDDIO-supply = <®_3p3v>;
|
||||
|
||||
clocks = <&saif0>;
|
||||
};
|
||||
|
||||
pcf8563: rtc@51 {
|
||||
|
|
|
@ -195,7 +195,7 @@
|
|||
reg = <0x0a>;
|
||||
VDDA-supply = <®_3p3v>;
|
||||
VDDIO-supply = <®_3p3v>;
|
||||
|
||||
clocks = <&saif0>;
|
||||
};
|
||||
|
||||
at24@51 {
|
||||
|
|
|
@ -184,7 +184,7 @@
|
|||
reg = <0x0a>;
|
||||
VDDA-supply = <®_3p3v>;
|
||||
VDDIO-supply = <®_3p3v>;
|
||||
|
||||
clocks = <&saif0>;
|
||||
};
|
||||
|
||||
eeprom: eeprom@51 {
|
||||
|
|
|
@ -837,6 +837,7 @@
|
|||
compatible = "fsl,imx28-saif";
|
||||
reg = <0x80042000 0x2000>;
|
||||
interrupts = <59 80>;
|
||||
#clock-cells = <0>;
|
||||
clocks = <&clks 53>;
|
||||
dmas = <&dma_apbx 4>;
|
||||
dma-names = "rx-tx";
|
||||
|
|
|
@ -61,6 +61,16 @@
|
|||
mux-int-port = <2>;
|
||||
mux-ext-port = <3>;
|
||||
};
|
||||
|
||||
clocks {
|
||||
clk_26M: codec_clock {
|
||||
compatible = "fixed-clock";
|
||||
reg=<0>;
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <26000000>;
|
||||
gpios = <&gpio4 26 1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&esdhc1 {
|
||||
|
@ -229,6 +239,7 @@
|
|||
MX51_PAD_EIM_A27__GPIO2_21 0x5
|
||||
MX51_PAD_CSPI1_SS0__GPIO4_24 0x85
|
||||
MX51_PAD_CSPI1_SS1__GPIO4_25 0x85
|
||||
MX51_PAD_CSPI1_RDY__GPIO4_26 0x80000000
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
@ -255,7 +266,7 @@
|
|||
sgtl5000: codec@0a {
|
||||
compatible = "fsl,sgtl5000";
|
||||
reg = <0x0a>;
|
||||
clock-frequency = <26000000>;
|
||||
clocks = <&clk_26M>;
|
||||
VDDA-supply = <&vdig_reg>;
|
||||
VDDIO-supply = <&vvideo_reg>;
|
||||
};
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
backlight {
|
||||
compatible = "pwm-backlight";
|
||||
pwms = <&pwm2 0 50000 0 0>;
|
||||
pwms = <&pwm2 0 50000>;
|
||||
brightness-levels = <0 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100>;
|
||||
default-brightness-level = <10>;
|
||||
enable-gpios = <&gpio7 7 0>;
|
||||
|
|
|
@ -725,15 +725,15 @@
|
|||
uart1 {
|
||||
pinctrl_uart1_1: uart1grp-1 {
|
||||
fsl,pins = <
|
||||
MX53_PAD_CSI0_DAT10__UART1_TXD_MUX 0x1c5
|
||||
MX53_PAD_CSI0_DAT11__UART1_RXD_MUX 0x1c5
|
||||
MX53_PAD_CSI0_DAT10__UART1_TXD_MUX 0x1e4
|
||||
MX53_PAD_CSI0_DAT11__UART1_RXD_MUX 0x1e4
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_uart1_2: uart1grp-2 {
|
||||
fsl,pins = <
|
||||
MX53_PAD_PATA_DIOW__UART1_TXD_MUX 0x1c5
|
||||
MX53_PAD_PATA_DMACK__UART1_RXD_MUX 0x1c5
|
||||
MX53_PAD_PATA_DIOW__UART1_TXD_MUX 0x1e4
|
||||
MX53_PAD_PATA_DMACK__UART1_RXD_MUX 0x1e4
|
||||
>;
|
||||
};
|
||||
|
||||
|
@ -748,8 +748,8 @@
|
|||
uart2 {
|
||||
pinctrl_uart2_1: uart2grp-1 {
|
||||
fsl,pins = <
|
||||
MX53_PAD_PATA_BUFFER_EN__UART2_RXD_MUX 0x1c5
|
||||
MX53_PAD_PATA_DMARQ__UART2_TXD_MUX 0x1c5
|
||||
MX53_PAD_PATA_BUFFER_EN__UART2_RXD_MUX 0x1e4
|
||||
MX53_PAD_PATA_DMARQ__UART2_TXD_MUX 0x1e4
|
||||
>;
|
||||
};
|
||||
|
||||
|
@ -766,17 +766,17 @@
|
|||
uart3 {
|
||||
pinctrl_uart3_1: uart3grp-1 {
|
||||
fsl,pins = <
|
||||
MX53_PAD_PATA_CS_0__UART3_TXD_MUX 0x1c5
|
||||
MX53_PAD_PATA_CS_1__UART3_RXD_MUX 0x1c5
|
||||
MX53_PAD_PATA_DA_1__UART3_CTS 0x1c5
|
||||
MX53_PAD_PATA_DA_2__UART3_RTS 0x1c5
|
||||
MX53_PAD_PATA_CS_0__UART3_TXD_MUX 0x1e4
|
||||
MX53_PAD_PATA_CS_1__UART3_RXD_MUX 0x1e4
|
||||
MX53_PAD_PATA_DA_1__UART3_CTS 0x1e4
|
||||
MX53_PAD_PATA_DA_2__UART3_RTS 0x1e4
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_uart3_2: uart3grp-2 {
|
||||
fsl,pins = <
|
||||
MX53_PAD_PATA_CS_0__UART3_TXD_MUX 0x1c5
|
||||
MX53_PAD_PATA_CS_1__UART3_RXD_MUX 0x1c5
|
||||
MX53_PAD_PATA_CS_0__UART3_TXD_MUX 0x1e4
|
||||
MX53_PAD_PATA_CS_1__UART3_RXD_MUX 0x1e4
|
||||
>;
|
||||
};
|
||||
|
||||
|
@ -785,8 +785,8 @@
|
|||
uart4 {
|
||||
pinctrl_uart4_1: uart4grp-1 {
|
||||
fsl,pins = <
|
||||
MX53_PAD_KEY_COL0__UART4_TXD_MUX 0x1c5
|
||||
MX53_PAD_KEY_ROW0__UART4_RXD_MUX 0x1c5
|
||||
MX53_PAD_KEY_COL0__UART4_TXD_MUX 0x1e4
|
||||
MX53_PAD_KEY_ROW0__UART4_RXD_MUX 0x1e4
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
@ -794,8 +794,8 @@
|
|||
uart5 {
|
||||
pinctrl_uart5_1: uart5grp-1 {
|
||||
fsl,pins = <
|
||||
MX53_PAD_KEY_COL1__UART5_TXD_MUX 0x1c5
|
||||
MX53_PAD_KEY_ROW1__UART5_RXD_MUX 0x1c5
|
||||
MX53_PAD_KEY_COL1__UART5_TXD_MUX 0x1e4
|
||||
MX53_PAD_KEY_ROW1__UART5_RXD_MUX 0x1e4
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -515,16 +515,16 @@
|
|||
sirf,function = "pulse_count";
|
||||
};
|
||||
};
|
||||
cko0_rst_pins_a: cko0_rst@0 {
|
||||
cko0_rst {
|
||||
sirf,pins = "cko0_rstgrp";
|
||||
sirf,function = "cko0_rst";
|
||||
cko0_pins_a: cko0@0 {
|
||||
cko0 {
|
||||
sirf,pins = "cko0grp";
|
||||
sirf,function = "cko0";
|
||||
};
|
||||
};
|
||||
cko1_rst_pins_a: cko1_rst@0 {
|
||||
cko1_rst {
|
||||
sirf,pins = "cko1_rstgrp";
|
||||
sirf,function = "cko1_rst";
|
||||
cko1_pins_a: cko1@0 {
|
||||
cko1 {
|
||||
sirf,pins = "cko1grp";
|
||||
sirf,function = "cko1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -166,6 +166,15 @@
|
|||
reg = <0x9000 0x100>;
|
||||
st,bank-name = "PIO31";
|
||||
};
|
||||
|
||||
serial2-oe {
|
||||
pinctrl_serial2_oe: serial2-1 {
|
||||
st,pins {
|
||||
output-enable = <&PIO11 3 ALT2 OUT>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
pin-controller-rear {
|
||||
|
@ -218,7 +227,6 @@
|
|||
st,pins {
|
||||
tx = <&PIO17 4 ALT2 OUT>;
|
||||
rx = <&PIO17 5 ALT2 IN>;
|
||||
output-enable = <&PIO11 3 ALT2 OUT>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
interrupts = <0 197 0>;
|
||||
clocks = <&CLK_S_ICN_REG_0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_serial2>;
|
||||
pinctrl-0 = <&pinctrl_serial2 &pinctrl_serial2_oe>;
|
||||
};
|
||||
|
||||
/* SBC_UART1 */
|
||||
|
|
|
@ -47,6 +47,12 @@
|
|||
regulator-max-microvolt = <3150000>;
|
||||
};
|
||||
|
||||
vmmc2: regulator-vmmc2 {
|
||||
compatible = "ti,twl4030-vmmc2";
|
||||
regulator-min-microvolt = <1850000>;
|
||||
regulator-max-microvolt = <3150000>;
|
||||
};
|
||||
|
||||
vusb1v5: regulator-vusb1v5 {
|
||||
compatible = "ti,twl4030-vusb1v5";
|
||||
};
|
||||
|
|
|
@ -442,8 +442,8 @@
|
|||
compatible = "fsl,mvf600-fec";
|
||||
reg = <0x400d0000 0x1000>;
|
||||
interrupts = <0 78 0x04>;
|
||||
clocks = <&clks VF610_CLK_ENET>,
|
||||
<&clks VF610_CLK_ENET>,
|
||||
clocks = <&clks VF610_CLK_ENET0>,
|
||||
<&clks VF610_CLK_ENET0>,
|
||||
<&clks VF610_CLK_ENET>;
|
||||
clock-names = "ipg", "ahb", "ptp";
|
||||
status = "disabled";
|
||||
|
@ -453,8 +453,8 @@
|
|||
compatible = "fsl,mvf600-fec";
|
||||
reg = <0x400d1000 0x1000>;
|
||||
interrupts = <0 79 0x04>;
|
||||
clocks = <&clks VF610_CLK_ENET>,
|
||||
<&clks VF610_CLK_ENET>,
|
||||
clocks = <&clks VF610_CLK_ENET1>,
|
||||
<&clks VF610_CLK_ENET1>,
|
||||
<&clks VF610_CLK_ENET>;
|
||||
clock-names = "ipg", "ahb", "ptp";
|
||||
status = "disabled";
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/edma.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_dma.h>
|
||||
|
|
|
@ -102,6 +102,8 @@ CONFIG_SND_SOC=m
|
|||
CONFIG_SND_DAVINCI_SOC=m
|
||||
# CONFIG_HID_SUPPORT is not set
|
||||
# CONFIG_USB_SUPPORT is not set
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_TI_EDMA=y
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_EXT3_FS=y
|
||||
CONFIG_XFS_FS=m
|
||||
|
|
|
@ -162,6 +162,8 @@ CONFIG_LEDS_TRIGGERS=y
|
|||
CONFIG_LEDS_TRIGGER_TIMER=m
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=m
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_TI_EDMA=y
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_EXT3_FS=y
|
||||
CONFIG_XFS_FS=m
|
||||
|
|
|
@ -53,6 +53,7 @@ CONFIG_IP_PNP=y
|
|||
CONFIG_IP_PNP_DHCP=y
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
CONFIG_OMAP_OCP2SCP=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_ATA=y
|
||||
CONFIG_SATA_AHCI_PLATFORM=y
|
||||
|
@ -61,6 +62,7 @@ CONFIG_SATA_MV=y
|
|||
CONFIG_NETDEVICES=y
|
||||
CONFIG_SUN4I_EMAC=y
|
||||
CONFIG_NET_CALXEDA_XGMAC=y
|
||||
CONFIG_KS8851=y
|
||||
CONFIG_SMSC911X=y
|
||||
CONFIG_STMMAC_ETH=y
|
||||
CONFIG_MDIO_SUN4I=y
|
||||
|
@ -89,6 +91,7 @@ CONFIG_I2C_DESIGNWARE_PLATFORM=y
|
|||
CONFIG_I2C_SIRF=y
|
||||
CONFIG_I2C_TEGRA=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_OMAP24XX=y
|
||||
CONFIG_SPI_PL022=y
|
||||
CONFIG_SPI_SIRF=y
|
||||
CONFIG_SPI_TEGRA114=y
|
||||
|
@ -111,11 +114,12 @@ CONFIG_FB_SIMPLE=y
|
|||
CONFIG_USB=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_MXC=y
|
||||
CONFIG_USB_EHCI_TEGRA=y
|
||||
CONFIG_USB_EHCI_HCD_PLATFORM=y
|
||||
CONFIG_USB_ISP1760_HCD=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_CHIPIDEA=y
|
||||
CONFIG_USB_CHIPIDEA_HOST=y
|
||||
CONFIG_AB8500_USB=y
|
||||
CONFIG_NOP_USB_XCEIV=y
|
||||
CONFIG_OMAP_USB2=y
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
# CONFIG_LOCALVERSION_AUTO is not set
|
||||
# CONFIG_SWAP is not set
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_LOG_BUF_SHIFT=14
|
||||
|
@ -48,7 +50,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
|||
CONFIG_MTD=y
|
||||
CONFIG_MTD_TESTS=m
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_CHAR=y
|
||||
CONFIG_MTD_BLOCK=y
|
||||
CONFIG_MTD_NAND_ECC_SMC=y
|
||||
CONFIG_MTD_NAND=y
|
||||
|
@ -94,8 +95,10 @@ CONFIG_I2C_GPIO=y
|
|||
CONFIG_I2C_NOMADIK=y
|
||||
CONFIG_DEBUG_GPIO=y
|
||||
# CONFIG_HWMON is not set
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_CLKGATE=y
|
||||
CONFIG_MMC_UNSAFE_RESUME=y
|
||||
# CONFIG_MMC_BLOCK_BOUNCE is not set
|
||||
CONFIG_MMC_ARMMMCI=y
|
||||
CONFIG_NEW_LEDS=y
|
||||
CONFIG_LEDS_CLASS=y
|
||||
|
|
|
@ -505,7 +505,7 @@ static struct vpbe_output dm365evm_vpbe_outputs[] = {
|
|||
/*
|
||||
* Amplifiers on the board
|
||||
*/
|
||||
struct ths7303_platform_data ths7303_pdata = {
|
||||
static struct ths7303_platform_data ths7303_pdata = {
|
||||
.ch_1 = 3,
|
||||
.ch_2 = 3,
|
||||
.ch_3 = 3,
|
||||
|
|
|
@ -860,7 +860,7 @@ static struct platform_device dm355_vpbe_display = {
|
|||
},
|
||||
};
|
||||
|
||||
struct venc_platform_data dm355_venc_pdata = {
|
||||
static struct venc_platform_data dm355_venc_pdata = {
|
||||
.setup_pinmux = dm355_vpbe_setup_pinmux,
|
||||
.setup_clock = dm355_venc_setup_clock,
|
||||
};
|
||||
|
|
|
@ -1349,7 +1349,7 @@ static struct platform_device dm365_vpbe_display = {
|
|||
},
|
||||
};
|
||||
|
||||
struct venc_platform_data dm365_venc_pdata = {
|
||||
static struct venc_platform_data dm365_venc_pdata = {
|
||||
.setup_pinmux = dm365_vpbe_setup_pinmux,
|
||||
.setup_clock = dm365_venc_setup_clock,
|
||||
};
|
||||
|
|
|
@ -92,6 +92,7 @@ config SOC_EXYNOS5440
|
|||
bool "SAMSUNG EXYNOS5440"
|
||||
default y
|
||||
depends on ARCH_EXYNOS5
|
||||
select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
|
||||
select ARCH_HAS_OPP
|
||||
select HAVE_ARM_ARCH_TIMER
|
||||
select AUTO_ZRELADDR
|
||||
|
|
|
@ -14,7 +14,7 @@ obj- :=
|
|||
|
||||
obj-$(CONFIG_ARCH_EXYNOS) += common.o
|
||||
|
||||
obj-$(CONFIG_PM) += pm.o
|
||||
obj-$(CONFIG_S5P_PM) += pm.o
|
||||
obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o
|
||||
obj-$(CONFIG_CPU_IDLE) += cpuidle.o
|
||||
|
||||
|
|
|
@ -58,7 +58,6 @@ static const char name_exynos5440[] = "EXYNOS5440";
|
|||
|
||||
static void exynos4_map_io(void);
|
||||
static void exynos5_map_io(void);
|
||||
static void exynos5440_map_io(void);
|
||||
static int exynos_init(void);
|
||||
|
||||
static struct cpu_table cpu_ids[] __initdata = {
|
||||
|
@ -95,7 +94,6 @@ static struct cpu_table cpu_ids[] __initdata = {
|
|||
}, {
|
||||
.idcode = EXYNOS5440_SOC_ID,
|
||||
.idmask = EXYNOS5_SOC_MASK,
|
||||
.map_io = exynos5440_map_io,
|
||||
.init = exynos_init,
|
||||
.name = name_exynos5440,
|
||||
},
|
||||
|
@ -149,11 +147,6 @@ static struct map_desc exynos4_iodesc[] __initdata = {
|
|||
.pfn = __phys_to_pfn(EXYNOS4_PA_GIC_DIST),
|
||||
.length = SZ_64K,
|
||||
.type = MT_DEVICE,
|
||||
}, {
|
||||
.virtual = (unsigned long)S3C_VA_UART,
|
||||
.pfn = __phys_to_pfn(EXYNOS4_PA_UART),
|
||||
.length = SZ_512K,
|
||||
.type = MT_DEVICE,
|
||||
}, {
|
||||
.virtual = (unsigned long)S5P_VA_CMU,
|
||||
.pfn = __phys_to_pfn(EXYNOS4_PA_CMU),
|
||||
|
@ -268,20 +261,6 @@ static struct map_desc exynos5_iodesc[] __initdata = {
|
|||
.pfn = __phys_to_pfn(EXYNOS5_PA_PMU),
|
||||
.length = SZ_64K,
|
||||
.type = MT_DEVICE,
|
||||
}, {
|
||||
.virtual = (unsigned long)S3C_VA_UART,
|
||||
.pfn = __phys_to_pfn(EXYNOS5_PA_UART),
|
||||
.length = SZ_512K,
|
||||
.type = MT_DEVICE,
|
||||
},
|
||||
};
|
||||
|
||||
static struct map_desc exynos5440_iodesc0[] __initdata = {
|
||||
{
|
||||
.virtual = (unsigned long)S3C_VA_UART,
|
||||
.pfn = __phys_to_pfn(EXYNOS5440_PA_UART0),
|
||||
.length = SZ_512K,
|
||||
.type = MT_DEVICE,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -388,11 +367,6 @@ static void __init exynos5_map_io(void)
|
|||
iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc));
|
||||
}
|
||||
|
||||
static void __init exynos5440_map_io(void)
|
||||
{
|
||||
iotable_init(exynos5440_iodesc0, ARRAY_SIZE(exynos5440_iodesc0));
|
||||
}
|
||||
|
||||
void __init exynos_init_time(void)
|
||||
{
|
||||
of_clk_init(NULL);
|
||||
|
|
|
@ -97,6 +97,5 @@ struct exynos_pmu_conf {
|
|||
};
|
||||
|
||||
extern void exynos_sys_powerdown_conf(enum sys_powerdown mode);
|
||||
extern void s3c_cpu_resume(void);
|
||||
|
||||
#endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <mach/regs-pmu.h>
|
||||
|
||||
#include <plat/cpu.h>
|
||||
#include <plat/pm.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
|
|
|
@ -15,8 +15,13 @@
|
|||
|
||||
#define PLAT_PHYS_OFFSET UL(0x40000000)
|
||||
|
||||
#ifndef CONFIG_ARM_LPAE
|
||||
/* Maximum of 256MiB in one bank */
|
||||
#define MAX_PHYSMEM_BITS 32
|
||||
#define SECTION_SIZE_BITS 28
|
||||
#else
|
||||
#define MAX_PHYSMEM_BITS 36
|
||||
#define SECTION_SIZE_BITS 31
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_ARCH_MEMORY_H */
|
||||
|
|
|
@ -217,6 +217,9 @@ static __init int exynos_pm_drvinit(void)
|
|||
struct clk *pll_base;
|
||||
unsigned int tmp;
|
||||
|
||||
if (soc_is_exynos5440())
|
||||
return 0;
|
||||
|
||||
s3c_pm_init();
|
||||
|
||||
/* All wakeup disable */
|
||||
|
@ -340,6 +343,9 @@ static struct syscore_ops exynos_pm_syscore_ops = {
|
|||
|
||||
static __init int exynos_pm_syscore_init(void)
|
||||
{
|
||||
if (soc_is_exynos5440())
|
||||
return 0;
|
||||
|
||||
register_syscore_ops(&exynos_pm_syscore_ops);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -276,8 +276,6 @@ int __init dc21285_setup(int nr, struct pci_sys_data *sys)
|
|||
|
||||
sys->mem_offset = DC21285_PCI_MEM;
|
||||
|
||||
pci_ioremap_io(0, DC21285_PCI_IO);
|
||||
|
||||
pci_add_resource_offset(&sys->resources, &res[0], sys->mem_offset);
|
||||
pci_add_resource_offset(&sys->resources, &res[1], sys->mem_offset);
|
||||
|
||||
|
|
|
@ -115,6 +115,7 @@ static int highbank_platform_notifier(struct notifier_block *nb,
|
|||
{
|
||||
struct resource *res;
|
||||
int reg = -1;
|
||||
u32 val;
|
||||
struct device *dev = __dev;
|
||||
|
||||
if (event != BUS_NOTIFY_ADD_DEVICE)
|
||||
|
@ -141,10 +142,10 @@ static int highbank_platform_notifier(struct notifier_block *nb,
|
|||
return NOTIFY_DONE;
|
||||
|
||||
if (of_property_read_bool(dev->of_node, "dma-coherent")) {
|
||||
writel(0xff31, sregs_base + reg);
|
||||
val = readl(sregs_base + reg);
|
||||
writel(val | 0xff01, sregs_base + reg);
|
||||
set_dma_ops(dev, &arm_coherent_dma_ops);
|
||||
} else
|
||||
writel(0, sregs_base + reg);
|
||||
}
|
||||
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
|
|
@ -199,7 +199,8 @@ static const char *pcie_axi_sels[] = { "axi", "ahb", };
|
|||
static const char *ssi_sels[] = { "pll3_pfd2_508m", "pll3_pfd3_454m", "pll4_post_div", };
|
||||
static const char *usdhc_sels[] = { "pll2_pfd2_396m", "pll2_pfd0_352m", };
|
||||
static const char *enfc_sels[] = { "pll2_pfd0_352m", "pll2_bus", "pll3_usb_otg", "pll2_pfd2_396m", };
|
||||
static const char *emi_sels[] = { "axi", "pll3_usb_otg", "pll2_pfd2_396m", "pll2_pfd0_352m", };
|
||||
static const char *emi_sels[] = { "pll2_pfd2_396m", "pll3_usb_otg", "axi", "pll2_pfd0_352m", };
|
||||
static const char *emi_slow_sels[] = { "axi", "pll3_usb_otg", "pll2_pfd2_396m", "pll2_pfd0_352m", };
|
||||
static const char *vdo_axi_sels[] = { "axi", "ahb", };
|
||||
static const char *vpu_axi_sels[] = { "axi", "pll2_pfd2_396m", "pll2_pfd0_352m", };
|
||||
static const char *cko1_sels[] = { "pll3_usb_otg", "pll2_bus", "pll1_sys", "pll5_video_div",
|
||||
|
@ -392,7 +393,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
|
|||
clk[usdhc4_sel] = imx_clk_mux("usdhc4_sel", base + 0x1c, 19, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels));
|
||||
clk[enfc_sel] = imx_clk_mux("enfc_sel", base + 0x2c, 16, 2, enfc_sels, ARRAY_SIZE(enfc_sels));
|
||||
clk[emi_sel] = imx_clk_mux("emi_sel", base + 0x1c, 27, 2, emi_sels, ARRAY_SIZE(emi_sels));
|
||||
clk[emi_slow_sel] = imx_clk_mux("emi_slow_sel", base + 0x1c, 29, 2, emi_sels, ARRAY_SIZE(emi_sels));
|
||||
clk[emi_slow_sel] = imx_clk_mux("emi_slow_sel", base + 0x1c, 29, 2, emi_slow_sels, ARRAY_SIZE(emi_slow_sels));
|
||||
clk[vdo_axi_sel] = imx_clk_mux("vdo_axi_sel", base + 0x18, 11, 1, vdo_axi_sels, ARRAY_SIZE(vdo_axi_sels));
|
||||
clk[vpu_axi_sel] = imx_clk_mux("vpu_axi_sel", base + 0x18, 14, 2, vpu_axi_sels, ARRAY_SIZE(vpu_axi_sels));
|
||||
clk[cko1_sel] = imx_clk_mux("cko1_sel", base + 0x60, 0, 4, cko1_sels, ARRAY_SIZE(cko1_sels));
|
||||
|
|
|
@ -183,6 +183,8 @@ static void __init vf610_clocks_init(struct device_node *ccm_node)
|
|||
clk[VF610_CLK_ENET_TS_SEL] = imx_clk_mux("enet_ts_sel", CCM_CSCMR2, 0, 3, enet_ts_sels, 7);
|
||||
clk[VF610_CLK_ENET] = imx_clk_gate("enet", "enet_sel", CCM_CSCDR1, 24);
|
||||
clk[VF610_CLK_ENET_TS] = imx_clk_gate("enet_ts", "enet_ts_sel", CCM_CSCDR1, 23);
|
||||
clk[VF610_CLK_ENET0] = imx_clk_gate2("enet0", "ipg_bus", CCM_CCGR9, CCM_CCGRx_CGn(0));
|
||||
clk[VF610_CLK_ENET1] = imx_clk_gate2("enet1", "ipg_bus", CCM_CCGR9, CCM_CCGRx_CGn(1));
|
||||
|
||||
clk[VF610_CLK_PIT] = imx_clk_gate2("pit", "ipg_bus", CCM_CCGR1, CCM_CCGRx_CGn(7));
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
#define MX27_INT_GPT4 (NR_IRQS_LEGACY + 4)
|
||||
#define MX27_INT_RTIC (NR_IRQS_LEGACY + 5)
|
||||
#define MX27_INT_CSPI3 (NR_IRQS_LEGACY + 6)
|
||||
#define MX27_INT_SDHC (NR_IRQS_LEGACY + 7)
|
||||
#define MX27_INT_MSHC (NR_IRQS_LEGACY + 7)
|
||||
#define MX27_INT_GPIO (NR_IRQS_LEGACY + 8)
|
||||
#define MX27_INT_SDHC3 (NR_IRQS_LEGACY + 9)
|
||||
#define MX27_INT_SDHC2 (NR_IRQS_LEGACY + 10)
|
||||
|
|
|
@ -49,7 +49,7 @@ static const char *keystone_match[] __initconst = {
|
|||
NULL,
|
||||
};
|
||||
|
||||
void keystone_restart(char mode, const char *cmd)
|
||||
void keystone_restart(enum reboot_mode mode, const char *cmd)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ config SOC_OMAP5
|
|||
select HAVE_SMP
|
||||
select COMMON_CLK
|
||||
select HAVE_ARM_ARCH_TIMER
|
||||
select ARM_ERRATA_798181
|
||||
select ARM_ERRATA_798181 if SMP
|
||||
|
||||
config SOC_AM33XX
|
||||
bool "AM33XX support"
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <linux/of_irq.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/irqdomain.h>
|
||||
#include <linux/clk.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
|
@ -35,6 +36,21 @@ static struct of_device_id omap_dt_match_table[] __initdata = {
|
|||
{ }
|
||||
};
|
||||
|
||||
/*
|
||||
* Create alias for USB host PHY clock.
|
||||
* Remove this when clock phandle can be provided via DT
|
||||
*/
|
||||
static void __init legacy_init_ehci_clk(char *clkname)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = clk_add_alias("main_clk", NULL, clkname, NULL);
|
||||
if (ret) {
|
||||
pr_err("%s:Failed to add main_clk alias to %s :%d\n",
|
||||
__func__, clkname, ret);
|
||||
}
|
||||
}
|
||||
|
||||
static void __init omap_generic_init(void)
|
||||
{
|
||||
omap_sdrc_init(NULL, NULL);
|
||||
|
@ -45,10 +61,15 @@ static void __init omap_generic_init(void)
|
|||
* HACK: call display setup code for selected boards to enable omapdss.
|
||||
* This will be removed when omapdss supports DT.
|
||||
*/
|
||||
if (of_machine_is_compatible("ti,omap4-panda"))
|
||||
if (of_machine_is_compatible("ti,omap4-panda")) {
|
||||
omap4_panda_display_init_of();
|
||||
legacy_init_ehci_clk("auxclk3_ck");
|
||||
|
||||
}
|
||||
else if (of_machine_is_compatible("ti,omap4-sdp"))
|
||||
omap_4430sdp_display_init_of();
|
||||
else if (of_machine_is_compatible("ti,omap5-uevm"))
|
||||
legacy_init_ehci_clk("auxclk1_ck");
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SOC_OMAP2420
|
||||
|
|
|
@ -477,16 +477,24 @@ static int em_x270_usb_hub_init(void)
|
|||
/* USB Hub power-on and reset */
|
||||
gpio_direction_output(usb_hub_reset, 1);
|
||||
gpio_direction_output(GPIO9_USB_VBUS_EN, 0);
|
||||
regulator_enable(em_x270_usb_ldo);
|
||||
err = regulator_enable(em_x270_usb_ldo);
|
||||
if (err)
|
||||
goto err_free_rst_gpio;
|
||||
|
||||
gpio_set_value(usb_hub_reset, 0);
|
||||
gpio_set_value(usb_hub_reset, 1);
|
||||
regulator_disable(em_x270_usb_ldo);
|
||||
regulator_enable(em_x270_usb_ldo);
|
||||
err = regulator_enable(em_x270_usb_ldo);
|
||||
if (err)
|
||||
goto err_free_rst_gpio;
|
||||
|
||||
gpio_set_value(usb_hub_reset, 0);
|
||||
gpio_set_value(GPIO9_USB_VBUS_EN, 1);
|
||||
|
||||
return 0;
|
||||
|
||||
err_free_rst_gpio:
|
||||
gpio_free(usb_hub_reset);
|
||||
err_free_vbus_gpio:
|
||||
gpio_free(GPIO9_USB_VBUS_EN);
|
||||
err_free_usb_ldo:
|
||||
|
@ -592,7 +600,7 @@ err_irq:
|
|||
return err;
|
||||
}
|
||||
|
||||
static void em_x270_mci_setpower(struct device *dev, unsigned int vdd)
|
||||
static int em_x270_mci_setpower(struct device *dev, unsigned int vdd)
|
||||
{
|
||||
struct pxamci_platform_data* p_d = dev->platform_data;
|
||||
|
||||
|
@ -600,10 +608,11 @@ static void em_x270_mci_setpower(struct device *dev, unsigned int vdd)
|
|||
int vdd_uV = (2000 + (vdd - __ffs(MMC_VDD_20_21)) * 100) * 1000;
|
||||
|
||||
regulator_set_voltage(em_x270_sdio_ldo, vdd_uV, vdd_uV);
|
||||
regulator_enable(em_x270_sdio_ldo);
|
||||
return regulator_enable(em_x270_sdio_ldo);
|
||||
} else {
|
||||
regulator_disable(em_x270_sdio_ldo);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void em_x270_mci_exit(struct device *dev, void *data)
|
||||
|
|
|
@ -408,7 +408,7 @@ static int mainstone_mci_init(struct device *dev, irq_handler_t mstone_detect_in
|
|||
return err;
|
||||
}
|
||||
|
||||
static void mainstone_mci_setpower(struct device *dev, unsigned int vdd)
|
||||
static int mainstone_mci_setpower(struct device *dev, unsigned int vdd)
|
||||
{
|
||||
struct pxamci_platform_data* p_d = dev->platform_data;
|
||||
|
||||
|
@ -420,6 +420,7 @@ static void mainstone_mci_setpower(struct device *dev, unsigned int vdd)
|
|||
printk(KERN_DEBUG "%s: off\n", __func__);
|
||||
MST_MSCWR1 &= ~MST_MSCWR1_MMC_ON;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void mainstone_mci_exit(struct device *dev, void *data)
|
||||
|
|
|
@ -335,7 +335,7 @@ static int pcm990_mci_init(struct device *dev, irq_handler_t mci_detect_int,
|
|||
return err;
|
||||
}
|
||||
|
||||
static void pcm990_mci_setpower(struct device *dev, unsigned int vdd)
|
||||
static int pcm990_mci_setpower(struct device *dev, unsigned int vdd)
|
||||
{
|
||||
struct pxamci_platform_data *p_d = dev->platform_data;
|
||||
u8 val;
|
||||
|
@ -348,6 +348,7 @@ static void pcm990_mci_setpower(struct device *dev, unsigned int vdd)
|
|||
val &= ~PCM990_CTRL_MMC2PWR;
|
||||
|
||||
pcm990_cpld_writeb(PCM990_CTRL_MMC2PWR, PCM990_CTRL_REG5);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void pcm990_mci_exit(struct device *dev, void *data)
|
||||
|
|
|
@ -258,7 +258,7 @@ err_free_2:
|
|||
return err;
|
||||
}
|
||||
|
||||
static void poodle_mci_setpower(struct device *dev, unsigned int vdd)
|
||||
static int poodle_mci_setpower(struct device *dev, unsigned int vdd)
|
||||
{
|
||||
struct pxamci_platform_data* p_d = dev->platform_data;
|
||||
|
||||
|
@ -270,6 +270,8 @@ static void poodle_mci_setpower(struct device *dev, unsigned int vdd)
|
|||
gpio_set_value(POODLE_GPIO_SD_PWR1, 0);
|
||||
gpio_set_value(POODLE_GPIO_SD_PWR, 0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void poodle_mci_exit(struct device *dev, void *data)
|
||||
|
|
|
@ -598,7 +598,7 @@ static inline void spitz_spi_init(void) {}
|
|||
* NOTE: The card detect interrupt isn't debounced so we delay it by 250ms to
|
||||
* give the card a chance to fully insert/eject.
|
||||
*/
|
||||
static void spitz_mci_setpower(struct device *dev, unsigned int vdd)
|
||||
static int spitz_mci_setpower(struct device *dev, unsigned int vdd)
|
||||
{
|
||||
struct pxamci_platform_data* p_d = dev->platform_data;
|
||||
|
||||
|
@ -606,6 +606,8 @@ static void spitz_mci_setpower(struct device *dev, unsigned int vdd)
|
|||
spitz_card_pwr_ctrl(SCOOP_CPR_SD_3V, SCOOP_CPR_SD_3V);
|
||||
else
|
||||
spitz_card_pwr_ctrl(SCOOP_CPR_SD_3V, 0x0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct pxamci_platform_data spitz_mci_platform_data = {
|
||||
|
|
|
@ -734,9 +734,10 @@ static int stargate2_mci_init(struct device *dev,
|
|||
*
|
||||
* Very simple control. Either it is on or off and is controlled by
|
||||
* a gpio pin */
|
||||
static void stargate2_mci_setpower(struct device *dev, unsigned int vdd)
|
||||
static int stargate2_mci_setpower(struct device *dev, unsigned int vdd)
|
||||
{
|
||||
gpio_set_value(SG2_SD_POWER_ENABLE, !!vdd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void stargate2_mci_exit(struct device *dev, void *data)
|
||||
|
|
|
@ -119,66 +119,101 @@ static struct clk init_clocks_off[] = {
|
|||
}
|
||||
};
|
||||
|
||||
static struct clk init_clocks[] = {
|
||||
{
|
||||
.name = "lcd",
|
||||
.parent = &clk_h,
|
||||
.enable = s3c2410_clkcon_enable,
|
||||
.ctrlbit = S3C2410_CLKCON_LCDC,
|
||||
}, {
|
||||
.name = "gpio",
|
||||
.parent = &clk_p,
|
||||
.enable = s3c2410_clkcon_enable,
|
||||
.ctrlbit = S3C2410_CLKCON_GPIO,
|
||||
}, {
|
||||
.name = "usb-host",
|
||||
.parent = &clk_h,
|
||||
.enable = s3c2410_clkcon_enable,
|
||||
.ctrlbit = S3C2410_CLKCON_USBH,
|
||||
}, {
|
||||
.name = "usb-device",
|
||||
.parent = &clk_h,
|
||||
.enable = s3c2410_clkcon_enable,
|
||||
.ctrlbit = S3C2410_CLKCON_USBD,
|
||||
}, {
|
||||
.name = "timers",
|
||||
.parent = &clk_p,
|
||||
.enable = s3c2410_clkcon_enable,
|
||||
.ctrlbit = S3C2410_CLKCON_PWMT,
|
||||
}, {
|
||||
.name = "uart",
|
||||
.devname = "s3c2410-uart.0",
|
||||
.parent = &clk_p,
|
||||
.enable = s3c2410_clkcon_enable,
|
||||
.ctrlbit = S3C2410_CLKCON_UART0,
|
||||
}, {
|
||||
.name = "uart",
|
||||
.devname = "s3c2410-uart.1",
|
||||
.parent = &clk_p,
|
||||
.enable = s3c2410_clkcon_enable,
|
||||
.ctrlbit = S3C2410_CLKCON_UART1,
|
||||
}, {
|
||||
.name = "uart",
|
||||
.devname = "s3c2410-uart.2",
|
||||
.parent = &clk_p,
|
||||
.enable = s3c2410_clkcon_enable,
|
||||
.ctrlbit = S3C2410_CLKCON_UART2,
|
||||
}, {
|
||||
.name = "rtc",
|
||||
.parent = &clk_p,
|
||||
.enable = s3c2410_clkcon_enable,
|
||||
.ctrlbit = S3C2410_CLKCON_RTC,
|
||||
}, {
|
||||
.name = "watchdog",
|
||||
.parent = &clk_p,
|
||||
.ctrlbit = 0,
|
||||
}, {
|
||||
.name = "usb-bus-host",
|
||||
.parent = &clk_usb_bus,
|
||||
}, {
|
||||
.name = "usb-bus-gadget",
|
||||
.parent = &clk_usb_bus,
|
||||
},
|
||||
static struct clk clk_lcd = {
|
||||
.name = "lcd",
|
||||
.parent = &clk_h,
|
||||
.enable = s3c2410_clkcon_enable,
|
||||
.ctrlbit = S3C2410_CLKCON_LCDC,
|
||||
};
|
||||
|
||||
static struct clk clk_gpio = {
|
||||
.name = "gpio",
|
||||
.parent = &clk_p,
|
||||
.enable = s3c2410_clkcon_enable,
|
||||
.ctrlbit = S3C2410_CLKCON_GPIO,
|
||||
};
|
||||
|
||||
static struct clk clk_usb_host = {
|
||||
.name = "usb-host",
|
||||
.parent = &clk_h,
|
||||
.enable = s3c2410_clkcon_enable,
|
||||
.ctrlbit = S3C2410_CLKCON_USBH,
|
||||
};
|
||||
|
||||
static struct clk clk_usb_device = {
|
||||
.name = "usb-device",
|
||||
.parent = &clk_h,
|
||||
.enable = s3c2410_clkcon_enable,
|
||||
.ctrlbit = S3C2410_CLKCON_USBD,
|
||||
};
|
||||
|
||||
static struct clk clk_timers = {
|
||||
.name = "timers",
|
||||
.parent = &clk_p,
|
||||
.enable = s3c2410_clkcon_enable,
|
||||
.ctrlbit = S3C2410_CLKCON_PWMT,
|
||||
};
|
||||
|
||||
struct clk s3c24xx_clk_uart0 = {
|
||||
.name = "uart",
|
||||
.devname = "s3c2410-uart.0",
|
||||
.parent = &clk_p,
|
||||
.enable = s3c2410_clkcon_enable,
|
||||
.ctrlbit = S3C2410_CLKCON_UART0,
|
||||
};
|
||||
|
||||
struct clk s3c24xx_clk_uart1 = {
|
||||
.name = "uart",
|
||||
.devname = "s3c2410-uart.1",
|
||||
.parent = &clk_p,
|
||||
.enable = s3c2410_clkcon_enable,
|
||||
.ctrlbit = S3C2410_CLKCON_UART1,
|
||||
};
|
||||
|
||||
struct clk s3c24xx_clk_uart2 = {
|
||||
.name = "uart",
|
||||
.devname = "s3c2410-uart.2",
|
||||
.parent = &clk_p,
|
||||
.enable = s3c2410_clkcon_enable,
|
||||
.ctrlbit = S3C2410_CLKCON_UART2,
|
||||
};
|
||||
|
||||
static struct clk clk_rtc = {
|
||||
.name = "rtc",
|
||||
.parent = &clk_p,
|
||||
.enable = s3c2410_clkcon_enable,
|
||||
.ctrlbit = S3C2410_CLKCON_RTC,
|
||||
};
|
||||
|
||||
static struct clk clk_watchdog = {
|
||||
.name = "watchdog",
|
||||
.parent = &clk_p,
|
||||
.ctrlbit = 0,
|
||||
};
|
||||
|
||||
static struct clk clk_usb_bus_host = {
|
||||
.name = "usb-bus-host",
|
||||
.parent = &clk_usb_bus,
|
||||
};
|
||||
|
||||
static struct clk clk_usb_bus_gadget = {
|
||||
.name = "usb-bus-gadget",
|
||||
.parent = &clk_usb_bus,
|
||||
};
|
||||
|
||||
static struct clk *init_clocks[] = {
|
||||
&clk_lcd,
|
||||
&clk_gpio,
|
||||
&clk_usb_host,
|
||||
&clk_usb_device,
|
||||
&clk_timers,
|
||||
&s3c24xx_clk_uart0,
|
||||
&s3c24xx_clk_uart1,
|
||||
&s3c24xx_clk_uart2,
|
||||
&clk_rtc,
|
||||
&clk_watchdog,
|
||||
&clk_usb_bus_host,
|
||||
&clk_usb_bus_gadget,
|
||||
};
|
||||
|
||||
/* s3c2410_baseclk_add()
|
||||
|
@ -195,7 +230,6 @@ int __init s3c2410_baseclk_add(void)
|
|||
{
|
||||
unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW);
|
||||
unsigned long clkcon = __raw_readl(S3C2410_CLKCON);
|
||||
struct clk *clkp;
|
||||
struct clk *xtal;
|
||||
int ret;
|
||||
int ptr;
|
||||
|
@ -207,8 +241,9 @@ int __init s3c2410_baseclk_add(void)
|
|||
|
||||
/* register clocks from clock array */
|
||||
|
||||
clkp = init_clocks;
|
||||
for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++, clkp++) {
|
||||
for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++) {
|
||||
struct clk *clkp = init_clocks[ptr];
|
||||
|
||||
/* ensure that we note the clock state */
|
||||
|
||||
clkp->usage = clkcon & clkp->ctrlbit ? 1 : 0;
|
||||
|
|
|
@ -166,6 +166,9 @@ static struct clk_lookup s3c2440_clk_lookup[] = {
|
|||
CLKDEV_INIT(NULL, "clk_uart_baud1", &s3c24xx_uclk),
|
||||
CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p),
|
||||
CLKDEV_INIT(NULL, "clk_uart_baud3", &s3c2440_clk_fclk_n),
|
||||
CLKDEV_INIT("s3c2440-uart.0", "uart", &s3c24xx_clk_uart0),
|
||||
CLKDEV_INIT("s3c2440-uart.1", "uart", &s3c24xx_clk_uart1),
|
||||
CLKDEV_INIT("s3c2440-uart.2", "uart", &s3c24xx_clk_uart2),
|
||||
CLKDEV_INIT("s3c2440-camif", "camera", &s3c2440_clk_cam_upll),
|
||||
};
|
||||
|
||||
|
|
|
@ -11,8 +11,9 @@ menuconfig ARCH_STI
|
|||
select HAVE_SMP
|
||||
select HAVE_ARM_SCU if SMP
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
select ARM_ERRATA_720789
|
||||
select ARM_ERRATA_754322
|
||||
select ARM_ERRATA_764369
|
||||
select ARM_ERRATA_775420
|
||||
select PL310_ERRATA_753970 if CACHE_PL310
|
||||
select PL310_ERRATA_769419 if CACHE_PL310
|
||||
help
|
||||
|
|
|
@ -91,7 +91,7 @@ static void __init zynq_map_io(void)
|
|||
zynq_scu_map_io();
|
||||
}
|
||||
|
||||
static void zynq_system_reset(char mode, const char *cmd)
|
||||
static void zynq_system_reset(enum reboot_mode mode, const char *cmd)
|
||||
{
|
||||
zynq_slcr_system_reset();
|
||||
}
|
||||
|
|
|
@ -29,6 +29,13 @@ config PLAT_S5P
|
|||
help
|
||||
Base platform code for Samsung's S5P series SoC.
|
||||
|
||||
config SAMSUNG_PM
|
||||
bool
|
||||
depends on PM && (PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5P64X0 || S5P_PM)
|
||||
default y
|
||||
help
|
||||
Base platform power management code for samsung code
|
||||
|
||||
if PLAT_SAMSUNG
|
||||
|
||||
# boot configurations
|
||||
|
|
|
@ -51,7 +51,7 @@ obj-$(CONFIG_SAMSUNG_DMADEV) += dma-ops.o
|
|||
|
||||
# PM support
|
||||
|
||||
obj-$(CONFIG_PM) += pm.o
|
||||
obj-$(CONFIG_SAMSUNG_PM) += pm.o
|
||||
obj-$(CONFIG_SAMSUNG_PM_GPIO) += pm-gpio.o
|
||||
obj-$(CONFIG_SAMSUNG_PM_CHECK) += pm-check.o
|
||||
|
||||
|
|
|
@ -83,6 +83,11 @@ extern struct clk clk_ext;
|
|||
extern struct clksrc_clk clk_epllref;
|
||||
extern struct clksrc_clk clk_esysclk;
|
||||
|
||||
/* S3C24XX UART clocks */
|
||||
extern struct clk s3c24xx_clk_uart0;
|
||||
extern struct clk s3c24xx_clk_uart1;
|
||||
extern struct clk s3c24xx_clk_uart2;
|
||||
|
||||
/* S3C64XX specific clocks */
|
||||
extern struct clk clk_h2;
|
||||
extern struct clk clk_27m;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
struct device;
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
#ifdef CONFIG_SAMSUNG_PM
|
||||
|
||||
extern __init int s3c_pm_init(void);
|
||||
extern __init int s3c64xx_pm_init(void);
|
||||
|
@ -58,8 +58,6 @@ extern unsigned char pm_uart_udivslot; /* true to save UART UDIVSLOT */
|
|||
|
||||
/* from sleep.S */
|
||||
|
||||
extern void s3c_cpu_resume(void);
|
||||
|
||||
extern int s3c2410_cpu_suspend(unsigned long);
|
||||
|
||||
/* sleep save info */
|
||||
|
@ -106,12 +104,14 @@ extern void s3c_pm_do_save(struct sleep_save *ptr, int count);
|
|||
extern void s3c_pm_do_restore(struct sleep_save *ptr, int count);
|
||||
extern void s3c_pm_do_restore_core(struct sleep_save *ptr, int count);
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
#ifdef CONFIG_SAMSUNG_PM
|
||||
extern int s3c_irq_wake(struct irq_data *data, unsigned int state);
|
||||
extern int s3c_irqext_wake(struct irq_data *data, unsigned int state);
|
||||
extern void s3c_cpu_resume(void);
|
||||
#else
|
||||
#define s3c_irq_wake NULL
|
||||
#define s3c_irqext_wake NULL
|
||||
#define s3c_cpu_resume NULL
|
||||
#endif
|
||||
|
||||
/* PM debug functions */
|
||||
|
|
|
@ -80,7 +80,7 @@ unsigned char pm_uart_udivslot;
|
|||
|
||||
#ifdef CONFIG_SAMSUNG_PM_DEBUG
|
||||
|
||||
static struct pm_uart_save uart_save[CONFIG_SERIAL_SAMSUNG_UARTS];
|
||||
static struct pm_uart_save uart_save;
|
||||
|
||||
static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save)
|
||||
{
|
||||
|
@ -101,11 +101,7 @@ static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save)
|
|||
|
||||
static void s3c_pm_save_uarts(void)
|
||||
{
|
||||
struct pm_uart_save *save = uart_save;
|
||||
unsigned int uart;
|
||||
|
||||
for (uart = 0; uart < CONFIG_SERIAL_SAMSUNG_UARTS; uart++, save++)
|
||||
s3c_pm_save_uart(uart, save);
|
||||
s3c_pm_save_uart(CONFIG_DEBUG_S3C_UART, &uart_save);
|
||||
}
|
||||
|
||||
static void s3c_pm_restore_uart(unsigned int uart, struct pm_uart_save *save)
|
||||
|
@ -126,11 +122,7 @@ static void s3c_pm_restore_uart(unsigned int uart, struct pm_uart_save *save)
|
|||
|
||||
static void s3c_pm_restore_uarts(void)
|
||||
{
|
||||
struct pm_uart_save *save = uart_save;
|
||||
unsigned int uart;
|
||||
|
||||
for (uart = 0; uart < CONFIG_SERIAL_SAMSUNG_UARTS; uart++, save++)
|
||||
s3c_pm_restore_uart(uart, save);
|
||||
s3c_pm_restore_uart(CONFIG_DEBUG_S3C_UART, &uart_save);
|
||||
}
|
||||
#else
|
||||
static void s3c_pm_save_uarts(void) { }
|
||||
|
|
|
@ -24,10 +24,10 @@
|
|||
#include <linux/compiler.h>
|
||||
|
||||
#ifndef CONFIG_ARM64_64K_PAGES
|
||||
#define THREAD_SIZE_ORDER 1
|
||||
#define THREAD_SIZE_ORDER 2
|
||||
#endif
|
||||
|
||||
#define THREAD_SIZE 8192
|
||||
#define THREAD_SIZE 16384
|
||||
#define THREAD_START_SP (THREAD_SIZE - 16)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#define BOOT_CPU_MODE_EL2 (0x0e12b007)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#include <asm/cacheflush.h>
|
||||
|
||||
/*
|
||||
* __boot_cpu_mode records what mode CPUs were booted in.
|
||||
|
@ -36,9 +37,20 @@ extern u32 __boot_cpu_mode[2];
|
|||
void __hyp_set_vectors(phys_addr_t phys_vector_base);
|
||||
phys_addr_t __hyp_get_vectors(void);
|
||||
|
||||
static inline void sync_boot_mode(void)
|
||||
{
|
||||
/*
|
||||
* As secondaries write to __boot_cpu_mode with caches disabled, we
|
||||
* must flush the corresponding cache entries to ensure the visibility
|
||||
* of their writes.
|
||||
*/
|
||||
__flush_dcache_area(__boot_cpu_mode, sizeof(__boot_cpu_mode));
|
||||
}
|
||||
|
||||
/* Reports the availability of HYP mode */
|
||||
static inline bool is_hyp_mode_available(void)
|
||||
{
|
||||
sync_boot_mode();
|
||||
return (__boot_cpu_mode[0] == BOOT_CPU_MODE_EL2 &&
|
||||
__boot_cpu_mode[1] == BOOT_CPU_MODE_EL2);
|
||||
}
|
||||
|
@ -46,6 +58,7 @@ static inline bool is_hyp_mode_available(void)
|
|||
/* Check if the bootloader has booted CPUs in different modes */
|
||||
static inline bool is_hyp_mode_mismatched(void)
|
||||
{
|
||||
sync_boot_mode();
|
||||
return __boot_cpu_mode[0] != __boot_cpu_mode[1];
|
||||
}
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
|
||||
.macro get_thread_info, rd
|
||||
mov \rd, sp
|
||||
and \rd, \rd, #~((1 << 13) - 1) // top of 8K stack
|
||||
and \rd, \rd, #~(THREAD_SIZE - 1) // top of stack
|
||||
.endm
|
||||
|
||||
/*
|
||||
|
|
|
@ -81,7 +81,7 @@ void soft_restart(unsigned long addr)
|
|||
void (*pm_power_off)(void);
|
||||
EXPORT_SYMBOL_GPL(pm_power_off);
|
||||
|
||||
void (*arm_pm_restart)(char str, const char *cmd);
|
||||
void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
|
||||
EXPORT_SYMBOL_GPL(arm_pm_restart);
|
||||
|
||||
void arch_cpu_idle_prepare(void)
|
||||
|
|
|
@ -55,6 +55,8 @@ struct device_node;
|
|||
#define EEH_PE_RECOVERING (1 << 1) /* Recovering PE */
|
||||
#define EEH_PE_PHB_DEAD (1 << 2) /* Dead PHB */
|
||||
|
||||
#define EEH_PE_KEEP (1 << 8) /* Keep PE on hotplug */
|
||||
|
||||
struct eeh_pe {
|
||||
int type; /* PE type: PHB/Bus/Device */
|
||||
int state; /* PE EEH dependent mode */
|
||||
|
@ -72,8 +74,8 @@ struct eeh_pe {
|
|||
struct list_head child; /* Child PEs */
|
||||
};
|
||||
|
||||
#define eeh_pe_for_each_dev(pe, edev) \
|
||||
list_for_each_entry(edev, &pe->edevs, list)
|
||||
#define eeh_pe_for_each_dev(pe, edev, tmp) \
|
||||
list_for_each_entry_safe(edev, tmp, &pe->edevs, list)
|
||||
|
||||
/*
|
||||
* The struct is used to trace EEH state for the associated
|
||||
|
@ -82,7 +84,13 @@ struct eeh_pe {
|
|||
* another tree except the currently existing tree of PCI
|
||||
* buses and PCI devices
|
||||
*/
|
||||
#define EEH_DEV_IRQ_DISABLED (1<<0) /* Interrupt disabled */
|
||||
#define EEH_DEV_BRIDGE (1 << 0) /* PCI bridge */
|
||||
#define EEH_DEV_ROOT_PORT (1 << 1) /* PCIe root port */
|
||||
#define EEH_DEV_DS_PORT (1 << 2) /* Downstream port */
|
||||
#define EEH_DEV_IRQ_DISABLED (1 << 3) /* Interrupt disabled */
|
||||
#define EEH_DEV_DISCONNECTED (1 << 4) /* Removing from PE */
|
||||
|
||||
#define EEH_DEV_SYSFS (1 << 8) /* Sysfs created */
|
||||
|
||||
struct eeh_dev {
|
||||
int mode; /* EEH mode */
|
||||
|
@ -90,11 +98,13 @@ struct eeh_dev {
|
|||
int config_addr; /* Config address */
|
||||
int pe_config_addr; /* PE config address */
|
||||
u32 config_space[16]; /* Saved PCI config space */
|
||||
u8 pcie_cap; /* Saved PCIe capability */
|
||||
struct eeh_pe *pe; /* Associated PE */
|
||||
struct list_head list; /* Form link list in the PE */
|
||||
struct pci_controller *phb; /* Associated PHB */
|
||||
struct device_node *dn; /* Associated device node */
|
||||
struct pci_dev *pdev; /* Associated PCI device */
|
||||
struct pci_bus *bus; /* PCI bus for partial hotplug */
|
||||
};
|
||||
|
||||
static inline struct device_node *eeh_dev_to_of_node(struct eeh_dev *edev)
|
||||
|
@ -193,8 +203,10 @@ int eeh_phb_pe_create(struct pci_controller *phb);
|
|||
struct eeh_pe *eeh_phb_pe_get(struct pci_controller *phb);
|
||||
struct eeh_pe *eeh_pe_get(struct eeh_dev *edev);
|
||||
int eeh_add_to_parent_pe(struct eeh_dev *edev);
|
||||
int eeh_rmv_from_parent_pe(struct eeh_dev *edev, int purge_pe);
|
||||
int eeh_rmv_from_parent_pe(struct eeh_dev *edev);
|
||||
void eeh_pe_update_time_stamp(struct eeh_pe *pe);
|
||||
void *eeh_pe_traverse(struct eeh_pe *root,
|
||||
eeh_traverse_func fn, void *flag);
|
||||
void *eeh_pe_dev_traverse(struct eeh_pe *root,
|
||||
eeh_traverse_func fn, void *flag);
|
||||
void eeh_pe_restore_bars(struct eeh_pe *pe);
|
||||
|
@ -209,10 +221,12 @@ unsigned long eeh_check_failure(const volatile void __iomem *token,
|
|||
unsigned long val);
|
||||
int eeh_dev_check_failure(struct eeh_dev *edev);
|
||||
void eeh_addr_cache_build(void);
|
||||
void eeh_add_device_early(struct device_node *);
|
||||
void eeh_add_device_tree_early(struct device_node *);
|
||||
void eeh_add_device_late(struct pci_dev *);
|
||||
void eeh_add_device_tree_late(struct pci_bus *);
|
||||
void eeh_add_sysfs_files(struct pci_bus *);
|
||||
void eeh_remove_bus_device(struct pci_dev *, int);
|
||||
void eeh_remove_device(struct pci_dev *);
|
||||
|
||||
/**
|
||||
* EEH_POSSIBLE_ERROR() -- test for possible MMIO failure.
|
||||
|
@ -252,13 +266,17 @@ static inline unsigned long eeh_check_failure(const volatile void __iomem *token
|
|||
|
||||
static inline void eeh_addr_cache_build(void) { }
|
||||
|
||||
static inline void eeh_add_device_early(struct device_node *dn) { }
|
||||
|
||||
static inline void eeh_add_device_tree_early(struct device_node *dn) { }
|
||||
|
||||
static inline void eeh_add_device_late(struct pci_dev *dev) { }
|
||||
|
||||
static inline void eeh_add_device_tree_late(struct pci_bus *bus) { }
|
||||
|
||||
static inline void eeh_add_sysfs_files(struct pci_bus *bus) { }
|
||||
|
||||
static inline void eeh_remove_bus_device(struct pci_dev *dev, int purge_pe) { }
|
||||
static inline void eeh_remove_device(struct pci_dev *dev) { }
|
||||
|
||||
#define EEH_POSSIBLE_ERROR(val, type) (0)
|
||||
#define EEH_IO_ERROR_VALUE(size) (-1UL)
|
||||
|
|
|
@ -96,10 +96,11 @@ static inline bool arch_irqs_disabled(void)
|
|||
#endif
|
||||
|
||||
#define hard_irq_disable() do { \
|
||||
u8 _was_enabled = get_paca()->soft_enabled; \
|
||||
u8 _was_enabled; \
|
||||
__hard_irq_disable(); \
|
||||
get_paca()->soft_enabled = 0; \
|
||||
get_paca()->irq_happened |= PACA_IRQ_HARD_DIS; \
|
||||
_was_enabled = local_paca->soft_enabled; \
|
||||
local_paca->soft_enabled = 0; \
|
||||
local_paca->irq_happened |= PACA_IRQ_HARD_DIS; \
|
||||
if (_was_enabled) \
|
||||
trace_hardirqs_off(); \
|
||||
} while(0)
|
||||
|
|
|
@ -82,10 +82,9 @@ struct exception_table_entry;
|
|||
void sort_ex_table(struct exception_table_entry *start,
|
||||
struct exception_table_entry *finish);
|
||||
|
||||
#ifdef CONFIG_MODVERSIONS
|
||||
#if defined(CONFIG_MODVERSIONS) && defined(CONFIG_PPC64)
|
||||
#define ARCH_RELOCATES_KCRCTAB
|
||||
|
||||
extern const unsigned long reloc_start[];
|
||||
#define reloc_start PHYSICAL_START
|
||||
#endif
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _ASM_POWERPC_MODULE_H */
|
||||
|
|
|
@ -209,7 +209,6 @@ static inline struct eeh_dev *of_node_to_eeh_dev(struct device_node *dn)
|
|||
extern struct pci_bus *pcibios_find_pci_bus(struct device_node *dn);
|
||||
|
||||
/** Remove all of the PCI devices under this bus */
|
||||
extern void __pcibios_remove_pci_devices(struct pci_bus *bus, int purge_pe);
|
||||
extern void pcibios_remove_pci_devices(struct pci_bus *bus);
|
||||
|
||||
/** Discover new pci devices under this bus, and add them */
|
||||
|
|
|
@ -1088,7 +1088,8 @@
|
|||
#define PVR_970MP 0x0044
|
||||
#define PVR_970GX 0x0045
|
||||
#define PVR_POWER7p 0x004A
|
||||
#define PVR_POWER8 0x004B
|
||||
#define PVR_POWER8E 0x004B
|
||||
#define PVR_POWER8 0x004D
|
||||
#define PVR_BE 0x0070
|
||||
#define PVR_PA6T 0x0090
|
||||
|
||||
|
|
|
@ -494,9 +494,27 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
|||
.cpu_restore = __restore_cpu_power7,
|
||||
.platform = "power7+",
|
||||
},
|
||||
{ /* Power8 */
|
||||
{ /* Power8E */
|
||||
.pvr_mask = 0xffff0000,
|
||||
.pvr_value = 0x004b0000,
|
||||
.cpu_name = "POWER8E (raw)",
|
||||
.cpu_features = CPU_FTRS_POWER8,
|
||||
.cpu_user_features = COMMON_USER_POWER8,
|
||||
.cpu_user_features2 = COMMON_USER2_POWER8,
|
||||
.mmu_features = MMU_FTRS_POWER8,
|
||||
.icache_bsize = 128,
|
||||
.dcache_bsize = 128,
|
||||
.num_pmcs = 6,
|
||||
.pmc_type = PPC_PMC_IBM,
|
||||
.oprofile_cpu_type = "ppc64/power8",
|
||||
.oprofile_type = PPC_OPROFILE_INVALID,
|
||||
.cpu_setup = __setup_cpu_power8,
|
||||
.cpu_restore = __restore_cpu_power8,
|
||||
.platform = "power8",
|
||||
},
|
||||
{ /* Power8 */
|
||||
.pvr_mask = 0xffff0000,
|
||||
.pvr_value = 0x004d0000,
|
||||
.cpu_name = "POWER8 (raw)",
|
||||
.cpu_features = CPU_FTRS_POWER8,
|
||||
.cpu_user_features = COMMON_USER_POWER8,
|
||||
|
|
|
@ -231,7 +231,7 @@ static size_t eeh_gather_pci_data(struct eeh_dev *edev, char * buf, size_t len)
|
|||
void eeh_slot_error_detail(struct eeh_pe *pe, int severity)
|
||||
{
|
||||
size_t loglen = 0;
|
||||
struct eeh_dev *edev;
|
||||
struct eeh_dev *edev, *tmp;
|
||||
bool valid_cfg_log = true;
|
||||
|
||||
/*
|
||||
|
@ -251,7 +251,7 @@ void eeh_slot_error_detail(struct eeh_pe *pe, int severity)
|
|||
eeh_pe_restore_bars(pe);
|
||||
|
||||
pci_regs_buf[0] = 0;
|
||||
eeh_pe_for_each_dev(pe, edev) {
|
||||
eeh_pe_for_each_dev(pe, edev, tmp) {
|
||||
loglen += eeh_gather_pci_data(edev, pci_regs_buf + loglen,
|
||||
EEH_PCI_REGS_LOG_LEN - loglen);
|
||||
}
|
||||
|
@ -499,8 +499,6 @@ unsigned long eeh_check_failure(const volatile void __iomem *token, unsigned lon
|
|||
}
|
||||
|
||||
eeh_dev_check_failure(edev);
|
||||
|
||||
pci_dev_put(eeh_dev_to_pci_dev(edev));
|
||||
return val;
|
||||
}
|
||||
|
||||
|
@ -838,7 +836,7 @@ core_initcall_sync(eeh_init);
|
|||
* on the CEC architecture, type of the device, on earlier boot
|
||||
* command-line arguments & etc.
|
||||
*/
|
||||
static void eeh_add_device_early(struct device_node *dn)
|
||||
void eeh_add_device_early(struct device_node *dn)
|
||||
{
|
||||
struct pci_controller *phb;
|
||||
|
||||
|
@ -886,7 +884,7 @@ EXPORT_SYMBOL_GPL(eeh_add_device_tree_early);
|
|||
* This routine must be used to complete EEH initialization for PCI
|
||||
* devices that were added after system boot (e.g. hotplug, dlpar).
|
||||
*/
|
||||
static void eeh_add_device_late(struct pci_dev *dev)
|
||||
void eeh_add_device_late(struct pci_dev *dev)
|
||||
{
|
||||
struct device_node *dn;
|
||||
struct eeh_dev *edev;
|
||||
|
@ -902,9 +900,23 @@ static void eeh_add_device_late(struct pci_dev *dev)
|
|||
pr_debug("EEH: Already referenced !\n");
|
||||
return;
|
||||
}
|
||||
WARN_ON(edev->pdev);
|
||||
|
||||
pci_dev_get(dev);
|
||||
/*
|
||||
* The EEH cache might not be removed correctly because of
|
||||
* unbalanced kref to the device during unplug time, which
|
||||
* relies on pcibios_release_device(). So we have to remove
|
||||
* that here explicitly.
|
||||
*/
|
||||
if (edev->pdev) {
|
||||
eeh_rmv_from_parent_pe(edev);
|
||||
eeh_addr_cache_rmv_dev(edev->pdev);
|
||||
eeh_sysfs_remove_device(edev->pdev);
|
||||
edev->mode &= ~EEH_DEV_SYSFS;
|
||||
|
||||
edev->pdev = NULL;
|
||||
dev->dev.archdata.edev = NULL;
|
||||
}
|
||||
|
||||
edev->pdev = dev;
|
||||
dev->dev.archdata.edev = edev;
|
||||
|
||||
|
@ -967,7 +979,6 @@ EXPORT_SYMBOL_GPL(eeh_add_sysfs_files);
|
|||
/**
|
||||
* eeh_remove_device - Undo EEH setup for the indicated pci device
|
||||
* @dev: pci device to be removed
|
||||
* @purge_pe: remove the PE or not
|
||||
*
|
||||
* This routine should be called when a device is removed from
|
||||
* a running system (e.g. by hotplug or dlpar). It unregisters
|
||||
|
@ -975,7 +986,7 @@ EXPORT_SYMBOL_GPL(eeh_add_sysfs_files);
|
|||
* this device will no longer be detected after this call; thus,
|
||||
* i/o errors affecting this slot may leave this device unusable.
|
||||
*/
|
||||
static void eeh_remove_device(struct pci_dev *dev, int purge_pe)
|
||||
void eeh_remove_device(struct pci_dev *dev)
|
||||
{
|
||||
struct eeh_dev *edev;
|
||||
|
||||
|
@ -986,42 +997,29 @@ static void eeh_remove_device(struct pci_dev *dev, int purge_pe)
|
|||
/* Unregister the device with the EEH/PCI address search system */
|
||||
pr_debug("EEH: Removing device %s\n", pci_name(dev));
|
||||
|
||||
if (!edev || !edev->pdev) {
|
||||
if (!edev || !edev->pdev || !edev->pe) {
|
||||
pr_debug("EEH: Not referenced !\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* During the hotplug for EEH error recovery, we need the EEH
|
||||
* device attached to the parent PE in order for BAR restore
|
||||
* a bit later. So we keep it for BAR restore and remove it
|
||||
* from the parent PE during the BAR resotre.
|
||||
*/
|
||||
edev->pdev = NULL;
|
||||
dev->dev.archdata.edev = NULL;
|
||||
pci_dev_put(dev);
|
||||
if (!(edev->pe->state & EEH_PE_KEEP))
|
||||
eeh_rmv_from_parent_pe(edev);
|
||||
else
|
||||
edev->mode |= EEH_DEV_DISCONNECTED;
|
||||
|
||||
eeh_rmv_from_parent_pe(edev, purge_pe);
|
||||
eeh_addr_cache_rmv_dev(dev);
|
||||
eeh_sysfs_remove_device(dev);
|
||||
edev->mode &= ~EEH_DEV_SYSFS;
|
||||
}
|
||||
|
||||
/**
|
||||
* eeh_remove_bus_device - Undo EEH setup for the indicated PCI device
|
||||
* @dev: PCI device
|
||||
* @purge_pe: remove the corresponding PE or not
|
||||
*
|
||||
* This routine must be called when a device is removed from the
|
||||
* running system through hotplug or dlpar. The corresponding
|
||||
* PCI address cache will be removed.
|
||||
*/
|
||||
void eeh_remove_bus_device(struct pci_dev *dev, int purge_pe)
|
||||
{
|
||||
struct pci_bus *bus = dev->subordinate;
|
||||
struct pci_dev *child, *tmp;
|
||||
|
||||
eeh_remove_device(dev, purge_pe);
|
||||
|
||||
if (bus && dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
|
||||
list_for_each_entry_safe(child, tmp, &bus->devices, bus_list)
|
||||
eeh_remove_bus_device(child, purge_pe);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(eeh_remove_bus_device);
|
||||
|
||||
static int proc_eeh_show(struct seq_file *m, void *v)
|
||||
{
|
||||
if (0 == eeh_subsystem_enabled) {
|
||||
|
|
|
@ -68,16 +68,12 @@ static inline struct eeh_dev *__eeh_addr_cache_get_device(unsigned long addr)
|
|||
struct pci_io_addr_range *piar;
|
||||
piar = rb_entry(n, struct pci_io_addr_range, rb_node);
|
||||
|
||||
if (addr < piar->addr_lo) {
|
||||
if (addr < piar->addr_lo)
|
||||
n = n->rb_left;
|
||||
} else {
|
||||
if (addr > piar->addr_hi) {
|
||||
n = n->rb_right;
|
||||
} else {
|
||||
pci_dev_get(piar->pcidev);
|
||||
return piar->edev;
|
||||
}
|
||||
}
|
||||
else if (addr > piar->addr_hi)
|
||||
n = n->rb_right;
|
||||
else
|
||||
return piar->edev;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
@ -156,7 +152,6 @@ eeh_addr_cache_insert(struct pci_dev *dev, unsigned long alo,
|
|||
if (!piar)
|
||||
return NULL;
|
||||
|
||||
pci_dev_get(dev);
|
||||
piar->addr_lo = alo;
|
||||
piar->addr_hi = ahi;
|
||||
piar->edev = pci_dev_to_eeh_dev(dev);
|
||||
|
@ -250,7 +245,6 @@ restart:
|
|||
|
||||
if (piar->pcidev == dev) {
|
||||
rb_erase(n, &pci_io_addr_cache_root.rb_root);
|
||||
pci_dev_put(piar->pcidev);
|
||||
kfree(piar);
|
||||
goto restart;
|
||||
}
|
||||
|
@ -302,12 +296,10 @@ void eeh_addr_cache_build(void)
|
|||
if (!edev)
|
||||
continue;
|
||||
|
||||
pci_dev_get(dev); /* matching put is in eeh_remove_device() */
|
||||
dev->dev.archdata.edev = edev;
|
||||
edev->pdev = dev;
|
||||
|
||||
eeh_addr_cache_insert_dev(dev);
|
||||
|
||||
eeh_sysfs_add_device(dev);
|
||||
}
|
||||
|
||||
|
|
|
@ -143,10 +143,14 @@ static void eeh_disable_irq(struct pci_dev *dev)
|
|||
static void eeh_enable_irq(struct pci_dev *dev)
|
||||
{
|
||||
struct eeh_dev *edev = pci_dev_to_eeh_dev(dev);
|
||||
struct irq_desc *desc;
|
||||
|
||||
if ((edev->mode) & EEH_DEV_IRQ_DISABLED) {
|
||||
edev->mode &= ~EEH_DEV_IRQ_DISABLED;
|
||||
enable_irq(dev->irq);
|
||||
|
||||
desc = irq_to_desc(dev->irq);
|
||||
if (desc && desc->depth > 0)
|
||||
enable_irq(dev->irq);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -338,6 +342,54 @@ static void *eeh_report_failure(void *data, void *userdata)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static void *eeh_rmv_device(void *data, void *userdata)
|
||||
{
|
||||
struct pci_driver *driver;
|
||||
struct eeh_dev *edev = (struct eeh_dev *)data;
|
||||
struct pci_dev *dev = eeh_dev_to_pci_dev(edev);
|
||||
int *removed = (int *)userdata;
|
||||
|
||||
/*
|
||||
* Actually, we should remove the PCI bridges as well.
|
||||
* However, that's lots of complexity to do that,
|
||||
* particularly some of devices under the bridge might
|
||||
* support EEH. So we just care about PCI devices for
|
||||
* simplicity here.
|
||||
*/
|
||||
if (!dev || (dev->hdr_type & PCI_HEADER_TYPE_BRIDGE))
|
||||
return NULL;
|
||||
driver = eeh_pcid_get(dev);
|
||||
if (driver && driver->err_handler)
|
||||
return NULL;
|
||||
|
||||
/* Remove it from PCI subsystem */
|
||||
pr_debug("EEH: Removing %s without EEH sensitive driver\n",
|
||||
pci_name(dev));
|
||||
edev->bus = dev->bus;
|
||||
edev->mode |= EEH_DEV_DISCONNECTED;
|
||||
(*removed)++;
|
||||
|
||||
pci_stop_and_remove_bus_device(dev);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void *eeh_pe_detach_dev(void *data, void *userdata)
|
||||
{
|
||||
struct eeh_pe *pe = (struct eeh_pe *)data;
|
||||
struct eeh_dev *edev, *tmp;
|
||||
|
||||
eeh_pe_for_each_dev(pe, edev, tmp) {
|
||||
if (!(edev->mode & EEH_DEV_DISCONNECTED))
|
||||
continue;
|
||||
|
||||
edev->mode &= ~(EEH_DEV_DISCONNECTED | EEH_DEV_IRQ_DISABLED);
|
||||
eeh_rmv_from_parent_pe(edev);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* eeh_reset_device - Perform actual reset of a pci slot
|
||||
* @pe: EEH PE
|
||||
|
@ -349,8 +401,9 @@ static void *eeh_report_failure(void *data, void *userdata)
|
|||
*/
|
||||
static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus)
|
||||
{
|
||||
struct pci_bus *frozen_bus = eeh_pe_bus_get(pe);
|
||||
struct timeval tstamp;
|
||||
int cnt, rc;
|
||||
int cnt, rc, removed = 0;
|
||||
|
||||
/* pcibios will clear the counter; save the value */
|
||||
cnt = pe->freeze_count;
|
||||
|
@ -362,8 +415,11 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus)
|
|||
* devices are expected to be attached soon when calling
|
||||
* into pcibios_add_pci_devices().
|
||||
*/
|
||||
eeh_pe_state_mark(pe, EEH_PE_KEEP);
|
||||
if (bus)
|
||||
__pcibios_remove_pci_devices(bus, 0);
|
||||
pcibios_remove_pci_devices(bus);
|
||||
else if (frozen_bus)
|
||||
eeh_pe_dev_traverse(pe, eeh_rmv_device, &removed);
|
||||
|
||||
/* Reset the pci controller. (Asserts RST#; resets config space).
|
||||
* Reconfigure bridges and devices. Don't try to bring the system
|
||||
|
@ -384,9 +440,24 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus)
|
|||
* potentially weird things happen.
|
||||
*/
|
||||
if (bus) {
|
||||
pr_info("EEH: Sleep 5s ahead of complete hotplug\n");
|
||||
ssleep(5);
|
||||
|
||||
/*
|
||||
* The EEH device is still connected with its parent
|
||||
* PE. We should disconnect it so the binding can be
|
||||
* rebuilt when adding PCI devices.
|
||||
*/
|
||||
eeh_pe_traverse(pe, eeh_pe_detach_dev, NULL);
|
||||
pcibios_add_pci_devices(bus);
|
||||
} else if (frozen_bus && removed) {
|
||||
pr_info("EEH: Sleep 5s ahead of partial hotplug\n");
|
||||
ssleep(5);
|
||||
|
||||
eeh_pe_traverse(pe, eeh_pe_detach_dev, NULL);
|
||||
pcibios_add_pci_devices(frozen_bus);
|
||||
}
|
||||
eeh_pe_state_clear(pe, EEH_PE_KEEP);
|
||||
|
||||
pe->tstamp = tstamp;
|
||||
pe->freeze_count = cnt;
|
||||
|
|
|
@ -149,8 +149,8 @@ static struct eeh_pe *eeh_pe_next(struct eeh_pe *pe,
|
|||
* callback returns something other than NULL, or no more PEs
|
||||
* to be traversed.
|
||||
*/
|
||||
static void *eeh_pe_traverse(struct eeh_pe *root,
|
||||
eeh_traverse_func fn, void *flag)
|
||||
void *eeh_pe_traverse(struct eeh_pe *root,
|
||||
eeh_traverse_func fn, void *flag)
|
||||
{
|
||||
struct eeh_pe *pe;
|
||||
void *ret;
|
||||
|
@ -176,7 +176,7 @@ void *eeh_pe_dev_traverse(struct eeh_pe *root,
|
|||
eeh_traverse_func fn, void *flag)
|
||||
{
|
||||
struct eeh_pe *pe;
|
||||
struct eeh_dev *edev;
|
||||
struct eeh_dev *edev, *tmp;
|
||||
void *ret;
|
||||
|
||||
if (!root) {
|
||||
|
@ -186,7 +186,7 @@ void *eeh_pe_dev_traverse(struct eeh_pe *root,
|
|||
|
||||
/* Traverse root PE */
|
||||
for (pe = root; pe; pe = eeh_pe_next(pe, root)) {
|
||||
eeh_pe_for_each_dev(pe, edev) {
|
||||
eeh_pe_for_each_dev(pe, edev, tmp) {
|
||||
ret = fn(edev, flag);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
@ -333,7 +333,7 @@ int eeh_add_to_parent_pe(struct eeh_dev *edev)
|
|||
while (parent) {
|
||||
if (!(parent->type & EEH_PE_INVALID))
|
||||
break;
|
||||
parent->type &= ~EEH_PE_INVALID;
|
||||
parent->type &= ~(EEH_PE_INVALID | EEH_PE_KEEP);
|
||||
parent = parent->parent;
|
||||
}
|
||||
pr_debug("EEH: Add %s to Device PE#%x, Parent PE#%x\n",
|
||||
|
@ -397,21 +397,20 @@ int eeh_add_to_parent_pe(struct eeh_dev *edev)
|
|||
/**
|
||||
* eeh_rmv_from_parent_pe - Remove one EEH device from the associated PE
|
||||
* @edev: EEH device
|
||||
* @purge_pe: remove PE or not
|
||||
*
|
||||
* The PE hierarchy tree might be changed when doing PCI hotplug.
|
||||
* Also, the PCI devices or buses could be removed from the system
|
||||
* during EEH recovery. So we have to call the function remove the
|
||||
* corresponding PE accordingly if necessary.
|
||||
*/
|
||||
int eeh_rmv_from_parent_pe(struct eeh_dev *edev, int purge_pe)
|
||||
int eeh_rmv_from_parent_pe(struct eeh_dev *edev)
|
||||
{
|
||||
struct eeh_pe *pe, *parent, *child;
|
||||
int cnt;
|
||||
|
||||
if (!edev->pe) {
|
||||
pr_warning("%s: No PE found for EEH device %s\n",
|
||||
__func__, edev->dn->full_name);
|
||||
pr_debug("%s: No PE found for EEH device %s\n",
|
||||
__func__, edev->dn->full_name);
|
||||
return -EEXIST;
|
||||
}
|
||||
|
||||
|
@ -431,7 +430,7 @@ int eeh_rmv_from_parent_pe(struct eeh_dev *edev, int purge_pe)
|
|||
if (pe->type & EEH_PE_PHB)
|
||||
break;
|
||||
|
||||
if (purge_pe) {
|
||||
if (!(pe->state & EEH_PE_KEEP)) {
|
||||
if (list_empty(&pe->edevs) &&
|
||||
list_empty(&pe->child_list)) {
|
||||
list_del(&pe->child);
|
||||
|
@ -502,7 +501,7 @@ static void *__eeh_pe_state_mark(void *data, void *flag)
|
|||
{
|
||||
struct eeh_pe *pe = (struct eeh_pe *)data;
|
||||
int state = *((int *)flag);
|
||||
struct eeh_dev *tmp;
|
||||
struct eeh_dev *edev, *tmp;
|
||||
struct pci_dev *pdev;
|
||||
|
||||
/*
|
||||
|
@ -512,8 +511,8 @@ static void *__eeh_pe_state_mark(void *data, void *flag)
|
|||
* the PCI device driver.
|
||||
*/
|
||||
pe->state |= state;
|
||||
eeh_pe_for_each_dev(pe, tmp) {
|
||||
pdev = eeh_dev_to_pci_dev(tmp);
|
||||
eeh_pe_for_each_dev(pe, edev, tmp) {
|
||||
pdev = eeh_dev_to_pci_dev(edev);
|
||||
if (pdev)
|
||||
pdev->error_state = pci_channel_io_frozen;
|
||||
}
|
||||
|
@ -579,7 +578,7 @@ void eeh_pe_state_clear(struct eeh_pe *pe, int state)
|
|||
* blocked on normal path during the stage. So we need utilize
|
||||
* eeh operations, which is always permitted.
|
||||
*/
|
||||
static void eeh_bridge_check_link(struct pci_dev *pdev,
|
||||
static void eeh_bridge_check_link(struct eeh_dev *edev,
|
||||
struct device_node *dn)
|
||||
{
|
||||
int cap;
|
||||
|
@ -590,16 +589,17 @@ static void eeh_bridge_check_link(struct pci_dev *pdev,
|
|||
* We only check root port and downstream ports of
|
||||
* PCIe switches
|
||||
*/
|
||||
if (!pci_is_pcie(pdev) ||
|
||||
(pci_pcie_type(pdev) != PCI_EXP_TYPE_ROOT_PORT &&
|
||||
pci_pcie_type(pdev) != PCI_EXP_TYPE_DOWNSTREAM))
|
||||
if (!(edev->mode & (EEH_DEV_ROOT_PORT | EEH_DEV_DS_PORT)))
|
||||
return;
|
||||
|
||||
pr_debug("%s: Check PCIe link for %s ...\n",
|
||||
__func__, pci_name(pdev));
|
||||
pr_debug("%s: Check PCIe link for %04x:%02x:%02x.%01x ...\n",
|
||||
__func__, edev->phb->global_number,
|
||||
edev->config_addr >> 8,
|
||||
PCI_SLOT(edev->config_addr & 0xFF),
|
||||
PCI_FUNC(edev->config_addr & 0xFF));
|
||||
|
||||
/* Check slot status */
|
||||
cap = pdev->pcie_cap;
|
||||
cap = edev->pcie_cap;
|
||||
eeh_ops->read_config(dn, cap + PCI_EXP_SLTSTA, 2, &val);
|
||||
if (!(val & PCI_EXP_SLTSTA_PDS)) {
|
||||
pr_debug(" No card in the slot (0x%04x) !\n", val);
|
||||
|
@ -653,8 +653,7 @@ static void eeh_bridge_check_link(struct pci_dev *pdev,
|
|||
#define BYTE_SWAP(OFF) (8*((OFF)/4)+3-(OFF))
|
||||
#define SAVED_BYTE(OFF) (((u8 *)(edev->config_space))[BYTE_SWAP(OFF)])
|
||||
|
||||
static void eeh_restore_bridge_bars(struct pci_dev *pdev,
|
||||
struct eeh_dev *edev,
|
||||
static void eeh_restore_bridge_bars(struct eeh_dev *edev,
|
||||
struct device_node *dn)
|
||||
{
|
||||
int i;
|
||||
|
@ -680,7 +679,7 @@ static void eeh_restore_bridge_bars(struct pci_dev *pdev,
|
|||
eeh_ops->write_config(dn, PCI_COMMAND, 4, edev->config_space[1]);
|
||||
|
||||
/* Check the PCIe link is ready */
|
||||
eeh_bridge_check_link(pdev, dn);
|
||||
eeh_bridge_check_link(edev, dn);
|
||||
}
|
||||
|
||||
static void eeh_restore_device_bars(struct eeh_dev *edev,
|
||||
|
@ -729,19 +728,12 @@ static void eeh_restore_device_bars(struct eeh_dev *edev,
|
|||
*/
|
||||
static void *eeh_restore_one_device_bars(void *data, void *flag)
|
||||
{
|
||||
struct pci_dev *pdev = NULL;
|
||||
struct eeh_dev *edev = (struct eeh_dev *)data;
|
||||
struct device_node *dn = eeh_dev_to_of_node(edev);
|
||||
|
||||
/* Trace the PCI bridge */
|
||||
if (eeh_probe_mode_dev()) {
|
||||
pdev = eeh_dev_to_pci_dev(edev);
|
||||
if (pdev->hdr_type != PCI_HEADER_TYPE_BRIDGE)
|
||||
pdev = NULL;
|
||||
}
|
||||
|
||||
if (pdev)
|
||||
eeh_restore_bridge_bars(pdev, edev, dn);
|
||||
/* Do special restore for bridges */
|
||||
if (edev->mode & EEH_DEV_BRIDGE)
|
||||
eeh_restore_bridge_bars(edev, dn);
|
||||
else
|
||||
eeh_restore_device_bars(edev, dn);
|
||||
|
||||
|
|
|
@ -56,19 +56,40 @@ EEH_SHOW_ATTR(eeh_pe_config_addr, pe_config_addr, "0x%x");
|
|||
|
||||
void eeh_sysfs_add_device(struct pci_dev *pdev)
|
||||
{
|
||||
struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev);
|
||||
int rc=0;
|
||||
|
||||
if (edev && (edev->mode & EEH_DEV_SYSFS))
|
||||
return;
|
||||
|
||||
rc += device_create_file(&pdev->dev, &dev_attr_eeh_mode);
|
||||
rc += device_create_file(&pdev->dev, &dev_attr_eeh_config_addr);
|
||||
rc += device_create_file(&pdev->dev, &dev_attr_eeh_pe_config_addr);
|
||||
|
||||
if (rc)
|
||||
printk(KERN_WARNING "EEH: Unable to create sysfs entries\n");
|
||||
else if (edev)
|
||||
edev->mode |= EEH_DEV_SYSFS;
|
||||
}
|
||||
|
||||
void eeh_sysfs_remove_device(struct pci_dev *pdev)
|
||||
{
|
||||
struct eeh_dev *edev = pci_dev_to_eeh_dev(pdev);
|
||||
|
||||
/*
|
||||
* The parent directory might have been removed. We needn't
|
||||
* continue for that case.
|
||||
*/
|
||||
if (!pdev->dev.kobj.sd) {
|
||||
if (edev)
|
||||
edev->mode &= ~EEH_DEV_SYSFS;
|
||||
return;
|
||||
}
|
||||
|
||||
device_remove_file(&pdev->dev, &dev_attr_eeh_mode);
|
||||
device_remove_file(&pdev->dev, &dev_attr_eeh_config_addr);
|
||||
device_remove_file(&pdev->dev, &dev_attr_eeh_pe_config_addr);
|
||||
|
||||
if (edev)
|
||||
edev->mode &= ~EEH_DEV_SYSFS;
|
||||
}
|
||||
|
|
|
@ -1462,6 +1462,8 @@ void pcibios_finish_adding_to_bus(struct pci_bus *bus)
|
|||
/* Allocate bus and devices resources */
|
||||
pcibios_allocate_bus_resources(bus);
|
||||
pcibios_claim_one_bus(bus);
|
||||
if (!pci_has_flag(PCI_PROBE_ONLY))
|
||||
pci_assign_unassigned_bus_resources(bus);
|
||||
|
||||
/* Fixup EEH */
|
||||
eeh_add_device_tree_late(bus);
|
||||
|
|
|
@ -22,32 +22,14 @@
|
|||
#include <asm/eeh.h>
|
||||
|
||||
/**
|
||||
* __pcibios_remove_pci_devices - remove all devices under this bus
|
||||
* @bus: the indicated PCI bus
|
||||
* @purge_pe: destroy the PE on removal of PCI devices
|
||||
* pcibios_release_device - release PCI device
|
||||
* @dev: PCI device
|
||||
*
|
||||
* Remove all of the PCI devices under this bus both from the
|
||||
* linux pci device tree, and from the powerpc EEH address cache.
|
||||
* By default, the corresponding PE will be destroied during the
|
||||
* normal PCI hotplug path. For PCI hotplug during EEH recovery,
|
||||
* the corresponding PE won't be destroied and deallocated.
|
||||
* The function is called before releasing the indicated PCI device.
|
||||
*/
|
||||
void __pcibios_remove_pci_devices(struct pci_bus *bus, int purge_pe)
|
||||
void pcibios_release_device(struct pci_dev *dev)
|
||||
{
|
||||
struct pci_dev *dev, *tmp;
|
||||
struct pci_bus *child_bus;
|
||||
|
||||
/* First go down child busses */
|
||||
list_for_each_entry(child_bus, &bus->children, node)
|
||||
__pcibios_remove_pci_devices(child_bus, purge_pe);
|
||||
|
||||
pr_debug("PCI: Removing devices on bus %04x:%02x\n",
|
||||
pci_domain_nr(bus), bus->number);
|
||||
list_for_each_entry_safe(dev, tmp, &bus->devices, bus_list) {
|
||||
pr_debug(" * Removing %s...\n", pci_name(dev));
|
||||
eeh_remove_bus_device(dev, purge_pe);
|
||||
pci_stop_and_remove_bus_device(dev);
|
||||
}
|
||||
eeh_remove_device(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -59,8 +41,21 @@ void __pcibios_remove_pci_devices(struct pci_bus *bus, int purge_pe)
|
|||
*/
|
||||
void pcibios_remove_pci_devices(struct pci_bus *bus)
|
||||
{
|
||||
__pcibios_remove_pci_devices(bus, 1);
|
||||
struct pci_dev *dev, *tmp;
|
||||
struct pci_bus *child_bus;
|
||||
|
||||
/* First go down child busses */
|
||||
list_for_each_entry(child_bus, &bus->children, node)
|
||||
pcibios_remove_pci_devices(child_bus);
|
||||
|
||||
pr_debug("PCI: Removing devices on bus %04x:%02x\n",
|
||||
pci_domain_nr(bus), bus->number);
|
||||
list_for_each_entry_safe(dev, tmp, &bus->devices, bus_list) {
|
||||
pr_debug(" Removing %s...\n", pci_name(dev));
|
||||
pci_stop_and_remove_bus_device(dev);
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL_GPL(pcibios_remove_pci_devices);
|
||||
|
||||
/**
|
||||
|
@ -76,7 +71,7 @@ EXPORT_SYMBOL_GPL(pcibios_remove_pci_devices);
|
|||
*/
|
||||
void pcibios_add_pci_devices(struct pci_bus * bus)
|
||||
{
|
||||
int slotno, num, mode, pass, max;
|
||||
int slotno, mode, pass, max;
|
||||
struct pci_dev *dev;
|
||||
struct device_node *dn = pci_bus_to_OF_node(bus);
|
||||
|
||||
|
@ -90,11 +85,15 @@ void pcibios_add_pci_devices(struct pci_bus * bus)
|
|||
/* use ofdt-based probe */
|
||||
of_rescan_bus(dn, bus);
|
||||
} else if (mode == PCI_PROBE_NORMAL) {
|
||||
/* use legacy probe */
|
||||
/*
|
||||
* Use legacy probe. In the partial hotplug case, we
|
||||
* probably have grandchildren devices unplugged. So
|
||||
* we don't check the return value from pci_scan_slot() in
|
||||
* order for fully rescan all the way down to pick them up.
|
||||
* They can have been removed during partial hotplug.
|
||||
*/
|
||||
slotno = PCI_SLOT(PCI_DN(dn->child)->devfn);
|
||||
num = pci_scan_slot(bus, PCI_DEVFN(slotno, 0));
|
||||
if (!num)
|
||||
return;
|
||||
pci_scan_slot(bus, PCI_DEVFN(slotno, 0));
|
||||
pcibios_setup_bus_devices(bus);
|
||||
max = bus->busn_res.start;
|
||||
for (pass = 0; pass < 2; pass++) {
|
||||
|
|
|
@ -230,11 +230,14 @@ void of_scan_pci_bridge(struct pci_dev *dev)
|
|||
return;
|
||||
}
|
||||
|
||||
bus = pci_add_new_bus(dev->bus, dev, busrange[0]);
|
||||
bus = pci_find_bus(pci_domain_nr(dev->bus), busrange[0]);
|
||||
if (!bus) {
|
||||
printk(KERN_ERR "Failed to create pci bus for %s\n",
|
||||
node->full_name);
|
||||
return;
|
||||
bus = pci_add_new_bus(dev->bus, dev, busrange[0]);
|
||||
if (!bus) {
|
||||
printk(KERN_ERR "Failed to create pci bus for %s\n",
|
||||
node->full_name);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
bus->primary = dev->bus->number;
|
||||
|
@ -292,6 +295,38 @@ void of_scan_pci_bridge(struct pci_dev *dev)
|
|||
}
|
||||
EXPORT_SYMBOL(of_scan_pci_bridge);
|
||||
|
||||
static struct pci_dev *of_scan_pci_dev(struct pci_bus *bus,
|
||||
struct device_node *dn)
|
||||
{
|
||||
struct pci_dev *dev = NULL;
|
||||
const u32 *reg;
|
||||
int reglen, devfn;
|
||||
|
||||
pr_debug(" * %s\n", dn->full_name);
|
||||
if (!of_device_is_available(dn))
|
||||
return NULL;
|
||||
|
||||
reg = of_get_property(dn, "reg", ®len);
|
||||
if (reg == NULL || reglen < 20)
|
||||
return NULL;
|
||||
devfn = (reg[0] >> 8) & 0xff;
|
||||
|
||||
/* Check if the PCI device is already there */
|
||||
dev = pci_get_slot(bus, devfn);
|
||||
if (dev) {
|
||||
pci_dev_put(dev);
|
||||
return dev;
|
||||
}
|
||||
|
||||
/* create a new pci_dev for this device */
|
||||
dev = of_create_pci_dev(dn, bus, devfn);
|
||||
if (!dev)
|
||||
return NULL;
|
||||
|
||||
pr_debug(" dev header type: %x\n", dev->hdr_type);
|
||||
return dev;
|
||||
}
|
||||
|
||||
/**
|
||||
* __of_scan_bus - given a PCI bus node, setup bus and scan for child devices
|
||||
* @node: device tree node for the PCI bus
|
||||
|
@ -302,8 +337,6 @@ static void __of_scan_bus(struct device_node *node, struct pci_bus *bus,
|
|||
int rescan_existing)
|
||||
{
|
||||
struct device_node *child;
|
||||
const u32 *reg;
|
||||
int reglen, devfn;
|
||||
struct pci_dev *dev;
|
||||
|
||||
pr_debug("of_scan_bus(%s) bus no %d...\n",
|
||||
|
@ -311,16 +344,7 @@ static void __of_scan_bus(struct device_node *node, struct pci_bus *bus,
|
|||
|
||||
/* Scan direct children */
|
||||
for_each_child_of_node(node, child) {
|
||||
pr_debug(" * %s\n", child->full_name);
|
||||
if (!of_device_is_available(child))
|
||||
continue;
|
||||
reg = of_get_property(child, "reg", ®len);
|
||||
if (reg == NULL || reglen < 20)
|
||||
continue;
|
||||
devfn = (reg[0] >> 8) & 0xff;
|
||||
|
||||
/* create a new pci_dev for this device */
|
||||
dev = of_create_pci_dev(child, bus, devfn);
|
||||
dev = of_scan_pci_dev(bus, child);
|
||||
if (!dev)
|
||||
continue;
|
||||
pr_debug(" dev header type: %x\n", dev->hdr_type);
|
||||
|
|
|
@ -644,7 +644,8 @@ unsigned char ibm_architecture_vec[] = {
|
|||
W(0xfffe0000), W(0x003a0000), /* POWER5/POWER5+ */
|
||||
W(0xffff0000), W(0x003e0000), /* POWER6 */
|
||||
W(0xffff0000), W(0x003f0000), /* POWER7 */
|
||||
W(0xffff0000), W(0x004b0000), /* POWER8 */
|
||||
W(0xffff0000), W(0x004b0000), /* POWER8E */
|
||||
W(0xffff0000), W(0x004d0000), /* POWER8 */
|
||||
W(0xffffffff), W(0x0f000004), /* all 2.07-compliant */
|
||||
W(0xffffffff), W(0x0f000003), /* all 2.06-compliant */
|
||||
W(0xffffffff), W(0x0f000002), /* all 2.05-compliant */
|
||||
|
@ -706,7 +707,7 @@ unsigned char ibm_architecture_vec[] = {
|
|||
* must match by the macro below. Update the definition if
|
||||
* the structure layout changes.
|
||||
*/
|
||||
#define IBM_ARCH_VEC_NRCORES_OFFSET 117
|
||||
#define IBM_ARCH_VEC_NRCORES_OFFSET 125
|
||||
W(NR_CPUS), /* number of cores supported */
|
||||
0,
|
||||
0,
|
||||
|
|
|
@ -38,9 +38,6 @@ jiffies = jiffies_64 + 4;
|
|||
#endif
|
||||
SECTIONS
|
||||
{
|
||||
. = 0;
|
||||
reloc_start = .;
|
||||
|
||||
. = KERNELBASE;
|
||||
|
||||
/*
|
||||
|
|
|
@ -43,6 +43,7 @@ static inline void __tlbie(unsigned long vpn, int psize, int apsize, int ssize)
|
|||
{
|
||||
unsigned long va;
|
||||
unsigned int penc;
|
||||
unsigned long sllp;
|
||||
|
||||
/*
|
||||
* We need 14 to 65 bits of va for a tlibe of 4K page
|
||||
|
@ -64,7 +65,9 @@ static inline void __tlbie(unsigned long vpn, int psize, int apsize, int ssize)
|
|||
/* clear out bits after (52) [0....52.....63] */
|
||||
va &= ~((1ul << (64 - 52)) - 1);
|
||||
va |= ssize << 8;
|
||||
va |= mmu_psize_defs[apsize].sllp << 6;
|
||||
sllp = ((mmu_psize_defs[apsize].sllp & SLB_VSID_L) >> 6) |
|
||||
((mmu_psize_defs[apsize].sllp & SLB_VSID_LP) >> 4);
|
||||
va |= sllp << 5;
|
||||
asm volatile(ASM_FTR_IFCLR("tlbie %0,0", PPC_TLBIE(%1,%0), %2)
|
||||
: : "r" (va), "r"(0), "i" (CPU_FTR_ARCH_206)
|
||||
: "memory");
|
||||
|
@ -98,6 +101,7 @@ static inline void __tlbiel(unsigned long vpn, int psize, int apsize, int ssize)
|
|||
{
|
||||
unsigned long va;
|
||||
unsigned int penc;
|
||||
unsigned long sllp;
|
||||
|
||||
/* VPN_SHIFT can be atmost 12 */
|
||||
va = vpn << VPN_SHIFT;
|
||||
|
@ -113,7 +117,9 @@ static inline void __tlbiel(unsigned long vpn, int psize, int apsize, int ssize)
|
|||
/* clear out bits after(52) [0....52.....63] */
|
||||
va &= ~((1ul << (64 - 52)) - 1);
|
||||
va |= ssize << 8;
|
||||
va |= mmu_psize_defs[apsize].sllp << 6;
|
||||
sllp = ((mmu_psize_defs[apsize].sllp & SLB_VSID_L) >> 6) |
|
||||
((mmu_psize_defs[apsize].sllp & SLB_VSID_LP) >> 4);
|
||||
va |= sllp << 5;
|
||||
asm volatile(".long 0x7c000224 | (%0 << 11) | (0 << 21)"
|
||||
: : "r"(va) : "memory");
|
||||
break;
|
||||
|
@ -554,6 +560,7 @@ static void hpte_decode(struct hash_pte *hpte, unsigned long slot,
|
|||
seg_off |= vpi << shift;
|
||||
}
|
||||
*vpn = vsid << (SID_SHIFT - VPN_SHIFT) | seg_off >> VPN_SHIFT;
|
||||
break;
|
||||
case MMU_SEGSIZE_1T:
|
||||
/* We only have 40 - 23 bits of seg_off in avpn */
|
||||
seg_off = (avpn & 0x1ffff) << 23;
|
||||
|
@ -563,6 +570,7 @@ static void hpte_decode(struct hash_pte *hpte, unsigned long slot,
|
|||
seg_off |= vpi << shift;
|
||||
}
|
||||
*vpn = vsid << (SID_SHIFT_1T - VPN_SHIFT) | seg_off >> VPN_SHIFT;
|
||||
break;
|
||||
default:
|
||||
*vpn = size = 0;
|
||||
}
|
||||
|
|
|
@ -1252,8 +1252,11 @@ nocheck:
|
|||
|
||||
ret = 0;
|
||||
out:
|
||||
if (has_branch_stack(event))
|
||||
if (has_branch_stack(event)) {
|
||||
power_pmu_bhrb_enable(event);
|
||||
cpuhw->bhrb_filter = ppmu->bhrb_filter_map(
|
||||
event->attr.branch_sample_type);
|
||||
}
|
||||
|
||||
perf_pmu_enable(event->pmu);
|
||||
local_irq_restore(flags);
|
||||
|
|
|
@ -561,18 +561,13 @@ static int power8_generic_events[] = {
|
|||
static u64 power8_bhrb_filter_map(u64 branch_sample_type)
|
||||
{
|
||||
u64 pmu_bhrb_filter = 0;
|
||||
u64 br_privilege = branch_sample_type & ONLY_PLM;
|
||||
|
||||
/* BHRB and regular PMU events share the same prvillege state
|
||||
/* BHRB and regular PMU events share the same privilege state
|
||||
* filter configuration. BHRB is always recorded along with a
|
||||
* regular PMU event. So privilege state filter criteria for BHRB
|
||||
* and the companion PMU events has to be the same. As a default
|
||||
* "perf record" tool sets all privillege bits ON when no filter
|
||||
* criteria is provided in the command line. So as along as all
|
||||
* privillege bits are ON or they are OFF, we are good to go.
|
||||
* regular PMU event. As the privilege state filter is handled
|
||||
* in the basic PMC configuration of the accompanying regular
|
||||
* PMU event, we ignore any separate BHRB specific request.
|
||||
*/
|
||||
if ((br_privilege != 7) && (br_privilege != 0))
|
||||
return -1;
|
||||
|
||||
/* No branch filter requested */
|
||||
if (branch_sample_type & PERF_SAMPLE_BRANCH_ANY)
|
||||
|
@ -621,10 +616,19 @@ static struct power_pmu power8_pmu = {
|
|||
|
||||
static int __init init_power8_pmu(void)
|
||||
{
|
||||
int rc;
|
||||
|
||||
if (!cur_cpu_spec->oprofile_cpu_type ||
|
||||
strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power8"))
|
||||
return -ENODEV;
|
||||
|
||||
return register_power_pmu(&power8_pmu);
|
||||
rc = register_power_pmu(&power8_pmu);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
/* Tell userspace that EBB is supported */
|
||||
cur_cpu_spec->cpu_user_features2 |= PPC_FEATURE2_EBB;
|
||||
|
||||
return 0;
|
||||
}
|
||||
early_initcall(init_power8_pmu);
|
||||
|
|
|
@ -114,7 +114,7 @@ static int powernv_eeh_dev_probe(struct pci_dev *dev, void *flag)
|
|||
* the root bridge. So it's not reasonable to continue
|
||||
* the probing.
|
||||
*/
|
||||
if (!dn || !edev)
|
||||
if (!dn || !edev || edev->pe)
|
||||
return 0;
|
||||
|
||||
/* Skip for PCI-ISA bridge */
|
||||
|
@ -122,8 +122,19 @@ static int powernv_eeh_dev_probe(struct pci_dev *dev, void *flag)
|
|||
return 0;
|
||||
|
||||
/* Initialize eeh device */
|
||||
edev->class_code = dev->class;
|
||||
edev->mode = 0;
|
||||
edev->class_code = dev->class;
|
||||
edev->mode &= 0xFFFFFF00;
|
||||
if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE)
|
||||
edev->mode |= EEH_DEV_BRIDGE;
|
||||
if (pci_is_pcie(dev)) {
|
||||
edev->pcie_cap = pci_pcie_cap(dev);
|
||||
|
||||
if (pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT)
|
||||
edev->mode |= EEH_DEV_ROOT_PORT;
|
||||
else if (pci_pcie_type(dev) == PCI_EXP_TYPE_DOWNSTREAM)
|
||||
edev->mode |= EEH_DEV_DS_PORT;
|
||||
}
|
||||
|
||||
edev->config_addr = ((dev->bus->number << 8) | dev->devfn);
|
||||
edev->pe_config_addr = phb->bdfn_to_pe(phb, dev->bus, dev->devfn & 0xff);
|
||||
|
||||
|
|
|
@ -1266,7 +1266,7 @@ void __init pnv_pci_init_ioda_phb(struct device_node *np,
|
|||
opal_pci_set_pe(phb_id, 0, 0, 7, 1, 1 , OPAL_MAP_PE);
|
||||
}
|
||||
|
||||
void pnv_pci_init_ioda2_phb(struct device_node *np)
|
||||
void __init pnv_pci_init_ioda2_phb(struct device_node *np)
|
||||
{
|
||||
pnv_pci_init_ioda_phb(np, 0, PNV_PHB_IODA2);
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ config PPC_PSERIES
|
|||
select ZLIB_DEFLATE
|
||||
select PPC_DOORBELL
|
||||
select HAVE_CONTEXT_TRACKING
|
||||
select HOTPLUG if SMP
|
||||
select HOTPLUG_CPU if SMP
|
||||
default y
|
||||
|
||||
|
|
|
@ -133,6 +133,48 @@ static int pseries_eeh_init(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int pseries_eeh_cap_start(struct device_node *dn)
|
||||
{
|
||||
struct pci_dn *pdn = PCI_DN(dn);
|
||||
u32 status;
|
||||
|
||||
if (!pdn)
|
||||
return 0;
|
||||
|
||||
rtas_read_config(pdn, PCI_STATUS, 2, &status);
|
||||
if (!(status & PCI_STATUS_CAP_LIST))
|
||||
return 0;
|
||||
|
||||
return PCI_CAPABILITY_LIST;
|
||||
}
|
||||
|
||||
|
||||
static int pseries_eeh_find_cap(struct device_node *dn, int cap)
|
||||
{
|
||||
struct pci_dn *pdn = PCI_DN(dn);
|
||||
int pos = pseries_eeh_cap_start(dn);
|
||||
int cnt = 48; /* Maximal number of capabilities */
|
||||
u32 id;
|
||||
|
||||
if (!pos)
|
||||
return 0;
|
||||
|
||||
while (cnt--) {
|
||||
rtas_read_config(pdn, pos, 1, &pos);
|
||||
if (pos < 0x40)
|
||||
break;
|
||||
pos &= ~3;
|
||||
rtas_read_config(pdn, pos + PCI_CAP_LIST_ID, 1, &id);
|
||||
if (id == 0xff)
|
||||
break;
|
||||
if (id == cap)
|
||||
return pos;
|
||||
pos += PCI_CAP_LIST_NEXT;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* pseries_eeh_of_probe - EEH probe on the given device
|
||||
* @dn: OF node
|
||||
|
@ -146,14 +188,16 @@ static void *pseries_eeh_of_probe(struct device_node *dn, void *flag)
|
|||
{
|
||||
struct eeh_dev *edev;
|
||||
struct eeh_pe pe;
|
||||
struct pci_dn *pdn = PCI_DN(dn);
|
||||
const u32 *class_code, *vendor_id, *device_id;
|
||||
const u32 *regs;
|
||||
u32 pcie_flags;
|
||||
int enable = 0;
|
||||
int ret;
|
||||
|
||||
/* Retrieve OF node and eeh device */
|
||||
edev = of_node_to_eeh_dev(dn);
|
||||
if (!of_device_is_available(dn))
|
||||
if (edev->pe || !of_device_is_available(dn))
|
||||
return NULL;
|
||||
|
||||
/* Retrieve class/vendor/device IDs */
|
||||
|
@ -167,9 +211,26 @@ static void *pseries_eeh_of_probe(struct device_node *dn, void *flag)
|
|||
if (dn->type && !strcmp(dn->type, "isa"))
|
||||
return NULL;
|
||||
|
||||
/* Update class code and mode of eeh device */
|
||||
/*
|
||||
* Update class code and mode of eeh device. We need
|
||||
* correctly reflects that current device is root port
|
||||
* or PCIe switch downstream port.
|
||||
*/
|
||||
edev->class_code = *class_code;
|
||||
edev->mode = 0;
|
||||
edev->pcie_cap = pseries_eeh_find_cap(dn, PCI_CAP_ID_EXP);
|
||||
edev->mode &= 0xFFFFFF00;
|
||||
if ((edev->class_code >> 8) == PCI_CLASS_BRIDGE_PCI) {
|
||||
edev->mode |= EEH_DEV_BRIDGE;
|
||||
if (edev->pcie_cap) {
|
||||
rtas_read_config(pdn, edev->pcie_cap + PCI_EXP_FLAGS,
|
||||
2, &pcie_flags);
|
||||
pcie_flags = (pcie_flags & PCI_EXP_FLAGS_TYPE) >> 4;
|
||||
if (pcie_flags == PCI_EXP_TYPE_ROOT_PORT)
|
||||
edev->mode |= EEH_DEV_ROOT_PORT;
|
||||
else if (pcie_flags == PCI_EXP_TYPE_DOWNSTREAM)
|
||||
edev->mode |= EEH_DEV_DS_PORT;
|
||||
}
|
||||
}
|
||||
|
||||
/* Retrieve the device address */
|
||||
regs = of_get_property(dn, "reg", NULL);
|
||||
|
|
|
@ -146,7 +146,7 @@ static long pSeries_lpar_hpte_insert(unsigned long hpte_group,
|
|||
flags = 0;
|
||||
|
||||
/* Make pHyp happy */
|
||||
if ((rflags & _PAGE_NO_CACHE) & !(rflags & _PAGE_WRITETHRU))
|
||||
if ((rflags & _PAGE_NO_CACHE) && !(rflags & _PAGE_WRITETHRU))
|
||||
hpte_r &= ~_PAGE_COHERENT;
|
||||
if (firmware_has_feature(FW_FEATURE_XCMO) && !(hpte_r & HPTE_R_N))
|
||||
flags |= H_COALESCE_CAND;
|
||||
|
|
|
@ -287,6 +287,9 @@ static struct rtas_error_log *fwnmi_get_errinfo(struct pt_regs *regs)
|
|||
unsigned long *savep;
|
||||
struct rtas_error_log *h, *errhdr = NULL;
|
||||
|
||||
/* Mask top two bits */
|
||||
regs->gpr[3] &= ~(0x3UL << 62);
|
||||
|
||||
if (!VALID_FWNMI_BUFFER(regs->gpr[3])) {
|
||||
printk(KERN_ERR "FWNMI: corrupt r3 0x%016lx\n", regs->gpr[3]);
|
||||
return NULL;
|
||||
|
|
|
@ -27,7 +27,6 @@ obj-$(CONFIG_CRYPTO_SHA1_SSSE3) += sha1-ssse3.o
|
|||
obj-$(CONFIG_CRYPTO_CRC32_PCLMUL) += crc32-pclmul.o
|
||||
obj-$(CONFIG_CRYPTO_SHA256_SSSE3) += sha256-ssse3.o
|
||||
obj-$(CONFIG_CRYPTO_SHA512_SSSE3) += sha512-ssse3.o
|
||||
obj-$(CONFIG_CRYPTO_CRCT10DIF_PCLMUL) += crct10dif-pclmul.o
|
||||
|
||||
# These modules require assembler to support AVX.
|
||||
ifeq ($(avx_supported),yes)
|
||||
|
@ -82,4 +81,3 @@ crc32c-intel-$(CONFIG_64BIT) += crc32c-pcl-intel-asm_64.o
|
|||
crc32-pclmul-y := crc32-pclmul_asm.o crc32-pclmul_glue.o
|
||||
sha256-ssse3-y := sha256-ssse3-asm.o sha256-avx-asm.o sha256-avx2-asm.o sha256_ssse3_glue.o
|
||||
sha512-ssse3-y := sha512-ssse3-asm.o sha512-avx-asm.o sha512-avx2-asm.o sha512_ssse3_glue.o
|
||||
crct10dif-pclmul-y := crct10dif-pcl-asm_64.o crct10dif-pclmul_glue.o
|
||||
|
|
|
@ -1,643 +0,0 @@
|
|||
########################################################################
|
||||
# Implement fast CRC-T10DIF computation with SSE and PCLMULQDQ instructions
|
||||
#
|
||||
# Copyright (c) 2013, Intel Corporation
|
||||
#
|
||||
# Authors:
|
||||
# Erdinc Ozturk <erdinc.ozturk@intel.com>
|
||||
# Vinodh Gopal <vinodh.gopal@intel.com>
|
||||
# James Guilford <james.guilford@intel.com>
|
||||
# Tim Chen <tim.c.chen@linux.intel.com>
|
||||
#
|
||||
# This software is available to you under a choice of one of two
|
||||
# licenses. You may choose to be licensed under the terms of the GNU
|
||||
# General Public License (GPL) Version 2, available from the file
|
||||
# COPYING in the main directory of this source tree, or the
|
||||
# OpenIB.org BSD license below:
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
#
|
||||
# * Neither the name of the Intel Corporation nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION ""AS IS"" AND ANY
|
||||
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
########################################################################
|
||||
# Function API:
|
||||
# UINT16 crc_t10dif_pcl(
|
||||
# UINT16 init_crc, //initial CRC value, 16 bits
|
||||
# const unsigned char *buf, //buffer pointer to calculate CRC on
|
||||
# UINT64 len //buffer length in bytes (64-bit data)
|
||||
# );
|
||||
#
|
||||
# Reference paper titled "Fast CRC Computation for Generic
|
||||
# Polynomials Using PCLMULQDQ Instruction"
|
||||
# URL: http://www.intel.com/content/dam/www/public/us/en/documents
|
||||
# /white-papers/fast-crc-computation-generic-polynomials-pclmulqdq-paper.pdf
|
||||
#
|
||||
#
|
||||
|
||||
#include <linux/linkage.h>
|
||||
|
||||
.text
|
||||
|
||||
#define arg1 %rdi
|
||||
#define arg2 %rsi
|
||||
#define arg3 %rdx
|
||||
|
||||
#define arg1_low32 %edi
|
||||
|
||||
ENTRY(crc_t10dif_pcl)
|
||||
.align 16
|
||||
|
||||
# adjust the 16-bit initial_crc value, scale it to 32 bits
|
||||
shl $16, arg1_low32
|
||||
|
||||
# Allocate Stack Space
|
||||
mov %rsp, %rcx
|
||||
sub $16*2, %rsp
|
||||
# align stack to 16 byte boundary
|
||||
and $~(0x10 - 1), %rsp
|
||||
|
||||
# check if smaller than 256
|
||||
cmp $256, arg3
|
||||
|
||||
# for sizes less than 128, we can't fold 64B at a time...
|
||||
jl _less_than_128
|
||||
|
||||
|
||||
# load the initial crc value
|
||||
movd arg1_low32, %xmm10 # initial crc
|
||||
|
||||
# crc value does not need to be byte-reflected, but it needs
|
||||
# to be moved to the high part of the register.
|
||||
# because data will be byte-reflected and will align with
|
||||
# initial crc at correct place.
|
||||
pslldq $12, %xmm10
|
||||
|
||||
movdqa SHUF_MASK(%rip), %xmm11
|
||||
# receive the initial 64B data, xor the initial crc value
|
||||
movdqu 16*0(arg2), %xmm0
|
||||
movdqu 16*1(arg2), %xmm1
|
||||
movdqu 16*2(arg2), %xmm2
|
||||
movdqu 16*3(arg2), %xmm3
|
||||
movdqu 16*4(arg2), %xmm4
|
||||
movdqu 16*5(arg2), %xmm5
|
||||
movdqu 16*6(arg2), %xmm6
|
||||
movdqu 16*7(arg2), %xmm7
|
||||
|
||||
pshufb %xmm11, %xmm0
|
||||
# XOR the initial_crc value
|
||||
pxor %xmm10, %xmm0
|
||||
pshufb %xmm11, %xmm1
|
||||
pshufb %xmm11, %xmm2
|
||||
pshufb %xmm11, %xmm3
|
||||
pshufb %xmm11, %xmm4
|
||||
pshufb %xmm11, %xmm5
|
||||
pshufb %xmm11, %xmm6
|
||||
pshufb %xmm11, %xmm7
|
||||
|
||||
movdqa rk3(%rip), %xmm10 #xmm10 has rk3 and rk4
|
||||
#imm value of pclmulqdq instruction
|
||||
#will determine which constant to use
|
||||
|
||||
#################################################################
|
||||
# we subtract 256 instead of 128 to save one instruction from the loop
|
||||
sub $256, arg3
|
||||
|
||||
# at this section of the code, there is 64*x+y (0<=y<64) bytes of
|
||||
# buffer. The _fold_64_B_loop will fold 64B at a time
|
||||
# until we have 64+y Bytes of buffer
|
||||
|
||||
|
||||
# fold 64B at a time. This section of the code folds 4 xmm
|
||||
# registers in parallel
|
||||
_fold_64_B_loop:
|
||||
|
||||
# update the buffer pointer
|
||||
add $128, arg2 # buf += 64#
|
||||
|
||||
movdqu 16*0(arg2), %xmm9
|
||||
movdqu 16*1(arg2), %xmm12
|
||||
pshufb %xmm11, %xmm9
|
||||
pshufb %xmm11, %xmm12
|
||||
movdqa %xmm0, %xmm8
|
||||
movdqa %xmm1, %xmm13
|
||||
pclmulqdq $0x0 , %xmm10, %xmm0
|
||||
pclmulqdq $0x11, %xmm10, %xmm8
|
||||
pclmulqdq $0x0 , %xmm10, %xmm1
|
||||
pclmulqdq $0x11, %xmm10, %xmm13
|
||||
pxor %xmm9 , %xmm0
|
||||
xorps %xmm8 , %xmm0
|
||||
pxor %xmm12, %xmm1
|
||||
xorps %xmm13, %xmm1
|
||||
|
||||
movdqu 16*2(arg2), %xmm9
|
||||
movdqu 16*3(arg2), %xmm12
|
||||
pshufb %xmm11, %xmm9
|
||||
pshufb %xmm11, %xmm12
|
||||
movdqa %xmm2, %xmm8
|
||||
movdqa %xmm3, %xmm13
|
||||
pclmulqdq $0x0, %xmm10, %xmm2
|
||||
pclmulqdq $0x11, %xmm10, %xmm8
|
||||
pclmulqdq $0x0, %xmm10, %xmm3
|
||||
pclmulqdq $0x11, %xmm10, %xmm13
|
||||
pxor %xmm9 , %xmm2
|
||||
xorps %xmm8 , %xmm2
|
||||
pxor %xmm12, %xmm3
|
||||
xorps %xmm13, %xmm3
|
||||
|
||||
movdqu 16*4(arg2), %xmm9
|
||||
movdqu 16*5(arg2), %xmm12
|
||||
pshufb %xmm11, %xmm9
|
||||
pshufb %xmm11, %xmm12
|
||||
movdqa %xmm4, %xmm8
|
||||
movdqa %xmm5, %xmm13
|
||||
pclmulqdq $0x0, %xmm10, %xmm4
|
||||
pclmulqdq $0x11, %xmm10, %xmm8
|
||||
pclmulqdq $0x0, %xmm10, %xmm5
|
||||
pclmulqdq $0x11, %xmm10, %xmm13
|
||||
pxor %xmm9 , %xmm4
|
||||
xorps %xmm8 , %xmm4
|
||||
pxor %xmm12, %xmm5
|
||||
xorps %xmm13, %xmm5
|
||||
|
||||
movdqu 16*6(arg2), %xmm9
|
||||
movdqu 16*7(arg2), %xmm12
|
||||
pshufb %xmm11, %xmm9
|
||||
pshufb %xmm11, %xmm12
|
||||
movdqa %xmm6 , %xmm8
|
||||
movdqa %xmm7 , %xmm13
|
||||
pclmulqdq $0x0 , %xmm10, %xmm6
|
||||
pclmulqdq $0x11, %xmm10, %xmm8
|
||||
pclmulqdq $0x0 , %xmm10, %xmm7
|
||||
pclmulqdq $0x11, %xmm10, %xmm13
|
||||
pxor %xmm9 , %xmm6
|
||||
xorps %xmm8 , %xmm6
|
||||
pxor %xmm12, %xmm7
|
||||
xorps %xmm13, %xmm7
|
||||
|
||||
sub $128, arg3
|
||||
|
||||
# check if there is another 64B in the buffer to be able to fold
|
||||
jge _fold_64_B_loop
|
||||
##################################################################
|
||||
|
||||
|
||||
add $128, arg2
|
||||
# at this point, the buffer pointer is pointing at the last y Bytes
|
||||
# of the buffer the 64B of folded data is in 4 of the xmm
|
||||
# registers: xmm0, xmm1, xmm2, xmm3
|
||||
|
||||
|
||||
# fold the 8 xmm registers to 1 xmm register with different constants
|
||||
|
||||
movdqa rk9(%rip), %xmm10
|
||||
movdqa %xmm0, %xmm8
|
||||
pclmulqdq $0x11, %xmm10, %xmm0
|
||||
pclmulqdq $0x0 , %xmm10, %xmm8
|
||||
pxor %xmm8, %xmm7
|
||||
xorps %xmm0, %xmm7
|
||||
|
||||
movdqa rk11(%rip), %xmm10
|
||||
movdqa %xmm1, %xmm8
|
||||
pclmulqdq $0x11, %xmm10, %xmm1
|
||||
pclmulqdq $0x0 , %xmm10, %xmm8
|
||||
pxor %xmm8, %xmm7
|
||||
xorps %xmm1, %xmm7
|
||||
|
||||
movdqa rk13(%rip), %xmm10
|
||||
movdqa %xmm2, %xmm8
|
||||
pclmulqdq $0x11, %xmm10, %xmm2
|
||||
pclmulqdq $0x0 , %xmm10, %xmm8
|
||||
pxor %xmm8, %xmm7
|
||||
pxor %xmm2, %xmm7
|
||||
|
||||
movdqa rk15(%rip), %xmm10
|
||||
movdqa %xmm3, %xmm8
|
||||
pclmulqdq $0x11, %xmm10, %xmm3
|
||||
pclmulqdq $0x0 , %xmm10, %xmm8
|
||||
pxor %xmm8, %xmm7
|
||||
xorps %xmm3, %xmm7
|
||||
|
||||
movdqa rk17(%rip), %xmm10
|
||||
movdqa %xmm4, %xmm8
|
||||
pclmulqdq $0x11, %xmm10, %xmm4
|
||||
pclmulqdq $0x0 , %xmm10, %xmm8
|
||||
pxor %xmm8, %xmm7
|
||||
pxor %xmm4, %xmm7
|
||||
|
||||
movdqa rk19(%rip), %xmm10
|
||||
movdqa %xmm5, %xmm8
|
||||
pclmulqdq $0x11, %xmm10, %xmm5
|
||||
pclmulqdq $0x0 , %xmm10, %xmm8
|
||||
pxor %xmm8, %xmm7
|
||||
xorps %xmm5, %xmm7
|
||||
|
||||
movdqa rk1(%rip), %xmm10 #xmm10 has rk1 and rk2
|
||||
#imm value of pclmulqdq instruction
|
||||
#will determine which constant to use
|
||||
movdqa %xmm6, %xmm8
|
||||
pclmulqdq $0x11, %xmm10, %xmm6
|
||||
pclmulqdq $0x0 , %xmm10, %xmm8
|
||||
pxor %xmm8, %xmm7
|
||||
pxor %xmm6, %xmm7
|
||||
|
||||
|
||||
# instead of 64, we add 48 to the loop counter to save 1 instruction
|
||||
# from the loop instead of a cmp instruction, we use the negative
|
||||
# flag with the jl instruction
|
||||
add $128-16, arg3
|
||||
jl _final_reduction_for_128
|
||||
|
||||
# now we have 16+y bytes left to reduce. 16 Bytes is in register xmm7
|
||||
# and the rest is in memory. We can fold 16 bytes at a time if y>=16
|
||||
# continue folding 16B at a time
|
||||
|
||||
_16B_reduction_loop:
|
||||
movdqa %xmm7, %xmm8
|
||||
pclmulqdq $0x11, %xmm10, %xmm7
|
||||
pclmulqdq $0x0 , %xmm10, %xmm8
|
||||
pxor %xmm8, %xmm7
|
||||
movdqu (arg2), %xmm0
|
||||
pshufb %xmm11, %xmm0
|
||||
pxor %xmm0 , %xmm7
|
||||
add $16, arg2
|
||||
sub $16, arg3
|
||||
# instead of a cmp instruction, we utilize the flags with the
|
||||
# jge instruction equivalent of: cmp arg3, 16-16
|
||||
# check if there is any more 16B in the buffer to be able to fold
|
||||
jge _16B_reduction_loop
|
||||
|
||||
#now we have 16+z bytes left to reduce, where 0<= z < 16.
|
||||
#first, we reduce the data in the xmm7 register
|
||||
|
||||
|
||||
_final_reduction_for_128:
|
||||
# check if any more data to fold. If not, compute the CRC of
|
||||
# the final 128 bits
|
||||
add $16, arg3
|
||||
je _128_done
|
||||
|
||||
# here we are getting data that is less than 16 bytes.
|
||||
# since we know that there was data before the pointer, we can
|
||||
# offset the input pointer before the actual point, to receive
|
||||
# exactly 16 bytes. after that the registers need to be adjusted.
|
||||
_get_last_two_xmms:
|
||||
movdqa %xmm7, %xmm2
|
||||
|
||||
movdqu -16(arg2, arg3), %xmm1
|
||||
pshufb %xmm11, %xmm1
|
||||
|
||||
# get rid of the extra data that was loaded before
|
||||
# load the shift constant
|
||||
lea pshufb_shf_table+16(%rip), %rax
|
||||
sub arg3, %rax
|
||||
movdqu (%rax), %xmm0
|
||||
|
||||
# shift xmm2 to the left by arg3 bytes
|
||||
pshufb %xmm0, %xmm2
|
||||
|
||||
# shift xmm7 to the right by 16-arg3 bytes
|
||||
pxor mask1(%rip), %xmm0
|
||||
pshufb %xmm0, %xmm7
|
||||
pblendvb %xmm2, %xmm1 #xmm0 is implicit
|
||||
|
||||
# fold 16 Bytes
|
||||
movdqa %xmm1, %xmm2
|
||||
movdqa %xmm7, %xmm8
|
||||
pclmulqdq $0x11, %xmm10, %xmm7
|
||||
pclmulqdq $0x0 , %xmm10, %xmm8
|
||||
pxor %xmm8, %xmm7
|
||||
pxor %xmm2, %xmm7
|
||||
|
||||
_128_done:
|
||||
# compute crc of a 128-bit value
|
||||
movdqa rk5(%rip), %xmm10 # rk5 and rk6 in xmm10
|
||||
movdqa %xmm7, %xmm0
|
||||
|
||||
#64b fold
|
||||
pclmulqdq $0x1, %xmm10, %xmm7
|
||||
pslldq $8 , %xmm0
|
||||
pxor %xmm0, %xmm7
|
||||
|
||||
#32b fold
|
||||
movdqa %xmm7, %xmm0
|
||||
|
||||
pand mask2(%rip), %xmm0
|
||||
|
||||
psrldq $12, %xmm7
|
||||
pclmulqdq $0x10, %xmm10, %xmm7
|
||||
pxor %xmm0, %xmm7
|
||||
|
||||
#barrett reduction
|
||||
_barrett:
|
||||
movdqa rk7(%rip), %xmm10 # rk7 and rk8 in xmm10
|
||||
movdqa %xmm7, %xmm0
|
||||
pclmulqdq $0x01, %xmm10, %xmm7
|
||||
pslldq $4, %xmm7
|
||||
pclmulqdq $0x11, %xmm10, %xmm7
|
||||
|
||||
pslldq $4, %xmm7
|
||||
pxor %xmm0, %xmm7
|
||||
pextrd $1, %xmm7, %eax
|
||||
|
||||
_cleanup:
|
||||
# scale the result back to 16 bits
|
||||
shr $16, %eax
|
||||
mov %rcx, %rsp
|
||||
ret
|
||||
|
||||
########################################################################
|
||||
|
||||
.align 16
|
||||
_less_than_128:
|
||||
|
||||
# check if there is enough buffer to be able to fold 16B at a time
|
||||
cmp $32, arg3
|
||||
jl _less_than_32
|
||||
movdqa SHUF_MASK(%rip), %xmm11
|
||||
|
||||
# now if there is, load the constants
|
||||
movdqa rk1(%rip), %xmm10 # rk1 and rk2 in xmm10
|
||||
|
||||
movd arg1_low32, %xmm0 # get the initial crc value
|
||||
pslldq $12, %xmm0 # align it to its correct place
|
||||
movdqu (arg2), %xmm7 # load the plaintext
|
||||
pshufb %xmm11, %xmm7 # byte-reflect the plaintext
|
||||
pxor %xmm0, %xmm7
|
||||
|
||||
|
||||
# update the buffer pointer
|
||||
add $16, arg2
|
||||
|
||||
# update the counter. subtract 32 instead of 16 to save one
|
||||
# instruction from the loop
|
||||
sub $32, arg3
|
||||
|
||||
jmp _16B_reduction_loop
|
||||
|
||||
|
||||
.align 16
|
||||
_less_than_32:
|
||||
# mov initial crc to the return value. this is necessary for
|
||||
# zero-length buffers.
|
||||
mov arg1_low32, %eax
|
||||
test arg3, arg3
|
||||
je _cleanup
|
||||
|
||||
movdqa SHUF_MASK(%rip), %xmm11
|
||||
|
||||
movd arg1_low32, %xmm0 # get the initial crc value
|
||||
pslldq $12, %xmm0 # align it to its correct place
|
||||
|
||||
cmp $16, arg3
|
||||
je _exact_16_left
|
||||
jl _less_than_16_left
|
||||
|
||||
movdqu (arg2), %xmm7 # load the plaintext
|
||||
pshufb %xmm11, %xmm7 # byte-reflect the plaintext
|
||||
pxor %xmm0 , %xmm7 # xor the initial crc value
|
||||
add $16, arg2
|
||||
sub $16, arg3
|
||||
movdqa rk1(%rip), %xmm10 # rk1 and rk2 in xmm10
|
||||
jmp _get_last_two_xmms
|
||||
|
||||
|
||||
.align 16
|
||||
_less_than_16_left:
|
||||
# use stack space to load data less than 16 bytes, zero-out
|
||||
# the 16B in memory first.
|
||||
|
||||
pxor %xmm1, %xmm1
|
||||
mov %rsp, %r11
|
||||
movdqa %xmm1, (%r11)
|
||||
|
||||
cmp $4, arg3
|
||||
jl _only_less_than_4
|
||||
|
||||
# backup the counter value
|
||||
mov arg3, %r9
|
||||
cmp $8, arg3
|
||||
jl _less_than_8_left
|
||||
|
||||
# load 8 Bytes
|
||||
mov (arg2), %rax
|
||||
mov %rax, (%r11)
|
||||
add $8, %r11
|
||||
sub $8, arg3
|
||||
add $8, arg2
|
||||
_less_than_8_left:
|
||||
|
||||
cmp $4, arg3
|
||||
jl _less_than_4_left
|
||||
|
||||
# load 4 Bytes
|
||||
mov (arg2), %eax
|
||||
mov %eax, (%r11)
|
||||
add $4, %r11
|
||||
sub $4, arg3
|
||||
add $4, arg2
|
||||
_less_than_4_left:
|
||||
|
||||
cmp $2, arg3
|
||||
jl _less_than_2_left
|
||||
|
||||
# load 2 Bytes
|
||||
mov (arg2), %ax
|
||||
mov %ax, (%r11)
|
||||
add $2, %r11
|
||||
sub $2, arg3
|
||||
add $2, arg2
|
||||
_less_than_2_left:
|
||||
cmp $1, arg3
|
||||
jl _zero_left
|
||||
|
||||
# load 1 Byte
|
||||
mov (arg2), %al
|
||||
mov %al, (%r11)
|
||||
_zero_left:
|
||||
movdqa (%rsp), %xmm7
|
||||
pshufb %xmm11, %xmm7
|
||||
pxor %xmm0 , %xmm7 # xor the initial crc value
|
||||
|
||||
# shl r9, 4
|
||||
lea pshufb_shf_table+16(%rip), %rax
|
||||
sub %r9, %rax
|
||||
movdqu (%rax), %xmm0
|
||||
pxor mask1(%rip), %xmm0
|
||||
|
||||
pshufb %xmm0, %xmm7
|
||||
jmp _128_done
|
||||
|
||||
.align 16
|
||||
_exact_16_left:
|
||||
movdqu (arg2), %xmm7
|
||||
pshufb %xmm11, %xmm7
|
||||
pxor %xmm0 , %xmm7 # xor the initial crc value
|
||||
|
||||
jmp _128_done
|
||||
|
||||
_only_less_than_4:
|
||||
cmp $3, arg3
|
||||
jl _only_less_than_3
|
||||
|
||||
# load 3 Bytes
|
||||
mov (arg2), %al
|
||||
mov %al, (%r11)
|
||||
|
||||
mov 1(arg2), %al
|
||||
mov %al, 1(%r11)
|
||||
|
||||
mov 2(arg2), %al
|
||||
mov %al, 2(%r11)
|
||||
|
||||
movdqa (%rsp), %xmm7
|
||||
pshufb %xmm11, %xmm7
|
||||
pxor %xmm0 , %xmm7 # xor the initial crc value
|
||||
|
||||
psrldq $5, %xmm7
|
||||
|
||||
jmp _barrett
|
||||
_only_less_than_3:
|
||||
cmp $2, arg3
|
||||
jl _only_less_than_2
|
||||
|
||||
# load 2 Bytes
|
||||
mov (arg2), %al
|
||||
mov %al, (%r11)
|
||||
|
||||
mov 1(arg2), %al
|
||||
mov %al, 1(%r11)
|
||||
|
||||
movdqa (%rsp), %xmm7
|
||||
pshufb %xmm11, %xmm7
|
||||
pxor %xmm0 , %xmm7 # xor the initial crc value
|
||||
|
||||
psrldq $6, %xmm7
|
||||
|
||||
jmp _barrett
|
||||
_only_less_than_2:
|
||||
|
||||
# load 1 Byte
|
||||
mov (arg2), %al
|
||||
mov %al, (%r11)
|
||||
|
||||
movdqa (%rsp), %xmm7
|
||||
pshufb %xmm11, %xmm7
|
||||
pxor %xmm0 , %xmm7 # xor the initial crc value
|
||||
|
||||
psrldq $7, %xmm7
|
||||
|
||||
jmp _barrett
|
||||
|
||||
ENDPROC(crc_t10dif_pcl)
|
||||
|
||||
.data
|
||||
|
||||
# precomputed constants
|
||||
# these constants are precomputed from the poly:
|
||||
# 0x8bb70000 (0x8bb7 scaled to 32 bits)
|
||||
.align 16
|
||||
# Q = 0x18BB70000
|
||||
# rk1 = 2^(32*3) mod Q << 32
|
||||
# rk2 = 2^(32*5) mod Q << 32
|
||||
# rk3 = 2^(32*15) mod Q << 32
|
||||
# rk4 = 2^(32*17) mod Q << 32
|
||||
# rk5 = 2^(32*3) mod Q << 32
|
||||
# rk6 = 2^(32*2) mod Q << 32
|
||||
# rk7 = floor(2^64/Q)
|
||||
# rk8 = Q
|
||||
rk1:
|
||||
.quad 0x2d56000000000000
|
||||
rk2:
|
||||
.quad 0x06df000000000000
|
||||
rk3:
|
||||
.quad 0x9d9d000000000000
|
||||
rk4:
|
||||
.quad 0x7cf5000000000000
|
||||
rk5:
|
||||
.quad 0x2d56000000000000
|
||||
rk6:
|
||||
.quad 0x1368000000000000
|
||||
rk7:
|
||||
.quad 0x00000001f65a57f8
|
||||
rk8:
|
||||
.quad 0x000000018bb70000
|
||||
|
||||
rk9:
|
||||
.quad 0xceae000000000000
|
||||
rk10:
|
||||
.quad 0xbfd6000000000000
|
||||
rk11:
|
||||
.quad 0x1e16000000000000
|
||||
rk12:
|
||||
.quad 0x713c000000000000
|
||||
rk13:
|
||||
.quad 0xf7f9000000000000
|
||||
rk14:
|
||||
.quad 0x80a6000000000000
|
||||
rk15:
|
||||
.quad 0x044c000000000000
|
||||
rk16:
|
||||
.quad 0xe658000000000000
|
||||
rk17:
|
||||
.quad 0xad18000000000000
|
||||
rk18:
|
||||
.quad 0xa497000000000000
|
||||
rk19:
|
||||
.quad 0x6ee3000000000000
|
||||
rk20:
|
||||
.quad 0xe7b5000000000000
|
||||
|
||||
|
||||
|
||||
mask1:
|
||||
.octa 0x80808080808080808080808080808080
|
||||
mask2:
|
||||
.octa 0x00000000FFFFFFFFFFFFFFFFFFFFFFFF
|
||||
|
||||
SHUF_MASK:
|
||||
.octa 0x000102030405060708090A0B0C0D0E0F
|
||||
|
||||
pshufb_shf_table:
|
||||
# use these values for shift constants for the pshufb instruction
|
||||
# different alignments result in values as shown:
|
||||
# DDQ 0x008f8e8d8c8b8a898887868584838281 # shl 15 (16-1) / shr1
|
||||
# DDQ 0x01008f8e8d8c8b8a8988878685848382 # shl 14 (16-3) / shr2
|
||||
# DDQ 0x0201008f8e8d8c8b8a89888786858483 # shl 13 (16-4) / shr3
|
||||
# DDQ 0x030201008f8e8d8c8b8a898887868584 # shl 12 (16-4) / shr4
|
||||
# DDQ 0x04030201008f8e8d8c8b8a8988878685 # shl 11 (16-5) / shr5
|
||||
# DDQ 0x0504030201008f8e8d8c8b8a89888786 # shl 10 (16-6) / shr6
|
||||
# DDQ 0x060504030201008f8e8d8c8b8a898887 # shl 9 (16-7) / shr7
|
||||
# DDQ 0x07060504030201008f8e8d8c8b8a8988 # shl 8 (16-8) / shr8
|
||||
# DDQ 0x0807060504030201008f8e8d8c8b8a89 # shl 7 (16-9) / shr9
|
||||
# DDQ 0x090807060504030201008f8e8d8c8b8a # shl 6 (16-10) / shr10
|
||||
# DDQ 0x0a090807060504030201008f8e8d8c8b # shl 5 (16-11) / shr11
|
||||
# DDQ 0x0b0a090807060504030201008f8e8d8c # shl 4 (16-12) / shr12
|
||||
# DDQ 0x0c0b0a090807060504030201008f8e8d # shl 3 (16-13) / shr13
|
||||
# DDQ 0x0d0c0b0a090807060504030201008f8e # shl 2 (16-14) / shr14
|
||||
# DDQ 0x0e0d0c0b0a090807060504030201008f # shl 1 (16-15) / shr15
|
||||
.octa 0x8f8e8d8c8b8a89888786858483828100
|
||||
.octa 0x000e0d0c0b0a09080706050403020100
|
|
@ -1,151 +0,0 @@
|
|||
/*
|
||||
* Cryptographic API.
|
||||
*
|
||||
* T10 Data Integrity Field CRC16 Crypto Transform using PCLMULQDQ Instructions
|
||||
*
|
||||
* Copyright (C) 2013 Intel Corporation
|
||||
* Author: Tim Chen <tim.c.chen@linux.intel.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
||||
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/crc-t10dif.h>
|
||||
#include <crypto/internal/hash.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <asm/i387.h>
|
||||
#include <asm/cpufeature.h>
|
||||
#include <asm/cpu_device_id.h>
|
||||
|
||||
asmlinkage __u16 crc_t10dif_pcl(__u16 crc, const unsigned char *buf,
|
||||
size_t len);
|
||||
|
||||
struct chksum_desc_ctx {
|
||||
__u16 crc;
|
||||
};
|
||||
|
||||
/*
|
||||
* Steps through buffer one byte at at time, calculates reflected
|
||||
* crc using table.
|
||||
*/
|
||||
|
||||
static int chksum_init(struct shash_desc *desc)
|
||||
{
|
||||
struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
|
||||
|
||||
ctx->crc = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int chksum_update(struct shash_desc *desc, const u8 *data,
|
||||
unsigned int length)
|
||||
{
|
||||
struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
|
||||
|
||||
if (irq_fpu_usable()) {
|
||||
kernel_fpu_begin();
|
||||
ctx->crc = crc_t10dif_pcl(ctx->crc, data, length);
|
||||
kernel_fpu_end();
|
||||
} else
|
||||
ctx->crc = crc_t10dif_generic(ctx->crc, data, length);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int chksum_final(struct shash_desc *desc, u8 *out)
|
||||
{
|
||||
struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
|
||||
|
||||
*(__u16 *)out = ctx->crc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __chksum_finup(__u16 *crcp, const u8 *data, unsigned int len,
|
||||
u8 *out)
|
||||
{
|
||||
if (irq_fpu_usable()) {
|
||||
kernel_fpu_begin();
|
||||
*(__u16 *)out = crc_t10dif_pcl(*crcp, data, len);
|
||||
kernel_fpu_end();
|
||||
} else
|
||||
*(__u16 *)out = crc_t10dif_generic(*crcp, data, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int chksum_finup(struct shash_desc *desc, const u8 *data,
|
||||
unsigned int len, u8 *out)
|
||||
{
|
||||
struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
|
||||
|
||||
return __chksum_finup(&ctx->crc, data, len, out);
|
||||
}
|
||||
|
||||
static int chksum_digest(struct shash_desc *desc, const u8 *data,
|
||||
unsigned int length, u8 *out)
|
||||
{
|
||||
struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
|
||||
|
||||
return __chksum_finup(&ctx->crc, data, length, out);
|
||||
}
|
||||
|
||||
static struct shash_alg alg = {
|
||||
.digestsize = CRC_T10DIF_DIGEST_SIZE,
|
||||
.init = chksum_init,
|
||||
.update = chksum_update,
|
||||
.final = chksum_final,
|
||||
.finup = chksum_finup,
|
||||
.digest = chksum_digest,
|
||||
.descsize = sizeof(struct chksum_desc_ctx),
|
||||
.base = {
|
||||
.cra_name = "crct10dif",
|
||||
.cra_driver_name = "crct10dif-pclmul",
|
||||
.cra_priority = 200,
|
||||
.cra_blocksize = CRC_T10DIF_BLOCK_SIZE,
|
||||
.cra_module = THIS_MODULE,
|
||||
}
|
||||
};
|
||||
|
||||
static const struct x86_cpu_id crct10dif_cpu_id[] = {
|
||||
X86_FEATURE_MATCH(X86_FEATURE_PCLMULQDQ),
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(x86cpu, crct10dif_cpu_id);
|
||||
|
||||
static int __init crct10dif_intel_mod_init(void)
|
||||
{
|
||||
if (!x86_match_cpu(crct10dif_cpu_id))
|
||||
return -ENODEV;
|
||||
|
||||
return crypto_register_shash(&alg);
|
||||
}
|
||||
|
||||
static void __exit crct10dif_intel_mod_fini(void)
|
||||
{
|
||||
crypto_unregister_shash(&alg);
|
||||
}
|
||||
|
||||
module_init(crct10dif_intel_mod_init);
|
||||
module_exit(crct10dif_intel_mod_fini);
|
||||
|
||||
MODULE_AUTHOR("Tim Chen <tim.c.chen@linux.intel.com>");
|
||||
MODULE_DESCRIPTION("T10 DIF CRC calculation accelerated with PCLMULQDQ.");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
MODULE_ALIAS("crct10dif");
|
||||
MODULE_ALIAS("crct10dif-pclmul");
|
|
@ -376,25 +376,6 @@ config CRYPTO_CRC32_PCLMUL
|
|||
which will enable any routine to use the CRC-32-IEEE 802.3 checksum
|
||||
and gain better performance as compared with the table implementation.
|
||||
|
||||
config CRYPTO_CRCT10DIF
|
||||
tristate "CRCT10DIF algorithm"
|
||||
select CRYPTO_HASH
|
||||
help
|
||||
CRC T10 Data Integrity Field computation is being cast as
|
||||
a crypto transform. This allows for faster crc t10 diff
|
||||
transforms to be used if they are available.
|
||||
|
||||
config CRYPTO_CRCT10DIF_PCLMUL
|
||||
tristate "CRCT10DIF PCLMULQDQ hardware acceleration"
|
||||
depends on X86 && 64BIT && CRC_T10DIF
|
||||
select CRYPTO_HASH
|
||||
help
|
||||
For x86_64 processors with SSE4.2 and PCLMULQDQ supported,
|
||||
CRC T10 DIF PCLMULQDQ computation can be hardware
|
||||
accelerated PCLMULQDQ instruction. This option will create
|
||||
'crct10dif-plcmul' module, which is faster when computing the
|
||||
crct10dif checksum as compared with the generic table implementation.
|
||||
|
||||
config CRYPTO_GHASH
|
||||
tristate "GHASH digest algorithm"
|
||||
select CRYPTO_GF128MUL
|
||||
|
|
|
@ -83,7 +83,6 @@ obj-$(CONFIG_CRYPTO_ZLIB) += zlib.o
|
|||
obj-$(CONFIG_CRYPTO_MICHAEL_MIC) += michael_mic.o
|
||||
obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o
|
||||
obj-$(CONFIG_CRYPTO_CRC32) += crc32.o
|
||||
obj-$(CONFIG_CRYPTO_CRCT10DIF) += crct10dif.o
|
||||
obj-$(CONFIG_CRYPTO_AUTHENC) += authenc.o authencesn.o
|
||||
obj-$(CONFIG_CRYPTO_LZO) += lzo.o
|
||||
obj-$(CONFIG_CRYPTO_LZ4) += lz4.o
|
||||
|
|
|
@ -1,178 +0,0 @@
|
|||
/*
|
||||
* Cryptographic API.
|
||||
*
|
||||
* T10 Data Integrity Field CRC16 Crypto Transform
|
||||
*
|
||||
* Copyright (c) 2007 Oracle Corporation. All rights reserved.
|
||||
* Written by Martin K. Petersen <martin.petersen@oracle.com>
|
||||
* Copyright (C) 2013 Intel Corporation
|
||||
* Author: Tim Chen <tim.c.chen@linux.intel.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
||||
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/crc-t10dif.h>
|
||||
#include <crypto/internal/hash.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
struct chksum_desc_ctx {
|
||||
__u16 crc;
|
||||
};
|
||||
|
||||
/* Table generated using the following polynomium:
|
||||
* x^16 + x^15 + x^11 + x^9 + x^8 + x^7 + x^5 + x^4 + x^2 + x + 1
|
||||
* gt: 0x8bb7
|
||||
*/
|
||||
static const __u16 t10_dif_crc_table[256] = {
|
||||
0x0000, 0x8BB7, 0x9CD9, 0x176E, 0xB205, 0x39B2, 0x2EDC, 0xA56B,
|
||||
0xEFBD, 0x640A, 0x7364, 0xF8D3, 0x5DB8, 0xD60F, 0xC161, 0x4AD6,
|
||||
0x54CD, 0xDF7A, 0xC814, 0x43A3, 0xE6C8, 0x6D7F, 0x7A11, 0xF1A6,
|
||||
0xBB70, 0x30C7, 0x27A9, 0xAC1E, 0x0975, 0x82C2, 0x95AC, 0x1E1B,
|
||||
0xA99A, 0x222D, 0x3543, 0xBEF4, 0x1B9F, 0x9028, 0x8746, 0x0CF1,
|
||||
0x4627, 0xCD90, 0xDAFE, 0x5149, 0xF422, 0x7F95, 0x68FB, 0xE34C,
|
||||
0xFD57, 0x76E0, 0x618E, 0xEA39, 0x4F52, 0xC4E5, 0xD38B, 0x583C,
|
||||
0x12EA, 0x995D, 0x8E33, 0x0584, 0xA0EF, 0x2B58, 0x3C36, 0xB781,
|
||||
0xD883, 0x5334, 0x445A, 0xCFED, 0x6A86, 0xE131, 0xF65F, 0x7DE8,
|
||||
0x373E, 0xBC89, 0xABE7, 0x2050, 0x853B, 0x0E8C, 0x19E2, 0x9255,
|
||||
0x8C4E, 0x07F9, 0x1097, 0x9B20, 0x3E4B, 0xB5FC, 0xA292, 0x2925,
|
||||
0x63F3, 0xE844, 0xFF2A, 0x749D, 0xD1F6, 0x5A41, 0x4D2F, 0xC698,
|
||||
0x7119, 0xFAAE, 0xEDC0, 0x6677, 0xC31C, 0x48AB, 0x5FC5, 0xD472,
|
||||
0x9EA4, 0x1513, 0x027D, 0x89CA, 0x2CA1, 0xA716, 0xB078, 0x3BCF,
|
||||
0x25D4, 0xAE63, 0xB90D, 0x32BA, 0x97D1, 0x1C66, 0x0B08, 0x80BF,
|
||||
0xCA69, 0x41DE, 0x56B0, 0xDD07, 0x786C, 0xF3DB, 0xE4B5, 0x6F02,
|
||||
0x3AB1, 0xB106, 0xA668, 0x2DDF, 0x88B4, 0x0303, 0x146D, 0x9FDA,
|
||||
0xD50C, 0x5EBB, 0x49D5, 0xC262, 0x6709, 0xECBE, 0xFBD0, 0x7067,
|
||||
0x6E7C, 0xE5CB, 0xF2A5, 0x7912, 0xDC79, 0x57CE, 0x40A0, 0xCB17,
|
||||
0x81C1, 0x0A76, 0x1D18, 0x96AF, 0x33C4, 0xB873, 0xAF1D, 0x24AA,
|
||||
0x932B, 0x189C, 0x0FF2, 0x8445, 0x212E, 0xAA99, 0xBDF7, 0x3640,
|
||||
0x7C96, 0xF721, 0xE04F, 0x6BF8, 0xCE93, 0x4524, 0x524A, 0xD9FD,
|
||||
0xC7E6, 0x4C51, 0x5B3F, 0xD088, 0x75E3, 0xFE54, 0xE93A, 0x628D,
|
||||
0x285B, 0xA3EC, 0xB482, 0x3F35, 0x9A5E, 0x11E9, 0x0687, 0x8D30,
|
||||
0xE232, 0x6985, 0x7EEB, 0xF55C, 0x5037, 0xDB80, 0xCCEE, 0x4759,
|
||||
0x0D8F, 0x8638, 0x9156, 0x1AE1, 0xBF8A, 0x343D, 0x2353, 0xA8E4,
|
||||
0xB6FF, 0x3D48, 0x2A26, 0xA191, 0x04FA, 0x8F4D, 0x9823, 0x1394,
|
||||
0x5942, 0xD2F5, 0xC59B, 0x4E2C, 0xEB47, 0x60F0, 0x779E, 0xFC29,
|
||||
0x4BA8, 0xC01F, 0xD771, 0x5CC6, 0xF9AD, 0x721A, 0x6574, 0xEEC3,
|
||||
0xA415, 0x2FA2, 0x38CC, 0xB37B, 0x1610, 0x9DA7, 0x8AC9, 0x017E,
|
||||
0x1F65, 0x94D2, 0x83BC, 0x080B, 0xAD60, 0x26D7, 0x31B9, 0xBA0E,
|
||||
0xF0D8, 0x7B6F, 0x6C01, 0xE7B6, 0x42DD, 0xC96A, 0xDE04, 0x55B3
|
||||
};
|
||||
|
||||
__u16 crc_t10dif_generic(__u16 crc, const unsigned char *buffer, size_t len)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0 ; i < len ; i++)
|
||||
crc = (crc << 8) ^ t10_dif_crc_table[((crc >> 8) ^ buffer[i]) & 0xff];
|
||||
|
||||
return crc;
|
||||
}
|
||||
EXPORT_SYMBOL(crc_t10dif_generic);
|
||||
|
||||
/*
|
||||
* Steps through buffer one byte at at time, calculates reflected
|
||||
* crc using table.
|
||||
*/
|
||||
|
||||
static int chksum_init(struct shash_desc *desc)
|
||||
{
|
||||
struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
|
||||
|
||||
ctx->crc = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int chksum_update(struct shash_desc *desc, const u8 *data,
|
||||
unsigned int length)
|
||||
{
|
||||
struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
|
||||
|
||||
ctx->crc = crc_t10dif_generic(ctx->crc, data, length);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int chksum_final(struct shash_desc *desc, u8 *out)
|
||||
{
|
||||
struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
|
||||
|
||||
*(__u16 *)out = ctx->crc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __chksum_finup(__u16 *crcp, const u8 *data, unsigned int len,
|
||||
u8 *out)
|
||||
{
|
||||
*(__u16 *)out = crc_t10dif_generic(*crcp, data, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int chksum_finup(struct shash_desc *desc, const u8 *data,
|
||||
unsigned int len, u8 *out)
|
||||
{
|
||||
struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
|
||||
|
||||
return __chksum_finup(&ctx->crc, data, len, out);
|
||||
}
|
||||
|
||||
static int chksum_digest(struct shash_desc *desc, const u8 *data,
|
||||
unsigned int length, u8 *out)
|
||||
{
|
||||
struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
|
||||
|
||||
return __chksum_finup(&ctx->crc, data, length, out);
|
||||
}
|
||||
|
||||
static struct shash_alg alg = {
|
||||
.digestsize = CRC_T10DIF_DIGEST_SIZE,
|
||||
.init = chksum_init,
|
||||
.update = chksum_update,
|
||||
.final = chksum_final,
|
||||
.finup = chksum_finup,
|
||||
.digest = chksum_digest,
|
||||
.descsize = sizeof(struct chksum_desc_ctx),
|
||||
.base = {
|
||||
.cra_name = "crct10dif",
|
||||
.cra_driver_name = "crct10dif-generic",
|
||||
.cra_priority = 100,
|
||||
.cra_blocksize = CRC_T10DIF_BLOCK_SIZE,
|
||||
.cra_module = THIS_MODULE,
|
||||
}
|
||||
};
|
||||
|
||||
static int __init crct10dif_mod_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = crypto_register_shash(&alg);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void __exit crct10dif_mod_fini(void)
|
||||
{
|
||||
crypto_unregister_shash(&alg);
|
||||
}
|
||||
|
||||
module_init(crct10dif_mod_init);
|
||||
module_exit(crct10dif_mod_fini);
|
||||
|
||||
MODULE_AUTHOR("Tim Chen <tim.c.chen@linux.intel.com>");
|
||||
MODULE_DESCRIPTION("T10 DIF CRC calculation.");
|
||||
MODULE_LICENSE("GPL");
|
|
@ -1174,10 +1174,6 @@ static int do_test(int m)
|
|||
ret += tcrypt_test("ghash");
|
||||
break;
|
||||
|
||||
case 47:
|
||||
ret += tcrypt_test("crct10dif");
|
||||
break;
|
||||
|
||||
case 100:
|
||||
ret += tcrypt_test("hmac(md5)");
|
||||
break;
|
||||
|
@ -1502,10 +1498,6 @@ static int do_test(int m)
|
|||
test_hash_speed("crc32c", sec, generic_hash_speed_template);
|
||||
if (mode > 300 && mode < 400) break;
|
||||
|
||||
case 320:
|
||||
test_hash_speed("crct10dif", sec, generic_hash_speed_template);
|
||||
if (mode > 300 && mode < 400) break;
|
||||
|
||||
case 399:
|
||||
break;
|
||||
|
||||
|
|
|
@ -2045,16 +2045,6 @@ static const struct alg_test_desc alg_test_descs[] = {
|
|||
.count = CRC32C_TEST_VECTORS
|
||||
}
|
||||
}
|
||||
}, {
|
||||
.alg = "crct10dif",
|
||||
.test = alg_test_hash,
|
||||
.fips_allowed = 1,
|
||||
.suite = {
|
||||
.hash = {
|
||||
.vecs = crct10dif_tv_template,
|
||||
.count = CRCT10DIF_TEST_VECTORS
|
||||
}
|
||||
}
|
||||
}, {
|
||||
.alg = "cryptd(__driver-cbc-aes-aesni)",
|
||||
.test = alg_test_null,
|
||||
|
|
|
@ -450,39 +450,6 @@ static struct hash_testvec rmd320_tv_template[] = {
|
|||
}
|
||||
};
|
||||
|
||||
#define CRCT10DIF_TEST_VECTORS 3
|
||||
static struct hash_testvec crct10dif_tv_template[] = {
|
||||
{
|
||||
.plaintext = "abc",
|
||||
.psize = 3,
|
||||
#ifdef __LITTLE_ENDIAN
|
||||
.digest = "\x3b\x44",
|
||||
#else
|
||||
.digest = "\x44\x3b",
|
||||
#endif
|
||||
}, {
|
||||
.plaintext = "1234567890123456789012345678901234567890"
|
||||
"123456789012345678901234567890123456789",
|
||||
.psize = 79,
|
||||
#ifdef __LITTLE_ENDIAN
|
||||
.digest = "\x70\x4b",
|
||||
#else
|
||||
.digest = "\x4b\x70",
|
||||
#endif
|
||||
}, {
|
||||
.plaintext =
|
||||
"abcddddddddddddddddddddddddddddddddddddddddddddddddddddd",
|
||||
.psize = 56,
|
||||
#ifdef __LITTLE_ENDIAN
|
||||
.digest = "\xe3\x9c",
|
||||
#else
|
||||
.digest = "\x9c\xe3",
|
||||
#endif
|
||||
.np = 2,
|
||||
.tap = { 28, 28 }
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* SHA1 test vectors from from FIPS PUB 180-1
|
||||
* Long vector from CAVS 5.0
|
||||
|
|
|
@ -169,10 +169,8 @@ int acpi_create_platform_device(struct acpi_device *adev,
|
|||
-------------------------------------------------------------------------- */
|
||||
#if defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE)
|
||||
bool acpi_video_backlight_quirks(void);
|
||||
bool acpi_video_verify_backlight_support(void);
|
||||
#else
|
||||
static inline bool acpi_video_backlight_quirks(void) { return false; }
|
||||
static inline bool acpi_video_verify_backlight_support(void) { return false; }
|
||||
#endif
|
||||
|
||||
#endif /* _ACPI_INTERNAL_H_ */
|
||||
|
|
|
@ -911,7 +911,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
|
|||
if (acpi_video_init_brightness(device))
|
||||
return;
|
||||
|
||||
if (acpi_video_verify_backlight_support()) {
|
||||
if (acpi_video_backlight_support()) {
|
||||
struct backlight_properties props;
|
||||
struct pci_dev *pdev;
|
||||
acpi_handle acpi_parent;
|
||||
|
@ -1366,8 +1366,8 @@ acpi_video_switch_brightness(struct acpi_video_device *device, int event)
|
|||
unsigned long long level_current, level_next;
|
||||
int result = -EINVAL;
|
||||
|
||||
/* no warning message if acpi_backlight=vendor or a quirk is used */
|
||||
if (!acpi_video_verify_backlight_support())
|
||||
/* no warning message if acpi_backlight=vendor is used */
|
||||
if (!acpi_video_backlight_support())
|
||||
return 0;
|
||||
|
||||
if (!device->brightness)
|
||||
|
@ -1875,46 +1875,6 @@ static int acpi_video_bus_remove(struct acpi_device *device)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static acpi_status video_unregister_backlight(acpi_handle handle, u32 lvl,
|
||||
void *context, void **rv)
|
||||
{
|
||||
struct acpi_device *acpi_dev;
|
||||
struct acpi_video_bus *video;
|
||||
struct acpi_video_device *dev, *next;
|
||||
|
||||
if (acpi_bus_get_device(handle, &acpi_dev))
|
||||
return AE_OK;
|
||||
|
||||
if (acpi_match_device_ids(acpi_dev, video_device_ids))
|
||||
return AE_OK;
|
||||
|
||||
video = acpi_driver_data(acpi_dev);
|
||||
if (!video)
|
||||
return AE_OK;
|
||||
|
||||
acpi_video_bus_stop_devices(video);
|
||||
mutex_lock(&video->device_list_lock);
|
||||
list_for_each_entry_safe(dev, next, &video->video_device_list, entry) {
|
||||
if (dev->backlight) {
|
||||
backlight_device_unregister(dev->backlight);
|
||||
dev->backlight = NULL;
|
||||
kfree(dev->brightness->levels);
|
||||
kfree(dev->brightness);
|
||||
}
|
||||
if (dev->cooling_dev) {
|
||||
sysfs_remove_link(&dev->dev->dev.kobj,
|
||||
"thermal_cooling");
|
||||
sysfs_remove_link(&dev->cooling_dev->device.kobj,
|
||||
"device");
|
||||
thermal_cooling_device_unregister(dev->cooling_dev);
|
||||
dev->cooling_dev = NULL;
|
||||
}
|
||||
}
|
||||
mutex_unlock(&video->device_list_lock);
|
||||
acpi_video_bus_start_devices(video);
|
||||
return AE_OK;
|
||||
}
|
||||
|
||||
static int __init is_i740(struct pci_dev *dev)
|
||||
{
|
||||
if (dev->device == 0x00D1)
|
||||
|
@ -1946,25 +1906,14 @@ static int __init intel_opregion_present(void)
|
|||
return opregion;
|
||||
}
|
||||
|
||||
int __acpi_video_register(bool backlight_quirks)
|
||||
int acpi_video_register(void)
|
||||
{
|
||||
bool no_backlight;
|
||||
int result;
|
||||
|
||||
no_backlight = backlight_quirks ? acpi_video_backlight_quirks() : false;
|
||||
|
||||
int result = 0;
|
||||
if (register_count) {
|
||||
/*
|
||||
* If acpi_video_register() has been called already, don't try
|
||||
* to register acpi_video_bus, but unregister backlight devices
|
||||
* if no backlight support is requested.
|
||||
* if the function of acpi_video_register is already called,
|
||||
* don't register the acpi_vide_bus again and return no error.
|
||||
*/
|
||||
if (no_backlight)
|
||||
acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
|
||||
ACPI_UINT32_MAX,
|
||||
video_unregister_backlight,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1980,7 +1929,7 @@ int __acpi_video_register(bool backlight_quirks)
|
|||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(__acpi_video_register);
|
||||
EXPORT_SYMBOL(acpi_video_register);
|
||||
|
||||
void acpi_video_unregister(void)
|
||||
{
|
||||
|
|
|
@ -238,12 +238,7 @@ static void acpi_video_caps_check(void)
|
|||
|
||||
bool acpi_video_backlight_quirks(void)
|
||||
{
|
||||
if (acpi_gbl_osi_data >= ACPI_OSI_WIN_8) {
|
||||
acpi_video_caps_check();
|
||||
acpi_video_support |= ACPI_VIDEO_SKIP_BACKLIGHT;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return acpi_gbl_osi_data >= ACPI_OSI_WIN_8;
|
||||
}
|
||||
EXPORT_SYMBOL(acpi_video_backlight_quirks);
|
||||
|
||||
|
@ -291,14 +286,6 @@ int acpi_video_backlight_support(void)
|
|||
}
|
||||
EXPORT_SYMBOL(acpi_video_backlight_support);
|
||||
|
||||
/* For the ACPI video driver use only. */
|
||||
bool acpi_video_verify_backlight_support(void)
|
||||
{
|
||||
return (acpi_video_support & ACPI_VIDEO_SKIP_BACKLIGHT) ?
|
||||
false : acpi_video_backlight_support();
|
||||
}
|
||||
EXPORT_SYMBOL(acpi_video_verify_backlight_support);
|
||||
|
||||
/*
|
||||
* Use acpi_backlight=vendor/video to force that backlight switching
|
||||
* is processed by vendor specific acpi drivers or video.ko driver.
|
||||
|
|
|
@ -97,6 +97,15 @@ config SATA_AHCI_PLATFORM
|
|||
|
||||
If unsure, say N.
|
||||
|
||||
config AHCI_IMX
|
||||
tristate "Freescale i.MX AHCI SATA support"
|
||||
depends on SATA_AHCI_PLATFORM && MFD_SYSCON
|
||||
help
|
||||
This option enables support for the Freescale i.MX SoC's
|
||||
onboard AHCI SATA.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config SATA_FSL
|
||||
tristate "Freescale 3.0Gbps SATA support"
|
||||
depends on FSL_SOC
|
||||
|
@ -107,7 +116,7 @@ config SATA_FSL
|
|||
If unsure, say N.
|
||||
|
||||
config SATA_INIC162X
|
||||
tristate "Initio 162x SATA support"
|
||||
tristate "Initio 162x SATA support (Very Experimental)"
|
||||
depends on PCI
|
||||
help
|
||||
This option enables support for Initio 162x Serial ATA.
|
||||
|
|
|
@ -10,6 +10,7 @@ obj-$(CONFIG_SATA_INIC162X) += sata_inic162x.o
|
|||
obj-$(CONFIG_SATA_SIL24) += sata_sil24.o
|
||||
obj-$(CONFIG_SATA_DWC) += sata_dwc_460ex.o
|
||||
obj-$(CONFIG_SATA_HIGHBANK) += sata_highbank.o libahci.o
|
||||
obj-$(CONFIG_AHCI_IMX) += ahci_imx.o
|
||||
|
||||
# SFF w/ custom DMA
|
||||
obj-$(CONFIG_PDC_ADMA) += pdc_adma.o
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue