[linux-yocto] [PATCH 6/8] arch/arm/mach-axxia: Enable Secondary Cores when in Hyp Mode

2014-06-04 Thread Charlie Paul
From: John Jacques 

The Axxia boot loader leaves secondary cores in reset; Linux is expected
to enable them.  This change makes that happen.

Signed-off-by: John Jacques 
---
 arch/arm/mach-axxia/platsmp.c |   23 ---
 1 file changed, 8 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-axxia/platsmp.c b/arch/arm/mach-axxia/platsmp.c
index a067de2..54fdcbf 100644
--- a/arch/arm/mach-axxia/platsmp.c
+++ b/arch/arm/mach-axxia/platsmp.c
@@ -40,7 +40,6 @@ __axxia_arch_wfe(void)
 
return;
 }
-
 EXPORT_SYMBOL(__axxia_arch_wfe);
 
 /*
@@ -217,21 +216,15 @@ static void __init axxia_smp_prepare_cpus(unsigned int 
max_cpus)
continue;
 
/*
-* Release all physical cpus when not in hyp mode since we
-* might want to bring them online later.
-*
-* Also we need to get the execution into kernel code (it's
-* currently executing in u-boot).  u-boot releases the cores
-* from reset in hyp mode.
+* Release all physical cpus since we might want to
+* bring them online later.
 */
-   if (!is_hyp_mode_available()) {
-   if (cpu != 0) {
-   u32 phys_cpu = cpu_logical_map(cpu);
-   u32 tmp = readl(syscon + 0x1010);
-   writel(0xab, syscon + 0x1000);
-   tmp &= ~(1 << phys_cpu);
-   writel(tmp, syscon + 0x1010);
-   }
+   if (cpu != 0) {
+   u32 phys_cpu = cpu_logical_map(cpu);
+   u32 tmp = readl(syscon + 0x1010);
+   writel(0xab, syscon + 0x1000);
+   tmp &= ~(1 << phys_cpu);
+   writel(tmp, syscon + 0x1010);
}
 
if (cpu_count < max_cpus) {
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 7/8] arch/arm/mach-axxia: Remove Unused Device Tree

2014-06-04 Thread Charlie Paul
From: John Jacques 

The version of emulation that used this device tree is no longer
supported.

Signed-off-by: John Jacques 
---
 arch/arm/boot/dts/axm55xxemu7.dts |  226 -
 1 file changed, 226 deletions(-)
 delete mode 100644 arch/arm/boot/dts/axm55xxemu7.dts

diff --git a/arch/arm/boot/dts/axm55xxemu7.dts 
b/arch/arm/boot/dts/axm55xxemu7.dts
deleted file mode 100644
index 56375c1..000
--- a/arch/arm/boot/dts/axm55xxemu7.dts
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * arch/arm/boot/dts/axm55xxemu7.dts
- *
- * Copyright (C) 2012 LSI
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-/dts-v1/;
-
-/memreserve/ 0x 0x0040;
-
-/ {
-   model = "AXM5516";
-   compatible = "arm", "lsi,axm5516-emu";
-   interrupt-parent = <&gic>;
-   #address-cells = <2>;
-   #size-cells = <2>;
-
-   chosen { };
-
-   aliases {
-   serial0   = &axxia_serial0;
-   timer = &axxia_timers;
-   ethernet0 = &axxia_femac0;
-   };
-
-   cpus {
-   #address-cells = <1>;
-   #size-cells = <0>;
-
-   cpu@0 {
-   device_type = "cpu";
-   compatible = "arm,cortex-a15";
-   reg = <0>;
-cpu-release-addr = <0>; // Fixed by the boot loader
-   clock-frequency= <0>;   // Placeholder
-   };
-
-   cpu@1 {
-   device_type = "cpu";
-   compatible = "arm,cortex-a15";
-   reg = <1>;
-cpu-release-addr = <0>; // Fixed by the boot loader
-   clock-frequency= <0>;   // Placeholder
-   };
-
-   cpu@2 {
-   device_type = "cpu";
-   compatible = "arm,cortex-a15";
-   reg = <2>;
-cpu-release-addr = <0>; // Fixed by the boot loader
-   clock-frequency= <0>;   // Placeholder
-   };
-
-   cpu@3 {
-   device_type = "cpu";
-   compatible = "arm,cortex-a15";
-   reg = <3>;
-cpu-release-addr = <0>; // Fixed by the boot loader
-   clock-frequency= <0>;   // Placeholder
-   };
-
-   cpu@4 {
-   device_type = "cpu";
-   compatible = "arm,cortex-a15";
-   reg = <4>;
-cpu-release-addr = <0>; // Fixed by the boot loader
-   clock-frequency= <0>;   // Placeholder
-   };
-
-   cpu@5 {
-   device_type = "cpu";
-   compatible = "arm,cortex-a15";
-   reg = <5>;
-cpu-release-addr = <0>; // Fixed by the boot loader
-   clock-frequency= <0>;   // Placeholder
-   };
-
-   cpu@6 {
-   device_type = "cpu";
-   compatible = "arm,cortex-a15";
-   reg = <6>;
-cpu-release-addr = <0>; // Fixed by the boot loader
-   clock-frequency= <0>;   // Placeholder
-   };
-   };
-
-   clocks {
-   #address-cells = <1>;
-   #size-cells = <0>;
-
-   cpu {
-   frequency = <0>; /* Filled in by the boot loader. */
-   };
-
-   peripheral {
-   frequency = <0>; /* Filled in by the boot loader. */
-   };
-
-   emmc {
-   frequency = <0>; /* Filled in by the boot loader. */
-   };
-   };
-
-   memory@ {
-   device_type = "memory";
-   reg = <0 0x 0 0x1000>;
-   };
-
-   gic: interrupt-controller@2001001000 {
-   compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic";
-   #interrupt-cells = <3>;
-   #address-cells = <0>;
-   interrupt-controller;
-   reg = <0x20 0x01001000 0 0x1000>,  /* gic dist base */
- <0x20 0

[linux-yocto] [PATCH 8/8] arch/arm/mach-axxia: Device Trees for New 5500 Variants

2014-06-04 Thread Charlie Paul
From: John Jacques 

Add device trees for two new 5500 variants, 5512 and 5508.

Signed-off-by: John Jacques 
---
 arch/arm/boot/dts/Makefile |4 +-
 arch/arm/boot/dts/axm5508-amarillo.dts |  221 
 arch/arm/boot/dts/axm5512-amarillo.dts |  221 
 3 files changed, 445 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/axm5508-amarillo.dts
 create mode 100644 arch/arm/boot/dts/axm5512-amarillo.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 5d73aba..1b5fcd7 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -224,7 +224,9 @@ dtb-$(CONFIG_ARCH_AXXIA) += axm5504-sim.dtb \
axm5516-sim.dtb \
axm5504-emu.dtb \
axm5507-emu.dtb \
-   axm5516-amarillo.dtb
+   axm5516-amarillo.dtb \
+   axm5512-amarillo.dtb \
+   axm5508-amarillo.dtb
 dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb \
zynq-zc706.dtb
 
diff --git a/arch/arm/boot/dts/axm5508-amarillo.dts 
b/arch/arm/boot/dts/axm5508-amarillo.dts
new file mode 100644
index 000..09e3e42
--- /dev/null
+++ b/arch/arm/boot/dts/axm5508-amarillo.dts
@@ -0,0 +1,221 @@
+/*
+ * arch/arm/boot/dts/axm5516-amarillo.dts
+ *
+ * Copyright (C) 2013 LSI
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+/dts-v1/;
+
+/memreserve/ 0x 0x0040;
+
+/include/ "axm55xx.dtsi"
+/include/ "axm5508-cpus.dtsi"
+
+/ {
+   model = "Amarillo AXM5516";
+   compatible = "lsi,axm5516-amarillo", "lsi,axm5516";
+
+   memory {
+   device_type = "memory";
+   reg = <0 0x 0 0x4000>;
+   };
+};
+
+&femac {
+   status = "okay";
+   mdio-clock-offset = <0x1c>;
+   mdio-clock-period = <0xf0>;
+};
+
+&sm0 {
+   status = "okay";
+};
+
+&sm1 {
+   status = "okay";
+};
+
+&pcie0 {
+   status = "okay";
+};
+
+&pcie1 {
+   status = "okay";
+};
+
+&rio0 {
+   status = "okay";
+};
+
+&rio1 {
+   status = "okay";
+};
+
+&usb0 {
+   status = "okay";
+};
+
+&mtc {
+   status = "okay";
+};
+
+&serial0 {
+   status = "okay";
+};
+
+&serial1 {
+   status = "okay";
+};
+
+&serial2 {
+   status = "okay";
+};
+
+&serial3 {
+   status = "okay";
+};
+
+&gpio0 {
+   status = "okay";
+};
+
+&gpio1 {
+   status = "okay";
+};
+
+&spics {
+   status = "okay";
+};
+
+&spi0 {
+   status = "okay";
+
+   flash@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "s25fl129p1";
+   reg = <0x0>;
+   spi-max-frequency = <2500>;
+   pl022,com-mode = <0>;
+
+   partition@0 {
+   label = "spl";
+   reg = <0x0 0x4>;
+   };
+   partition@4 {
+   label = "parameters0";
+   reg = <0x4 0x1>;
+   };
+   partition@5 {
+   label = "parameters1";
+   reg = <0x5 0x1>;
+   };
+   partition@6 {
+   label = "env0";
+   reg = <0x6 0x1>;
+   };
+   partition@7 {
+   label = "env1";
+   reg = <0x7 0x1>;
+   };
+   partition@10 {
+   label = "u-boot0";
+   reg = <0x10 0x20>;
+   };
+   partition@30 {
+   label = "u-boot1";
+   reg = <0x10 0x20>;
+   };
+   };
+};
+
+&i2c0 {
+   status = "okay";
+
+   sysfpga@40 {
+   reg = <0x40>;
+   };
+};
+
+&i2c1 {
+   status = "okay";
+
+   pxa9555@20 {
+   compatible = "pca9555";
+   reg = <0x20>;
+   };
+
+   adt7467@2e {
+   compatible = "adt7473";
+   reg = <0x2e>;
+   };
+
+   temp@18 {
+   compatible = "jc42";
+   reg = <0x18>;
+   };
+
+   temp@1a {
+   compatible = "jc42";
+   reg = <0x1a>;
+   };
+
+   spd@50 {
+   compatible = "spd";
+   reg = <0x50>;
+   };
+
+   spd@52 {
+   compatible = "spd";
+   reg = <0x52>;
+   };
+
+   eeprom@54 {
+   compatible = "24c1024";
+   reg = <0x54>;
+   pagesize = <128>;
+   };
+};
+
+&i2c2 {
+   status = "okay";
+
+   pxa9544@70 {
+   compatible = "pca9544";
+   reg = <0x70>;
+   };
+
+   pxa9544@71 {
+   compatible 

[linux-yocto] [PATCH 3/8] misc: lsi-smmon: Bug when probing with IRQ pending

2014-06-04 Thread Charlie Paul
From: Anders Berg 

We must not call the ncr_write function to unmask interrupts with
the memory controller interrupt enabled, as this could cause the ISR to
be invoked before ncr_write has released the lock used to serialize
register accesses.

To avoid this, temporarily disable the IRQ line while unmasking the
interrupt sources in the controller.

Signed-off-by: Anders Berg 
---
 drivers/misc/lsi-smmon.c |   31 +--
 1 file changed, 21 insertions(+), 10 deletions(-)

diff --git a/drivers/misc/lsi-smmon.c b/drivers/misc/lsi-smmon.c
index 21d59b0..774430f 100644
--- a/drivers/misc/lsi-smmon.c
+++ b/drivers/misc/lsi-smmon.c
@@ -201,8 +201,8 @@ smmon_probe(struct platform_device *pdev)
 {
struct sm_dev *sm;
struct resource *io;
-   struct resource *irq;
-   u32 mask = SM_INT_MASK;
+   int irq;
+   u32 mask;
int rc = 0;
 
sm = devm_kzalloc(&pdev->dev, sizeof(*sm), GFP_KERNEL);
@@ -219,26 +219,37 @@ smmon_probe(struct platform_device *pdev)
}
sm->region = io->start;
 
-   irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-   if (!irq) {
-   rc = -EINVAL;
+   /* Disable all memory controller interrupts */
+   mask = 0x;
+   ncr_write(sm->region, 0x414, 4, &mask);
+
+   irq = platform_get_irq(pdev, 0);
+   if (irq < 0) {
+   rc = irq;
goto out;
}
 
-   rc = devm_request_irq(&pdev->dev, irq->start, smmon_isr,
- IRQF_ONESHOT, dev_name(&pdev->dev), pdev);
+   rc = devm_request_irq(&pdev->dev, irq, smmon_isr,
+ IRQF_ONESHOT, dev_name(&pdev->dev), sm);
if (rc)
goto out;
 
-   /* Enable memory controller interrupts */
-   ncr_write(sm->region, 0x414, 4, &mask);
-
rc = sysfs_create_group(&pdev->dev.kobj, &smmon_attr_group);
if (rc)
goto out;
 
dev_set_drvdata(&pdev->dev, sm);
pr_info("%s: Memory controller monitor\n", dev_name(&pdev->dev));
+
+   /* Enable memory controller interrupts. We need to disable the
+* interrupt while unmasking it, since otherwise there will be a
+* locking conflict in ncr_write/ncr_read when the ISR tries to read
+* interrupt status.
+*/
+   disable_irq(irq);
+   mask = SM_INT_MASK;
+   ncr_write(sm->region, 0x414, 4, &mask);
+   enable_irq(irq);
 out:
return rc;
 }
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 5/8] ARM: dts: axxia: Added memory controllers

2014-06-04 Thread Charlie Paul
From: Anders Berg 

Signed-off-by: Anders Berg 
---
 arch/arm/boot/dts/axm5516-amarillo.dts |8 
 arch/arm/boot/dts/axm55xx.dtsi |   14 ++
 2 files changed, 22 insertions(+)

diff --git a/arch/arm/boot/dts/axm5516-amarillo.dts 
b/arch/arm/boot/dts/axm5516-amarillo.dts
index 8d4ea09..c07de15 100644
--- a/arch/arm/boot/dts/axm5516-amarillo.dts
+++ b/arch/arm/boot/dts/axm5516-amarillo.dts
@@ -32,6 +32,14 @@
mdio-clock-period = <0xf0>;
 };
 
+&sm0 {
+   status = "okay";
+};
+
+&sm1 {
+   status = "okay";
+};
+
 &pcie0 {
status = "okay";
 };
diff --git a/arch/arm/boot/dts/axm55xx.dtsi b/arch/arm/boot/dts/axm55xx.dtsi
index 6a43139..90eebe3 100644
--- a/arch/arm/boot/dts/axm55xx.dtsi
+++ b/arch/arm/boot/dts/axm55xx.dtsi
@@ -65,6 +65,20 @@
 <1 10 0xf08>;
};
 
+   sm0: sm0@0022 {
+   compatible = "lsi,smmon";
+   reg = <0 0x0022 0 0x1000>;
+   interrupts = <0 161 4>;
+   status = "disabled";
+   };
+
+   sm1: sm1@0022 {
+   compatible = "lsi,smmon";
+   reg = <0 0x000f 0 0x1000>;
+   interrupts = <0 160 4>;
+   status = "disabled";
+   };
+
femac: femac@0x201012 {
compatible = "lsi,acp-femac";
device_type = "network";
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 4/8] misc: lsi-smmon: Add parameter panic_on_fatal

2014-06-04 Thread Charlie Paul
From: Anders Berg 

Added module parameter panic_on_fatal which when set will cause the driver
to call panic() when an uncorrectable ECC error is detected.

Signed-off-by: Anders Berg 
---
 drivers/misc/lsi-smmon.c |   27 ++-
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/drivers/misc/lsi-smmon.c b/drivers/misc/lsi-smmon.c
index 774430f..d2ceb31 100644
--- a/drivers/misc/lsi-smmon.c
+++ b/drivers/misc/lsi-smmon.c
@@ -24,6 +24,10 @@ static int log = 1;
 module_param(log, int, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(log, "Log each error to kernel log.");
 
+static int panic_on_fatal = 1;
+module_param(panic_on_fatal, int, S_IRUGO|S_IWUSR);
+MODULE_PARM_DESC(panic_on_fatal, "Panic on fatal error.");
+
 /*
   AXM55xx memory controller interrupt status bits:
 
@@ -96,18 +100,19 @@ static const u32 event_mask[NR_EVENTS] = {
 };
 
 static const struct event_logging {
+   int fatal;
const char *level;
const char *name;
 } event_logging[NR_EVENTS] = {
-   [EV_ILLEGAL] = {KERN_ERR, "Illegal access"},
-   [EV_MULT_ILLEGAL]= {KERN_ERR, "Illegal access"},
-   [EV_CORR_ECC]= {KERN_NOTICE, "Correctable ECC error"},
-   [EV_MULT_CORR_ECC]   = {KERN_NOTICE, "Correctable ECC error"},
-   [EV_UNCORR_ECC]  = {KERN_CRIT, "Uncorrectable ECC error"},
-   [EV_MULT_UNCORR_ECC] = {KERN_CRIT, "Uncorrectable ECC error"},
-   [EV_PORT_ERROR]  = {KERN_CRIT, "Port error"},
-   [EV_WRAP_ERROR]  = {KERN_CRIT, "Wrap error"},
-   [EV_PARITY_ERROR]= {KERN_CRIT, "Parity error"},
+   [EV_ILLEGAL] = {0, KERN_ERR, "Illegal access"},
+   [EV_MULT_ILLEGAL]= {0, KERN_ERR, "Illegal access"},
+   [EV_CORR_ECC]= {0, KERN_NOTICE, "Correctable ECC error"},
+   [EV_MULT_CORR_ECC]   = {0, KERN_NOTICE, "Correctable ECC error"},
+   [EV_UNCORR_ECC]  = {1, KERN_CRIT, "Uncorrectable ECC error"},
+   [EV_MULT_UNCORR_ECC] = {1, KERN_CRIT, "Uncorrectable ECC error"},
+   [EV_PORT_ERROR]  = {0, KERN_CRIT, "Port error"},
+   [EV_WRAP_ERROR]  = {0, KERN_CRIT, "Wrap error"},
+   [EV_PARITY_ERROR]= {0, KERN_CRIT, "Parity error"},
 };
 
 struct smmon_attr {
@@ -182,6 +187,10 @@ smmon_isr(int interrupt, void *device)
for (i = 0; i < NR_EVENTS; ++i) {
if ((status & event_mask[i]) != 0) {
++sm->counter[i];
+   if (panic_on_fatal && event_logging[i].fatal)
+   panic("%s (%s)\n",
+ event_logging[i].name,
+ dev_name(&sm->pdev->dev));
if (log)
printk_ratelimited("%s%s: %s\n",
   event_logging[i].level,
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 2/8] i2c: axxia: Fall back to polling mode when no IRQ

2014-06-04 Thread Charlie Paul
From: Anders Berg 

If the device tree does not specify an interrupt property, the device falls
back to polling the controller status. This is needed to support simulator
models without interrupt capabilities.

Signed-off-by: Anders Berg 
---
 drivers/i2c/busses/i2c-axxia.c |   82 +++-
 1 file changed, 48 insertions(+), 34 deletions(-)

diff --git a/drivers/i2c/busses/i2c-axxia.c b/drivers/i2c/busses/i2c-axxia.c
index 4721d3c..93f73ec 100644
--- a/drivers/i2c/busses/i2c-axxia.c
+++ b/drivers/i2c/busses/i2c-axxia.c
@@ -123,6 +123,8 @@ struct axxia_i2c_dev {
size_t msg_xfrd;
/* error code for completed message */
int msg_err;
+   /* IRQ number (or 0 if not using interrupt) */
+   int irq;
/* current i2c bus clock rate */
u32 bus_clk_rate;
 };
@@ -327,15 +329,11 @@ status_str(u32 status)
return buf;
 }
 
-static irqreturn_t
-axxia_i2c_isr(int irq, void *_dev)
+static void
+axxia_i2c_service_irq(struct axxia_i2c_dev *idev)
 {
-   struct axxia_i2c_dev *idev = _dev;
u32 status = readl(&idev->regs->mst_int_status);
 
-   /* Clear interrupt */
-   writel(0x01, &idev->regs->interrupt_status);
-
/* RX FIFO needs service? */
if (i2c_m_rd(idev->msg) && (status & MST_STATUS_RFL))
axxia_i2c_empty_rx_fifo(idev);
@@ -370,6 +368,23 @@ axxia_i2c_isr(int irq, void *_dev)
readl(&idev->regs->mst_tx_xfer));
complete(&idev->msg_complete);
}
+}
+
+static irqreturn_t
+axxia_i2c_isr(int irq, void *_dev)
+{
+   struct axxia_i2c_dev *idev = _dev;
+
+   if ((readl(&idev->regs->interrupt_status) & 0x1) == 0)
+   return IRQ_NONE;
+
+   if (!idev->msg)
+   return IRQ_NONE;
+
+   axxia_i2c_service_irq(idev);
+
+   /* Clear interrupt */
+   writel(0x01, &idev->regs->interrupt_status);
 
return IRQ_HANDLED;
 }
@@ -436,14 +451,21 @@ axxia_i2c_xfer_msg(struct axxia_i2c_dev *idev, struct 
i2c_msg *msg)
/* Start manual mode */
writel(0x8, &idev->regs->mst_command);
 
-   i2c_int_enable(idev, int_mask);
-
-   ret = wait_for_completion_timeout(&idev->msg_complete,
- I2C_XFER_TIMEOUT);
-
-   i2c_int_disable(idev, int_mask);
+   if (idev->irq > 0) {
+   i2c_int_enable(idev, int_mask);
+   ret = wait_for_completion_timeout(&idev->msg_complete,
+ I2C_XFER_TIMEOUT);
+   i2c_int_disable(idev, int_mask);
+   WARN_ON(readl(&idev->regs->mst_command) & 0x8);
+   } else {
+   unsigned long tmo = jiffies + I2C_XFER_TIMEOUT;
 
-   WARN_ON(readl(&idev->regs->mst_command) & 0x8);
+   do {
+   /* Poll interrupt status */
+   axxia_i2c_service_irq(idev);
+   ret = try_wait_for_completion(&idev->msg_complete);
+   } while (!ret && time_before(jiffies, tmo));
+   }
 
if (ret == 0) {
dev_warn(idev->dev, "xfer timeout (%#x)\n", msg->addr);
@@ -518,7 +540,6 @@ axxia_i2c_probe(struct platform_device *pdev)
struct axxia_i2c_dev *idev = NULL;
struct resource *res;
void __iomem *base;
-   int irq;
int ret = 0;
 
idev = devm_kzalloc(&pdev->dev, sizeof(*idev), GFP_KERNEL);
@@ -526,48 +547,41 @@ axxia_i2c_probe(struct platform_device *pdev)
return -ENOMEM;
 
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   if (!res) {
-   dev_err(&pdev->dev, "can't get device io-resource\n");
-   return -ENOENT;
-   }
-
-   irq = platform_get_irq(pdev, 0);
-   if (irq < 0) {
-   dev_err(&pdev->dev, "can't get irq number\n");
-   return -ENOENT;
-   }
-
base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(base))
return PTR_ERR(base);
 
+   idev->irq = platform_get_irq(pdev, 0);
+   if (idev->irq < 0)
+   dev_info(&pdev->dev, "No IRQ specified, using polling mode\n");
+
idev->i2c_clk = devm_clk_get(&pdev->dev, "i2c");
if (IS_ERR(idev->i2c_clk)) {
dev_err(&pdev->dev, "missing I2C bus clock");
return PTR_ERR(idev->i2c_clk);
}
 
-   idev->regs = (struct i2c_regs __iomem *) base;
-   idev->dev  = &pdev->dev;
+   idev->regs = (struct i2c_regs __iomem *) base;
+   idev->dev = &pdev->dev;
init_completion(&idev->msg_complete);
 
of_property_read_u32(np, "clock-frequency", &idev->bus_clk_rate);
if (idev->bus_clk_rate == 0)
idev->bus_clk_rate = 10; /* default clock rate */
 
-   platform_set_drvdata(pdev, idev);
-
ret = axxia_i2c_init(idev);
if (ret) {
dev_err(&pdev->dev, "Failed to initialize i2c contr

[linux-yocto] [PATCH 0/8] LSI AXXIA updates to 3.10 standard/axxia/base

2014-06-04 Thread Charlie Paul
Updates to the  arm and i2c

Anders Berg (5):
  i2c: axxia: Minor cosmetic cleanup
  i2c: axxia: Fall back to polling mode when no IRQ
  misc: lsi-smmon: Bug when probing with IRQ pending
  misc: lsi-smmon: Add parameter panic_on_fatal
  ARM: dts: axxia: Added memory controllers

John Jacques (3):
  arch/arm/mach-axxia: Enable Secondary Cores when in Hyp Mode
  arch/arm/mach-axxia: Remove Unused Device Tree
  arch/arm/mach-axxia: Device Trees for New 5500 Variants

 arch/arm/boot/dts/Makefile |4 +-
 arch/arm/boot/dts/axm5508-amarillo.dts |  221 +++
 arch/arm/boot/dts/axm5512-amarillo.dts |  221 +++
 arch/arm/boot/dts/axm5516-amarillo.dts |8 ++
 arch/arm/boot/dts/axm55xx.dtsi |   14 ++
 arch/arm/boot/dts/axm55xxemu7.dts  |  226 
 arch/arm/mach-axxia/platsmp.c  |   23 ++--
 drivers/i2c/busses/i2c-axxia.c |   94 +++--
 drivers/misc/lsi-smmon.c   |   58 +---
 9 files changed, 568 insertions(+), 301 deletions(-)
 create mode 100644 arch/arm/boot/dts/axm5508-amarillo.dts
 create mode 100644 arch/arm/boot/dts/axm5512-amarillo.dts
 delete mode 100644 arch/arm/boot/dts/axm55xxemu7.dts

-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 1/8] i2c: axxia: Minor cosmetic cleanup

2014-06-04 Thread Charlie Paul
From: Anders Berg 

Signed-off-by: Anders Berg 
---
 drivers/i2c/busses/i2c-axxia.c |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/i2c/busses/i2c-axxia.c b/drivers/i2c/busses/i2c-axxia.c
index 8a303a6..4721d3c 100644
--- a/drivers/i2c/busses/i2c-axxia.c
+++ b/drivers/i2c/busses/i2c-axxia.c
@@ -113,7 +113,7 @@ struct axxia_i2c_dev {
struct i2c_adapter adapter;
/* clock reference for i2c input clock */
struct clk *i2c_clk;
-   /* pointer to register struct */
+   /* pointer to registers */
struct i2c_regs __iomem *regs;
/* xfer completion object */
struct completion msg_complete;
@@ -363,7 +363,7 @@ axxia_i2c_isr(int irq, void *_dev)
idev->msg_err = status & MST_STATUS_ERR;
i2c_int_disable(idev, ~0);
dev_dbg(idev->dev, "error %s, rx=%u/%u tx=%u/%u\n",
-   status_str(idev->msg_err),
+   status_str(status),
readl(&idev->regs->mst_rx_bytes_xfrd),
readl(&idev->regs->mst_rx_xfer),
readl(&idev->regs->mst_tx_bytes_xfrd),
@@ -439,7 +439,7 @@ axxia_i2c_xfer_msg(struct axxia_i2c_dev *idev, struct 
i2c_msg *msg)
i2c_int_enable(idev, int_mask);
 
ret = wait_for_completion_timeout(&idev->msg_complete,
-   I2C_XFER_TIMEOUT);
+ I2C_XFER_TIMEOUT);
 
i2c_int_disable(idev, int_mask);
 
@@ -471,7 +471,7 @@ axxia_i2c_stop(struct axxia_i2c_dev *idev)
writel(0xb, &idev->regs->mst_command);
i2c_int_enable(idev, int_mask);
ret = wait_for_completion_timeout(&idev->msg_complete,
-   I2C_STOP_TIMEOUT);
+ I2C_STOP_TIMEOUT);
i2c_int_disable(idev, int_mask);
if (ret == 0)
return -ETIMEDOUT;
@@ -500,9 +500,9 @@ static u32
 axxia_i2c_func(struct i2c_adapter *adap)
 {
u32 caps = (I2C_FUNC_I2C |
-   I2C_FUNC_10BIT_ADDR |
-   I2C_FUNC_SMBUS_EMUL |
-   I2C_FUNC_SMBUS_BLOCK_DATA);
+   I2C_FUNC_10BIT_ADDR |
+   I2C_FUNC_SMBUS_EMUL |
+   I2C_FUNC_SMBUS_BLOCK_DATA);
return caps;
 }
 
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto