Commit 0dfeada9 authored by Olof Johansson's avatar Olof Johansson

Merge tag 'orion_dt_for_3.8' of git://git.infradead.org/users/jcooper/linux into next/dt

From Jason Cooper:
orion dt for v3.8

 - ehci-orion dt binding
 - gpio-poweroff
 - use dt regulators
 - move mpp to DT/pinctrl

Depends on:

 - orion/boards

    - merge conflicts
       - keep all 'select's in Kconfig
       - remove all #includes in board-*.c

 - pinctrl/devel up to:

    - 06763c74 pinctrl: mvebu: move to its own directory

* tag 'orion_dt_for_3.8' of git://git.infradead.org/users/jcooper/linux: (211 commits)
  ARM: Kirkwood: remove kirkwood_ehci_init() from new boards
  ARM: Kirkwood: Add support LED of OpenBlocks A6
  ARM: Kirkwood: Convert to EHCI via DT for OpenBlocks A6
  ARM: kirkwood: Add NAND partiton map for OpenBlocks A6
  ARM: kirkwood: Add support second I2C bus and RTC on OpenBlocks A6
  ARM: kirkwood: Add support DT of second I2C bus
  ARM: kirkwood: Convert mplcec4 board to pinctrl
  ARM: Kirkwood: Convert km_kirkwood to pinctrl
  ARM: Kirkwood: support 98DX412x kirkwoods with pinctrl
  ARM: Kirkwood: Convert IX2-200 to pinctrl.
  ARM: Kirkwood: Convert lsxl boards to pinctrl.
  ARM: Kirkwood: Convert ib62x0 to pinctrl.
  ARM: Kirkwood: Convert GoFlex Net to pinctrl.
  ARM: Kirkwood: Convert dreamplug to pinctrl.
  ARM: Kirkwood: Convert dockstar to pinctrl.
  ARM: Kirkwood: Convert dnskw to pinctrl
  ARM: Kirkwood: Convert iConnect to pinctrl.
  ARM: Kirkwood: Convert TS219 to pinctrl.
  ARM: Kirkwood: Add DTSI files for pinctrl
  ARM: Kirkwood: Make use of mvebu pincltl and gpio drivers
  ...
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents d408c5dc 2a18588c
......@@ -466,6 +466,10 @@ Note:
5.3 swappiness
Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only.
Please note that unlike the global swappiness, memcg knob set to 0
really prevents from any swapping even if there is a swap storage
available. This might lead to memcg OOM killer if there are no file
pages to reclaim.
Following cgroups' swappiness can't be changed.
- root cgroup (uses /proc/sys/vm/swappiness).
......
GPIO line that should be set high/low to power off a device
Required properties:
- compatible : should be "gpio-poweroff".
- gpios : The GPIO to set high/low, see "gpios property" in
Documentation/devicetree/bindings/gpio/gpio.txt. If the pin should be
low to power down the board set it to "Active Low", otherwise set
gpio to "Active High".
Optional properties:
- input : Initially configure the GPIO line as an input. Only reconfigure
it to an output when the pm_power_off function is called. If this optional
property is not specified, the GPIO is initialized as an output in its
inactive state.
Examples:
gpio-poweroff {
compatible = "gpio-poweroff";
gpios = <&gpio 4 0>; /* GPIO 4 Active Low */
};
Binding for dual-GPIO LED found on Network Space v2 (and parents).
Required properties:
- compatible: "lacie,ns2-leds".
Each LED is represented as a sub-node of the ns2-leds device.
Required sub-node properties:
- cmd-gpio: Command LED GPIO. See OF device-tree GPIO specification.
- slow-gpio: Slow LED GPIO. See OF device-tree GPIO specification.
Optional sub-node properties:
- label: Name for this LED. If omitted, the label is taken from the node name.
- linux,default-trigger: Trigger assigned to the LED.
Example:
ns2-leds {
compatible = "lacie,ns2-leds";
blue-sata {
label = "ns2:blue:sata";
slow-gpio = <&gpio0 29 0>;
cmd-gpio = <&gpio0 30 0>;
};
};
......@@ -7,8 +7,10 @@ Required properties:
- compatible: "marvell,88f6180-pinctrl",
"marvell,88f6190-pinctrl", "marvell,88f6192-pinctrl",
"marvell,88f6281-pinctrl", "marvell,88f6282-pinctrl"
"marvell,98dx4122-pinctrl"
This driver supports all kirkwood variants, i.e. 88f6180, 88f619x, and 88f628x.
It also support the 88f6281-based variant in the 98dx412x Bobcat SoCs.
Available mpp pins/groups and functions:
Note: brackets (x) are not part of the mpp name for marvell,function and given
......@@ -277,3 +279,40 @@ mpp46 46 gpio, ts(mp10), tdm(fs), lcd(hsync)
mpp47 47 gpio, ts(mp11), tdm(drx), lcd(vsync)
mpp48 48 gpio, ts(mp12), tdm(dtx), lcd(d16)
mpp49 49 gpo, tdm(rx0ql), pex(clkreq), lcd(d17)
* Marvell Bobcat 98dx4122
name pins functions
================================================================================
mpp0 0 gpio, nand(io2), spi(cs)
mpp1 1 gpo, nand(io3), spi(mosi)
mpp2 2 gpo, nand(io4), spi(sck)
mpp3 3 gpo, nand(io5), spi(miso)
mpp4 4 gpio, nand(io6), uart0(rxd)
mpp5 5 gpo, nand(io7), uart0(txd)
mpp6 6 sysrst(out), spi(mosi)
mpp7 7 gpo, pex(rsto), spi(cs)
mpp8 8 gpio, twsi0(sda), uart0(rts), uart1(rts)
mpp9 9 gpio, twsi(sck), uart0(cts), uart1(cts)
mpp10 10 gpo, spi(sck), uart0(txd)
mpp11 11 gpio, spi(miso), uart0(rxd)
mpp13 13 gpio, uart1(txd)
mpp14 14 gpio, uart1(rxd)
mpp15 15 gpio, uart0(rts)
mpp16 16 gpio, uart0(cts)
mpp18 18 gpo, nand(io0)
mpp19 19 gpo, nand(io1)
mpp34 34 gpio
mpp35 35 gpio
mpp36 36 gpio
mpp37 37 gpio
mpp38 38 gpio
mpp39 39 gpio
mpp40 40 gpio
mpp41 41 gpio
mpp42 42 gpio
mpp43 43 gpio
mpp44 44 gpio
mpp45 45 gpio
mpp49 49 gpio
* EHCI controller, Orion Marvell variants
Required properties:
- compatible: must be "marvell,orion-ehci"
- reg: physical base address of the controller and length of memory mapped
region.
- interrupts: The EHCI interrupt
Example:
ehci@50000 {
compatible = "marvell,orion-ehci";
reg = <0x50000 0x1000>;
interrupts = <19>;
};
......@@ -33,7 +33,7 @@ Table of Contents
2 Modifying System Parameters
3 Per-Process Parameters
3.1 /proc/<pid>/oom_score_adj - Adjust the oom-killer
3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj - Adjust the oom-killer
score
3.2 /proc/<pid>/oom_score - Display current oom-killer score
3.3 /proc/<pid>/io - Display the IO accounting fields
......@@ -1320,10 +1320,10 @@ of the kernel.
CHAPTER 3: PER-PROCESS PARAMETERS
------------------------------------------------------------------------------
3.1 /proc/<pid>/oom_score_adj- Adjust the oom-killer score
3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj- Adjust the oom-killer score
--------------------------------------------------------------------------------
This file can be used to adjust the badness heuristic used to select which
These file can be used to adjust the badness heuristic used to select which
process gets killed in out of memory conditions.
The badness heuristic assigns a value to each candidate task ranging from 0
......@@ -1361,6 +1361,12 @@ same system, cpuset, mempolicy, or memory controller resources to use at least
equivalent to discounting 50% of the task's allowed memory from being considered
as scoring against the task.
For backwards compatibility with previous kernels, /proc/<pid>/oom_adj may also
be used to tune the badness score. Its acceptable values range from -16
(OOM_ADJUST_MIN) to +15 (OOM_ADJUST_MAX) and a special value of -17
(OOM_DISABLE) to disable oom killing entirely for that task. Its value is
scaled linearly with /proc/<pid>/oom_score_adj.
The value of /proc/<pid>/oom_score_adj may be reduced no lower than the last
value set by a CAP_SYS_RESOURCE process. To reduce the value any lower
requires CAP_SYS_RESOURCE.
......@@ -1375,7 +1381,9 @@ minimal amount of work.
-------------------------------------------------------------
This file can be used to check the current score used by the oom-killer is for
any given <pid>.
any given <pid>. Use it together with /proc/<pid>/oom_score_adj to tune which
process should be killed in an out-of-memory situation.
3.3 /proc/<pid>/io - Display the IO accounting fields
-------------------------------------------------------
......
......@@ -164,4 +164,4 @@ read the CRC recorded by the NIC on receipt of the packet.
This requests that the NIC receive all possible frames, including errored
frames (such as bad FCS, etc). This can be helpful when sniffing a link with
bad packets on it. Some NICs may receive more packets if also put into normal
PROMISC mdoe.
PROMISC mode.
......@@ -1193,4 +1193,6 @@ foo_switch()
...
}
The above has to be done from process context.
The above has to be done from process context. The reservation of the pins
will be done when the state is activated, so in effect one specific pin
can be used by different functions at different times on a running system.
......@@ -3597,6 +3597,49 @@ F: drivers/hid/hid-hyperv.c
F: drivers/net/hyperv/
F: drivers/staging/hv/
I2C OVER PARALLEL PORT
M: Jean Delvare <khali@linux-fr.org>
L: linux-i2c@vger.kernel.org
S: Maintained
F: Documentation/i2c/busses/i2c-parport
F: Documentation/i2c/busses/i2c-parport-light
F: drivers/i2c/busses/i2c-parport.c
F: drivers/i2c/busses/i2c-parport-light.c
I2C/SMBUS CONTROLLER DRIVERS FOR PC
M: Jean Delvare <khali@linux-fr.org>
L: linux-i2c@vger.kernel.org
S: Maintained
F: Documentation/i2c/busses/i2c-ali1535
F: Documentation/i2c/busses/i2c-ali1563
F: Documentation/i2c/busses/i2c-ali15x3
F: Documentation/i2c/busses/i2c-amd756
F: Documentation/i2c/busses/i2c-amd8111
F: Documentation/i2c/busses/i2c-i801
F: Documentation/i2c/busses/i2c-nforce2
F: Documentation/i2c/busses/i2c-piix4
F: Documentation/i2c/busses/i2c-sis5595
F: Documentation/i2c/busses/i2c-sis630
F: Documentation/i2c/busses/i2c-sis96x
F: Documentation/i2c/busses/i2c-via
F: Documentation/i2c/busses/i2c-viapro
F: drivers/i2c/busses/i2c-ali1535.c
F: drivers/i2c/busses/i2c-ali1563.c
F: drivers/i2c/busses/i2c-ali15x3.c
F: drivers/i2c/busses/i2c-amd756.c
F: drivers/i2c/busses/i2c-amd756-s4882.c
F: drivers/i2c/busses/i2c-amd8111.c
F: drivers/i2c/busses/i2c-i801.c
F: drivers/i2c/busses/i2c-isch.c
F: drivers/i2c/busses/i2c-nforce2.c
F: drivers/i2c/busses/i2c-nforce2-s4985.c
F: drivers/i2c/busses/i2c-piix4.c
F: drivers/i2c/busses/i2c-sis5595.c
F: drivers/i2c/busses/i2c-sis630.c
F: drivers/i2c/busses/i2c-sis96x.c
F: drivers/i2c/busses/i2c-via.c
F: drivers/i2c/busses/i2c-viapro.c
I2C/SMBUS STUB DRIVER
M: "Mark M. Hoffman" <mhoffman@lightlink.com>
L: linux-i2c@vger.kernel.org
......@@ -3604,9 +3647,8 @@ S: Maintained
F: drivers/i2c/busses/i2c-stub.c
I2C SUBSYSTEM
M: "Jean Delvare (PC drivers, core)" <khali@linux-fr.org>
M: Wolfram Sang <w.sang@pengutronix.de>
M: "Ben Dooks (embedded platforms)" <ben-linux@fluff.org>
M: "Wolfram Sang (embedded platforms)" <w.sang@pengutronix.de>
L: linux-i2c@vger.kernel.org
W: http://i2c.wiki.kernel.org/
T: quilt kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-i2c/
......@@ -3617,6 +3659,13 @@ F: drivers/i2c/
F: include/linux/i2c.h
F: include/linux/i2c-*.h
I2C-TAOS-EVM DRIVER
M: Jean Delvare <khali@linux-fr.org>
L: linux-i2c@vger.kernel.org
S: Maintained
F: Documentation/i2c/busses/i2c-taos-evm
F: drivers/i2c/busses/i2c-taos-evm.c
I2C-TINY-USB DRIVER
M: Till Harbaum <till@harbaum.org>
L: linux-i2c@vger.kernel.org
......@@ -7209,6 +7258,14 @@ L: linux-xtensa@linux-xtensa.org
S: Maintained
F: arch/xtensa/
THERMAL
M: Zhang Rui <rui.zhang@intel.com>
L: linux-pm@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git
S: Supported
F: drivers/thermal/
F: include/linux/thermal.h
THINKPAD ACPI EXTRAS DRIVER
M: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>
L: ibm-acpi-devel@lists.sourceforge.net
......@@ -7886,13 +7943,6 @@ M: Roger Luethi <rl@hellgate.ch>
S: Maintained
F: drivers/net/ethernet/via/via-rhine.c
VIAPRO SMBUS DRIVER
M: Jean Delvare <khali@linux-fr.org>
L: linux-i2c@vger.kernel.org
S: Maintained
F: Documentation/i2c/busses/i2c-viapro
F: drivers/i2c/busses/i2c-viapro.c
VIA SD/MMC CARD CONTROLLER DRIVER
M: Bruce Chang <brucechang@via.com.tw>
M: Harald Welte <HaraldWelte@viatech.com>
......
VERSION = 3
PATCHLEVEL = 7
SUBLEVEL = 0
EXTRAVERSION = -rc5
EXTRAVERSION = -rc6
NAME = Terrified Chipmunk
# *DOCUMENTATION*
......
......@@ -523,6 +523,8 @@ config ARCH_DOVE
select CPU_V7
select GENERIC_CLOCKEVENTS
select MIGHT_HAVE_PCI
select PINCTRL
select PINCTRL_DOVE
select PLAT_ORION_LEGACY
select USB_ARCH_HAS_EHCI
help
......@@ -534,6 +536,8 @@ config ARCH_KIRKWOOD
select CPU_FEROCEON
select GENERIC_CLOCKEVENTS
select PCI
select PINCTRL
select PINCTRL_KIRKWOOD
select PLAT_ORION_LEGACY
help
Support for the following Marvell Kirkwood series SoCs:
......
......@@ -33,7 +33,7 @@ ifeq ($(CONFIG_XIP_KERNEL),y)
$(obj)/xipImage: vmlinux FORCE
$(call if_changed,objcopy)
$(kecho) ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))'
@$(kecho) ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))'
$(obj)/Image $(obj)/zImage: FORCE
@echo 'Kernel configured for XIP (CONFIG_XIP_KERNEL=y)'
......@@ -48,14 +48,14 @@ $(obj)/xipImage: FORCE
$(obj)/Image: vmlinux FORCE
$(call if_changed,objcopy)
$(kecho) ' Kernel: $@ is ready'
@$(kecho) ' Kernel: $@ is ready'
$(obj)/compressed/vmlinux: $(obj)/Image FORCE
$(Q)$(MAKE) $(build)=$(obj)/compressed $@
$(obj)/zImage: $(obj)/compressed/vmlinux FORCE
$(call if_changed,objcopy)
$(kecho) ' Kernel: $@ is ready'
@$(kecho) ' Kernel: $@ is ready'
endif
......@@ -90,7 +90,7 @@ fi
$(obj)/uImage: $(obj)/zImage FORCE
@$(check_for_multiple_loadaddr)
$(call if_changed,uimage)
$(kecho) ' Image $@ is ready'
@$(kecho) ' Image $@ is ready'
$(obj)/bootp/bootp: $(obj)/zImage initrd FORCE
$(Q)$(MAKE) $(build)=$(obj)/bootp $@
......@@ -98,7 +98,7 @@ $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE
$(obj)/bootpImage: $(obj)/bootp/bootp FORCE
$(call if_changed,objcopy)
$(kecho) ' Kernel: $@ is ready'
@$(kecho) ' Kernel: $@ is ready'
PHONY += initrd FORCE
initrd:
......
......@@ -40,11 +40,20 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \
kirkwood-ib62x0.dtb \
kirkwood-iconnect.dtb \
kirkwood-iomega_ix2_200.dtb \
kirkwood-is2.dtb \
kirkwood-km_kirkwood.dtb \
kirkwood-lschlv2.dtb \
kirkwood-lsxhl.dtb \
kirkwood-mplcec4.dtb \
kirkwood-ns2.dtb \
kirkwood-ns2lite.dtb \
kirkwood-ns2max.dtb \
kirkwood-ns2mini.dtb \
kirkwood-nsa310.dtb \
kirkwood-topkick.dtb \
kirkwood-ts219-6281.dtb \
kirkwood-ts219-6282.dtb
kirkwood-ts219-6282.dtb \
kirkwood-openblocks_a6.dtb
dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \
msm8960-cdp.dtb
dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
......@@ -83,6 +92,7 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
am335x-evm.dtb \
am335x-evmsk.dtb \
am335x-bone.dtb
dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-ethernet-disk-mini-v2.dtb
dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb
dtb-$(CONFIG_ARCH_U8500) += snowball.dtb
dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \
......
......@@ -40,3 +40,13 @@ spi-flash@0 {
reg = <0>;
};
};
&pinctrl {
pinctrl-0 = <&pmx_gpio_18>;
pinctrl-names = "default";
pmx_gpio_18: pmx-gpio-18 {
marvell,pins = "mpp18";
marvell,function = "gpio";
};
};
......@@ -4,6 +4,12 @@ / {
compatible = "marvell,dove";
model = "Marvell Armada 88AP510 SoC";
aliases {
gpio0 = &gpio0;
gpio1 = &gpio1;
gpio2 = &gpio2;
};
soc@f1000000 {
compatible = "simple-bus";
#address-cells = <1>;
......@@ -72,7 +78,8 @@ gpio0: gpio@d0400 {
#gpio-cells = <2>;
gpio-controller;
reg = <0xd0400 0x20>;
ngpio = <32>;
ngpios = <32>;
interrupt-controller;
interrupts = <12>, <13>, <14>, <60>;
};
......@@ -81,7 +88,8 @@ gpio1: gpio@d0420 {
#gpio-cells = <2>;
gpio-controller;
reg = <0xd0420 0x20>;
ngpio = <32>;
ngpios = <32>;
interrupt-controller;
interrupts = <61>;
};
......@@ -90,7 +98,12 @@ gpio2: gpio@e8400 {
#gpio-cells = <2>;
gpio-controller;
reg = <0xe8400 0x0c>;
ngpio = <8>;
ngpios = <8>;
};
pinctrl: pinctrl@d0200 {
compatible = "marvell,dove-pinctrl";
reg = <0xd0200 0x10>;
};
spi0: spi@10600 {
......
/ {
ocp@f1000000 {
pinctrl: pinctrl@10000 {
compatible = "marvell,88f6281-pinctrl";
reg = <0x10000 0x20>;
pmx_nand: pmx-nand {
marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3",
"mpp4", "mpp5", "mpp18",
"mpp19";
marvell,function = "nand";
};
pmx_sata0: pmx-sata0 {
marvell,pins = "mpp5", "mpp21", "mpp23";
marvell,function = "sata0";
};
pmx_sata1: pmx-sata1 {
marvell,pins = "mpp4", "mpp20", "mpp22";
marvell,function = "sata1";
};
pmx_spi: pmx-spi {
marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3";
marvell,function = "spi";
};
pmx_twsi0: pmx-twsi0 {
marvell,pins = "mpp8", "mpp9";
marvell,function = "twsi0";
};
pmx_uart0: pmx-uart0 {
marvell,pins = "mpp10", "mpp11";
marvell,function = "uart0";
};
pmx_uart1: pmx-uart1 {
marvell,pins = "mpp13", "mpp14";
marvell,function = "uart1";
};
pmx_sdio: pmx-sdio {
marvell,pins = "mpp12", "mpp13", "mpp14",
"mpp15", "mpp16", "mpp17";
marvell,function = "sdio";
};
};
};
};
/ {
ocp@f1000000 {
pinctrl: pinctrl@10000 {
compatible = "marvell,88f6282-pinctrl";
reg = <0x10000 0x20>;
pmx_sata0: pmx-sata0 {
marvell,pins = "mpp5", "mpp21", "mpp23";
marvell,function = "sata0";
};
pmx_sata1: pmx-sata1 {
marvell,pins = "mpp4", "mpp20", "mpp22";
marvell,function = "sata1";
};
pmx_spi: pmx-spi {
marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3";
marvell,function = "spi";
};
pmx_twsi0: pmx-twsi0 {
marvell,pins = "mpp8", "mpp9";
marvell,function = "twsi0";
};
pmx_uart0: pmx-uart0 {
marvell,pins = "mpp10", "mpp11";
marvell,function = "uart0";
};
pmx_uart1: pmx-uart1 {
marvell,pins = "mpp13", "mpp14";
marvell,function = "uart1";
};
};
i2c@11100 {
compatible = "marvell,mv64xxx-i2c";
reg = <0x11100 0x20>;
#address-cells = <1>;
#size-cells = <0>;
interrupts = <32>;
clock-frequency = <100000>;
status = "disabled";
};
};
};
/ {
ocp@f1000000 {
pinctrl: pinctrl@10000 {
compatible = "marvell,98dx4122-pinctrl";
reg = <0x10000 0x20>;
pmx_nand: pmx-nand {
marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3",
"mpp4", "mpp5", "mpp18",
"mpp19";
marvell,function = "nand";
};
pmx_spi: pmx-spi {
marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3";
marvell,function = "spi";
};
pmx_twsi0: pmx-twsi0 {
marvell,pins = "mpp8", "mpp9";
marvell,function = "twsi0";
};
pmx_uart0: pmx-uart0 {
marvell,pins = "mpp10", "mpp11";
marvell,function = "uart0";
};
pmx_uart1: pmx-uart1 {
marvell,pins = "mpp13", "mpp14";
marvell,function = "uart1";
};
};
};
};
/include/ "kirkwood.dtsi"
/include/ "kirkwood-6281.dtsi"
/ {
model = "D-Link DNS NASes (kirkwood-based)";
......@@ -35,7 +36,116 @@ gpio_fan {
6000 2>;
};
gpio_poweroff {
compatible = "gpio-poweroff";
gpios = <&gpio1 4 0>;
};
ocp@f1000000 {
pinctrl: pinctrl@10000 {
pinctrl-0 = < &pmx_nand &pmx_uart1
&pmx_sata0 &pmx_sata1
&pmx_led_power
&pmx_led_red_right_hdd
&pmx_led_red_left_hdd
&pmx_led_red_usb_325
&pmx_button_power
&pmx_led_red_usb_320
&pmx_power_off &pmx_power_back_on
&pmx_power_sata0 &pmx_power_sata1
&pmx_present_sata0 &pmx_present_sata1
&pmx_led_white_usb &pmx_fan_tacho
&pmx_fan_high_speed &pmx_fan_low_speed
&pmx_button_unmount &pmx_button_reset
&pmx_temp_alarm >;
pinctrl-names = "default";
pmx_sata0: pmx-sata0 {
marvell,pins = "mpp20";
marvell,function = "sata1";
};
pmx_sata1: pmx-sata1 {
marvell,pins = "mpp21";
marvell,function = "sata0";
};
pmx_led_power: pmx-led-power {
marvell,pins = "mpp26";
marvell,function = "gpio";
};
pmx_led_red_right_hdd: pmx-led-red-right-hdd {
marvell,pins = "mpp27";
marvell,function = "gpio";
};
pmx_led_red_left_hdd: pmx-led-red-left-hdd {
marvell,pins = "mpp28";
marvell,function = "gpio";
};
pmx_led_red_usb_325: pmx-led-red-usb-325 {
marvell,pins = "mpp29";
marvell,function = "gpio";
};
pmx_button_power: pmx-button-power {
marvell,pins = "mpp34";
marvell,function = "gpio";
};
pmx_led_red_usb_320: pmx-led-red-usb-320 {
marvell,pins = "mpp35";
marvell,function = "gpio";
};
pmx_power_off: pmx-power-off {
marvell,pins = "mpp36";
marvell,function = "gpio";
};
pmx_power_back_on: pmx-power-back-on {
marvell,pins = "mpp37";
marvell,function = "gpio";
};
pmx_power_sata0: pmx-power-sata0 {
marvell,pins = "mpp39";
marvell,function = "gpio";
};
pmx_power_sata1: pmx-power-sata1 {
marvell,pins = "mpp40";
marvell,function = "gpio";
};
pmx_present_sata0: pmx-present-sata0 {
marvell,pins = "mpp41";
marvell,function = "gpio";
};
pmx_present_sata1: pmx-present-sata1 {
marvell,pins = "mpp42";
marvell,function = "gpio";
};
pmx_led_white_usb: pmx-led-white-usb {
marvell,pins = "mpp43";
marvell,function = "gpio";
};
pmx_fan_tacho: pmx-fan-tacho {
marvell,pins = "mpp44";
marvell,function = "gpio";
};
pmx_fan_high_speed: pmx-fan-high-speed {
marvell,pins = "mpp45";
marvell,function = "gpio";
};
pmx_fan_low_speed: pmx-fan-low-speed {
marvell,pins = "mpp46";
marvell,function = "gpio";
};
pmx_button_unmount: pmx-button-unmount {
marvell,pins = "mpp47";
marvell,function = "gpio";
};
pmx_button_reset: pmx-button-reset {
marvell,pins = "mpp48";
marvell,function = "gpio";
};
pmx_temp_alarm: pmx-temp-alarm {
marvell,pins = "mpp49";
marvell,function = "gpio";
};
};
sata@80000 {
status = "okay";
nr-ports = <2>;
......@@ -43,6 +153,7 @@ sata@80000 {
nand@3000000 {
status = "okay";
chip-delay = <35>;
partition@0 {
label = "u-boot";
......@@ -76,4 +187,33 @@ partition@7b00000 {
};
};
};
regulators {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <0>;
sata0_power: regulator@1 {
compatible = "regulator-fixed";
reg = <1>;
regulator-name = "SATA0 Power";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
regulator-always-on;
regulator-boot-on;
gpio = <&gpio1 7 0>;
};
sata1_power: regulator@2 {
compatible = "regulator-fixed";
reg = <2>;
regulator-name = "SATA1 Power";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
regulator-always-on;
regulator-boot-on;
gpio = <&gpio1 8 0>;
};
};
};
/dts-v1/;
/include/ "kirkwood.dtsi"
/include/ "kirkwood-6281.dtsi"
/ {
model = "Seagate FreeAgent Dockstar";
......@@ -16,6 +17,25 @@ chosen {
};
ocp@f1000000 {
pinctrl: pinctrl@10000 {
pinctrl-0 = < &pmx_usb_power_enable
&pmx_led_green &pmx_led_orange >;
pinctrl-names = "default";
pmx_usb_power_enable: pmx-usb-power-enable {
marvell,pins = "mpp29";
marvell,function = "gpio";
};
pmx_led_green: pmx-led-green {
marvell,pins = "mpp46";
marvell,function = "gpio";
};
pmx_led_orange: pmx-led-orange {
marvell,pins = "mpp47";
marvell,function = "gpio";
};
};
serial@12000 {
clock-frequency = <200000000>;
status = "ok";
......@@ -54,4 +74,21 @@ fault {
gpios = <&gpio1 15 1>;
};
};
regulators {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <0>;
usb_power: regulator@1 {
compatible = "regulator-fixed";
reg = <1>;
regulator-name = "USB Power";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
regulator-always-on;
regulator-boot-on;
gpio = <&gpio0 29 0>;
};
};
};
/dts-v1/;
/include/ "kirkwood.dtsi"
/include/ "kirkwood-6281.dtsi"
/ {
model = "Globalscale Technologies Dreamplug";
......@@ -16,6 +17,26 @@ chosen {
};
ocp@f1000000 {
pinctrl: pinctrl@10000 {
pinctrl-0 = < &pmx_spi
&pmx_led_bluetooth &pmx_led_wifi
&pmx_led_wifi_ap >;
pinctrl-names = "default";
pmx_led_bluetooth: pmx-led-bluetooth {
marvell,pins = "mpp47";
marvell,function = "gpio";
};
pmx_led_wifi: pmx-led-wifi {
marvell,pins = "mpp48";
marvell,function = "gpio";
};
pmx_led_wifi_ap: pmx-led-wifi-ap {
marvell,pins = "mpp49";
marvell,function = "gpio";
};
};
serial@12000 {
clock-frequency = <200000000>;
status = "ok";
......
/dts-v1/;
/include/ "kirkwood.dtsi"
/include/ "kirkwood-6281.dtsi"
/ {
model = "Seagate GoFlex Net";
......@@ -16,6 +17,61 @@ chosen {
};
ocp@f1000000 {
pinctrl: pinctrl@10000 {
pinctrl-0 = < &pmx_usb_power_enable &pmx_led_orange
&pmx_led_left_cap_0 &pmx_led_left_cap_1
&pmx_led_left_cap_2 &pmx_led_left_cap_3
&pmx_led_right_cap_0 &pmx_led_right_cap_1
&pmx_led_right_cap_2 &pmx_led_right_cap_3
>;
pinctrl-names = "default";
pmx_usb_power_enable: pmx-usb-power-enable {
marvell,pins = "mpp29";
marvell,function = "gpio";
};
pmx_led_right_cap_0: pmx-led_right_cap_0 {
marvell,pins = "mpp38";
marvell,function = "gpio";
};
pmx_led_right_cap_1: pmx-led_right_cap_1 {
marvell,pins = "mpp39";
marvell,function = "gpio";
};
pmx_led_right_cap_2: pmx-led_right_cap_2 {
marvell,pins = "mpp40";
marvell,function = "gpio";
};
pmx_led_right_cap_3: pmx-led_right_cap_3 {
marvell,pins = "mpp41";
marvell,function = "gpio";
};
pmx_led_left_cap_0: pmx-led_left_cap_0 {
marvell,pins = "mpp42";
marvell,function = "gpio";
};
pmx_led_left_cap_1: pmx-led_left_cap_1 {
marvell,pins = "mpp43";
marvell,function = "gpio";
};
pmx_led_left_cap_2: pmx-led_left_cap_2 {
marvell,pins = "mpp44";
marvell,function = "gpio";
};
pmx_led_left_cap_3: pmx-led_left_cap_3 {
marvell,pins = "mpp45";
marvell,function = "gpio";
};
pmx_led_green: pmx-led_green {
marvell,pins = "mpp46";
marvell,function = "gpio";
};
pmx_led_orange: pmx-led_orange {
marvell,pins = "mpp47";
marvell,function = "gpio";
};
};
serial@12000 {
clock-frequency = <200000000>;
status = "ok";
......@@ -96,4 +152,21 @@ right3 {
gpios = <&gpio1 9 0>;
};
};
regulators {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <0>;
usb_power: regulator@1 {
compatible = "regulator-fixed";
reg = <1>;
regulator-name = "USB Power";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
regulator-always-on;
regulator-boot-on;
gpio = <&gpio0 29 0>;
};
};
};
/dts-v1/;
/include/ "kirkwood.dtsi"
/include/ "kirkwood-6281.dtsi"
/ {
model = "RaidSonic ICY BOX IB-NAS62x0 (Rev B)";
......@@ -16,6 +17,39 @@ chosen {
};
ocp@f1000000 {
pinctrl: pinctrl@10000 {
pinctrl-0 = < &pmx_nand
&pmx_led_os_red &pmx_power_off
&pmx_led_os_green &pmx_led_usb_transfer
&pmx_button_reset &pmx_button_usb_copy >;
pinctrl-names = "default";
pmx_led_os_red: pmx-led-os-red {
marvell,pins = "mpp22";
marvell,function = "gpio";
};
pmx_power_off: pmx-power-off {
marvell,pins = "mpp24";
marvell,function = "gpio";
};
pmx_led_os_green: pmx-led-os-green {
marvell,pins = "mpp25";
marvell,function = "gpio";
};
pmx_led_usb_transfer: pmx-led-usb-transfer {
marvell,pins = "mpp27";
marvell,function = "gpio";
};
pmx_button_reset: pmx-button-reset {
marvell,pins = "mpp28";
marvell,function = "gpio";
};
pmx_button_usb_copy: pmx-button-usb-copy {
marvell,pins = "mpp29";
marvell,function = "gpio";
};
};
serial@12000 {
clock-frequency = <200000000>;
status = "okay";
......@@ -79,4 +113,10 @@ usb-copy {
gpios = <&gpio0 27 0>;
};
};
gpio_poweroff {
compatible = "gpio-poweroff";
gpios = <&gpio0 24 0>;
};
};
/dts-v1/;
/include/ "kirkwood.dtsi"
/include/ "kirkwood-6281.dtsi"
/ {
model = "Iomega Iconnect";
......@@ -18,6 +19,56 @@ chosen {
};
ocp@f1000000 {
pinctrl: pinctrl@10000 {
pinctrl-0 = < &pmx_gpio_12 &pmx_gpio_35
&pmx_gpio_41 &pmx_gpio_42
&pmx_gpio_43 &pmx_gpio_44
&pmx_gpio_45 &pmx_gpio_46
&pmx_gpio_47 &pmx_gpio_48 >;
pinctrl-names = "default";
pmx_gpio_12: pmx-gpio-12 {
marvell,pins = "mpp12";
marvell,function = "gpio";
};
pmx_gpio_35: pmx-gpio-35 {
marvell,pins = "mpp35";
marvell,function = "gpio";
};
pmx_gpio_41: pmx-gpio-41 {
marvell,pins = "mpp41";
marvell,function = "gpio";
};
pmx_gpio_42: pmx-gpio-42 {
marvell,pins = "mpp42";
marvell,function = "gpio";
};
pmx_gpio_43: pmx-gpio-43 {
marvell,pins = "mpp43";
marvell,function = "gpio";
};
pmx_gpio_44: pmx-gpio-44 {
marvell,pins = "mpp44";
marvell,function = "gpio";
};
pmx_gpio_45: pmx-gpio-45 {
marvell,pins = "mpp45";
marvell,function = "gpio";
};
pmx_gpio_46: pmx-gpio-46 {
marvell,pins = "mpp46";
marvell,function = "gpio";
};
pmx_gpio_47: pmx-gpio-47 {
marvell,pins = "mpp47";
marvell,function = "gpio";
};
pmx_gpio_48: pmx-gpio-48 {
marvell,pins = "mpp48";
marvell,function = "gpio";
};
};
i2c@11000 {
status = "okay";
......
/dts-v1/;
/include/ "kirkwood.dtsi"
/include/ "kirkwood-6281.dtsi"
/ {
model = "Iomega StorCenter ix2-200";
......@@ -16,6 +17,94 @@ chosen {
};
ocp@f1000000 {
pinctrl: pinctrl@10000 {
pinctrl-0 = < &pmx_button_reset &pmx_button_power
&pmx_led_backup &pmx_led_power
&pmx_button_otb &pmx_led_rebuild
&pmx_led_health
&pmx_led_sata_brt_ctrl_1
&pmx_led_sata_brt_ctrl_2
&pmx_led_backup_brt_ctrl_1
&pmx_led_backup_brt_ctrl_2
&pmx_led_power_brt_ctrl_1
&pmx_led_power_brt_ctrl_2
&pmx_led_health_brt_ctrl_1
&pmx_led_health_brt_ctrl_2
&pmx_led_rebuild_brt_ctrl_1
&pmx_led_rebuild_brt_ctrl_2 >;
pinctrl-names = "default";
pmx_button_reset: pmx-button-reset {
marvell,pins = "mpp12";
marvell,function = "gpio";
};
pmx_button_power: pmx-button-power {
marvell,pins = "mpp14";
marvell,function = "gpio";
};
pmx_led_backup: pmx-led-backup {
marvell,pins = "mpp15";
marvell,function = "gpio";
};
pmx_led_power: pmx-led-power {
marvell,pins = "mpp16";
marvell,function = "gpio";
};
pmx_button_otb: pmx-button-otb {
marvell,pins = "mpp35";
marvell,function = "gpio";
};
pmx_led_rebuild: pmx-led-rebuild {
marvell,pins = "mpp36";
marvell,function = "gpio";
};
pmx_led_health: pmx-led_health {
marvell,pins = "mpp37";
marvell,function = "gpio";
};
pmx_led_sata_brt_ctrl_1: pmx-led-sata-brt-ctrl-1 {
marvell,pins = "mpp38";
marvell,function = "gpio";
};
pmx_led_sata_brt_ctrl_2: pmx-led-sata-brt-ctrl-2 {
marvell,pins = "mpp39";
marvell,function = "gpio";
};
pmx_led_backup_brt_ctrl_1: pmx-led-backup-brt-ctrl-1 {
marvell,pins = "mpp40";
marvell,function = "gpio";
};
pmx_led_backup_brt_ctrl_2: pmx-led-backup-brt-ctrl-2 {
marvell,pins = "mpp41";
marvell,function = "gpio";
};
pmx_led_power_brt_ctrl_1: pmx-led-power-brt-ctrl-1 {
marvell,pins = "mpp42";
marvell,function = "gpio";
};
pmx_led_power_brt_ctrl_2: pmx-led-power-brt-ctrl-2 {
marvell,pins = "mpp43";
marvell,function = "gpio";
};
pmx_led_health_brt_ctrl_1: pmx-led-health-brt-ctrl-1 {
marvell,pins = "mpp44";
marvell,function = "gpio";
};
pmx_led_health_brt_ctrl_2: pmx-led-health-brt-ctrl-2 {
marvell,pins = "mpp45";
marvell,function = "gpio";
};
pmx_led_rebuild_brt_ctrl_1: pmx-led-rebuild-brt-ctrl-1 {
marvell,pins = "mpp44";
marvell,function = "gpio";
};
pmx_led_rebuild_brt_ctrl_2: pmx-led-rebuild-brt-ctrl-2 {
marvell,pins = "mpp45";
marvell,function = "gpio";
};
};
i2c@11000 {
status = "okay";
......
/dts-v1/;
/include/ "kirkwood-ns2-common.dtsi"
/ {
model = "LaCie Internet Space v2";
compatible = "lacie,inetspace_v2", "marvell,kirkwood-88f6281", "marvell,kirkwood";
memory {
device_type = "memory";
reg = <0x00000000 0x8000000>;
};
ocp@f1000000 {
sata@80000 {
status = "okay";
nr-ports = <1>;
};
};
ns2-leds {
compatible = "lacie,ns2-leds";
blue-sata {
label = "ns2:blue:sata";
slow-gpio = <&gpio0 29 0>;
cmd-gpio = <&gpio0 30 0>;
};
};
};
/dts-v1/;
/include/ "kirkwood.dtsi"
/include/ "kirkwood-98dx4122.dtsi"
/ {
model = "Keymile Kirkwood Reference Design";
......@@ -16,6 +17,22 @@ chosen {
};
ocp@f1000000 {
pinctrl: pinctrl@10000 {
pinctrl-0 = < &pmx_nand &pmx_i2c_gpio_sda
&pmx_i2c_gpio_scl >;
pinctrl-names = "default";
pmx_i2c_gpio_sda: pmx-gpio-sda {
marvell,pins = "mpp8";
marvell,function = "gpio";
};
pmx_i2c_gpio_scl: pmx-gpio-scl {
marvell,pins = "mpp9";
marvell,function = "gpio";
};
};
serial@12000 {
clock-frequency = <200000000>;
status = "ok";
......
/include/ "kirkwood.dtsi"
/include/ "kirkwood-6281.dtsi"
/ {
chosen {
......@@ -6,6 +7,71 @@ chosen {
};
ocp@f1000000 {
pinctrl: pinctrl@10000 {
pinctrl-0 = < &pmx_power_hdd &pmx_usb_vbus
&pmx_fan_low &pmx_fan_high
&pmx_led_function_red &pmx_led_alarm
&pmx_led_info &pmx_led_power
&pmx_fan_lock &pmx_button_function
&pmx_power_switch &pmx_power_auto_switch
&pmx_led_function_blue >;
pinctrl-names = "default";
pmx_power_hdd: pmx-power-hdd {
marvell,pins = "mpp10";
marvell,function = "gpo";
};
pmx_usb_vbus: pmx-usb-vbus {
marvell,pins = "mpp11";
marvell,function = "gpio";
};
pmx_fan_high: pmx-fan-high {
marvell,pins = "mpp18";
marvell,function = "gpo";
};
pmx_fan_low: pmx-fan-low {
marvell,pins = "mpp19";
marvell,function = "gpo";
};
pmx_led_function_blue: pmx-led-function-blue {
marvell,pins = "mpp36";
marvell,function = "gpio";
};
pmx_led_alarm: pmx-led-alarm {
marvell,pins = "mpp37";
marvell,function = "gpio";
};
pmx_led_info: pmx-led-info {
marvell,pins = "mpp38";
marvell,function = "gpio";
};
pmx_led_power: pmx-led-power {
marvell,pins = "mpp39";
marvell,function = "gpio";
};
pmx_fan_lock: pmx-fan-lock {
marvell,pins = "mpp40";
marvell,function = "gpio";
};
pmx_button_function: pmx-button-function {
marvell,pins = "mpp41";
marvell,function = "gpio";
};
pmx_power_switch: pmx-power-switch {
marvell,pins = "mpp42";
marvell,function = "gpio";
};
pmx_power_auto_switch: pmx-power-auto-switch {
marvell,pins = "mpp43";
marvell,function = "gpio";
};
pmx_led_function_red: pmx-led-function_red {
marvell,pins = "mpp48";
marvell,function = "gpio";
};
};
sata@80000 {
status = "okay";
nr-ports = <1>;
......@@ -94,4 +160,44 @@ led@5 {
gpios = <&gpio1 16 1>;
};
};
gpio_fan {
compatible = "gpio-fan";
gpios = <&gpio0 19 1
&gpio0 18 1>;
gpio-fan,speed-map = <0 3
1500 2
3250 1
5000 0>;
alarm-gpios = <&gpio1 8 0>;
};
regulators {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <0>;
usb_power: regulator@1 {
compatible = "regulator-fixed";
reg = <1>;
regulator-name = "USB Power";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
regulator-always-on;
regulator-boot-on;
gpio = <&gpio0 11 0>;
};
hdd_power: regulator@2 {
compatible = "regulator-fixed";
reg = <2>;
regulator-name = "HDD Power";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
regulator-always-on;
regulator-boot-on;
gpio = <&gpio0 10 0>;
};
};
};
/dts-v1/;
/include/ "kirkwood.dtsi"
/include/ "kirkwood-6281.dtsi"
/ {
model = "MPL CEC4";
compatible = "mpl,cec4-10", "mpl,cec4", "marvell,kirkwood-88f6281", "marvell,kirkwood";
memory {
device_type = "memory";
reg = <0x00000000 0x20000000>;
};
chosen {
bootargs = "console=ttyS0,115200n8 earlyprintk";
};
ocp@f1000000 {
pinctrl: pinctrl@10000 {
pinctrl-0 = < &pmx_nand &pmx_uart0
&pmx_led_health &pmx_sdio
&pmx_sata0 &pmx_sata1
&pmx_led_user1o
&pmx_led_user1g &pmx_led_user0o
&pmx_led_user0g &pmx_led_misc
&pmx_sdio_cd
>;
pinctrl-names = "default";
pmx_led_health: pmx-led-health {
marvell,pins = "mpp7";
marvell,function = "gpo";
};
pmx_sata1: pmx-sata1 {
marvell,pins = "mpp34";
marvell,function = "sata1";
};
pmx_sata0: pmx-sata0 {
marvell,pins = "mpp35";
marvell,function = "sata0";
};
pmx_led_user1o: pmx-led-user1o {
marvell,pins = "mpp40";
marvell,function = "gpio";
};
pmx_led_user1g: pmx-led-user1g {
marvell,pins = "mpp41";
marvell,function = "gpio";
};
pmx_led_user0o: pmx-led-user0o {
marvell,pins = "mpp44";
marvell,function = "gpio";
};
pmx_led_user0g: pmx-led-user0g {
marvell,pins = "mpp45";
marvell,function = "gpio";
};
pmx_led_misc: pmx-led-misc {
marvell,pins = "mpp46";
marvell,function = "gpio";
};
pmx_sdio_cd: pmx-sdio-cd {
marvell,pins = "mpp47";
marvell,function = "gpio";
};
};
i2c@11000 {
status = "okay";
rtc@51 {
compatible = "nxp,pcf8563";
reg = <0x51>;
};
eeprom@57 {
compatible = "atmel,24c02";
reg = <0x57>;
};
};
serial@12000 {
clock-frequency = <200000000>;
status = "ok";
};
nand@3000000 {
status = "okay";
partition@0 {
label = "uboot";
reg = <0x0000000 0x100000>;
};
partition@100000 {
label = "env";
reg = <0x100000 0x80000>;
};
partition@180000 {
label = "fdt";
reg = <0x180000 0x80000>;
};
partition@200000 {
label = "kernel";
reg = <0x200000 0x400000>;
};
partition@600000 {
label = "rootfs";
reg = <0x600000 0x1fa00000>;
};
};
rtc@10300 {
status = "disabled";
};
sata@80000 {
nr-ports = <2>;
status = "okay";
};
};
gpio-leds {
compatible = "gpio-leds";
health {
label = "status:green:health";
gpios = <&gpio0 7 1>;
};
user1o {
label = "user1:orange";
gpios = <&gpio1 8 1>;
default-state = "on";
};
user1g {
label = "user1:green";
gpios = <&gpio1 9 1>;
default-state = "on";
};
user0o {
label = "user0:orange";
gpios = <&gpio1 12 1>;
default-state = "on";
};
user0g {
label = "user0:green";
gpios = <&gpio1 13 1>;
default-state = "on";
};
misc {
label = "status:orange:misc";
gpios = <&gpio1 14 1>;
default-state = "on";
};
};
};
/include/ "kirkwood.dtsi"
/ {
chosen {
bootargs = "console=ttyS0,115200n8";
};
ocp@f1000000 {
serial@12000 {
clock-frequency = <166666667>;
status = "okay";
};
spi@10600 {
status = "okay";
flash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "mx25l4005a";
reg = <0>;
spi-max-frequency = <20000000>;
mode = <0>;
partition@0 {
reg = <0x0 0x80000>;
label = "u-boot";
};
};
};
i2c@11000 {
status = "okay";
eeprom@50 {
compatible = "at,24c04";
pagesize = <16>;
reg = <0x50>;
};
};
};
gpio_keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
button@1 {
label = "Power push button";
linux,code = <116>;
gpios = <&gpio1 0 0>;
};
};
gpio-leds {
compatible = "gpio-leds";
red-fail {
label = "ns2:red:fail";
gpios = <&gpio0 12 0>;
};
};
};
/dts-v1/;
/include/ "kirkwood-ns2-common.dtsi"
/ {
model = "LaCie Network Space v2";
compatible = "lacie,netspace_v2", "marvell,kirkwood-88f6281", "marvell,kirkwood";
memory {
device_type = "memory";
reg = <0x00000000 0x10000000>;
};
ocp@f1000000 {
sata@80000 {
status = "okay";
nr-ports = <1>;
};
};
ns2-leds {
compatible = "lacie,ns2-leds";
blue-sata {
label = "ns2:blue:sata";
slow-gpio = <&gpio0 29 0>;
cmd-gpio = <&gpio0 30 0>;
};
};
};
/dts-v1/;
/include/ "kirkwood-ns2-common.dtsi"
/ {
model = "LaCie Network Space Lite v2";
compatible = "lacie,netspace_lite_v2", "marvell,kirkwood-88f6192", "marvell,kirkwood";
memory {
device_type = "memory";
reg = <0x00000000 0x8000000>;
};
ocp@f1000000 {
sata@80000 {
status = "okay";
nr-ports = <1>;
};
};
gpio-leds {
compatible = "gpio-leds";
blue-sata {
label = "ns2:blue:sata";
gpios = <&gpio0 30 1>;
linux,default-trigger = "default-on";
};
};
};
/dts-v1/;
/include/ "kirkwood-ns2-common.dtsi"
/ {
model = "LaCie Network Space Max v2";
compatible = "lacie,netspace_max_v2", "marvell,kirkwood-88f6281", "marvell,kirkwood";
memory {
device_type = "memory";
reg = <0x00000000 0x10000000>;
};
ocp@f1000000 {
sata@80000 {
status = "okay";
nr-ports = <2>;
};
};
gpio_fan {
compatible = "gpio-fan";
gpios = <&gpio0 22 1
&gpio0 7 1
&gpio1 1 1
&gpio0 23 1>;
gpio-fan,speed-map =
< 0 0
1500 15
1700 14
1800 13
2100 12
3100 11
3300 10
4300 9
5500 8>;
alarm-gpios = <&gpio0 25 1>;
};
ns2-leds {
compatible = "lacie,ns2-leds";
blue-sata {
label = "ns2:blue:sata";
slow-gpio = <&gpio0 29 0>;
cmd-gpio = <&gpio0 30 0>;
};
};
};
/dts-v1/;
/include/ "kirkwood-ns2-common.dtsi"
/ {
model = "LaCie Network Space Mini v2";
compatible = "lacie,netspace_mini_v2", "marvell,kirkwood-88f6192", "marvell,kirkwood";
memory {
device_type = "memory";
reg = <0x00000000 0x8000000>;
};
ocp@f1000000 {
sata@80000 {
status = "okay";
nr-ports = <1>;
};
};
gpio_fan {
compatible = "gpio-fan";
gpios = <&gpio0 22 1
&gpio0 7 1
&gpio1 1 1
&gpio0 23 1>;
gpio-fan,speed-map =
< 0 0
3000 15
3180 14
4140 13
4570 12
6760 11
7140 10
7980 9
9200 8>;
alarm-gpios = <&gpio0 25 1>;
};
ns2-leds {
compatible = "lacie,ns2-leds";
blue-sata {
label = "ns2:blue:sata";
slow-gpio = <&gpio0 29 0>;
cmd-gpio = <&gpio0 30 0>;
};
};
};
/dts-v1/;
/include/ "kirkwood.dtsi"
/ {
model = "ZyXEL NSA310";
compatible = "zyxel,nsa310", "marvell,kirkwood-88f6281", "marvell,kirkwood";
memory {
device_type = "memory";
reg = <0x00000000 0x10000000>;
};
chosen {
bootargs = "console=ttyS0,115200";
};
ocp@f1000000 {
serial@12000 {
clock-frequency = <200000000>;
status = "ok";
};
sata@80000 {
status = "okay";
nr-ports = <2>;
};
i2c@11000 {
status = "okay";
};
nand@3000000 {
status = "okay";
chip-delay = <35>;
partition@0 {
label = "uboot";
reg = <0x0000000 0x0100000>;
read-only;
};
partition@100000 {
label = "uboot_env";
reg = <0x0100000 0x0080000>;
};
partition@180000 {
label = "key_store";
reg = <0x0180000 0x0080000>;
};
partition@200000 {
label = "info";
reg = <0x0200000 0x0080000>;
};
partition@280000 {
label = "etc";
reg = <0x0280000 0x0a00000>;
};
partition@c80000 {
label = "kernel_1";
reg = <0x0c80000 0x0a00000>;
};
partition@1680000 {
label = "rootfs1";
reg = <0x1680000 0x2fc0000>;
};
partition@4640000 {
label = "kernel_2";
reg = <0x4640000 0x0a00000>;
};
partition@5040000 {
label = "rootfs2";
reg = <0x5040000 0x2fc0000>;
};
};
};
gpio_keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
button@1 {
label = "Power Button";
linux,code = <116>;
gpios = <&gpio1 14 0>;
};
button@2 {
label = "Copy Button";
linux,code = <133>;
gpios = <&gpio1 5 1>;
};
button@3 {
label = "Reset Button";
linux,code = <0x198>;
gpios = <&gpio1 4 1>;
};
};
gpio-leds {
compatible = "gpio-leds";
green-sys {
label = "nsa310:green:sys";
gpios = <&gpio0 28 0>;
};
red-sys {
label = "nsa310:red:sys";
gpios = <&gpio0 29 0>;
};
green-hdd {
label = "nsa310:green:hdd";
gpios = <&gpio1 9 0>;
};
red-hdd {
label = "nsa310:red:hdd";
gpios = <&gpio1 10 0>;
};
green-esata {
label = "nsa310:green:esata";
gpios = <&gpio0 12 0>;
};
red-esata {
label = "nsa310:red:esata";
gpios = <&gpio0 13 0>;
};
green-usb {
label = "nsa310:green:usb";
gpios = <&gpio0 15 0>;
};
red-usb {
label = "nsa310:red:usb";
gpios = <&gpio0 16 0>;
};
green-copy {
label = "nsa310:green:copy";
gpios = <&gpio1 7 0>;
};
red-copy {
label = "nsa310:red:copy";
gpios = <&gpio1 8 0>;
};
};
};
/dts-v1/;
/include/ "kirkwood.dtsi"
/include/ "kirkwood-6282.dtsi"
/ {
model = "Plat'Home OpenBlocksA6";
compatible = "plathome,openblocks-a6", "marvell,kirkwood-88f6283", "marvell,kirkwood";
memory {
device_type = "memory";
reg = <0x00000000 0x20000000>;
};
chosen {
bootargs = "console=ttyS0,115200n8 earlyprintk";
};
ocp@f1000000 {
serial@12000 {
clock-frequency = <200000000>;
status = "ok";
};
serial@12100 {
clock-frequency = <200000000>;
status = "ok";
};
nand@3000000 {
chip-delay = <25>;
status = "okay";
partition@0 {
label = "uboot";
reg = <0x0 0x90000>;
};
partition@90000 {
label = "env";
reg = <0x90000 0x44000>;
};
partition@d4000 {
label = "test";
reg = <0xd4000 0x24000>;
};
partition@f4000 {
label = "conf";
reg = <0xf4000 0x400000>;
};
partition@4f4000 {
label = "linux";
reg = <0x4f4000 0x1d20000>;
};
partition@2214000 {
label = "user";
reg = <0x2214000 0x1dec000>;
};
};
sata@80000 {
nr-ports = <1>;
status = "okay";
};
i2c@11100 {
status = "okay";
s35390a: s35390a@30 {
compatible = "s35390a";
reg = <0x30>;
};
};
};
gpio-leds {
compatible = "gpio-leds";
led-red {
label = "obsa6:red:stat";
gpios = <&gpio1 9 1>;
};
led-green {
label = "obsa6:green:stat";
gpios = <&gpio1 10 1>;
};
led-yellow {
label = "obsa6:yellow:stat";
gpios = <&gpio1 11 1>;
};
};
};
/dts-v1/;
/include/ "kirkwood.dtsi"
/ {
model = "Univeral Scientific Industrial Co. Topkick-1281P2";
compatible = "usi,topkick-1281P2", "usi,topkick", "marvell,kirkwood-88f6282", "marvell,kirkwood";
memory {
device_type = "memory";
reg = <0x00000000 0x10000000>;
};
chosen {
bootargs = "console=ttyS0,115200n8 earlyprintk";
};
ocp@f1000000 {
serial@12000 {
clock-frequency = <200000000>;
status = "ok";
};
nand@3000000 {
status = "okay";
partition@0 {
label = "u-boot";
reg = <0x0000000 0x180000>;
};
partition@180000 {
label = "u-boot env";
reg = <0x0180000 0x20000>;
};
partition@200000 {
label = "uImage";
reg = <0x0200000 0x600000>;
};
partition@800000 {
label = "uInitrd";
reg = <0x0800000 0x1000000>;
};
partition@1800000 {
label = "rootfs";
reg = <0x1800000 0xe800000>;
};
};
sata@80000 {
status = "okay";
nr-ports = <1>;
};
};
gpio-leds {
compatible = "gpio-leds";
disk {
label = "topkick:yellow:disk";
gpios = <&gpio0 21 1>;
linux,default-trigger = "ide-disk";
};
system2 {
label = "topkick:red:system";
gpios = <&gpio1 5 1>;
};
system {
label = "topkick:blue:system";
gpios = <&gpio1 6 1>;
default-state = "on";
};
wifi {
label = "topkick:green:wifi";
gpios = <&gpio1 7 1>;
};
wifi2 {
label = "topkick:yellow:wifi";
gpios = <&gpio1 16 1>;
};
};
};
/dts-v1/;
/include/ "kirkwood-ts219.dtsi"
/include/ "kirkwood-6281.dtsi"
/ {
ocp@f1000000 {
pinctrl: pinctrl@10000 {
pinctrl-0 = < &pmx_uart0 &pmx_uart1 &pmx_spi
&pmx_twsi0 &pmx_sata0 &pmx_sata1
&pmx_ram_size &pmx_reset_button
&pmx_USB_copy_button &pmx_board_id>;
pinctrl-names = "default";
pmx_ram_size: pmx-ram-size {
/* RAM: 0: 256 MB, 1: 512 MB */
marvell,pins = "mpp36";
marvell,function = "gpio";
};
pmx_USB_copy_button: pmx-USB-copy-button {
marvell,pins = "mpp15";
marvell,function = "gpio";
};
pmx_reset_button: pmx-reset-button {
marvell,pins = "mpp16";
marvell,function = "gpio";
};
pmx_board_id: pmx-board-id {
/* 0: TS-11x, 1: TS-21x */
marvell,pins = "mpp44";
marvell,function = "gpio";
};
};
};
gpio_keys {
compatible = "gpio-keys";
#address-cells = <1>;
......
/dts-v1/;
/include/ "kirkwood-ts219.dtsi"
/include/ "kirkwood-6282.dtsi"
/ {
ocp@f1000000 {
pinctrl: pinctrl@10000 {
pinctrl-0 = < &pmx_uart0 &pmx_uart1 &pmx_spi
&pmx_twsi0 &pmx_sata0 &pmx_sata1
&pmx_ram_size &pmx_reset_button
&pmx_USB_copy_button &pmx_board_id>;
pinctrl-names = "default";
pmx_ram_size: pmx-ram-size {
/* RAM: 0: 256 MB, 1: 512 MB */
marvell,pins = "mpp36";
marvell,function = "gpio";
};
pmx_reset_button: pmx-reset-button {
marvell,pins = "mpp37";
marvell,function = "gpio";
};
pmx_USB_copy_button: pmx-USB-copy-button {
marvell,pins = "mpp43";
marvell,function = "gpio";
};
pmx_board_id: pmx-board-id {
/* 0: TS-11x, 1: TS-21x */
marvell,pins = "mpp44";
marvell,function = "gpio";
};
};
};
gpio_keys {
compatible = "gpio-keys";
#address-cells = <1>;
......
......@@ -4,6 +4,10 @@ / {
compatible = "marvell,kirkwood";
interrupt-parent = <&intc>;
aliases {
gpio0 = &gpio0;
gpio1 = &gpio1;
};
intc: interrupt-controller {
compatible = "marvell,orion-intc", "marvell,intc";
interrupt-controller;
......@@ -24,7 +28,8 @@ gpio0: gpio@10100 {
#gpio-cells = <2>;
gpio-controller;
reg = <0x10100 0x40>;
ngpio = <32>;
ngpios = <32>;
interrupt-controller;
interrupts = <35>, <36>, <37>, <38>;
};
......@@ -33,7 +38,8 @@ gpio1: gpio@10140 {
#gpio-cells = <2>;
gpio-controller;
reg = <0x10140 0x40>;
ngpio = <18>;
ngpios = <18>;
interrupt-controller;
interrupts = <39>, <40>, <41>;
};
......@@ -77,6 +83,13 @@ wdt@20300 {
status = "okay";
};
ehci@50000 {
compatible = "marvell,orion-ehci";
reg = <0x50000 0x1000>;
interrupts = <19>;
status = "okay";
};
sata@80000 {
compatible = "marvell,orion-sata";
reg = <0x80000 0x5000>;
......
/*
* Copyright (C) 2012 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
/dts-v1/;
/include/ "orion5x.dtsi"
/ {
model = "LaCie Ethernet Disk mini V2";
compatible = "lacie,ethernet-disk-mini-v2", "marvell-orion5x-88f5182", "marvell,orion5x";
memory {
reg = <0x00000000 0x4000000>; /* 64 MB */
};
chosen {
bootargs = "console=ttyS0,115200n8 earlyprintk";
};
ocp@f1000000 {
serial@12000 {
clock-frequency = <166666667>;
status = "okay";
};
sata@80000 {
status = "okay";
nr-ports = <2>;
};
};
gpio_keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
button@1 {
label = "Power-on Switch";
linux,code = <116>; /* KEY_POWER */
gpios = <&gpio0 18 0>;
};
};
gpio_leds {
compatible = "gpio-leds";
led@1 {
label = "power:blue";
gpios = <&gpio0 16 1>;
};
};
};
/*
* Copyright (C) 2012 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
/include/ "skeleton.dtsi"
/ {
model = "Marvell Orion5x SoC";
compatible = "marvell,orion5x";
interrupt-parent = <&intc>;
intc: interrupt-controller {
compatible = "marvell,orion-intc", "marvell,intc";
interrupt-controller;
#interrupt-cells = <1>;
reg = <0xf1020204 0x04>;
};
ocp@f1000000 {
compatible = "simple-bus";
ranges = <0x00000000 0xf1000000 0x4000000
0xf2200000 0xf2200000 0x0000800>;
#address-cells = <1>;
#size-cells = <1>;
gpio0: gpio@10100 {
compatible = "marvell,orion-gpio";
#gpio-cells = <2>;
gpio-controller;
reg = <0x10100 0x40>;
ngpio = <32>;
interrupts = <6>, <7>, <8>, <9>;
};
serial@12000 {
compatible = "ns16550a";
reg = <0x12000 0x100>;
reg-shift = <2>;
interrupts = <3>;
/* set clock-frequency in board dts */
status = "disabled";
};
serial@12100 {
compatible = "ns16550a";
reg = <0x12100 0x100>;
reg-shift = <2>;
interrupts = <4>;
/* set clock-frequency in board dts */
status = "disabled";
};
spi@10600 {
compatible = "marvell,orion-spi";
#address-cells = <1>;
#size-cells = <0>;
cell-index = <0>;
reg = <0x10600 0x28>;
status = "disabled";
};
wdt@20300 {
compatible = "marvell,orion-wdt";
reg = <0x20300 0x28>;
status = "okay";
};
sata@80000 {
compatible = "marvell,orion-sata";
reg = <0x80000 0x5000>;
interrupts = <29>;
status = "disabled";
};
i2c@11000 {
compatible = "marvell,mv64xxx-i2c";
reg = <0x11000 0x20>;
#address-cells = <1>;
#size-cells = <0>;
interrupts = <5>;
clock-frequency = <100000>;
status = "disabled";
};
crypto@90000 {
compatible = "marvell,orion-crypto";
reg = <0x90000 0x10000>,
<0xf2200000 0x800>;
reg-names = "regs", "sram";
interrupts = <22>;
status = "okay";
};
};
};
......@@ -169,8 +169,8 @@ gpio: gpio {
pinmux: pinmux {
compatible = "nvidia,tegra30-pinmux";
reg = <0x70000868 0xd0 /* Pad control registers */
0x70003000 0x3e0>; /* Mux registers */
reg = <0x70000868 0xd4 /* Pad control registers */
0x70003000 0x3e4>; /* Mux registers */
};
serial@70006000 {
......
......@@ -8,11 +8,19 @@ CONFIG_MODULE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set
CONFIG_ARCH_DOVE=y
CONFIG_MACH_DOVE_DB=y
CONFIG_MACH_CM_A510=y
CONFIG_MACH_DOVE_DT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_AEABI=y
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_HIGHMEM=y
CONFIG_USE_OF=y
CONFIG_ATAGS=y
CONFIG_ARM_APPENDED_DTB=y
CONFIG_ARM_ATAG_DTB_COMPAT=y
CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
CONFIG_VFP=y
CONFIG_NET=y
CONFIG_PACKET=y
......@@ -62,6 +70,9 @@ CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_SERIAL_8250_PCI is not set
CONFIG_SERIAL_8250_RUNTIME_UARTS=2
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_SERIAL_OF_PLATFORM=y
# CONFIG_HW_RANDOM is not set
CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y
......@@ -74,6 +85,18 @@ CONFIG_USB_DEVICEFS=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_STORAGE=y
CONFIG_MMC=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_IO_ACCESSORS=y
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MMC_SDHCI_DOVE=y
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
CONFIG_LEDS_GPIO=y
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_TIMER=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_MV=y
CONFIG_DMADEVICES=y
......@@ -122,6 +145,7 @@ CONFIG_CRYPTO_TWOFISH=y
CONFIG_CRYPTO_DEFLATE=y
CONFIG_CRYPTO_LZO=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRYPTO_DEV_MV_CESA=y
CONFIG_CRC_CCITT=y
CONFIG_CRC16=y
CONFIG_LIBCRC32C=y
......@@ -27,6 +27,14 @@ CONFIG_MACH_GOFLEXNET_DT=y
CONFIG_MACH_LSXL_DT=y
CONFIG_MACH_IOMEGA_IX2_200_DT=y
CONFIG_MACH_KM_KIRKWOOD_DT=y
CONFIG_MACH_INETSPACE_V2_DT=y
CONFIG_MACH_MPLCEC4_DT=y
CONFIG_MACH_NETSPACE_V2_DT=y
CONFIG_MACH_NETSPACE_MAX_V2_DT=y
CONFIG_MACH_NETSPACE_LITE_V2_DT=y
CONFIG_MACH_NETSPACE_MINI_V2_DT=y
CONFIG_MACH_OPENBLOCKS_A6_DT=y
CONFIG_MACH_TOPKICK_DT=y
CONFIG_MACH_TS219=y
CONFIG_MACH_TS41X=y
CONFIG_MACH_DOCKSTAR=y
......@@ -40,6 +48,7 @@ CONFIG_MACH_D2NET_V2=y
CONFIG_MACH_NET2BIG_V2=y
CONFIG_MACH_NET5BIG_V2=y
CONFIG_MACH_T5325=y
CONFIG_MACH_NSA310_DT=y
# CONFIG_CPU_FEROCEON_OLD_ID is not set
CONFIG_PREEMPT=y
CONFIG_AEABI=y
......
CONFIG_EXPERIMENTAL=y
CONFIG_SYSVIPC=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_SYSFS_DEPRECATED_V2=y
CONFIG_EXPERT=y
# CONFIG_SLUB_DEBUG is not set
CONFIG_PROFILING=y
......@@ -10,6 +11,8 @@ CONFIG_KPROBES=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set
CONFIG_PARTITION_ADVANCED=y
CONFIG_BSD_DISKLABEL=y
CONFIG_ARCH_ORION5X=y
CONFIG_MACH_DB88F5281=y
CONFIG_MACH_RD88F5182=y
......@@ -24,7 +27,7 @@ CONFIG_MACH_TS409=y
CONFIG_MACH_WRT350N_V2=y
CONFIG_MACH_TS78XX=y
CONFIG_MACH_MV2120=y
CONFIG_MACH_EDMINI_V2=y
CONFIG_MACH_EDMINI_V2_DT=y
CONFIG_MACH_D2NET=y
CONFIG_MACH_BIGDISK=y
CONFIG_MACH_NET2BIG=y
......@@ -33,17 +36,13 @@ CONFIG_MACH_WNR854T=y
CONFIG_MACH_RD88F5181L_GE=y
CONFIG_MACH_RD88F5181L_FXO=y
CONFIG_MACH_RD88F6183AP_GE=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
CONFIG_AEABI=y
CONFIG_LEDS=y
CONFIG_LEDS_CPU=y
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_ARM_APPENDED_DTB=y
CONFIG_FPE_NWFPE=y
CONFIG_VFP=y
# CONFIG_SUSPEND is not set
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
......@@ -54,13 +53,10 @@ CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
# CONFIG_IPV6 is not set
CONFIG_NET_DSA=y
CONFIG_NET_DSA_MV88E6131=y
CONFIG_NET_DSA_MV88E6123_61_65=y
CONFIG_NET_PKTGEN=m
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
# CONFIG_FIRMWARE_IN_KERNEL is not set
CONFIG_MTD=y
CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
......@@ -82,12 +78,11 @@ CONFIG_CHR_DEV_SG=m
CONFIG_ATA=y
CONFIG_SATA_MV=y
CONFIG_NETDEVICES=y
CONFIG_MARVELL_PHY=y
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
CONFIG_NET_PCI=y
CONFIG_NET_DSA_MV88E6131=y
CONFIG_NET_DSA_MV88E6123_61_65=y
CONFIG_MV643XX_ETH=y
# CONFIG_NETDEV_10000 is not set
CONFIG_MARVELL_PHY=y
# CONFIG_INPUT_MOUSEDEV is not set
CONFIG_INPUT_EVDEV=y
# CONFIG_KEYBOARD_ATKBD is not set
......@@ -95,11 +90,12 @@ CONFIG_KEYBOARD_GPIO=y
# CONFIG_INPUT_MOUSE is not set
# CONFIG_SERIO is not set
# CONFIG_VT is not set
CONFIG_LEGACY_PTY_COUNT=16
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_SERIAL_8250_PCI is not set
CONFIG_SERIAL_8250_RUNTIME_UARTS=2
CONFIG_LEGACY_PTY_COUNT=16
CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_HW_RANDOM_TIMERIOMEM=m
CONFIG_I2C=y
# CONFIG_I2C_COMPAT is not set
......@@ -109,10 +105,8 @@ CONFIG_GPIO_SYSFS=y
CONFIG_SENSORS_LM75=y
# CONFIG_VGA_ARB is not set
CONFIG_USB=y
CONFIG_USB_DEVICEFS=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_EHCI_TT_NEWSCHED=y
CONFIG_USB_PRINTER=y
CONFIG_USB_STORAGE=y
CONFIG_USB_STORAGE_DATAFAB=y
......@@ -140,7 +134,6 @@ CONFIG_EXT2_FS=y
CONFIG_EXT3_FS=y
# CONFIG_EXT3_FS_XATTR is not set
CONFIG_EXT4_FS=m
CONFIG_INOTIFY=y
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
CONFIG_UDF_FS=m
......@@ -150,25 +143,18 @@ CONFIG_TMPFS=y
CONFIG_JFFS2_FS=y
CONFIG_CRAMFS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_ROOT_NFS=y
CONFIG_PARTITION_ADVANCED=y
CONFIG_BSD_DISKLABEL=y
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_CODEPAGE_850=y
CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_ISO8859_2=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_BUGVERBOSE is not set
CONFIG_DEBUG_INFO=y
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
CONFIG_LATENCYTOP=y
CONFIG_SYSCTL_SYSCALL_CHECK=y
# CONFIG_FTRACE is not set
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_LL=y
CONFIG_CRYPTO_CBC=m
CONFIG_CRYPTO_ECB=m
......
......@@ -68,7 +68,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)
/* Enable overcurrent notification */
for (i = 0; i < data->ports; i++) {
if (data->overcurrent_pin[i])
if (gpio_is_valid(data->overcurrent_pin[i]))
at91_set_gpio_input(data->overcurrent_pin[i], 1);
}
......
......@@ -72,7 +72,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)
/* Enable overcurrent notification */
for (i = 0; i < data->ports; i++) {
if (data->overcurrent_pin[i])
if (gpio_is_valid(data->overcurrent_pin[i]))
at91_set_gpio_input(data->overcurrent_pin[i], 1);
}
......
......@@ -72,7 +72,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)
/* Enable overcurrent notification */
for (i = 0; i < data->ports; i++) {
if (data->overcurrent_pin[i])
if (gpio_is_valid(data->overcurrent_pin[i]))
at91_set_gpio_input(data->overcurrent_pin[i], 1);
}
......
......@@ -78,7 +78,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)
/* Enable overcurrent notification */
for (i = 0; i < data->ports; i++) {
if (data->overcurrent_pin[i])
if (gpio_is_valid(data->overcurrent_pin[i]))
at91_set_gpio_input(data->overcurrent_pin[i], 1);
}
......
......@@ -1841,8 +1841,8 @@ static struct resource sha_resources[] = {
.flags = IORESOURCE_MEM,
},
[1] = {
.start = AT91SAM9G45_ID_AESTDESSHA,
.end = AT91SAM9G45_ID_AESTDESSHA,
.start = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA,
.end = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA,
.flags = IORESOURCE_IRQ,
},
};
......@@ -1874,8 +1874,8 @@ static struct resource tdes_resources[] = {
.flags = IORESOURCE_MEM,
},
[1] = {
.start = AT91SAM9G45_ID_AESTDESSHA,
.end = AT91SAM9G45_ID_AESTDESSHA,
.start = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA,
.end = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA,
.flags = IORESOURCE_IRQ,
},
};
......@@ -1910,8 +1910,8 @@ static struct resource aes_resources[] = {
.flags = IORESOURCE_MEM,
},
[1] = {
.start = AT91SAM9G45_ID_AESTDESSHA,
.end = AT91SAM9G45_ID_AESTDESSHA,
.start = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA,
.end = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA,
.flags = IORESOURCE_IRQ,
},
};
......
......@@ -28,6 +28,7 @@ void highbank_restart(char mode, const char *cmd)
hignbank_set_pwr_soft_reset();
scu_power_mode(scu_base_addr, SCU_PM_POWEROFF);
cpu_do_idle();
while (1)
cpu_do_idle();
}
......@@ -112,7 +112,7 @@ struct clk *clk_register_gate2(struct device *dev, const char *name,
clk = clk_register(dev, &gate->hw);
if (IS_ERR(clk))
kfree(clk);
kfree(gate);
return clk;
}
......@@ -30,7 +30,7 @@
#define MX25_H1_SIC_SHIFT 21
#define MX25_H1_SIC_MASK (0x3 << MX25_H1_SIC_SHIFT)
#define MX25_H1_PP_BIT (1 << 18)
#define MX25_H1_PM_BIT (1 << 8)
#define MX25_H1_PM_BIT (1 << 16)
#define MX25_H1_IPPUE_UP_BIT (1 << 7)
#define MX25_H1_IPPUE_DOWN_BIT (1 << 6)
#define MX25_H1_TLL_BIT (1 << 5)
......
......@@ -30,7 +30,7 @@
#define MX35_H1_SIC_SHIFT 21
#define MX35_H1_SIC_MASK (0x3 << MX35_H1_SIC_SHIFT)
#define MX35_H1_PP_BIT (1 << 18)
#define MX35_H1_PM_BIT (1 << 8)
#define MX35_H1_PM_BIT (1 << 16)
#define MX35_H1_IPPUE_UP_BIT (1 << 7)
#define MX35_H1_IPPUE_DOWN_BIT (1 << 6)
#define MX35_H1_TLL_BIT (1 << 5)
......
......@@ -46,6 +46,11 @@ config MACH_GURUPLUG
config ARCH_KIRKWOOD_DT
bool "Marvell Kirkwood Flattened Device Tree"
select POWER_SUPPLY
select POWER_RESET
select POWER_RESET_GPIO
select REGULATOR
select REGULATOR_FIXED_VOLTAGE
select USE_OF
help
Say 'Y' here if you want your kernel to support the
......@@ -130,6 +135,63 @@ config MACH_KM_KIRKWOOD_DT
Say 'Y' here if you want your kernel to support the
Keymile Kirkwood Reference Desgin, using Flattened Device Tree.
config MACH_INETSPACE_V2_DT
bool "LaCie Internet Space v2 NAS (Flattened Device Tree)"
select ARCH_KIRKWOOD_DT
help
Say 'Y' here if you want your kernel to support the LaCie
Internet Space v2 NAS, using Flattened Device Tree.
config MACH_MPLCEC4_DT
bool "MPL CEC4 (Flattened Device Tree)"
select ARCH_KIRKWOOD_DT
help
Say 'Y' here if you want your kernel to support the
MPL CEC4 (Flattened Device Tree).
config MACH_NETSPACE_V2_DT
bool "LaCie Network Space v2 NAS (Flattened Device Tree)"
select ARCH_KIRKWOOD_DT
help
Say 'Y' here if you want your kernel to support the LaCie
Network Space v2 NAS, using Flattened Device Tree.
config MACH_NETSPACE_MAX_V2_DT
bool "LaCie Network Space Max v2 NAS (Flattened Device Tree)"
select ARCH_KIRKWOOD_DT
help
Say 'Y' here if you want your kernel to support the LaCie
Network Space Max v2 NAS, using Flattened Device Tree.
config MACH_NETSPACE_LITE_V2_DT
bool "LaCie Network Space Lite v2 NAS (Flattened Device Tree)"
select ARCH_KIRKWOOD_DT
help
Say 'Y' here if you want your kernel to support the LaCie
Network Space Lite v2 NAS, using Flattened Device Tree.
config MACH_NETSPACE_MINI_V2_DT
bool "LaCie Network Space Mini v2 NAS (Flattened Device Tree)"
select ARCH_KIRKWOOD_DT
help
Say 'Y' here if you want your kernel to support the LaCie
Network Space Mini v2 NAS (aka SafeBox), using Flattened
Device Tree.
config MACH_OPENBLOCKS_A6_DT
bool "Plat'Home OpenBlocks A6 (Flattened Device Tree)"
select ARCH_KIRKWOOD_DT
help
Say 'Y' here if you want your kernel to support the
Plat'Home OpenBlocks A6 (Flattened Device Tree).
config MACH_TOPKICK_DT
bool "USI Topkick (Flattened Device Tree)"
select ARCH_KIRKWOOD_DT
help
Say 'Y' here if you want your kernel to support the
USI Topkick, using Flattened Device Tree
config MACH_TS219
bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS"
help
......@@ -216,6 +278,14 @@ config MACH_T5325
Say 'Y' here if you want your kernel to support the
HP t5325 Thin Client.
config MACH_NSA310_DT
bool "ZyXEL NSA-310 (Flattened Device Tree)"
select ARCH_KIRKWOOD_DT
select ARM_ATAG_DTB_COMPAT
help
Say 'Y' here if you want your kernel to support the
ZyXEL NSA-310 board (Flattened Device Tree).
endmenu
endif
......@@ -31,3 +31,12 @@ obj-$(CONFIG_MACH_GOFLEXNET_DT) += board-goflexnet.o
obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o
obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += board-iomega_ix2_200.o
obj-$(CONFIG_MACH_KM_KIRKWOOD_DT) += board-km_kirkwood.o
obj-$(CONFIG_MACH_INETSPACE_V2_DT) += board-ns2.o
obj-$(CONFIG_MACH_MPLCEC4_DT) += board-mplcec4.o
obj-$(CONFIG_MACH_NETSPACE_V2_DT) += board-ns2.o
obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o
obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o
obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o
obj-$(CONFIG_MACH_NSA310_DT) += board-nsa310.o
obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT) += board-openblocks_a6.o
obj-$(CONFIG_MACH_TOPKICK_DT) += board-usi_topkick.o
......@@ -17,51 +17,11 @@
#include <linux/mv643xx_eth.h>
#include <linux/gpio.h>
#include "common.h"
#include "mpp.h"
static struct mv643xx_eth_platform_data dnskw_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(8),
};
static unsigned int dnskw_mpp_config[] __initdata = {
MPP13_UART1_TXD, /* Custom ... */
MPP14_UART1_RXD, /* ... Controller (DNS-320 only) */
MPP20_SATA1_ACTn, /* LED: White Right HDD */
MPP21_SATA0_ACTn, /* LED: White Left HDD */
MPP24_GPIO,
MPP25_GPIO,
MPP26_GPIO, /* LED: Power */
MPP27_GPIO, /* LED: Red Right HDD */
MPP28_GPIO, /* LED: Red Left HDD */
MPP29_GPIO, /* LED: Red USB (DNS-325 only) */
MPP30_GPIO,
MPP31_GPIO,
MPP32_GPIO,
MPP33_GPO,
MPP34_GPIO, /* Button: Front power */
MPP35_GPIO, /* LED: Red USB (DNS-320 only) */
MPP36_GPIO, /* Power: Turn off board */
MPP37_GPIO, /* Power: Turn back on after power failure */
MPP38_GPIO,
MPP39_GPIO, /* Power: SATA0 */
MPP40_GPIO, /* Power: SATA1 */
MPP41_GPIO, /* SATA0 present */
MPP42_GPIO, /* SATA1 present */
MPP43_GPIO, /* LED: White USB */
MPP44_GPIO, /* Fan: Tachometer Pin */
MPP45_GPIO, /* Fan: high speed */
MPP46_GPIO, /* Fan: low speed */
MPP47_GPIO, /* Button: Back unmount */
MPP48_GPIO, /* Button: Back reset */
MPP49_GPIO, /* Temp Alarm (DNS-325) Pin of U5 (DNS-320) */
0
};
static void dnskw_power_off(void)
{
gpio_set_value(36, 1);
}
/* Register any GPIO for output and set the value */
static void __init dnskw_gpio_register(unsigned gpio, char *name, int def)
{
......@@ -76,22 +36,8 @@ static void __init dnskw_gpio_register(unsigned gpio, char *name, int def)
void __init dnskw_init(void)
{
kirkwood_mpp_conf(dnskw_mpp_config);
kirkwood_ehci_init();
kirkwood_ge00_init(&dnskw_ge00_data);
/* Register power-off GPIO. */
if (gpio_request(36, "dnskw:power:off") == 0
&& gpio_direction_output(36, 0) == 0)
pm_power_off = dnskw_power_off;
else
pr_err("dnskw: failed to configure power-off GPIO\n");
/* Ensure power is supplied to both HDDs */
dnskw_gpio_register(39, "dnskw:power:sata0", 1);
dnskw_gpio_register(40, "dnskw:power:sata1", 1);
/* Set NAS to turn back on after a power failure */
dnskw_gpio_register(37, "dnskw:power:recover", 1);
}
......@@ -24,7 +24,6 @@
#include <linux/of_fdt.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/gpio.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
......@@ -32,30 +31,15 @@
#include <mach/bridge-regs.h>
#include <linux/platform_data/mmc-mvsdio.h>
#include "common.h"
#include "mpp.h"
static struct mv643xx_eth_platform_data dockstar_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(0),
};
static unsigned int dockstar_mpp_config[] __initdata = {
MPP29_GPIO, /* USB Power Enable */
MPP46_GPIO, /* LED green */
MPP47_GPIO, /* LED orange */
0
};
void __init dockstar_dt_init(void)
{
/*
* Basic setup. Needs to be called early.
*/
kirkwood_mpp_conf(dockstar_mpp_config);
if (gpio_request(29, "USB Power Enable") != 0 ||
gpio_direction_output(29, 1) != 0)
pr_err("can't setup GPIO 29 (USB Power Enable)\n");
kirkwood_ehci_init();
kirkwood_ge00_init(&dockstar_ge00_data);
}
......@@ -32,7 +32,6 @@
#include <mach/bridge-regs.h>
#include <linux/platform_data/mmc-mvsdio.h>
#include "common.h"
#include "mpp.h"
static struct mv643xx_eth_platform_data dreamplug_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(0),
......@@ -46,25 +45,11 @@ static struct mvsdio_platform_data dreamplug_mvsdio_data = {
/* unfortunately the CD signal has not been connected */
};
static unsigned int dreamplug_mpp_config[] __initdata = {
MPP0_SPI_SCn,
MPP1_SPI_MOSI,
MPP2_SPI_SCK,
MPP3_SPI_MISO,
MPP47_GPIO, /* Bluetooth LED */
MPP48_GPIO, /* Wifi LED */
MPP49_GPIO, /* Wifi AP LED */
0
};
void __init dreamplug_init(void)
{
/*
* Basic setup. Needs to be called early.
*/
kirkwood_mpp_conf(dreamplug_mpp_config);
kirkwood_ehci_init();
kirkwood_ge00_init(&dreamplug_ge00_data);
kirkwood_ge01_init(&dreamplug_ge01_data);
kirkwood_sdio_init(&dreamplug_mvsdio_data);
......
......@@ -30,6 +30,8 @@ struct of_dev_auxdata kirkwood_auxdata_lookup[] __initdata = {
OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL),
OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0",
NULL),
OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011100, "mv64xxx_i2c.1",
NULL),
OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL),
OF_DEV_AUXDATA("marvell,orion-sata", 0xf1080000, "sata_mv.0", NULL),
OF_DEV_AUXDATA("marvell,orion-nand", 0xf4000000, "orion_nand", NULL),
......@@ -94,6 +96,25 @@ static void __init kirkwood_dt_init(void)
if (of_machine_is_compatible("keymile,km_kirkwood"))
km_kirkwood_init();
if (of_machine_is_compatible("lacie,inetspace_v2") ||
of_machine_is_compatible("lacie,netspace_v2") ||
of_machine_is_compatible("lacie,netspace_max_v2") ||
of_machine_is_compatible("lacie,netspace_lite_v2") ||
of_machine_is_compatible("lacie,netspace_mini_v2"))
ns2_init();
if (of_machine_is_compatible("mpl,cec4"))
mplcec4_init();
if (of_machine_is_compatible("plathome,openblocks-a6"))
openblocks_a6_init();
if (of_machine_is_compatible("usi,topkick"))
usi_topkick_init();
if (of_machine_is_compatible("zyxel,nsa310"))
nsa310_init();
of_platform_populate(NULL, kirkwood_dt_match_table,
kirkwood_auxdata_lookup, NULL);
}
......@@ -110,6 +131,15 @@ static const char *kirkwood_dt_board_compat[] = {
"buffalo,lsxl",
"iom,ix2-200",
"keymile,km_kirkwood",
"lacie,inetspace_v2",
"lacie,netspace_max_v2",
"lacie,netspace_v2",
"lacie,netspace_lite_v2",
"lacie,netspace_mini_v2",
"mpl,cec4",
"plathome,openblocks-a6",
"usi,topkick",
"zyxel,nsa310",
NULL
};
......
......@@ -26,7 +26,6 @@
#include <linux/of_fdt.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/gpio.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
......@@ -34,38 +33,15 @@
#include <mach/bridge-regs.h>
#include <linux/platform_data/mmc-mvsdio.h>
#include "common.h"
#include "mpp.h"
static struct mv643xx_eth_platform_data goflexnet_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(0),
};
static unsigned int goflexnet_mpp_config[] __initdata = {
MPP29_GPIO, /* USB Power Enable */
MPP47_GPIO, /* LED Orange */
MPP46_GPIO, /* LED Green */
MPP45_GPIO, /* LED Left Capacity 3 */
MPP44_GPIO, /* LED Left Capacity 2 */
MPP43_GPIO, /* LED Left Capacity 1 */
MPP42_GPIO, /* LED Left Capacity 0 */
MPP41_GPIO, /* LED Right Capacity 3 */
MPP40_GPIO, /* LED Right Capacity 2 */
MPP39_GPIO, /* LED Right Capacity 1 */
MPP38_GPIO, /* LED Right Capacity 0 */
0
};
void __init goflexnet_init(void)
{
/*
* Basic setup. Needs to be called early.
*/
kirkwood_mpp_conf(goflexnet_mpp_config);
if (gpio_request(29, "USB Power Enable") != 0 ||
gpio_direction_output(29, 1) != 0)
pr_err("can't setup GPIO 29 (USB Power Enable)\n");
kirkwood_ehci_init();
kirkwood_ge00_init(&goflexnet_ge00_data);
}
......@@ -17,55 +17,20 @@
#include <linux/mtd/partitions.h>
#include <linux/ata_platform.h>
#include <linux/mv643xx_eth.h>
#include <linux/gpio.h>
#include <linux/input.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/kirkwood.h>
#include "common.h"
#include "mpp.h"
#define IB62X0_GPIO_POWER_OFF 24
static struct mv643xx_eth_platform_data ib62x0_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(8),
};
static unsigned int ib62x0_mpp_config[] __initdata = {
MPP0_NF_IO2,
MPP1_NF_IO3,
MPP2_NF_IO4,
MPP3_NF_IO5,
MPP4_NF_IO6,
MPP5_NF_IO7,
MPP18_NF_IO0,
MPP19_NF_IO1,
MPP22_GPIO, /* OS LED red */
MPP24_GPIO, /* Power off device */
MPP25_GPIO, /* OS LED green */
MPP27_GPIO, /* USB transfer LED */
MPP28_GPIO, /* Reset button */
MPP29_GPIO, /* USB Copy button */
0
};
static void ib62x0_power_off(void)
{
gpio_set_value(IB62X0_GPIO_POWER_OFF, 1);
}
void __init ib62x0_init(void)
{
/*
* Basic setup. Needs to be called early.
*/
kirkwood_mpp_conf(ib62x0_mpp_config);
kirkwood_ehci_init();
kirkwood_ge00_init(&ib62x0_ge00_data);
if (gpio_request(IB62X0_GPIO_POWER_OFF, "ib62x0:power:off") == 0 &&
gpio_direction_output(IB62X0_GPIO_POWER_OFF, 0) == 0)
pm_power_off = ib62x0_power_off;
else
pr_err("board-ib62x0: failed to configure power-off GPIO\n");
}
......@@ -21,31 +21,13 @@
#include <asm/mach/arch.h>
#include <mach/kirkwood.h>
#include "common.h"
#include "mpp.h"
static struct mv643xx_eth_platform_data iconnect_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(11),
};
static unsigned int iconnect_mpp_config[] __initdata = {
MPP12_GPIO,
MPP35_GPIO,
MPP41_GPIO,
MPP42_GPIO,
MPP43_GPIO,
MPP44_GPIO,
MPP45_GPIO,
MPP46_GPIO,
MPP47_GPIO,
MPP48_GPIO,
0
};
void __init iconnect_init(void)
{
kirkwood_mpp_conf(iconnect_mpp_config);
kirkwood_ehci_init();
kirkwood_ge00_init(&iconnect_ge00_data);
}
......
......@@ -15,7 +15,6 @@
#include <linux/ethtool.h>
#include <mach/kirkwood.h>
#include "common.h"
#include "mpp.h"
static struct mv643xx_eth_platform_data iomega_ix2_200_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_NONE,
......@@ -23,35 +22,10 @@ static struct mv643xx_eth_platform_data iomega_ix2_200_ge00_data = {
.duplex = DUPLEX_FULL,
};
static unsigned int iomega_ix2_200_mpp_config[] __initdata = {
MPP12_GPIO, /* Reset Button */
MPP14_GPIO, /* Power Button */
MPP15_GPIO, /* Backup LED (blue) */
MPP16_GPIO, /* Power LED (white) */
MPP35_GPIO, /* OTB Button */
MPP36_GPIO, /* Rebuild LED (white) */
MPP37_GPIO, /* Health LED (red) */
MPP38_GPIO, /* SATA LED brightness control 1 */
MPP39_GPIO, /* SATA LED brightness control 2 */
MPP40_GPIO, /* Backup LED brightness control 1 */
MPP41_GPIO, /* Backup LED brightness control 2 */
MPP42_GPIO, /* Power LED brightness control 1 */
MPP43_GPIO, /* Power LED brightness control 2 */
MPP44_GPIO, /* Health LED brightness control 1 */
MPP45_GPIO, /* Health LED brightness control 2 */
MPP46_GPIO, /* Rebuild LED brightness control 1 */
MPP47_GPIO, /* Rebuild LED brightness control 2 */
0
};
void __init iomega_ix2_200_init(void)
{
/*
* Basic setup. Needs to be called early.
*/
kirkwood_mpp_conf(iomega_ix2_200_mpp_config);
kirkwood_ehci_init();
kirkwood_ge01_init(&iomega_ix2_200_ge00_data);
}
......@@ -18,26 +18,14 @@
#include <linux/clk.h>
#include <linux/clk-private.h>
#include "common.h"
#include "mpp.h"
static struct mv643xx_eth_platform_data km_kirkwood_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(0),
};
static unsigned int km_kirkwood_mpp_config[] __initdata = {
MPP8_GPIO, /* I2C SDA */
MPP9_GPIO, /* I2C SCL */
0
};
void __init km_kirkwood_init(void)
{
struct clk *sata_clk;
/*
* Basic setup. Needs to be called early.
*/
kirkwood_mpp_conf(km_kirkwood_mpp_config);
/*
* Our variant of kirkwood (integrated in the Bobcat) hangs on accessing
* SATA bits (14-15) of the Clock Gating Control Register. Since these
......@@ -52,6 +40,5 @@ void __init km_kirkwood_init(void)
if (!IS_ERR(sata_clk))
sata_clk->flags |= CLK_IGNORE_UNUSED;
kirkwood_ehci_init();
kirkwood_ge00_init(&km_kirkwood_ge00_data);
}
......@@ -19,14 +19,7 @@
#include <linux/spi/flash.h>
#include <linux/spi/spi.h>
#include <linux/mv643xx_eth.h>
#include <linux/gpio.h>
#include <linux/gpio-fan.h>
#include <linux/input.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/kirkwood.h>
#include "common.h"
#include "mpp.h"
static struct mv643xx_eth_platform_data lsxl_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(0),
......@@ -36,68 +29,6 @@ static struct mv643xx_eth_platform_data lsxl_ge01_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(8),
};
static unsigned int lsxl_mpp_config[] __initdata = {
MPP10_GPO, /* HDD Power Enable */
MPP11_GPIO, /* USB Vbus Enable */
MPP18_GPO, /* FAN High Enable# */
MPP19_GPO, /* FAN Low Enable# */
MPP36_GPIO, /* Function Blue LED */
MPP37_GPIO, /* Alarm LED */
MPP38_GPIO, /* Info LED */
MPP39_GPIO, /* Power LED */
MPP40_GPIO, /* Fan Lock */
MPP41_GPIO, /* Function Button */
MPP42_GPIO, /* Power Switch */
MPP43_GPIO, /* Power Auto Switch */
MPP48_GPIO, /* Function Red LED */
0
};
#define LSXL_GPIO_FAN_HIGH 18
#define LSXL_GPIO_FAN_LOW 19
#define LSXL_GPIO_FAN_LOCK 40
static struct gpio_fan_alarm lsxl_alarm = {
.gpio = LSXL_GPIO_FAN_LOCK,
};
static struct gpio_fan_speed lsxl_speeds[] = {
{
.rpm = 0,
.ctrl_val = 3,
}, {
.rpm = 1500,
.ctrl_val = 1,
}, {
.rpm = 3250,
.ctrl_val = 2,
}, {
.rpm = 5000,
.ctrl_val = 0,
}
};
static int lsxl_gpio_list[] = {
LSXL_GPIO_FAN_HIGH, LSXL_GPIO_FAN_LOW,
};
static struct gpio_fan_platform_data lsxl_fan_data = {
.num_ctrl = ARRAY_SIZE(lsxl_gpio_list),
.ctrl = lsxl_gpio_list,
.alarm = &lsxl_alarm,
.num_speed = ARRAY_SIZE(lsxl_speeds),
.speed = lsxl_speeds,
};
static struct platform_device lsxl_fan_device = {
.name = "gpio-fan",
.id = -1,
.num_resources = 0,
.dev = {
.platform_data = &lsxl_fan_data,
},
};
/*
* On the LS-XHL/LS-CHLv2, the shutdown process is following:
* - Userland monitors key events until the power switch goes to off position
......@@ -111,24 +42,14 @@ static void lsxl_power_off(void)
kirkwood_restart('h', NULL);
}
#define LSXL_GPIO_HDD_POWER 10
#define LSXL_GPIO_USB_POWER 11
void __init lsxl_init(void)
{
/*
* Basic setup. Needs to be called early.
*/
kirkwood_mpp_conf(lsxl_mpp_config);
/* usb and sata power on */
gpio_set_value(LSXL_GPIO_USB_POWER, 1);
gpio_set_value(LSXL_GPIO_HDD_POWER, 1);
kirkwood_ehci_init();
kirkwood_ge00_init(&lsxl_ge00_data);
kirkwood_ge01_init(&lsxl_ge01_data);
platform_device_register(&lsxl_fan_device);
/* register power-off method */
pm_power_off = lsxl_power_off;
......
/*
* Copyright (C) 2012 MPL AG, Switzerland
* Stefan Peter <s.peter@mpl.ch>
*
* arch/arm/mach-kirkwood/board-mplcec4.c
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/mv643xx_eth.h>
#include <linux/platform_data/mmc-mvsdio.h>
#include "common.h"
#include "mpp.h"
static struct mv643xx_eth_platform_data mplcec4_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(1),
};
static struct mv643xx_eth_platform_data mplcec4_ge01_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(2),
};
static struct mvsdio_platform_data mplcec4_mvsdio_data = {
.gpio_card_detect = 47, /* MPP47 used as SD card detect */
};
void __init mplcec4_init(void)
{
/*
* Basic setup. Needs to be called early.
*/
kirkwood_ge00_init(&mplcec4_ge00_data);
kirkwood_ge01_init(&mplcec4_ge01_data);
kirkwood_sdio_init(&mplcec4_mvsdio_data);
kirkwood_pcie_init(KW_PCIE0);
}
/*
* Copyright 2012 (C), Simon Guinot <simon.guinot@sequanux.org>
*
* arch/arm/mach-kirkwood/board-ns2.c
*
* LaCie Network Space v2 board (and parents) initialization for drivers
* not converted to flattened device tree yet.
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/mv643xx_eth.h>
#include <linux/gpio.h>
#include <linux/of.h>
#include "common.h"
#include "mpp.h"
static struct mv643xx_eth_platform_data ns2_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(8),
};
static unsigned int ns2_mpp_config[] __initdata = {
MPP0_SPI_SCn,
MPP1_SPI_MOSI,
MPP2_SPI_SCK,
MPP3_SPI_MISO,
MPP4_NF_IO6,
MPP5_NF_IO7,
MPP6_SYSRST_OUTn,
MPP7_GPO, /* Fan speed (bit 1) */
MPP8_TW0_SDA,
MPP9_TW0_SCK,
MPP10_UART0_TXD,
MPP11_UART0_RXD,
MPP12_GPO, /* Red led */
MPP14_GPIO, /* USB fuse */
MPP16_GPIO, /* SATA 0 power */
MPP17_GPIO, /* SATA 1 power */
MPP18_NF_IO0,
MPP19_NF_IO1,
MPP20_SATA1_ACTn,
MPP21_SATA0_ACTn,
MPP22_GPIO, /* Fan speed (bit 0) */
MPP23_GPIO, /* Fan power */
MPP24_GPIO, /* USB mode select */
MPP25_GPIO, /* Fan rotation fail */
MPP26_GPIO, /* USB device vbus */
MPP28_GPIO, /* USB enable host vbus */
MPP29_GPIO, /* Blue led (slow register) */
MPP30_GPIO, /* Blue led (command register) */
MPP31_GPIO, /* Board power off */
MPP32_GPIO, /* Power button (0 = Released, 1 = Pushed) */
MPP33_GPO, /* Fan speed (bit 2) */
0
};
#define NS2_GPIO_POWER_OFF 31
static void ns2_power_off(void)
{
gpio_set_value(NS2_GPIO_POWER_OFF, 1);
}
void __init ns2_init(void)
{
/*
* Basic setup. Needs to be called early.
*/
kirkwood_mpp_conf(ns2_mpp_config);
if (of_machine_is_compatible("lacie,netspace_lite_v2") ||
of_machine_is_compatible("lacie,netspace_mini_v2"))
ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0);
kirkwood_ge00_init(&ns2_ge00_data);
if (gpio_request(NS2_GPIO_POWER_OFF, "power-off") == 0 &&
gpio_direction_output(NS2_GPIO_POWER_OFF, 0) == 0)
pm_power_off = ns2_power_off;
else
pr_err("ns2: failed to configure power-off GPIO\n");
}
/*
* arch/arm/mach-kirkwood/nsa-310-setup.c
*
* ZyXEL NSA-310 Setup
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/gpio.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/kirkwood.h>
#include "common.h"
#include "mpp.h"
#define NSA310_GPIO_USB_POWER_OFF 21
#define NSA310_GPIO_POWER_OFF 48
static unsigned int nsa310_mpp_config[] __initdata = {
MPP12_GPIO, /* led esata green */
MPP13_GPIO, /* led esata red */
MPP15_GPIO, /* led usb green */
MPP16_GPIO, /* led usb red */
MPP21_GPIO, /* control usb power off */
MPP28_GPIO, /* led sys green */
MPP29_GPIO, /* led sys red */
MPP36_GPIO, /* key reset */
MPP37_GPIO, /* key copy */
MPP39_GPIO, /* led copy green */
MPP40_GPIO, /* led copy red */
MPP41_GPIO, /* led hdd green */
MPP42_GPIO, /* led hdd red */
MPP44_GPIO, /* ?? */
MPP46_GPIO, /* key power */
MPP48_GPIO, /* control power off */
0
};
static struct i2c_board_info __initdata nsa310_i2c_info[] = {
{ I2C_BOARD_INFO("adt7476", 0x2e) },
};
static void nsa310_power_off(void)
{
gpio_set_value(NSA310_GPIO_POWER_OFF, 1);
}
static int __init nsa310_gpio_request(unsigned int gpio, unsigned long flags,
const char *label)
{
int err;
err = gpio_request_one(gpio, flags, label);
if (err)
pr_err("NSA-310: can't setup GPIO%u (%s), err=%d\n",
gpio, label, err);
return err;
}
static void __init nsa310_gpio_init(void)
{
int err;
err = nsa310_gpio_request(NSA310_GPIO_POWER_OFF, GPIOF_OUT_INIT_LOW,
"Power Off");
if (!err)
pm_power_off = nsa310_power_off;
nsa310_gpio_request(NSA310_GPIO_USB_POWER_OFF, GPIOF_OUT_INIT_LOW,
"USB Power Off");
}
void __init nsa310_init(void)
{
u32 dev, rev;
kirkwood_mpp_conf(nsa310_mpp_config);
nsa310_gpio_init();
kirkwood_pcie_id(&dev, &rev);
i2c_register_board_info(0, ARRAY_AND_SIZE(nsa310_i2c_info));
}
static int __init nsa310_pci_init(void)
{
if (of_machine_is_compatible("zyxel,nsa310"))
kirkwood_pcie_init(KW_PCIE0);
return 0;
}
subsys_initcall(nsa310_pci_init);
/*
* Copyright 2012 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
*
* arch/arm/mach-kirkwood/board-openblocks_a6.c
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/mv643xx_eth.h>
#include <linux/clk.h>
#include <linux/clk-private.h>
#include "common.h"
#include "mpp.h"
static struct mv643xx_eth_platform_data openblocks_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(0),
};
static unsigned int openblocks_a6_mpp_config[] __initdata = {
MPP0_NF_IO2,
MPP1_NF_IO3,
MPP2_NF_IO4,
MPP3_NF_IO5,
MPP4_NF_IO6,
MPP5_NF_IO7,
MPP6_SYSRST_OUTn,
MPP8_UART1_RTS,
MPP9_UART1_CTS,
MPP10_UART0_TXD,
MPP11_UART0_RXD,
MPP13_UART1_TXD,
MPP14_UART1_RXD,
MPP15_UART0_RTS,
MPP16_UART0_CTS,
MPP18_NF_IO0,
MPP19_NF_IO1,
MPP20_GPIO, /* DIP SW0 */
MPP21_GPIO, /* DIP SW1 */
MPP22_GPIO, /* DIP SW2 */
MPP23_GPIO, /* DIP SW3 */
MPP24_GPIO, /* GPIO 0 */
MPP25_GPIO, /* GPIO 1 */
MPP26_GPIO, /* GPIO 2 */
MPP27_GPIO, /* GPIO 3 */
MPP28_GPIO, /* GPIO 4 */
MPP29_GPIO, /* GPIO 5 */
MPP30_GPIO, /* GPIO 6 */
MPP31_GPIO, /* GPIO 7 */
MPP36_TW1_SDA,
MPP37_TW1_SCK,
MPP38_GPIO, /* INIT */
MPP39_GPIO, /* USB OC */
MPP41_GPIO, /* LED: Red */
MPP42_GPIO, /* LED: Green */
MPP43_GPIO, /* LED: Yellow */
0,
};
void __init openblocks_a6_init(void)
{
/*
* Basic setup. Needs to be called early.
*/
kirkwood_mpp_conf(openblocks_a6_mpp_config);
kirkwood_ge00_init(&openblocks_ge00_data);
}
......@@ -26,47 +26,21 @@
#include <asm/mach/arch.h>
#include <mach/kirkwood.h>
#include "common.h"
#include "mpp.h"
#include "tsx1x-common.h"
static struct mv643xx_eth_platform_data qnap_ts219_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(8),
};
static unsigned int qnap_ts219_mpp_config[] __initdata = {
MPP0_SPI_SCn,
MPP1_SPI_MOSI,
MPP2_SPI_SCK,
MPP3_SPI_MISO,
MPP4_SATA1_ACTn,
MPP5_SATA0_ACTn,
MPP8_TW0_SDA,
MPP9_TW0_SCK,
MPP10_UART0_TXD,
MPP11_UART0_RXD,
MPP13_UART1_TXD, /* PIC controller */
MPP14_UART1_RXD, /* PIC controller */
MPP15_GPIO, /* USB Copy button (on devices with 88F6281) */
MPP16_GPIO, /* Reset button (on devices with 88F6281) */
MPP36_GPIO, /* RAM: 0: 256 MB, 1: 512 MB */
MPP37_GPIO, /* Reset button (on devices with 88F6282) */
MPP43_GPIO, /* USB Copy button (on devices with 88F6282) */
MPP44_GPIO, /* Board ID: 0: TS-11x, 1: TS-21x */
0
};
void __init qnap_dt_ts219_init(void)
{
u32 dev, rev;
kirkwood_mpp_conf(qnap_ts219_mpp_config);
kirkwood_pcie_id(&dev, &rev);
if (dev == MV88F6282_DEV_ID)
qnap_ts219_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0);
kirkwood_ge00_init(&qnap_ts219_ge00_data);
kirkwood_ehci_init();
pm_power_off = qnap_tsx1x_power_off;
}
......
/*
* Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net>
*
* arch/arm/mach-kirkwood/board-usi_topkick.c
*
* USI Topkick Init for drivers not converted to flattened device tree yet.
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/mv643xx_eth.h>
#include <linux/gpio.h>
#include <linux/platform_data/mmc-mvsdio.h>
#include "common.h"
#include "mpp.h"
static struct mv643xx_eth_platform_data topkick_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(0),
};
static struct mvsdio_platform_data topkick_mvsdio_data = {
/* unfortunately the CD signal has not been connected */
};
/*
* GPIO LED layout
*
* /-SYS_LED(2)
* |
* | /-DISK_LED
* | |
* | | /-WLAN_LED(2)
* | | |
* [SW] [*] [*] [*]
*/
/*
* Switch positions
*
* /-SW_LEFT
* |
* | /-SW_IDLE
* | |
* | | /-SW_RIGHT
* | | |
* PS [L] [I] [R] LEDS
*/
static unsigned int topkick_mpp_config[] __initdata = {
MPP21_GPIO, /* DISK_LED (low active) - yellow */
MPP36_GPIO, /* SATA0 power enable (high active) */
MPP37_GPIO, /* SYS_LED2 (low active) - red */
MPP38_GPIO, /* SYS_LED (low active) - blue */
MPP39_GPIO, /* WLAN_LED (low active) - green */
MPP43_GPIO, /* SW_LEFT (low active) */
MPP44_GPIO, /* SW_RIGHT (low active) */
MPP45_GPIO, /* SW_IDLE (low active) */
MPP46_GPIO, /* SW_LEFT (low active) */
MPP48_GPIO, /* WLAN_LED2 (low active) - yellow */
0
};
#define TOPKICK_SATA0_PWR_ENABLE 36
void __init usi_topkick_init(void)
{
/*
* Basic setup. Needs to be called early.
*/
kirkwood_mpp_conf(topkick_mpp_config);
/* SATA0 power enable */
gpio_set_value(TOPKICK_SATA0_PWR_ENABLE, 1);
kirkwood_ge00_init(&topkick_ge00_data);
kirkwood_sdio_init(&topkick_mvsdio_data);
}
......@@ -266,6 +266,7 @@ void __init kirkwood_clk_init(void)
orion_clkdev_add("1", "pcie", pex1);
orion_clkdev_add(NULL, "kirkwood-i2s", audio);
orion_clkdev_add(NULL, MV64XXX_I2C_CTLR_NAME ".0", runit);
orion_clkdev_add(NULL, MV64XXX_I2C_CTLR_NAME ".1", runit);
/* Marvell says runit is used by SPI, UART, NAND, TWSI, ...,
* so should never be gated.
......
......@@ -112,6 +112,40 @@ void km_kirkwood_init(void);
static inline void km_kirkwood_init(void) {};
#endif
#ifdef CONFIG_MACH_MPLCEC4_DT
void mplcec4_init(void);
#else
static inline void mplcec4_init(void) {};
#endif
#if defined(CONFIG_MACH_INETSPACE_V2_DT) || \
defined(CONFIG_MACH_NETSPACE_V2_DT) || \
defined(CONFIG_MACH_NETSPACE_MAX_V2_DT) || \
defined(CONFIG_MACH_NETSPACE_LITE_V2_DT) || \
defined(CONFIG_MACH_NETSPACE_MINI_V2_DT)
void ns2_init(void);
#else
static inline void ns2_init(void) {};
#endif
#ifdef CONFIG_MACH_NSA310_DT
void nsa310_init(void);
#else
static inline void nsa310_init(void) {};
#endif
#ifdef CONFIG_MACH_OPENBLOCKS_A6_DT
void openblocks_a6_init(void);
#else
static inline void openblocks_a6_init(void) {};
#endif
#ifdef CONFIG_MACH_TOPKICK_DT
void usi_topkick_init(void);
#else
static inline void usi_topkick_init(void) {};
#endif
/* early init functions not converted to fdt yet */
char *kirkwood_id(void);
void kirkwood_l2_init(void);
......
......@@ -359,7 +359,7 @@ static struct clockdomain iss_44xx_clkdm = {
.clkdm_offs = OMAP4430_CM2_CAM_CAM_CDOFFS,
.wkdep_srcs = iss_wkup_sleep_deps,
.sleepdep_srcs = iss_wkup_sleep_deps,
.flags = CLKDM_CAN_HWSUP_SWSUP,
.flags = CLKDM_CAN_SWSUP,
};
static struct clockdomain l3_dss_44xx_clkdm = {
......
......@@ -19,6 +19,7 @@
#include <linux/of.h>
#include <linux/pinctrl/machine.h>
#include <linux/platform_data/omap4-keypad.h>
#include <linux/platform_data/omap_ocp2scp.h>
#include <asm/mach-types.h>
#include <asm/mach/map.h>
......@@ -615,6 +616,83 @@ static void omap_init_vout(void)
static inline void omap_init_vout(void) {}
#endif
#if defined(CONFIG_OMAP_OCP2SCP) || defined(CONFIG_OMAP_OCP2SCP_MODULE)
static int count_ocp2scp_devices(struct omap_ocp2scp_dev *ocp2scp_dev)
{
int cnt = 0;
while (ocp2scp_dev->drv_name != NULL) {
cnt++;
ocp2scp_dev++;
}
return cnt;
}
static void omap_init_ocp2scp(void)
{
struct omap_hwmod *oh;
struct platform_device *pdev;
int bus_id = -1, dev_cnt = 0, i;
struct omap_ocp2scp_dev *ocp2scp_dev;
const char *oh_name, *name;
struct omap_ocp2scp_platform_data *pdata;
if (!cpu_is_omap44xx())
return;
oh_name = "ocp2scp_usb_phy";
name = "omap-ocp2scp";
oh = omap_hwmod_lookup(oh_name);
if (!oh) {
pr_err("%s: could not find omap_hwmod for %s\n", __func__,
oh_name);
return;
}
pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
if (!pdata) {
pr_err("%s: No memory for ocp2scp pdata\n", __func__);
return;
}
ocp2scp_dev = oh->dev_attr;
dev_cnt = count_ocp2scp_devices(ocp2scp_dev);
if (!dev_cnt) {
pr_err("%s: No devices connected to ocp2scp\n", __func__);
kfree(pdata);
return;
}
pdata->devices = kzalloc(sizeof(struct omap_ocp2scp_dev *)
* dev_cnt, GFP_KERNEL);
if (!pdata->devices) {
pr_err("%s: No memory for ocp2scp pdata devices\n", __func__);
kfree(pdata);
return;
}
for (i = 0; i < dev_cnt; i++, ocp2scp_dev++)
pdata->devices[i] = ocp2scp_dev;
pdata->dev_cnt = dev_cnt;
pdev = omap_device_build(name, bus_id, oh, pdata, sizeof(*pdata), NULL,
0, false);
if (IS_ERR(pdev)) {
pr_err("Could not build omap_device for %s %s\n",
name, oh_name);
kfree(pdata->devices);
kfree(pdata);
return;
}
}
#else
static inline void omap_init_ocp2scp(void) { }
#endif
/*-------------------------------------------------------------------------*/
static int __init omap2_init_devices(void)
......@@ -642,6 +720,7 @@ static int __init omap2_init_devices(void)
omap_init_sham();
omap_init_aes();
omap_init_vout();
omap_init_ocp2scp();
return 0;
}
......
......@@ -419,6 +419,38 @@ static int _set_softreset(struct omap_hwmod *oh, u32 *v)
return 0;
}
/**
* _wait_softreset_complete - wait for an OCP softreset to complete
* @oh: struct omap_hwmod * to wait on
*
* Wait until the IP block represented by @oh reports that its OCP
* softreset is complete. This can be triggered by software (see
* _ocp_softreset()) or by hardware upon returning from off-mode (one
* example is HSMMC). Waits for up to MAX_MODULE_SOFTRESET_WAIT
* microseconds. Returns the number of microseconds waited.
*/
static int _wait_softreset_complete(struct omap_hwmod *oh)
{
struct omap_hwmod_class_sysconfig *sysc;
u32 softrst_mask;
int c = 0;
sysc = oh->class->sysc;
if (sysc->sysc_flags & SYSS_HAS_RESET_STATUS)
omap_test_timeout((omap_hwmod_read(oh, sysc->syss_offs)
& SYSS_RESETDONE_MASK),
MAX_MODULE_SOFTRESET_WAIT, c);
else if (sysc->sysc_flags & SYSC_HAS_RESET_STATUS) {
softrst_mask = (0x1 << sysc->sysc_fields->srst_shift);
omap_test_timeout(!(omap_hwmod_read(oh, sysc->sysc_offs)
& softrst_mask),
MAX_MODULE_SOFTRESET_WAIT, c);
}
return c;
}
/**
* _set_dmadisable: set OCP_SYSCONFIG.DMADISABLE bit in @v
* @oh: struct omap_hwmod *
......@@ -1280,6 +1312,18 @@ static void _enable_sysc(struct omap_hwmod *oh)
if (!oh->class->sysc)
return;
/*
* Wait until reset has completed, this is needed as the IP
* block is reset automatically by hardware in some cases
* (off-mode for example), and the drivers require the
* IP to be ready when they access it
*/
if (oh->flags & HWMOD_CONTROL_OPT_CLKS_IN_RESET)
_enable_optional_clocks(oh);
_wait_softreset_complete(oh);
if (oh->flags & HWMOD_CONTROL_OPT_CLKS_IN_RESET)
_disable_optional_clocks(oh);
v = oh->_sysc_cache;
sf = oh->class->sysc->sysc_flags;
......@@ -1802,7 +1846,7 @@ static int _am33xx_disable_module(struct omap_hwmod *oh)
*/
static int _ocp_softreset(struct omap_hwmod *oh)
{
u32 v, softrst_mask;
u32 v;
int c = 0;
int ret = 0;
......@@ -1832,19 +1876,7 @@ static int _ocp_softreset(struct omap_hwmod *oh)
if (oh->class->sysc->srst_udelay)
udelay(oh->class->sysc->srst_udelay);
if (oh->class->sysc->sysc_flags & SYSS_HAS_RESET_STATUS)
omap_test_timeout((omap_hwmod_read(oh,
oh->class->sysc->syss_offs)
& SYSS_RESETDONE_MASK),
MAX_MODULE_SOFTRESET_WAIT, c);
else if (oh->class->sysc->sysc_flags & SYSC_HAS_RESET_STATUS) {
softrst_mask = (0x1 << oh->class->sysc->sysc_fields->srst_shift);
omap_test_timeout(!(omap_hwmod_read(oh,
oh->class->sysc->sysc_offs)
& softrst_mask),
MAX_MODULE_SOFTRESET_WAIT, c);
}
c = _wait_softreset_complete(oh);
if (c == MAX_MODULE_SOFTRESET_WAIT)
pr_warning("omap_hwmod: %s: softreset failed (waited %d usec)\n",
oh->name, MAX_MODULE_SOFTRESET_WAIT);
......@@ -2351,6 +2383,9 @@ static int __init _setup_reset(struct omap_hwmod *oh)
if (oh->_state != _HWMOD_STATE_INITIALIZED)
return -EINVAL;
if (oh->flags & HWMOD_EXT_OPT_MAIN_CLK)
return -EPERM;
if (oh->rst_lines_cnt == 0) {
r = _enable(oh);
if (r) {
......
......@@ -442,6 +442,11 @@ struct omap_hwmod_omap4_prcm {
* in order to complete the reset. Optional clocks will be disabled
* again after the reset.
* HWMOD_16BIT_REG: Module has 16bit registers
* HWMOD_EXT_OPT_MAIN_CLK: The only main functional clock source for
* this IP block comes from an off-chip source and is not always
* enabled. This prevents the hwmod code from being able to
* enable and reset the IP block early. XXX Eventually it should
* be possible to query the clock framework for this information.
*/
#define HWMOD_SWSUP_SIDLE (1 << 0)
#define HWMOD_SWSUP_MSTANDBY (1 << 1)
......@@ -452,6 +457,7 @@ struct omap_hwmod_omap4_prcm {
#define HWMOD_NO_IDLEST (1 << 6)
#define HWMOD_CONTROL_OPT_CLKS_IN_RESET (1 << 7)
#define HWMOD_16BIT_REG (1 << 8)
#define HWMOD_EXT_OPT_MAIN_CLK (1 << 9)
/*
* omap_hwmod._int_flags definitions
......
......@@ -25,6 +25,7 @@
#include <plat-omap/dma-omap.h>
#include <linux/platform_data/omap_ocp2scp.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
#include <linux/platform_data/asoc-ti-mcbsp.h>
#include <plat/dmtimer.h>
......@@ -2126,6 +2127,14 @@ static struct omap_hwmod omap44xx_mcpdm_hwmod = {
.name = "mcpdm",
.class = &omap44xx_mcpdm_hwmod_class,
.clkdm_name = "abe_clkdm",
/*
* It's suspected that the McPDM requires an off-chip main
* functional clock, controlled via I2C. This IP block is
* currently reset very early during boot, before I2C is
* available, so it doesn't seem that we have any choice in
* the kernel other than to avoid resetting it.
*/
.flags = HWMOD_EXT_OPT_MAIN_CLK,
.mpu_irqs = omap44xx_mcpdm_irqs,
.sdma_reqs = omap44xx_mcpdm_sdma_reqs,
.main_clk = "mcpdm_fck",
......@@ -2682,6 +2691,32 @@ static struct omap_hwmod_class omap44xx_ocp2scp_hwmod_class = {
.sysc = &omap44xx_ocp2scp_sysc,
};
/* ocp2scp dev_attr */
static struct resource omap44xx_usb_phy_and_pll_addrs[] = {
{
.name = "usb_phy",
.start = 0x4a0ad080,
.end = 0x4a0ae000,
.flags = IORESOURCE_MEM,
},
{
/* XXX: Remove this once control module driver is in place */
.name = "ctrl_dev",
.start = 0x4a002300,
.end = 0x4a002303,
.flags = IORESOURCE_MEM,
},
{ }
};
static struct omap_ocp2scp_dev ocp2scp_dev_attr[] = {
{
.drv_name = "omap-usb2",
.res = omap44xx_usb_phy_and_pll_addrs,
},
{ }
};
/* ocp2scp_usb_phy */
static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = {
.name = "ocp2scp_usb_phy",
......@@ -2695,6 +2730,7 @@ static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = {
.modulemode = MODULEMODE_HWCTRL,
},
},
.dev_attr = ocp2scp_dev_attr,
};
/*
......
......@@ -363,7 +363,7 @@ static struct regulator_init_data omap4_clk32kg_idata = {
};
static struct regulator_consumer_supply omap4_vdd1_supply[] = {
REGULATOR_SUPPLY("vcc", "mpu.0"),
REGULATOR_SUPPLY("vcc", "cpu0"),
};
static struct regulator_consumer_supply omap4_vdd2_supply[] = {
......
......@@ -264,7 +264,7 @@ static void __init omap_vc_i2c_init(struct voltagedomain *voltdm)
if (initialized) {
if (voltdm->pmic->i2c_high_speed != i2c_high_speed)
pr_warn("%s: I2C config for vdd_%s does not match other channels (%u).",
pr_warn("%s: I2C config for vdd_%s does not match other channels (%u).\n",
__func__, voltdm->name, i2c_high_speed);
return;
}
......
......@@ -2,6 +2,13 @@ if ARCH_ORION5X
menu "Orion Implementations"
config ARCH_ORION5X_DT
bool "Marvell Orion5x Flattened Device Tree"
select USE_OF
help
Say 'Y' here if you want your kernel to support the
Marvell Orion5x using flattened device tree.
config MACH_DB88F5281
bool "Marvell Orion-2 Development Board"
select I2C_BOARDINFO
......@@ -96,12 +103,13 @@ config MACH_MV2120
Say 'Y' here if you want your kernel to support the
HP Media Vault mv2120 or mv5100.
config MACH_EDMINI_V2
bool "LaCie Ethernet Disk mini V2"
config MACH_EDMINI_V2_DT
bool "LaCie Ethernet Disk mini V2 (Flattened Device Tree)"
select I2C_BOARDINFO
select ARCH_ORION5X_DT
help
Say 'Y' here if you want your kernel to support the
LaCie Ethernet Disk mini V2.
LaCie Ethernet Disk mini V2 (Flattened Device Tree).
config MACH_D2NET
bool "LaCie d2 Network"
......
......@@ -12,7 +12,6 @@ obj-$(CONFIG_MACH_TS409) += ts409-setup.o tsx09-common.o
obj-$(CONFIG_MACH_WRT350N_V2) += wrt350n-v2-setup.o
obj-$(CONFIG_MACH_TS78XX) += ts78xx-setup.o
obj-$(CONFIG_MACH_MV2120) += mv2120-setup.o
obj-$(CONFIG_MACH_EDMINI_V2) += edmini_v2-setup.o
obj-$(CONFIG_MACH_D2NET) += d2net-setup.o
obj-$(CONFIG_MACH_BIGDISK) += d2net-setup.o
obj-$(CONFIG_MACH_NET2BIG) += net2big-setup.o
......@@ -22,3 +21,6 @@ obj-$(CONFIG_MACH_RD88F5181L_GE) += rd88f5181l-ge-setup.o
obj-$(CONFIG_MACH_RD88F5181L_FXO) += rd88f5181l-fxo-setup.o
obj-$(CONFIG_MACH_RD88F6183AP_GE) += rd88f6183ap-ge-setup.o
obj-$(CONFIG_MACH_LINKSTATION_LSCHL) += ls-chl-setup.o
obj-$(CONFIG_ARCH_ORION5X_DT) += board-dt.o
obj-$(CONFIG_MACH_EDMINI_V2_DT) += edmini_v2-setup.o
/*
* Copyright 2012 (C), Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
*
* arch/arm/mach-orion5x/board-dt.c
*
* Flattened Device Tree board initialization
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <asm/system_misc.h>
#include <asm/mach/arch.h>
#include <mach/orion5x.h>
#include <plat/irq.h>
#include "common.h"
struct of_dev_auxdata orion5x_auxdata_lookup[] __initdata = {
OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL),
OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0",
NULL),
OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL),
OF_DEV_AUXDATA("marvell,orion-sata", 0xf1080000, "sata_mv.0", NULL),
OF_DEV_AUXDATA("marvell,orion-crypto", 0xf1090000, "mv_crypto", NULL),
{},
};
static void __init orion5x_dt_init(void)
{
char *dev_name;
u32 dev, rev;
orion5x_id(&dev, &rev, &dev_name);
printk(KERN_INFO "Orion ID: %s. TCLK=%d.\n", dev_name, orion5x_tclk);
/*
* Setup Orion address map
*/
orion5x_setup_cpu_mbus_bridge();
/* Setup root of clk tree */
clk_init();
/*
* Don't issue "Wait for Interrupt" instruction if we are
* running on D0 5281 silicon.
*/
if (dev == MV88F5281_DEV_ID && rev == MV88F5281_REV_D0) {
printk(KERN_INFO "Orion: Applying 5281 D0 WFI workaround.\n");
disable_hlt();
}
if (of_machine_is_compatible("lacie,ethernet-disk-mini-v2"))
edmini_v2_init();
of_platform_populate(NULL, of_default_bus_match_table,
orion5x_auxdata_lookup, NULL);
}
static const char *orion5x_dt_compat[] = {
"marvell,orion5x",
NULL,
};
DT_MACHINE_START(ORION5X_DT, "Marvell Orion5x (Flattened Device Tree)")
/* Maintainer: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> */
.map_io = orion5x_map_io,
.init_early = orion5x_init_early,
.init_irq = orion_dt_init_irq,
.timer = &orion5x_timer,
.init_machine = orion5x_dt_init,
.restart = orion5x_restart,
.dt_compat = orion5x_dt_compat,
MACHINE_END
......@@ -65,7 +65,7 @@ void __init orion5x_map_io(void)
****************************************************************************/
static struct clk *tclk;
static void __init clk_init(void)
void __init clk_init(void)
{
tclk = clk_register_fixed_rate(NULL, "tclk", NULL, CLK_IS_ROOT,
orion5x_tclk);
......@@ -236,7 +236,7 @@ struct sys_timer orion5x_timer = {
/*
* Identify device ID and rev from PCIe configuration header space '0'.
*/
static void __init orion5x_id(u32 *dev, u32 *rev, char **dev_name)
void __init orion5x_id(u32 *dev, u32 *rev, char **dev_name)
{
orion5x_pcie_id(dev, rev);
......
......@@ -12,6 +12,8 @@ void orion5x_map_io(void);
void orion5x_init_early(void);
void orion5x_init_irq(void);
void orion5x_init(void);
void orion5x_id(u32 *dev, u32 *rev, char **dev_name);
void clk_init(void);
extern int orion5x_tclk;
extern struct sys_timer orion5x_timer;
......@@ -54,6 +56,13 @@ int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys);
struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys);
int orion5x_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin);
/* board init functions for boards not fully converted to fdt */
#ifdef CONFIG_MACH_EDMINI_V2_DT
void edmini_v2_init(void);
#else
static inline void edmini_v2_init(void) {};
#endif
struct meminfo;
struct tag;
extern void __init tag_fixup_mem32(struct tag *, char **, struct meminfo *);
......
......@@ -114,69 +114,6 @@ static struct i2c_board_info __initdata edmini_v2_i2c_rtc = {
.irq = 0,
};
/*****************************************************************************
* Sata
****************************************************************************/
static struct mv_sata_platform_data edmini_v2_sata_data = {
.n_ports = 2,
};
/*****************************************************************************
* GPIO LED (simple - doesn't use hardware blinking support)
****************************************************************************/
#define EDMINI_V2_GPIO_LED_POWER 16
static struct gpio_led edmini_v2_leds[] = {
{
.name = "power:blue",
.gpio = EDMINI_V2_GPIO_LED_POWER,
.active_low = 1,
},
};
static struct gpio_led_platform_data edmini_v2_led_data = {
.num_leds = ARRAY_SIZE(edmini_v2_leds),
.leds = edmini_v2_leds,
};
static struct platform_device edmini_v2_gpio_leds = {
.name = "leds-gpio",
.id = -1,
.dev = {
.platform_data = &edmini_v2_led_data,
},
};
/****************************************************************************
* GPIO key
****************************************************************************/
#define EDMINI_V2_GPIO_KEY_POWER 18
static struct gpio_keys_button edmini_v2_buttons[] = {
{
.code = KEY_POWER,
.gpio = EDMINI_V2_GPIO_KEY_POWER,
.desc = "Power Button",
.active_low = 0,
},
};
static struct gpio_keys_platform_data edmini_v2_button_data = {
.buttons = edmini_v2_buttons,
.nbuttons = ARRAY_SIZE(edmini_v2_buttons),
};
static struct platform_device edmini_v2_gpio_buttons = {
.name = "gpio-keys",
.id = -1,
.dev = {
.platform_data = &edmini_v2_button_data,
},
};
/*****************************************************************************
* General Setup
****************************************************************************/
......@@ -207,13 +144,8 @@ static unsigned int edminiv2_mpp_modes[] __initdata = {
0,
};
static void __init edmini_v2_init(void)
void __init edmini_v2_init(void)
{
/*
* Setup basic Orion functions. Need to be called early.
*/
orion5x_init();
orion5x_mpp_conf(edminiv2_mpp_modes);
/*
......@@ -221,15 +153,10 @@ static void __init edmini_v2_init(void)
*/
orion5x_ehci0_init();
orion5x_eth_init(&edmini_v2_eth_data);
orion5x_i2c_init();
orion5x_sata_init(&edmini_v2_sata_data);
orion5x_uart0_init();
orion5x_setup_dev_boot_win(EDMINI_V2_NOR_BOOT_BASE,
EDMINI_V2_NOR_BOOT_SIZE);
platform_device_register(&edmini_v2_nor_flash);
platform_device_register(&edmini_v2_gpio_leds);
platform_device_register(&edmini_v2_gpio_buttons);
pr_notice("edmini_v2: USB device port, flash write and power-off "
"are not yet supported.\n");
......@@ -247,16 +174,3 @@ static void __init edmini_v2_init(void)
i2c_register_board_info(0, &edmini_v2_i2c_rtc, 1);
}
/* Warning: LaCie use a wrong mach-type (0x20e=526) in their bootloader. */
MACHINE_START(EDMINI_V2, "LaCie Ethernet Disk mini V2")
/* Maintainer: Christopher Moore <moore@free.fr> */
.atag_offset = 0x100,
.init_machine = edmini_v2_init,
.map_io = orion5x_map_io,
.init_early = orion5x_init_early,
.init_irq = orion5x_init_irq,
.timer = &orion5x_timer,
.fixup = tag_fixup_mem32,
.restart = orion5x_restart,
MACHINE_END
......@@ -28,6 +28,7 @@
#include <linux/mfd/asic3.h>
#include <linux/mtd/physmap.h>
#include <linux/pda_power.h>
#include <linux/pwm.h>
#include <linux/pwm_backlight.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/gpio-regulator.h>
......@@ -556,7 +557,7 @@ static struct platform_device hx4700_lcd = {
*/
static struct platform_pwm_backlight_data backlight_data = {
.pwm_id = 1,
.pwm_id = -1, /* Superseded by pwm_lookup */
.max_brightness = 200,
.dft_brightness = 100,
.pwm_period_ns = 30923,
......@@ -571,6 +572,10 @@ static struct platform_device backlight = {
},
};
static struct pwm_lookup hx4700_pwm_lookup[] = {
PWM_LOOKUP("pxa27x-pwm.1", 0, "pwm-backlight", NULL),
};
/*
* USB "Transceiver"
*/
......@@ -872,6 +877,7 @@ static void __init hx4700_init(void)
pxa_set_stuart_info(NULL);
platform_add_devices(devices, ARRAY_SIZE(devices));
pwm_add_table(hx4700_pwm_lookup, ARRAY_SIZE(hx4700_pwm_lookup));
pxa_set_ficp_info(&ficp_info);
pxa27x_set_i2c_power_info(NULL);
......
......@@ -86,10 +86,7 @@ static void spitz_discharge1(int on)
gpio_set_value(SPITZ_GPIO_LED_GREEN, on);
}
static unsigned long gpio18_config[] = {
GPIO18_RDY,
GPIO18_GPIO,
};
static unsigned long gpio18_config = GPIO18_GPIO;
static void spitz_presuspend(void)
{
......@@ -112,7 +109,7 @@ static void spitz_presuspend(void)
PGSR3 &= ~SPITZ_GPIO_G3_STROBE_BIT;
PGSR2 |= GPIO_bit(SPITZ_GPIO_KEY_STROBE0);
pxa2xx_mfp_config(&gpio18_config[0], 1);
pxa2xx_mfp_config(&gpio18_config, 1);
gpio_request_one(18, GPIOF_OUT_INIT_HIGH, "Unknown");
gpio_free(18);
......@@ -131,7 +128,6 @@ static void spitz_presuspend(void)
static void spitz_postsuspend(void)
{
pxa2xx_mfp_config(&gpio18_config[1], 1);
}
static int spitz_should_wakeup(unsigned int resume_on_alarm)
......
......@@ -41,7 +41,7 @@ void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr)
static int __init orion_add_irq_domain(struct device_node *np,
struct device_node *interrupt_parent)
{
int i = 0, irq_gpio;
int i = 0;
void __iomem *base;
do {
......@@ -54,10 +54,6 @@ static int __init orion_add_irq_domain(struct device_node *np,
irq_domain_add_legacy(np, i * 32, 0, 0,
&irq_domain_simple_ops, NULL);
irq_gpio = i * 32;
orion_gpio_of_init(irq_gpio);
return 0;
}
......
......@@ -5,6 +5,6 @@
#
include/generated/mach-types.h: $(src)/gen-mach-types $(src)/mach-types
$(kecho) ' Generating $@'
@$(kecho) ' Generating $@'
@mkdir -p $(dir $@)
$(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }
......@@ -222,7 +222,7 @@ extern void __iomem *__ioremap(phys_addr_t phys_addr, size_t size, pgprot_t prot
extern void __iounmap(volatile void __iomem *addr);
#define PROT_DEFAULT (PTE_TYPE_PAGE | PTE_AF | PTE_DIRTY)
#define PROT_DEVICE_nGnRE (PROT_DEFAULT | PTE_XN | PTE_ATTRINDX(MT_DEVICE_nGnRE))
#define PROT_DEVICE_nGnRE (PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_ATTRINDX(MT_DEVICE_nGnRE))
#define PROT_NORMAL_NC (PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL_NC))
#define ioremap(addr, size) __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE))
......
......@@ -38,7 +38,8 @@
#define PMD_SECT_S (_AT(pmdval_t, 3) << 8)
#define PMD_SECT_AF (_AT(pmdval_t, 1) << 10)
#define PMD_SECT_NG (_AT(pmdval_t, 1) << 11)
#define PMD_SECT_XN (_AT(pmdval_t, 1) << 54)
#define PMD_SECT_PXN (_AT(pmdval_t, 1) << 53)
#define PMD_SECT_UXN (_AT(pmdval_t, 1) << 54)
/*
* AttrIndx[2:0] encoding (mapping attributes defined in the MAIR* registers).
......@@ -57,7 +58,8 @@
#define PTE_SHARED (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */
#define PTE_AF (_AT(pteval_t, 1) << 10) /* Access Flag */
#define PTE_NG (_AT(pteval_t, 1) << 11) /* nG */
#define PTE_XN (_AT(pteval_t, 1) << 54) /* XN */
#define PTE_PXN (_AT(pteval_t, 1) << 53) /* Privileged XN */
#define PTE_UXN (_AT(pteval_t, 1) << 54) /* User XN */
/*
* AttrIndx[2:0] encoding (mapping attributes defined in the MAIR* registers).
......
......@@ -62,23 +62,23 @@ extern pgprot_t pgprot_default;
#define _MOD_PROT(p, b) __pgprot(pgprot_val(p) | (b))
#define PAGE_NONE _MOD_PROT(pgprot_default, PTE_NG | PTE_XN | PTE_RDONLY)
#define PAGE_SHARED _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_XN)
#define PAGE_SHARED_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG)
#define PAGE_COPY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_XN | PTE_RDONLY)
#define PAGE_COPY_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_RDONLY)
#define PAGE_READONLY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_XN | PTE_RDONLY)
#define PAGE_READONLY_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_RDONLY)
#define PAGE_KERNEL _MOD_PROT(pgprot_default, PTE_XN | PTE_DIRTY)
#define PAGE_KERNEL_EXEC _MOD_PROT(pgprot_default, PTE_DIRTY)
#define __PAGE_NONE __pgprot(_PAGE_DEFAULT | PTE_NG | PTE_XN | PTE_RDONLY)
#define __PAGE_SHARED __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_XN)
#define __PAGE_SHARED_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG)
#define __PAGE_COPY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_XN | PTE_RDONLY)
#define __PAGE_COPY_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_RDONLY)
#define __PAGE_READONLY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_XN | PTE_RDONLY)
#define __PAGE_READONLY_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_RDONLY)
#define PAGE_NONE _MOD_PROT(pgprot_default, PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY)
#define PAGE_SHARED _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN)
#define PAGE_SHARED_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN)
#define PAGE_COPY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY)
#define PAGE_COPY_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_RDONLY)
#define PAGE_READONLY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY)
#define PAGE_READONLY_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_RDONLY)
#define PAGE_KERNEL _MOD_PROT(pgprot_default, PTE_PXN | PTE_UXN | PTE_DIRTY)
#define PAGE_KERNEL_EXEC _MOD_PROT(pgprot_default, PTE_UXN | PTE_DIRTY)
#define __PAGE_NONE __pgprot(_PAGE_DEFAULT | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY)
#define __PAGE_SHARED __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN)
#define __PAGE_SHARED_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN)
#define __PAGE_COPY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY)
#define __PAGE_COPY_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_RDONLY)
#define __PAGE_READONLY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY)
#define __PAGE_READONLY_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_RDONLY)
#endif /* __ASSEMBLY__ */
......@@ -130,10 +130,10 @@ extern struct page *empty_zero_page;
#define pte_young(pte) (pte_val(pte) & PTE_AF)
#define pte_special(pte) (pte_val(pte) & PTE_SPECIAL)
#define pte_write(pte) (!(pte_val(pte) & PTE_RDONLY))
#define pte_exec(pte) (!(pte_val(pte) & PTE_XN))
#define pte_exec(pte) (!(pte_val(pte) & PTE_UXN))
#define pte_present_exec_user(pte) \
((pte_val(pte) & (PTE_VALID | PTE_USER | PTE_XN)) == \
((pte_val(pte) & (PTE_VALID | PTE_USER | PTE_UXN)) == \
(PTE_VALID | PTE_USER))
#define PTE_BIT_FUNC(fn,op) \
......@@ -262,7 +262,7 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr)
static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
{
const pteval_t mask = PTE_USER | PTE_XN | PTE_RDONLY;
const pteval_t mask = PTE_USER | PTE_PXN | PTE_UXN | PTE_RDONLY;
pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask);
return pte;
}
......
......@@ -637,7 +637,6 @@ mem_init (void)
high_memory = __va(max_low_pfn * PAGE_SIZE);
reset_zone_present_pages();
for_each_online_pgdat(pgdat)
if (pgdat->bdata->node_bootmem_map)
totalram_pages += free_all_bootmem_node(pgdat);
......
......@@ -30,6 +30,7 @@
* measurement, and debugging facilities.
*/
#include <linux/irqflags.h>
#include <asm/octeon/cvmx.h>
#include <asm/octeon/cvmx-l2c.h>
#include <asm/octeon/cvmx-spinlock.h>
......
......@@ -11,6 +11,7 @@
*/
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/irqflags.h>
#include <asm/bcache.h>
......
......@@ -14,7 +14,6 @@
#endif
#include <linux/compiler.h>
#include <linux/irqflags.h>
#include <linux/types.h>
#include <asm/barrier.h>
#include <asm/byteorder.h> /* sigh ... */
......@@ -44,6 +43,24 @@
#define smp_mb__before_clear_bit() smp_mb__before_llsc()
#define smp_mb__after_clear_bit() smp_llsc_mb()
/*
* These are the "slower" versions of the functions and are in bitops.c.
* These functions call raw_local_irq_{save,restore}().
*/
void __mips_set_bit(unsigned long nr, volatile unsigned long *addr);
void __mips_clear_bit(unsigned long nr, volatile unsigned long *addr);
void __mips_change_bit(unsigned long nr, volatile unsigned long *addr);
int __mips_test_and_set_bit(unsigned long nr,
volatile unsigned long *addr);
int __mips_test_and_set_bit_lock(unsigned long nr,
volatile unsigned long *addr);
int __mips_test_and_clear_bit(unsigned long nr,
volatile unsigned long *addr);
int __mips_test_and_change_bit(unsigned long nr,
volatile unsigned long *addr);
/*
* set_bit - Atomically set a bit in memory
* @nr: the bit to set
......@@ -57,7 +74,7 @@
static inline void set_bit(unsigned long nr, volatile unsigned long *addr)
{
unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG);
unsigned short bit = nr & SZLONG_MASK;
int bit = nr & SZLONG_MASK;
unsigned long temp;
if (kernel_uses_llsc && R10000_LLSC_WAR) {
......@@ -92,17 +109,8 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr)
: "=&r" (temp), "+m" (*m)
: "ir" (1UL << bit));
} while (unlikely(!temp));
} else {
volatile unsigned long *a = addr;
unsigned long mask;
unsigned long flags;
a += nr >> SZLONG_LOG;
mask = 1UL << bit;
raw_local_irq_save(flags);
*a |= mask;
raw_local_irq_restore(flags);
}
} else
__mips_set_bit(nr, addr);
}
/*
......@@ -118,7 +126,7 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr)
static inline void clear_bit(unsigned long nr, volatile unsigned long *addr)
{
unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG);
unsigned short bit = nr & SZLONG_MASK;
int bit = nr & SZLONG_MASK;
unsigned long temp;
if (kernel_uses_llsc && R10000_LLSC_WAR) {
......@@ -153,17 +161,8 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr)
: "=&r" (temp), "+m" (*m)
: "ir" (~(1UL << bit)));
} while (unlikely(!temp));
} else {
volatile unsigned long *a = addr;
unsigned long mask;
unsigned long flags;
a += nr >> SZLONG_LOG;
mask = 1UL << bit;
raw_local_irq_save(flags);
*a &= ~mask;
raw_local_irq_restore(flags);
}
} else
__mips_clear_bit(nr, addr);
}
/*
......@@ -191,7 +190,7 @@ static inline void clear_bit_unlock(unsigned long nr, volatile unsigned long *ad
*/
static inline void change_bit(unsigned long nr, volatile unsigned long *addr)
{
unsigned short bit = nr & SZLONG_MASK;
int bit = nr & SZLONG_MASK;
if (kernel_uses_llsc && R10000_LLSC_WAR) {
unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG);
......@@ -220,17 +219,8 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr)
: "=&r" (temp), "+m" (*m)
: "ir" (1UL << bit));
} while (unlikely(!temp));
} else {
volatile unsigned long *a = addr;
unsigned long mask;
unsigned long flags;
a += nr >> SZLONG_LOG;
mask = 1UL << bit;
raw_local_irq_save(flags);
*a ^= mask;
raw_local_irq_restore(flags);
}
} else
__mips_change_bit(nr, addr);
}
/*
......@@ -244,7 +234,7 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr)
static inline int test_and_set_bit(unsigned long nr,
volatile unsigned long *addr)
{
unsigned short bit = nr & SZLONG_MASK;
int bit = nr & SZLONG_MASK;
unsigned long res;
smp_mb__before_llsc();
......@@ -281,18 +271,8 @@ static inline int test_and_set_bit(unsigned long nr,
} while (unlikely(!res));
res = temp & (1UL << bit);
} else {
volatile unsigned long *a = addr;
unsigned long mask;
unsigned long flags;
a += nr >> SZLONG_LOG;
mask = 1UL << bit;
raw_local_irq_save(flags);
res = (mask & *a);
*a |= mask;
raw_local_irq_restore(flags);
}
} else
res = __mips_test_and_set_bit(nr, addr);
smp_llsc_mb();
......@@ -310,7 +290,7 @@ static inline int test_and_set_bit(unsigned long nr,
static inline int test_and_set_bit_lock(unsigned long nr,
volatile unsigned long *addr)
{
unsigned short bit = nr & SZLONG_MASK;
int bit = nr & SZLONG_MASK;
unsigned long res;
if (kernel_uses_llsc && R10000_LLSC_WAR) {
......@@ -345,18 +325,8 @@ static inline int test_and_set_bit_lock(unsigned long nr,
} while (unlikely(!res));
res = temp & (1UL << bit);
} else {
volatile unsigned long *a = addr;
unsigned long mask;
unsigned long flags;
a += nr >> SZLONG_LOG;
mask = 1UL << bit;
raw_local_irq_save(flags);
res = (mask & *a);
*a |= mask;
raw_local_irq_restore(flags);
}
} else
res = __mips_test_and_set_bit_lock(nr, addr);
smp_llsc_mb();
......@@ -373,7 +343,7 @@ static inline int test_and_set_bit_lock(unsigned long nr,
static inline int test_and_clear_bit(unsigned long nr,
volatile unsigned long *addr)
{
unsigned short bit = nr & SZLONG_MASK;
int bit = nr & SZLONG_MASK;
unsigned long res;
smp_mb__before_llsc();
......@@ -428,18 +398,8 @@ static inline int test_and_clear_bit(unsigned long nr,
} while (unlikely(!res));
res = temp & (1UL << bit);
} else {
volatile unsigned long *a = addr;
unsigned long mask;
unsigned long flags;
a += nr >> SZLONG_LOG;
mask = 1UL << bit;
raw_local_irq_save(flags);
res = (mask & *a);
*a &= ~mask;
raw_local_irq_restore(flags);
}
} else
res = __mips_test_and_clear_bit(nr, addr);
smp_llsc_mb();
......@@ -457,7 +417,7 @@ static inline int test_and_clear_bit(unsigned long nr,
static inline int test_and_change_bit(unsigned long nr,
volatile unsigned long *addr)
{
unsigned short bit = nr & SZLONG_MASK;
int bit = nr & SZLONG_MASK;
unsigned long res;
smp_mb__before_llsc();
......@@ -494,18 +454,8 @@ static inline int test_and_change_bit(unsigned long nr,
} while (unlikely(!res));
res = temp & (1UL << bit);
} else {
volatile unsigned long *a = addr;
unsigned long mask;
unsigned long flags;
a += nr >> SZLONG_LOG;
mask = 1UL << bit;
raw_local_irq_save(flags);
res = (mask & *a);
*a ^= mask;
raw_local_irq_restore(flags);
}
} else
res = __mips_test_and_change_bit(nr, addr);
smp_llsc_mb();
......
......@@ -290,7 +290,7 @@ struct compat_shmid64_ds {
static inline int is_compat_task(void)
{
return test_thread_flag(TIF_32BIT);
return test_thread_flag(TIF_32BIT_ADDR);
}
#endif /* _ASM_COMPAT_H */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment