Commit 2056b7c7 authored by Linus Torvalds's avatar Linus Torvalds

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

Pull ARM SoC fixes from Arnd Bergmann:

 - a couple of OMAP 4.11 regression fixes, including a boot regression
   for SmartReflex, hypervisor mode in thumb2 mode, and reference
   counting of device nodes

 - a fix for cpu_idle on at91

 - minor DT fixes on across several platforms: sunxi, bcm53xx, at91,
   nsp, ns2, ux500, omap

 - a fix to correct an API change in the reset controllers

* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (22 commits)
  arm64: dts: NS2: Add dma-coherent to relevant DT entries
  reset: fix optional reset_control_get stubs to return NULL
  ARM: sun8i: a23/a33: drop bl_en_pin GPIO pinmux in reference design DTSI
  ARM: dts: sun7i: lamobo-r1: Fix CPU port RGMII settings
  ARM: dts: NSP: GPIO reboot open-source
  ARM: at91: pm: cpu_idle: switch DDR to power-down mode
  ARM: dts: add the AB8500 clocks to the device tree
  ARM: dts: imx6sx-udoo-neo: Fix reboot hang
  ARM: sun8i: Fix the mali clock rate
  ARM: dts: BCM5301X: Correct GIC_PPI interrupt flags
  ARM: dts: BCM5301X: Fix memory start address
  ARM: dts: BCM5301X: Fix UARTs on bcm953012k
  Revert "ARM: at91/dt: sama5d2: Use new compatible for ohci node"
  ARM: OMAP2+: Release device node after it is no longer needed.
  ARM: OMAP2+: Fix device node reference counts
  ARM: OMAP2+: Remove legacy gpmc-nand.c
  ARM: OMAP2+: gpmc-onenand: propagate error on initialization failure
  ARM: dts: am335x-pcm953: Fix legacy wakeup source binding
  ARM: omap2plus_defconfig: Enable INPUT_MOUSEDEV as loadable modules
  ARM: dts: am57xx-idk: tpic2810 is on I2C bus, not SPI
  ...
parents 42ea16f8 0fa974b8
...@@ -63,14 +63,14 @@ button@0 { ...@@ -63,14 +63,14 @@ button@0 {
label = "home"; label = "home";
linux,code = <KEY_HOME>; linux,code = <KEY_HOME>;
gpios = <&gpio3 7 GPIO_ACTIVE_HIGH>; gpios = <&gpio3 7 GPIO_ACTIVE_HIGH>;
gpio-key,wakeup; wakeup-source;
}; };
button@1 { button@1 {
label = "menu"; label = "menu";
linux,code = <KEY_MENU>; linux,code = <KEY_MENU>;
gpios = <&gpio3 8 GPIO_ACTIVE_HIGH>; gpios = <&gpio3 8 GPIO_ACTIVE_HIGH>;
gpio-key,wakeup; wakeup-source;
}; };
}; };
......
...@@ -315,6 +315,13 @@ extcon_usb2: tps659038_usb { ...@@ -315,6 +315,13 @@ extcon_usb2: tps659038_usb {
/* ID & VBUS GPIOs provided in board dts */ /* ID & VBUS GPIOs provided in board dts */
}; };
}; };
tpic2810: tpic2810@60 {
compatible = "ti,tpic2810";
reg = <0x60>;
gpio-controller;
#gpio-cells = <2>;
};
}; };
&mcspi3 { &mcspi3 {
...@@ -330,13 +337,6 @@ sn65hvs882: sn65hvs882@0 { ...@@ -330,13 +337,6 @@ sn65hvs882: sn65hvs882@0 {
spi-max-frequency = <1000000>; spi-max-frequency = <1000000>;
spi-cpol; spi-cpol;
}; };
tpic2810: tpic2810@60 {
compatible = "ti,tpic2810";
reg = <0x60>;
gpio-controller;
#gpio-cells = <2>;
};
}; };
&uart3 { &uart3 {
......
...@@ -66,14 +66,14 @@ scu@20000 { ...@@ -66,14 +66,14 @@ scu@20000 {
timer@20200 { timer@20200 {
compatible = "arm,cortex-a9-global-timer"; compatible = "arm,cortex-a9-global-timer";
reg = <0x20200 0x100>; reg = <0x20200 0x100>;
interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>;
clocks = <&periph_clk>; clocks = <&periph_clk>;
}; };
local-timer@20600 { local-timer@20600 {
compatible = "arm,cortex-a9-twd-timer"; compatible = "arm,cortex-a9-twd-timer";
reg = <0x20600 0x100>; reg = <0x20600 0x100>;
interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_PPI 13 IRQ_TYPE_EDGE_RISING>;
clocks = <&periph_clk>; clocks = <&periph_clk>;
}; };
......
...@@ -48,15 +48,14 @@ chosen { ...@@ -48,15 +48,14 @@ chosen {
}; };
memory { memory {
reg = <0x00000000 0x10000000>; reg = <0x80000000 0x10000000>;
}; };
}; };
&uart0 { &uart0 {
clock-frequency = <62499840>; status = "okay";
}; };
&uart1 { &uart1 {
clock-frequency = <62499840>;
status = "okay"; status = "okay";
}; };
...@@ -55,6 +55,7 @@ memory { ...@@ -55,6 +55,7 @@ memory {
gpio-restart { gpio-restart {
compatible = "gpio-restart"; compatible = "gpio-restart";
gpios = <&gpioa 15 GPIO_ACTIVE_LOW>; gpios = <&gpioa 15 GPIO_ACTIVE_LOW>;
open-source;
priority = <200>; priority = <200>;
}; };
}; };
......
...@@ -55,6 +55,7 @@ memory { ...@@ -55,6 +55,7 @@ memory {
gpio-restart { gpio-restart {
compatible = "gpio-restart"; compatible = "gpio-restart";
gpios = <&gpioa 15 GPIO_ACTIVE_LOW>; gpios = <&gpioa 15 GPIO_ACTIVE_LOW>;
open-source;
priority = <200>; priority = <200>;
}; };
}; };
......
...@@ -55,6 +55,7 @@ memory { ...@@ -55,6 +55,7 @@ memory {
gpio-restart { gpio-restart {
compatible = "gpio-restart"; compatible = "gpio-restart";
gpios = <&gpioa 31 GPIO_ACTIVE_LOW>; gpios = <&gpioa 31 GPIO_ACTIVE_LOW>;
open-source;
priority = <200>; priority = <200>;
}; };
}; };
......
...@@ -55,6 +55,7 @@ memory { ...@@ -55,6 +55,7 @@ memory {
gpio-restart { gpio-restart {
compatible = "gpio-restart"; compatible = "gpio-restart";
gpios = <&gpioa 15 GPIO_ACTIVE_LOW>; gpios = <&gpioa 15 GPIO_ACTIVE_LOW>;
open-source;
priority = <200>; priority = <200>;
}; };
}; };
......
...@@ -55,6 +55,7 @@ memory { ...@@ -55,6 +55,7 @@ memory {
gpio-restart { gpio-restart {
compatible = "gpio-restart"; compatible = "gpio-restart";
gpios = <&gpioa 15 GPIO_ACTIVE_LOW>; gpios = <&gpioa 15 GPIO_ACTIVE_LOW>;
open-source;
priority = <200>; priority = <200>;
}; };
}; };
......
...@@ -55,6 +55,7 @@ memory { ...@@ -55,6 +55,7 @@ memory {
gpio-restart { gpio-restart {
compatible = "gpio-restart"; compatible = "gpio-restart";
gpios = <&gpioa 15 GPIO_ACTIVE_LOW>; gpios = <&gpioa 15 GPIO_ACTIVE_LOW>;
open-source;
priority = <200>; priority = <200>;
}; };
}; };
......
...@@ -55,6 +55,7 @@ memory { ...@@ -55,6 +55,7 @@ memory {
gpio-restart { gpio-restart {
compatible = "gpio-restart"; compatible = "gpio-restart";
gpios = <&gpioa 15 GPIO_ACTIVE_LOW>; gpios = <&gpioa 15 GPIO_ACTIVE_LOW>;
open-source;
priority = <200>; priority = <200>;
}; };
}; };
......
...@@ -121,11 +121,6 @@ reg_bt: regulator-bt { ...@@ -121,11 +121,6 @@ reg_bt: regulator-bt {
}; };
}; };
&cpu0 {
arm-supply = <&sw1a_reg>;
soc-supply = <&sw1c_reg>;
};
&fec1 { &fec1 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet1>; pinctrl-0 = <&pinctrl_enet1>;
......
...@@ -266,7 +266,7 @@ ep@15 { ...@@ -266,7 +266,7 @@ ep@15 {
}; };
usb1: ohci@00400000 { usb1: ohci@00400000 {
compatible = "atmel,sama5d2-ohci", "usb-ohci"; compatible = "atmel,at91rm9200-ohci", "usb-ohci";
reg = <0x00400000 0x100000>; reg = <0x00400000 0x100000>;
interrupts = <41 IRQ_TYPE_LEVEL_HIGH 2>; interrupts = <41 IRQ_TYPE_LEVEL_HIGH 2>;
clocks = <&uhphs_clk>, <&uhphs_clk>, <&uhpck>; clocks = <&uhphs_clk>, <&uhphs_clk>, <&uhpck>;
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <dt-bindings/mfd/dbx500-prcmu.h> #include <dt-bindings/mfd/dbx500-prcmu.h>
#include <dt-bindings/arm/ux500_pm_domains.h> #include <dt-bindings/arm/ux500_pm_domains.h>
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/clock/ste-ab8500.h>
#include "skeleton.dtsi" #include "skeleton.dtsi"
/ { / {
...@@ -603,6 +604,11 @@ ab8500 { ...@@ -603,6 +604,11 @@ ab8500 {
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>; #interrupt-cells = <2>;
ab8500_clock: clock-controller {
compatible = "stericsson,ab8500-clk";
#clock-cells = <1>;
};
ab8500_gpio: ab8500-gpio { ab8500_gpio: ab8500-gpio {
compatible = "stericsson,ab8500-gpio"; compatible = "stericsson,ab8500-gpio";
gpio-controller; gpio-controller;
...@@ -686,6 +692,8 @@ ab8500-sysctrl { ...@@ -686,6 +692,8 @@ ab8500-sysctrl {
ab8500-pwm { ab8500-pwm {
compatible = "stericsson,ab8500-pwm"; compatible = "stericsson,ab8500-pwm";
clocks = <&ab8500_clock AB8500_SYSCLK_INT>;
clock-names = "intclk";
}; };
ab8500-debugfs { ab8500-debugfs {
...@@ -700,6 +708,9 @@ codec: ab8500-codec { ...@@ -700,6 +708,9 @@ codec: ab8500-codec {
V-AMIC2-supply = <&ab8500_ldo_anamic2_reg>; V-AMIC2-supply = <&ab8500_ldo_anamic2_reg>;
V-DMIC-supply = <&ab8500_ldo_dmic_reg>; V-DMIC-supply = <&ab8500_ldo_dmic_reg>;
clocks = <&ab8500_clock AB8500_SYSCLK_AUDIO>;
clock-names = "audioclk";
stericsson,earpeice-cmv = <950>; /* Units in mV. */ stericsson,earpeice-cmv = <950>; /* Units in mV. */
}; };
...@@ -1095,6 +1106,14 @@ sdi5_per3@80008000 { ...@@ -1095,6 +1106,14 @@ sdi5_per3@80008000 {
status = "disabled"; status = "disabled";
}; };
sound {
compatible = "stericsson,snd-soc-mop500";
stericsson,cpu-dai = <&msp1 &msp3>;
stericsson,audio-codec = <&codec>;
clocks = <&prcmu_clk PRCMU_SYSCLK>, <&ab8500_clock AB8500_SYSCLK_ULP>, <&ab8500_clock AB8500_SYSCLK_INT>;
clock-names = "sysclk", "ulpclk", "intclk";
};
msp0: msp@80123000 { msp0: msp@80123000 {
compatible = "stericsson,ux500-msp-i2s"; compatible = "stericsson,ux500-msp-i2s";
reg = <0x80123000 0x1000>; reg = <0x80123000 0x1000>;
......
...@@ -186,15 +186,6 @@ sdi4_per2@80114000 { ...@@ -186,15 +186,6 @@ sdi4_per2@80114000 {
status = "okay"; status = "okay";
}; };
sound {
compatible = "stericsson,snd-soc-mop500";
stericsson,cpu-dai = <&msp1 &msp3>;
stericsson,audio-codec = <&codec>;
clocks = <&prcmu_clk PRCMU_SYSCLK>;
clock-names = "sysclk";
};
msp0: msp@80123000 { msp0: msp@80123000 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&msp0_default_mode>; pinctrl-0 = <&msp0_default_mode>;
......
...@@ -159,15 +159,6 @@ gpio@8011e080 { ...@@ -159,15 +159,6 @@ gpio@8011e080 {
"", "", "", "", "", "", "", ""; "", "", "", "", "", "", "", "";
}; };
sound {
compatible = "stericsson,snd-soc-mop500";
stericsson,cpu-dai = <&msp1 &msp3>;
stericsson,audio-codec = <&codec>;
clocks = <&prcmu_clk PRCMU_SYSCLK>;
clock-names = "sysclk";
};
msp0: msp@80123000 { msp0: msp@80123000 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&msp0_default_mode>; pinctrl-0 = <&msp0_default_mode>;
......
...@@ -167,7 +167,7 @@ port8: port@8 { ...@@ -167,7 +167,7 @@ port8: port@8 {
reg = <8>; reg = <8>;
label = "cpu"; label = "cpu";
ethernet = <&gmac>; ethernet = <&gmac>;
phy-mode = "rgmii"; phy-mode = "rgmii-txid";
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
full-duplex; full-duplex;
......
...@@ -495,7 +495,7 @@ mali: gpu@1c40000 { ...@@ -495,7 +495,7 @@ mali: gpu@1c40000 {
resets = <&ccu RST_BUS_GPU>; resets = <&ccu RST_BUS_GPU>;
assigned-clocks = <&ccu CLK_GPU>; assigned-clocks = <&ccu CLK_GPU>;
assigned-clock-rates = <408000000>; assigned-clock-rates = <384000000>;
}; };
gic: interrupt-controller@01c81000 { gic: interrupt-controller@01c81000 {
......
...@@ -50,8 +50,6 @@ aliases { ...@@ -50,8 +50,6 @@ aliases {
backlight: backlight { backlight: backlight {
compatible = "pwm-backlight"; compatible = "pwm-backlight";
pinctrl-names = "default";
pinctrl-0 = <&bl_en_pin>;
pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
default-brightness-level = <8>; default-brightness-level = <8>;
...@@ -93,11 +91,6 @@ &mmc0 { ...@@ -93,11 +91,6 @@ &mmc0 {
}; };
&pio { &pio {
bl_en_pin: bl_en_pin@0 {
pins = "PH6";
function = "gpio_in";
};
mmc0_cd_pin: mmc0_cd_pin@0 { mmc0_cd_pin: mmc0_cd_pin@0 {
pins = "PB4"; pins = "PB4";
function = "gpio_in"; function = "gpio_in";
......
...@@ -188,6 +188,7 @@ CONFIG_WL12XX=m ...@@ -188,6 +188,7 @@ CONFIG_WL12XX=m
CONFIG_WL18XX=m CONFIG_WL18XX=m
CONFIG_WLCORE_SPI=m CONFIG_WLCORE_SPI=m
CONFIG_WLCORE_SDIO=m CONFIG_WLCORE_SDIO=m
CONFIG_INPUT_MOUSEDEV=m
CONFIG_INPUT_JOYDEV=m CONFIG_INPUT_JOYDEV=m
CONFIG_INPUT_EVDEV=m CONFIG_INPUT_EVDEV=m
CONFIG_KEYBOARD_ATKBD=m CONFIG_KEYBOARD_ATKBD=m
......
...@@ -289,6 +289,22 @@ static void at91_ddr_standby(void) ...@@ -289,6 +289,22 @@ static void at91_ddr_standby(void)
at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1); at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1);
} }
static void sama5d3_ddr_standby(void)
{
u32 lpr0;
u32 saved_lpr0;
saved_lpr0 = at91_ramc_read(0, AT91_DDRSDRC_LPR);
lpr0 = saved_lpr0 & ~AT91_DDRSDRC_LPCB;
lpr0 |= AT91_DDRSDRC_LPCB_POWER_DOWN;
at91_ramc_write(0, AT91_DDRSDRC_LPR, lpr0);
cpu_do_idle();
at91_ramc_write(0, AT91_DDRSDRC_LPR, saved_lpr0);
}
/* We manage both DDRAM/SDRAM controllers, we need more than one value to /* We manage both DDRAM/SDRAM controllers, we need more than one value to
* remember. * remember.
*/ */
...@@ -323,7 +339,7 @@ static const struct of_device_id const ramc_ids[] __initconst = { ...@@ -323,7 +339,7 @@ static const struct of_device_id const ramc_ids[] __initconst = {
{ .compatible = "atmel,at91rm9200-sdramc", .data = at91rm9200_standby }, { .compatible = "atmel,at91rm9200-sdramc", .data = at91rm9200_standby },
{ .compatible = "atmel,at91sam9260-sdramc", .data = at91sam9_sdram_standby }, { .compatible = "atmel,at91sam9260-sdramc", .data = at91sam9_sdram_standby },
{ .compatible = "atmel,at91sam9g45-ddramc", .data = at91_ddr_standby }, { .compatible = "atmel,at91sam9g45-ddramc", .data = at91_ddr_standby },
{ .compatible = "atmel,sama5d3-ddramc", .data = at91_ddr_standby }, { .compatible = "atmel,sama5d3-ddramc", .data = sama5d3_ddr_standby },
{ /*sentinel*/ } { /*sentinel*/ }
}; };
......
...@@ -241,6 +241,3 @@ obj-$(CONFIG_MACH_OMAP2_TUSB6010) += usb-tusb6010.o ...@@ -241,6 +241,3 @@ obj-$(CONFIG_MACH_OMAP2_TUSB6010) += usb-tusb6010.o
onenand-$(CONFIG_MTD_ONENAND_OMAP2) := gpmc-onenand.o onenand-$(CONFIG_MTD_ONENAND_OMAP2) := gpmc-onenand.o
obj-y += $(onenand-m) $(onenand-y) obj-y += $(onenand-m) $(onenand-y)
nand-$(CONFIG_MTD_NAND_OMAP2) := gpmc-nand.o
obj-y += $(nand-m) $(nand-y)
/*
* gpmc-nand.c
*
* Copyright (C) 2009 Texas Instruments
* Vimal Singh <vimalsingh@ti.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/omap-gpmc.h>
#include <linux/mtd/nand.h>
#include <linux/platform_data/mtd-nand-omap2.h>
#include <asm/mach/flash.h>
#include "soc.h"
/* minimum size for IO mapping */
#define NAND_IO_SIZE 4
static bool gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt)
{
/* platforms which support all ECC schemes */
if (soc_is_am33xx() || soc_is_am43xx() || cpu_is_omap44xx() ||
soc_is_omap54xx() || soc_is_dra7xx())
return 1;
if (ecc_opt == OMAP_ECC_BCH4_CODE_HW_DETECTION_SW ||
ecc_opt == OMAP_ECC_BCH8_CODE_HW_DETECTION_SW) {
if (cpu_is_omap24xx())
return 0;
else if (cpu_is_omap3630() && (GET_OMAP_REVISION() == 0))
return 0;
else
return 1;
}
/* OMAP3xxx do not have ELM engine, so cannot support ECC schemes
* which require H/W based ECC error detection */
if ((cpu_is_omap34xx() || cpu_is_omap3630()) &&
((ecc_opt == OMAP_ECC_BCH4_CODE_HW) ||
(ecc_opt == OMAP_ECC_BCH8_CODE_HW)))
return 0;
/* legacy platforms support only HAM1 (1-bit Hamming) ECC scheme */
if (ecc_opt == OMAP_ECC_HAM1_CODE_HW ||
ecc_opt == OMAP_ECC_HAM1_CODE_SW)
return 1;
else
return 0;
}
/* This function will go away once the device-tree convertion is complete */
static void gpmc_set_legacy(struct omap_nand_platform_data *gpmc_nand_data,
struct gpmc_settings *s)
{
/* Enable RD PIN Monitoring Reg */
if (gpmc_nand_data->dev_ready) {
s->wait_on_read = true;
s->wait_on_write = true;
}
if (gpmc_nand_data->devsize == NAND_BUSWIDTH_16)
s->device_width = GPMC_DEVWIDTH_16BIT;
else
s->device_width = GPMC_DEVWIDTH_8BIT;
}
int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data,
struct gpmc_timings *gpmc_t)
{
int err = 0;
struct gpmc_settings s;
struct platform_device *pdev;
struct resource gpmc_nand_res[] = {
{ .flags = IORESOURCE_MEM, },
{ .flags = IORESOURCE_IRQ, },
{ .flags = IORESOURCE_IRQ, },
};
BUG_ON(gpmc_nand_data->cs >= GPMC_CS_NUM);
err = gpmc_cs_request(gpmc_nand_data->cs, NAND_IO_SIZE,
(unsigned long *)&gpmc_nand_res[0].start);
if (err < 0) {
pr_err("omap2-gpmc: Cannot request GPMC CS %d, error %d\n",
gpmc_nand_data->cs, err);
return err;
}
gpmc_nand_res[0].end = gpmc_nand_res[0].start + NAND_IO_SIZE - 1;
gpmc_nand_res[1].start = gpmc_get_client_irq(GPMC_IRQ_FIFOEVENTENABLE);
gpmc_nand_res[2].start = gpmc_get_client_irq(GPMC_IRQ_COUNT_EVENT);
memset(&s, 0, sizeof(struct gpmc_settings));
gpmc_set_legacy(gpmc_nand_data, &s);
s.device_nand = true;
if (gpmc_t) {
err = gpmc_cs_set_timings(gpmc_nand_data->cs, gpmc_t, &s);
if (err < 0) {
pr_err("omap2-gpmc: Unable to set gpmc timings: %d\n",
err);
return err;
}
}
err = gpmc_cs_program_settings(gpmc_nand_data->cs, &s);
if (err < 0)
goto out_free_cs;
err = gpmc_configure(GPMC_CONFIG_WP, 0);
if (err < 0)
goto out_free_cs;
if (!gpmc_hwecc_bch_capable(gpmc_nand_data->ecc_opt)) {
pr_err("omap2-nand: Unsupported NAND ECC scheme selected\n");
err = -EINVAL;
goto out_free_cs;
}
pdev = platform_device_alloc("omap2-nand", gpmc_nand_data->cs);
if (pdev) {
err = platform_device_add_resources(pdev, gpmc_nand_res,
ARRAY_SIZE(gpmc_nand_res));
if (!err)
pdev->dev.platform_data = gpmc_nand_data;
} else {
err = -ENOMEM;
}
if (err)
goto out_free_pdev;
err = platform_device_add(pdev);
if (err) {
dev_err(&pdev->dev, "Unable to register NAND device\n");
goto out_free_pdev;
}
return 0;
out_free_pdev:
platform_device_put(pdev);
out_free_cs:
gpmc_cs_free(gpmc_nand_data->cs);
return err;
}
...@@ -367,7 +367,7 @@ static int gpmc_onenand_setup(void __iomem *onenand_base, int *freq_ptr) ...@@ -367,7 +367,7 @@ static int gpmc_onenand_setup(void __iomem *onenand_base, int *freq_ptr)
return ret; return ret;
} }
void gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data) int gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data)
{ {
int err; int err;
struct device *dev = &gpmc_onenand_device.dev; struct device *dev = &gpmc_onenand_device.dev;
...@@ -393,15 +393,17 @@ void gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data) ...@@ -393,15 +393,17 @@ void gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data)
if (err < 0) { if (err < 0) {
dev_err(dev, "Cannot request GPMC CS %d, error %d\n", dev_err(dev, "Cannot request GPMC CS %d, error %d\n",
gpmc_onenand_data->cs, err); gpmc_onenand_data->cs, err);
return; return err;
} }
gpmc_onenand_resource.end = gpmc_onenand_resource.start + gpmc_onenand_resource.end = gpmc_onenand_resource.start +
ONENAND_IO_SIZE - 1; ONENAND_IO_SIZE - 1;
if (platform_device_register(&gpmc_onenand_device) < 0) { err = platform_device_register(&gpmc_onenand_device);
if (err) {
dev_err(dev, "Unable to register OneNAND device\n"); dev_err(dev, "Unable to register OneNAND device\n");
gpmc_cs_free(gpmc_onenand_data->cs); gpmc_cs_free(gpmc_onenand_data->cs);
return;
} }
return err;
} }
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/assembler.h>
#include "omap44xx.h" #include "omap44xx.h"
...@@ -66,7 +67,7 @@ wait_2: ldr r2, =AUX_CORE_BOOT0_PA @ read from AuxCoreBoot0 ...@@ -66,7 +67,7 @@ wait_2: ldr r2, =AUX_CORE_BOOT0_PA @ read from AuxCoreBoot0
cmp r0, r4 cmp r0, r4
bne wait_2 bne wait_2
ldr r12, =API_HYP_ENTRY ldr r12, =API_HYP_ENTRY
adr r0, hyp_boot badr r0, hyp_boot
smc #0 smc #0
hyp_boot: hyp_boot:
b omap_secondary_startup b omap_secondary_startup
......
...@@ -2112,11 +2112,20 @@ static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = { ...@@ -2112,11 +2112,20 @@ static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
}; };
/* L4 CORE -> SR1 interface */ /* L4 CORE -> SR1 interface */
static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
{
.pa_start = OMAP34XX_SR1_BASE,
.pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
.flags = ADDR_TYPE_RT,
},
{ },
};
static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = { static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = {
.master = &omap3xxx_l4_core_hwmod, .master = &omap3xxx_l4_core_hwmod,
.slave = &omap34xx_sr1_hwmod, .slave = &omap34xx_sr1_hwmod,
.clk = "sr_l4_ick", .clk = "sr_l4_ick",
.addr = omap3_sr1_addr_space,
.user = OCP_USER_MPU, .user = OCP_USER_MPU,
}; };
...@@ -2124,15 +2133,25 @@ static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = { ...@@ -2124,15 +2133,25 @@ static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = {
.master = &omap3xxx_l4_core_hwmod, .master = &omap3xxx_l4_core_hwmod,
.slave = &omap36xx_sr1_hwmod, .slave = &omap36xx_sr1_hwmod,
.clk = "sr_l4_ick", .clk = "sr_l4_ick",
.addr = omap3_sr1_addr_space,
.user = OCP_USER_MPU, .user = OCP_USER_MPU,
}; };
/* L4 CORE -> SR1 interface */ /* L4 CORE -> SR1 interface */
static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
{
.pa_start = OMAP34XX_SR2_BASE,
.pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
.flags = ADDR_TYPE_RT,
},
{ },
};
static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = { static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = {
.master = &omap3xxx_l4_core_hwmod, .master = &omap3xxx_l4_core_hwmod,
.slave = &omap34xx_sr2_hwmod, .slave = &omap34xx_sr2_hwmod,
.clk = "sr_l4_ick", .clk = "sr_l4_ick",
.addr = omap3_sr2_addr_space,
.user = OCP_USER_MPU, .user = OCP_USER_MPU,
}; };
...@@ -2140,6 +2159,7 @@ static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = { ...@@ -2140,6 +2159,7 @@ static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = {
.master = &omap3xxx_l4_core_hwmod, .master = &omap3xxx_l4_core_hwmod,
.slave = &omap36xx_sr2_hwmod, .slave = &omap36xx_sr2_hwmod,
.clk = "sr_l4_ick", .clk = "sr_l4_ick",
.addr = omap3_sr2_addr_space,
.user = OCP_USER_MPU, .user = OCP_USER_MPU,
}; };
...@@ -3111,16 +3131,20 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = { ...@@ -3111,16 +3131,20 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = {
* Return: 0 if device named @dev_name is not likely to be accessible, * Return: 0 if device named @dev_name is not likely to be accessible,
* or 1 if it is likely to be accessible. * or 1 if it is likely to be accessible.
*/ */
static int __init omap3xxx_hwmod_is_hs_ip_block_usable(struct device_node *bus, static bool __init omap3xxx_hwmod_is_hs_ip_block_usable(struct device_node *bus,
const char *dev_name) const char *dev_name)
{ {
struct device_node *node;
bool available;
if (!bus) if (!bus)
return (omap_type() == OMAP2_DEVICE_TYPE_GP) ? 1 : 0; return omap_type() == OMAP2_DEVICE_TYPE_GP;
if (of_device_is_available(of_find_node_by_name(bus, dev_name))) node = of_get_child_by_name(bus, dev_name);
return 1; available = of_device_is_available(node);
of_node_put(node);
return 0; return available;
} }
int __init omap3xxx_hwmod_init(void) int __init omap3xxx_hwmod_init(void)
...@@ -3189,15 +3213,20 @@ int __init omap3xxx_hwmod_init(void) ...@@ -3189,15 +3213,20 @@ int __init omap3xxx_hwmod_init(void)
if (h_sham && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "sham")) { if (h_sham && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "sham")) {
r = omap_hwmod_register_links(h_sham); r = omap_hwmod_register_links(h_sham);
if (r < 0) if (r < 0) {
of_node_put(bus);
return r; return r;
} }
}
if (h_aes && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "aes")) { if (h_aes && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "aes")) {
r = omap_hwmod_register_links(h_aes); r = omap_hwmod_register_links(h_aes);
if (r < 0) if (r < 0) {
of_node_put(bus);
return r; return r;
} }
}
of_node_put(bus);
/* /*
* Register hwmod links specific to certain ES levels of a * Register hwmod links specific to certain ES levels of a
......
...@@ -114,6 +114,7 @@ pmu { ...@@ -114,6 +114,7 @@ pmu {
pcie0: pcie@20020000 { pcie0: pcie@20020000 {
compatible = "brcm,iproc-pcie"; compatible = "brcm,iproc-pcie";
reg = <0 0x20020000 0 0x1000>; reg = <0 0x20020000 0 0x1000>;
dma-coherent;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 0>; interrupt-map-mask = <0 0 0 0>;
...@@ -144,6 +145,7 @@ pcie0: pcie@20020000 { ...@@ -144,6 +145,7 @@ pcie0: pcie@20020000 {
pcie4: pcie@50020000 { pcie4: pcie@50020000 {
compatible = "brcm,iproc-pcie"; compatible = "brcm,iproc-pcie";
reg = <0 0x50020000 0 0x1000>; reg = <0 0x50020000 0 0x1000>;
dma-coherent;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 0>; interrupt-map-mask = <0 0 0 0>;
...@@ -174,6 +176,7 @@ pcie4: pcie@50020000 { ...@@ -174,6 +176,7 @@ pcie4: pcie@50020000 {
pcie8: pcie@60c00000 { pcie8: pcie@60c00000 {
compatible = "brcm,iproc-pcie-paxc"; compatible = "brcm,iproc-pcie-paxc";
reg = <0 0x60c00000 0 0x1000>; reg = <0 0x60c00000 0 0x1000>;
dma-coherent;
linux,pci-domain = <8>; linux,pci-domain = <8>;
bus-range = <0x0 0x1>; bus-range = <0x0 0x1>;
...@@ -203,6 +206,7 @@ enet: ethernet@61000000 { ...@@ -203,6 +206,7 @@ enet: ethernet@61000000 {
<0x61030000 0x100>; <0x61030000 0x100>;
reg-names = "amac_base", "idm_base", "nicpm_base"; reg-names = "amac_base", "idm_base", "nicpm_base";
interrupts = <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>;
dma-coherent;
phy-handle = <&gphy0>; phy-handle = <&gphy0>;
phy-mode = "rgmii"; phy-mode = "rgmii";
status = "disabled"; status = "disabled";
...@@ -213,6 +217,7 @@ pdc0: iproc-pdc0@612c0000 { ...@@ -213,6 +217,7 @@ pdc0: iproc-pdc0@612c0000 {
reg = <0x612c0000 0x445>; /* PDC FS0 regs */ reg = <0x612c0000 0x445>; /* PDC FS0 regs */
interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
#mbox-cells = <1>; #mbox-cells = <1>;
dma-coherent;
brcm,rx-status-len = <32>; brcm,rx-status-len = <32>;
brcm,use-bcm-hdr; brcm,use-bcm-hdr;
}; };
...@@ -222,6 +227,7 @@ pdc1: iproc-pdc1@612e0000 { ...@@ -222,6 +227,7 @@ pdc1: iproc-pdc1@612e0000 {
reg = <0x612e0000 0x445>; /* PDC FS1 regs */ reg = <0x612e0000 0x445>; /* PDC FS1 regs */
interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>;
#mbox-cells = <1>; #mbox-cells = <1>;
dma-coherent;
brcm,rx-status-len = <32>; brcm,rx-status-len = <32>;
brcm,use-bcm-hdr; brcm,use-bcm-hdr;
}; };
...@@ -231,6 +237,7 @@ pdc2: iproc-pdc2@61300000 { ...@@ -231,6 +237,7 @@ pdc2: iproc-pdc2@61300000 {
reg = <0x61300000 0x445>; /* PDC FS2 regs */ reg = <0x61300000 0x445>; /* PDC FS2 regs */
interrupts = <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>;
#mbox-cells = <1>; #mbox-cells = <1>;
dma-coherent;
brcm,rx-status-len = <32>; brcm,rx-status-len = <32>;
brcm,use-bcm-hdr; brcm,use-bcm-hdr;
}; };
...@@ -240,6 +247,7 @@ pdc3: iproc-pdc3@61320000 { ...@@ -240,6 +247,7 @@ pdc3: iproc-pdc3@61320000 {
reg = <0x61320000 0x445>; /* PDC FS3 regs */ reg = <0x61320000 0x445>; /* PDC FS3 regs */
interrupts = <GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>;
#mbox-cells = <1>; #mbox-cells = <1>;
dma-coherent;
brcm,rx-status-len = <32>; brcm,rx-status-len = <32>;
brcm,use-bcm-hdr; brcm,use-bcm-hdr;
}; };
...@@ -644,6 +652,7 @@ sata_phy1: sata-phy@1 { ...@@ -644,6 +652,7 @@ sata_phy1: sata-phy@1 {
sata: ahci@663f2000 { sata: ahci@663f2000 {
compatible = "brcm,iproc-ahci", "generic-ahci"; compatible = "brcm,iproc-ahci", "generic-ahci";
reg = <0x663f2000 0x1000>; reg = <0x663f2000 0x1000>;
dma-coherent;
reg-names = "ahci"; reg-names = "ahci";
interrupts = <GIC_SPI 438 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 438 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>; #address-cells = <1>;
...@@ -667,6 +676,7 @@ sdio0: sdhci@66420000 { ...@@ -667,6 +676,7 @@ sdio0: sdhci@66420000 {
compatible = "brcm,sdhci-iproc-cygnus"; compatible = "brcm,sdhci-iproc-cygnus";
reg = <0x66420000 0x100>; reg = <0x66420000 0x100>;
interrupts = <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>;
dma-coherent;
bus-width = <8>; bus-width = <8>;
clocks = <&genpll_sw BCM_NS2_GENPLL_SW_SDIO_CLK>; clocks = <&genpll_sw BCM_NS2_GENPLL_SW_SDIO_CLK>;
status = "disabled"; status = "disabled";
...@@ -676,6 +686,7 @@ sdio1: sdhci@66430000 { ...@@ -676,6 +686,7 @@ sdio1: sdhci@66430000 {
compatible = "brcm,sdhci-iproc-cygnus"; compatible = "brcm,sdhci-iproc-cygnus";
reg = <0x66430000 0x100>; reg = <0x66430000 0x100>;
interrupts = <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>;
dma-coherent;
bus-width = <8>; bus-width = <8>;
clocks = <&genpll_sw BCM_NS2_GENPLL_SW_SDIO_CLK>; clocks = <&genpll_sw BCM_NS2_GENPLL_SW_SDIO_CLK>;
status = "disabled"; status = "disabled";
......
...@@ -1947,9 +1947,7 @@ static int gpmc_probe_onenand_child(struct platform_device *pdev, ...@@ -1947,9 +1947,7 @@ static int gpmc_probe_onenand_child(struct platform_device *pdev,
if (!of_property_read_u32(child, "dma-channel", &val)) if (!of_property_read_u32(child, "dma-channel", &val))
gpmc_onenand_data->dma_channel = val; gpmc_onenand_data->dma_channel = val;
gpmc_onenand_init(gpmc_onenand_data); return gpmc_onenand_init(gpmc_onenand_data);
return 0;
} }
#else #else
static int gpmc_probe_onenand_child(struct platform_device *pdev, static int gpmc_probe_onenand_child(struct platform_device *pdev,
......
...@@ -76,22 +76,12 @@ struct gpmc_timings; ...@@ -76,22 +76,12 @@ struct gpmc_timings;
struct omap_nand_platform_data; struct omap_nand_platform_data;
struct omap_onenand_platform_data; struct omap_onenand_platform_data;
#if IS_ENABLED(CONFIG_MTD_NAND_OMAP2)
extern int gpmc_nand_init(struct omap_nand_platform_data *d,
struct gpmc_timings *gpmc_t);
#else
static inline int gpmc_nand_init(struct omap_nand_platform_data *d,
struct gpmc_timings *gpmc_t)
{
return 0;
}
#endif
#if IS_ENABLED(CONFIG_MTD_ONENAND_OMAP2) #if IS_ENABLED(CONFIG_MTD_ONENAND_OMAP2)
extern void gpmc_onenand_init(struct omap_onenand_platform_data *d); extern int gpmc_onenand_init(struct omap_onenand_platform_data *d);
#else #else
#define board_onenand_data NULL #define board_onenand_data NULL
static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d) static inline int gpmc_onenand_init(struct omap_onenand_platform_data *d)
{ {
return 0;
} }
#endif #endif
...@@ -31,31 +31,26 @@ static inline int device_reset_optional(struct device *dev) ...@@ -31,31 +31,26 @@ static inline int device_reset_optional(struct device *dev)
static inline int reset_control_reset(struct reset_control *rstc) static inline int reset_control_reset(struct reset_control *rstc)
{ {
WARN_ON(1);
return 0; return 0;
} }
static inline int reset_control_assert(struct reset_control *rstc) static inline int reset_control_assert(struct reset_control *rstc)
{ {
WARN_ON(1);
return 0; return 0;
} }
static inline int reset_control_deassert(struct reset_control *rstc) static inline int reset_control_deassert(struct reset_control *rstc)
{ {
WARN_ON(1);
return 0; return 0;
} }
static inline int reset_control_status(struct reset_control *rstc) static inline int reset_control_status(struct reset_control *rstc)
{ {
WARN_ON(1);
return 0; return 0;
} }
static inline void reset_control_put(struct reset_control *rstc) static inline void reset_control_put(struct reset_control *rstc)
{ {
WARN_ON(1);
} }
static inline int __must_check device_reset(struct device *dev) static inline int __must_check device_reset(struct device *dev)
...@@ -74,14 +69,14 @@ static inline struct reset_control *__of_reset_control_get( ...@@ -74,14 +69,14 @@ static inline struct reset_control *__of_reset_control_get(
const char *id, int index, bool shared, const char *id, int index, bool shared,
bool optional) bool optional)
{ {
return ERR_PTR(-ENOTSUPP); return optional ? NULL : ERR_PTR(-ENOTSUPP);
} }
static inline struct reset_control *__devm_reset_control_get( static inline struct reset_control *__devm_reset_control_get(
struct device *dev, const char *id, struct device *dev, const char *id,
int index, bool shared, bool optional) int index, bool shared, bool optional)
{ {
return ERR_PTR(-ENOTSUPP); return optional ? NULL : ERR_PTR(-ENOTSUPP);
} }
#endif /* CONFIG_RESET_CONTROLLER */ #endif /* CONFIG_RESET_CONTROLLER */
......
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