Commit 1496ec13 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'fixes-for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "Here's a long-pending fixes pull request for arm-soc (I didn't send
  one in the -rc4 cycle).

  The larger deltas are from:

   - A fixup of error paths in the mvsdio driver

   - Header file move for a driver that hadn't been properly converted
     to multiplatform on i.MX, which was causing build failures when
     included

   - Device tree updates for at91 dealing mostly with their new pinctrl
     setup merged in 3.8 and mistakes in those initial configs

  The rest are the normal mix of small fixes all over the place; sunxi,
  omap, imx, mvebu, etc, etc."

* tag 'fixes-for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (40 commits)
  mfd: vexpress-sysreg: Don't skip initialization on probe
  ARM: vexpress: Enable A7 cores in V2P-CA15_A7's Device Tree
  ARM: vexpress: extend the MPIDR range used for pen release check
  ARM: at91/dts: correct comment in at91sam9x5.dtsi for mii
  ARM: at91/at91_dt_defconfig: add at91sam9n12 SoC to DT defconfig
  ARM: at91/at91_dt_defconfig: remove memory specification to cmdline
  ARM: at91/dts: add macb mii pinctrl config for kizbox
  ARM: at91: rm9200: remake the BGA as default version
  ARM: at91: fix gpios on i2c-gpio for RM9200 DT
  ARM: at91/at91sam9x5 DTS: add SCK USART pins
  ARM: at91/at91sam9x5 DTS: correct wrong PIO BANK values on u(s)arts
  ARM: at91/at91-pinctrl documentation: fix typo and add some details
  ARM: kirkwood: fix missing #interrupt-cells property
  mmc: mvsdio: use devm_ API to simplify/correct error paths.
  clk: mvebu/clk-cpu.c: fix memory leakage
  ARM: OMAP2+: omap4-panda: add UART2 muxing for WiLink shared transport
  ARM: OMAP2+: DT node Timer iteration fix
  ARM: OMAP2+: Fix section warning for omap_init_ocp2scp()
  ARM: OMAP2+: fix build break for omapdrm
  ARM: OMAP2: Fix missing omap2xxx_clkt_vps_late_init function calls
  ...
parents ba2ab41f 3836414f
...@@ -81,7 +81,8 @@ PA31 TXD4 ...@@ -81,7 +81,8 @@ PA31 TXD4
Required properties for pin configuration node: Required properties for pin configuration node:
- atmel,pins: 4 integers array, represents a group of pins mux and config - atmel,pins: 4 integers array, represents a group of pins mux and config
setting. The format is atmel,pins = <PIN_BANK PIN_BANK_NUM PERIPH CONFIG>. setting. The format is atmel,pins = <PIN_BANK PIN_BANK_NUM PERIPH CONFIG>.
The PERIPH 0 means gpio. The PERIPH 0 means gpio, PERIPH 1 is periph A, PERIPH 2 is periph B...
PIN_BANK 0 is pioA, PIN_BANK 1 is pioB...
Bits used for CONFIG: Bits used for CONFIG:
PULL_UP (1 << 0): indicate this pin need a pull up. PULL_UP (1 << 0): indicate this pin need a pull up.
...@@ -126,7 +127,7 @@ pinctrl@fffff400 { ...@@ -126,7 +127,7 @@ pinctrl@fffff400 {
pinctrl_dbgu: dbgu-0 { pinctrl_dbgu: dbgu-0 {
atmel,pins = atmel,pins =
<1 14 0x1 0x0 /* PB14 periph A */ <1 14 0x1 0x0 /* PB14 periph A */
1 15 0x1 0x1>; /* PB15 periph with pullup */ 1 15 0x1 0x1>; /* PB15 periph A with pullup */
}; };
}; };
}; };
......
...@@ -26,7 +26,7 @@ chosen { ...@@ -26,7 +26,7 @@ chosen {
memory { memory {
device_type = "memory"; device_type = "memory";
reg = <0x00000000 0x20000000>; /* 512 MB */ reg = <0x00000000 0x40000000>; /* 1 GB */
}; };
soc { soc {
......
...@@ -50,27 +50,25 @@ pinctrl { ...@@ -50,27 +50,25 @@ pinctrl {
}; };
gpio0: gpio@d0018100 { gpio0: gpio@d0018100 {
compatible = "marvell,armadaxp-gpio"; compatible = "marvell,orion-gpio";
reg = <0xd0018100 0x40>, reg = <0xd0018100 0x40>;
<0xd0018800 0x30>;
ngpios = <32>; ngpios = <32>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
interrupt-controller; interrupt-controller;
#interrupts-cells = <2>; #interrupts-cells = <2>;
interrupts = <16>, <17>, <18>, <19>; interrupts = <82>, <83>, <84>, <85>;
}; };
gpio1: gpio@d0018140 { gpio1: gpio@d0018140 {
compatible = "marvell,armadaxp-gpio"; compatible = "marvell,orion-gpio";
reg = <0xd0018140 0x40>, reg = <0xd0018140 0x40>;
<0xd0018840 0x30>;
ngpios = <17>; ngpios = <17>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
interrupt-controller; interrupt-controller;
#interrupts-cells = <2>; #interrupts-cells = <2>;
interrupts = <20>, <21>, <22>; interrupts = <87>, <88>, <89>;
}; };
}; };
}; };
...@@ -51,39 +51,36 @@ pinctrl { ...@@ -51,39 +51,36 @@ pinctrl {
}; };
gpio0: gpio@d0018100 { gpio0: gpio@d0018100 {
compatible = "marvell,armadaxp-gpio"; compatible = "marvell,orion-gpio";
reg = <0xd0018100 0x40>, reg = <0xd0018100 0x40>;
<0xd0018800 0x30>;
ngpios = <32>; ngpios = <32>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
interrupt-controller; interrupt-controller;
#interrupts-cells = <2>; #interrupts-cells = <2>;
interrupts = <16>, <17>, <18>, <19>; interrupts = <82>, <83>, <84>, <85>;
}; };
gpio1: gpio@d0018140 { gpio1: gpio@d0018140 {
compatible = "marvell,armadaxp-gpio"; compatible = "marvell,orion-gpio";
reg = <0xd0018140 0x40>, reg = <0xd0018140 0x40>;
<0xd0018840 0x30>;
ngpios = <32>; ngpios = <32>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
interrupt-controller; interrupt-controller;
#interrupts-cells = <2>; #interrupts-cells = <2>;
interrupts = <20>, <21>, <22>, <23>; interrupts = <87>, <88>, <89>, <90>;
}; };
gpio2: gpio@d0018180 { gpio2: gpio@d0018180 {
compatible = "marvell,armadaxp-gpio"; compatible = "marvell,orion-gpio";
reg = <0xd0018180 0x40>, reg = <0xd0018180 0x40>;
<0xd0018870 0x30>;
ngpios = <3>; ngpios = <3>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
interrupt-controller; interrupt-controller;
#interrupts-cells = <2>; #interrupts-cells = <2>;
interrupts = <24>; interrupts = <91>;
}; };
ethernet@d0034000 { ethernet@d0034000 {
......
...@@ -66,39 +66,36 @@ pinctrl { ...@@ -66,39 +66,36 @@ pinctrl {
}; };
gpio0: gpio@d0018100 { gpio0: gpio@d0018100 {
compatible = "marvell,armadaxp-gpio"; compatible = "marvell,orion-gpio";
reg = <0xd0018100 0x40>, reg = <0xd0018100 0x40>;
<0xd0018800 0x30>;
ngpios = <32>; ngpios = <32>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
interrupt-controller; interrupt-controller;
#interrupts-cells = <2>; #interrupts-cells = <2>;
interrupts = <16>, <17>, <18>, <19>; interrupts = <82>, <83>, <84>, <85>;
}; };
gpio1: gpio@d0018140 { gpio1: gpio@d0018140 {
compatible = "marvell,armadaxp-gpio"; compatible = "marvell,orion-gpio";
reg = <0xd0018140 0x40>, reg = <0xd0018140 0x40>;
<0xd0018840 0x30>;
ngpios = <32>; ngpios = <32>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
interrupt-controller; interrupt-controller;
#interrupts-cells = <2>; #interrupts-cells = <2>;
interrupts = <20>, <21>, <22>, <23>; interrupts = <87>, <88>, <89>, <90>;
}; };
gpio2: gpio@d0018180 { gpio2: gpio@d0018180 {
compatible = "marvell,armadaxp-gpio"; compatible = "marvell,orion-gpio";
reg = <0xd0018180 0x40>, reg = <0xd0018180 0x40>;
<0xd0018870 0x30>;
ngpios = <3>; ngpios = <3>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
interrupt-controller; interrupt-controller;
#interrupts-cells = <2>; #interrupts-cells = <2>;
interrupts = <24>; interrupts = <91>;
}; };
ethernet@d0034000 { ethernet@d0034000 {
......
...@@ -336,8 +336,8 @@ usb0: ohci@00300000 { ...@@ -336,8 +336,8 @@ usb0: ohci@00300000 {
i2c@0 { i2c@0 {
compatible = "i2c-gpio"; compatible = "i2c-gpio";
gpios = <&pioA 23 0 /* sda */ gpios = <&pioA 25 0 /* sda */
&pioA 24 0 /* scl */ &pioA 26 0 /* scl */
>; >;
i2c-gpio,sda-open-drain; i2c-gpio,sda-open-drain;
i2c-gpio,scl-open-drain; i2c-gpio,scl-open-drain;
......
...@@ -143,6 +143,11 @@ pinctrl_usart0_cts: usart0_cts-0 { ...@@ -143,6 +143,11 @@ pinctrl_usart0_cts: usart0_cts-0 {
atmel,pins = atmel,pins =
<0 3 0x1 0x0>; /* PA3 periph A */ <0 3 0x1 0x0>; /* PA3 periph A */
}; };
pinctrl_usart0_sck: usart0_sck-0 {
atmel,pins =
<0 4 0x1 0x0>; /* PA4 periph A */
};
}; };
usart1 { usart1 {
...@@ -154,12 +159,17 @@ pinctrl_usart1: usart1-0 { ...@@ -154,12 +159,17 @@ pinctrl_usart1: usart1-0 {
pinctrl_usart1_rts: usart1_rts-0 { pinctrl_usart1_rts: usart1_rts-0 {
atmel,pins = atmel,pins =
<3 27 0x3 0x0>; /* PC27 periph C */ <2 27 0x3 0x0>; /* PC27 periph C */
}; };
pinctrl_usart1_cts: usart1_cts-0 { pinctrl_usart1_cts: usart1_cts-0 {
atmel,pins = atmel,pins =
<3 28 0x3 0x0>; /* PC28 periph C */ <2 28 0x3 0x0>; /* PC28 periph C */
};
pinctrl_usart1_sck: usart1_sck-0 {
atmel,pins =
<2 28 0x3 0x0>; /* PC29 periph C */
}; };
}; };
...@@ -172,46 +182,56 @@ pinctrl_usart2: usart2-0 { ...@@ -172,46 +182,56 @@ pinctrl_usart2: usart2-0 {
pinctrl_uart2_rts: uart2_rts-0 { pinctrl_uart2_rts: uart2_rts-0 {
atmel,pins = atmel,pins =
<0 0 0x2 0x0>; /* PB0 periph B */ <1 0 0x2 0x0>; /* PB0 periph B */
}; };
pinctrl_uart2_cts: uart2_cts-0 { pinctrl_uart2_cts: uart2_cts-0 {
atmel,pins = atmel,pins =
<0 1 0x2 0x0>; /* PB1 periph B */ <1 1 0x2 0x0>; /* PB1 periph B */
};
pinctrl_usart2_sck: usart2_sck-0 {
atmel,pins =
<1 2 0x2 0x0>; /* PB2 periph B */
}; };
}; };
usart3 { usart3 {
pinctrl_uart3: usart3-0 { pinctrl_uart3: usart3-0 {
atmel,pins = atmel,pins =
<3 23 0x2 0x1 /* PC22 periph B with pullup */ <2 23 0x2 0x1 /* PC22 periph B with pullup */
3 23 0x2 0x0>; /* PC23 periph B */ 2 23 0x2 0x0>; /* PC23 periph B */
}; };
pinctrl_usart3_rts: usart3_rts-0 { pinctrl_usart3_rts: usart3_rts-0 {
atmel,pins = atmel,pins =
<3 24 0x2 0x0>; /* PC24 periph B */ <2 24 0x2 0x0>; /* PC24 periph B */
}; };
pinctrl_usart3_cts: usart3_cts-0 { pinctrl_usart3_cts: usart3_cts-0 {
atmel,pins = atmel,pins =
<3 25 0x2 0x0>; /* PC25 periph B */ <2 25 0x2 0x0>; /* PC25 periph B */
};
pinctrl_usart3_sck: usart3_sck-0 {
atmel,pins =
<2 26 0x2 0x0>; /* PC26 periph B */
}; };
}; };
uart0 { uart0 {
pinctrl_uart0: uart0-0 { pinctrl_uart0: uart0-0 {
atmel,pins = atmel,pins =
<3 8 0x3 0x0 /* PC8 periph C */ <2 8 0x3 0x0 /* PC8 periph C */
3 9 0x3 0x1>; /* PC9 periph C with pullup */ 2 9 0x3 0x1>; /* PC9 periph C with pullup */
}; };
}; };
uart1 { uart1 {
pinctrl_uart1: uart1-0 { pinctrl_uart1: uart1-0 {
atmel,pins = atmel,pins =
<3 16 0x3 0x0 /* PC16 periph C */ <2 16 0x3 0x0 /* PC16 periph C */
3 17 0x3 0x1>; /* PC17 periph C with pullup */ 2 17 0x3 0x1>; /* PC17 periph C with pullup */
}; };
}; };
...@@ -240,14 +260,14 @@ pinctrl_macb0_rmii: macb0_rmii-0 { ...@@ -240,14 +260,14 @@ pinctrl_macb0_rmii: macb0_rmii-0 {
pinctrl_macb0_rmii_mii: macb0_rmii_mii-0 { pinctrl_macb0_rmii_mii: macb0_rmii_mii-0 {
atmel,pins = atmel,pins =
<1 8 0x1 0x0 /* PA8 periph A */ <1 8 0x1 0x0 /* PB8 periph A */
1 11 0x1 0x0 /* PA11 periph A */ 1 11 0x1 0x0 /* PB11 periph A */
1 12 0x1 0x0 /* PA12 periph A */ 1 12 0x1 0x0 /* PB12 periph A */
1 13 0x1 0x0 /* PA13 periph A */ 1 13 0x1 0x0 /* PB13 periph A */
1 14 0x1 0x0 /* PA14 periph A */ 1 14 0x1 0x0 /* PB14 periph A */
1 15 0x1 0x0 /* PA15 periph A */ 1 15 0x1 0x0 /* PB15 periph A */
1 16 0x1 0x0 /* PA16 periph A */ 1 16 0x1 0x0 /* PB16 periph A */
1 17 0x1 0x0>; /* PA17 periph A */ 1 17 0x1 0x0>; /* PB17 periph A */
}; };
}; };
......
...@@ -96,8 +96,8 @@ dwmmc0@12200000 { ...@@ -96,8 +96,8 @@ dwmmc0@12200000 {
fifo-depth = <0x80>; fifo-depth = <0x80>;
card-detect-delay = <200>; card-detect-delay = <200>;
samsung,dw-mshc-ciu-div = <3>; samsung,dw-mshc-ciu-div = <3>;
samsung,dw-mshc-sdr-timing = <2 3 3>; samsung,dw-mshc-sdr-timing = <2 3>;
samsung,dw-mshc-ddr-timing = <1 2 3>; samsung,dw-mshc-ddr-timing = <1 2>;
slot@0 { slot@0 {
reg = <0>; reg = <0>;
...@@ -120,8 +120,8 @@ dwmmc2@12220000 { ...@@ -120,8 +120,8 @@ dwmmc2@12220000 {
fifo-depth = <0x80>; fifo-depth = <0x80>;
card-detect-delay = <200>; card-detect-delay = <200>;
samsung,dw-mshc-ciu-div = <3>; samsung,dw-mshc-ciu-div = <3>;
samsung,dw-mshc-sdr-timing = <2 3 3>; samsung,dw-mshc-sdr-timing = <2 3>;
samsung,dw-mshc-ddr-timing = <1 2 3>; samsung,dw-mshc-ddr-timing = <1 2>;
slot@0 { slot@0 {
reg = <0>; reg = <0>;
...@@ -141,8 +141,8 @@ dwmmc3@12230000 { ...@@ -141,8 +141,8 @@ dwmmc3@12230000 {
fifo-depth = <0x80>; fifo-depth = <0x80>;
card-detect-delay = <200>; card-detect-delay = <200>;
samsung,dw-mshc-ciu-div = <3>; samsung,dw-mshc-ciu-div = <3>;
samsung,dw-mshc-sdr-timing = <2 3 3>; samsung,dw-mshc-sdr-timing = <2 3>;
samsung,dw-mshc-ddr-timing = <1 2 3>; samsung,dw-mshc-ddr-timing = <1 2>;
slot@0 { slot@0 {
reg = <0>; reg = <0>;
......
...@@ -26,10 +26,15 @@ power { ...@@ -26,10 +26,15 @@ power {
}; };
&uart0 { status = "okay"; }; &uart0 { status = "okay"; };
&sdio0 { status = "okay"; };
&sata0 { status = "okay"; }; &sata0 { status = "okay"; };
&i2c0 { status = "okay"; }; &i2c0 { status = "okay"; };
&sdio0 {
status = "okay";
/* sdio0 card detect is connected to wrong pin on CuBox */
cd-gpios = <&gpio0 12 1>;
};
&spi0 { &spi0 {
status = "okay"; status = "okay";
...@@ -42,9 +47,14 @@ spi-flash@0 { ...@@ -42,9 +47,14 @@ spi-flash@0 {
}; };
&pinctrl { &pinctrl {
pinctrl-0 = <&pmx_gpio_18>; pinctrl-0 = <&pmx_gpio_12 &pmx_gpio_18>;
pinctrl-names = "default"; pinctrl-names = "default";
pmx_gpio_12: pmx-gpio-12 {
marvell,pins = "mpp12";
marvell,function = "gpio";
};
pmx_gpio_18: pmx-gpio-18 { pmx_gpio_18: pmx-gpio-18 {
marvell,pins = "mpp18"; marvell,pins = "mpp18";
marvell,function = "gpio"; marvell,function = "gpio";
......
...@@ -115,8 +115,8 @@ dwmmc0@12200000 { ...@@ -115,8 +115,8 @@ dwmmc0@12200000 {
fifo-depth = <0x80>; fifo-depth = <0x80>;
card-detect-delay = <200>; card-detect-delay = <200>;
samsung,dw-mshc-ciu-div = <3>; samsung,dw-mshc-ciu-div = <3>;
samsung,dw-mshc-sdr-timing = <2 3 3>; samsung,dw-mshc-sdr-timing = <2 3>;
samsung,dw-mshc-ddr-timing = <1 2 3>; samsung,dw-mshc-ddr-timing = <1 2>;
slot@0 { slot@0 {
reg = <0>; reg = <0>;
...@@ -139,8 +139,8 @@ dwmmc2@12220000 { ...@@ -139,8 +139,8 @@ dwmmc2@12220000 {
fifo-depth = <0x80>; fifo-depth = <0x80>;
card-detect-delay = <200>; card-detect-delay = <200>;
samsung,dw-mshc-ciu-div = <3>; samsung,dw-mshc-ciu-div = <3>;
samsung,dw-mshc-sdr-timing = <2 3 3>; samsung,dw-mshc-sdr-timing = <2 3>;
samsung,dw-mshc-ddr-timing = <1 2 3>; samsung,dw-mshc-ddr-timing = <1 2>;
slot@0 { slot@0 {
reg = <0>; reg = <0>;
......
/include/ "kirkwood.dtsi" /include/ "kirkwood.dtsi"
/include/ "kirkwood-6281.dtsi"
/ { / {
chosen { chosen {
...@@ -6,6 +7,21 @@ chosen { ...@@ -6,6 +7,21 @@ chosen {
}; };
ocp@f1000000 { ocp@f1000000 {
pinctrl: pinctrl@10000 {
pinctrl-0 = < &pmx_spi &pmx_twsi0 &pmx_uart0
&pmx_ns2_sata0 &pmx_ns2_sata1>;
pinctrl-names = "default";
pmx_ns2_sata0: pmx-ns2-sata0 {
marvell,pins = "mpp21";
marvell,function = "sata0";
};
pmx_ns2_sata1: pmx-ns2-sata1 {
marvell,pins = "mpp20";
marvell,function = "sata1";
};
};
serial@12000 { serial@12000 {
clock-frequency = <166666667>; clock-frequency = <166666667>;
status = "okay"; status = "okay";
......
...@@ -36,6 +36,7 @@ gpio0: gpio@10100 { ...@@ -36,6 +36,7 @@ gpio0: gpio@10100 {
reg = <0x10100 0x40>; reg = <0x10100 0x40>;
ngpios = <32>; ngpios = <32>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>;
interrupts = <35>, <36>, <37>, <38>; interrupts = <35>, <36>, <37>, <38>;
}; };
...@@ -46,6 +47,7 @@ gpio1: gpio@10140 { ...@@ -46,6 +47,7 @@ gpio1: gpio@10140 {
reg = <0x10140 0x40>; reg = <0x10140 0x40>;
ngpios = <18>; ngpios = <18>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>;
interrupts = <39>, <40>, <41>; interrupts = <39>, <40>, <41>;
}; };
......
...@@ -48,6 +48,8 @@ usart1: serial@fffb4000 { ...@@ -48,6 +48,8 @@ usart1: serial@fffb4000 {
macb0: ethernet@fffc4000 { macb0: ethernet@fffc4000 {
phy-mode = "mii"; phy-mode = "mii";
pinctrl-0 = <&pinctrl_macb_rmii
&pinctrl_macb_rmii_mii_alt>;
status = "okay"; status = "okay";
}; };
......
...@@ -60,19 +60,21 @@ intc: interrupt-controller@01c20400 { ...@@ -60,19 +60,21 @@ intc: interrupt-controller@01c20400 {
}; };
uart0: uart@01c28000 { uart0: uart@01c28000 {
compatible = "ns8250"; compatible = "snps,dw-apb-uart";
reg = <0x01c28000 0x400>; reg = <0x01c28000 0x400>;
interrupts = <1>; interrupts = <1>;
reg-shift = <2>; reg-shift = <2>;
reg-io-width = <4>;
clock-frequency = <24000000>; clock-frequency = <24000000>;
status = "disabled"; status = "disabled";
}; };
uart1: uart@01c28400 { uart1: uart@01c28400 {
compatible = "ns8250"; compatible = "snps,dw-apb-uart";
reg = <0x01c28400 0x400>; reg = <0x01c28400 0x400>;
interrupts = <2>; interrupts = <2>;
reg-shift = <2>; reg-shift = <2>;
reg-io-width = <4>;
clock-frequency = <24000000>; clock-frequency = <24000000>;
status = "disabled"; status = "disabled";
}; };
......
...@@ -45,7 +45,6 @@ cpu1: cpu@1 { ...@@ -45,7 +45,6 @@ cpu1: cpu@1 {
reg = <1>; reg = <1>;
}; };
/* A7s disabled till big.LITTLE patches are available...
cpu2: cpu@2 { cpu2: cpu@2 {
device_type = "cpu"; device_type = "cpu";
compatible = "arm,cortex-a7"; compatible = "arm,cortex-a7";
...@@ -63,7 +62,6 @@ cpu4: cpu@4 { ...@@ -63,7 +62,6 @@ cpu4: cpu@4 {
compatible = "arm,cortex-a7"; compatible = "arm,cortex-a7";
reg = <0x102>; reg = <0x102>;
}; };
*/
}; };
memory@80000000 { memory@80000000 {
......
...@@ -19,6 +19,7 @@ CONFIG_SOC_AT91SAM9260=y ...@@ -19,6 +19,7 @@ CONFIG_SOC_AT91SAM9260=y
CONFIG_SOC_AT91SAM9263=y CONFIG_SOC_AT91SAM9263=y
CONFIG_SOC_AT91SAM9G45=y CONFIG_SOC_AT91SAM9G45=y
CONFIG_SOC_AT91SAM9X5=y CONFIG_SOC_AT91SAM9X5=y
CONFIG_SOC_AT91SAM9N12=y
CONFIG_MACH_AT91SAM_DT=y CONFIG_MACH_AT91SAM_DT=y
CONFIG_AT91_PROGRAMMABLE_CLOCKS=y CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
CONFIG_AT91_TIMER_HZ=128 CONFIG_AT91_TIMER_HZ=128
...@@ -31,7 +32,7 @@ CONFIG_ZBOOT_ROM_TEXT=0x0 ...@@ -31,7 +32,7 @@ CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_ARM_APPENDED_DTB=y CONFIG_ARM_APPENDED_DTB=y
CONFIG_ARM_ATAG_DTB_COMPAT=y CONFIG_ARM_ATAG_DTB_COMPAT=y
CONFIG_CMDLINE="mem=128M console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw" CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw"
CONFIG_KEXEC=y CONFIG_KEXEC=y
CONFIG_AUTO_ZRELADDR=y CONFIG_AUTO_ZRELADDR=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
......
...@@ -100,12 +100,14 @@ ENTRY(printch) ...@@ -100,12 +100,14 @@ ENTRY(printch)
b 1b b 1b
ENDPROC(printch) ENDPROC(printch)
#ifdef CONFIG_MMU
ENTRY(debug_ll_addr) ENTRY(debug_ll_addr)
addruart r2, r3, ip addruart r2, r3, ip
str r2, [r0] str r2, [r0]
str r3, [r1] str r3, [r1]
mov pc, lr mov pc, lr
ENDPROC(debug_ll_addr) ENDPROC(debug_ll_addr)
#endif
#else #else
......
...@@ -105,6 +105,8 @@ static void __init soc_detect(u32 dbgu_base) ...@@ -105,6 +105,8 @@ static void __init soc_detect(u32 dbgu_base)
switch (socid) { switch (socid) {
case ARCH_ID_AT91RM9200: case ARCH_ID_AT91RM9200:
at91_soc_initdata.type = AT91_SOC_RM9200; at91_soc_initdata.type = AT91_SOC_RM9200;
if (at91_soc_initdata.subtype == AT91_SOC_SUBTYPE_NONE)
at91_soc_initdata.subtype = AT91_SOC_RM9200_BGA;
at91_boot_soc = at91rm9200_soc; at91_boot_soc = at91rm9200_soc;
break; break;
......
...@@ -851,6 +851,7 @@ config SOC_IMX6Q ...@@ -851,6 +851,7 @@ config SOC_IMX6Q
select HAVE_CAN_FLEXCAN if CAN select HAVE_CAN_FLEXCAN if CAN
select HAVE_IMX_GPC select HAVE_IMX_GPC
select HAVE_IMX_MMDC select HAVE_IMX_MMDC
select HAVE_IMX_SRC
select HAVE_SMP select HAVE_SMP
select MFD_SYSCON select MFD_SYSCON
select PINCTRL select PINCTRL
......
...@@ -436,6 +436,9 @@ int __init mx6q_clocks_init(void) ...@@ -436,6 +436,9 @@ int __init mx6q_clocks_init(void)
for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
clk_prepare_enable(clk[clks_init_on[i]]); clk_prepare_enable(clk[clks_init_on[i]]);
/* Set initial power mode */
imx6q_set_lpm(WAIT_CLOCKED);
np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"); np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt");
base = of_iomap(np, 0); base = of_iomap(np, 0);
WARN_ON(!base); WARN_ON(!base);
......
...@@ -142,6 +142,7 @@ extern int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode); ...@@ -142,6 +142,7 @@ extern int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode);
extern void imx6q_clock_map_io(void); extern void imx6q_clock_map_io(void);
extern void imx_cpu_die(unsigned int cpu); extern void imx_cpu_die(unsigned int cpu);
extern int imx_cpu_kill(unsigned int cpu);
#ifdef CONFIG_PM #ifdef CONFIG_PM
extern void imx6q_pm_init(void); extern void imx6q_pm_init(void);
......
...@@ -54,7 +54,7 @@ struct platform_device *__init imx_add_imx_fb( ...@@ -54,7 +54,7 @@ struct platform_device *__init imx_add_imx_fb(
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
}, },
}; };
return imx_add_platform_device_dmamask("imx-fb", 0, return imx_add_platform_device_dmamask(data->devid, 0,
res, ARRAY_SIZE(res), res, ARRAY_SIZE(res),
pdata, sizeof(*pdata), DMA_BIT_MASK(32)); pdata, sizeof(*pdata), DMA_BIT_MASK(32));
} }
...@@ -46,9 +46,11 @@ static inline void cpu_enter_lowpower(void) ...@@ -46,9 +46,11 @@ static inline void cpu_enter_lowpower(void)
void imx_cpu_die(unsigned int cpu) void imx_cpu_die(unsigned int cpu)
{ {
cpu_enter_lowpower(); cpu_enter_lowpower();
imx_enable_cpu(cpu, false); cpu_do_idle();
}
/* spin here until hardware takes it down */ int imx_cpu_kill(unsigned int cpu)
while (1) {
; imx_enable_cpu(cpu, false);
return 1;
} }
...@@ -22,8 +22,7 @@ ...@@ -22,8 +22,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/genalloc.h> #include <linux/genalloc.h>
#include "linux/platform_data/imx-iram.h"
#include "iram.h"
static unsigned long iram_phys_base; static unsigned long iram_phys_base;
static void __iomem *iram_virt_base; static void __iomem *iram_virt_base;
......
...@@ -92,5 +92,6 @@ struct smp_operations imx_smp_ops __initdata = { ...@@ -92,5 +92,6 @@ struct smp_operations imx_smp_ops __initdata = {
.smp_boot_secondary = imx_boot_secondary, .smp_boot_secondary = imx_boot_secondary,
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
.cpu_die = imx_cpu_die, .cpu_die = imx_cpu_die,
.cpu_kill = imx_cpu_kill,
#endif #endif
}; };
...@@ -41,6 +41,7 @@ static int imx6q_pm_enter(suspend_state_t state) ...@@ -41,6 +41,7 @@ static int imx6q_pm_enter(suspend_state_t state)
cpu_suspend(0, imx6q_suspend_finish); cpu_suspend(0, imx6q_suspend_finish);
imx_smp_prepare(); imx_smp_prepare();
imx_gpc_post_resume(); imx_gpc_post_resume();
imx6q_set_lpm(WAIT_CLOCKED);
break; break;
default: default:
return -EINVAL; return -EINVAL;
......
...@@ -475,13 +475,12 @@ int __init pci_v3_setup(int nr, struct pci_sys_data *sys) ...@@ -475,13 +475,12 @@ int __init pci_v3_setup(int nr, struct pci_sys_data *sys)
{ {
int ret = 0; int ret = 0;
if (!ap_syscon_base)
return -EINVAL;
if (nr == 0) { if (nr == 0) {
sys->mem_offset = PHYS_PCI_MEM_BASE; sys->mem_offset = PHYS_PCI_MEM_BASE;
ret = pci_v3_setup_resources(sys); ret = pci_v3_setup_resources(sys);
/* Remap the Integrator system controller */
ap_syscon_base = ioremap(INTEGRATOR_SC_BASE, 0x100);
if (!ap_syscon_base)
return -EINVAL;
} }
return ret; return ret;
...@@ -497,6 +496,13 @@ void __init pci_v3_preinit(void) ...@@ -497,6 +496,13 @@ void __init pci_v3_preinit(void)
unsigned int temp; unsigned int temp;
int ret; int ret;
/* Remap the Integrator system controller */
ap_syscon_base = ioremap(INTEGRATOR_SC_BASE, 0x100);
if (!ap_syscon_base) {
pr_err("unable to remap the AP syscon for PCIv3\n");
return;
}
pcibios_min_mem = 0x00100000; pcibios_min_mem = 0x00100000;
/* /*
......
...@@ -18,47 +18,11 @@ ...@@ -18,47 +18,11 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/of.h> #include <linux/of.h>
#include "common.h" #include "common.h"
#include "mpp.h"
static struct mv643xx_eth_platform_data ns2_ge00_data = { static struct mv643xx_eth_platform_data ns2_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(8), .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 #define NS2_GPIO_POWER_OFF 31
static void ns2_power_off(void) static void ns2_power_off(void)
...@@ -71,8 +35,6 @@ void __init ns2_init(void) ...@@ -71,8 +35,6 @@ void __init ns2_init(void)
/* /*
* Basic setup. Needs to be called early. * Basic setup. Needs to be called early.
*/ */
kirkwood_mpp_conf(ns2_mpp_config);
if (of_machine_is_compatible("lacie,netspace_lite_v2") || if (of_machine_is_compatible("lacie,netspace_lite_v2") ||
of_machine_is_compatible("lacie,netspace_mini_v2")) of_machine_is_compatible("lacie,netspace_mini_v2"))
ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0);
......
ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \
-I$(srctree)/arch/arm/plat-orion/include -I$(srctree)/arch/arm/plat-orion/include
AFLAGS_coherency_ll.o := -Wa,-march=armv7-a
obj-y += system-controller.o obj-y += system-controller.o
obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o irq-armada-370-xp.o addr-map.o coherency.o coherency_ll.o pmsu.o obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o irq-armada-370-xp.o addr-map.o coherency.o coherency_ll.o pmsu.o
obj-$(CONFIG_SMP) += platsmp.o headsmp.o obj-$(CONFIG_SMP) += platsmp.o headsmp.o
......
...@@ -397,6 +397,12 @@ static struct omap_board_mux board_mux[] __initdata = { ...@@ -397,6 +397,12 @@ static struct omap_board_mux board_mux[] __initdata = {
OMAP_PULL_ENA), OMAP_PULL_ENA),
OMAP4_MUX(ABE_MCBSP1_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), OMAP4_MUX(ABE_MCBSP1_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
/* UART2 - BT/FM/GPS shared transport */
OMAP4_MUX(UART2_CTS, OMAP_PIN_INPUT | OMAP_MUX_MODE0),
OMAP4_MUX(UART2_RTS, OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
OMAP4_MUX(UART2_RX, OMAP_PIN_INPUT | OMAP_MUX_MODE0),
OMAP4_MUX(UART2_TX, OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
{ .reg_offset = OMAP_MUX_TERMINATOR }, { .reg_offset = OMAP_MUX_TERMINATOR },
}; };
......
...@@ -1935,6 +1935,8 @@ int __init omap2420_clk_init(void) ...@@ -1935,6 +1935,8 @@ int __init omap2420_clk_init(void)
omap2_init_clk_hw_omap_clocks(c->lk.clk); omap2_init_clk_hw_omap_clocks(c->lk.clk);
} }
omap2xxx_clkt_vps_late_init();
omap2_clk_disable_autoidle_all(); omap2_clk_disable_autoidle_all();
omap2_clk_enable_init_clocks(enable_init_clks, omap2_clk_enable_init_clocks(enable_init_clks,
......
...@@ -2050,6 +2050,8 @@ int __init omap2430_clk_init(void) ...@@ -2050,6 +2050,8 @@ int __init omap2430_clk_init(void)
omap2_init_clk_hw_omap_clocks(c->lk.clk); omap2_init_clk_hw_omap_clocks(c->lk.clk);
} }
omap2xxx_clkt_vps_late_init();
omap2_clk_disable_autoidle_all(); omap2_clk_disable_autoidle_all();
omap2_clk_enable_init_clocks(enable_init_clks, omap2_clk_enable_init_clocks(enable_init_clks,
......
...@@ -2026,14 +2026,13 @@ int __init omap4xxx_clk_init(void) ...@@ -2026,14 +2026,13 @@ int __init omap4xxx_clk_init(void)
* On OMAP4460 the ABE DPLL fails to turn on if in idle low-power * On OMAP4460 the ABE DPLL fails to turn on if in idle low-power
* state when turning the ABE clock domain. Workaround this by * state when turning the ABE clock domain. Workaround this by
* locking the ABE DPLL on boot. * locking the ABE DPLL on boot.
* Lock the ABE DPLL in any case to avoid issues with audio.
*/ */
if (cpu_is_omap446x()) {
rc = clk_set_parent(&abe_dpll_refclk_mux_ck, &sys_32k_ck); rc = clk_set_parent(&abe_dpll_refclk_mux_ck, &sys_32k_ck);
if (!rc) if (!rc)
rc = clk_set_rate(&dpll_abe_ck, OMAP4_DPLL_ABE_DEFFREQ); rc = clk_set_rate(&dpll_abe_ck, OMAP4_DPLL_ABE_DEFFREQ);
if (rc) if (rc)
pr_err("%s: failed to configure ABE DPLL!\n", __func__); pr_err("%s: failed to configure ABE DPLL!\n", __func__);
}
return 0; return 0;
} }
...@@ -639,7 +639,7 @@ static int count_ocp2scp_devices(struct omap_ocp2scp_dev *ocp2scp_dev) ...@@ -639,7 +639,7 @@ static int count_ocp2scp_devices(struct omap_ocp2scp_dev *ocp2scp_dev)
return cnt; return cnt;
} }
static void omap_init_ocp2scp(void) static void __init omap_init_ocp2scp(void)
{ {
struct omap_hwmod *oh; struct omap_hwmod *oh;
struct platform_device *pdev; struct platform_device *pdev;
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/platform_data/omap_drm.h> #include <linux/platform_data/omap_drm.h>
#include "soc.h"
#include "omap_device.h" #include "omap_device.h"
#include "omap_hwmod.h" #include "omap_hwmod.h"
...@@ -56,7 +57,7 @@ static int __init omap_init_drm(void) ...@@ -56,7 +57,7 @@ static int __init omap_init_drm(void)
oh->name); oh->name);
} }
platform_data.omaprev = GET_OMAP_REVISION(); platform_data.omaprev = GET_OMAP_TYPE;
return platform_device_register(&omap_drm_device); return platform_device_register(&omap_drm_device);
......
...@@ -2132,8 +2132,12 @@ static struct omap_hwmod omap44xx_mcpdm_hwmod = { ...@@ -2132,8 +2132,12 @@ static struct omap_hwmod omap44xx_mcpdm_hwmod = {
* currently reset very early during boot, before I2C is * currently reset very early during boot, before I2C is
* available, so it doesn't seem that we have any choice in * available, so it doesn't seem that we have any choice in
* the kernel other than to avoid resetting it. * the kernel other than to avoid resetting it.
*
* Also, McPDM needs to be configured to NO_IDLE mode when it
* is in used otherwise vital clocks will be gated which
* results 'slow motion' audio playback.
*/ */
.flags = HWMOD_EXT_OPT_MAIN_CLK, .flags = HWMOD_EXT_OPT_MAIN_CLK | HWMOD_SWSUP_SIDLE,
.mpu_irqs = omap44xx_mcpdm_irqs, .mpu_irqs = omap44xx_mcpdm_irqs,
.sdma_reqs = omap44xx_mcpdm_sdma_reqs, .sdma_reqs = omap44xx_mcpdm_sdma_reqs,
.main_clk = "mcpdm_fck", .main_clk = "mcpdm_fck",
......
...@@ -165,15 +165,11 @@ static struct device_node * __init omap_get_timer_dt(struct of_device_id *match, ...@@ -165,15 +165,11 @@ static struct device_node * __init omap_get_timer_dt(struct of_device_id *match,
struct device_node *np; struct device_node *np;
for_each_matching_node(np, match) { for_each_matching_node(np, match) {
if (!of_device_is_available(np)) { if (!of_device_is_available(np))
of_node_put(np);
continue; continue;
}
if (property && !of_get_property(np, property, NULL)) { if (property && !of_get_property(np, property, NULL))
of_node_put(np);
continue; continue;
}
of_add_property(np, &device_disabled); of_add_property(np, &device_disabled);
return np; return np;
......
...@@ -47,7 +47,7 @@ static struct spi_board_info wm1253_devs[] = { ...@@ -47,7 +47,7 @@ static struct spi_board_info wm1253_devs[] = {
.bus_num = 0, .bus_num = 0,
.chip_select = 0, .chip_select = 0,
.mode = SPI_MODE_0, .mode = SPI_MODE_0,
.irq = S3C_EINT(5), .irq = S3C_EINT(4),
.controller_data = &wm0010_spi_csinfo, .controller_data = &wm0010_spi_csinfo,
.platform_data = &wm0010_pdata, .platform_data = &wm0010_pdata,
}, },
......
...@@ -338,8 +338,10 @@ int __init s3c64xx_pm_init(void) ...@@ -338,8 +338,10 @@ int __init s3c64xx_pm_init(void)
for (i = 0; i < ARRAY_SIZE(s3c64xx_pm_domains); i++) for (i = 0; i < ARRAY_SIZE(s3c64xx_pm_domains); i++)
pm_genpd_init(&s3c64xx_pm_domains[i]->pd, NULL, false); pm_genpd_init(&s3c64xx_pm_domains[i]->pd, NULL, false);
#ifdef CONFIG_S3C_DEV_FB
if (dev_get_platdata(&s3c_device_fb.dev)) if (dev_get_platdata(&s3c_device_fb.dev))
pm_genpd_add_device(&s3c64xx_pm_f.pd, &s3c_device_fb.dev); pm_genpd_add_device(&s3c64xx_pm_f.pd, &s3c_device_fb.dev);
#endif
return 0; return 0;
} }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
*/ */
ENTRY(versatile_secondary_startup) ENTRY(versatile_secondary_startup)
mrc p15, 0, r0, c0, c0, 5 mrc p15, 0, r0, c0, c0, 5
and r0, r0, #15 bic r0, #0xff000000
adr r4, 1f adr r4, 1f
ldmia r4, {r5, r6} ldmia r4, {r5, r6}
sub r4, r4, r5 sub r4, r4, r5
......
...@@ -124,7 +124,7 @@ void __init of_cpu_clk_setup(struct device_node *node) ...@@ -124,7 +124,7 @@ void __init of_cpu_clk_setup(struct device_node *node)
clks = kzalloc(ncpus * sizeof(*clks), GFP_KERNEL); clks = kzalloc(ncpus * sizeof(*clks), GFP_KERNEL);
if (WARN_ON(!clks)) if (WARN_ON(!clks))
return; goto clks_out;
for_each_node_by_type(dn, "cpu") { for_each_node_by_type(dn, "cpu") {
struct clk_init_data init; struct clk_init_data init;
...@@ -134,11 +134,11 @@ void __init of_cpu_clk_setup(struct device_node *node) ...@@ -134,11 +134,11 @@ void __init of_cpu_clk_setup(struct device_node *node)
int cpu, err; int cpu, err;
if (WARN_ON(!clk_name)) if (WARN_ON(!clk_name))
return; goto bail_out;
err = of_property_read_u32(dn, "reg", &cpu); err = of_property_read_u32(dn, "reg", &cpu);
if (WARN_ON(err)) if (WARN_ON(err))
return; goto bail_out;
sprintf(clk_name, "cpu%d", cpu); sprintf(clk_name, "cpu%d", cpu);
parent_clk = of_clk_get(node, 0); parent_clk = of_clk_get(node, 0);
...@@ -167,6 +167,9 @@ void __init of_cpu_clk_setup(struct device_node *node) ...@@ -167,6 +167,9 @@ void __init of_cpu_clk_setup(struct device_node *node)
return; return;
bail_out: bail_out:
kfree(clks); kfree(clks);
while(ncpus--)
kfree(cpuclk[ncpus].clk_name);
clks_out:
kfree(cpuclk); kfree(cpuclk);
} }
......
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/videodev2.h> #include <linux/videodev2.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/platform_data/imx-iram.h>
#include <mach/iram.h>
#include <media/v4l2-ctrls.h> #include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h> #include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h> #include <media/v4l2-ioctl.h>
......
...@@ -313,19 +313,11 @@ static void vexpress_sysreg_config_complete(unsigned long data) ...@@ -313,19 +313,11 @@ static void vexpress_sysreg_config_complete(unsigned long data)
} }
void __init vexpress_sysreg_early_init(void __iomem *base) void __init vexpress_sysreg_setup(struct device_node *node)
{ {
struct device_node *node = of_find_compatible_node(NULL, NULL, if (WARN_ON(!vexpress_sysreg_base))
"arm,vexpress-sysreg");
if (node)
base = of_iomap(node, 0);
if (WARN_ON(!base))
return; return;
vexpress_sysreg_base = base;
if (readl(vexpress_sysreg_base + SYS_MISC) & SYS_MISC_MASTERSITE) if (readl(vexpress_sysreg_base + SYS_MISC) & SYS_MISC_MASTERSITE)
vexpress_master_site = VEXPRESS_SITE_DB2; vexpress_master_site = VEXPRESS_SITE_DB2;
else else
...@@ -336,9 +328,23 @@ void __init vexpress_sysreg_early_init(void __iomem *base) ...@@ -336,9 +328,23 @@ void __init vexpress_sysreg_early_init(void __iomem *base)
WARN_ON(!vexpress_sysreg_config_bridge); WARN_ON(!vexpress_sysreg_config_bridge);
} }
void __init vexpress_sysreg_early_init(void __iomem *base)
{
vexpress_sysreg_base = base;
vexpress_sysreg_setup(NULL);
}
void __init vexpress_sysreg_of_early_init(void) void __init vexpress_sysreg_of_early_init(void)
{ {
vexpress_sysreg_early_init(NULL); struct device_node *node = of_find_compatible_node(NULL, NULL,
"arm,vexpress-sysreg");
if (node) {
vexpress_sysreg_base = of_iomap(node, 0);
vexpress_sysreg_setup(node);
} else {
pr_info("vexpress-sysreg: No Device Tree node found.");
}
} }
...@@ -426,9 +432,11 @@ static int vexpress_sysreg_probe(struct platform_device *pdev) ...@@ -426,9 +432,11 @@ static int vexpress_sysreg_probe(struct platform_device *pdev)
return -EBUSY; return -EBUSY;
} }
if (!vexpress_sysreg_base) if (!vexpress_sysreg_base) {
vexpress_sysreg_base = devm_ioremap(&pdev->dev, res->start, vexpress_sysreg_base = devm_ioremap(&pdev->dev, res->start,
resource_size(res)); resource_size(res));
vexpress_sysreg_setup(pdev->dev.of_node);
}
if (!vexpress_sysreg_base) { if (!vexpress_sysreg_base) {
dev_err(&pdev->dev, "Failed to obtain base address!\n"); dev_err(&pdev->dev, "Failed to obtain base address!\n");
......
...@@ -50,8 +50,6 @@ struct mvsd_host { ...@@ -50,8 +50,6 @@ struct mvsd_host {
struct timer_list timer; struct timer_list timer;
struct mmc_host *mmc; struct mmc_host *mmc;
struct device *dev; struct device *dev;
struct resource *res;
int irq;
struct clk *clk; struct clk *clk;
int gpio_card_detect; int gpio_card_detect;
int gpio_write_protect; int gpio_write_protect;
...@@ -718,10 +716,6 @@ static int __init mvsd_probe(struct platform_device *pdev) ...@@ -718,10 +716,6 @@ static int __init mvsd_probe(struct platform_device *pdev)
if (!r || irq < 0 || !mvsd_data) if (!r || irq < 0 || !mvsd_data)
return -ENXIO; return -ENXIO;
r = request_mem_region(r->start, SZ_1K, DRIVER_NAME);
if (!r)
return -EBUSY;
mmc = mmc_alloc_host(sizeof(struct mvsd_host), &pdev->dev); mmc = mmc_alloc_host(sizeof(struct mvsd_host), &pdev->dev);
if (!mmc) { if (!mmc) {
ret = -ENOMEM; ret = -ENOMEM;
...@@ -731,8 +725,8 @@ static int __init mvsd_probe(struct platform_device *pdev) ...@@ -731,8 +725,8 @@ static int __init mvsd_probe(struct platform_device *pdev)
host = mmc_priv(mmc); host = mmc_priv(mmc);
host->mmc = mmc; host->mmc = mmc;
host->dev = &pdev->dev; host->dev = &pdev->dev;
host->res = r;
host->base_clock = mvsd_data->clock / 2; host->base_clock = mvsd_data->clock / 2;
host->clk = ERR_PTR(-EINVAL);
mmc->ops = &mvsd_ops; mmc->ops = &mvsd_ops;
...@@ -752,7 +746,7 @@ static int __init mvsd_probe(struct platform_device *pdev) ...@@ -752,7 +746,7 @@ static int __init mvsd_probe(struct platform_device *pdev)
spin_lock_init(&host->lock); spin_lock_init(&host->lock);
host->base = ioremap(r->start, SZ_4K); host->base = devm_request_and_ioremap(&pdev->dev, r);
if (!host->base) { if (!host->base) {
ret = -ENOMEM; ret = -ENOMEM;
goto out; goto out;
...@@ -765,44 +759,45 @@ static int __init mvsd_probe(struct platform_device *pdev) ...@@ -765,44 +759,45 @@ static int __init mvsd_probe(struct platform_device *pdev)
mvsd_power_down(host); mvsd_power_down(host);
ret = request_irq(irq, mvsd_irq, 0, DRIVER_NAME, host); ret = devm_request_irq(&pdev->dev, irq, mvsd_irq, 0, DRIVER_NAME, host);
if (ret) { if (ret) {
pr_err("%s: cannot assign irq %d\n", DRIVER_NAME, irq); pr_err("%s: cannot assign irq %d\n", DRIVER_NAME, irq);
goto out; goto out;
} else }
host->irq = irq;
/* Not all platforms can gate the clock, so it is not /* Not all platforms can gate the clock, so it is not
an error if the clock does not exists. */ an error if the clock does not exists. */
host->clk = clk_get(&pdev->dev, NULL); host->clk = devm_clk_get(&pdev->dev, NULL);
if (!IS_ERR(host->clk)) { if (!IS_ERR(host->clk))
clk_prepare_enable(host->clk); clk_prepare_enable(host->clk);
}
if (mvsd_data->gpio_card_detect) { if (mvsd_data->gpio_card_detect) {
ret = gpio_request(mvsd_data->gpio_card_detect, ret = devm_gpio_request_one(&pdev->dev,
DRIVER_NAME " cd"); mvsd_data->gpio_card_detect,
GPIOF_IN, DRIVER_NAME " cd");
if (ret == 0) { if (ret == 0) {
gpio_direction_input(mvsd_data->gpio_card_detect);
irq = gpio_to_irq(mvsd_data->gpio_card_detect); irq = gpio_to_irq(mvsd_data->gpio_card_detect);
ret = request_irq(irq, mvsd_card_detect_irq, ret = devm_request_irq(&pdev->dev, irq,
IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING, mvsd_card_detect_irq,
IRQ_TYPE_EDGE_RISING |
IRQ_TYPE_EDGE_FALLING,
DRIVER_NAME " cd", host); DRIVER_NAME " cd", host);
if (ret == 0) if (ret == 0)
host->gpio_card_detect = host->gpio_card_detect =
mvsd_data->gpio_card_detect; mvsd_data->gpio_card_detect;
else else
gpio_free(mvsd_data->gpio_card_detect); devm_gpio_free(&pdev->dev,
mvsd_data->gpio_card_detect);
} }
} }
if (!host->gpio_card_detect) if (!host->gpio_card_detect)
mmc->caps |= MMC_CAP_NEEDS_POLL; mmc->caps |= MMC_CAP_NEEDS_POLL;
if (mvsd_data->gpio_write_protect) { if (mvsd_data->gpio_write_protect) {
ret = gpio_request(mvsd_data->gpio_write_protect, ret = devm_gpio_request_one(&pdev->dev,
DRIVER_NAME " wp"); mvsd_data->gpio_write_protect,
GPIOF_IN, DRIVER_NAME " wp");
if (ret == 0) { if (ret == 0) {
gpio_direction_input(mvsd_data->gpio_write_protect);
host->gpio_write_protect = host->gpio_write_protect =
mvsd_data->gpio_write_protect; mvsd_data->gpio_write_protect;
} }
...@@ -824,26 +819,11 @@ static int __init mvsd_probe(struct platform_device *pdev) ...@@ -824,26 +819,11 @@ static int __init mvsd_probe(struct platform_device *pdev)
return 0; return 0;
out: out:
if (host) { if (mmc) {
if (host->irq) if (!IS_ERR(host->clk))
free_irq(host->irq, host);
if (host->gpio_card_detect) {
free_irq(gpio_to_irq(host->gpio_card_detect), host);
gpio_free(host->gpio_card_detect);
}
if (host->gpio_write_protect)
gpio_free(host->gpio_write_protect);
if (host->base)
iounmap(host->base);
}
if (r)
release_resource(r);
if (mmc)
if (!IS_ERR_OR_NULL(host->clk)) {
clk_disable_unprepare(host->clk); clk_disable_unprepare(host->clk);
clk_put(host->clk);
}
mmc_free_host(mmc); mmc_free_host(mmc);
}
return ret; return ret;
} }
...@@ -852,28 +832,16 @@ static int __exit mvsd_remove(struct platform_device *pdev) ...@@ -852,28 +832,16 @@ static int __exit mvsd_remove(struct platform_device *pdev)
{ {
struct mmc_host *mmc = platform_get_drvdata(pdev); struct mmc_host *mmc = platform_get_drvdata(pdev);
if (mmc) {
struct mvsd_host *host = mmc_priv(mmc); struct mvsd_host *host = mmc_priv(mmc);
if (host->gpio_card_detect) {
free_irq(gpio_to_irq(host->gpio_card_detect), host);
gpio_free(host->gpio_card_detect);
}
mmc_remove_host(mmc); mmc_remove_host(mmc);
free_irq(host->irq, host);
if (host->gpio_write_protect)
gpio_free(host->gpio_write_protect);
del_timer_sync(&host->timer); del_timer_sync(&host->timer);
mvsd_power_down(host); mvsd_power_down(host);
iounmap(host->base);
release_resource(host->res);
if (!IS_ERR(host->clk)) { if (!IS_ERR(host->clk))
clk_disable_unprepare(host->clk); clk_disable_unprepare(host->clk);
clk_put(host->clk);
}
mmc_free_host(mmc); mmc_free_host(mmc);
}
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
return 0; return 0;
} }
......
...@@ -139,6 +139,7 @@ struct imxfb_info { ...@@ -139,6 +139,7 @@ struct imxfb_info {
struct clk *clk_ahb; struct clk *clk_ahb;
struct clk *clk_per; struct clk *clk_per;
enum imxfb_type devtype; enum imxfb_type devtype;
bool enabled;
/* /*
* These are the addresses we mapped * These are the addresses we mapped
...@@ -536,6 +537,10 @@ static void imxfb_exit_backlight(struct imxfb_info *fbi) ...@@ -536,6 +537,10 @@ static void imxfb_exit_backlight(struct imxfb_info *fbi)
static void imxfb_enable_controller(struct imxfb_info *fbi) static void imxfb_enable_controller(struct imxfb_info *fbi)
{ {
if (fbi->enabled)
return;
pr_debug("Enabling LCD controller\n"); pr_debug("Enabling LCD controller\n");
writel(fbi->screen_dma, fbi->regs + LCDC_SSA); writel(fbi->screen_dma, fbi->regs + LCDC_SSA);
...@@ -556,6 +561,7 @@ static void imxfb_enable_controller(struct imxfb_info *fbi) ...@@ -556,6 +561,7 @@ static void imxfb_enable_controller(struct imxfb_info *fbi)
clk_prepare_enable(fbi->clk_ipg); clk_prepare_enable(fbi->clk_ipg);
clk_prepare_enable(fbi->clk_ahb); clk_prepare_enable(fbi->clk_ahb);
clk_prepare_enable(fbi->clk_per); clk_prepare_enable(fbi->clk_per);
fbi->enabled = true;
if (fbi->backlight_power) if (fbi->backlight_power)
fbi->backlight_power(1); fbi->backlight_power(1);
...@@ -565,6 +571,9 @@ static void imxfb_enable_controller(struct imxfb_info *fbi) ...@@ -565,6 +571,9 @@ static void imxfb_enable_controller(struct imxfb_info *fbi)
static void imxfb_disable_controller(struct imxfb_info *fbi) static void imxfb_disable_controller(struct imxfb_info *fbi)
{ {
if (!fbi->enabled)
return;
pr_debug("Disabling LCD controller\n"); pr_debug("Disabling LCD controller\n");
if (fbi->backlight_power) if (fbi->backlight_power)
...@@ -575,6 +584,7 @@ static void imxfb_disable_controller(struct imxfb_info *fbi) ...@@ -575,6 +584,7 @@ static void imxfb_disable_controller(struct imxfb_info *fbi)
clk_disable_unprepare(fbi->clk_per); clk_disable_unprepare(fbi->clk_per);
clk_disable_unprepare(fbi->clk_ipg); clk_disable_unprepare(fbi->clk_ipg);
clk_disable_unprepare(fbi->clk_ahb); clk_disable_unprepare(fbi->clk_ahb);
fbi->enabled = false;
writel(0, fbi->regs + LCDC_RMCR); writel(0, fbi->regs + LCDC_RMCR);
} }
...@@ -729,6 +739,8 @@ static int __init imxfb_init_fbinfo(struct platform_device *pdev) ...@@ -729,6 +739,8 @@ static int __init imxfb_init_fbinfo(struct platform_device *pdev)
memset(fbi, 0, sizeof(struct imxfb_info)); memset(fbi, 0, sizeof(struct imxfb_info));
fbi->devtype = pdev->id_entry->driver_data;
strlcpy(info->fix.id, IMX_NAME, sizeof(info->fix.id)); strlcpy(info->fix.id, IMX_NAME, sizeof(info->fix.id));
info->fix.type = FB_TYPE_PACKED_PIXELS; info->fix.type = FB_TYPE_PACKED_PIXELS;
...@@ -789,7 +801,6 @@ static int __init imxfb_probe(struct platform_device *pdev) ...@@ -789,7 +801,6 @@ static int __init imxfb_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
fbi = info->par; fbi = info->par;
fbi->devtype = pdev->id_entry->driver_data;
if (!fb_mode) if (!fb_mode)
fb_mode = pdata->mode[0].mode.name; fb_mode = pdata->mode[0].mode.name;
......
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