You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge tag 'drivers-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC driver changes from Arnd Bergmann: "These changes are mostly for ARM specific device drivers that either don't have an upstream maintainer, or that had the maintainer ask us to pick up the changes to avoid conflicts. A large chunk of this are clock drivers (bcm281xx, exynos, versatile, shmobile), aside from that, reset controllers for STi as well as a large rework of the Marvell Orion/EBU watchdog driver are notable" * tag 'drivers-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (99 commits) Revert "dts: socfpga: Add DTS entry for adding the stmmac glue layer for stmmac." Revert "net: stmmac: Add SOCFPGA glue driver" ARM: shmobile: r8a7791: Fix SCIFA3-5 clocks ARM: STi: Add reset controller support to mach-sti Kconfig drivers: reset: stih416: add softreset controller drivers: reset: stih415: add softreset controller drivers: reset: Reset controller driver for STiH416 drivers: reset: Reset controller driver for STiH415 drivers: reset: STi SoC system configuration reset controller support dts: socfpga: Add sysmgr node so the gmac can use to reference dts: socfpga: Add support for SD/MMC on the SOCFPGA platform reset: Add optional resets and stubs ARM: shmobile: r7s72100: fix bus clock calculation Power: Reset: Generalize qnap-poweroff to work on Synology devices. dts: socfpga: Update clock entry to support multiple parents ARM: socfpga: Update socfpga_defconfig dts: socfpga: Add DTS entry for adding the stmmac glue layer for stmmac. net: stmmac: Add SOCFPGA glue driver watchdog: orion_wdt: Use %pa to print 'phys_addr_t' drivers: cci: Export CCI PMU revision ...
This commit is contained in:
@@ -50,6 +50,11 @@ Optional
|
||||
regions, used when the GIC doesn't have banked registers. The offset is
|
||||
cpu-offset * cpu-nr.
|
||||
|
||||
- arm,routable-irqs : Total number of gic irq inputs which are not directly
|
||||
connected from the peripherals, but are routed dynamically
|
||||
by a crossbar/multiplexer preceding the GIC. The GIC irq
|
||||
input line is assigned dynamically when the corresponding
|
||||
peripheral's crossbar line is mapped.
|
||||
Example:
|
||||
|
||||
intc: interrupt-controller@fff11000 {
|
||||
@@ -57,6 +62,7 @@ Example:
|
||||
#interrupt-cells = <3>;
|
||||
#address-cells = <1>;
|
||||
interrupt-controller;
|
||||
arm,routable-irqs = <160>;
|
||||
reg = <0xfff11000 0x1000>,
|
||||
<0xfff10100 0x100>;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
Some socs have a large number of interrupts requests to service
|
||||
the needs of its many peripherals and subsystems. All of the
|
||||
interrupt lines from the subsystems are not needed at the same
|
||||
time, so they have to be muxed to the irq-controller appropriately.
|
||||
In such places a interrupt controllers are preceded by an CROSSBAR
|
||||
that provides flexibility in muxing the device requests to the controller
|
||||
inputs.
|
||||
|
||||
Required properties:
|
||||
- compatible : Should be "ti,irq-crossbar"
|
||||
- reg: Base address and the size of the crossbar registers.
|
||||
- ti,max-irqs: Total number of irqs available at the interrupt controller.
|
||||
- ti,reg-size: Size of a individual register in bytes. Every individual
|
||||
register is assumed to be of same size. Valid sizes are 1, 2, 4.
|
||||
- ti,irqs-reserved: List of the reserved irq lines that are not muxed using
|
||||
crossbar. These interrupt lines are reserved in the soc,
|
||||
so crossbar bar driver should not consider them as free
|
||||
lines.
|
||||
|
||||
Examples:
|
||||
crossbar_mpu: @4a020000 {
|
||||
compatible = "ti,irq-crossbar";
|
||||
reg = <0x4a002a48 0x130>;
|
||||
ti,max-irqs = <160>;
|
||||
ti,reg-size = <2>;
|
||||
ti,irqs-reserved = <0 1 2 3 5 6 131 132 139 140>;
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
Clock bindings for ARM Integrator Core Module clocks
|
||||
|
||||
Auxilary Oscillator Clock
|
||||
|
||||
This is a configurable clock fed from a 24 MHz chrystal,
|
||||
used for generating e.g. video clocks. It is located on the
|
||||
core module and there is only one of these.
|
||||
|
||||
This clock node *must* be a subnode of the core module, since
|
||||
it obtains the base address for it's address range from its
|
||||
parent node.
|
||||
|
||||
|
||||
Required properties:
|
||||
- compatible: must be "arm,integrator-cm-auxosc"
|
||||
- #clock-cells: must be <0>
|
||||
|
||||
Optional properties:
|
||||
- clocks: parent clock(s)
|
||||
|
||||
Example:
|
||||
|
||||
core-module@10000000 {
|
||||
xtal24mhz: xtal24mhz@24M {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <24000000>;
|
||||
};
|
||||
auxosc: cm_aux_osc@25M {
|
||||
#clock-cells = <0>;
|
||||
compatible = "arm,integrator-cm-auxosc";
|
||||
clocks = <&xtal24mhz>;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
* Altera SOCFPGA specific extensions to the Synopsys Designware Mobile
|
||||
Storage Host Controller
|
||||
|
||||
The Synopsys designware mobile storage host controller is used to interface
|
||||
a SoC with storage medium such as eMMC or SD/MMC cards. This file documents
|
||||
differences between the core Synopsys dw mshc controller properties described
|
||||
by synopsys-dw-mshc.txt and the properties used by the Altera SOCFPGA specific
|
||||
extensions to the Synopsys Designware Mobile Storage Host Controller.
|
||||
|
||||
Required Properties:
|
||||
|
||||
* compatible: should be
|
||||
- "altr,socfpga-dw-mshc": for Altera's SOCFPGA platform
|
||||
|
||||
Example:
|
||||
|
||||
mmc: dwmmc0@ff704000 {
|
||||
compatible = "altr,socfpga-dw-mshc";
|
||||
reg = <0xff704000 0x1000>;
|
||||
interrupts = <0 129 4>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
@@ -6,8 +6,11 @@ Orion5x SoCs. Sending the character 'A', at 19200 baud, tells the
|
||||
microcontroller to turn the power off. This driver adds a handler to
|
||||
pm_power_off which is called to turn the power off.
|
||||
|
||||
Synology NAS devices use a similar scheme, but a different baud rate,
|
||||
9600, and a different character, '1'.
|
||||
|
||||
Required Properties:
|
||||
- compatible: Should be "qnap,power-off"
|
||||
- compatible: Should be "qnap,power-off" or "synology,power-off"
|
||||
|
||||
- reg: Address and length of the register set for UART1
|
||||
- clocks: tclk clock
|
||||
|
||||
@@ -3,17 +3,24 @@
|
||||
Required Properties:
|
||||
|
||||
- Compatibility : "marvell,orion-wdt"
|
||||
- reg : Address of the timer registers
|
||||
"marvell,armada-370-wdt"
|
||||
"marvell,armada-xp-wdt"
|
||||
|
||||
- reg : Should contain two entries: first one with the
|
||||
timer control address, second one with the
|
||||
rstout enable address.
|
||||
|
||||
Optional properties:
|
||||
|
||||
- interrupts : Contains the IRQ for watchdog expiration
|
||||
- timeout-sec : Contains the watchdog timeout in seconds
|
||||
|
||||
Example:
|
||||
|
||||
wdt@20300 {
|
||||
compatible = "marvell,orion-wdt";
|
||||
reg = <0x20300 0x28>;
|
||||
reg = <0x20300 0x28>, <0x20108 0x4>;
|
||||
interrupts = <3>;
|
||||
timeout-sec = <10>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -18,6 +18,28 @@
|
||||
bootargs = "root=/dev/ram0 console=ttyAM0,38400n8 earlyprintk";
|
||||
};
|
||||
|
||||
/* 24 MHz chrystal on the core module */
|
||||
xtal24mhz: xtal24mhz@24M {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <24000000>;
|
||||
};
|
||||
|
||||
pclk: pclk@0 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-factor-clock";
|
||||
clock-div = <1>;
|
||||
clock-mult = <1>;
|
||||
clocks = <&xtal24mhz>;
|
||||
};
|
||||
|
||||
/* The UART clock is 14.74 MHz divided by an ICS525 */
|
||||
uartclk: uartclk@14.74M {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <14745600>;
|
||||
};
|
||||
|
||||
syscon {
|
||||
compatible = "arm,integrator-ap-syscon";
|
||||
reg = <0x11000000 0x100>;
|
||||
@@ -28,14 +50,17 @@
|
||||
|
||||
timer0: timer@13000000 {
|
||||
compatible = "arm,integrator-timer";
|
||||
clocks = <&xtal24mhz>;
|
||||
};
|
||||
|
||||
timer1: timer@13000100 {
|
||||
compatible = "arm,integrator-timer";
|
||||
clocks = <&xtal24mhz>;
|
||||
};
|
||||
|
||||
timer2: timer@13000200 {
|
||||
compatible = "arm,integrator-timer";
|
||||
clocks = <&xtal24mhz>;
|
||||
};
|
||||
|
||||
pic: pic@14000000 {
|
||||
@@ -92,26 +117,36 @@
|
||||
rtc: rtc@15000000 {
|
||||
compatible = "arm,pl030", "arm,primecell";
|
||||
arm,primecell-periphid = <0x00041030>;
|
||||
clocks = <&pclk>;
|
||||
clock-names = "apb_pclk";
|
||||
};
|
||||
|
||||
uart0: uart@16000000 {
|
||||
compatible = "arm,pl010", "arm,primecell";
|
||||
arm,primecell-periphid = <0x00041010>;
|
||||
clocks = <&uartclk>, <&pclk>;
|
||||
clock-names = "uartclk", "apb_pclk";
|
||||
};
|
||||
|
||||
uart1: uart@17000000 {
|
||||
compatible = "arm,pl010", "arm,primecell";
|
||||
arm,primecell-periphid = <0x00041010>;
|
||||
clocks = <&uartclk>, <&pclk>;
|
||||
clock-names = "uartclk", "apb_pclk";
|
||||
};
|
||||
|
||||
kmi0: kmi@18000000 {
|
||||
compatible = "arm,pl050", "arm,primecell";
|
||||
arm,primecell-periphid = <0x00041050>;
|
||||
clocks = <&xtal24mhz>, <&pclk>;
|
||||
clock-names = "KMIREFCLK", "apb_pclk";
|
||||
};
|
||||
|
||||
kmi1: kmi@19000000 {
|
||||
compatible = "arm,pl050", "arm,primecell";
|
||||
arm,primecell-periphid = <0x00041050>;
|
||||
clocks = <&xtal24mhz>, <&pclk>;
|
||||
clock-names = "KMIREFCLK", "apb_pclk";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -13,25 +13,107 @@
|
||||
bootargs = "root=/dev/ram0 console=ttyAMA0,38400n8 earlyprintk";
|
||||
};
|
||||
|
||||
/*
|
||||
* The Integrator/CP overall clocking architecture can be found in
|
||||
* ARM DUI 0184B page 7-28 "Integrator/CP922T system clocks" which
|
||||
* appear to illustrate the layout used in most configurations.
|
||||
*/
|
||||
|
||||
/* The codec chrystal operates at 24.576 MHz */
|
||||
xtal_codec: xtal24.576@24.576M {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <24576000>;
|
||||
};
|
||||
|
||||
/* The chrystal is divided by 2 by the codec for the AACI bit clock */
|
||||
aaci_bitclk: aaci_bitclk@12.288M {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-factor-clock";
|
||||
clock-div = <2>;
|
||||
clock-mult = <1>;
|
||||
clocks = <&xtal_codec>;
|
||||
};
|
||||
|
||||
/* This is a 25MHz chrystal on the base board */
|
||||
xtal25mhz: xtal25mhz@25M {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <25000000>;
|
||||
};
|
||||
|
||||
/* The UART clock is 14.74 MHz divided from 25MHz by an ICS525 */
|
||||
uartclk: uartclk@14.74M {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <14745600>;
|
||||
};
|
||||
|
||||
/* Actually sysclk I think */
|
||||
pclk: pclk@0 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <0>;
|
||||
};
|
||||
|
||||
core-module@10000000 {
|
||||
/* 24 MHz chrystal on the core module */
|
||||
xtal24mhz: xtal24mhz@24M {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <24000000>;
|
||||
};
|
||||
|
||||
/*
|
||||
* External oscillator on the core module, usually used
|
||||
* to drive video circuitry. Driven from the 24MHz clock.
|
||||
*/
|
||||
auxosc: cm_aux_osc@25M {
|
||||
#clock-cells = <0>;
|
||||
compatible = "arm,integrator-cm-auxosc";
|
||||
clocks = <&xtal24mhz>;
|
||||
};
|
||||
|
||||
/* The KMI clock is the 24 MHz oscillator divided to 8MHz */
|
||||
kmiclk: kmiclk@1M {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-factor-clock";
|
||||
clock-div = <3>;
|
||||
clock-mult = <1>;
|
||||
clocks = <&xtal24mhz>;
|
||||
};
|
||||
|
||||
/* The timer clock is the 24 MHz oscillator divided to 1MHz */
|
||||
timclk: timclk@1M {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-factor-clock";
|
||||
clock-div = <24>;
|
||||
clock-mult = <1>;
|
||||
clocks = <&xtal24mhz>;
|
||||
};
|
||||
};
|
||||
|
||||
syscon {
|
||||
compatible = "arm,integrator-cp-syscon";
|
||||
reg = <0xcb000000 0x100>;
|
||||
};
|
||||
|
||||
timer0: timer@13000000 {
|
||||
/* TIMER0 runs @ 25MHz */
|
||||
/* TIMER0 runs directly on the 25MHz chrystal */
|
||||
compatible = "arm,integrator-cp-timer";
|
||||
status = "disabled";
|
||||
clocks = <&xtal25mhz>;
|
||||
};
|
||||
|
||||
timer1: timer@13000100 {
|
||||
/* TIMER1 runs @ 1MHz */
|
||||
compatible = "arm,integrator-cp-timer";
|
||||
clocks = <&timclk>;
|
||||
};
|
||||
|
||||
timer2: timer@13000200 {
|
||||
/* TIMER2 runs @ 1MHz */
|
||||
compatible = "arm,integrator-cp-timer";
|
||||
clocks = <&timclk>;
|
||||
};
|
||||
|
||||
pic: pic@14000000 {
|
||||
@@ -74,22 +156,32 @@
|
||||
*/
|
||||
rtc@15000000 {
|
||||
compatible = "arm,pl031", "arm,primecell";
|
||||
clocks = <&pclk>;
|
||||
clock-names = "apb_pclk";
|
||||
};
|
||||
|
||||
uart@16000000 {
|
||||
compatible = "arm,pl011", "arm,primecell";
|
||||
clocks = <&uartclk>, <&pclk>;
|
||||
clock-names = "uartclk", "apb_pclk";
|
||||
};
|
||||
|
||||
uart@17000000 {
|
||||
compatible = "arm,pl011", "arm,primecell";
|
||||
clocks = <&uartclk>, <&pclk>;
|
||||
clock-names = "uartclk", "apb_pclk";
|
||||
};
|
||||
|
||||
kmi@18000000 {
|
||||
compatible = "arm,pl050", "arm,primecell";
|
||||
clocks = <&kmiclk>, <&pclk>;
|
||||
clock-names = "KMIREFCLK", "apb_pclk";
|
||||
};
|
||||
|
||||
kmi@19000000 {
|
||||
compatible = "arm,pl050", "arm,primecell";
|
||||
clocks = <&kmiclk>, <&pclk>;
|
||||
clock-names = "KMIREFCLK", "apb_pclk";
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -100,18 +192,24 @@
|
||||
reg = <0x1c000000 0x1000>;
|
||||
interrupts = <23 24>;
|
||||
max-frequency = <515633>;
|
||||
clocks = <&uartclk>, <&pclk>;
|
||||
clock-names = "mclk", "apb_pclk";
|
||||
};
|
||||
|
||||
aaci@1d000000 {
|
||||
compatible = "arm,pl041", "arm,primecell";
|
||||
reg = <0x1d000000 0x1000>;
|
||||
interrupts = <25>;
|
||||
clocks = <&pclk>;
|
||||
clock-names = "apb_pclk";
|
||||
};
|
||||
|
||||
clcd@c0000000 {
|
||||
compatible = "arm,pl110", "arm,primecell";
|
||||
reg = <0xC0000000 0x1000>;
|
||||
interrupts = <22>;
|
||||
clocks = <&auxosc>, <&pclk>;
|
||||
clock-names = "clcd", "apb_pclk";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -421,6 +421,29 @@
|
||||
clock-output-names = "extal";
|
||||
};
|
||||
|
||||
/*
|
||||
* The external audio clocks are configured as 0 Hz fixed frequency clocks by
|
||||
* default. Boards that provide audio clocks should override them.
|
||||
*/
|
||||
audio_clk_a: audio_clk_a {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <0>;
|
||||
clock-output-names = "audio_clk_a";
|
||||
};
|
||||
audio_clk_b: audio_clk_b {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <0>;
|
||||
clock-output-names = "audio_clk_b";
|
||||
};
|
||||
audio_clk_c: audio_clk_c {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <0>;
|
||||
clock-output-names = "audio_clk_c";
|
||||
};
|
||||
|
||||
/* Special CPG clocks */
|
||||
cpg_clocks: cpg_clocks@e6150000 {
|
||||
compatible = "renesas,r8a7790-cpg-clocks",
|
||||
|
||||
@@ -92,7 +92,12 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
osc: osc1 {
|
||||
osc1: osc1 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
};
|
||||
|
||||
osc2: osc2 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
};
|
||||
@@ -100,7 +105,11 @@
|
||||
f2s_periph_ref_clk: f2s_periph_ref_clk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <10000000>;
|
||||
};
|
||||
|
||||
f2s_sdram_ref_clk: f2s_sdram_ref_clk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
};
|
||||
|
||||
main_pll: main_pll {
|
||||
@@ -108,7 +117,7 @@
|
||||
#size-cells = <0>;
|
||||
#clock-cells = <0>;
|
||||
compatible = "altr,socfpga-pll-clock";
|
||||
clocks = <&osc>;
|
||||
clocks = <&osc1>;
|
||||
reg = <0x40>;
|
||||
|
||||
mpuclk: mpuclk {
|
||||
@@ -162,7 +171,7 @@
|
||||
#size-cells = <0>;
|
||||
#clock-cells = <0>;
|
||||
compatible = "altr,socfpga-pll-clock";
|
||||
clocks = <&osc>;
|
||||
clocks = <&osc1>, <&osc2>, <&f2s_periph_ref_clk>;
|
||||
reg = <0x80>;
|
||||
|
||||
emac0_clk: emac0_clk {
|
||||
@@ -213,7 +222,7 @@
|
||||
#size-cells = <0>;
|
||||
#clock-cells = <0>;
|
||||
compatible = "altr,socfpga-pll-clock";
|
||||
clocks = <&osc>;
|
||||
clocks = <&osc1>, <&osc2>, <&f2s_sdram_ref_clk>;
|
||||
reg = <0xC0>;
|
||||
|
||||
ddr_dqs_clk: ddr_dqs_clk {
|
||||
@@ -475,6 +484,17 @@
|
||||
arm,data-latency = <2 1 1>;
|
||||
};
|
||||
|
||||
mmc: dwmmc0@ff704000 {
|
||||
compatible = "altr,socfpga-dw-mshc";
|
||||
reg = <0xff704000 0x1000>;
|
||||
interrupts = <0 139 4>;
|
||||
fifo-depth = <0x400>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&l4_mp_clk>, <&sdmmc_clk>;
|
||||
clock-names = "biu", "ciu";
|
||||
};
|
||||
|
||||
/* Local timer */
|
||||
timer@fffec600 {
|
||||
compatible = "arm,cortex-a9-twd-timer";
|
||||
@@ -528,9 +548,9 @@
|
||||
reg = <0xffd05000 0x1000>;
|
||||
};
|
||||
|
||||
sysmgr@ffd08000 {
|
||||
compatible = "altr,sys-mgr";
|
||||
reg = <0xffd08000 0x4000>;
|
||||
};
|
||||
sysmgr: sysmgr@ffd08000 {
|
||||
compatible = "altr,sys-mgr", "syscon";
|
||||
reg = <0xffd08000 0x4000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -27,6 +27,17 @@
|
||||
};
|
||||
};
|
||||
|
||||
dwmmc0@ff704000 {
|
||||
num-slots = <1>;
|
||||
supports-highspeed;
|
||||
broken-cd;
|
||||
|
||||
slot@0 {
|
||||
reg = <0>;
|
||||
bus-width = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
serial0@ffc02000 {
|
||||
clock-frequency = <100000000>;
|
||||
};
|
||||
|
||||
@@ -28,6 +28,17 @@
|
||||
};
|
||||
};
|
||||
|
||||
dwmmc0@ff704000 {
|
||||
num-slots = <1>;
|
||||
supports-highspeed;
|
||||
broken-cd;
|
||||
|
||||
slot@0 {
|
||||
reg = <0>;
|
||||
bus-width = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
ethernet@ff702000 {
|
||||
phy-mode = "rgmii";
|
||||
phy-addr = <0xffffffff>; /* probe for phy addr */
|
||||
|
||||
@@ -41,6 +41,17 @@
|
||||
};
|
||||
};
|
||||
|
||||
dwmmc0@ff704000 {
|
||||
num-slots = <1>;
|
||||
supports-highspeed;
|
||||
broken-cd;
|
||||
|
||||
slot@0 {
|
||||
reg = <0>;
|
||||
bus-width = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
ethernet@ff700000 {
|
||||
phy-mode = "gmii";
|
||||
status = "okay";
|
||||
|
||||
@@ -271,10 +271,14 @@ static void __init integrator_cp_of_init(struct device_node *np)
|
||||
void __iomem *base;
|
||||
int irq;
|
||||
const char *name = of_get_property(np, "compatible", NULL);
|
||||
struct clk *clk;
|
||||
|
||||
base = of_iomap(np, 0);
|
||||
if (WARN_ON(!base))
|
||||
return;
|
||||
clk = of_clk_get(np, 0);
|
||||
if (WARN_ON(IS_ERR(clk)))
|
||||
return;
|
||||
|
||||
/* Ensure timer is disabled */
|
||||
writel(0, base + TIMER_CTRL);
|
||||
@@ -283,13 +287,13 @@ static void __init integrator_cp_of_init(struct device_node *np)
|
||||
goto err;
|
||||
|
||||
if (!init_count)
|
||||
sp804_clocksource_init(base, name);
|
||||
__sp804_clocksource_and_sched_clock_init(base, name, clk, 0);
|
||||
else {
|
||||
irq = irq_of_parse_and_map(np, 0);
|
||||
if (irq <= 0)
|
||||
goto err;
|
||||
|
||||
sp804_clockevents_init(base, irq, name);
|
||||
__sp804_clockevents_init(base, irq, clk, name);
|
||||
}
|
||||
|
||||
init_count++;
|
||||
|
||||
@@ -52,6 +52,7 @@ CONFIG_BLK_DEV_SD=y
|
||||
# CONFIG_SCSI_LOWLEVEL is not set
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_STMMAC_ETH=y
|
||||
CONFIG_MICREL_PHY=y
|
||||
# CONFIG_STMMAC_PHY_ID_ZERO_WORKAROUND is not set
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
# CONFIG_SERIO_SERPORT is not set
|
||||
@@ -66,6 +67,9 @@ CONFIG_SERIAL_8250_DW=y
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_EXT2_FS_XATTR=y
|
||||
CONFIG_EXT2_FS_POSIX_ACL=y
|
||||
CONFIG_EXT3_FS=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_ROOT_NFS=y
|
||||
# CONFIG_DNOTIFY is not set
|
||||
# CONFIG_INOTIFY_USER is not set
|
||||
CONFIG_VFAT_FS=y
|
||||
@@ -82,3 +86,5 @@ CONFIG_DEBUG_INFO=y
|
||||
CONFIG_ENABLE_DEFAULT_TRACERS=y
|
||||
CONFIG_DEBUG_USER=y
|
||||
CONFIG_XZ_DEC=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_DW=y
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <linux/time.h>
|
||||
|
||||
#include <linux/platform_data/mtd-davinci-aemif.h>
|
||||
#include <linux/platform_data/mtd-davinci.h>
|
||||
|
||||
/* Timing value configuration */
|
||||
|
||||
@@ -43,6 +44,17 @@
|
||||
WSTROBE(WSTROBE_MAX) | \
|
||||
WSETUP(WSETUP_MAX))
|
||||
|
||||
static inline unsigned int davinci_aemif_readl(void __iomem *base, int offset)
|
||||
{
|
||||
return readl_relaxed(base + offset);
|
||||
}
|
||||
|
||||
static inline void davinci_aemif_writel(void __iomem *base,
|
||||
int offset, unsigned long value)
|
||||
{
|
||||
writel_relaxed(value, base + offset);
|
||||
}
|
||||
|
||||
/*
|
||||
* aemif_calc_rate - calculate timing data.
|
||||
* @wanted: The cycle time needed in nanoseconds.
|
||||
@@ -76,6 +88,7 @@ static int aemif_calc_rate(int wanted, unsigned long clk, int max)
|
||||
* @t: timing values to be progammed
|
||||
* @base: The virtual base address of the AEMIF interface
|
||||
* @cs: chip-select to program the timing values for
|
||||
* @clkrate: the AEMIF clkrate
|
||||
*
|
||||
* This function programs the given timing values (in real clock) into the
|
||||
* AEMIF registers taking the AEMIF clock into account.
|
||||
@@ -86,24 +99,17 @@ static int aemif_calc_rate(int wanted, unsigned long clk, int max)
|
||||
*
|
||||
* Returns 0 on success, else negative errno.
|
||||
*/
|
||||
int davinci_aemif_setup_timing(struct davinci_aemif_timing *t,
|
||||
void __iomem *base, unsigned cs)
|
||||
static int davinci_aemif_setup_timing(struct davinci_aemif_timing *t,
|
||||
void __iomem *base, unsigned cs,
|
||||
unsigned long clkrate)
|
||||
{
|
||||
unsigned set, val;
|
||||
int ta, rhold, rstrobe, rsetup, whold, wstrobe, wsetup;
|
||||
unsigned offset = A1CR_OFFSET + cs * 4;
|
||||
struct clk *aemif_clk;
|
||||
unsigned long clkrate;
|
||||
|
||||
if (!t)
|
||||
return 0; /* Nothing to do */
|
||||
|
||||
aemif_clk = clk_get(NULL, "aemif");
|
||||
if (IS_ERR(aemif_clk))
|
||||
return PTR_ERR(aemif_clk);
|
||||
|
||||
clkrate = clk_get_rate(aemif_clk);
|
||||
|
||||
clkrate /= 1000; /* turn clock into kHz for ease of use */
|
||||
|
||||
ta = aemif_calc_rate(t->ta, clkrate, TA_MAX);
|
||||
@@ -130,4 +136,83 @@ int davinci_aemif_setup_timing(struct davinci_aemif_timing *t,
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(davinci_aemif_setup_timing);
|
||||
|
||||
/**
|
||||
* davinci_aemif_setup - setup AEMIF interface by davinci_nand_pdata
|
||||
* @pdev - link to platform device to setup settings for
|
||||
*
|
||||
* This function does not use any locking while programming the AEMIF
|
||||
* because it is expected that there is only one user of a given
|
||||
* chip-select.
|
||||
*
|
||||
* Returns 0 on success, else negative errno.
|
||||
*/
|
||||
int davinci_aemif_setup(struct platform_device *pdev)
|
||||
{
|
||||
struct davinci_nand_pdata *pdata = dev_get_platdata(&pdev->dev);
|
||||
uint32_t val;
|
||||
unsigned long clkrate;
|
||||
struct resource *res;
|
||||
void __iomem *base;
|
||||
struct clk *clk;
|
||||
int ret = 0;
|
||||
|
||||
clk = clk_get(&pdev->dev, "aemif");
|
||||
if (IS_ERR(clk)) {
|
||||
ret = PTR_ERR(clk);
|
||||
dev_dbg(&pdev->dev, "unable to get AEMIF clock, err %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = clk_prepare_enable(clk);
|
||||
if (ret < 0) {
|
||||
dev_dbg(&pdev->dev, "unable to enable AEMIF clock, err %d\n",
|
||||
ret);
|
||||
goto err_put;
|
||||
}
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
||||
if (!res) {
|
||||
dev_err(&pdev->dev, "cannot get IORESOURCE_MEM\n");
|
||||
ret = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
|
||||
base = ioremap(res->start, resource_size(res));
|
||||
if (!base) {
|
||||
dev_err(&pdev->dev, "ioremap failed for resource %pR\n", res);
|
||||
ret = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
* Setup Async configuration register in case we did not boot
|
||||
* from NAND and so bootloader did not bother to set it up.
|
||||
*/
|
||||
val = davinci_aemif_readl(base, A1CR_OFFSET + pdev->id * 4);
|
||||
/*
|
||||
* Extended Wait is not valid and Select Strobe mode is not
|
||||
* used
|
||||
*/
|
||||
val &= ~(ACR_ASIZE_MASK | ACR_EW_MASK | ACR_SS_MASK);
|
||||
if (pdata->options & NAND_BUSWIDTH_16)
|
||||
val |= 0x1;
|
||||
|
||||
davinci_aemif_writel(base, A1CR_OFFSET + pdev->id * 4, val);
|
||||
|
||||
clkrate = clk_get_rate(clk);
|
||||
|
||||
if (pdata->timing)
|
||||
ret = davinci_aemif_setup_timing(pdata->timing, base, pdev->id,
|
||||
clkrate);
|
||||
|
||||
if (ret < 0)
|
||||
dev_dbg(&pdev->dev, "NAND timing values setup fail\n");
|
||||
|
||||
iounmap(base);
|
||||
err:
|
||||
clk_disable_unprepare(clk);
|
||||
err_put:
|
||||
clk_put(clk);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -419,6 +419,9 @@ static inline void da830_evm_init_nand(int mux_mode)
|
||||
if (ret)
|
||||
pr_warning("da830_evm_init: NAND device not registered.\n");
|
||||
|
||||
if (davinci_aemif_setup(&da830_evm_nand_device))
|
||||
pr_warn("%s: Cannot configure AEMIF.\n", __func__);
|
||||
|
||||
gpio_direction_output(mux_mode, 1);
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -358,6 +358,9 @@ static inline void da850_evm_setup_nor_nand(void)
|
||||
|
||||
platform_add_devices(da850_evm_devices,
|
||||
ARRAY_SIZE(da850_evm_devices));
|
||||
|
||||
if (davinci_aemif_setup(&da850_evm_nandflash_device))
|
||||
pr_warn("%s: Cannot configure AEMIF.\n", __func__);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -778,6 +778,11 @@ static __init void davinci_evm_init(void)
|
||||
/* only one device will be jumpered and detected */
|
||||
if (HAS_NAND) {
|
||||
platform_device_register(&davinci_evm_nandflash_device);
|
||||
|
||||
if (davinci_aemif_setup(&davinci_evm_nandflash_device))
|
||||
pr_warn("%s: Cannot configure AEMIF.\n",
|
||||
__func__);
|
||||
|
||||
evm_leds[7].default_trigger = "nand-disk";
|
||||
if (HAS_NOR)
|
||||
pr_warning("WARNING: both NAND and NOR flash "
|
||||
|
||||
@@ -805,6 +805,9 @@ static __init void evm_init(void)
|
||||
|
||||
platform_device_register(&davinci_nand_device);
|
||||
|
||||
if (davinci_aemif_setup(&davinci_nand_device))
|
||||
pr_warn("%s: Cannot configure AEMIF.\n", __func__);
|
||||
|
||||
dm646x_init_edma(dm646x_edma_rsv);
|
||||
|
||||
if (HAS_ATA)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user