Commit 83692898 authored by Linus Torvalds's avatar Linus Torvalds

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

Pull ARM SoC fixes from Olof Johansson:
 "Here's our last set of fixes for 3.17.  Most of these are for TI
  platforms, fixing some noisy Kconfig issues, runtime clock and power
  issues on several platforms and NAND timings on DRA7.

  There are also a couple of bug fixes for i.MX, one for QCOM and a
 small fix to avoid section mismatch noise on PXA.

  Diffstat looks large, partially due to some tables being updated and
  thus touching many lines.  The qcom gsbi change also restructures
  clock management a bit and thus touches a bunch of lines.

  All in all, a bit more changes than we'd like at this point, but
  nothing stands out as risky either so it seems like the right thing to
  send it up now instead of holding it to the merge window"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  drivers/soc: qcom: do not disable the iface clock in probe
  ARM: imx: fix .is_enabled() of shared gate clock
  ARM: OMAP3: Fix I/O chain clock line assertion timed out error
  ARM: keystone: dts: fix bindings for pcie and usb clock nodes
  bus: omap_l3_noc: Fix connID for OMAP4
  ARM: DT: imx53: fix lvds channel 1 port
  ARM: dts: cm-t54: fix serial console power supply.
  ARM: dts: dra7-evm: Fix NAND GPMC timings
  ARM: pxa: fix section mismatch warning for pxa_timer_nodt_init
  ARM: OMAP: Fix Kconfig warning for omap1
parents 74807afd fa9eb324
...@@ -56,6 +56,9 @@ Required properties: ...@@ -56,6 +56,9 @@ Required properties:
- fsl,data-width : should be <18> or <24> - fsl,data-width : should be <18> or <24>
- port: A port node with endpoint definitions as defined in - port: A port node with endpoint definitions as defined in
Documentation/devicetree/bindings/media/video-interfaces.txt. Documentation/devicetree/bindings/media/video-interfaces.txt.
On i.MX5, the internal two-input-multiplexer is used.
Due to hardware limitations, only one port (port@[0,1])
can be used for each channel (lvds-channel@[0,1], respectively)
On i.MX6, there should be four ports (port@[0-3]) that correspond On i.MX6, there should be four ports (port@[0-3]) that correspond
to the four LVDS multiplexer inputs. to the four LVDS multiplexer inputs.
...@@ -78,6 +81,8 @@ ldb: ldb@53fa8008 { ...@@ -78,6 +81,8 @@ ldb: ldb@53fa8008 {
"di0", "di1"; "di0", "di1";
lvds-channel@0 { lvds-channel@0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>; reg = <0>;
fsl,data-mapping = "spwg"; fsl,data-mapping = "spwg";
fsl,data-width = <24>; fsl,data-width = <24>;
...@@ -86,7 +91,9 @@ ldb: ldb@53fa8008 { ...@@ -86,7 +91,9 @@ ldb: ldb@53fa8008 {
/* ... */ /* ... */
}; };
port { port@0 {
reg = <0>;
lvds0_in: endpoint { lvds0_in: endpoint {
remote-endpoint = <&ipu_di0_lvds0>; remote-endpoint = <&ipu_di0_lvds0>;
}; };
...@@ -94,6 +101,8 @@ ldb: ldb@53fa8008 { ...@@ -94,6 +101,8 @@ ldb: ldb@53fa8008 {
}; };
lvds-channel@1 { lvds-channel@1 {
#address-cells = <1>;
#size-cells = <0>;
reg = <1>; reg = <1>;
fsl,data-mapping = "spwg"; fsl,data-mapping = "spwg";
fsl,data-width = <24>; fsl,data-width = <24>;
...@@ -102,7 +111,9 @@ ldb: ldb@53fa8008 { ...@@ -102,7 +111,9 @@ ldb: ldb@53fa8008 {
/* ... */ /* ... */
}; };
port { port@1 {
reg = <1>;
lvds1_in: endpoint { lvds1_in: endpoint {
remote-endpoint = <&ipu_di1_lvds1>; remote-endpoint = <&ipu_di1_lvds1>;
}; };
......
...@@ -447,22 +447,19 @@ nand@0,0 { ...@@ -447,22 +447,19 @@ nand@0,0 {
gpmc,device-width = <2>; gpmc,device-width = <2>;
gpmc,sync-clk-ps = <0>; gpmc,sync-clk-ps = <0>;
gpmc,cs-on-ns = <0>; gpmc,cs-on-ns = <0>;
gpmc,cs-rd-off-ns = <40>; gpmc,cs-rd-off-ns = <80>;
gpmc,cs-wr-off-ns = <40>; gpmc,cs-wr-off-ns = <80>;
gpmc,adv-on-ns = <0>; gpmc,adv-on-ns = <0>;
gpmc,adv-rd-off-ns = <30>; gpmc,adv-rd-off-ns = <60>;
gpmc,adv-wr-off-ns = <30>; gpmc,adv-wr-off-ns = <60>;
gpmc,we-on-ns = <5>; gpmc,we-on-ns = <10>;
gpmc,we-off-ns = <25>; gpmc,we-off-ns = <50>;
gpmc,oe-on-ns = <2>; gpmc,oe-on-ns = <4>;
gpmc,oe-off-ns = <20>; gpmc,oe-off-ns = <40>;
gpmc,access-ns = <20>; gpmc,access-ns = <40>;
gpmc,wr-access-ns = <40>; gpmc,wr-access-ns = <80>;
gpmc,rd-cycle-ns = <40>; gpmc,rd-cycle-ns = <80>;
gpmc,wr-cycle-ns = <40>; gpmc,wr-cycle-ns = <80>;
gpmc,wait-pin = <0>;
gpmc,wait-on-read;
gpmc,wait-on-write;
gpmc,bus-turnaround-ns = <0>; gpmc,bus-turnaround-ns = <0>;
gpmc,cycle2cycle-delay-ns = <0>; gpmc,cycle2cycle-delay-ns = <0>;
gpmc,clk-activation-ns = <0>; gpmc,clk-activation-ns = <0>;
......
...@@ -423,10 +423,14 @@ ldb: ldb@53fa8008 { ...@@ -423,10 +423,14 @@ ldb: ldb@53fa8008 {
status = "disabled"; status = "disabled";
lvds-channel@0 { lvds-channel@0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>; reg = <0>;
status = "disabled"; status = "disabled";
port { port@0 {
reg = <0>;
lvds0_in: endpoint { lvds0_in: endpoint {
remote-endpoint = <&ipu_di0_lvds0>; remote-endpoint = <&ipu_di0_lvds0>;
}; };
...@@ -434,10 +438,14 @@ lvds0_in: endpoint { ...@@ -434,10 +438,14 @@ lvds0_in: endpoint {
}; };
lvds-channel@1 { lvds-channel@1 {
#address-cells = <1>;
#size-cells = <0>;
reg = <1>; reg = <1>;
status = "disabled"; status = "disabled";
port { port@1 {
reg = <1>;
lvds1_in: endpoint { lvds1_in: endpoint {
remote-endpoint = <&ipu_di1_lvds1>; remote-endpoint = <&ipu_di1_lvds1>;
}; };
......
...@@ -40,7 +40,7 @@ clkusb1: clkusb1 { ...@@ -40,7 +40,7 @@ clkusb1: clkusb1 {
#clock-cells = <0>; #clock-cells = <0>;
compatible = "ti,keystone,psc-clock"; compatible = "ti,keystone,psc-clock";
clocks = <&chipclk16>; clocks = <&chipclk16>;
clock-output-names = "usb"; clock-output-names = "usb1";
reg = <0x02350004 0xb00>, <0x02350000 0x400>; reg = <0x02350004 0xb00>, <0x02350000 0x400>;
reg-names = "control", "domain"; reg-names = "control", "domain";
domain-id = <0>; domain-id = <0>;
...@@ -60,8 +60,8 @@ clkpcie1: clkpcie1 { ...@@ -60,8 +60,8 @@ clkpcie1: clkpcie1 {
#clock-cells = <0>; #clock-cells = <0>;
compatible = "ti,keystone,psc-clock"; compatible = "ti,keystone,psc-clock";
clocks = <&chipclk12>; clocks = <&chipclk12>;
clock-output-names = "pcie"; clock-output-names = "pcie1";
reg = <0x0235006c 0xb00>, <0x02350000 0x400>; reg = <0x0235006c 0xb00>, <0x02350048 0x400>;
reg-names = "control", "domain"; reg-names = "control", "domain";
domain-id = <18>; domain-id = <18>;
}; };
......
...@@ -353,13 +353,12 @@ ldo7_reg: ldo7 { ...@@ -353,13 +353,12 @@ ldo7_reg: ldo7 {
}; };
ldo8_reg: ldo8 { ldo8_reg: ldo8 {
/* VDD_3v0: Does not go anywhere */ /* VDD_3V_GP: act led/serial console */
regulator-name = "ldo8"; regulator-name = "ldo8";
regulator-min-microvolt = <3000000>; regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>; regulator-max-microvolt = <3000000>;
regulator-always-on;
regulator-boot-on; regulator-boot-on;
/* Unused */
status = "disabled";
}; };
ldo9_reg: ldo9 { ldo9_reg: ldo9 {
......
...@@ -97,7 +97,7 @@ static int clk_gate2_is_enabled(struct clk_hw *hw) ...@@ -97,7 +97,7 @@ static int clk_gate2_is_enabled(struct clk_hw *hw)
struct clk_gate2 *gate = to_clk_gate2(hw); struct clk_gate2 *gate = to_clk_gate2(hw);
if (gate->share_count) if (gate->share_count)
return !!(*gate->share_count); return !!__clk_get_enable_count(hw->clk);
else else
return clk_gate2_reg_is_enabled(gate->reg, gate->bit_idx); return clk_gate2_reg_is_enabled(gate->reg, gate->bit_idx);
} }
...@@ -127,10 +127,6 @@ struct clk *clk_register_gate2(struct device *dev, const char *name, ...@@ -127,10 +127,6 @@ struct clk *clk_register_gate2(struct device *dev, const char *name,
gate->bit_idx = bit_idx; gate->bit_idx = bit_idx;
gate->flags = clk_gate2_flags; gate->flags = clk_gate2_flags;
gate->lock = lock; gate->lock = lock;
/* Initialize share_count per hardware state */
if (share_count)
*share_count = clk_gate2_reg_is_enabled(reg, bit_idx) ? 1 : 0;
gate->share_count = share_count; gate->share_count = share_count;
init.name = name; init.name = name;
......
menu "TI OMAP/AM/DM/DRA Family" menu "TI OMAP/AM/DM/DRA Family"
depends on ARCH_MULTI_V6 || ARCH_MULTI_V7 depends on ARCH_MULTI_V6 || ARCH_MULTI_V7
config ARCH_OMAP
bool
config ARCH_OMAP2 config ARCH_OMAP2
bool "TI OMAP2" bool "TI OMAP2"
depends on ARCH_MULTI_V6 depends on ARCH_MULTI_V6
......
...@@ -2065,7 +2065,7 @@ static void _reconfigure_io_chain(void) ...@@ -2065,7 +2065,7 @@ static void _reconfigure_io_chain(void)
spin_lock_irqsave(&io_chain_lock, flags); spin_lock_irqsave(&io_chain_lock, flags);
if (cpu_is_omap34xx() && omap3_has_io_chain_ctrl()) if (cpu_is_omap34xx())
omap3xxx_prm_reconfigure_io_chain(); omap3xxx_prm_reconfigure_io_chain();
else if (cpu_is_omap44xx()) else if (cpu_is_omap44xx())
omap44xx_prm_reconfigure_io_chain(); omap44xx_prm_reconfigure_io_chain();
......
...@@ -45,7 +45,7 @@ static struct omap_prcm_irq_setup omap3_prcm_irq_setup = { ...@@ -45,7 +45,7 @@ static struct omap_prcm_irq_setup omap3_prcm_irq_setup = {
.ocp_barrier = &omap3xxx_prm_ocp_barrier, .ocp_barrier = &omap3xxx_prm_ocp_barrier,
.save_and_clear_irqen = &omap3xxx_prm_save_and_clear_irqen, .save_and_clear_irqen = &omap3xxx_prm_save_and_clear_irqen,
.restore_irqen = &omap3xxx_prm_restore_irqen, .restore_irqen = &omap3xxx_prm_restore_irqen,
.reconfigure_io_chain = &omap3xxx_prm_reconfigure_io_chain, .reconfigure_io_chain = NULL,
}; };
/* /*
...@@ -369,15 +369,30 @@ void __init omap3_prm_init_pm(bool has_uart4, bool has_iva) ...@@ -369,15 +369,30 @@ void __init omap3_prm_init_pm(bool has_uart4, bool has_iva)
} }
/** /**
* omap3xxx_prm_reconfigure_io_chain - clear latches and reconfigure I/O chain * omap3430_pre_es3_1_reconfigure_io_chain - restart wake-up daisy chain
*
* The ST_IO_CHAIN bit does not exist in 3430 before es3.1. The only
* thing we can do is toggle EN_IO bit for earlier omaps.
*/
void omap3430_pre_es3_1_reconfigure_io_chain(void)
{
omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD,
PM_WKEN);
omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD,
PM_WKEN);
omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN);
}
/**
* omap3_prm_reconfigure_io_chain - clear latches and reconfigure I/O chain
* *
* Clear any previously-latched I/O wakeup events and ensure that the * Clear any previously-latched I/O wakeup events and ensure that the
* I/O wakeup gates are aligned with the current mux settings. Works * I/O wakeup gates are aligned with the current mux settings. Works
* by asserting WUCLKIN, waiting for WUCLKOUT to be asserted, and then * by asserting WUCLKIN, waiting for WUCLKOUT to be asserted, and then
* deasserting WUCLKIN and clearing the ST_IO_CHAIN WKST bit. No * deasserting WUCLKIN and clearing the ST_IO_CHAIN WKST bit. No
* return value. * return value. These registers are only available in 3430 es3.1 and later.
*/ */
void omap3xxx_prm_reconfigure_io_chain(void) void omap3_prm_reconfigure_io_chain(void)
{ {
int i = 0; int i = 0;
...@@ -399,6 +414,15 @@ void omap3xxx_prm_reconfigure_io_chain(void) ...@@ -399,6 +414,15 @@ void omap3xxx_prm_reconfigure_io_chain(void)
omap2_prm_read_mod_reg(WKUP_MOD, PM_WKST); omap2_prm_read_mod_reg(WKUP_MOD, PM_WKST);
} }
/**
* omap3xxx_prm_reconfigure_io_chain - reconfigure I/O chain
*/
void omap3xxx_prm_reconfigure_io_chain(void)
{
if (omap3_prcm_irq_setup.reconfigure_io_chain)
omap3_prcm_irq_setup.reconfigure_io_chain();
}
/** /**
* omap3xxx_prm_enable_io_wakeup - enable wakeup events from I/O wakeup latches * omap3xxx_prm_enable_io_wakeup - enable wakeup events from I/O wakeup latches
* *
...@@ -656,6 +680,13 @@ static int omap3xxx_prm_late_init(void) ...@@ -656,6 +680,13 @@ static int omap3xxx_prm_late_init(void)
if (!(prm_features & PRM_HAS_IO_WAKEUP)) if (!(prm_features & PRM_HAS_IO_WAKEUP))
return 0; return 0;
if (omap3_has_io_chain_ctrl())
omap3_prcm_irq_setup.reconfigure_io_chain =
omap3_prm_reconfigure_io_chain;
else
omap3_prcm_irq_setup.reconfigure_io_chain =
omap3430_pre_es3_1_reconfigure_io_chain;
omap3xxx_prm_enable_io_wakeup(); omap3xxx_prm_enable_io_wakeup();
ret = omap_prcm_register_chain_handler(&omap3_prcm_irq_setup); ret = omap_prcm_register_chain_handler(&omap3_prcm_irq_setup);
if (!ret) if (!ret)
......
...@@ -61,7 +61,7 @@ EXPORT_SYMBOL(get_clock_tick_rate); ...@@ -61,7 +61,7 @@ EXPORT_SYMBOL(get_clock_tick_rate);
/* /*
* For non device-tree builds, keep legacy timer init * For non device-tree builds, keep legacy timer init
*/ */
void pxa_timer_init(void) void __init pxa_timer_init(void)
{ {
pxa_timer_nodt_init(IRQ_OST0, io_p2v(0x40a00000), pxa_timer_nodt_init(IRQ_OST0, io_p2v(0x40a00000),
get_clock_tick_rate()); get_clock_tick_rate());
......
config ARCH_OMAP
bool
if ARCH_OMAP if ARCH_OMAP
menu "TI OMAP Common Features" menu "TI OMAP Common Features"
......
...@@ -188,31 +188,31 @@ static struct l3_flagmux_data omap_l3_flagmux_clk3 = { ...@@ -188,31 +188,31 @@ static struct l3_flagmux_data omap_l3_flagmux_clk3 = {
}; };
static struct l3_masters_data omap_l3_masters[] = { static struct l3_masters_data omap_l3_masters[] = {
{ 0x0 , "MPU"}, { 0x00, "MPU"},
{ 0x10, "CS_ADP"}, { 0x04, "CS_ADP"},
{ 0x14, "xxx"}, { 0x05, "xxx"},
{ 0x20, "DSP"}, { 0x08, "DSP"},
{ 0x30, "IVAHD"}, { 0x0C, "IVAHD"},
{ 0x40, "ISS"}, { 0x10, "ISS"},
{ 0x44, "DucatiM3"}, { 0x11, "DucatiM3"},
{ 0x48, "FaceDetect"}, { 0x12, "FaceDetect"},
{ 0x50, "SDMA_Rd"}, { 0x14, "SDMA_Rd"},
{ 0x54, "SDMA_Wr"}, { 0x15, "SDMA_Wr"},
{ 0x58, "xxx"}, { 0x16, "xxx"},
{ 0x5C, "xxx"}, { 0x17, "xxx"},
{ 0x60, "SGX"}, { 0x18, "SGX"},
{ 0x70, "DSS"}, { 0x1C, "DSS"},
{ 0x80, "C2C"}, { 0x20, "C2C"},
{ 0x88, "xxx"}, { 0x22, "xxx"},
{ 0x8C, "xxx"}, { 0x23, "xxx"},
{ 0x90, "HSI"}, { 0x24, "HSI"},
{ 0xA0, "MMC1"}, { 0x28, "MMC1"},
{ 0xA4, "MMC2"}, { 0x29, "MMC2"},
{ 0xA8, "MMC6"}, { 0x2A, "MMC6"},
{ 0xB0, "UNIPRO1"}, { 0x2C, "UNIPRO1"},
{ 0xC0, "USBHOSTHS"}, { 0x30, "USBHOSTHS"},
{ 0xC4, "USBOTGHS"}, { 0x31, "USBOTGHS"},
{ 0xC8, "USBHOSTFS"} { 0x32, "USBHOSTFS"}
}; };
static struct l3_flagmux_data *omap_l3_flagmux[] = { static struct l3_flagmux_data *omap_l3_flagmux[] = {
......
...@@ -22,44 +22,63 @@ ...@@ -22,44 +22,63 @@
#define GSBI_CTRL_REG 0x0000 #define GSBI_CTRL_REG 0x0000
#define GSBI_PROTOCOL_SHIFT 4 #define GSBI_PROTOCOL_SHIFT 4
struct gsbi_info {
struct clk *hclk;
u32 mode;
u32 crci;
};
static int gsbi_probe(struct platform_device *pdev) static int gsbi_probe(struct platform_device *pdev)
{ {
struct device_node *node = pdev->dev.of_node; struct device_node *node = pdev->dev.of_node;
struct resource *res; struct resource *res;
void __iomem *base; void __iomem *base;
struct clk *hclk; struct gsbi_info *gsbi;
u32 mode, crci = 0;
gsbi = devm_kzalloc(&pdev->dev, sizeof(*gsbi), GFP_KERNEL);
if (!gsbi)
return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
base = devm_ioremap_resource(&pdev->dev, res); base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(base)) if (IS_ERR(base))
return PTR_ERR(base); return PTR_ERR(base);
if (of_property_read_u32(node, "qcom,mode", &mode)) { if (of_property_read_u32(node, "qcom,mode", &gsbi->mode)) {
dev_err(&pdev->dev, "missing mode configuration\n"); dev_err(&pdev->dev, "missing mode configuration\n");
return -EINVAL; return -EINVAL;
} }
/* not required, so default to 0 if not present */ /* not required, so default to 0 if not present */
of_property_read_u32(node, "qcom,crci", &crci); of_property_read_u32(node, "qcom,crci", &gsbi->crci);
dev_info(&pdev->dev, "GSBI port protocol: %d crci: %d\n", mode, crci); dev_info(&pdev->dev, "GSBI port protocol: %d crci: %d\n",
gsbi->mode, gsbi->crci);
gsbi->hclk = devm_clk_get(&pdev->dev, "iface");
if (IS_ERR(gsbi->hclk))
return PTR_ERR(gsbi->hclk);
hclk = devm_clk_get(&pdev->dev, "iface"); clk_prepare_enable(gsbi->hclk);
if (IS_ERR(hclk))
return PTR_ERR(hclk);
clk_prepare_enable(hclk); writel_relaxed((gsbi->mode << GSBI_PROTOCOL_SHIFT) | gsbi->crci,
writel_relaxed((mode << GSBI_PROTOCOL_SHIFT) | crci,
base + GSBI_CTRL_REG); base + GSBI_CTRL_REG);
/* make sure the gsbi control write is not reordered */ /* make sure the gsbi control write is not reordered */
wmb(); wmb();
clk_disable_unprepare(hclk); platform_set_drvdata(pdev, gsbi);
return of_platform_populate(node, NULL, NULL, &pdev->dev);
}
static int gsbi_remove(struct platform_device *pdev)
{
struct gsbi_info *gsbi = platform_get_drvdata(pdev);
clk_disable_unprepare(gsbi->hclk);
return of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev); return 0;
} }
static const struct of_device_id gsbi_dt_match[] = { static const struct of_device_id gsbi_dt_match[] = {
...@@ -76,6 +95,7 @@ static struct platform_driver gsbi_driver = { ...@@ -76,6 +95,7 @@ static struct platform_driver gsbi_driver = {
.of_match_table = gsbi_dt_match, .of_match_table = gsbi_dt_match,
}, },
.probe = gsbi_probe, .probe = gsbi_probe,
.remove = gsbi_remove,
}; };
module_platform_driver(gsbi_driver); module_platform_driver(gsbi_driver);
......
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