forked from Minki/linux
Merge branch 'arm-aesbs' of git://git.linaro.org/people/ardbiesheuvel/linux-arm into devel-stable
This commit is contained in:
commit
a56e74f546
3
CREDITS
3
CREDITS
@ -2808,8 +2808,7 @@ S: Ottawa, Ontario
|
||||
S: Canada K2P 0X8
|
||||
|
||||
N: Mikael Pettersson
|
||||
E: mikpe@it.uu.se
|
||||
W: http://user.it.uu.se/~mikpe/linux/
|
||||
E: mikpelinux@gmail.com
|
||||
D: Miscellaneous fixes
|
||||
|
||||
N: Reed H. Petty
|
||||
|
@ -18,17 +18,17 @@ this byte for application use, with the following caveats:
|
||||
parameters containing user virtual addresses *must* have
|
||||
their top byte cleared before trapping to the kernel.
|
||||
|
||||
(2) Tags are not guaranteed to be preserved when delivering
|
||||
signals. This means that signal handlers in applications
|
||||
making use of tags cannot rely on the tag information for
|
||||
user virtual addresses being maintained for fields inside
|
||||
siginfo_t. One exception to this rule is for signals raised
|
||||
in response to debug exceptions, where the tag information
|
||||
(2) Non-zero tags are not preserved when delivering signals.
|
||||
This means that signal handlers in applications making use
|
||||
of tags cannot rely on the tag information for user virtual
|
||||
addresses being maintained for fields inside siginfo_t.
|
||||
One exception to this rule is for signals raised in response
|
||||
to watchpoint debug exceptions, where the tag information
|
||||
will be preserved.
|
||||
|
||||
(3) Special care should be taken when using tagged pointers,
|
||||
since it is likely that C compilers will not hazard two
|
||||
addresses differing only in the upper bits.
|
||||
virtual addresses differing only in the upper byte.
|
||||
|
||||
The architecture prevents the use of a tagged PC, so the upper byte will
|
||||
be set to a sign-extension of bit 55 on exception return.
|
||||
|
@ -1,11 +1,11 @@
|
||||
* Samsung Exynos specific extensions to the Synopsis Designware Mobile
|
||||
* Samsung Exynos specific extensions to the Synopsys Designware Mobile
|
||||
Storage Host Controller
|
||||
|
||||
The Synopsis designware mobile storage host controller is used to interface
|
||||
The Synopsys designware mobile storage host controller is used to interface
|
||||
a SoC with storage medium such as eMMC or SD/MMC cards. This file documents
|
||||
differences between the core Synopsis dw mshc controller properties described
|
||||
by synopsis-dw-mshc.txt and the properties used by the Samsung Exynos specific
|
||||
extensions to the Synopsis Designware Mobile Storage Host Controller.
|
||||
differences between the core Synopsys dw mshc controller properties described
|
||||
by synopsys-dw-mshc.txt and the properties used by the Samsung Exynos specific
|
||||
extensions to the Synopsys Designware Mobile Storage Host Controller.
|
||||
|
||||
Required Properties:
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
* Rockchip specific extensions to the Synopsis Designware Mobile
|
||||
* Rockchip specific extensions to the Synopsys Designware Mobile
|
||||
Storage Host Controller
|
||||
|
||||
The Synopsis designware mobile storage host controller is used to interface
|
||||
The Synopsys designware mobile storage host controller is used to interface
|
||||
a SoC with storage medium such as eMMC or SD/MMC cards. This file documents
|
||||
differences between the core Synopsis dw mshc controller properties described
|
||||
by synopsis-dw-mshc.txt and the properties used by the Rockchip specific
|
||||
extensions to the Synopsis Designware Mobile Storage Host Controller.
|
||||
differences between the core Synopsys dw mshc controller properties described
|
||||
by synopsys-dw-mshc.txt and the properties used by the Rockchip specific
|
||||
extensions to the Synopsys Designware Mobile Storage Host Controller.
|
||||
|
||||
Required Properties:
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
* Synopsis Designware Mobile Storage Host Controller
|
||||
* Synopsys Designware Mobile Storage Host Controller
|
||||
|
||||
The Synopsis designware mobile storage host controller is used to interface
|
||||
The Synopsys designware mobile storage host controller is used to interface
|
||||
a SoC with storage medium such as eMMC or SD/MMC cards. This file documents
|
||||
differences between the core mmc properties described by mmc.txt and the
|
||||
properties used by the Synopsis Designware Mobile Storage Host Controller.
|
||||
properties used by the Synopsys Designware Mobile Storage Host Controller.
|
||||
|
||||
Required Properties:
|
||||
|
||||
* compatible: should be
|
||||
- snps,dw-mshc: for controllers compliant with synopsis dw-mshc.
|
||||
- snps,dw-mshc: for controllers compliant with synopsys dw-mshc.
|
||||
* #address-cells: should be 1.
|
||||
* #size-cells: should be 0.
|
||||
|
@ -1,4 +1,4 @@
|
||||
* Synopsis Designware PCIe interface
|
||||
* Synopsys Designware PCIe interface
|
||||
|
||||
Required properties:
|
||||
- compatible: should contain "snps,dw-pcie" to identify the
|
||||
|
@ -359,11 +359,9 @@ struct inode_operations {
|
||||
ssize_t (*listxattr) (struct dentry *, char *, size_t);
|
||||
int (*removexattr) (struct dentry *, const char *);
|
||||
void (*update_time)(struct inode *, struct timespec *, int);
|
||||
int (*atomic_open)(struct inode *, struct dentry *,
|
||||
int (*atomic_open)(struct inode *, struct dentry *, struct file *,
|
||||
unsigned open_flag, umode_t create_mode, int *opened);
|
||||
int (*tmpfile) (struct inode *, struct dentry *, umode_t);
|
||||
} ____cacheline_aligned;
|
||||
struct file *, unsigned open_flag,
|
||||
umode_t create_mode, int *opened);
|
||||
};
|
||||
|
||||
Again, all methods are called without any locks being held, unless
|
||||
@ -470,9 +468,11 @@ otherwise noted.
|
||||
method the filesystem can look up, possibly create and open the file in
|
||||
one atomic operation. If it cannot perform this (e.g. the file type
|
||||
turned out to be wrong) it may signal this by returning 1 instead of
|
||||
usual 0 or -ve . This method is only called if the last
|
||||
component is negative or needs lookup. Cached positive dentries are
|
||||
still handled by f_op->open().
|
||||
usual 0 or -ve . This method is only called if the last component is
|
||||
negative or needs lookup. Cached positive dentries are still handled by
|
||||
f_op->open(). If the file was created, the FILE_CREATED flag should be
|
||||
set in "opened". In case of O_EXCL the method must only succeed if the
|
||||
file didn't exist and hence FILE_CREATED shall always be set on success.
|
||||
|
||||
tmpfile: called in the end of O_TMPFILE open(). Optional, equivalent to
|
||||
atomically creating, opening and unlinking a file in given directory.
|
||||
|
@ -3485,6 +3485,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
|
||||
the unplug protocol
|
||||
never -- do not unplug even if version check succeeds
|
||||
|
||||
xen_nopvspin [X86,XEN]
|
||||
Disables the ticketlock slowpath using Xen PV
|
||||
optimizations.
|
||||
|
||||
xirc2ps_cs= [NET,PCMCIA]
|
||||
Format:
|
||||
<irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]]
|
||||
|
@ -1362,6 +1362,12 @@ To add ARP targets:
|
||||
To remove an ARP target:
|
||||
# echo -192.168.0.100 > /sys/class/net/bond0/bonding/arp_ip_target
|
||||
|
||||
To configure the interval between learning packet transmits:
|
||||
# echo 12 > /sys/class/net/bond0/bonding/lp_interval
|
||||
NOTE: the lp_inteval is the number of seconds between instances where
|
||||
the bonding driver sends learning packets to each slaves peer switch. The
|
||||
default interval is 1 second.
|
||||
|
||||
Example Configuration
|
||||
---------------------
|
||||
We begin with the same example that is shown in section 3.3,
|
||||
|
@ -66,9 +66,7 @@ rq->cfs.load value, which is the sum of the weights of the tasks queued on the
|
||||
runqueue.
|
||||
|
||||
CFS maintains a time-ordered rbtree, where all runnable tasks are sorted by the
|
||||
p->se.vruntime key (there is a subtraction using rq->cfs.min_vruntime to
|
||||
account for possible wraparounds). CFS picks the "leftmost" task from this
|
||||
tree and sticks to it.
|
||||
p->se.vruntime key. CFS picks the "leftmost" task from this tree and sticks to it.
|
||||
As the system progresses forwards, the executed tasks are put into the tree
|
||||
more and more to the right --- slowly but surely giving a chance for every task
|
||||
to become the "leftmost task" and thus get on the CPU within a deterministic
|
||||
|
@ -296,6 +296,12 @@ Cirrus Logic CS4206/4207
|
||||
imac27 IMac 27 Inch
|
||||
auto BIOS setup (default)
|
||||
|
||||
Cirrus Logic CS4208
|
||||
===================
|
||||
mba6 MacBook Air 6,1 and 6,2
|
||||
gpio0 Enable GPIO 0 amp
|
||||
auto BIOS setup (default)
|
||||
|
||||
VIA VT17xx/VT18xx/VT20xx
|
||||
========================
|
||||
auto BIOS setup (default)
|
||||
|
20
MAINTAINERS
20
MAINTAINERS
@ -1812,7 +1812,8 @@ S: Supported
|
||||
F: drivers/net/ethernet/broadcom/bnx2x/
|
||||
|
||||
BROADCOM BCM281XX/BCM11XXX ARM ARCHITECTURE
|
||||
M: Christian Daudt <csd@broadcom.com>
|
||||
M: Christian Daudt <bcm@fixthebug.org>
|
||||
L: bcm-kernel-feedback-list@broadcom.com
|
||||
T: git git://git.github.com/broadcom/bcm11351
|
||||
S: Maintained
|
||||
F: arch/arm/mach-bcm/
|
||||
@ -2639,6 +2640,18 @@ F: include/linux/device-mapper.h
|
||||
F: include/linux/dm-*.h
|
||||
F: include/uapi/linux/dm-*.h
|
||||
|
||||
DIGI NEO AND CLASSIC PCI PRODUCTS
|
||||
M: Lidza Louina <lidza.louina@gmail.com>
|
||||
L: driverdev-devel@linuxdriverproject.org
|
||||
S: Maintained
|
||||
F: drivers/staging/dgnc/
|
||||
|
||||
DIGI EPCA PCI PRODUCTS
|
||||
M: Lidza Louina <lidza.louina@gmail.com>
|
||||
L: driverdev-devel@linuxdriverproject.org
|
||||
S: Maintained
|
||||
F: drivers/staging/dgap/
|
||||
|
||||
DIOLAN U2C-12 I2C DRIVER
|
||||
M: Guenter Roeck <linux@roeck-us.net>
|
||||
L: linux-i2c@vger.kernel.org
|
||||
@ -6595,7 +6608,7 @@ S: Obsolete
|
||||
F: drivers/net/wireless/prism54/
|
||||
|
||||
PROMISE SATA TX2/TX4 CONTROLLER LIBATA DRIVER
|
||||
M: Mikael Pettersson <mikpe@it.uu.se>
|
||||
M: Mikael Pettersson <mikpelinux@gmail.com>
|
||||
L: linux-ide@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/ata/sata_promise.*
|
||||
@ -8724,9 +8737,8 @@ F: Documentation/hid/hiddev.txt
|
||||
F: drivers/hid/usbhid/
|
||||
|
||||
USB/IP DRIVERS
|
||||
M: Matt Mooney <mfm@muteddisk.com>
|
||||
L: linux-usb@vger.kernel.org
|
||||
S: Maintained
|
||||
S: Orphan
|
||||
F: drivers/staging/usbip/
|
||||
|
||||
USB ISP116X DRIVER
|
||||
|
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 12
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc1
|
||||
EXTRAVERSION = -rc3
|
||||
NAME = One Giant Leap for Frogkind
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -286,9 +286,6 @@ config HAVE_PERF_USER_STACK_DUMP
|
||||
config HAVE_ARCH_JUMP_LABEL
|
||||
bool
|
||||
|
||||
config HAVE_ARCH_MUTEX_CPU_RELAX
|
||||
bool
|
||||
|
||||
config HAVE_RCU_TABLE_FREE
|
||||
bool
|
||||
|
||||
|
@ -2243,8 +2243,7 @@ config NEON
|
||||
|
||||
config KERNEL_MODE_NEON
|
||||
bool "Support for NEON in kernel mode"
|
||||
default n
|
||||
depends on NEON
|
||||
depends on NEON && AEABI
|
||||
help
|
||||
Say Y to include support for NEON in kernel mode.
|
||||
|
||||
|
@ -183,6 +183,7 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
|
||||
am335x-evm.dtb \
|
||||
am335x-evmsk.dtb \
|
||||
am335x-bone.dtb \
|
||||
am335x-boneblack.dtb \
|
||||
am3517-evm.dtb \
|
||||
am3517_mt_ventoux.dtb \
|
||||
am43x-epos-evm.dtb
|
||||
|
262
arch/arm/boot/dts/am335x-bone-common.dtsi
Normal file
262
arch/arm/boot/dts/am335x-bone-common.dtsi
Normal file
@ -0,0 +1,262 @@
|
||||
/*
|
||||
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
/ {
|
||||
model = "TI AM335x BeagleBone";
|
||||
compatible = "ti,am335x-bone", "ti,am33xx";
|
||||
|
||||
cpus {
|
||||
cpu@0 {
|
||||
cpu0-supply = <&dcdc2_reg>;
|
||||
};
|
||||
};
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0x80000000 0x10000000>; /* 256 MB */
|
||||
};
|
||||
|
||||
am33xx_pinmux: pinmux@44e10800 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&clkout2_pin>;
|
||||
|
||||
user_leds_s0: user_leds_s0 {
|
||||
pinctrl-single,pins = <
|
||||
0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */
|
||||
0x58 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a6.gpio1_22 */
|
||||
0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a7.gpio1_23 */
|
||||
0x60 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a8.gpio1_24 */
|
||||
>;
|
||||
};
|
||||
|
||||
i2c0_pins: pinmux_i2c0_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */
|
||||
0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */
|
||||
>;
|
||||
};
|
||||
|
||||
uart0_pins: pinmux_uart0_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */
|
||||
0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
|
||||
>;
|
||||
};
|
||||
|
||||
clkout2_pin: pinmux_clkout2_pin {
|
||||
pinctrl-single,pins = <
|
||||
0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */
|
||||
>;
|
||||
};
|
||||
|
||||
cpsw_default: cpsw_default {
|
||||
pinctrl-single,pins = <
|
||||
/* Slave 1 */
|
||||
0x110 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxerr.mii1_rxerr */
|
||||
0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txen.mii1_txen */
|
||||
0x118 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxdv.mii1_rxdv */
|
||||
0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd3.mii1_txd3 */
|
||||
0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd2.mii1_txd2 */
|
||||
0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd1.mii1_txd1 */
|
||||
0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd0.mii1_txd0 */
|
||||
0x12c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_txclk.mii1_txclk */
|
||||
0x130 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxclk.mii1_rxclk */
|
||||
0x134 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd3.mii1_rxd3 */
|
||||
0x138 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd2.mii1_rxd2 */
|
||||
0x13c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd1.mii1_rxd1 */
|
||||
0x140 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd0.mii1_rxd0 */
|
||||
>;
|
||||
};
|
||||
|
||||
cpsw_sleep: cpsw_sleep {
|
||||
pinctrl-single,pins = <
|
||||
/* Slave 1 reset value */
|
||||
0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
>;
|
||||
};
|
||||
|
||||
davinci_mdio_default: davinci_mdio_default {
|
||||
pinctrl-single,pins = <
|
||||
/* MDIO */
|
||||
0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
|
||||
0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */
|
||||
>;
|
||||
};
|
||||
|
||||
davinci_mdio_sleep: davinci_mdio_sleep {
|
||||
pinctrl-single,pins = <
|
||||
/* MDIO reset value */
|
||||
0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
ocp {
|
||||
uart0: serial@44e09000 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins>;
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
musb: usb@47400000 {
|
||||
status = "okay";
|
||||
|
||||
control@44e10000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb-phy@47401300 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb-phy@47401b00 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb@47401000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb@47401800 {
|
||||
status = "okay";
|
||||
dr_mode = "host";
|
||||
};
|
||||
|
||||
dma-controller@07402000 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
i2c0: i2c@44e0b000 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0_pins>;
|
||||
|
||||
status = "okay";
|
||||
clock-frequency = <400000>;
|
||||
|
||||
tps: tps@24 {
|
||||
reg = <0x24>;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&user_leds_s0>;
|
||||
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led@2 {
|
||||
label = "beaglebone:green:heartbeat";
|
||||
gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@3 {
|
||||
label = "beaglebone:green:mmc0";
|
||||
gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "mmc0";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@4 {
|
||||
label = "beaglebone:green:usr2";
|
||||
gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@5 {
|
||||
label = "beaglebone:green:usr3";
|
||||
gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/include/ "tps65217.dtsi"
|
||||
|
||||
&tps {
|
||||
regulators {
|
||||
dcdc1_reg: regulator@0 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
dcdc2_reg: regulator@1 {
|
||||
/* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
|
||||
regulator-name = "vdd_mpu";
|
||||
regulator-min-microvolt = <925000>;
|
||||
regulator-max-microvolt = <1325000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
dcdc3_reg: regulator@2 {
|
||||
/* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
|
||||
regulator-name = "vdd_core";
|
||||
regulator-min-microvolt = <925000>;
|
||||
regulator-max-microvolt = <1150000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo1_reg: regulator@3 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo2_reg: regulator@4 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo3_reg: regulator@5 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo4_reg: regulator@6 {
|
||||
regulator-always-on;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&cpsw_emac0 {
|
||||
phy_id = <&davinci_mdio>, <0>;
|
||||
phy-mode = "mii";
|
||||
};
|
||||
|
||||
&cpsw_emac1 {
|
||||
phy_id = <&davinci_mdio>, <1>;
|
||||
phy-mode = "mii";
|
||||
};
|
||||
|
||||
&mac {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&cpsw_default>;
|
||||
pinctrl-1 = <&cpsw_sleep>;
|
||||
|
||||
};
|
||||
|
||||
&davinci_mdio {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&davinci_mdio_default>;
|
||||
pinctrl-1 = <&davinci_mdio_sleep>;
|
||||
};
|
@ -8,258 +8,4 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include "am33xx.dtsi"
|
||||
|
||||
/ {
|
||||
model = "TI AM335x BeagleBone";
|
||||
compatible = "ti,am335x-bone", "ti,am33xx";
|
||||
|
||||
cpus {
|
||||
cpu@0 {
|
||||
cpu0-supply = <&dcdc2_reg>;
|
||||
};
|
||||
};
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0x80000000 0x10000000>; /* 256 MB */
|
||||
};
|
||||
|
||||
am33xx_pinmux: pinmux@44e10800 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&clkout2_pin>;
|
||||
|
||||
user_leds_s0: user_leds_s0 {
|
||||
pinctrl-single,pins = <
|
||||
0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */
|
||||
0x58 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a6.gpio1_22 */
|
||||
0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a7.gpio1_23 */
|
||||
0x60 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a8.gpio1_24 */
|
||||
>;
|
||||
};
|
||||
|
||||
i2c0_pins: pinmux_i2c0_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */
|
||||
0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */
|
||||
>;
|
||||
};
|
||||
|
||||
uart0_pins: pinmux_uart0_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */
|
||||
0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
|
||||
>;
|
||||
};
|
||||
|
||||
clkout2_pin: pinmux_clkout2_pin {
|
||||
pinctrl-single,pins = <
|
||||
0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */
|
||||
>;
|
||||
};
|
||||
|
||||
cpsw_default: cpsw_default {
|
||||
pinctrl-single,pins = <
|
||||
/* Slave 1 */
|
||||
0x110 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxerr.mii1_rxerr */
|
||||
0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txen.mii1_txen */
|
||||
0x118 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxdv.mii1_rxdv */
|
||||
0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd3.mii1_txd3 */
|
||||
0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd2.mii1_txd2 */
|
||||
0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd1.mii1_txd1 */
|
||||
0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd0.mii1_txd0 */
|
||||
0x12c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_txclk.mii1_txclk */
|
||||
0x130 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxclk.mii1_rxclk */
|
||||
0x134 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd3.mii1_rxd3 */
|
||||
0x138 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd2.mii1_rxd2 */
|
||||
0x13c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd1.mii1_rxd1 */
|
||||
0x140 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd0.mii1_rxd0 */
|
||||
>;
|
||||
};
|
||||
|
||||
cpsw_sleep: cpsw_sleep {
|
||||
pinctrl-single,pins = <
|
||||
/* Slave 1 reset value */
|
||||
0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
>;
|
||||
};
|
||||
|
||||
davinci_mdio_default: davinci_mdio_default {
|
||||
pinctrl-single,pins = <
|
||||
/* MDIO */
|
||||
0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
|
||||
0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */
|
||||
>;
|
||||
};
|
||||
|
||||
davinci_mdio_sleep: davinci_mdio_sleep {
|
||||
pinctrl-single,pins = <
|
||||
/* MDIO reset value */
|
||||
0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
ocp {
|
||||
uart0: serial@44e09000 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins>;
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
musb: usb@47400000 {
|
||||
status = "okay";
|
||||
|
||||
control@44e10000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb-phy@47401300 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb-phy@47401b00 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb@47401000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb@47401800 {
|
||||
status = "okay";
|
||||
dr_mode = "host";
|
||||
};
|
||||
|
||||
dma-controller@07402000 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
i2c0: i2c@44e0b000 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0_pins>;
|
||||
|
||||
status = "okay";
|
||||
clock-frequency = <400000>;
|
||||
|
||||
tps: tps@24 {
|
||||
reg = <0x24>;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&user_leds_s0>;
|
||||
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led@2 {
|
||||
label = "beaglebone:green:heartbeat";
|
||||
gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@3 {
|
||||
label = "beaglebone:green:mmc0";
|
||||
gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "mmc0";
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@4 {
|
||||
label = "beaglebone:green:usr2";
|
||||
gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led@5 {
|
||||
label = "beaglebone:green:usr3";
|
||||
gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/include/ "tps65217.dtsi"
|
||||
|
||||
&tps {
|
||||
regulators {
|
||||
dcdc1_reg: regulator@0 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
dcdc2_reg: regulator@1 {
|
||||
/* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
|
||||
regulator-name = "vdd_mpu";
|
||||
regulator-min-microvolt = <925000>;
|
||||
regulator-max-microvolt = <1325000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
dcdc3_reg: regulator@2 {
|
||||
/* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
|
||||
regulator-name = "vdd_core";
|
||||
regulator-min-microvolt = <925000>;
|
||||
regulator-max-microvolt = <1150000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo1_reg: regulator@3 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo2_reg: regulator@4 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo3_reg: regulator@5 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo4_reg: regulator@6 {
|
||||
regulator-always-on;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&cpsw_emac0 {
|
||||
phy_id = <&davinci_mdio>, <0>;
|
||||
phy-mode = "mii";
|
||||
};
|
||||
|
||||
&cpsw_emac1 {
|
||||
phy_id = <&davinci_mdio>, <1>;
|
||||
phy-mode = "mii";
|
||||
};
|
||||
|
||||
&mac {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&cpsw_default>;
|
||||
pinctrl-1 = <&cpsw_sleep>;
|
||||
|
||||
};
|
||||
|
||||
&davinci_mdio {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&davinci_mdio_default>;
|
||||
pinctrl-1 = <&davinci_mdio_sleep>;
|
||||
};
|
||||
#include "am335x-bone-common.dtsi"
|
||||
|
17
arch/arm/boot/dts/am335x-boneblack.dts
Normal file
17
arch/arm/boot/dts/am335x-boneblack.dts
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
#include "am33xx.dtsi"
|
||||
#include "am335x-bone-common.dtsi"
|
||||
|
||||
&ldo3_reg {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-always-on;
|
||||
};
|
@ -187,7 +187,7 @@
|
||||
compatible = "fsl,imx27-cspi";
|
||||
reg = <0x1000e000 0x1000>;
|
||||
interrupts = <16>;
|
||||
clocks = <&clks 53>, <&clks 53>;
|
||||
clocks = <&clks 53>, <&clks 60>;
|
||||
clock-names = "ipg", "per";
|
||||
status = "disabled";
|
||||
};
|
||||
@ -198,7 +198,7 @@
|
||||
compatible = "fsl,imx27-cspi";
|
||||
reg = <0x1000f000 0x1000>;
|
||||
interrupts = <15>;
|
||||
clocks = <&clks 52>, <&clks 52>;
|
||||
clocks = <&clks 52>, <&clks 60>;
|
||||
clock-names = "ipg", "per";
|
||||
status = "disabled";
|
||||
};
|
||||
@ -309,7 +309,7 @@
|
||||
compatible = "fsl,imx27-cspi";
|
||||
reg = <0x10017000 0x1000>;
|
||||
interrupts = <6>;
|
||||
clocks = <&clks 51>, <&clks 51>;
|
||||
clocks = <&clks 51>, <&clks 60>;
|
||||
clock-names = "ipg", "per";
|
||||
status = "disabled";
|
||||
};
|
||||
|
@ -474,7 +474,7 @@
|
||||
compatible = "fsl,imx51-pata", "fsl,imx27-pata";
|
||||
reg = <0x83fe0000 0x4000>;
|
||||
interrupts = <70>;
|
||||
clocks = <&clks 161>;
|
||||
clocks = <&clks 172>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -207,8 +207,8 @@
|
||||
#define MX6QDL_PAD_EIM_D29__ECSPI4_SS0 0x0c8 0x3dc 0x824 0x2 0x1
|
||||
#define MX6QDL_PAD_EIM_D29__UART2_RTS_B 0x0c8 0x3dc 0x924 0x4 0x1
|
||||
#define MX6QDL_PAD_EIM_D29__UART2_CTS_B 0x0c8 0x3dc 0x000 0x4 0x0
|
||||
#define MX6QDL_PAD_EIM_D29__UART2_DTE_RTS_B 0x0c4 0x3dc 0x000 0x4 0x0
|
||||
#define MX6QDL_PAD_EIM_D29__UART2_DTE_CTS_B 0x0c4 0x3dc 0x924 0x4 0x1
|
||||
#define MX6QDL_PAD_EIM_D29__UART2_DTE_RTS_B 0x0c8 0x3dc 0x000 0x4 0x0
|
||||
#define MX6QDL_PAD_EIM_D29__UART2_DTE_CTS_B 0x0c8 0x3dc 0x924 0x4 0x1
|
||||
#define MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x0c8 0x3dc 0x000 0x5 0x0
|
||||
#define MX6QDL_PAD_EIM_D29__IPU2_CSI1_VSYNC 0x0c8 0x3dc 0x8e4 0x6 0x0
|
||||
#define MX6QDL_PAD_EIM_D29__IPU1_DI0_PIN14 0x0c8 0x3dc 0x000 0x7 0x0
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
/ {
|
||||
model = "TI OMAP3 BeagleBoard xM";
|
||||
compatible = "ti,omap3-beagle-xm, ti,omap3-beagle", "ti,omap3";
|
||||
compatible = "ti,omap3-beagle-xm", "ti,omap3-beagle", "ti,omap3";
|
||||
|
||||
cpus {
|
||||
cpu@0 {
|
||||
|
@ -48,6 +48,15 @@
|
||||
>;
|
||||
};
|
||||
|
||||
mcbsp2_pins: pinmux_mcbsp2_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x10c (PIN_INPUT | MUX_MODE0) /* mcbsp2_fsx.mcbsp2_fsx */
|
||||
0x10e (PIN_INPUT | MUX_MODE0) /* mcbsp2_clkx.mcbsp2_clkx */
|
||||
0x110 (PIN_INPUT | MUX_MODE0) /* mcbsp2_dr.mcbsp2.dr */
|
||||
0x112 (PIN_OUTPUT | MUX_MODE0) /* mcbsp2_dx.mcbsp2_dx */
|
||||
>;
|
||||
};
|
||||
|
||||
mmc1_pins: pinmux_mmc1_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x114 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_clk.sdmmc1_clk */
|
||||
@ -93,6 +102,11 @@
|
||||
clock-frequency = <400000>;
|
||||
};
|
||||
|
||||
&mcbsp2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mcbsp2_pins>;
|
||||
};
|
||||
|
||||
&mmc1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc1_pins>;
|
||||
|
@ -107,6 +107,19 @@
|
||||
*/
|
||||
clock-frequency = <19200000>;
|
||||
};
|
||||
|
||||
/* regulator for wl12xx on sdio5 */
|
||||
wl12xx_vmmc: wl12xx_vmmc {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wl12xx_gpio>;
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vwl1271";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
gpio = <&gpio2 11 0>;
|
||||
startup-delay-us = <70000>;
|
||||
enable-active-high;
|
||||
};
|
||||
};
|
||||
|
||||
&omap4_pmx_wkup {
|
||||
@ -235,6 +248,33 @@
|
||||
0x1c (PIN_OUTPUT | MUX_MODE3) /* gpio_wk8 */
|
||||
>;
|
||||
};
|
||||
|
||||
/*
|
||||
* wl12xx GPIO outputs for WLAN_EN, BT_EN, FM_EN, BT_WAKEUP
|
||||
* REVISIT: Are the pull-ups needed for GPIO 48 and 49?
|
||||
*/
|
||||
wl12xx_gpio: pinmux_wl12xx_gpio {
|
||||
pinctrl-single,pins = <
|
||||
0x26 (PIN_OUTPUT | MUX_MODE3) /* gpmc_a19.gpio_43 */
|
||||
0x2c (PIN_OUTPUT | MUX_MODE3) /* gpmc_a22.gpio_46 */
|
||||
0x30 (PIN_OUTPUT_PULLUP | MUX_MODE3) /* gpmc_a24.gpio_48 */
|
||||
0x32 (PIN_OUTPUT_PULLUP | MUX_MODE3) /* gpmc_a25.gpio_49 */
|
||||
>;
|
||||
};
|
||||
|
||||
/* wl12xx GPIO inputs and SDIO pins */
|
||||
wl12xx_pins: pinmux_wl12xx_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x38 (PIN_INPUT | MUX_MODE3) /* gpmc_ncs2.gpio_52 */
|
||||
0x3a (PIN_INPUT | MUX_MODE3) /* gpmc_ncs3.gpio_53 */
|
||||
0x108 (PIN_OUTPUT | MUX_MODE0) /* sdmmc5_clk.sdmmc5_clk */
|
||||
0x10a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_cmd.sdmmc5_cmd */
|
||||
0x10c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat0.sdmmc5_dat0 */
|
||||
0x10e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat1.sdmmc5_dat1 */
|
||||
0x110 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat2.sdmmc5_dat2 */
|
||||
0x112 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat3.sdmmc5_dat3 */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
@ -314,8 +354,12 @@
|
||||
};
|
||||
|
||||
&mmc5 {
|
||||
ti,non-removable;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wl12xx_pins>;
|
||||
vmmc-supply = <&wl12xx_vmmc>;
|
||||
non-removable;
|
||||
bus-width = <4>;
|
||||
cap-power-off-card;
|
||||
};
|
||||
|
||||
&emif1 {
|
||||
|
@ -140,6 +140,19 @@
|
||||
"DMic", "Digital Mic",
|
||||
"Digital Mic", "Digital Mic1 Bias";
|
||||
};
|
||||
|
||||
/* regulator for wl12xx on sdio5 */
|
||||
wl12xx_vmmc: wl12xx_vmmc {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wl12xx_gpio>;
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vwl1271";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
gpio = <&gpio2 22 0>;
|
||||
startup-delay-us = <70000>;
|
||||
enable-active-high;
|
||||
};
|
||||
};
|
||||
|
||||
&omap4_pmx_wkup {
|
||||
@ -295,6 +308,26 @@
|
||||
0xf0 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_sda */
|
||||
>;
|
||||
};
|
||||
|
||||
/* wl12xx GPIO output for WLAN_EN */
|
||||
wl12xx_gpio: pinmux_wl12xx_gpio {
|
||||
pinctrl-single,pins = <
|
||||
0x3c (PIN_OUTPUT | MUX_MODE3) /* gpmc_nwp.gpio_54 */
|
||||
>;
|
||||
};
|
||||
|
||||
/* wl12xx GPIO inputs and SDIO pins */
|
||||
wl12xx_pins: pinmux_wl12xx_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x3a (PIN_INPUT | MUX_MODE3) /* gpmc_ncs3.gpio_53 */
|
||||
0x108 (PIN_OUTPUT | MUX_MODE3) /* sdmmc5_clk.sdmmc5_clk */
|
||||
0x10a (PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc5_cmd.sdmmc5_cmd */
|
||||
0x10c (PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc5_dat0.sdmmc5_dat0 */
|
||||
0x10e (PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc5_dat1.sdmmc5_dat1 */
|
||||
0x110 (PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc5_dat2.sdmmc5_dat2 */
|
||||
0x112 (PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc5_dat3.sdmmc5_dat3 */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
@ -420,8 +453,12 @@
|
||||
};
|
||||
|
||||
&mmc5 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wl12xx_pins>;
|
||||
vmmc-supply = <&wl12xx_vmmc>;
|
||||
non-removable;
|
||||
bus-width = <4>;
|
||||
ti,non-removable;
|
||||
cap-power-off-card;
|
||||
};
|
||||
|
||||
&emif1 {
|
||||
|
@ -637,7 +637,7 @@
|
||||
omap_dwc3@4a020000 {
|
||||
compatible = "ti,dwc3";
|
||||
ti,hwmods = "usb_otg_ss";
|
||||
reg = <0x4a020000 0x1000>;
|
||||
reg = <0x4a020000 0x10000>;
|
||||
interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
@ -645,17 +645,18 @@
|
||||
ranges;
|
||||
dwc3@4a030000 {
|
||||
compatible = "snps,dwc3";
|
||||
reg = <0x4a030000 0x1000>;
|
||||
reg = <0x4a030000 0x10000>;
|
||||
interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
|
||||
usb-phy = <&usb2_phy>, <&usb3_phy>;
|
||||
tx-fifo-resize;
|
||||
};
|
||||
};
|
||||
|
||||
ocp2scp {
|
||||
ocp2scp@4a080000 {
|
||||
compatible = "ti,omap-ocp2scp";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0x4a080000 0x20>;
|
||||
ranges;
|
||||
ti,hwmods = "ocp2scp1";
|
||||
usb2_phy: usb2phy@4a084000 {
|
||||
|
@ -36,6 +36,7 @@ CONFIG_ARCH_TEGRA_114_SOC=y
|
||||
CONFIG_TEGRA_PCI=y
|
||||
CONFIG_TEGRA_EMC_SCALING_ENABLE=y
|
||||
CONFIG_ARCH_U8500=y
|
||||
CONFIG_MACH_HREFV60=y
|
||||
CONFIG_MACH_SNOWBALL=y
|
||||
CONFIG_MACH_UX500_DT=y
|
||||
CONFIG_ARCH_VEXPRESS=y
|
||||
@ -46,6 +47,7 @@ CONFIG_ARCH_ZYNQ=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_HIGHPTE=y
|
||||
CONFIG_ARM_APPENDED_DTB=y
|
||||
CONFIG_ARM_ATAG_DTB_COMPAT=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_INET=y
|
||||
|
@ -3,7 +3,17 @@
|
||||
#
|
||||
|
||||
obj-$(CONFIG_CRYPTO_AES_ARM) += aes-arm.o
|
||||
obj-$(CONFIG_CRYPTO_AES_ARM_BS) += aes-arm-bs.o
|
||||
obj-$(CONFIG_CRYPTO_SHA1_ARM) += sha1-arm.o
|
||||
|
||||
aes-arm-y := aes-armv4.o aes_glue.o
|
||||
sha1-arm-y := sha1-armv4-large.o sha1_glue.o
|
||||
aes-arm-y := aes-armv4.o aes_glue.o
|
||||
aes-arm-bs-y := aesbs-core.o aesbs-glue.o
|
||||
sha1-arm-y := sha1-armv4-large.o sha1_glue.o
|
||||
|
||||
quiet_cmd_perl = PERL $@
|
||||
cmd_perl = $(PERL) $(<) > $(@)
|
||||
|
||||
$(src)/aesbs-core.S_shipped: $(src)/bsaes-armv7.pl
|
||||
$(call cmd,perl)
|
||||
|
||||
.PRECIOUS: $(obj)/aesbs-core.S
|
||||
|
@ -148,7 +148,7 @@ AES_Te:
|
||||
@ const AES_KEY *key) {
|
||||
.align 5
|
||||
ENTRY(AES_encrypt)
|
||||
sub r3,pc,#8 @ AES_encrypt
|
||||
adr r3,AES_encrypt
|
||||
stmdb sp!,{r1,r4-r12,lr}
|
||||
mov r12,r0 @ inp
|
||||
mov r11,r2
|
||||
@ -381,7 +381,7 @@ _armv4_AES_encrypt:
|
||||
.align 5
|
||||
ENTRY(private_AES_set_encrypt_key)
|
||||
_armv4_AES_set_encrypt_key:
|
||||
sub r3,pc,#8 @ AES_set_encrypt_key
|
||||
adr r3,_armv4_AES_set_encrypt_key
|
||||
teq r0,#0
|
||||
moveq r0,#-1
|
||||
beq .Labrt
|
||||
@ -843,7 +843,7 @@ AES_Td:
|
||||
@ const AES_KEY *key) {
|
||||
.align 5
|
||||
ENTRY(AES_decrypt)
|
||||
sub r3,pc,#8 @ AES_decrypt
|
||||
adr r3,AES_decrypt
|
||||
stmdb sp!,{r1,r4-r12,lr}
|
||||
mov r12,r0 @ inp
|
||||
mov r11,r2
|
||||
|
@ -6,22 +6,12 @@
|
||||
#include <linux/crypto.h>
|
||||
#include <crypto/aes.h>
|
||||
|
||||
#define AES_MAXNR 14
|
||||
#include "aes_glue.h"
|
||||
|
||||
typedef struct {
|
||||
unsigned int rd_key[4 *(AES_MAXNR + 1)];
|
||||
int rounds;
|
||||
} AES_KEY;
|
||||
|
||||
struct AES_CTX {
|
||||
AES_KEY enc_key;
|
||||
AES_KEY dec_key;
|
||||
};
|
||||
|
||||
asmlinkage void AES_encrypt(const u8 *in, u8 *out, AES_KEY *ctx);
|
||||
asmlinkage void AES_decrypt(const u8 *in, u8 *out, AES_KEY *ctx);
|
||||
asmlinkage int private_AES_set_decrypt_key(const unsigned char *userKey, const int bits, AES_KEY *key);
|
||||
asmlinkage int private_AES_set_encrypt_key(const unsigned char *userKey, const int bits, AES_KEY *key);
|
||||
EXPORT_SYMBOL(AES_encrypt);
|
||||
EXPORT_SYMBOL(AES_decrypt);
|
||||
EXPORT_SYMBOL(private_AES_set_encrypt_key);
|
||||
EXPORT_SYMBOL(private_AES_set_decrypt_key);
|
||||
|
||||
static void aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)
|
||||
{
|
||||
@ -81,7 +71,7 @@ static struct crypto_alg aes_alg = {
|
||||
.cipher = {
|
||||
.cia_min_keysize = AES_MIN_KEY_SIZE,
|
||||
.cia_max_keysize = AES_MAX_KEY_SIZE,
|
||||
.cia_setkey = aes_set_key,
|
||||
.cia_setkey = aes_set_key,
|
||||
.cia_encrypt = aes_encrypt,
|
||||
.cia_decrypt = aes_decrypt
|
||||
}
|
||||
|
19
arch/arm/crypto/aes_glue.h
Normal file
19
arch/arm/crypto/aes_glue.h
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
#define AES_MAXNR 14
|
||||
|
||||
struct AES_KEY {
|
||||
unsigned int rd_key[4 * (AES_MAXNR + 1)];
|
||||
int rounds;
|
||||
};
|
||||
|
||||
struct AES_CTX {
|
||||
struct AES_KEY enc_key;
|
||||
struct AES_KEY dec_key;
|
||||
};
|
||||
|
||||
asmlinkage void AES_encrypt(const u8 *in, u8 *out, struct AES_KEY *ctx);
|
||||
asmlinkage void AES_decrypt(const u8 *in, u8 *out, struct AES_KEY *ctx);
|
||||
asmlinkage int private_AES_set_decrypt_key(const unsigned char *userKey,
|
||||
const int bits, struct AES_KEY *key);
|
||||
asmlinkage int private_AES_set_encrypt_key(const unsigned char *userKey,
|
||||
const int bits, struct AES_KEY *key);
|
2544
arch/arm/crypto/aesbs-core.S_shipped
Normal file
2544
arch/arm/crypto/aesbs-core.S_shipped
Normal file
File diff suppressed because it is too large
Load Diff
434
arch/arm/crypto/aesbs-glue.c
Normal file
434
arch/arm/crypto/aesbs-glue.c
Normal file
@ -0,0 +1,434 @@
|
||||
/*
|
||||
* linux/arch/arm/crypto/aesbs-glue.c - glue code for NEON bit sliced AES
|
||||
*
|
||||
* Copyright (C) 2013 Linaro Ltd <ard.biesheuvel@linaro.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <asm/neon.h>
|
||||
#include <crypto/aes.h>
|
||||
#include <crypto/ablk_helper.h>
|
||||
#include <crypto/algapi.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include "aes_glue.h"
|
||||
|
||||
#define BIT_SLICED_KEY_MAXSIZE (128 * (AES_MAXNR - 1) + 2 * AES_BLOCK_SIZE)
|
||||
|
||||
struct BS_KEY {
|
||||
struct AES_KEY rk;
|
||||
int converted;
|
||||
u8 __aligned(8) bs[BIT_SLICED_KEY_MAXSIZE];
|
||||
} __aligned(8);
|
||||
|
||||
asmlinkage void bsaes_enc_key_convert(u8 out[], struct AES_KEY const *in);
|
||||
asmlinkage void bsaes_dec_key_convert(u8 out[], struct AES_KEY const *in);
|
||||
|
||||
asmlinkage void bsaes_cbc_encrypt(u8 const in[], u8 out[], u32 bytes,
|
||||
struct BS_KEY *key, u8 iv[]);
|
||||
|
||||
asmlinkage void bsaes_ctr32_encrypt_blocks(u8 const in[], u8 out[], u32 blocks,
|
||||
struct BS_KEY *key, u8 const iv[]);
|
||||
|
||||
asmlinkage void bsaes_xts_encrypt(u8 const in[], u8 out[], u32 bytes,
|
||||
struct BS_KEY *key, u8 tweak[]);
|
||||
|
||||
asmlinkage void bsaes_xts_decrypt(u8 const in[], u8 out[], u32 bytes,
|
||||
struct BS_KEY *key, u8 tweak[]);
|
||||
|
||||
struct aesbs_cbc_ctx {
|
||||
struct AES_KEY enc;
|
||||
struct BS_KEY dec;
|
||||
};
|
||||
|
||||
struct aesbs_ctr_ctx {
|
||||
struct BS_KEY enc;
|
||||
};
|
||||
|
||||
struct aesbs_xts_ctx {
|
||||
struct BS_KEY enc;
|
||||
struct BS_KEY dec;
|
||||
struct AES_KEY twkey;
|
||||
};
|
||||
|
||||
static int aesbs_cbc_set_key(struct crypto_tfm *tfm, const u8 *in_key,
|
||||
unsigned int key_len)
|
||||
{
|
||||
struct aesbs_cbc_ctx *ctx = crypto_tfm_ctx(tfm);
|
||||
int bits = key_len * 8;
|
||||
|
||||
if (private_AES_set_encrypt_key(in_key, bits, &ctx->enc)) {
|
||||
tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
|
||||
return -EINVAL;
|
||||
}
|
||||
ctx->dec.rk = ctx->enc;
|
||||
private_AES_set_decrypt_key(in_key, bits, &ctx->dec.rk);
|
||||
ctx->dec.converted = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int aesbs_ctr_set_key(struct crypto_tfm *tfm, const u8 *in_key,
|
||||
unsigned int key_len)
|
||||
{
|
||||
struct aesbs_ctr_ctx *ctx = crypto_tfm_ctx(tfm);
|
||||
int bits = key_len * 8;
|
||||
|
||||
if (private_AES_set_encrypt_key(in_key, bits, &ctx->enc.rk)) {
|
||||
tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
|
||||
return -EINVAL;
|
||||
}
|
||||
ctx->enc.converted = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int aesbs_xts_set_key(struct crypto_tfm *tfm, const u8 *in_key,
|
||||
unsigned int key_len)
|
||||
{
|
||||
struct aesbs_xts_ctx *ctx = crypto_tfm_ctx(tfm);
|
||||
int bits = key_len * 4;
|
||||
|
||||
if (private_AES_set_encrypt_key(in_key, bits, &ctx->enc.rk)) {
|
||||
tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
|
||||
return -EINVAL;
|
||||
}
|
||||
ctx->dec.rk = ctx->enc.rk;
|
||||
private_AES_set_decrypt_key(in_key, bits, &ctx->dec.rk);
|
||||
private_AES_set_encrypt_key(in_key + key_len / 2, bits, &ctx->twkey);
|
||||
ctx->enc.converted = ctx->dec.converted = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int aesbs_cbc_encrypt(struct blkcipher_desc *desc,
|
||||
struct scatterlist *dst,
|
||||
struct scatterlist *src, unsigned int nbytes)
|
||||
{
|
||||
struct aesbs_cbc_ctx *ctx = crypto_blkcipher_ctx(desc->tfm);
|
||||
struct blkcipher_walk walk;
|
||||
int err;
|
||||
|
||||
blkcipher_walk_init(&walk, dst, src, nbytes);
|
||||
err = blkcipher_walk_virt(desc, &walk);
|
||||
|
||||
while (walk.nbytes) {
|
||||
u32 blocks = walk.nbytes / AES_BLOCK_SIZE;
|
||||
u8 *src = walk.src.virt.addr;
|
||||
|
||||
if (walk.dst.virt.addr == walk.src.virt.addr) {
|
||||
u8 *iv = walk.iv;
|
||||
|
||||
do {
|
||||
crypto_xor(src, iv, AES_BLOCK_SIZE);
|
||||
AES_encrypt(src, src, &ctx->enc);
|
||||
iv = src;
|
||||
src += AES_BLOCK_SIZE;
|
||||
} while (--blocks);
|
||||
memcpy(walk.iv, iv, AES_BLOCK_SIZE);
|
||||
} else {
|
||||
u8 *dst = walk.dst.virt.addr;
|
||||
|
||||
do {
|
||||
crypto_xor(walk.iv, src, AES_BLOCK_SIZE);
|
||||
AES_encrypt(walk.iv, dst, &ctx->enc);
|
||||
memcpy(walk.iv, dst, AES_BLOCK_SIZE);
|
||||
src += AES_BLOCK_SIZE;
|
||||
dst += AES_BLOCK_SIZE;
|
||||
} while (--blocks);
|
||||
}
|
||||
err = blkcipher_walk_done(desc, &walk, 0);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
static int aesbs_cbc_decrypt(struct blkcipher_desc *desc,
|
||||
struct scatterlist *dst,
|
||||
struct scatterlist *src, unsigned int nbytes)
|
||||
{
|
||||
struct aesbs_cbc_ctx *ctx = crypto_blkcipher_ctx(desc->tfm);
|
||||
struct blkcipher_walk walk;
|
||||
int err;
|
||||
|
||||
blkcipher_walk_init(&walk, dst, src, nbytes);
|
||||
err = blkcipher_walk_virt_block(desc, &walk, 8 * AES_BLOCK_SIZE);
|
||||
|
||||
while ((walk.nbytes / AES_BLOCK_SIZE) >= 8) {
|
||||
kernel_neon_begin();
|
||||
bsaes_cbc_encrypt(walk.src.virt.addr, walk.dst.virt.addr,
|
||||
walk.nbytes, &ctx->dec, walk.iv);
|
||||
kernel_neon_end();
|
||||
err = blkcipher_walk_done(desc, &walk, 0);
|
||||
}
|
||||
while (walk.nbytes) {
|
||||
u32 blocks = walk.nbytes / AES_BLOCK_SIZE;
|
||||
u8 *dst = walk.dst.virt.addr;
|
||||
u8 *src = walk.src.virt.addr;
|
||||
u8 bk[2][AES_BLOCK_SIZE];
|
||||
u8 *iv = walk.iv;
|
||||
|
||||
do {
|
||||
if (walk.dst.virt.addr == walk.src.virt.addr)
|
||||
memcpy(bk[blocks & 1], src, AES_BLOCK_SIZE);
|
||||
|
||||
AES_decrypt(src, dst, &ctx->dec.rk);
|
||||
crypto_xor(dst, iv, AES_BLOCK_SIZE);
|
||||
|
||||
if (walk.dst.virt.addr == walk.src.virt.addr)
|
||||
iv = bk[blocks & 1];
|
||||
else
|
||||
iv = src;
|
||||
|
||||
dst += AES_BLOCK_SIZE;
|
||||
src += AES_BLOCK_SIZE;
|
||||
} while (--blocks);
|
||||
err = blkcipher_walk_done(desc, &walk, 0);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
static void inc_be128_ctr(__be32 ctr[], u32 addend)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 3; i >= 0; i--, addend = 1) {
|
||||
u32 n = be32_to_cpu(ctr[i]) + addend;
|
||||
|
||||
ctr[i] = cpu_to_be32(n);
|
||||
if (n >= addend)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static int aesbs_ctr_encrypt(struct blkcipher_desc *desc,
|
||||
struct scatterlist *dst, struct scatterlist *src,
|
||||
unsigned int nbytes)
|
||||
{
|
||||
struct aesbs_ctr_ctx *ctx = crypto_blkcipher_ctx(desc->tfm);
|
||||
struct blkcipher_walk walk;
|
||||
u32 blocks;
|
||||
int err;
|
||||
|
||||
blkcipher_walk_init(&walk, dst, src, nbytes);
|
||||
err = blkcipher_walk_virt_block(desc, &walk, 8 * AES_BLOCK_SIZE);
|
||||
|
||||
while ((blocks = walk.nbytes / AES_BLOCK_SIZE)) {
|
||||
u32 tail = walk.nbytes % AES_BLOCK_SIZE;
|
||||
__be32 *ctr = (__be32 *)walk.iv;
|
||||
u32 headroom = UINT_MAX - be32_to_cpu(ctr[3]);
|
||||
|
||||
/* avoid 32 bit counter overflow in the NEON code */
|
||||
if (unlikely(headroom < blocks)) {
|
||||
blocks = headroom + 1;
|
||||
tail = walk.nbytes - blocks * AES_BLOCK_SIZE;
|
||||
}
|
||||
kernel_neon_begin();
|
||||
bsaes_ctr32_encrypt_blocks(walk.src.virt.addr,
|
||||
walk.dst.virt.addr, blocks,
|
||||
&ctx->enc, walk.iv);
|
||||
kernel_neon_end();
|
||||
inc_be128_ctr(ctr, blocks);
|
||||
|
||||
nbytes -= blocks * AES_BLOCK_SIZE;
|
||||
if (nbytes && nbytes == tail && nbytes <= AES_BLOCK_SIZE)
|
||||
break;
|
||||
|
||||
err = blkcipher_walk_done(desc, &walk, tail);
|
||||
}
|
||||
if (walk.nbytes) {
|
||||
u8 *tdst = walk.dst.virt.addr + blocks * AES_BLOCK_SIZE;
|
||||
u8 *tsrc = walk.src.virt.addr + blocks * AES_BLOCK_SIZE;
|
||||
u8 ks[AES_BLOCK_SIZE];
|
||||
|
||||
AES_encrypt(walk.iv, ks, &ctx->enc.rk);
|
||||
if (tdst != tsrc)
|
||||
memcpy(tdst, tsrc, nbytes);
|
||||
crypto_xor(tdst, ks, nbytes);
|
||||
err = blkcipher_walk_done(desc, &walk, 0);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
static int aesbs_xts_encrypt(struct blkcipher_desc *desc,
|
||||
struct scatterlist *dst,
|
||||
struct scatterlist *src, unsigned int nbytes)
|
||||
{
|
||||
struct aesbs_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm);
|
||||
struct blkcipher_walk walk;
|
||||
int err;
|
||||
|
||||
blkcipher_walk_init(&walk, dst, src, nbytes);
|
||||
err = blkcipher_walk_virt_block(desc, &walk, 8 * AES_BLOCK_SIZE);
|
||||
|
||||
/* generate the initial tweak */
|
||||
AES_encrypt(walk.iv, walk.iv, &ctx->twkey);
|
||||
|
||||
while (walk.nbytes) {
|
||||
kernel_neon_begin();
|
||||
bsaes_xts_encrypt(walk.src.virt.addr, walk.dst.virt.addr,
|
||||
walk.nbytes, &ctx->enc, walk.iv);
|
||||
kernel_neon_end();
|
||||
err = blkcipher_walk_done(desc, &walk, 0);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
static int aesbs_xts_decrypt(struct blkcipher_desc *desc,
|
||||
struct scatterlist *dst,
|
||||
struct scatterlist *src, unsigned int nbytes)
|
||||
{
|
||||
struct aesbs_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm);
|
||||
struct blkcipher_walk walk;
|
||||
int err;
|
||||
|
||||
blkcipher_walk_init(&walk, dst, src, nbytes);
|
||||
err = blkcipher_walk_virt_block(desc, &walk, 8 * AES_BLOCK_SIZE);
|
||||
|
||||
/* generate the initial tweak */
|
||||
AES_encrypt(walk.iv, walk.iv, &ctx->twkey);
|
||||
|
||||
while (walk.nbytes) {
|
||||
kernel_neon_begin();
|
||||
bsaes_xts_decrypt(walk.src.virt.addr, walk.dst.virt.addr,
|
||||
walk.nbytes, &ctx->dec, walk.iv);
|
||||
kernel_neon_end();
|
||||
err = blkcipher_walk_done(desc, &walk, 0);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
static struct crypto_alg aesbs_algs[] = { {
|
||||
.cra_name = "__cbc-aes-neonbs",
|
||||
.cra_driver_name = "__driver-cbc-aes-neonbs",
|
||||
.cra_priority = 0,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER,
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct aesbs_cbc_ctx),
|
||||
.cra_alignmask = 7,
|
||||
.cra_type = &crypto_blkcipher_type,
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_blkcipher = {
|
||||
.min_keysize = AES_MIN_KEY_SIZE,
|
||||
.max_keysize = AES_MAX_KEY_SIZE,
|
||||
.ivsize = AES_BLOCK_SIZE,
|
||||
.setkey = aesbs_cbc_set_key,
|
||||
.encrypt = aesbs_cbc_encrypt,
|
||||
.decrypt = aesbs_cbc_decrypt,
|
||||
},
|
||||
}, {
|
||||
.cra_name = "__ctr-aes-neonbs",
|
||||
.cra_driver_name = "__driver-ctr-aes-neonbs",
|
||||
.cra_priority = 0,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER,
|
||||
.cra_blocksize = 1,
|
||||
.cra_ctxsize = sizeof(struct aesbs_ctr_ctx),
|
||||
.cra_alignmask = 7,
|
||||
.cra_type = &crypto_blkcipher_type,
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_blkcipher = {
|
||||
.min_keysize = AES_MIN_KEY_SIZE,
|
||||
.max_keysize = AES_MAX_KEY_SIZE,
|
||||
.ivsize = AES_BLOCK_SIZE,
|
||||
.setkey = aesbs_ctr_set_key,
|
||||
.encrypt = aesbs_ctr_encrypt,
|
||||
.decrypt = aesbs_ctr_encrypt,
|
||||
},
|
||||
}, {
|
||||
.cra_name = "__xts-aes-neonbs",
|
||||
.cra_driver_name = "__driver-xts-aes-neonbs",
|
||||
.cra_priority = 0,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER,
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct aesbs_xts_ctx),
|
||||
.cra_alignmask = 7,
|
||||
.cra_type = &crypto_blkcipher_type,
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_blkcipher = {
|
||||
.min_keysize = 2 * AES_MIN_KEY_SIZE,
|
||||
.max_keysize = 2 * AES_MAX_KEY_SIZE,
|
||||
.ivsize = AES_BLOCK_SIZE,
|
||||
.setkey = aesbs_xts_set_key,
|
||||
.encrypt = aesbs_xts_encrypt,
|
||||
.decrypt = aesbs_xts_decrypt,
|
||||
},
|
||||
}, {
|
||||
.cra_name = "cbc(aes)",
|
||||
.cra_driver_name = "cbc-aes-neonbs",
|
||||
.cra_priority = 300,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER|CRYPTO_ALG_ASYNC,
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct async_helper_ctx),
|
||||
.cra_alignmask = 7,
|
||||
.cra_type = &crypto_ablkcipher_type,
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_init = ablk_init,
|
||||
.cra_exit = ablk_exit,
|
||||
.cra_ablkcipher = {
|
||||
.min_keysize = AES_MIN_KEY_SIZE,
|
||||
.max_keysize = AES_MAX_KEY_SIZE,
|
||||
.ivsize = AES_BLOCK_SIZE,
|
||||
.setkey = ablk_set_key,
|
||||
.encrypt = __ablk_encrypt,
|
||||
.decrypt = ablk_decrypt,
|
||||
}
|
||||
}, {
|
||||
.cra_name = "ctr(aes)",
|
||||
.cra_driver_name = "ctr-aes-neonbs",
|
||||
.cra_priority = 300,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER|CRYPTO_ALG_ASYNC,
|
||||
.cra_blocksize = 1,
|
||||
.cra_ctxsize = sizeof(struct async_helper_ctx),
|
||||
.cra_alignmask = 7,
|
||||
.cra_type = &crypto_ablkcipher_type,
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_init = ablk_init,
|
||||
.cra_exit = ablk_exit,
|
||||
.cra_ablkcipher = {
|
||||
.min_keysize = AES_MIN_KEY_SIZE,
|
||||
.max_keysize = AES_MAX_KEY_SIZE,
|
||||
.ivsize = AES_BLOCK_SIZE,
|
||||
.setkey = ablk_set_key,
|
||||
.encrypt = ablk_encrypt,
|
||||
.decrypt = ablk_decrypt,
|
||||
}
|
||||
}, {
|
||||
.cra_name = "xts(aes)",
|
||||
.cra_driver_name = "xts-aes-neonbs",
|
||||
.cra_priority = 300,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER|CRYPTO_ALG_ASYNC,
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct async_helper_ctx),
|
||||
.cra_alignmask = 7,
|
||||
.cra_type = &crypto_ablkcipher_type,
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_init = ablk_init,
|
||||
.cra_exit = ablk_exit,
|
||||
.cra_ablkcipher = {
|
||||
.min_keysize = 2 * AES_MIN_KEY_SIZE,
|
||||
.max_keysize = 2 * AES_MAX_KEY_SIZE,
|
||||
.ivsize = AES_BLOCK_SIZE,
|
||||
.setkey = ablk_set_key,
|
||||
.encrypt = ablk_encrypt,
|
||||
.decrypt = ablk_decrypt,
|
||||
}
|
||||
} };
|
||||
|
||||
static int __init aesbs_mod_init(void)
|
||||
{
|
||||
if (!cpu_has_neon())
|
||||
return -ENODEV;
|
||||
|
||||
return crypto_register_algs(aesbs_algs, ARRAY_SIZE(aesbs_algs));
|
||||
}
|
||||
|
||||
static void __exit aesbs_mod_exit(void)
|
||||
{
|
||||
crypto_unregister_algs(aesbs_algs, ARRAY_SIZE(aesbs_algs));
|
||||
}
|
||||
|
||||
module_init(aesbs_mod_init);
|
||||
module_exit(aesbs_mod_exit);
|
||||
|
||||
MODULE_DESCRIPTION("Bit sliced AES in CBC/CTR/XTS modes using NEON");
|
||||
MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>");
|
||||
MODULE_LICENSE("GPL");
|
2467
arch/arm/crypto/bsaes-armv7.pl
Normal file
2467
arch/arm/crypto/bsaes-armv7.pl
Normal file
File diff suppressed because it is too large
Load Diff
@ -24,6 +24,7 @@ generic-y += sembuf.h
|
||||
generic-y += serial.h
|
||||
generic-y += shmbuf.h
|
||||
generic-y += siginfo.h
|
||||
generic-y += simd.h
|
||||
generic-y += sizes.h
|
||||
generic-y += socket.h
|
||||
generic-y += sockios.h
|
||||
|
@ -19,6 +19,13 @@
|
||||
#include <asm/unified.h>
|
||||
#include <asm/compiler.h>
|
||||
|
||||
#if __LINUX_ARM_ARCH__ < 6
|
||||
#include <asm-generic/uaccess-unaligned.h>
|
||||
#else
|
||||
#define __get_user_unaligned __get_user
|
||||
#define __put_user_unaligned __put_user
|
||||
#endif
|
||||
|
||||
#define VERIFY_READ 0
|
||||
#define VERIFY_WRITE 1
|
||||
|
||||
|
@ -442,10 +442,10 @@ local_restart:
|
||||
ldrcc pc, [tbl, scno, lsl #2] @ call sys_* routine
|
||||
|
||||
add r1, sp, #S_OFF
|
||||
cmp scno, #(__ARM_NR_BASE - __NR_SYSCALL_BASE)
|
||||
2: cmp scno, #(__ARM_NR_BASE - __NR_SYSCALL_BASE)
|
||||
eor r0, scno, #__NR_SYSCALL_BASE @ put OS number back
|
||||
bcs arm_syscall
|
||||
2: mov why, #0 @ no longer a real syscall
|
||||
mov why, #0 @ no longer a real syscall
|
||||
b sys_ni_syscall @ not private func
|
||||
|
||||
#if defined(CONFIG_OABI_COMPAT) || !defined(CONFIG_AEABI)
|
||||
|
@ -329,10 +329,10 @@
|
||||
#ifdef CONFIG_CONTEXT_TRACKING
|
||||
.if \save
|
||||
stmdb sp!, {r0-r3, ip, lr}
|
||||
bl user_exit
|
||||
bl context_tracking_user_exit
|
||||
ldmia sp!, {r0-r3, ip, lr}
|
||||
.else
|
||||
bl user_exit
|
||||
bl context_tracking_user_exit
|
||||
.endif
|
||||
#endif
|
||||
.endm
|
||||
@ -341,10 +341,10 @@
|
||||
#ifdef CONFIG_CONTEXT_TRACKING
|
||||
.if \save
|
||||
stmdb sp!, {r0-r3, ip, lr}
|
||||
bl user_enter
|
||||
bl context_tracking_user_enter
|
||||
ldmia sp!, {r0-r3, ip, lr}
|
||||
.else
|
||||
bl user_enter
|
||||
bl context_tracking_user_enter
|
||||
.endif
|
||||
#endif
|
||||
.endm
|
||||
|
@ -90,6 +90,7 @@ struct clk *imx_clk_fixup_mux(const char *name, void __iomem *reg,
|
||||
init.ops = &clk_fixup_mux_ops;
|
||||
init.parent_names = parents;
|
||||
init.num_parents = num_parents;
|
||||
init.flags = 0;
|
||||
|
||||
fixup_mux->mux.reg = reg;
|
||||
fixup_mux->mux.shift = shift;
|
||||
|
@ -285,7 +285,7 @@ int __init mx27_clocks_init(unsigned long fref)
|
||||
clk_register_clkdev(clk[ata_ahb_gate], "ata", NULL);
|
||||
clk_register_clkdev(clk[rtc_ipg_gate], NULL, "imx21-rtc");
|
||||
clk_register_clkdev(clk[scc_ipg_gate], "scc", NULL);
|
||||
clk_register_clkdev(clk[cpu_div], NULL, "cpufreq-cpu0.0");
|
||||
clk_register_clkdev(clk[cpu_div], NULL, "cpu0");
|
||||
clk_register_clkdev(clk[emi_ahb_gate], "emi_ahb" , NULL);
|
||||
|
||||
mxc_timer_init(MX27_IO_ADDRESS(MX27_GPT1_BASE_ADDR), MX27_INT_GPT1);
|
||||
|
@ -328,7 +328,7 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,
|
||||
clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1");
|
||||
clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "imx-ssi.2");
|
||||
clk_register_clkdev(clk[sdma_gate], NULL, "imx35-sdma");
|
||||
clk_register_clkdev(clk[cpu_podf], NULL, "cpufreq-cpu0.0");
|
||||
clk_register_clkdev(clk[cpu_podf], NULL, "cpu0");
|
||||
clk_register_clkdev(clk[iim_gate], "iim", NULL);
|
||||
clk_register_clkdev(clk[dummy], NULL, "imx2-wdt.0");
|
||||
clk_register_clkdev(clk[dummy], NULL, "imx2-wdt.1");
|
||||
@ -397,7 +397,7 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
|
||||
mx51_spdif_xtal_sel, ARRAY_SIZE(mx51_spdif_xtal_sel));
|
||||
clk[spdif1_sel] = imx_clk_mux("spdif1_sel", MXC_CCM_CSCMR2, 2, 2,
|
||||
spdif_sel, ARRAY_SIZE(spdif_sel));
|
||||
clk[spdif1_pred] = imx_clk_divider("spdif1_podf", "spdif1_sel", MXC_CCM_CDCDR, 16, 3);
|
||||
clk[spdif1_pred] = imx_clk_divider("spdif1_pred", "spdif1_sel", MXC_CCM_CDCDR, 16, 3);
|
||||
clk[spdif1_podf] = imx_clk_divider("spdif1_podf", "spdif1_pred", MXC_CCM_CDCDR, 9, 6);
|
||||
clk[spdif1_com_sel] = imx_clk_mux("spdif1_com_sel", MXC_CCM_CSCMR2, 5, 1,
|
||||
mx51_spdif1_com_sel, ARRAY_SIZE(mx51_spdif1_com_sel));
|
||||
|
@ -233,10 +233,15 @@ put_node:
|
||||
of_node_put(np);
|
||||
}
|
||||
|
||||
static void __init imx6q_opp_init(struct device *cpu_dev)
|
||||
static void __init imx6q_opp_init(void)
|
||||
{
|
||||
struct device_node *np;
|
||||
struct device *cpu_dev = get_cpu_device(0);
|
||||
|
||||
if (!cpu_dev) {
|
||||
pr_warn("failed to get cpu0 device\n");
|
||||
return;
|
||||
}
|
||||
np = of_node_get(cpu_dev->of_node);
|
||||
if (!np) {
|
||||
pr_warn("failed to find cpu0 node\n");
|
||||
@ -268,7 +273,7 @@ static void __init imx6q_init_late(void)
|
||||
imx6q_cpuidle_init();
|
||||
|
||||
if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) {
|
||||
imx6q_opp_init(&imx6q_cpufreq_pdev.dev);
|
||||
imx6q_opp_init();
|
||||
platform_device_register(&imx6q_cpufreq_pdev);
|
||||
}
|
||||
}
|
||||
|
@ -117,6 +117,17 @@ void __init imx_init_l2cache(void)
|
||||
/* Configure the L2 PREFETCH and POWER registers */
|
||||
val = readl_relaxed(l2x0_base + L2X0_PREFETCH_CTRL);
|
||||
val |= 0x70800000;
|
||||
/*
|
||||
* The L2 cache controller(PL310) version on the i.MX6D/Q is r3p1-50rel0
|
||||
* The L2 cache controller(PL310) version on the i.MX6DL/SOLO/SL is r3p2
|
||||
* But according to ARM PL310 errata: 752271
|
||||
* ID: 752271: Double linefill feature can cause data corruption
|
||||
* Fault Status: Present in: r3p0, r3p1, r3p1-50rel0. Fixed in r3p2
|
||||
* Workaround: The only workaround to this erratum is to disable the
|
||||
* double linefill feature. This is the default behavior.
|
||||
*/
|
||||
if (cpu_is_imx6q())
|
||||
val &= ~(1 << 30 | 1 << 23);
|
||||
writel_relaxed(val, l2x0_base + L2X0_PREFETCH_CTRL);
|
||||
val = L2X0_DYNAMIC_CLK_GATING_EN | L2X0_STNDBY_MODE_EN;
|
||||
writel_relaxed(val, l2x0_base + L2X0_POWER_CTRL);
|
||||
|
@ -1632,7 +1632,7 @@ static struct omap_clk omap44xx_clks[] = {
|
||||
CLK(NULL, "auxclk5_src_ck", &auxclk5_src_ck),
|
||||
CLK(NULL, "auxclk5_ck", &auxclk5_ck),
|
||||
CLK(NULL, "auxclkreq5_ck", &auxclkreq5_ck),
|
||||
CLK("omap-gpmc", "fck", &dummy_ck),
|
||||
CLK("50000000.gpmc", "fck", &dummy_ck),
|
||||
CLK("omap_i2c.1", "ick", &dummy_ck),
|
||||
CLK("omap_i2c.2", "ick", &dummy_ck),
|
||||
CLK("omap_i2c.3", "ick", &dummy_ck),
|
||||
|
@ -143,7 +143,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
|
||||
* Call idle CPU cluster PM exit notifier chain
|
||||
* to restore GIC and wakeupgen context.
|
||||
*/
|
||||
if ((cx->mpu_state == PWRDM_POWER_RET) &&
|
||||
if (dev->cpu == 0 && (cx->mpu_state == PWRDM_POWER_RET) &&
|
||||
(cx->mpu_logic_state == PWRDM_POWER_OFF))
|
||||
cpu_cluster_pm_exit();
|
||||
|
||||
|
@ -1491,8 +1491,8 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,
|
||||
*/
|
||||
ret = gpmc_cs_remap(cs, res.start);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "cannot remap GPMC CS %d to 0x%x\n",
|
||||
cs, res.start);
|
||||
dev_err(&pdev->dev, "cannot remap GPMC CS %d to %pa\n",
|
||||
cs, &res.start);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
@ -620,7 +620,7 @@ static struct omap_mux __initdata omap3_muxmodes[] = {
|
||||
"uart1_rts", "ssi1_flag_tx", NULL, NULL,
|
||||
"gpio_149", NULL, NULL, "safe_mode"),
|
||||
_OMAP3_MUXENTRY(UART1_RX, 151,
|
||||
"uart1_rx", "ss1_wake_tx", "mcbsp1_clkr", "mcspi4_clk",
|
||||
"uart1_rx", "ssi1_wake_tx", "mcbsp1_clkr", "mcspi4_clk",
|
||||
"gpio_151", NULL, NULL, "safe_mode"),
|
||||
_OMAP3_MUXENTRY(UART1_TX, 148,
|
||||
"uart1_tx", "ssi1_dat_tx", NULL, NULL,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* OMAP4 SMP source file. It contains platform specific fucntions
|
||||
* OMAP4 SMP source file. It contains platform specific functions
|
||||
* needed for the linux smp kernel.
|
||||
*
|
||||
* Copyright (C) 2009 Texas Instruments, Inc.
|
||||
|
@ -158,7 +158,7 @@ static int omap_device_build_from_dt(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
od = omap_device_alloc(pdev, hwmods, oh_cnt);
|
||||
if (!od) {
|
||||
if (IS_ERR(od)) {
|
||||
dev_err(&pdev->dev, "Cannot allocate omap_device for :%s\n",
|
||||
oh_name);
|
||||
ret = PTR_ERR(od);
|
||||
|
@ -289,7 +289,7 @@ static void collie_flash_exit(void)
|
||||
}
|
||||
|
||||
static struct flash_platform_data collie_flash_data = {
|
||||
.map_name = "cfi_probe",
|
||||
.map_name = "jedec_probe",
|
||||
.init = collie_flash_init,
|
||||
.set_vpp = collie_set_vpp,
|
||||
.exit = collie_flash_exit,
|
||||
|
@ -555,7 +555,7 @@ static struct clk_lookup lookups[] = {
|
||||
CLKDEV_CON_ID("pll2h", &pll2h_clk),
|
||||
|
||||
/* CPU clock */
|
||||
CLKDEV_DEV_ID("cpufreq-cpu0", &z_clk),
|
||||
CLKDEV_DEV_ID("cpu0", &z_clk),
|
||||
|
||||
/* DIV6 */
|
||||
CLKDEV_CON_ID("zb", &div6_clks[DIV6_ZB]),
|
||||
|
@ -616,7 +616,7 @@ static struct clk_lookup lookups[] = {
|
||||
CLKDEV_DEV_ID("smp_twd", &twd_clk), /* smp_twd */
|
||||
|
||||
/* DIV4 clocks */
|
||||
CLKDEV_DEV_ID("cpufreq-cpu0", &div4_clks[DIV4_Z]),
|
||||
CLKDEV_DEV_ID("cpu0", &div4_clks[DIV4_Z]),
|
||||
|
||||
/* DIV6 clocks */
|
||||
CLKDEV_CON_ID("vck1_clk", &div6_clks[DIV6_VCK1]),
|
||||
|
@ -1,7 +1,3 @@
|
||||
menu "ST-Ericsson AB U300/U335 Platform"
|
||||
|
||||
comment "ST-Ericsson Mobile Platform Products"
|
||||
|
||||
config ARCH_U300
|
||||
bool "ST-Ericsson U300 Series" if ARCH_MULTI_V5
|
||||
depends on MMU
|
||||
@ -25,7 +21,9 @@ config ARCH_U300
|
||||
help
|
||||
Support for ST-Ericsson U300 series mobile platforms.
|
||||
|
||||
comment "ST-Ericsson U300/U335 Feature Selections"
|
||||
if ARCH_U300
|
||||
|
||||
menu "ST-Ericsson AB U300/U335 Platform"
|
||||
|
||||
config MACH_U300
|
||||
depends on ARCH_U300
|
||||
@ -53,3 +51,5 @@ config MACH_U300_SPIDUMMY
|
||||
SPI framework and ARM PL022 support.
|
||||
|
||||
endmenu
|
||||
|
||||
endif
|
||||
|
@ -69,6 +69,7 @@ static int __init ux500_l2x0_init(void)
|
||||
* some SMI service available.
|
||||
*/
|
||||
outer_cache.disable = NULL;
|
||||
outer_cache.set_debug = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -43,6 +43,6 @@
|
||||
COMPAT_HWCAP_VFPv3|COMPAT_HWCAP_VFPv4|\
|
||||
COMPAT_HWCAP_NEON|COMPAT_HWCAP_IDIV)
|
||||
|
||||
extern unsigned int elf_hwcap;
|
||||
extern unsigned long elf_hwcap;
|
||||
#endif
|
||||
#endif
|
||||
|
@ -143,15 +143,26 @@ void machine_restart(char *cmd)
|
||||
|
||||
void __show_regs(struct pt_regs *regs)
|
||||
{
|
||||
int i;
|
||||
int i, top_reg;
|
||||
u64 lr, sp;
|
||||
|
||||
if (compat_user_mode(regs)) {
|
||||
lr = regs->compat_lr;
|
||||
sp = regs->compat_sp;
|
||||
top_reg = 12;
|
||||
} else {
|
||||
lr = regs->regs[30];
|
||||
sp = regs->sp;
|
||||
top_reg = 29;
|
||||
}
|
||||
|
||||
show_regs_print_info(KERN_DEFAULT);
|
||||
print_symbol("PC is at %s\n", instruction_pointer(regs));
|
||||
print_symbol("LR is at %s\n", regs->regs[30]);
|
||||
print_symbol("LR is at %s\n", lr);
|
||||
printk("pc : [<%016llx>] lr : [<%016llx>] pstate: %08llx\n",
|
||||
regs->pc, regs->regs[30], regs->pstate);
|
||||
printk("sp : %016llx\n", regs->sp);
|
||||
for (i = 29; i >= 0; i--) {
|
||||
regs->pc, lr, regs->pstate);
|
||||
printk("sp : %016llx\n", sp);
|
||||
for (i = top_reg; i >= 0; i--) {
|
||||
printk("x%-2d: %016llx ", i, regs->regs[i]);
|
||||
if (i % 2 == 0)
|
||||
printk("\n");
|
||||
|
@ -57,7 +57,7 @@
|
||||
unsigned int processor_id;
|
||||
EXPORT_SYMBOL(processor_id);
|
||||
|
||||
unsigned int elf_hwcap __read_mostly;
|
||||
unsigned long elf_hwcap __read_mostly;
|
||||
EXPORT_SYMBOL_GPL(elf_hwcap);
|
||||
|
||||
static const char *cpu_name;
|
||||
|
@ -130,7 +130,7 @@ static void __do_user_fault(struct task_struct *tsk, unsigned long addr,
|
||||
force_sig_info(sig, &si, tsk);
|
||||
}
|
||||
|
||||
void do_bad_area(unsigned long addr, unsigned int esr, struct pt_regs *regs)
|
||||
static void do_bad_area(unsigned long addr, unsigned int esr, struct pt_regs *regs)
|
||||
{
|
||||
struct task_struct *tsk = current;
|
||||
struct mm_struct *mm = tsk->active_mm;
|
||||
|
@ -288,9 +288,6 @@ endif
|
||||
vmlinux.32: vmlinux
|
||||
$(OBJCOPY) -O $(32bit-bfd) $(OBJCOPYFLAGS) $< $@
|
||||
|
||||
|
||||
#obj-$(CONFIG_KPROBES) += kprobes.o
|
||||
|
||||
#
|
||||
# The 64-bit ELF tools are pretty broken so at this time we generate 64-bit
|
||||
# ELF files from 32-bit files by conversion.
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/syscore_ops.h>
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/mach-au1x00/au1000.h>
|
||||
|
||||
/* control register offsets */
|
||||
@ -358,7 +359,7 @@ static inline int au1200_coherency_bug(void)
|
||||
{
|
||||
#if defined(CONFIG_DMA_COHERENT)
|
||||
/* Au1200 AB USB does not support coherent memory */
|
||||
if (!(read_c0_prid() & 0xff)) {
|
||||
if (!(read_c0_prid() & PRID_REV_MASK)) {
|
||||
printk(KERN_INFO "Au1200 USB: this is chip revision AB !!\n");
|
||||
printk(KERN_INFO "Au1200 USB: update your board or re-configure"
|
||||
" the kernel\n");
|
||||
|
@ -306,14 +306,14 @@ void __init bcm63xx_cpu_init(void)
|
||||
|
||||
switch (c->cputype) {
|
||||
case CPU_BMIPS3300:
|
||||
if ((read_c0_prid() & 0xff00) != PRID_IMP_BMIPS3300_ALT)
|
||||
if ((read_c0_prid() & PRID_IMP_MASK) != PRID_IMP_BMIPS3300_ALT)
|
||||
__cpu_name[cpu] = "Broadcom BCM6338";
|
||||
/* fall-through */
|
||||
case CPU_BMIPS32:
|
||||
chipid_reg = BCM_6345_PERF_BASE;
|
||||
break;
|
||||
case CPU_BMIPS4350:
|
||||
switch ((read_c0_prid() & 0xff)) {
|
||||
switch ((read_c0_prid() & PRID_REV_MASK)) {
|
||||
case 0x04:
|
||||
chipid_reg = BCM_3368_PERF_BASE;
|
||||
break;
|
||||
|
@ -1 +1 @@
|
||||
../../../../../include/dt-bindings
|
||||
../../../../../include/dt-bindings
|
@ -12,6 +12,7 @@
|
||||
#include <linux/smp.h>
|
||||
|
||||
#include <asm/cpu-info.h>
|
||||
#include <asm/cpu-type.h>
|
||||
#include <asm/time.h>
|
||||
|
||||
#include <asm/octeon/octeon.h>
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/cpu-type.h>
|
||||
#include <asm/processor.h>
|
||||
|
||||
#include <asm/dec/prom.h>
|
||||
|
@ -13,12 +13,6 @@
|
||||
#include <asm/cpu-info.h>
|
||||
#include <cpu-feature-overrides.h>
|
||||
|
||||
#ifndef current_cpu_type
|
||||
#define current_cpu_type() current_cpu_data.cputype
|
||||
#endif
|
||||
|
||||
#define boot_cpu_type() cpu_data[0].cputype
|
||||
|
||||
/*
|
||||
* SMP assumption: Options of CPU 0 are a superset of all processors.
|
||||
* This is true for all known MIPS systems.
|
||||
@ -193,7 +187,7 @@
|
||||
|
||||
/*
|
||||
* MIPS32, MIPS64, VR5500, IDT32332, IDT32334 and maybe a few other
|
||||
* pre-MIPS32/MIPS53 processors have CLO, CLZ. The IDT RC64574 is 64-bit and
|
||||
* pre-MIPS32/MIPS64 processors have CLO, CLZ. The IDT RC64574 is 64-bit and
|
||||
* has CLO and CLZ but not DCLO nor DCLZ. For 64-bit kernels
|
||||
* cpu_has_clo_clz also indicates the availability of DCLO and DCLZ.
|
||||
*/
|
||||
|
@ -84,6 +84,7 @@ struct cpuinfo_mips {
|
||||
extern struct cpuinfo_mips cpu_data[];
|
||||
#define current_cpu_data cpu_data[smp_processor_id()]
|
||||
#define raw_current_cpu_data cpu_data[raw_smp_processor_id()]
|
||||
#define boot_cpu_data cpu_data[0]
|
||||
|
||||
extern void cpu_probe(void);
|
||||
extern void cpu_report(void);
|
||||
|
203
arch/mips/include/asm/cpu-type.h
Normal file
203
arch/mips/include/asm/cpu-type.h
Normal file
@ -0,0 +1,203 @@
|
||||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2003, 2004 Ralf Baechle
|
||||
* Copyright (C) 2004 Maciej W. Rozycki
|
||||
*/
|
||||
#ifndef __ASM_CPU_TYPE_H
|
||||
#define __ASM_CPU_TYPE_H
|
||||
|
||||
#include <linux/smp.h>
|
||||
#include <linux/compiler.h>
|
||||
|
||||
static inline int __pure __get_cpu_type(const int cpu_type)
|
||||
{
|
||||
switch (cpu_type) {
|
||||
#if defined(CONFIG_SYS_HAS_CPU_LOONGSON2E) || \
|
||||
defined(CONFIG_SYS_HAS_CPU_LOONGSON2F)
|
||||
case CPU_LOONGSON2:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_LOONGSON1B
|
||||
case CPU_LOONGSON1:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_MIPS32_R1
|
||||
case CPU_4KC:
|
||||
case CPU_ALCHEMY:
|
||||
case CPU_BMIPS3300:
|
||||
case CPU_BMIPS4350:
|
||||
case CPU_PR4450:
|
||||
case CPU_BMIPS32:
|
||||
case CPU_JZRISC:
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SYS_HAS_CPU_MIPS32_R1) || \
|
||||
defined(CONFIG_SYS_HAS_CPU_MIPS32_R2)
|
||||
case CPU_4KEC:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_MIPS32_R2
|
||||
case CPU_4KSC:
|
||||
case CPU_24K:
|
||||
case CPU_34K:
|
||||
case CPU_1004K:
|
||||
case CPU_74K:
|
||||
case CPU_M14KC:
|
||||
case CPU_M14KEC:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_MIPS64_R1
|
||||
case CPU_5KC:
|
||||
case CPU_5KE:
|
||||
case CPU_20KC:
|
||||
case CPU_25KF:
|
||||
case CPU_SB1:
|
||||
case CPU_SB1A:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_MIPS64_R2
|
||||
/*
|
||||
* All MIPS64 R2 processors have their own special symbols. That is,
|
||||
* there currently is no pure R2 core
|
||||
*/
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_R3000
|
||||
case CPU_R2000:
|
||||
case CPU_R3000:
|
||||
case CPU_R3000A:
|
||||
case CPU_R3041:
|
||||
case CPU_R3051:
|
||||
case CPU_R3052:
|
||||
case CPU_R3081:
|
||||
case CPU_R3081E:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_TX39XX
|
||||
case CPU_TX3912:
|
||||
case CPU_TX3922:
|
||||
case CPU_TX3927:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_VR41XX
|
||||
case CPU_VR41XX:
|
||||
case CPU_VR4111:
|
||||
case CPU_VR4121:
|
||||
case CPU_VR4122:
|
||||
case CPU_VR4131:
|
||||
case CPU_VR4133:
|
||||
case CPU_VR4181:
|
||||
case CPU_VR4181A:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_R4300
|
||||
case CPU_R4300:
|
||||
case CPU_R4310:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_R4X00
|
||||
case CPU_R4000PC:
|
||||
case CPU_R4000SC:
|
||||
case CPU_R4000MC:
|
||||
case CPU_R4200:
|
||||
case CPU_R4400PC:
|
||||
case CPU_R4400SC:
|
||||
case CPU_R4400MC:
|
||||
case CPU_R4600:
|
||||
case CPU_R4700:
|
||||
case CPU_R4640:
|
||||
case CPU_R4650:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_TX49XX
|
||||
case CPU_TX49XX:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_R5000
|
||||
case CPU_R5000:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_R5432
|
||||
case CPU_R5432:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_R5500
|
||||
case CPU_R5500:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_R6000
|
||||
case CPU_R6000:
|
||||
case CPU_R6000A:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_NEVADA
|
||||
case CPU_NEVADA:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_R8000
|
||||
case CPU_R8000:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_R10000
|
||||
case CPU_R10000:
|
||||
case CPU_R12000:
|
||||
case CPU_R14000:
|
||||
#endif
|
||||
#ifdef CONFIG_SYS_HAS_CPU_RM7000
|
||||
case CPU_RM7000:
|
||||
case CPU_SR71000:
|
||||
#endif
|
||||
#ifdef CONFIG_SYS_HAS_CPU_RM9000
|
||||
case CPU_RM9000:
|
||||
#endif
|
||||
#ifdef CONFIG_SYS_HAS_CPU_SB1
|
||||
case CPU_SB1:
|
||||
case CPU_SB1A:
|
||||
#endif
|
||||
#ifdef CONFIG_SYS_HAS_CPU_CAVIUM_OCTEON
|
||||
case CPU_CAVIUM_OCTEON:
|
||||
case CPU_CAVIUM_OCTEON_PLUS:
|
||||
case CPU_CAVIUM_OCTEON2:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_BMIPS4380
|
||||
case CPU_BMIPS4380:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_BMIPS5000
|
||||
case CPU_BMIPS5000:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_XLP
|
||||
case CPU_XLP:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_HAS_CPU_XLR
|
||||
case CPU_XLR:
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
unreachable();
|
||||
}
|
||||
|
||||
return cpu_type;
|
||||
}
|
||||
|
||||
static inline int __pure current_cpu_type(void)
|
||||
{
|
||||
const int cpu_type = current_cpu_data.cputype;
|
||||
|
||||
return __get_cpu_type(cpu_type);
|
||||
}
|
||||
|
||||
static inline int __pure boot_cpu_type(void)
|
||||
{
|
||||
const int cpu_type = cpu_data[0].cputype;
|
||||
|
||||
return __get_cpu_type(cpu_type);
|
||||
}
|
||||
|
||||
#endif /* __ASM_CPU_TYPE_H */
|
@ -3,15 +3,14 @@
|
||||
* various MIPS cpu types.
|
||||
*
|
||||
* Copyright (C) 1996 David S. Miller (davem@davemloft.net)
|
||||
* Copyright (C) 2004 Maciej W. Rozycki
|
||||
* Copyright (C) 2004, 2013 Maciej W. Rozycki
|
||||
*/
|
||||
#ifndef _ASM_CPU_H
|
||||
#define _ASM_CPU_H
|
||||
|
||||
/* Assigned Company values for bits 23:16 of the PRId Register
|
||||
(CP0 register 15, select 0). As of the MIPS32 and MIPS64 specs from
|
||||
MTI, the PRId register is defined in this (backwards compatible)
|
||||
way:
|
||||
/*
|
||||
As of the MIPS32 and MIPS64 specs from MTI, the PRId register (CP0
|
||||
register 15, select 0) is defined in this (backwards compatible) way:
|
||||
|
||||
+----------------+----------------+----------------+----------------+
|
||||
| Company Options| Company ID | Processor ID | Revision |
|
||||
@ -23,6 +22,14 @@
|
||||
spec.
|
||||
*/
|
||||
|
||||
#define PRID_OPT_MASK 0xff000000
|
||||
|
||||
/*
|
||||
* Assigned Company values for bits 23:16 of the PRId register.
|
||||
*/
|
||||
|
||||
#define PRID_COMP_MASK 0xff0000
|
||||
|
||||
#define PRID_COMP_LEGACY 0x000000
|
||||
#define PRID_COMP_MIPS 0x010000
|
||||
#define PRID_COMP_BROADCOM 0x020000
|
||||
@ -38,10 +45,17 @@
|
||||
#define PRID_COMP_INGENIC 0xd00000
|
||||
|
||||
/*
|
||||
* Assigned values for the product ID register. In order to detect a
|
||||
* certain CPU type exactly eventually additional registers may need to
|
||||
* be examined. These are valid when 23:16 == PRID_COMP_LEGACY
|
||||
* Assigned Processor ID (implementation) values for bits 15:8 of the PRId
|
||||
* register. In order to detect a certain CPU type exactly eventually
|
||||
* additional registers may need to be examined.
|
||||
*/
|
||||
|
||||
#define PRID_IMP_MASK 0xff00
|
||||
|
||||
/*
|
||||
* These are valid when 23:16 == PRID_COMP_LEGACY
|
||||
*/
|
||||
|
||||
#define PRID_IMP_R2000 0x0100
|
||||
#define PRID_IMP_AU1_REV1 0x0100
|
||||
#define PRID_IMP_AU1_REV2 0x0200
|
||||
@ -182,11 +196,15 @@
|
||||
#define PRID_IMP_NETLOGIC_XLP2XX 0x1200
|
||||
|
||||
/*
|
||||
* Definitions for 7:0 on legacy processors
|
||||
* Particular Revision values for bits 7:0 of the PRId register.
|
||||
*/
|
||||
|
||||
#define PRID_REV_MASK 0x00ff
|
||||
|
||||
/*
|
||||
* Definitions for 7:0 on legacy processors
|
||||
*/
|
||||
|
||||
#define PRID_REV_TX4927 0x0022
|
||||
#define PRID_REV_TX4937 0x0030
|
||||
#define PRID_REV_R4400 0x0040
|
||||
@ -227,6 +245,8 @@
|
||||
* 31 16 15 8 7 0
|
||||
*/
|
||||
|
||||
#define FPIR_IMP_MASK 0xff00
|
||||
|
||||
#define FPIR_IMP_NONE 0x0000
|
||||
|
||||
enum cpu_type_enum {
|
||||
|
@ -43,6 +43,8 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/irq.h>
|
||||
|
||||
#include <asm/cpu.h>
|
||||
|
||||
/* cpu pipeline flush */
|
||||
void static inline au_sync(void)
|
||||
{
|
||||
@ -140,7 +142,7 @@ static inline int au1xxx_cpu_needs_config_od(void)
|
||||
|
||||
static inline int alchemy_get_cputype(void)
|
||||
{
|
||||
switch (read_c0_prid() & 0xffff0000) {
|
||||
switch (read_c0_prid() & (PRID_OPT_MASK | PRID_COMP_MASK)) {
|
||||
case 0x00030000:
|
||||
return ALCHEMY_CPU_AU1000;
|
||||
break;
|
||||
|
@ -8,6 +8,8 @@
|
||||
#ifndef __ASM_MACH_IP22_CPU_FEATURE_OVERRIDES_H
|
||||
#define __ASM_MACH_IP22_CPU_FEATURE_OVERRIDES_H
|
||||
|
||||
#include <asm/cpu.h>
|
||||
|
||||
/*
|
||||
* IP22 with a variety of processors so we can't use defaults for everything.
|
||||
*/
|
||||
|
@ -8,6 +8,8 @@
|
||||
#ifndef __ASM_MACH_IP27_CPU_FEATURE_OVERRIDES_H
|
||||
#define __ASM_MACH_IP27_CPU_FEATURE_OVERRIDES_H
|
||||
|
||||
#include <asm/cpu.h>
|
||||
|
||||
/*
|
||||
* IP27 only comes with R10000 family processors all using the same config
|
||||
*/
|
||||
|
@ -9,6 +9,8 @@
|
||||
#ifndef __ASM_MACH_IP28_CPU_FEATURE_OVERRIDES_H
|
||||
#define __ASM_MACH_IP28_CPU_FEATURE_OVERRIDES_H
|
||||
|
||||
#include <asm/cpu.h>
|
||||
|
||||
/*
|
||||
* IP28 only comes with R10000 family processors all using the same config
|
||||
*/
|
||||
|
@ -603,6 +603,13 @@
|
||||
#define MIPS_CONF4_MMUEXTDEF (_ULCAST_(3) << 14)
|
||||
#define MIPS_CONF4_MMUEXTDEF_MMUSIZEEXT (_ULCAST_(1) << 14)
|
||||
|
||||
#define MIPS_CONF5_NF (_ULCAST_(1) << 0)
|
||||
#define MIPS_CONF5_UFR (_ULCAST_(1) << 2)
|
||||
#define MIPS_CONF5_MSAEN (_ULCAST_(1) << 27)
|
||||
#define MIPS_CONF5_EVA (_ULCAST_(1) << 28)
|
||||
#define MIPS_CONF5_CV (_ULCAST_(1) << 29)
|
||||
#define MIPS_CONF5_K (_ULCAST_(1) << 30)
|
||||
|
||||
#define MIPS_CONF6_SYND (_ULCAST_(1) << 13)
|
||||
|
||||
#define MIPS_CONF7_WII (_ULCAST_(1) << 31)
|
||||
|
@ -83,6 +83,18 @@ static inline void pcibios_penalize_isa_irq(int irq, int active)
|
||||
extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
|
||||
enum pci_mmap_state mmap_state, int write_combine);
|
||||
|
||||
#define HAVE_ARCH_PCI_RESOURCE_TO_USER
|
||||
|
||||
static inline void pci_resource_to_user(const struct pci_dev *dev, int bar,
|
||||
const struct resource *rsrc, resource_size_t *start,
|
||||
resource_size_t *end)
|
||||
{
|
||||
phys_t size = resource_size(rsrc);
|
||||
|
||||
*start = fixup_bigphys_addr(rsrc->start, size);
|
||||
*end = rsrc->start + size;
|
||||
}
|
||||
|
||||
/*
|
||||
* Dynamic DMA mapping stuff.
|
||||
* MIPS has everything mapped statically.
|
||||
|
@ -10,7 +10,9 @@
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <asm/cpu-features.h>
|
||||
#include <asm/mipsregs.h>
|
||||
#include <asm/cpu-type.h>
|
||||
|
||||
/*
|
||||
* This is the clock rate of the i8253 PIT. A MIPS system may not have
|
||||
@ -33,9 +35,38 @@
|
||||
|
||||
typedef unsigned int cycles_t;
|
||||
|
||||
/*
|
||||
* On R4000/R4400 before version 5.0 an erratum exists such that if the
|
||||
* cycle counter is read in the exact moment that it is matching the
|
||||
* compare register, no interrupt will be generated.
|
||||
*
|
||||
* There is a suggested workaround and also the erratum can't strike if
|
||||
* the compare interrupt isn't being used as the clock source device.
|
||||
* However for now the implementaton of this function doesn't get these
|
||||
* fine details right.
|
||||
*/
|
||||
static inline cycles_t get_cycles(void)
|
||||
{
|
||||
return 0;
|
||||
switch (boot_cpu_type()) {
|
||||
case CPU_R4400PC:
|
||||
case CPU_R4400SC:
|
||||
case CPU_R4400MC:
|
||||
if ((read_c0_prid() & 0xff) >= 0x0050)
|
||||
return read_c0_count();
|
||||
break;
|
||||
|
||||
case CPU_R4000PC:
|
||||
case CPU_R4000SC:
|
||||
case CPU_R4000MC:
|
||||
break;
|
||||
|
||||
default:
|
||||
if (cpu_has_counter)
|
||||
return read_c0_count();
|
||||
break;
|
||||
}
|
||||
|
||||
return 0; /* no usable counter */
|
||||
}
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
@ -6,6 +6,7 @@
|
||||
#ifndef _ASM_VGA_H
|
||||
#define _ASM_VGA_H
|
||||
|
||||
#include <asm/addrspace.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
/*
|
||||
@ -13,7 +14,7 @@
|
||||
* access the videoram directly without any black magic.
|
||||
*/
|
||||
|
||||
#define VGA_MAP_MEM(x, s) (0xb0000000L + (unsigned long)(x))
|
||||
#define VGA_MAP_MEM(x, s) CKSEG1ADDR(0x10000000L + (unsigned long)(x))
|
||||
|
||||
#define vga_readb(x) (*(x))
|
||||
#define vga_writeb(x, y) (*(y) = (x))
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include <asm/bugs.h>
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/cpu-type.h>
|
||||
#include <asm/fpu.h>
|
||||
#include <asm/mipsregs.h>
|
||||
#include <asm/watch.h>
|
||||
@ -55,7 +56,7 @@ static inline void check_errata(void)
|
||||
{
|
||||
struct cpuinfo_mips *c = ¤t_cpu_data;
|
||||
|
||||
switch (c->cputype) {
|
||||
switch (current_cpu_type()) {
|
||||
case CPU_34K:
|
||||
/*
|
||||
* Erratum "RPS May Cause Incorrect Instruction Execution"
|
||||
@ -122,7 +123,7 @@ static inline unsigned long cpu_get_fpu_id(void)
|
||||
*/
|
||||
static inline int __cpu_has_fpu(void)
|
||||
{
|
||||
return ((cpu_get_fpu_id() & 0xff00) != FPIR_IMP_NONE);
|
||||
return ((cpu_get_fpu_id() & FPIR_IMP_MASK) != FPIR_IMP_NONE);
|
||||
}
|
||||
|
||||
static inline void cpu_probe_vmbits(struct cpuinfo_mips *c)
|
||||
@ -290,6 +291,17 @@ static inline unsigned int decode_config4(struct cpuinfo_mips *c)
|
||||
return config4 & MIPS_CONF_M;
|
||||
}
|
||||
|
||||
static inline unsigned int decode_config5(struct cpuinfo_mips *c)
|
||||
{
|
||||
unsigned int config5;
|
||||
|
||||
config5 = read_c0_config5();
|
||||
config5 &= ~MIPS_CONF5_UFR;
|
||||
write_c0_config5(config5);
|
||||
|
||||
return config5 & MIPS_CONF_M;
|
||||
}
|
||||
|
||||
static void decode_configs(struct cpuinfo_mips *c)
|
||||
{
|
||||
int ok;
|
||||
@ -310,6 +322,8 @@ static void decode_configs(struct cpuinfo_mips *c)
|
||||
ok = decode_config3(c);
|
||||
if (ok)
|
||||
ok = decode_config4(c);
|
||||
if (ok)
|
||||
ok = decode_config5(c);
|
||||
|
||||
mips_probe_watch_registers(c);
|
||||
|
||||
@ -322,7 +336,7 @@ static void decode_configs(struct cpuinfo_mips *c)
|
||||
|
||||
static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
{
|
||||
switch (c->processor_id & 0xff00) {
|
||||
switch (c->processor_id & PRID_IMP_MASK) {
|
||||
case PRID_IMP_R2000:
|
||||
c->cputype = CPU_R2000;
|
||||
__cpu_name[cpu] = "R2000";
|
||||
@ -333,7 +347,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
c->tlbsize = 64;
|
||||
break;
|
||||
case PRID_IMP_R3000:
|
||||
if ((c->processor_id & 0xff) == PRID_REV_R3000A) {
|
||||
if ((c->processor_id & PRID_REV_MASK) == PRID_REV_R3000A) {
|
||||
if (cpu_has_confreg()) {
|
||||
c->cputype = CPU_R3081E;
|
||||
__cpu_name[cpu] = "R3081";
|
||||
@ -353,7 +367,8 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
break;
|
||||
case PRID_IMP_R4000:
|
||||
if (read_c0_config() & CONF_SC) {
|
||||
if ((c->processor_id & 0xff) >= PRID_REV_R4400) {
|
||||
if ((c->processor_id & PRID_REV_MASK) >=
|
||||
PRID_REV_R4400) {
|
||||
c->cputype = CPU_R4400PC;
|
||||
__cpu_name[cpu] = "R4400PC";
|
||||
} else {
|
||||
@ -361,7 +376,8 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
__cpu_name[cpu] = "R4000PC";
|
||||
}
|
||||
} else {
|
||||
if ((c->processor_id & 0xff) >= PRID_REV_R4400) {
|
||||
if ((c->processor_id & PRID_REV_MASK) >=
|
||||
PRID_REV_R4400) {
|
||||
c->cputype = CPU_R4400SC;
|
||||
__cpu_name[cpu] = "R4400SC";
|
||||
} else {
|
||||
@ -454,7 +470,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
__cpu_name[cpu] = "TX3927";
|
||||
c->tlbsize = 64;
|
||||
} else {
|
||||
switch (c->processor_id & 0xff) {
|
||||
switch (c->processor_id & PRID_REV_MASK) {
|
||||
case PRID_REV_TX3912:
|
||||
c->cputype = CPU_TX3912;
|
||||
__cpu_name[cpu] = "TX3912";
|
||||
@ -640,7 +656,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
{
|
||||
decode_configs(c);
|
||||
switch (c->processor_id & 0xff00) {
|
||||
switch (c->processor_id & PRID_IMP_MASK) {
|
||||
case PRID_IMP_4KC:
|
||||
c->cputype = CPU_4KC;
|
||||
__cpu_name[cpu] = "MIPS 4Kc";
|
||||
@ -711,7 +727,7 @@ static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
static inline void cpu_probe_alchemy(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
{
|
||||
decode_configs(c);
|
||||
switch (c->processor_id & 0xff00) {
|
||||
switch (c->processor_id & PRID_IMP_MASK) {
|
||||
case PRID_IMP_AU1_REV1:
|
||||
case PRID_IMP_AU1_REV2:
|
||||
c->cputype = CPU_ALCHEMY;
|
||||
@ -730,7 +746,7 @@ static inline void cpu_probe_alchemy(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
break;
|
||||
case 4:
|
||||
__cpu_name[cpu] = "Au1200";
|
||||
if ((c->processor_id & 0xff) == 2)
|
||||
if ((c->processor_id & PRID_REV_MASK) == 2)
|
||||
__cpu_name[cpu] = "Au1250";
|
||||
break;
|
||||
case 5:
|
||||
@ -748,12 +764,12 @@ static inline void cpu_probe_sibyte(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
{
|
||||
decode_configs(c);
|
||||
|
||||
switch (c->processor_id & 0xff00) {
|
||||
switch (c->processor_id & PRID_IMP_MASK) {
|
||||
case PRID_IMP_SB1:
|
||||
c->cputype = CPU_SB1;
|
||||
__cpu_name[cpu] = "SiByte SB1";
|
||||
/* FPU in pass1 is known to have issues. */
|
||||
if ((c->processor_id & 0xff) < 0x02)
|
||||
if ((c->processor_id & PRID_REV_MASK) < 0x02)
|
||||
c->options &= ~(MIPS_CPU_FPU | MIPS_CPU_32FPR);
|
||||
break;
|
||||
case PRID_IMP_SB1A:
|
||||
@ -766,7 +782,7 @@ static inline void cpu_probe_sibyte(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
static inline void cpu_probe_sandcraft(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
{
|
||||
decode_configs(c);
|
||||
switch (c->processor_id & 0xff00) {
|
||||
switch (c->processor_id & PRID_IMP_MASK) {
|
||||
case PRID_IMP_SR71000:
|
||||
c->cputype = CPU_SR71000;
|
||||
__cpu_name[cpu] = "Sandcraft SR71000";
|
||||
@ -779,7 +795,7 @@ static inline void cpu_probe_sandcraft(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
static inline void cpu_probe_nxp(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
{
|
||||
decode_configs(c);
|
||||
switch (c->processor_id & 0xff00) {
|
||||
switch (c->processor_id & PRID_IMP_MASK) {
|
||||
case PRID_IMP_PR4450:
|
||||
c->cputype = CPU_PR4450;
|
||||
__cpu_name[cpu] = "Philips PR4450";
|
||||
@ -791,7 +807,7 @@ static inline void cpu_probe_nxp(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
static inline void cpu_probe_broadcom(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
{
|
||||
decode_configs(c);
|
||||
switch (c->processor_id & 0xff00) {
|
||||
switch (c->processor_id & PRID_IMP_MASK) {
|
||||
case PRID_IMP_BMIPS32_REV4:
|
||||
case PRID_IMP_BMIPS32_REV8:
|
||||
c->cputype = CPU_BMIPS32;
|
||||
@ -806,7 +822,7 @@ static inline void cpu_probe_broadcom(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
set_elf_platform(cpu, "bmips3300");
|
||||
break;
|
||||
case PRID_IMP_BMIPS43XX: {
|
||||
int rev = c->processor_id & 0xff;
|
||||
int rev = c->processor_id & PRID_REV_MASK;
|
||||
|
||||
if (rev >= PRID_REV_BMIPS4380_LO &&
|
||||
rev <= PRID_REV_BMIPS4380_HI) {
|
||||
@ -832,7 +848,7 @@ static inline void cpu_probe_broadcom(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
static inline void cpu_probe_cavium(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
{
|
||||
decode_configs(c);
|
||||
switch (c->processor_id & 0xff00) {
|
||||
switch (c->processor_id & PRID_IMP_MASK) {
|
||||
case PRID_IMP_CAVIUM_CN38XX:
|
||||
case PRID_IMP_CAVIUM_CN31XX:
|
||||
case PRID_IMP_CAVIUM_CN30XX:
|
||||
@ -875,7 +891,7 @@ static inline void cpu_probe_ingenic(struct cpuinfo_mips *c, unsigned int cpu)
|
||||
decode_configs(c);
|
||||
/* JZRISC does not implement the CP0 counter. */
|
||||
c->options &= ~MIPS_CPU_COUNTER;
|
||||
switch (c->processor_id & 0xff00) {
|
||||
switch (c->processor_id & PRID_IMP_MASK) {
|
||||
case PRID_IMP_JZRISC:
|
||||
c->cputype = CPU_JZRISC;
|
||||
__cpu_name[cpu] = "Ingenic JZRISC";
|
||||
@ -890,7 +906,7 @@ static inline void cpu_probe_netlogic(struct cpuinfo_mips *c, int cpu)
|
||||
{
|
||||
decode_configs(c);
|
||||
|
||||
if ((c->processor_id & 0xff00) == PRID_IMP_NETLOGIC_AU13XX) {
|
||||
if ((c->processor_id & PRID_IMP_MASK) == PRID_IMP_NETLOGIC_AU13XX) {
|
||||
c->cputype = CPU_ALCHEMY;
|
||||
__cpu_name[cpu] = "Au1300";
|
||||
/* following stuff is not for Alchemy */
|
||||
@ -905,7 +921,7 @@ static inline void cpu_probe_netlogic(struct cpuinfo_mips *c, int cpu)
|
||||
MIPS_CPU_EJTAG |
|
||||
MIPS_CPU_LLSC);
|
||||
|
||||
switch (c->processor_id & 0xff00) {
|
||||
switch (c->processor_id & PRID_IMP_MASK) {
|
||||
case PRID_IMP_NETLOGIC_XLP2XX:
|
||||
c->cputype = CPU_XLP;
|
||||
__cpu_name[cpu] = "Broadcom XLPII";
|
||||
@ -984,7 +1000,7 @@ void cpu_probe(void)
|
||||
c->cputype = CPU_UNKNOWN;
|
||||
|
||||
c->processor_id = read_c0_prid();
|
||||
switch (c->processor_id & 0xff0000) {
|
||||
switch (c->processor_id & PRID_COMP_MASK) {
|
||||
case PRID_COMP_LEGACY:
|
||||
cpu_probe_legacy(c, cpu);
|
||||
break;
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <linux/sched.h>
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/cpu-info.h>
|
||||
#include <asm/cpu-type.h>
|
||||
#include <asm/idle.h>
|
||||
#include <asm/mipsregs.h>
|
||||
|
||||
@ -136,7 +137,7 @@ void __init check_wait(void)
|
||||
return;
|
||||
}
|
||||
|
||||
switch (c->cputype) {
|
||||
switch (current_cpu_type()) {
|
||||
case CPU_R3081:
|
||||
case CPU_R3081E:
|
||||
cpu_wait = r3081_wait;
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <linux/export.h>
|
||||
|
||||
#include <asm/cpu-features.h>
|
||||
#include <asm/cpu-type.h>
|
||||
#include <asm/div64.h>
|
||||
#include <asm/smtc_ipi.h>
|
||||
#include <asm/time.h>
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include <asm/break.h>
|
||||
#include <asm/cop2.h>
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/cpu-type.h>
|
||||
#include <asm/dsp.h>
|
||||
#include <asm/fpu.h>
|
||||
#include <asm/fpu_emulator.h>
|
||||
@ -622,7 +623,7 @@ static int simulate_rdhwr(struct pt_regs *regs, int rd, int rt)
|
||||
regs->regs[rt] = read_c0_count();
|
||||
return 0;
|
||||
case 3: /* Count register resolution */
|
||||
switch (current_cpu_data.cputype) {
|
||||
switch (current_cpu_type()) {
|
||||
case CPU_20KC:
|
||||
case CPU_25KF:
|
||||
regs->regs[rt] = 1;
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/cacheops.h>
|
||||
#include <asm/cpu-features.h>
|
||||
#include <asm/cpu-type.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/r4kcache.h>
|
||||
@ -186,9 +187,10 @@ static void probe_octeon(void)
|
||||
unsigned long dcache_size;
|
||||
unsigned int config1;
|
||||
struct cpuinfo_mips *c = ¤t_cpu_data;
|
||||
int cputype = current_cpu_type();
|
||||
|
||||
config1 = read_c0_config1();
|
||||
switch (c->cputype) {
|
||||
switch (cputype) {
|
||||
case CPU_CAVIUM_OCTEON:
|
||||
case CPU_CAVIUM_OCTEON_PLUS:
|
||||
c->icache.linesz = 2 << ((config1 >> 19) & 7);
|
||||
@ -199,7 +201,7 @@ static void probe_octeon(void)
|
||||
c->icache.sets * c->icache.ways * c->icache.linesz;
|
||||
c->icache.waybit = ffs(icache_size / c->icache.ways) - 1;
|
||||
c->dcache.linesz = 128;
|
||||
if (c->cputype == CPU_CAVIUM_OCTEON_PLUS)
|
||||
if (cputype == CPU_CAVIUM_OCTEON_PLUS)
|
||||
c->dcache.sets = 2; /* CN5XXX has two Dcache sets */
|
||||
else
|
||||
c->dcache.sets = 1; /* CN3XXX has one Dcache set */
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/preempt.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/mm.h>
|
||||
@ -24,6 +25,7 @@
|
||||
#include <asm/cacheops.h>
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/cpu-features.h>
|
||||
#include <asm/cpu-type.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/pgtable.h>
|
||||
@ -601,6 +603,7 @@ static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size)
|
||||
/* Catch bad driver code */
|
||||
BUG_ON(size == 0);
|
||||
|
||||
preempt_disable();
|
||||
if (cpu_has_inclusive_pcaches) {
|
||||
if (size >= scache_size)
|
||||
r4k_blast_scache();
|
||||
@ -621,6 +624,7 @@ static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size)
|
||||
R4600_HIT_CACHEOP_WAR_IMPL;
|
||||
blast_dcache_range(addr, addr + size);
|
||||
}
|
||||
preempt_enable();
|
||||
|
||||
bc_wback_inv(addr, size);
|
||||
__sync();
|
||||
@ -631,6 +635,7 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size)
|
||||
/* Catch bad driver code */
|
||||
BUG_ON(size == 0);
|
||||
|
||||
preempt_disable();
|
||||
if (cpu_has_inclusive_pcaches) {
|
||||
if (size >= scache_size)
|
||||
r4k_blast_scache();
|
||||
@ -655,6 +660,7 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size)
|
||||
R4600_HIT_CACHEOP_WAR_IMPL;
|
||||
blast_inv_dcache_range(addr, addr + size);
|
||||
}
|
||||
preempt_enable();
|
||||
|
||||
bc_inv(addr, size);
|
||||
__sync();
|
||||
@ -780,20 +786,30 @@ static inline void rm7k_erratum31(void)
|
||||
|
||||
static inline void alias_74k_erratum(struct cpuinfo_mips *c)
|
||||
{
|
||||
unsigned int imp = c->processor_id & PRID_IMP_MASK;
|
||||
unsigned int rev = c->processor_id & PRID_REV_MASK;
|
||||
|
||||
/*
|
||||
* Early versions of the 74K do not update the cache tags on a
|
||||
* vtag miss/ptag hit which can occur in the case of KSEG0/KUSEG
|
||||
* aliases. In this case it is better to treat the cache as always
|
||||
* having aliases.
|
||||
*/
|
||||
if ((c->processor_id & 0xff) <= PRID_REV_ENCODE_332(2, 4, 0))
|
||||
c->dcache.flags |= MIPS_CACHE_VTAG;
|
||||
if ((c->processor_id & 0xff) == PRID_REV_ENCODE_332(2, 4, 0))
|
||||
write_c0_config6(read_c0_config6() | MIPS_CONF6_SYND);
|
||||
if (((c->processor_id & 0xff00) == PRID_IMP_1074K) &&
|
||||
((c->processor_id & 0xff) <= PRID_REV_ENCODE_332(1, 1, 0))) {
|
||||
c->dcache.flags |= MIPS_CACHE_VTAG;
|
||||
write_c0_config6(read_c0_config6() | MIPS_CONF6_SYND);
|
||||
switch (imp) {
|
||||
case PRID_IMP_74K:
|
||||
if (rev <= PRID_REV_ENCODE_332(2, 4, 0))
|
||||
c->dcache.flags |= MIPS_CACHE_VTAG;
|
||||
if (rev == PRID_REV_ENCODE_332(2, 4, 0))
|
||||
write_c0_config6(read_c0_config6() | MIPS_CONF6_SYND);
|
||||
break;
|
||||
case PRID_IMP_1074K:
|
||||
if (rev <= PRID_REV_ENCODE_332(1, 1, 0)) {
|
||||
c->dcache.flags |= MIPS_CACHE_VTAG;
|
||||
write_c0_config6(read_c0_config6() | MIPS_CONF6_SYND);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
BUG();
|
||||
}
|
||||
}
|
||||
|
||||
@ -809,7 +825,7 @@ static void probe_pcache(void)
|
||||
unsigned long config1;
|
||||
unsigned int lsize;
|
||||
|
||||
switch (c->cputype) {
|
||||
switch (current_cpu_type()) {
|
||||
case CPU_R4600: /* QED style two way caches? */
|
||||
case CPU_R4700:
|
||||
case CPU_R5000:
|
||||
@ -1025,7 +1041,8 @@ static void probe_pcache(void)
|
||||
* presumably no vendor is shipping his hardware in the "bad"
|
||||
* configuration.
|
||||
*/
|
||||
if ((prid & 0xff00) == PRID_IMP_R4000 && (prid & 0xff) < 0x40 &&
|
||||
if ((prid & PRID_IMP_MASK) == PRID_IMP_R4000 &&
|
||||
(prid & PRID_REV_MASK) < PRID_REV_R4400 &&
|
||||
!(config & CONF_SC) && c->icache.linesz != 16 &&
|
||||
PAGE_SIZE <= 0x8000)
|
||||
panic("Improper R4000SC processor configuration detected");
|
||||
@ -1045,7 +1062,7 @@ static void probe_pcache(void)
|
||||
* normally they'd suffer from aliases but magic in the hardware deals
|
||||
* with that for us so we don't need to take care ourselves.
|
||||
*/
|
||||
switch (c->cputype) {
|
||||
switch (current_cpu_type()) {
|
||||
case CPU_20KC:
|
||||
case CPU_25KF:
|
||||
case CPU_SB1:
|
||||
@ -1065,7 +1082,7 @@ static void probe_pcache(void)
|
||||
case CPU_34K:
|
||||
case CPU_74K:
|
||||
case CPU_1004K:
|
||||
if (c->cputype == CPU_74K)
|
||||
if (current_cpu_type() == CPU_74K)
|
||||
alias_74k_erratum(c);
|
||||
if ((read_c0_config7() & (1 << 16))) {
|
||||
/* effectively physically indexed dcache,
|
||||
@ -1078,7 +1095,7 @@ static void probe_pcache(void)
|
||||
c->dcache.flags |= MIPS_CACHE_ALIASES;
|
||||
}
|
||||
|
||||
switch (c->cputype) {
|
||||
switch (current_cpu_type()) {
|
||||
case CPU_20KC:
|
||||
/*
|
||||
* Some older 20Kc chips doesn't have the 'VI' bit in
|
||||
@ -1207,7 +1224,7 @@ static void setup_scache(void)
|
||||
* processors don't have a S-cache that would be relevant to the
|
||||
* Linux memory management.
|
||||
*/
|
||||
switch (c->cputype) {
|
||||
switch (current_cpu_type()) {
|
||||
case CPU_R4000SC:
|
||||
case CPU_R4000MC:
|
||||
case CPU_R4400SC:
|
||||
@ -1384,9 +1401,8 @@ static void r4k_cache_error_setup(void)
|
||||
{
|
||||
extern char __weak except_vec2_generic;
|
||||
extern char __weak except_vec2_sb1;
|
||||
struct cpuinfo_mips *c = ¤t_cpu_data;
|
||||
|
||||
switch (c->cputype) {
|
||||
switch (current_cpu_type()) {
|
||||
case CPU_SB1:
|
||||
case CPU_SB1A:
|
||||
set_uncached_handler(0x100, &except_vec2_sb1, 0x80);
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <linux/highmem.h>
|
||||
|
||||
#include <asm/cache.h>
|
||||
#include <asm/cpu-type.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
#include <dma-coherence.h>
|
||||
@ -307,12 +308,10 @@ static void mips_dma_sync_sg_for_cpu(struct device *dev,
|
||||
{
|
||||
int i;
|
||||
|
||||
/* Make sure that gcc doesn't leave the empty loop body. */
|
||||
for (i = 0; i < nelems; i++, sg++) {
|
||||
if (cpu_needs_post_dma_flush(dev))
|
||||
if (cpu_needs_post_dma_flush(dev))
|
||||
for (i = 0; i < nelems; i++, sg++)
|
||||
__dma_sync(sg_page(sg), sg->offset, sg->length,
|
||||
direction);
|
||||
}
|
||||
}
|
||||
|
||||
static void mips_dma_sync_sg_for_device(struct device *dev,
|
||||
@ -320,12 +319,10 @@ static void mips_dma_sync_sg_for_device(struct device *dev,
|
||||
{
|
||||
int i;
|
||||
|
||||
/* Make sure that gcc doesn't leave the empty loop body. */
|
||||
for (i = 0; i < nelems; i++, sg++) {
|
||||
if (!plat_device_is_coherent(dev))
|
||||
if (!plat_device_is_coherent(dev))
|
||||
for (i = 0; i < nelems; i++, sg++)
|
||||
__dma_sync(sg_page(sg), sg->offset, sg->length,
|
||||
direction);
|
||||
}
|
||||
}
|
||||
|
||||
int mips_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include <asm/bugs.h>
|
||||
#include <asm/cacheops.h>
|
||||
#include <asm/cpu-type.h>
|
||||
#include <asm/inst.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/page.h>
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <linux/sched.h>
|
||||
#include <linux/mm.h>
|
||||
|
||||
#include <asm/cpu-type.h>
|
||||
#include <asm/mipsregs.h>
|
||||
#include <asm/bcache.h>
|
||||
#include <asm/cacheops.h>
|
||||
@ -71,7 +72,7 @@ static inline int mips_sc_is_activated(struct cpuinfo_mips *c)
|
||||
unsigned int tmp;
|
||||
|
||||
/* Check the bypass bit (L2B) */
|
||||
switch (c->cputype) {
|
||||
switch (current_cpu_type()) {
|
||||
case CPU_34K:
|
||||
case CPU_74K:
|
||||
case CPU_1004K:
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/cpu-type.h>
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/pgtable.h>
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include <linux/cache.h>
|
||||
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/cpu-type.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/war.h>
|
||||
#include <asm/uasm.h>
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <linux/timex.h>
|
||||
#include <linux/mc146818rtc.h>
|
||||
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/mipsregs.h>
|
||||
#include <asm/mipsmtregs.h>
|
||||
#include <asm/hardirq.h>
|
||||
@ -76,7 +77,7 @@ static void __init estimate_frequencies(void)
|
||||
#endif
|
||||
|
||||
#if defined (CONFIG_KVM_GUEST) && defined (CONFIG_KVM_HOST_FREQ)
|
||||
unsigned int prid = read_c0_prid() & 0xffff00;
|
||||
unsigned int prid = read_c0_prid() & (PRID_COMP_MASK | PRID_IMP_MASK);
|
||||
|
||||
/*
|
||||
* XXXKYMA: hardwire the CPU frequency to Host Freq/4
|
||||
@ -169,7 +170,7 @@ unsigned int get_c0_compare_int(void)
|
||||
|
||||
void __init plat_time_init(void)
|
||||
{
|
||||
unsigned int prid = read_c0_prid() & 0xffff00;
|
||||
unsigned int prid = read_c0_prid() & (PRID_COMP_MASK | PRID_IMP_MASK);
|
||||
unsigned int freq;
|
||||
|
||||
estimate_frequencies();
|
||||
|
@ -7,6 +7,7 @@
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/time.h>
|
||||
#include <asm/irq.h>
|
||||
@ -34,7 +35,7 @@ static void __iomem *status_reg = (void __iomem *)0xbf000410;
|
||||
*/
|
||||
static unsigned int __init estimate_cpu_frequency(void)
|
||||
{
|
||||
unsigned int prid = read_c0_prid() & 0xffff00;
|
||||
unsigned int prid = read_c0_prid() & (PRID_COMP_MASK | PRID_IMP_MASK);
|
||||
unsigned int tick = 0;
|
||||
unsigned int freq;
|
||||
unsigned int orig;
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <linux/irq.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/mipsregs.h>
|
||||
#include <asm/netlogic/xlr/fmn.h>
|
||||
#include <asm/netlogic/xlr/xlr.h>
|
||||
@ -187,7 +188,7 @@ void xlr_board_info_setup(void)
|
||||
int processor_id, num_core;
|
||||
|
||||
num_core = hweight32(nlm_current_node()->coremask);
|
||||
processor_id = read_c0_prid() & 0xff00;
|
||||
processor_id = read_c0_prid() & PRID_IMP_MASK;
|
||||
|
||||
setup_cpu_fmninfo(cpu, num_core);
|
||||
switch (processor_id) {
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <linux/oprofile.h>
|
||||
#include <linux/smp.h>
|
||||
#include <asm/cpu-info.h>
|
||||
#include <asm/cpu-type.h>
|
||||
|
||||
#include "op_impl.h"
|
||||
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include <linux/mm.h>
|
||||
#include <linux/console.h>
|
||||
#include <linux/tty.h>
|
||||
#include <linux/vt.h>
|
||||
|
||||
#include <asm/sibyte/bcm1480_regs.h>
|
||||
#include <asm/sibyte/bcm1480_scd.h>
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <linux/string.h>
|
||||
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/mipsregs.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/sibyte/sb1250.h>
|
||||
@ -119,7 +120,7 @@ void __init bcm1480_setup(void)
|
||||
uint64_t sys_rev;
|
||||
int plldiv;
|
||||
|
||||
sb1_pass = read_c0_prid() & 0xff;
|
||||
sb1_pass = read_c0_prid() & PRID_REV_MASK;
|
||||
sys_rev = __raw_readq(IOADDR(A_SCD_SYSTEM_REVISION));
|
||||
soc_type = SYS_SOC_TYPE(sys_rev);
|
||||
part_type = G_SYS_PART(sys_rev);
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <linux/string.h>
|
||||
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/mipsregs.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/sibyte/sb1250.h>
|
||||
@ -182,7 +183,7 @@ void __init sb1250_setup(void)
|
||||
int plldiv;
|
||||
int bad_config = 0;
|
||||
|
||||
sb1_pass = read_c0_prid() & 0xff;
|
||||
sb1_pass = read_c0_prid() & PRID_REV_MASK;
|
||||
sys_rev = __raw_readq(IOADDR(A_SCD_SYSTEM_REVISION));
|
||||
soc_type = SYS_SOC_TYPE(sys_rev);
|
||||
soc_pass = G_SYS_REVISION(sys_rev);
|
||||
|
@ -25,6 +25,7 @@
|
||||
#endif
|
||||
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/reboot.h>
|
||||
#include <asm/sni.h>
|
||||
@ -173,7 +174,7 @@ void __init plat_mem_setup(void)
|
||||
system_type = "RM300-Cxx";
|
||||
break;
|
||||
case SNI_BRD_PCI_DESKTOP:
|
||||
switch (read_c0_prid() & 0xff00) {
|
||||
switch (read_c0_prid() & PRID_IMP_MASK) {
|
||||
case PRID_IMP_R4600:
|
||||
case PRID_IMP_R4700:
|
||||
system_type = "RM200-C20";
|
||||
|
@ -14,53 +14,9 @@
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <linux/of.h> /* linux/of.h gets to determine #include ordering */
|
||||
|
||||
#ifndef _ASM_OPENRISC_PROM_H
|
||||
#define _ASM_OPENRISC_PROM_H
|
||||
#ifdef __KERNEL__
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <asm/irq.h>
|
||||
#include <linux/irqdomain.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/of_fdt.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/platform_device.h>
|
||||
#define HAVE_ARCH_DEVTREE_FIXUPS
|
||||
|
||||
/* Other Prototypes */
|
||||
extern int early_uartlite_console(void);
|
||||
|
||||
/* Parse the ibm,dma-window property of an OF node into the busno, phys and
|
||||
* size parameters.
|
||||
*/
|
||||
void of_parse_dma_window(struct device_node *dn, const void *dma_window_prop,
|
||||
unsigned long *busno, unsigned long *phys, unsigned long *size);
|
||||
|
||||
extern void kdump_move_device_tree(void);
|
||||
|
||||
/* Get the MAC address */
|
||||
extern const void *of_get_mac_address(struct device_node *np);
|
||||
|
||||
/**
|
||||
* of_irq_map_pci - Resolve the interrupt for a PCI device
|
||||
* @pdev: the device whose interrupt is to be resolved
|
||||
* @out_irq: structure of_irq filled by this function
|
||||
*
|
||||
* This function resolves the PCI interrupt for a given PCI device. If a
|
||||
* device-node exists for a given pci_dev, it will use normal OF tree
|
||||
* walking. If not, it will implement standard swizzling and walk up the
|
||||
* PCI tree until an device-node is found, at which point it will finish
|
||||
* resolving using the OF tree walking.
|
||||
*/
|
||||
struct pci_dev;
|
||||
extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq);
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _ASM_OPENRISC_PROM_H */
|
||||
|
@ -74,7 +74,7 @@ src-wlib-$(CONFIG_8xx) += mpc8xx.c planetcore.c
|
||||
src-wlib-$(CONFIG_PPC_82xx) += pq2.c fsl-soc.c planetcore.c
|
||||
src-wlib-$(CONFIG_EMBEDDED6xx) += mv64x60.c mv64x60_i2c.c ugecon.c
|
||||
|
||||
src-plat-y := of.c
|
||||
src-plat-y := of.c epapr.c
|
||||
src-plat-$(CONFIG_40x) += fixed-head.S ep405.c cuboot-hotfoot.c \
|
||||
treeboot-walnut.c cuboot-acadia.c \
|
||||
cuboot-kilauea.c simpleboot.c \
|
||||
@ -97,7 +97,7 @@ src-plat-$(CONFIG_EMBEDDED6xx) += cuboot-pq2.c cuboot-mpc7448hpc2.c \
|
||||
prpmc2800.c
|
||||
src-plat-$(CONFIG_AMIGAONE) += cuboot-amigaone.c
|
||||
src-plat-$(CONFIG_PPC_PS3) += ps3-head.S ps3-hvcall.S ps3.c
|
||||
src-plat-$(CONFIG_EPAPR_BOOT) += epapr.c
|
||||
src-plat-$(CONFIG_EPAPR_BOOT) += epapr.c epapr-wrapper.c
|
||||
|
||||
src-wlib := $(sort $(src-wlib-y))
|
||||
src-plat := $(sort $(src-plat-y))
|
||||
|
9
arch/powerpc/boot/epapr-wrapper.c
Normal file
9
arch/powerpc/boot/epapr-wrapper.c
Normal file
@ -0,0 +1,9 @@
|
||||
extern void epapr_platform_init(unsigned long r3, unsigned long r4,
|
||||
unsigned long r5, unsigned long r6,
|
||||
unsigned long r7);
|
||||
|
||||
void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
|
||||
unsigned long r6, unsigned long r7)
|
||||
{
|
||||
epapr_platform_init(r3, r4, r5, r6, r7);
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user