[linux-yocto] [PATCH 00/30] LSI AXXIA updates to 3.4 standard/axxia/base

2014-05-06 Thread Charlie Paul
This is a resubmittal of the second set of patches

Patch 04/28 was not changed, but noted your explanation. 
Patch 05/28 added more information as why the mbox was increased
Patch 07/28 was split into two patches as requested
Patch 10/28 was split into two patches as requested
Patch 17/28 more information added
Patch 24/28 more information added


Anders Berg (4):
  i2c-axxia: Adjust tLOW,tHIGH to match fast-mode requirements
  i2c-axxia: Avoid timeout when interrupt delayed
  i2c-axxia: Fixed i2c device minor numbers
  i2c: axxia: Add support for 10-bit addressing

David Mercado (4):
  LSI FEMAC Ethernet: Updated for upstream submittal
  kernel/irq/manage.c: Fix irq_set_affinity to allow use with buslocks
  LSI AXM55xx: Axxia GIC driver improvements (3rd gen)
  LSI AXM55xx: Fix PMU handler issue

Gary McGee (1):
  LSI AXM55xx arm/axxia: improved robustness for DDR retention

John Jacques (4):
  axxia: Device tree and Target Name/Machine Type Update
  axxia: Fix a Size Warning in the SRIO Section of the Device Trees
  arch/powerpc: Updated the UART Driver to Support 3500
  arch/powerpc: Don't Try to Use NAND on Axxia 3500

Michael Bringmann (13):
  LSI AXM55xx: Validate SRIO link ready status during driver
initialization.
  LSI AXM55xx: Some code optimizations for AXXIA rapidio mport driver.
  LSI AXM55xx: Fixes for mailbox open bounds checks.
  LSI AXM55xx: Improve concurrency protection in AXXIA rapidio calls.
  LSI AXM55xx: Fix concurrency issue for variable
  LSI AXM55xx rapidio: Change the timers for inbound messages
  LSI AXM55xx rapidio: Speed up bottleneck in inbox.
  LSI AXM55x rapidio: removed __devinit from init routines
  LSI AXM55xx/rapidio: Fix NULL pointer reference in
rio_release_inb_mbox.
  LSI AXM55xx: Various bug fixes for rapidio endpoint controller.
  LSI AXM55xx: Configuration updates and bug fixes for rapidio.
  LSI AXM55xx: Disable linkdown reset configuration.
  LSI AXM55xx: Move datastream APIs and symbols to public header file.

SangeethaRao (2):
  LSI sysdev/pci: Removing the power of 2 size restriction
  LSI AXM55xx i2c: Adding support for AXM3500 I2C driver

ningligong (2):
  LSI AXM55xx rapidio? Fixed offset of RAB_OBDSE_XX registers
  LSI AXM55xx: Fixed inbound data streaming ISR handling

 arch/arm/boot/dts/axm55xx.dts |4 +-
 arch/arm/boot/dts/axm55xxemu.dts  |   25 +-
 arch/arm/boot/dts/axm55xxemu7.dts |  217 +
 arch/arm/boot/dts/axm55xxsim.dts  |   26 +-
 arch/arm/boot/dts/axm55xxsim16.dts|   26 +-
 arch/arm/include/asm/axxia-rio.h  |5 +-
 arch/arm/mach-axxia/Makefile  |2 +-
 arch/arm/mach-axxia/axxia-gic.c   | 1160 +
 arch/arm/mach-axxia/axxia.c   |   40 +-
 arch/arm/mach-axxia/ddr_retention.c   |  258 +++---
 arch/arm/mach-axxia/ddr_shutdown.c|  332 +++
 arch/arm/mach-axxia/rapidio.c |   19 +-
 arch/powerpc/boot/dts/acp25xx.dts |   37 +-
 arch/powerpc/boot/dts/acp342x.dts |   37 +-
 arch/powerpc/boot/dts/acp344x.dts |   37 +-
 arch/powerpc/boot/dts/acp35xx.dts |   29 +-
 arch/powerpc/include/asm/axxia-rio.h  |5 +-
 arch/powerpc/sysdev/lsi_pci.c |   16 +-
 drivers/i2c/busses/i2c-axxia.c|  115 ++-
 drivers/mtd/nand/lsi_acp_nand.c   |9 +-
 drivers/net/ethernet/lsi/Kconfig  |   15 -
 drivers/net/ethernet/lsi/lsi_acp_mdio.c   |  201 +++--
 drivers/net/ethernet/lsi/lsi_acp_net.c|  871 +--
 drivers/net/ethernet/lsi/lsi_acp_net.h|  261 --
 drivers/rapidio/devices/lsi/axxia-rio-ds.c|  647 --
 drivers/rapidio/devices/lsi/axxia-rio-ds.h|  326 +--
 drivers/rapidio/devices/lsi/axxia-rio-irq.c   |  289 +++---
 drivers/rapidio/devices/lsi/axxia-rio-irq.h   |   12 +-
 drivers/rapidio/devices/lsi/axxia-rio-sysfs.c |   15 +-
 drivers/rapidio/devices/lsi/axxia-rio.c   |   16 +-
 drivers/rapidio/devices/lsi/axxia-rio.h   |4 +-
 drivers/rapidio/rio.c |   15 +-
 drivers/tty/serial/lsi_acp_serial.c   |   94 +-
 include/linux/rio-axxia.h |  322 +++
 kernel/irq/manage.c   |6 +-
 35 files changed, 3156 insertions(+), 2337 deletions(-)
 create mode 100644 arch/arm/boot/dts/axm55xxemu7.dts
 create mode 100644 arch/arm/mach-axxia/ddr_shutdown.c
 create mode 100644 include/linux/rio-axxia.h

-- 
1.7.9.5

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


[linux-yocto] [PATCH 02/30] LSI AXM55xx: Some code optimizations for AXXIA rapidio mport driver.

2014-05-06 Thread Charlie Paul
From: Michael Bringmann 

Correct 'slot' argument to outb msg callback, and remove unnecessary
memory allocations.

Signed-off-by: Michael Bringmann 
---
 drivers/rapidio/devices/lsi/axxia-rio-irq.c |   47 +--
 drivers/rapidio/devices/lsi/axxia-rio-irq.h |6 
 2 files changed, 15 insertions(+), 38 deletions(-)

diff --git a/drivers/rapidio/devices/lsi/axxia-rio-irq.c 
b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
index 91175a0..2ffa34b 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio-irq.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
@@ -919,9 +919,6 @@ static void release_dme(struct kref *kref)
struct rio_msg_desc *desc;
int i;
 
-   if (me->tx_ack != NULL)
-   kfree(me->tx_ack);
-
if (me->desc) {
for (i = 0, desc = me->desc; i < me->entries; i++, desc++) {
if (desc->msg_virt != NULL)
@@ -1116,12 +1113,6 @@ static struct rio_msg_dme *alloc_message_engine(struct 
rio_mport *mport,
entries, GFP_KERNEL);
if (!me->descriptors)
goto err;
-   if (ack_buf) {
-   me->tx_ack = kzalloc(sizeof(struct rio_msg_tx_ack) * entries,
-GFP_KERNEL);
-   if (!me->tx_ack)
-   goto err;
-   }
me->entries = entries;
me->dev_id = dev_id;
me->entries_in_use = 0;
@@ -1207,7 +1198,7 @@ static void ob_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
struct rio_mport *mport = h->mport;
struct rio_priv *priv = mport->priv;
struct rio_msg_dme *mbox = h->data;
-   int i, ack_id = 0;
+   int i;
u32 dme_stat, dw0, dme_no = 31 - CNTLZW(state);
u32 dme_ctrl;
unsigned long flags;
@@ -1244,11 +1235,6 @@ static void ob_dme_irq_handler(struct rio_irq_handler 
*h, u32 state)
 
if ((dw0 & DME_DESC_DW0_VALID) &&
(dw0 & DME_DESC_DW0_READY_MASK)) {
-   struct rio_msg_tx_ack *tx_ack = &mbox->tx_ack[ack_id++];
-
-   tx_ack->err_state = DESC_STATE_TO_ERRNO(dw0);
-   tx_ack->cookie = desc->cookie;
-
if (!priv->internalDesc) {
*((u32 *)DESC_TABLE_W0_MEM(mbox, desc->desc_no))
= dw0 & DME_DESC_DW0_NXT_DESC_VALID;
@@ -1260,26 +1246,23 @@ static void ob_dme_irq_handler(struct rio_irq_handler 
*h, u32 state)
__ob_dme_dw_dbg(priv, dw0);
 
mbox->entries_in_use--;
-   }
-   }
-   spin_unlock_irqrestore(&mbox->lock, flags);
 
-   /**
-* UP-call to net device handler
-*/
-   if (mport->outb_msg[dme_no].mcback) {
-   for (i = 0; i < ack_id; i++) {
-   struct rio_msg_tx_ack *tx_ack = &mbox->tx_ack[i];
-
-   __ob_dme_event_dbg(priv, dme_no,
-  1 << RIO_OB_DME_TX_DESC_READY);
-   mport->outb_msg[dme_no].mcback(mport,
-  mbox->dev_id,
-  dme_no,
-  tx_ack->err_state,
-  tx_ack->cookie);
+   /**
+   * UP-call to net device handler
+   */
+   if (mport->outb_msg[dme_no].mcback) {
+   __ob_dme_event_dbg(priv, dme_no,
+   1 << RIO_OB_DME_TX_DESC_READY);
+
+   mport->outb_msg[dme_no].mcback(mport,
+   mbox->dev_id,
+   dme_no,
+   i,
+   desc->cookie);
+   }
}
}
+   spin_unlock_irqrestore(&mbox->lock, flags);
 }
 
 /**
diff --git a/drivers/rapidio/devices/lsi/axxia-rio-irq.h 
b/drivers/rapidio/devices/lsi/axxia-rio-irq.h
index b456541..d98ebfd 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio-irq.h
+++ b/drivers/rapidio/devices/lsi/axxia-rio-irq.h
@@ -205,11 +205,6 @@ struct rio_msg_desc {
void *cookie;
 };
 
-struct rio_msg_tx_ack {
-   int err_state;
-   void *cookie;
-};
-
 struct rio_msg_dme {
spinlock_t lock;
char name[16];
@@ -227,7 +222,6 @@ struct rio_msg_dme {
int dme_no;
struct rio_msg_desc *desc;
struct rio_desc *descriptors;
-   struct rio_msg_tx_ack *tx_ack;
 #ifdef CONFIG_SRIO_IRQ_TIME
u64 start_irq_tb;
u64 start_thrd_tb;
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproje

[linux-yocto] [PATCH 01/30] LSI AXM55xx: Validate SRIO link ready status during driver initialization.

2014-05-06 Thread Charlie Paul
From: Michael Bringmann 

Check whether the SRIO link ready status is valid for each driver instance.
Fix an issue with scanning/listing the set of network devices found when
multiple SRIO controller master ports are enabled.

Signed-off-by: Michael Bringmann 
---
 arch/arm/include/asm/axxia-rio.h|5 -
 arch/arm/mach-axxia/rapidio.c   |   19 +++
 arch/powerpc/include/asm/axxia-rio.h|5 -
 drivers/rapidio/devices/lsi/axxia-rio.c |2 +-
 drivers/rapidio/rio.c   |1 +
 5 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/arch/arm/include/asm/axxia-rio.h b/arch/arm/include/asm/axxia-rio.h
index 492d476..8b7fba2 100644
--- a/arch/arm/include/asm/axxia-rio.h
+++ b/arch/arm/include/asm/axxia-rio.h
@@ -5,6 +5,8 @@
 #ifndef __ASM_AXXIA_RIO_H__
 #define __ASM_AXXIA_RIO_H__
 
+#include 
+
 /* Constants, Macros, etc. */
 
 #define AXXIA_RIO_SMALL_SYSTEM
@@ -76,7 +78,8 @@ extern int axxia_rio_apio_disable(struct rio_mport *mport);
 extern int axxia_rio_rpio_enable(struct rio_mport *mport, u32 mask, u32 bits);
 extern int axxia_rio_rpio_disable(struct rio_mport *mport);
 
-extern int axxia_rapidio_board_init(int devNum, int *portNdx);
+extern int axxia_rapidio_board_init(struct platform_device *dev, int devNum,
+   int *portNdx);
 
 
 /*/
diff --git a/arch/arm/mach-axxia/rapidio.c b/arch/arm/mach-axxia/rapidio.c
index 82deeaa..244550f 100644
--- a/arch/arm/mach-axxia/rapidio.c
+++ b/arch/arm/mach-axxia/rapidio.c
@@ -38,6 +38,7 @@
  * axxia_rapidio_board_init -
  *   Perform board-specific initialization to support use of RapidIO busses
  *
+ * @dev: [IN] RIO platform device
  * @ndx: [IN] Which instance of SRIOC driver needs support
  * @portNdx: [OUT] Which port to use for the specified controller
  *
@@ -45,24 +46,34 @@
  */
 int
 axxia_rapidio_board_init(
+   struct platform_device *dev,
int devNum,
int *portNdx)
 {
+   /* Reset the RIO port id to zero for this device */
void __iomem *gpregBase = ioremap(0x2010094000, 0x1000);
-   unsigned long srioCfg = 0;
+   unsigned long reg = 0;
 
if (gpregBase == NULL)
return -EFAULT;
 
-   srioCfg = inl((long unsigned int)(gpregBase + 0x60));
+   reg = inl((long unsigned int)(gpregBase + 0x60));
 
-   srioCfg &= ~(0xf << (devNum * 4));
+   reg &= ~(0xf << (devNum * 4));
 
-   outl_p(srioCfg, (long unsigned int)(gpregBase + 0x60));
+   outl_p(reg, (long unsigned int)(gpregBase + 0x60));
 
(*portNdx) = 0;
 
iounmap(gpregBase);
 
+   /* Verify that this device is actually enabled */
+   ncr_read(NCP_REGION_ID(0x115, 0), 0x23c, 4, ®);
+   if ((reg & (1 << (21+(devNum*4 == 0) {
+   printk(KERN_INFO "%s: SRIO%d link not ready\n",
+   dev->dev.of_node->full_name, devNum);
+   return -ENXIO;
+   }
+
return 0;
 }
diff --git a/arch/powerpc/include/asm/axxia-rio.h 
b/arch/powerpc/include/asm/axxia-rio.h
index b461b80..7d7865b 100644
--- a/arch/powerpc/include/asm/axxia-rio.h
+++ b/arch/powerpc/include/asm/axxia-rio.h
@@ -5,6 +5,8 @@
 #ifndef __ASM_AXXIA_RIO_H__
 #define __ASM_AXXIA_RIO_H__
 
+#include 
+
 /* Constants, Macros, etc. */
 
 #define AXXIA_RIO_SYSMEM_BARRIER() __asm__ __volatile__("msync")
@@ -72,7 +74,8 @@ extern int axxia_rio_apio_disable(struct rio_mport *mport);
 extern int axxia_rio_rpio_enable(struct rio_mport *mport, u32 mask, u32 bits);
 extern int axxia_rio_rpio_disable(struct rio_mport *mport);
 
-static inline int axxia_rapidio_board_init(int devNum, int *portNdx)
+static inline int axxia_rapidio_board_init(struct platform_device *dev,
+  int devNum, int *portNdx)
 {
(*portNdx) = 0;
return 0;
diff --git a/drivers/rapidio/devices/lsi/axxia-rio.c 
b/drivers/rapidio/devices/lsi/axxia-rio.c
index 5868569..4673b6b 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio.c
@@ -1624,7 +1624,7 @@ static int axxia_rio_setup(struct platform_device *dev)
  &irq, &linkdown_reset))
return -EFAULT;
 
-   rc = axxia_rapidio_board_init(ndx, &portNdx);
+   rc = axxia_rapidio_board_init(dev, ndx, &portNdx);
if (rc != 0)
return rc;
 
diff --git a/drivers/rapidio/rio.c b/drivers/rapidio/rio.c
index 5312777..3148271 100644
--- a/drivers/rapidio/rio.c
+++ b/drivers/rapidio/rio.c
@@ -1574,6 +1574,7 @@ retry:
}
kfree(nptr);
mport = rio_get_mport(RIO_ANY_ID, mport);
+   key = 0;
}
rdev = NULL;
 done:
-- 
1.7.9.5

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


[linux-yocto] [PATCH 03/30] LSI AXM55xx rapidio? Fixed offset of RAB_OBDSE_XX registers

2014-05-06 Thread Charlie Paul
From: ningligong 

The register base for the RAB was wrong changed from
0x10 to 0xC

Added the IB_VIRT stats SLEEPING and TRAN_PENDING

Signed-off-by: ningligong 
---
 drivers/rapidio/devices/lsi/axxia-rio-ds.h |   10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/rapidio/devices/lsi/axxia-rio-ds.h 
b/drivers/rapidio/devices/lsi/axxia-rio-ds.h
index 5c0d263..25633c0 100755
--- a/drivers/rapidio/devices/lsi/axxia-rio-ds.h
+++ b/drivers/rapidio/devices/lsi/axxia-rio-ds.h
@@ -73,9 +73,9 @@
 #define IB_VSID_M_PREFETCH_ENABLE  (2)
 #define IB_VSID_M_PREFETCH_WAKEUP  (4)
 
-#define RAB_OBDSE_CTRL(n)(RAB_REG_BASE + (0x2d28 + (0x10*(n
-#define RAB_OBDSE_STAT(n)(RAB_REG_BASE + (0x2d28 + (0x10*(n)))+0x4)
-#define RAB_OBDSE_DESC_ADDR(n)   (RAB_REG_BASE + (0x2d28 + (0x10*(n)))+0x8)
+#define RAB_OBDSE_CTRL(n)(RAB_REG_BASE + (0x2d28 + (0xC*(n
+#define RAB_OBDSE_STAT(n)(RAB_REG_BASE + (0x2d28 + (0xC*(n)))+0x4)
+#define RAB_OBDSE_DESC_ADDR(n)   (RAB_REG_BASE + (0x2d28 + (0xC*(n)))+0x8)
 
 #define RAB_IBVIRT_M_STAT(n) (RAB_REG_BASE + (0x2ef0 + (0x4*(n
 
@@ -95,6 +95,8 @@
 
 /* stats */
 #define IB_VIRT_M_STAT_ERROR_MASK   0x3FC
+#define IB_VIRT_M_STAT_SLEEPING(1<<11)
+#define IB_VIRT_M_STAT_TRAN_PENDING(1<<10)
 #define IB_VIRT_M_STAT_PDU_DROPPED (1 << 9)
 #define IB_VIRT_M_STAT_SEG_LOSS(1 << 8)
 #define IB_VIRT_M_STAT_MTU_LEN_MIS_ERR (1 << 7)
@@ -242,6 +244,8 @@ struct ibds_virt_m_cfg {
u32 num_hw_written_bufs;
 
u32 alias_reg_value;
+   u16 virt_vsid;
+   u16 num_data_streams;
 
 };
 
-- 
1.7.9.5

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


[linux-yocto] [PATCH 05/30] LSI AXM55xx: Fixes for mailbox open bounds checks.

2014-05-06 Thread Charlie Paul
From: Michael Bringmann 

The bounds for the input and output mbox were wrong, as
a precaution the range was corrected. The correct range
is 1 - max, not 0 to max.

Signed-off-by: Michael Bringmann 
---
 drivers/rapidio/devices/lsi/axxia-rio-irq.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/rapidio/devices/lsi/axxia-rio-irq.c 
b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
index 2ffa34b..cb16281 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio-irq.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
@@ -1013,7 +1013,7 @@ static inline int choose_ob_dme(
if (len > sz)
continue;
 
-   if (dme->entries >= (dme->entries_in_use+1)) {
+   if (dme->entries > (dme->entries_in_use+1)) {
(*ob_dme) = dme;
(*buf_sz) = sz;
return ret + i;
@@ -1290,7 +1290,7 @@ static int open_outb_mbox(struct rio_mport *mport, void 
*dev_id, int dme_no,
u64 descChainStart, descAddr;
int buf_sz = 0;
 
-   if ((entries <= 0) || (entries > priv->desc_max_entries))
+   if ((entries < 2) || (entries > priv->desc_max_entries))
return -EINVAL;
 
if (test_bit(RIO_IRQ_ENABLED, &h->state))
@@ -1648,7 +1648,7 @@ static int open_inb_mbox(struct rio_mport *mport, void 
*dev_id,
if ((mbox < 0) || (mbox >= RIO_MAX_RX_MBOX))
return -EINVAL;
 
-   if ((entries <= 0) || (entries > priv->desc_max_entries))
+   if ((entries < 2) || (entries > priv->desc_max_entries))
return -EINVAL;
 
h = &priv->ib_dme_irq[mbox];
-- 
1.7.9.5

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


[linux-yocto] [PATCH 06/30] LSI AXM55xx: Improve concurrency protection in AXXIA rapidio calls.

2014-05-06 Thread Charlie Paul
From: Michael Bringmann 

Added a state variable to the interrupt status so the interrupt
for rapidio. This status helps to identify a clearer state
when the interrupt is processed.

Signed-off-by: Michael Bringmann 
---
 drivers/rapidio/devices/lsi/axxia-rio-ds.c  |2 ++
 drivers/rapidio/devices/lsi/axxia-rio-irq.c |   48 +--
 drivers/rapidio/devices/lsi/axxia-rio-irq.h |2 ++
 3 files changed, 34 insertions(+), 18 deletions(-)

diff --git a/drivers/rapidio/devices/lsi/axxia-rio-ds.c 
b/drivers/rapidio/devices/lsi/axxia-rio-ds.c
index 4e55ed7..2627b07 100755
--- a/drivers/rapidio/devices/lsi/axxia-rio-ds.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-ds.c
@@ -1819,6 +1819,7 @@ void axxia_rio_ds_port_irq_init(
ptr_ds_priv->ob_dse_irq[i].irq_state_reg_addr =
RAB_INTR_STAT_ODSE;
ptr_ds_priv->ob_dse_irq[i].irq_state_mask = (1 << i);
+   ptr_ds_priv->ob_dse_irq[i].irq_state = 0;
ptr_ds_priv->ob_dse_irq[i].thrd_irq_fn = ob_dse_irq_handler;
ptr_ds_priv->ob_dse_irq[i].data = NULL;
ptr_ds_priv->ob_dse_irq[i].release_fn = release_ob_ds;
@@ -1838,6 +1839,7 @@ void axxia_rio_ds_port_irq_init(
ptr_ds_priv->ib_dse_vsid_irq[i].irq_state_reg_addr =
RAB_INTR_STAT_IBSE_VSID_M;
ptr_ds_priv->ib_dse_vsid_irq[i].irq_state_mask = (1 << i);
+   ptr_ds_priv->ib_dse_vsid_irq[i].irq_state = 0;
ptr_ds_priv->ib_dse_vsid_irq[i].thrd_irq_fn =
ib_dse_vsid_m_irq_handler;
ptr_ds_priv->ib_dse_vsid_irq[i].data = NULL;
diff --git a/drivers/rapidio/devices/lsi/axxia-rio-irq.c 
b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
index cb16281..9879b7e 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio-irq.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
@@ -348,19 +348,9 @@ static void reset_state_counters(struct rio_priv *priv)
 static irqreturn_t thrd_irq_handler(int irq, void *data)
 {
struct rio_irq_handler *h = data;
-   struct rio_mport *mport = h->mport;
-   u32 state;
 
atomic_inc(&thrd_handler_calls);
 
-   /**
-* Get current interrupt state and clear latched state
-* for interrupts handled by current thread.
-*/
-   __rio_local_read_config_32(mport, h->irq_state_reg_addr, &state);
-   state &= h->irq_state_mask;
-   __rio_local_write_config_32(mport, h->irq_state_reg_addr, state);
-
 #ifdef CONFIG_SRIO_IRQ_TIME
if (atomic_read(&h->start_time))
h->thrd_tb = get_tb();
@@ -370,7 +360,7 @@ static irqreturn_t thrd_irq_handler(int irq, void *data)
 * Invoke handler callback
 */
test_and_set_bit(RIO_IRQ_ACTIVE, &h->state);
-   h->thrd_irq_fn(h, state);
+   h->thrd_irq_fn(h, h->irq_state);
clear_bit(RIO_IRQ_ACTIVE, &h->state);
 
return IRQ_HANDLED;
@@ -386,18 +376,25 @@ static irqreturn_t hw_irq_handler(int irq, void *data)
 {
struct rio_irq_handler *h = data;
struct rio_mport *mport = h->mport;
-   u32 state;
 
atomic_inc(&hw_handler_calls);
 
-   __rio_local_read_config_32(mport, h->irq_state_reg_addr, &state);
-   if (state & h->irq_state_mask) {
+   /**
+* Get current interrupt state and clear latched state
+* for interrupts handled by current thread.
+*/
+   __rio_local_read_config_32(mport, h->irq_state_reg_addr, &h->irq_state);
+   h->irq_state &= h->irq_state_mask;
+   __rio_local_write_config_32(mport, h->irq_state_reg_addr, h->irq_state);
+
+   if (h->irq_state & h->irq_state_mask) {
 #ifdef CONFIG_SRIO_IRQ_TIME
if (atomic_read(&h->start_time))
h->irq_tb = get_tb();
 #endif
return IRQ_WAKE_THREAD;
}
+
return IRQ_NONE;
 }
 
@@ -1013,7 +1010,7 @@ static inline int choose_ob_dme(
if (len > sz)
continue;
 
-   if (dme->entries > (dme->entries_in_use+1)) {
+   if (dme->entries >= (dme->entries_in_use+1)) {
(*ob_dme) = dme;
(*buf_sz) = sz;
return ret + i;
@@ -1198,10 +1195,10 @@ static void ob_dme_irq_handler(struct rio_irq_handler 
*h, u32 state)
struct rio_mport *mport = h->mport;
struct rio_priv *priv = mport->priv;
struct rio_msg_dme *mbox = h->data;
-   int i;
u32 dme_stat, dw0, dme_no = 31 - CNTLZW(state);
u32 dme_ctrl;
unsigned long flags;
+   int i;
 
/**
 * Clear latched state
@@ -1253,7 +1250,6 @@ static void ob_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
if (mport->outb_msg[dme_no].mcback) {
__ob_dme_event_dbg(priv, dme_no,
   

[linux-yocto] [PATCH 04/30] LSI AXM55xx: Fixed inbound data streaming ISR handling

2014-05-06 Thread Charlie Paul
From: ningligong 

1. Fixed inbound data stream interrupt service routine to properly
   handle packets received by all virtual VSID.
2. Moved checking for vsid_in_use of an inbound DSE, the vsid_in_use
   is only valid when other two bits are set.
Signed-off-by: ningligong 
---
 drivers/rapidio/devices/lsi/axxia-rio-ds.c |  226 
 1 file changed, 131 insertions(+), 95 deletions(-)

diff --git a/drivers/rapidio/devices/lsi/axxia-rio-ds.c 
b/drivers/rapidio/devices/lsi/axxia-rio-ds.c
index 02d3751..4e55ed7 100755
--- a/drivers/rapidio/devices/lsi/axxia-rio-ds.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-ds.c
@@ -242,6 +242,7 @@ int axxia_open_ob_data_stream(
 {
struct rio_priv *priv = mport->priv;
int rc = 0;
+   struct rio_priv *priv = mport->priv;
 
axxia_api_lock(priv);
 
@@ -379,7 +380,6 @@ int open_ob_data_stream(
__rio_local_write_config_32(mport, RAB_OBDSE_DESC_ADDR(dse_id),
des_chain_start_addr_phy_low);
 
-
h = &(ptr_ds_priv->ob_dse_irq[dse_id]);
 
sprintf(ptr_dse_cfg->name, "obds-%d", dse_id);
@@ -451,7 +451,6 @@ int axxia_add_ob_data_stream(
int rc = 0;
 
/* sanity check - TBD */
-
ptr_ds_priv = &(priv->ds_priv_data);
 
/*
@@ -693,8 +692,10 @@ void ob_dse_irq_handler(struct rio_irq_handler *h, u32 
state)
ptr_hdr_desc->dw0);
 
/* free the buffer */
-   kfree((void *)ptr_hdr_desc->virt_data_buf);
-   ptr_hdr_desc->buf_status = DS_DBUF_FREED;
+   if (ptr_hdr_desc->buf_status != DS_DBUF_FREED) {
+   kfree((void *)ptr_hdr_desc->virt_data_buf);
+   ptr_hdr_desc->buf_status = DS_DBUF_FREED;
+   }
 
if (ptr_dse_cfg->hdr_read_ptr ==
(ptr_dse_cfg->max_num_hdr_desc - 1)) {
@@ -725,6 +726,7 @@ void ob_dse_irq_handler(struct rio_irq_handler *h, u32 
state)
(dse_stat & 0x3F));
 
spin_unlock_irqrestore(&ptr_dse_cfg->lock, flags);
+
return;
 }
 
@@ -831,8 +833,8 @@ int axxia_open_ib_data_stream(
int desc_dbuf_size,
int num_entries)
 {
-   struct rio_priv *priv = mport->priv;
int rc = 0;
+   struct rio_priv *priv = mport->priv;
 
axxia_api_lock(priv);
 
@@ -1050,6 +1052,7 @@ int open_ib_data_stream(
ptr_virt_m_cfg->cos = cos;
ptr_virt_m_cfg->source_id = source_id;
ptr_virt_m_cfg->desc_dbuf_size = desc_dbuf_size;
+   ptr_virt_m_cfg->virt_vsid = virt_vsid;
 
desc_chain_start_addr_phy =
virt_to_phys((void *)
@@ -1125,6 +1128,10 @@ int axxia_add_ibds_buffer(
u32 m_id;
u8  found_one = RIO_DS_FALSE;
u32 vsid_addr_reg;
+   u32 vsid;
+   u16 virt_vsid;
+   u32 alias_reg;
+   u32 vsid_m_stats;
 
unsigned long   data_addr_phy;
u32 data_addr_hi;
@@ -1136,11 +1143,20 @@ int axxia_add_ibds_buffer(
 
/* search through the virtual M table to find the one that has
**  the same source_id and cos */
+   /* find the mapping between incoming VSID and internal VSID */
+   __rio_local_read_config_32(mport, RAB_IBDS_VSID_ALIAS, &alias_reg);
+
+   /* VSID = {16'b SourceID, 8'bCOS} */
+   vsid = ((source_id & 0x) << 16) | (cos & 0xFF);
+
+   /* calculate the virtual M index */
+   (void)axxio_virt_vsid_convert(vsid, alias_reg, &virt_vsid);
+
+
for (m_id = 0; m_id < RIO_MAX_NUM_IBDS_VSID_M; m_id++) {
ptr_virt_m_cfg = &(ptr_ds_priv->ibds_vsid_m_cfg[m_id]);
 
-   if ((ptr_virt_m_cfg->source_id == source_id)&&
-   (ptr_virt_m_cfg->cos == cos)&&
+   if ((ptr_virt_m_cfg->virt_vsid == virt_vsid)&&
(ptr_virt_m_cfg->in_use == RIO_DS_TRUE)) {
found_one = RIO_DS_TRUE;
break;
@@ -1207,7 +1223,13 @@ int axxia_add_ibds_buffer(
vsid_addr_reg |= IB_VSID_M_PREFETCH_ENABLE;
 
/* wakeup bit is alway set each time a new buffer is added */
-   vsid_addr_reg |= IB_VSID_M_PREFETCH_WAKEUP;
+   __rio_local_read_config_32(mport,
+   RAB_IBVIRT_M_STAT(m_id),
+   &vsid_m_stats);
+
+   if (vsid_m_stats & IB_VIRT_M_STAT_SLEEPING)
+   vsid_addr_reg |= IB_VSID_M_PREFETCH_WAKEUP;
+
__rio_local_write_config_32(mport,
RAB_IBDS_VSID_ADDR_HI(m_id),
vsid_addr_reg);
@@ -1247,96 +1269,93 @@ void ib_dse_vsid_m_irq_handler(struct rio_irq_handler 
*h, u32 state)
u32 dse_stat, 

[linux-yocto] [PATCH 07/30] LSI AXM55xx: Fix concurrency issue for variable

2014-05-06 Thread Charlie Paul
From: Michael Bringmann 

Enable both SRIO modules by default with check for SRIOlin
ready status to validate the accesses.

Signed-off-by: Michael Bringmann 
---
 arch/arm/boot/dts/axm55xx.dts |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/axm55xx.dts b/arch/arm/boot/dts/axm55xx.dts
index 1cba111..826a6e6 100644
--- a/arch/arm/boot/dts/axm55xx.dts
+++ b/arch/arm/boot/dts/axm55xx.dts
@@ -439,7 +439,7 @@
 
 rio0: rapidio@0x31 {
 index = <0>;
-status = "disabled";
+status = "okay";
 #address-cells = <2>;
 #size-cells = <2>;
 compatible = "axxia,rapidio-delta";
@@ -454,7 +454,7 @@
 
 rio1: rapidio@0x314000 {
 index = <1>;
-status = "disabled";
+status = "okay";
 #address-cells = <2>;
 #size-cells = <2>;
 compatible = "axxia,rapidio-delta";
-- 
1.7.9.5

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


[linux-yocto] [PATCH 10/30] i2c-axxia: Adjust tLOW, tHIGH to match fast-mode requirements

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

Adjusted the controller setup to meet the timing requirements for I2C fast-mode
on the SCL signal (tLOW and tHIGH). For fast-mode, a 33/66 duty cycle of the
SCL is used to match the minimum timing requirements of 1.3/0.6 for tLOW/tHIGH.

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

diff --git a/drivers/i2c/busses/i2c-axxia.c b/drivers/i2c/busses/i2c-axxia.c
index 519cda7..e58292b 100644
--- a/drivers/i2c/busses/i2c-axxia.c
+++ b/drivers/i2c/busses/i2c-axxia.c
@@ -165,6 +165,7 @@ axxia_i2c_init(struct axxia_i2c_dev *idev)
u32 divisor = clk_get_rate(idev->i2c_clk) / idev->bus_clk_rate;
u32 clk_mhz = clk_get_rate(idev->i2c_clk) / 100;
u32 t_setup;
+   u32 t_high, t_low;
u32 tmo_clk;
u32 prescale;
unsigned long timeout;
@@ -185,15 +186,22 @@ axxia_i2c_init(struct axxia_i2c_dev *idev)
/* Enable Master Mode */
writel(0x1, &idev->regs->global_control);
 
+   if (idev->bus_clk_rate <= 10) {
+   /* Standard mode SCL 50/50, tSU:DAT = 250 ns */
+   t_high  = divisor*1/2;
+   t_low   = divisor*1/2;
+   t_setup = ns_to_clk(250, clk_mhz);
+   } else {
+   /* Fast mode SCL 33/66, tSU:DAT = 100 ns */
+   t_high  = divisor*1/3;
+   t_low   = divisor*2/3;
+   t_setup = ns_to_clk(100, clk_mhz);
+   }
+
/* SCL High Time */
-   writel(divisor/2, &idev->regs->scl_high_period);
+   writel(t_high, &idev->regs->scl_high_period);
/* SCL Low Time */
-   writel(divisor/2, &idev->regs->scl_low_period);
-
-   t_setup = (idev->bus_clk_rate <= 10) ?
-   ns_to_clk(250, clk_mhz) : /* Standard mode tSU:DAT = 250 ns */
-   ns_to_clk(100, clk_mhz); /* Fast mode tSU:DAT = 100 ns */
-
+   writel(t_low, &idev->regs->scl_low_period);
/* SDA Setup Time */
writel(t_setup, &idev->regs->sda_setup_time);
/* SDA Hold Time, 300ns */
-- 
1.7.9.5

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


[linux-yocto] [PATCH 08/30] LSI AXM55xx rapidio: Change the timers for inbound messages

2014-05-06 Thread Charlie Paul
From: Michael Bringmann 

Used 'atomic' counter to track available inbound messages
between interrupt and foreground code.

Signed-off-by: Michael Bringmann 
---
 drivers/rapidio/devices/lsi/axxia-rio-irq.c |   18 --
 drivers/rapidio/devices/lsi/axxia-rio-irq.h |2 +-
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/drivers/rapidio/devices/lsi/axxia-rio-irq.c 
b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
index 9879b7e..73b5a4c 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio-irq.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
@@ -1115,7 +1115,7 @@ static struct rio_msg_dme *alloc_message_engine(struct 
rio_mport *mport,
me->entries_in_use = 0;
me->write_idx = 0;
me->read_idx = 0;
-   me->pending = 0;
+   atomic_set(&me->pending, 0);
me->tx_dme_tmo = 0;
me->dme_no = dme_no;
 
@@ -1474,6 +1474,7 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
u32 dw0;
int dme_no = 31 - CNTLZW(dme_mask);
int num_new;
+   int nPending;
dme_mask ^= (1 << dme_no);
 
while (mb->me[letter]->dme_no != dme_no)
@@ -1550,7 +1551,7 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
me->write_idx = (me->write_idx + 1) %
 me->entries;
num_new++;
-   me->pending++;
+   atomic_inc(&me->pending);
if (num_new == me->entries)
break;
}
@@ -1564,7 +1565,8 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
__ib_dme_event_dbg(priv, dme_no,
   1 << RIO_IB_DME_RX_RING_FULL);
 
-   if (me->pending &&
+   nPending = atomic_read(&me->pending);
+   if (nPending &&
mport->inb_msg[mbox_no].mcback) {
 
mport->inb_msg[mbox_no].mcback(mport,
@@ -2345,6 +2347,7 @@ void *axxia_get_inb_message(struct rio_mport *mport, int 
mbox, int letter,
struct rio_rx_mbox *mb;
struct rio_msg_dme *me;
unsigned long iflags;
+   int nPending;
void *buf = NULL;
 
if ((mbox < 0) || (mbox >= RIO_MAX_RX_MBOX))
@@ -2371,7 +2374,8 @@ void *axxia_get_inb_message(struct rio_mport *mport, int 
mbox, int letter,
__rio_local_write_config_32(mport, RAB_INTR_ENAB_IDME, intr);
}
 
-   while (me->pending) {
+   nPending = atomic_read(&me->pending);
+   while (nPending) {
struct rio_msg_desc *desc = &me->desc[me->read_idx];
u32 dw0, dw1;
 
@@ -2399,7 +2403,8 @@ void *axxia_get_inb_message(struct rio_mport *mport, int 
mbox, int letter,
(dw0 & 0xff) | DME_DESC_DW0_VALID);
}
me->read_idx = (me->read_idx + 1) % me->entries;
-   me->pending--;
+   atomic_dec(&me->pending);
+   nPending--;
__ib_dme_event_dbg(priv, me->dme_no,
   1 << RIO_IB_DME_DESC_ERR);
} else {
@@ -2447,7 +2452,8 @@ void *axxia_get_inb_message(struct rio_mport *mport, int 
mbox, int letter,
mb->next_rx_slot = (mb->next_rx_slot + 1) %
mb->ring_size;
me->read_idx = (me->read_idx + 1) % me->entries;
-   me->pending--;
+   atomic_dec(&me->pending);
+   nPending--;
goto done;
}
}
diff --git a/drivers/rapidio/devices/lsi/axxia-rio-irq.h 
b/drivers/rapidio/devices/lsi/axxia-rio-irq.h
index fde7140..7ed5fd8 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio-irq.h
+++ b/drivers/rapidio/devices/lsi/axxia-rio-irq.h
@@ -216,7 +216,7 @@ struct rio_msg_dme {
int entries_in_use;
int write_idx;
int read_idx;
-   int pending;
+   atomic_t pending;
int tx_dme_tmo;
void *dev_id;
int dme_no;
-- 
1.7.9.5

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


[linux-yocto] [PATCH 11/30] LSI AXM55xx rapidio: Speed up bottleneck in inbox.

2014-05-06 Thread Charlie Paul
From: Michael Bringmann 

The throughput for the inbox was too slow therfore the size of the
inbox mail buffer was increased 8 times. This eased the bottlneck

Signed-off-by: Michael Bringmann 
---
 drivers/rapidio/devices/lsi/axxia-rio-irq.c |   24 +---
 drivers/rapidio/devices/lsi/axxia-rio.c |4 ++--
 2 files changed, 11 insertions(+), 17 deletions(-)

diff --git a/drivers/rapidio/devices/lsi/axxia-rio-irq.c 
b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
index 73b5a4c..6a4d227 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio-irq.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
@@ -1010,7 +1010,7 @@ static inline int choose_ob_dme(
if (len > sz)
continue;
 
-   if (dme->entries >= (dme->entries_in_use+1)) {
+   if (dme->entries > (dme->entries_in_use+1)) {
(*ob_dme) = dme;
(*buf_sz) = sz;
return ret + i;
@@ -1474,7 +1474,6 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
u32 dw0;
int dme_no = 31 - CNTLZW(dme_mask);
int num_new;
-   int nPending;
dme_mask ^= (1 << dme_no);
 
while (mb->me[letter]->dme_no != dme_no)
@@ -1514,7 +1513,7 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
 #endif
/**
 * Set Valid flag to 0 on each desc with a new message.
-* Flag is reset when the message beloning to the desc
+* Flag is reset when the message belonging to the desc
 * is fetched in get_inb_message().
 * HW descriptor update and fetch is in order.
 */
@@ -1545,6 +1544,12 @@ static void ib_dme_irq_handler(struct rio_irq_handler 
*h, u32 state)
dw0 & ~DME_DESC_DW0_VALID);
}
 
+   if (mport->inb_msg[mbox_no].mcback)
+   mport->inb_msg[mbox_no].mcback(mport,
+   me->dev_id,
+   mbox_no,
+   desc->desc_no);
+
__ib_dme_dw_dbg(priv, dw0);
__ib_dme_event_dbg(priv, dme_no,
   1 << RIO_IB_DME_RX_PUSH);
@@ -1565,16 +1570,6 @@ static void ib_dme_irq_handler(struct rio_irq_handler 
*h, u32 state)
__ib_dme_event_dbg(priv, dme_no,
   1 << RIO_IB_DME_RX_RING_FULL);
 
-   nPending = atomic_read(&me->pending);
-   if (nPending &&
-   mport->inb_msg[mbox_no].mcback) {
-
-   mport->inb_msg[mbox_no].mcback(mport,
-  me->dev_id,
-  mbox_no,
-  letter);
-   }
-
if (dme_stat & IB_DME_STAT_SLEEPING) {
struct rio_msg_desc *desc;
u32 dme_ctrl;
@@ -2129,8 +2124,7 @@ static struct rio_msg_desc *get_ob_desc(struct rio_mport 
*mport,
   DESC_TABLE_W0(desc->desc_no),
   &dw0);
}
-   if (!(dw0 & DME_DESC_DW0_VALID) ||
-   (dw0 & DME_DESC_DW0_ERROR_MASK)) {
+   if (!(dw0 & DME_DESC_DW0_VALID)) {
if (desc_num != mb->write_idx)
return NULL;
if (desc_num == mb->write_idx)
diff --git a/drivers/rapidio/devices/lsi/axxia-rio.c 
b/drivers/rapidio/devices/lsi/axxia-rio.c
index 4673b6b..1f1fc39 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio.c
@@ -1369,7 +1369,7 @@ static int rio_mport_dtb_setup(struct platform_device 
*dev,
return -ENOMEM;
}
rio_init_dbell_res(&mport->riores[RIO_DOORBELL_RESOURCE], 0, 0x);
-   rio_init_mbox_res(&mport->riores[RIO_INB_MBOX_RESOURCE], 0, 8);
+   rio_init_mbox_res(&mport->riores[RIO_INB_MBOX_RESOURCE], 0, 64);
rio_init_mbox_res(&mport->riores[RIO_OUTB_MBOX_RESOURCE], 0, 3);
sprintf(mport->name, "RIO%d mport", mport->id);
 
@@ -1743,7 +1743,7 @@ err_ops:
 /*
   The probe function for RapidIO peer-to-peer network.
 */
-static int __devinit axxia_of_rio_rpn_probe(struct platform_device *dev)
+static int axxia_of_rio_rpn_probe(struct platform_device *dev)
 {
IODP(KERN_INFO "Setting up RapidIO peer-to-peer network %s\n",
   dev->dev.of_node->full_n

[linux-yocto] [PATCH 14/30] LSI AXM55xx: Various bug fixes for rapidio endpoint controller.

2014-05-06 Thread Charlie Paul
From: Michael Bringmann 

Fix lockup issue processing inbound message descriptor chains.
Revise processing code for inbound/outbound message descriptor
chains to reduce overhead / improve performance.

Signed-off-by: Michael Bringmann 
---
 drivers/rapidio/devices/lsi/axxia-rio-irq.c |  108 ---
 drivers/rapidio/devices/lsi/axxia-rio-irq.h |3 +-
 drivers/rapidio/devices/lsi/axxia-rio.c |2 +-
 drivers/rapidio/devices/lsi/axxia-rio.h |1 +
 drivers/rapidio/rio.c   |2 +-
 5 files changed, 85 insertions(+), 31 deletions(-)

diff --git a/drivers/rapidio/devices/lsi/axxia-rio-irq.c 
b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
index 6a4d227..ae965f9 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio-irq.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
@@ -1115,7 +1115,8 @@ static struct rio_msg_dme *alloc_message_engine(struct 
rio_mport *mport,
me->entries_in_use = 0;
me->write_idx = 0;
me->read_idx = 0;
-   atomic_set(&me->pending, 0);
+   me->last_invalid_desc = 0;
+   me->last_compl_idx = 0;
me->tx_dme_tmo = 0;
me->dme_no = dme_no;
 
@@ -1223,6 +1224,9 @@ static void ob_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
for (i = 0; i < mbox->entries; i++) {
struct rio_msg_desc *desc = &mbox->desc[i];
 
+   if (mbox->last_compl_idx != desc->desc_no)
+   continue;
+
if (!priv->internalDesc) {
dw0 = *((u32 *)DESC_TABLE_W0_MEM(mbox, desc->desc_no));
} else {
@@ -1243,6 +1247,8 @@ static void ob_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
__ob_dme_dw_dbg(priv, dw0);
 
mbox->entries_in_use--;
+   mbox->last_compl_idx = (mbox->last_compl_idx + 1) %
+   mbox->entries;
 
/**
* UP-call to net device handler
@@ -1532,6 +1538,7 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
if ((dw0 & DME_DESC_DW0_READY_MASK) &&
(dw0 & DME_DESC_DW0_VALID)) {
 
+#ifdef OBSOLETE_BZ47185
/* Some chips clear this bit, some don't.
** Make sure in any event. */
if (!priv->internalDesc) {
@@ -1543,6 +1550,7 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
DESC_TABLE_W0(desc->desc_no),
dw0 & ~DME_DESC_DW0_VALID);
}
+#endif /* OBSOLETE_BZ47185 */
 
if (mport->inb_msg[mbox_no].mcback)
mport->inb_msg[mbox_no].mcback(mport,
@@ -1556,7 +1564,6 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
me->write_idx = (me->write_idx + 1) %
 me->entries;
num_new++;
-   atomic_inc(&me->pending);
if (num_new == me->entries)
break;
}
@@ -1570,6 +1577,7 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
__ib_dme_event_dbg(priv, dme_no,
   1 << RIO_IB_DME_RX_RING_FULL);
 
+#ifdef OBSOLETE_BZ47185
if (dme_stat & IB_DME_STAT_SLEEPING) {
struct rio_msg_desc *desc;
u32 dme_ctrl;
@@ -1610,6 +1618,7 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
 RAB_IB_DME_CTRL(dme_no), dme_ctrl);
}
}
+#endif /* OBSOLETE_BZ47185 */
}
 }
 
@@ -1762,6 +1771,8 @@ static int open_inb_mbox(struct rio_mport *mport, void 
*dev_id,
 */
desc--;
dw0 |= DME_DESC_DW0_NXT_DESC_VALID;
+   dw0 &= ~DME_DESC_DW0_VALID;
+   me->last_invalid_desc = desc->desc_no;
if (!priv->internalDesc) {
descChainStart =
(uintptr_t)virt_to_phys(me->descriptors);
@@ -2104,19 +2115,14 @@ void axxia_close_outb_mbox(struct rio_mport *mport, int 
mboxDme)
 static struct rio_msg_desc *get_ob_desc(struct rio_mport *mport,
struct rio_msg_dme *mb)
 {
-   int i, desc_num = mb->write_idx;
+   int desc_num = mb->write_idx;
struct rio_priv *priv = mport->priv;
+   struct rio_msg_desc *desc = &mb->desc[desc_num];
+   int nxt_write_idx = (mb->write_idx + 1) % mb->entries;
+   u32 dw0;
 
-   /**
-* HW descriptor

[linux-yocto] [PATCH 13/30] LSI AXM55xx/rapidio: Fix NULL pointer reference in rio_release_inb_mbox.

2014-05-06 Thread Charlie Paul
From: Michael Bringmann 

Signed-off-by: Michael Bringmann 
---
 drivers/rapidio/rio.c |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/rapidio/rio.c b/drivers/rapidio/rio.c
index 0fe82b3..928f1eb 100644
--- a/drivers/rapidio/rio.c
+++ b/drivers/rapidio/rio.c
@@ -343,7 +343,10 @@ int rio_release_inb_mbox(struct rio_mport *mport, int mbox)
mport->ops->close_inb_mbox(mport, mbox);
 
/* Release the mailbox resource */
-   return release_resource(mport->inb_msg[mbox].res);
+   if (mport->outb_msg[mbox].res)
+   return release_resource(mport->inb_msg[mbox].res);
+   else
+   return -ENOMEM;
} else
return -ENOSYS;
 }
-- 
1.7.9.5

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


[linux-yocto] [PATCH 18/30] i2c-axxia: Avoid timeout when interrupt delayed

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

Changed the order in which the interrupt conditions are checked in the
interrupt handler. Need to check for transfer-complete before timeout-error,
otherwise a delayed interrupt may report a false timeout error (since the
timeout may expire after the transfer was completed).

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

diff --git a/drivers/i2c/busses/i2c-axxia.c b/drivers/i2c/busses/i2c-axxia.c
index e58292b..43b433b 100644
--- a/drivers/i2c/busses/i2c-axxia.c
+++ b/drivers/i2c/busses/i2c-axxia.c
@@ -334,33 +334,6 @@ axxia_i2c_isr(int irq, void *_dev)
/* Clear interrupt */
writel(0x01, &idev->regs->interrupt_status);
 
-   if (unlikely(status & MST_STATUS_ERR)) {
-   idev->msg_err = status & MST_STATUS_ERR;
-   i2c_int_disable(idev, ~0);
-   dev_err(idev->dev, "error %s, rx=%u/%u tx=%u/%u\n",
-   status_str(idev->msg_err),
-   readl(&idev->regs->mst_rx_bytes_xfrd),
-   readl(&idev->regs->mst_rx_xfer),
-   readl(&idev->regs->mst_tx_bytes_xfrd),
-   readl(&idev->regs->mst_tx_xfer));
-   complete(&idev->msg_complete);
-   return IRQ_HANDLED;
-   }
-
-   /* Stop completed? */
-   if (status & MST_STATUS_SCC) {
-   i2c_int_disable(idev, ~0);
-   complete(&idev->msg_complete);
-   }
-
-   /* Transfer done? */
-   if (status & (MST_STATUS_SNS | MST_STATUS_SS)) {
-   if (i2c_m_rd(idev->msg) && idev->msg_xfrd < idev->msg->len)
-   axxia_i2c_empty_rx_fifo(idev);
-   i2c_int_disable(idev, ~0);
-   complete(&idev->msg_complete);
-   }
-
/* RX FIFO needs service? */
if (i2c_m_rd(idev->msg) && (status & MST_STATUS_RFL))
axxia_i2c_empty_rx_fifo(idev);
@@ -373,6 +346,29 @@ axxia_i2c_isr(int irq, void *_dev)
i2c_int_disable(idev, MST_STATUS_TFL);
}
 
+   if (status & MST_STATUS_SCC) {
+   /* Stop completed? */
+   i2c_int_disable(idev, ~0);
+   complete(&idev->msg_complete);
+   } else if (status & (MST_STATUS_SNS | MST_STATUS_SS)) {
+   /* Transfer done? */
+   if (i2c_m_rd(idev->msg) && idev->msg_xfrd < idev->msg->len)
+   axxia_i2c_empty_rx_fifo(idev);
+   i2c_int_disable(idev, ~0);
+   complete(&idev->msg_complete);
+   } else if (unlikely(status & MST_STATUS_ERR)) {
+   /* Transfer error? */
+   idev->msg_err = status & MST_STATUS_ERR;
+   i2c_int_disable(idev, ~0);
+   dev_err(idev->dev, "error %s, rx=%u/%u tx=%u/%u\n",
+   status_str(status),
+   readl(&idev->regs->mst_rx_bytes_xfrd),
+   readl(&idev->regs->mst_rx_xfer),
+   readl(&idev->regs->mst_tx_bytes_xfrd),
+   readl(&idev->regs->mst_tx_xfer));
+   complete(&idev->msg_complete);
+   }
+
return IRQ_HANDLED;
 }
 
-- 
1.7.9.5

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


[linux-yocto] [PATCH 20/30] kernel/irq/manage.c: Fix irq_set_affinity to allow use with buslocks

2014-05-06 Thread Charlie Paul
From: David Mercado 

Fix irq_set_affinity() to allow usage of buslocks with "slow bus"
IRQ controllers, such as the LSI Axxia GIC.

Signed-off-by: David Mercado 
---
 kernel/irq/manage.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index c891fe3..4291484 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -180,16 +180,16 @@ int __irq_set_affinity_locked(struct irq_data *data, 
const struct cpumask *mask)
  */
 int irq_set_affinity(unsigned int irq, const struct cpumask *mask)
 {
-   struct irq_desc *desc = irq_to_desc(irq);
unsigned long flags;
+   struct irq_desc *desc = irq_get_desc_buslock(irq, &flags,
+IRQ_GET_DESC_CHECK_GLOBAL);
int ret;
 
if (!desc)
return -EINVAL;
 
-   raw_spin_lock_irqsave(&desc->lock, flags);
ret =  __irq_set_affinity_locked(irq_desc_get_irq_data(desc), mask);
-   raw_spin_unlock_irqrestore(&desc->lock, flags);
+   irq_put_desc_busunlock(desc, flags);
return ret;
 }
 
-- 
1.7.9.5

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


[linux-yocto] [PATCH 16/30] LSI AXM55xx: Disable linkdown reset configuration.

2014-05-06 Thread Charlie Paul
From: Michael Bringmann 

Signed-off-by: Michael Bringmann 
---
 arch/powerpc/boot/dts/acp25xx.dts |2 ++
 arch/powerpc/boot/dts/acp35xx.dts |2 ++
 2 files changed, 4 insertions(+)

diff --git a/arch/powerpc/boot/dts/acp25xx.dts 
b/arch/powerpc/boot/dts/acp25xx.dts
index 02f6a28..b5463c5 100644
--- a/arch/powerpc/boot/dts/acp25xx.dts
+++ b/arch/powerpc/boot/dts/acp25xx.dts
@@ -292,7 +292,9 @@
 device_type = "rapidio";
 reg = <0x0020 0x0056 0x0 0x1000>; /* SRIO Conf 0 region */
 ranges = <0x0 0x0 0x0021 0x 0x0 0x4000>;
+   /*
 linkdown-reset = <0x0200 0x100 0x0020 0x0043 0x0 
0x1>;
+   */
interrupt-parent = <&MPIC>;
 interrupts = <30 2>;
 outb-dmes = <2 0x0003 1 0x0001>;
diff --git a/arch/powerpc/boot/dts/acp35xx.dts 
b/arch/powerpc/boot/dts/acp35xx.dts
index a26061d..8fd366f 100644
--- a/arch/powerpc/boot/dts/acp35xx.dts
+++ b/arch/powerpc/boot/dts/acp35xx.dts
@@ -403,7 +403,9 @@
 device_type = "rapidio";
 reg = <0x0020 0x0056 0x0 0x1000>; /* SRIO Conf 0 region */
 ranges = <0x0 0x0 0x0021 0x 0x0 0x4000>;
+   /*
 linkdown-reset = <0x0200 0x100 0x0020 0x0040A000 0x0 
0x1>;
+   */
 interrupt-parent = <&MPIC>;
 interrupts = <56 2>;
 outb-dmes = <2 0x0003 1 0x0001>;
-- 
1.7.9.5

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


[linux-yocto] [PATCH 12/30] LSI AXM55x rapidio: removed __devinit from init routines

2014-05-06 Thread Charlie Paul
From: Michael Bringmann 

Removed __devinit from the initialization routines. There
was no more need to insure that the driver was initializedi
before it is instanciated. The device is registered prior
to initialization.

Signed-off-by: Michael Bringmann 
---
 drivers/rapidio/rio.c |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/rapidio/rio.c b/drivers/rapidio/rio.c
index 3148271..0fe82b3 100644
--- a/drivers/rapidio/rio.c
+++ b/drivers/rapidio/rio.c
@@ -414,7 +414,10 @@ int rio_release_outb_mbox(struct rio_mport *mport, int 
mbox)
mport->ops->close_outb_mbox(mport, mbox);
 
/* Release the mailbox resource */
-   return release_resource(mport->outb_msg[mbox].res);
+   if (mport->outb_msg[mbox].res)
+   return release_resource(mport->outb_msg[mbox].res);
+   else
+   return -ENOMEM;
} else
return -ENOSYS;
 }
@@ -1729,7 +1732,7 @@ static void rio_fixup_device(struct rio_dev *dev)
 {
 }
 
-static int __devinit rio_init(void)
+static int rio_init(void)
 {
struct rio_dev *dev = NULL;
 
@@ -1741,7 +1744,7 @@ static int __devinit rio_init(void)
  * @note No lock; Assuming this is used at boot time only,
  *   before start of user space
  */
-int __devinit rio_init_mports(void)
+int rio_init_mports(void)
 {
struct rio_mport *port;
 
-- 
1.7.9.5

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


[linux-yocto] [PATCH 17/30] LSI AXM55xx: Move datastream APIs and symbols to public header file.

2014-05-06 Thread Charlie Paul
From: Michael Bringmann 

Signed-off-by: Michael Bringmann 
---
 drivers/rapidio/devices/lsi/axxia-rio-ds.c  |  539 ++-
 drivers/rapidio/devices/lsi/axxia-rio-ds.h  |  330 +---
 drivers/rapidio/devices/lsi/axxia-rio-irq.c |6 +-
 drivers/rapidio/devices/lsi/axxia-rio.c |6 +-
 drivers/rapidio/devices/lsi/axxia-rio.h |3 +-
 include/linux/rio-axxia.h   |  322 
 6 files changed, 634 insertions(+), 572 deletions(-)
 create mode 100644 include/linux/rio-axxia.h

diff --git a/drivers/rapidio/devices/lsi/axxia-rio-ds.c 
b/drivers/rapidio/devices/lsi/axxia-rio-ds.c
index 2627b07..0e5be61 100755
--- a/drivers/rapidio/devices/lsi/axxia-rio-ds.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-ds.c
@@ -44,24 +44,23 @@
 /* #define ALLOC_BUF_BY_KERNEL 1 */
 
 static inline void __ib_virt_m_dbg(
-   struct rio_ds_ibds_vsid_m_stats *ptr_ib_stats,
+   struct axxia_rio_ds_ibds_vsid_m_stats *ptr_ib_stats,
u32 virt_m_stat);
 
 static inline void __ob_dse_dbg(
-   struct rio_ds_obds_dse_stats *ptr_ob_stats,
+   struct axxia_rio_ds_obds_dse_stats *ptr_ob_stats,
u32 dse_stat);
 
 static inline void __ob_dse_dw_dbg(
-   struct rio_ds_obds_dse_stats *ptr_ob_stats,
+   struct axxia_rio_ds_obds_dse_stats *ptr_ob_stats,
u32 dw0);
 
 static inline void __ib_dse_dw_dbg(
-   struct rio_ds_ibds_vsid_m_stats *ptr_ib_stats,
+   struct axxia_rio_ds_ibds_vsid_m_stats *ptr_ib_stats,
u32 dw0);
 
-
 static inline void __ib_virt_m_dbg(
-   struct rio_ds_ibds_vsid_m_stats *ptr_ib_stats,
+   struct axxia_rio_ds_ibds_vsid_m_stats *ptr_ib_stats,
u32 virt_m_stat)
 {
if (virt_m_stat & IB_VIRT_M_STAT_ERROR_MASK) {
@@ -92,7 +91,7 @@ static inline void __ib_virt_m_dbg(
 }
 
 static inline void __ob_dse_dbg(
-   struct rio_ds_obds_dse_stats *ptr_ob_stats,
+   struct axxia_rio_ds_obds_dse_stats *ptr_ob_stats,
u32 dse_stat)
 {
if (dse_stat & OB_DSE_STAT_ERROR_MASK) {
@@ -111,7 +110,7 @@ static inline void __ob_dse_dbg(
 }
 
 static inline void __ob_dse_dw_dbg(
-   struct rio_ds_obds_dse_stats *ptr_ob_stats,
+   struct axxia_rio_ds_obds_dse_stats *ptr_ob_stats,
u32 dw0)
 {
if (dw0 & OB_DSE_DESC_ERROR_MASK) {
@@ -123,7 +122,7 @@ static inline void __ob_dse_dw_dbg(
 }
 
 static inline void __ib_dse_dw_dbg(
-   struct rio_ds_ibds_vsid_m_stats *ptr_ib_stats,
+   struct axxia_rio_ds_ibds_vsid_m_stats *ptr_ib_stats,
u32 dw0)
 {
if (dw0 & IB_DSE_DESC_ERROR_MASK) {
@@ -154,16 +153,16 @@ static inline void __ib_dse_dw_dbg(
  * Returns %0 on success
  /
 int axxia_data_stream_global_cfg(
-   struct rio_mport*mport,
+   struct rio_mport   *mport,
int mtu,
int ibds_avsid_mapping)
 {
-   struct rio_priv *priv = mport->priv;
-   struct rio_ds_priv  *ptr_ds_priv = &(priv->ds_priv_data);
-   struct ibds_virt_m_cfg  *ptr_virt_m_cfg;
-   struct rio_obds_dse_cfg *ptr_dse_cfg;
-   int reg_val;
-   u32 mtu_value = 0;
+   struct rio_priv*priv = mport->priv;
+   struct axxia_rio_ds_cfg *ptr_ds_cfg = &(priv->ds_cfg_data);
+   struct axxia_ibds_virt_m_cfg  *ptr_virt_m_cfg;
+   struct axxia_rio_obds_dse_cfg *ptr_dse_cfg;
+   int reg_val;
+   u32 mtu_value = 0;
int i;
 
/* sanity check */
@@ -176,13 +175,13 @@ int axxia_data_stream_global_cfg(
**  IBDS ALIAS M is used.
*/
for (i = 0; i < RIO_MAX_NUM_IBDS_VSID_M; i++) {
-   ptr_virt_m_cfg = &(ptr_ds_priv->ibds_vsid_m_cfg[i]);
+   ptr_virt_m_cfg = &(ptr_ds_cfg->ibds_vsid_m_cfg[i]);
if (ptr_virt_m_cfg->in_use == RIO_DS_TRUE)
return -EINVAL;
}
 
for (i = 0; i < RIO_MAX_NUM_OBDS_DSE; i++) {
-   ptr_dse_cfg = &(ptr_ds_priv->obds_dse_cfg[i]);
+   ptr_dse_cfg = &(ptr_ds_cfg->obds_dse_cfg[i]);
if (ptr_dse_cfg->in_use == RIO_DS_TRUE)
return -EINVAL;
}
@@ -203,8 +202,8 @@ int axxia_data_stream_global_cfg(
__rio_local_write_config_32(mport, RAB_IBDS_VSID_ALIAS, reg_val);
 
/* save information in the system */
-   ptr_ds_priv->mtu = mtu;
-   ptr_ds_priv->ibds_avsid_mapping = ibds_avsid_mapping;
+   ptr_ds_cfg->mtu = mtu;
+   ptr_ds_cfg->ibds_avsid_mapping = ibds_avsid_mapping;
 
return 0;
 }
@@ -240,7 +239,6 @@ int axxia_open_ob_data_stream(
int num_header_entries,
int num_data_entries)
 {
-   struct rio_priv *priv = mport->priv;
int rc = 0;
struct rio_priv *priv = mport->priv;
 
@@ -280,19 +278,20 @@ int open_ob_data_stream(
int

[linux-yocto] [PATCH 09/30] axxia: Device tree and Target Name/Machine Type Update

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

In some cases, the differences between simulation, emulation,
and hardware are important. This patch updates the device trees
to indicate the correct name and the arch/arm/mach-axxia code
to use it.

Signed-off-by: John Jacques 
---
 arch/arm/boot/dts/axm55xxemu.dts|   25 +---
 arch/arm/boot/dts/axm55xxemu7.dts   |  217 +++
 arch/arm/boot/dts/axm55xxsim.dts|2 +-
 arch/arm/boot/dts/axm55xxsim16.dts  |2 +-
 arch/arm/mach-axxia/axxia.c |3 +-
 arch/arm/mach-axxia/ddr_retention.c |   33 --
 6 files changed, 247 insertions(+), 35 deletions(-)
 create mode 100644 arch/arm/boot/dts/axm55xxemu7.dts

diff --git a/arch/arm/boot/dts/axm55xxemu.dts b/arch/arm/boot/dts/axm55xxemu.dts
index 1b22b33..93222c1 100644
--- a/arch/arm/boot/dts/axm55xxemu.dts
+++ b/arch/arm/boot/dts/axm55xxemu.dts
@@ -24,7 +24,7 @@
 
 / {
model = "AXM5516";
-   compatible = "arm", "lsi,axm5516";
+   compatible = "arm", "lsi,axm5516-emu";
interrupt-parent = <&gic>;
#address-cells = <2>;
#size-cells = <2>;
@@ -68,29 +68,6 @@
reg = <3>;
 cpu-release-addr = <0>; // Fixed by the boot loader
};
-
-   /*
-   cpu@4 {
-   device_type = "cpu";
-   compatible = "arm,cortex-a15";
-   reg = <4>;
-cpu-release-addr = <0>; // Fixed by the boot loader
-   };
-
-   cpu@5 {
-   device_type = "cpu";
-   compatible = "arm,cortex-a15";
-   reg = <5>;
-cpu-release-addr = <0>; // Fixed by the boot loader
-   };
-
-   cpu@6 {
-   device_type = "cpu";
-   compatible = "arm,cortex-a15";
-   reg = <6>;
-cpu-release-addr = <0>; // Fixed by the boot loader
-   };
-   */
};
 
clocks {
diff --git a/arch/arm/boot/dts/axm55xxemu7.dts 
b/arch/arm/boot/dts/axm55xxemu7.dts
new file mode 100644
index 000..6da4393
--- /dev/null
+++ b/arch/arm/boot/dts/axm55xxemu7.dts
@@ -0,0 +1,217 @@
+/*
+ * 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
+   };
+
+   cpu@1 {
+   device_type = "cpu";
+   compatible = "arm,cortex-a15";
+   reg = <1>;
+cpu-release-addr = <0>; // Fixed by the boot loader
+   };
+
+   cpu@2 {
+   device_type = "cpu";
+   compatible = "arm,cortex-a15";
+   reg = <2>;
+cpu-release-addr = <0>; // Fixed by the boot loader
+   };
+
+   cpu@3 {
+   device_type = "cpu";
+   compatible = "arm,cortex-a15";
+   reg = <3>;
+cpu-release-addr = <0>; // Fixed by the boot loader
+   };
+
+   cpu@4 {
+   device_type = "cpu";
+   compatible = "arm,cortex-a15";
+   reg = <4>;
+cpu-release-addr = <0>; // Fixed by the boot loader
+   };
+
+   cpu@5 {
+   device_type = "cpu";
+   compatible = "arm,

[linux-yocto] [PATCH 21/30] LSI AXM55xx: Axxia GIC driver improvements (3rd gen)

2014-05-06 Thread Charlie Paul
From: David Mercado 

Introduce the use of "slow" bus locking to allow use of Linux RPC
mechanism, remove unnecessary memory barriers, etc.

Signed-off-by: David Mercado 
---
 arch/arm/mach-axxia/axxia-gic.c | 1109 ---
 1 file changed, 563 insertions(+), 546 deletions(-)

diff --git a/arch/arm/mach-axxia/axxia-gic.c b/arch/arm/mach-axxia/axxia-gic.c
index 8a8e8eb..701d65f 100644
--- a/arch/arm/mach-axxia/axxia-gic.c
+++ b/arch/arm/mach-axxia/axxia-gic.c
@@ -3,7 +3,7 @@
  *
  *  Cloned from linux/arch/arm/common/gic.c
  *
- *  Copyright (C) 2002 ARM Limited, All Rights Reserved.
+ *  Copyright (C) 2013 LSI Corporation
  *
  * 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
@@ -33,24 +33,11 @@
  * registers are banked per-cpu for these sources.
  */
 
-#include 
-#include 
-#include 
 #include 
-#include 
-#include 
-#include 
-#include 
 #include 
-#include 
 #include 
-#include 
-#include 
-#include 
-#include 
-#include 
+#include 
 
-#include 
 #include 
 #include 
 #include 
@@ -87,13 +74,7 @@ enum axxia_ext_ipi_num {
MAX_AXM_IPI_NUM
 };
 
-/*
- * Some big arbritary number that won't ever conflict with
- * the IPI numbers defined in arch/arm/kernel/smp.c
- */
-#define AXXIA_RPC 0xff
-
-/* RPC Message types. */
+/* MUX Message types. */
 enum axxia_mux_msg_type {
MUX_MSG_CALL_FUNC = 0,
MUX_MSG_CALL_FUNC_SINGLE,
@@ -113,11 +94,6 @@ static void muxed_ipi_message_pass(const struct cpumask 
*mask,
struct axxia_mux_msg *info;
int cpu;
 
-   /*
-* Order previous accesses before accesses in the IPI handler.
-*/
-   dmb();
-
for_each_cpu(cpu, mask) {
info = &per_cpu(ipi_mux_msg, cpu_logical_map(cpu));
info->msg |= 1 << ipi_num;
@@ -129,8 +105,6 @@ static void axxia_ipi_demux(struct pt_regs *regs)
struct axxia_mux_msg *info = &__get_cpu_var(ipi_mux_msg);
u32 all;
 
-   mb();
-
do {
all = xchg(&info->msg, 0);
if (all & (1 << MUX_MSG_CALL_FUNC))
@@ -153,19 +127,54 @@ struct gic_chip_data {
union gic_base dist_base;
union gic_base cpu_base;
 #ifdef CONFIG_CPU_PM
-   u32 saved_spi_enable[DIV_ROUND_UP(MAX_GIC_INTERRUPTS, 32)];
-   u32 saved_spi_conf[DIV_ROUND_UP(MAX_GIC_INTERRUPTS, 16)];
-   u32 saved_spi_target[DIV_ROUND_UP(MAX_GIC_INTERRUPTS, 4)];
-   u32 __percpu *saved_ppi_enable;
-   u32 __percpu *saved_ppi_conf;
+   u32 saved_spi_enable[DIV_ROUND_UP(MAX_GIC_INTERRUPTS, 32)]
+   [MAX_NUM_CLUSTERS];
+   u32 saved_spi_conf[DIV_ROUND_UP(MAX_GIC_INTERRUPTS, 16)]
+ [MAX_NUM_CLUSTERS];
+   u32 saved_spi_target[DIV_ROUND_UP(MAX_GIC_INTERRUPTS, 4)]
+   [MAX_NUM_CLUSTERS];
+   u32 __percpu *saved_ppi_enable[MAX_NUM_CLUSTERS];
+   u32 __percpu *saved_ppi_conf[MAX_NUM_CLUSTERS];
 #endif
struct irq_domain *domain;
unsigned int gic_irqs;
 };
 
+enum gic_rpc_func_mask {
+   IRQ_MASK = 0x01,
+   IRQ_UNMASK = 0x02,
+   SET_TYPE = 0x04,
+   SET_AFFINITY = 0x08,
+   CLR_AFFINITY = 0x10,
+   GIC_NOTIFIER = 0x20,
+   MAX_GIC_FUNC_MASK
+};
+
+
+#ifdef CONFIG_CPU_PM
+struct gic_notifier_data {
+   struct notifier_block *self;
+   unsigned long cmd;
+   void *v;
+};
+#endif
+
+struct gic_rpc_data {
+   struct irq_data *d;
+   u32 func_mask;
+   u32 cpu, oldcpu;
+   u32 type;
+   const struct cpumask *mask_val;
+#ifdef CONFIG_CPU_PM
+   struct gic_notifier_data gn_data;
+#endif
+};
+
 static DEFINE_RAW_SPINLOCK(irq_controller_lock);
+static DEFINE_MUTEX(irq_bus_lock);
 
-static struct gic_chip_data gic_data[MAX_NUM_CLUSTERS] __read_mostly;
+static struct gic_chip_data gic_data __read_mostly;
+static struct gic_rpc_data gic_rpc_data = {NULL, 0, 0, 0, 0, NULL};
 
 #define gic_data_dist_base(d)  ((d)->dist_base.common_base)
 #define gic_data_cpu_base(d)   ((d)->cpu_base.common_base)
@@ -188,88 +197,88 @@ static inline unsigned int gic_irq(struct irq_data *d)
return d->hwirq;
 }
 
-typedef void axxia_call_func_t(void *info);
-
-struct axxia_gic_rpc {
-   int cpu;
-   axxia_call_func_t *func;
-   void *info;
-};
-
-static DEFINE_PER_CPU_SHARED_ALIGNED(struct axxia_gic_rpc, axxia_gic_rpc);
-
-void axxia_gic_handle_gic_rpc(void)
-{
-   u32 this_cpu = cpu_logical_map(smp_processor_id());
-   int cpu;
-
-   for_each_possible_cpu(cpu)
-   {
-   struct axxia_gic_rpc *slot = &per_cpu(axxia_gic_rpc, cpu);
-   if (slot->func && slot->cpu == this_cpu) {
-   slot->func(slot->info);
-   slot->func = NULL;
-   dmb();
-   }
-   }
-}
-
-static void axxia_gic_handle_gic_rpc_ipi(void)
-{
-   irq_enter();
-   axxia_gic_handle_gi

[linux-yocto] [PATCH 15/30] LSI AXM55xx: Configuration updates and bug fixes for rapidio.

2014-05-06 Thread Charlie Paul
From: Michael Bringmann 

Update the powerpc FDT settings for the latest AXXIA RIO code.
Update the ARM/PowerPC LSI configuration to build AXXIA RIO by default.
Add support to reset the AXXIA RIO controller when a Link Reset Request
symbol is received.

Signed-off-by: Michael Bringmann 
---
 arch/powerpc/boot/dts/acp25xx.dts |   35 ++
 arch/powerpc/boot/dts/acp342x.dts |   37 +++---
 arch/powerpc/boot/dts/acp344x.dts |   37 +++---
 arch/powerpc/boot/dts/acp35xx.dts |   27 +++
 drivers/rapidio/devices/lsi/axxia-rio-irq.c   |   64 +++--
 drivers/rapidio/devices/lsi/axxia-rio-irq.h   |1 +
 drivers/rapidio/devices/lsi/axxia-rio-sysfs.c |   15 +++---
 drivers/rapidio/devices/lsi/axxia-rio.c   |2 +-
 8 files changed, 123 insertions(+), 95 deletions(-)

diff --git a/arch/powerpc/boot/dts/acp25xx.dts 
b/arch/powerpc/boot/dts/acp25xx.dts
index 1207631..02f6a28 100644
--- a/arch/powerpc/boot/dts/acp25xx.dts
+++ b/arch/powerpc/boot/dts/acp25xx.dts
@@ -283,27 +283,20 @@
 >;
 };
 
-rio0: rapidio@f002 {
-compatible = "lsi,rapidio-delta";
+rio0: rapidio@0x21 {
+index = <0>;
+status = "okay";
+#address-cells = <2>;
+#size-cells = <2>;
+compatible = "axxia,rapidio-delta";
 device_type = "rapidio";
-enabled = <0>;
-#size = <0>;/* 0 = (256, small system)
- * 1 = (65536, large system) */
-/*
-#host-device-id = <1>;
-*/
-/* >=0 for enum; < 0 for disc */
-/*
-num-dme = <1 0 1>;
-*/
-/* (#outb-mseg>, <#outb-sseg>, <#inb> */
-/*
-num-odme-mseg-desc = <2 128 128>;
-num-odme-sseg-desc = <1 256>;
-num-idme-desc = <1 512>;
-*/
-reg = <0xf002 0x2 0x1000>; /* SRIO Conf region */
-interrupt-parent = <&MPIC>;
-interrupts = <30 0x2 /* NCP_INTR_MPIC_SRC_AXIS_SRIO */>;
+reg = <0x0020 0x0056 0x0 0x1000>; /* SRIO Conf 0 region */
+ranges = <0x0 0x0 0x0021 0x 0x0 0x4000>;
+linkdown-reset = <0x0200 0x100 0x0020 0x0043 0x0 
0x1>;
+   interrupt-parent = <&MPIC>;
+interrupts = <30 2>;
+outb-dmes = <2 0x0003 1 0x0001>;
+   enable_ds = <1>;
 };
+
 };
diff --git a/arch/powerpc/boot/dts/acp342x.dts 
b/arch/powerpc/boot/dts/acp342x.dts
index c9c8a35..99d2858 100644
--- a/arch/powerpc/boot/dts/acp342x.dts
+++ b/arch/powerpc/boot/dts/acp342x.dts
@@ -284,27 +284,22 @@
 >;
 };
 
-rio0: rapidio@f002 {
-compatible = "lsi,rapidio-delta";
+rio0: rapidio@0x208000 {
+index = <0>;
+status = "okay";
+#address-cells = <2>;
+#size-cells = <2>;
+compatible = "axxia,rapidio-delta";
 device_type = "rapidio";
-enabled = <0>;
-#size = <0>;/* 0 = (256, small system)
- * 1 = (65536, large system) */
-/*
-#host-device-id = <1>;
-*/
-/* >=0 for enum; < 0 for disc */
-/*
-num-dme = <1 0 1>;
-*/
-/* (#outb-mseg>, <#outb-sseg>, <#inb> */
-/*
-num-odme-mseg-desc = <2 128 128>;
-num-odme-sseg-desc = <1 256>;
-num-idme-desc = <1 512>;
-*/
-reg = <0xf002 0x2 0x1000>; /* SRIO Conf region */
-interrupt-parent = <&MPIC>;
-interrupts = <30 0x2 /* NCP_INTR_MPIC_SRC_AXIS_SRIO */>;
+reg = <0x0020 0x0042 0x0 0x1000>; /* SRIO Conf 0 region */
+ranges = <0x0 0x0 0x0020 0x8000 0x0 0x4000>;
+   /*
+linkdown-reset = <0x0200 0x100 0x0020 0x0043 0x0 
0x1>;
+   */
+   interrupt-parent = <&MPIC>;
+interrupts = <30 2>;
+outb-dmes = <2 0x0003 1 0x0001>;
+   enable_ds = <1>;
 };
+
 };
diff --git a/arch/powerpc/boot/dts/acp344x.dts 
b/arch/powerpc/boot/dts/acp344x.dts
index 1207631..51fa547 100644
--- a/arch/powerpc/boot/dts/acp344x.dts
+++ b/arch/powerpc/boot/dts/acp344x.dts
@@ -283,27 +283,22 @@
 >;
 };
 
-rio0: rapidio@f002 {
-compatible = "lsi,rapidio-delta";
+rio0: rapidio@0x208000 {
+index = <0>;
+status = "okay";
+#address-cells = <2>;
+#size-cells = <2>;
+compatible = "axxia,rapidio-del

[linux-yocto] [PATCH 22/30] LSI sysdev/pci: Removing the power of 2 size restriction

2014-05-06 Thread Charlie Paul
From: SangeethaRao 

This patch removes the power of 2 size restriction
for PCIe inbound mapping in LSI PCIe driver

Signed-off-by: SangeethaRao 
---
 arch/powerpc/sysdev/lsi_pci.c |   16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/sysdev/lsi_pci.c b/arch/powerpc/sysdev/lsi_pci.c
index 75bdf53..f485343 100644
--- a/arch/powerpc/sysdev/lsi_pci.c
+++ b/arch/powerpc/sysdev/lsi_pci.c
@@ -114,8 +114,9 @@ static int __init acp_parse_dma_ranges(struct 
pci_controller *hose,
 * within 32 bits space
 */
if (cpu_addr != 0 || pci_addr > 0x) {
-   printk(KERN_WARNING "%s: Ignored unsupported dma range"
-  " 0x%016llx...0x%016llx -> 0x%016llx\n",
+   printk(KERN_WARNING "%s: Ignored unsupported" \
+   "dma range"\
+  " 0x%016llx...0x%016llx -> 0x%016llx\n",\
   hose->dn->full_name,
   pci_addr, pci_addr + size - 1, cpu_addr);
continue;
@@ -148,15 +149,14 @@ static int __init acp_parse_dma_ranges(struct 
pci_controller *hose,
 * DMA bounce buffers
 */
if (size < total_memory) {
-   printk(KERN_ERR "%s: dma-ranges too small "
-  "(size=%llx total_memory=%llx)\n",
+   printk(KERN_ERR "%s: dma-ranges too small "\
+  "(size=%llx total_memory=%llx)\n",\
   hose->dn->full_name, size, (u64)total_memory);
return -ENXIO;
}
 
-   /* Check we are a power of 2 size and that base is a multiple of size*/
-   if ((size & (size - 1)) != 0  ||
-   (res->start & (size - 1)) != 0) {
+   /* Check that base is a multiple of size*/
+   if ((res->start & (size - 1)) != 0) {
printk(KERN_ERR "%s: dma-ranges unaligned\n",
   hose->dn->full_name);
return -ENXIO;
@@ -288,7 +288,7 @@ static int acp_pciex_validate_bdf(struct pciex_port *port,
/* Check we are within the mapped range */
if (bus->number > port->hose->last_busno) {
if (!message) {
-   printk(KERN_WARNING "Warning! Probing bus %u"
+   printk(KERN_WARNING "Warning! Probing bus %u"\
   " out of range !\n", bus->number);
message++;
}
-- 
1.7.9.5

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


[linux-yocto] [PATCH 27/30] arch/powerpc: Don't Try to Use NAND on Axxia 3500

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

If NAND is enabled and the board is 3500 then
gracefully exit with the error message

NAND not compatible with 3500

Signed-off-by: John Jacques 
---
 drivers/mtd/nand/lsi_acp_nand.c |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/lsi_acp_nand.c b/drivers/mtd/nand/lsi_acp_nand.c
index c3165d9..1cac342 100644
--- a/drivers/mtd/nand/lsi_acp_nand.c
+++ b/drivers/mtd/nand/lsi_acp_nand.c
@@ -3471,6 +3471,13 @@ lsi_nand_init(void)
static const char *part_probe_types[]
= { "cmdlinepart", "ofpart", NULL };
 
+   np = of_find_compatible_node(NULL, NULL, "lsi,acp3500");
+
+   if (NULL != np) {
+   printk(KERN_ERR "NAND Support is Not Yet Available on 3500\n");
+   return -1;
+   }
+
memset(&ppdata, 0, sizeof(ppdata));
 
np = of_find_node_by_type(np, "nand");
@@ -3490,7 +3497,7 @@ lsi_nand_init(void)
enabled = of_get_property(np, "enabled", NULL);
 
if (!enabled || (enabled && (0 == *enabled))) {
-   printk("ACP NAND Controller Isn't Enabled.\n");
+   printk(KERN_INFO "ACP NAND Controller Isn't 
Enabled.\n");
return -ENODEV;
}
 
-- 
1.7.9.5

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


[linux-yocto] [PATCH 29/30] LSI AXM55xx i2c: Adding support for AXM3500 I2C driver

2014-05-06 Thread Charlie Paul
From: SangeethaRao 

This patch adds i2c support for the 3500 board

Signed-off-by: SangeethaRao 
---
 drivers/i2c/busses/i2c-axxia.c |   11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-axxia.c b/drivers/i2c/busses/i2c-axxia.c
index 43b433b..b2cdbba 100644
--- a/drivers/i2c/busses/i2c-axxia.c
+++ b/drivers/i2c/busses/i2c-axxia.c
@@ -14,7 +14,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -501,6 +500,10 @@ axxia_i2c_probe(struct platform_device *pdev)
u32 bus = pdev->id;
int irq = 0;
int ret = 0;
+   int speed_property = 0;
+
+   speed_property = of_find_compatible_node(NULL, NULL,
+   "lsi,axxia35xx") != NULL;
 
base = of_iomap(np, 0);
if (!base) {
@@ -537,7 +540,11 @@ axxia_i2c_probe(struct platform_device *pdev)
 
of_property_read_u32(np, "bus", &bus);
 
-   of_property_read_u32(np, "clock-frequency", &idev->bus_clk_rate);
+   if (speed_property)
+   of_property_read_u32(np, "speed", &idev->bus_clk_rate);
+   else
+   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 */
-- 
1.7.9.5

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


[linux-yocto] [PATCH 24/30] arch/powerpc: Updated the UART Driver to Support 3500

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

Added code to support the UART on the 3500 board

Signed-off-by: John Jacques 
---
 drivers/tty/serial/lsi_acp_serial.c |   94 +++
 1 file changed, 51 insertions(+), 43 deletions(-)

diff --git a/drivers/tty/serial/lsi_acp_serial.c 
b/drivers/tty/serial/lsi_acp_serial.c
index a41eab2..0f9f7ce 100644
--- a/drivers/tty/serial/lsi_acp_serial.c
+++ b/drivers/tty/serial/lsi_acp_serial.c
@@ -81,9 +81,8 @@ struct uart_acp_port {
unsigned int interrupt_mask;
unsigned int old_status;
void *timer_base;
-   unsigned long divisor;
-   unsigned char ibrd;
-   unsigned char fbrd;
+   unsigned short ibrd;
+   unsigned short fbrd;
 };
 
 /*
@@ -119,25 +118,10 @@ struct uart_acp_port {
 static int
 get_clock_stuff(struct uart_acp_port *port, int baud_rate)
 {
-   unsigned long divisor;
unsigned long ibrd;
unsigned long fbrd;
 
-   /*
- Since the IBDR (integer part of the baud rate
- divisor) is a 16 bit quatity, find the minimum load
- value that will let the IBDR/FBDR result in the
- desired baud rate.
-   */
-
-   if (100 < per_clock) {
-   divisor = per_clock / 2500;
-   ibrd = 2500 / (16 * baud_rate);
-   } else {
-   /* Emulation is much slower... */
-   divisor = per_clock / 325;
-   ibrd = 325 / (16 * baud_rate);
-   }
+   ibrd = per_clock / (16 * baud_rate);
 
/*
 * The following formula is from the ARM document (ARM DDI 0183E).
@@ -164,36 +148,15 @@ get_clock_stuff(struct uart_acp_port *port, int baud_rate)
 * 2 * (16 * baud_rate)
 */
 
-   port->port.uartclk = (per_clock / divisor);
+   port->port.uartclk = per_clock;
 
fbrd = port->port.uartclk % (16 * baud_rate);
fbrd *= 128;
fbrd += (16 * baud_rate);
fbrd /= (2 * (16 * baud_rate));
 
-   port->divisor = (divisor - 1);
-   port->ibrd = (unsigned char) ibrd;
-   port->fbrd = (unsigned char) fbrd;
-
-   if (port->divisor != in_le32(port->timer_base + TIMER_LOAD)) {
-   while (0 ==
-  (in_le32((const volatile unsigned *)
-   (port->port.membase + UART01x_FR)) &
-   UART011_FR_TXFE))
-   ;
-
-   while (0 !=
-  (in_le32((const volatile unsigned *)
-   (port->port.membase + UART01x_FR)) &
-   UART01x_FR_BUSY))
-   ;
-
-   out_le32((port->timer_base + TIMER_CONTROL), 0);
-   out_le32((port->timer_base + TIMER_LOAD), port->divisor);
-   out_le32((port->timer_base + TIMER_CONTROL),
-(TIMER_CONTROL_ENABLE |
- TIMER_CONTROL_MODE));
-   }
+   port->ibrd = (unsigned short) ibrd;
+   port->fbrd = (unsigned short) fbrd;
 
return 0;
 }
@@ -1135,6 +1098,51 @@ acp_serial_add_ports(struct uart_driver *driver)
ret = -ENOMEM;
}
 
+   np = of_find_compatible_node(NULL, NULL, "lsi,acp3500");
+
+   if (NULL == np) {
+   unsigned long divisor;
+
+   /*
+ In the 3500 case, the peripheral clock is connected
+ directly to the UART.  If this isn't 3500, set up
+ the second timer (which is in between the peripheral
+ clock and the UART) and adjust per_clock
+ accordingly.
+   */
+
+   if (100 < per_clock) {
+   divisor = per_clock / 2500;
+   per_clock = 2500;
+   } else {
+   /* Emulation is much slower... */
+   divisor = per_clock / 325;
+   per_clock = 325;
+   }
+
+   --divisor;
+
+   if (divisor != in_le32(uap->timer_base + TIMER_LOAD)) {
+   while (0 ==
+  (in_le32((const volatile unsigned *)
+   (uap->port.membase + UART01x_FR)) &
+   UART011_FR_TXFE))
+   ;
+
+   while (0 !=
+  (in_le32((const volatile unsigned *)
+   (uap->port.membase + UART01x_FR)) &
+   UART01x_FR_BUSY))
+   ;
+
+   out_le32((uap->timer_base + TIMER_CONTROL), 0);
+   out_le32((uap->timer_base + TIMER_LOAD), divisor);
+   out_le32((uap->timer_base + TIMER_CONTROL),
+(TIMER_CONTROL_ENABLE |
+ TIMER_CONTROL_MODE));
+   }
+   }
+

[linux-yocto] [PATCH 25/30] i2c-axxia: Fixed i2c device minor numbers

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

Added missing 'bus' property to the I2C device tree nodes (simulation dts
files). This is needed to get the I2C adapters numbered starting with 0.

Signed-off-by: Anders Berg 
---
 arch/arm/boot/dts/axm55xxsim.dts   |   24 
 arch/arm/boot/dts/axm55xxsim16.dts |   24 
 2 files changed, 16 insertions(+), 32 deletions(-)

diff --git a/arch/arm/boot/dts/axm55xxsim.dts b/arch/arm/boot/dts/axm55xxsim.dts
index b20b09a..511defa 100644
--- a/arch/arm/boot/dts/axm55xxsim.dts
+++ b/arch/arm/boot/dts/axm55xxsim.dts
@@ -306,45 +306,37 @@
 I2C0: i2c@0x02010084000 {
 compatible = "lsi,api2c";
 device_type = "i2c";
-enabled = <0>;
-port = <0>;
-/* bus_name = "auto"; */
-/* bus = <2>; */
 reg = <0x20 0x10084000 0x00 0x1000>;
interrupts = <0 19 4>;
+bus = <0>;
+enabled = <0>;
 };
 
 I2C1: i2c@0x02010085000 {
 compatible = "lsi,api2c";
 device_type = "i2c";
-enabled = <0>;
-port = <1>;
-/* bus_name = "auto"; */
-/* bus = <3>; */
 reg = <0x20 0x10085000 0x00 0x1000>;
interrupts = <0 20 4>;
+bus = <1>;
+enabled = <0>;
 };
 
 I2C2: i2c@0x02010086000 {
 compatible = "lsi,api2c";
 device_type = "i2c";
-enabled = <0>;
-port = <2>;
-/* bus_name = "auto"; */
-/* bus = <4>; */
 reg = <0x20 0x10086000 0x00 0x1000>;
interrupts = <0 21 4>;
+bus = <2>;
+enabled = <0>;
 };
 
 SMB: i2c@0x02010087000 {
 compatible = "lsi,api2c";
 device_type = "i2c";
-enabled = <0>;
-port = <3>;
-bus_name = "smb";
-/* bus = <5>; */
 reg = <0x20 0x10087000 0x00 0x1000>;
interrupts = <0 22 4>;
+bus = <3>;
+enabled = <0>;
 };
 };
 
diff --git a/arch/arm/boot/dts/axm55xxsim16.dts 
b/arch/arm/boot/dts/axm55xxsim16.dts
index 0ce2ff4..1ddba7c 100644
--- a/arch/arm/boot/dts/axm55xxsim16.dts
+++ b/arch/arm/boot/dts/axm55xxsim16.dts
@@ -390,45 +390,37 @@
 I2C0: i2c@0x02010084000 {
 compatible = "lsi,api2c";
 device_type = "i2c";
-enabled = <0>;
-port = <0>;
-/* bus_name = "auto"; */
-/* bus = <2>; */
 reg = <0x20 0x10084000 0x00 0x1000>;
interrupts = <0 19 4>;
+bus = <0>;
+enabled = <0>;
 };
 
 I2C1: i2c@0x02010085000 {
 compatible = "lsi,api2c";
 device_type = "i2c";
-enabled = <0>;
-port = <1>;
-/* bus_name = "auto"; */
-/* bus = <3>; */
 reg = <0x20 0x10085000 0x00 0x1000>;
interrupts = <0 20 4>;
+bus = <1>;
+enabled = <0>;
 };
 
 I2C2: i2c@0x02010086000 {
 compatible = "lsi,api2c";
 device_type = "i2c";
-enabled = <0>;
-port = <2>;
-/* bus_name = "auto"; */
-/* bus = <4>; */
 reg = <0x20 0x10086000 0x00 0x1000>;
interrupts = <0 21 4>;
+bus = <2>;
+enabled = <0>;
 };
 
 SMB: i2c@0x02010087000 {
 compatible = "lsi,api2c";
 device_type = "i2c";
-enabled = <0>;
-port = <3>;
-bus_name = "smb";
-/* bus = <5>; */
 reg = <0x20 0x10087000 0x00 0x1000>;
interrupts = <0 22 4>;
+bus = <3>;
+enabled = <0>;
 };
 };
 
-- 
1.7.9.5

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


[linux-yocto] [PATCH 26/30] LSI AXM55xx arm/axxia: improved robustness for DDR retention

2014-05-06 Thread Charlie Paul
From: Gary McGee 

- add new ncp_ddr_shutdown() function using private i/o functions.
  This eliminates unwanted code that may be introduced by use of
  the standard i/o macros/functions.
- do explicit memory copy to preload ncp_ddr_shutdown() into L2 cache
- initialize ELM sysmem capture to provide post-mortem debug capability
- fix VP engine quiesce to account for engines with different CMSI
  adaptation layers  (CAAL vs. CNAL).

Signed-off-by: Gary McGee 
---
 arch/arm/mach-axxia/Makefile|2 +-
 arch/arm/mach-axxia/ddr_retention.c |  231 
 arch/arm/mach-axxia/ddr_shutdown.c  |  332 +++
 3 files changed, 446 insertions(+), 119 deletions(-)
 create mode 100644 arch/arm/mach-axxia/ddr_shutdown.c

diff --git a/arch/arm/mach-axxia/Makefile b/arch/arm/mach-axxia/Makefile
index 47e386b..1352c37d 100644
--- a/arch/arm/mach-axxia/Makefile
+++ b/arch/arm/mach-axxia/Makefile
@@ -7,7 +7,7 @@ obj-y   += io.o
 obj-y  += ncr.o
 obj-y  += timers.o
 obj-y  += pci.o
-obj-y  += ddr_retention.o
+obj-y  += ddr_retention.o ddr_shutdown.o
 obj-$(CONFIG_I2C)  += i2c.o
 obj-$(CONFIG_AXXIA_RIO)+= rapidio.o
 obj-$(CONFIG_SMP)  += platsmp.o headsmp.o
diff --git a/arch/arm/mach-axxia/ddr_retention.c 
b/arch/arm/mach-axxia/ddr_retention.c
index 7e4687d..6429151 100644
--- a/arch/arm/mach-axxia/ddr_retention.c
+++ b/arch/arm/mach-axxia/ddr_retention.c
@@ -26,7 +26,9 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+
 #include 
 #include 
 #include 
@@ -36,7 +38,13 @@ static void __iomem *apb;
 static void __iomem *dickens;
 static int ddr_retention_enabled;
 
-unsigned long ncp_caal_regions_acp55xx[] = {
+enum {
+   AXXIA_ENGINE_CAAL,
+   AXXIA_ENGINE_CNAL
+};
+
+unsigned long
+ncp_caal_regions_acp55xx[] = {
NCP_REGION_ID(0x0b, 0x05),  /* SPPV2   */
NCP_REGION_ID(0x0c, 0x05),  /* SED */
NCP_REGION_ID(0x0e, 0x05),  /* DPI_HFA */
@@ -54,16 +62,22 @@ unsigned long ncp_caal_regions_acp55xx[] = {
NCP_REGION_ID(0x1c, 0x05),  /* PAB */
NCP_REGION_ID(0x1f, 0x05),  /* EIOAM0  */
NCP_REGION_ID(0x31, 0x05),  /* ISB */
-   NCP_REGION_ID(0x28, 0x05),  /* EIOASM0 */
-   NCP_REGION_ID(0x29, 0x05),  /* EIOASM1 */
-   NCP_REGION_ID(0x2a, 0x05),  /* EIOAS2  */
-   NCP_REGION_ID(0x2b, 0x05),  /* EIOAS3  */
-   NCP_REGION_ID(0x2c, 0x05),  /* EIOAS4  */
-   NCP_REGION_ID(0x2d, 0x05),  /* EIOAS5  */
-   NCP_REGION_ID(0x32, 0x05),  /* ISBS*/
NCP_REGION_ID(0xff, 0xff)
 };
 
+unsigned long
+ncp_cnal_regions_acp55xx[] = {
+   NCP_REGION_ID(0x28, 0x05), /* EIOASM0 */
+   NCP_REGION_ID(0x29, 0x05), /* EIOASM1 */
+   NCP_REGION_ID(0x2a, 0x05), /* EIOAS2  */
+   NCP_REGION_ID(0x2b, 0x05), /* EIOAS3  */
+   NCP_REGION_ID(0x2c, 0x05), /* EIOAS4  */
+   NCP_REGION_ID(0x2d, 0x05), /* EIOAS5  */
+   NCP_REGION_ID(0x32, 0x05), /* ISBS*/
+   NCP_REGION_ID(0xff, 0xff)
+};
+
+
 /*
   
--
   flush_l3
@@ -120,23 +134,41 @@ flush_l3(void)
}
 
asm volatile ("dsb" : : : "memory");
-   asm volatile ("dmb" : : : "memory");
 
return;
 }
 
 static void
-quiesce_vp_engine(void)
+quiesce_vp_engine(int engineType)
 {
-   unsigned long   *pCnalRegions = ncp_caal_regions_acp55xx;
+   unsigned long   *pEngineRegions;
unsigned long *pRegion;
+   unsigned longortOff, owtOff;
unsigned ort, owt;
unsigned long  buf = 0;
unsigned short node, target;
int  loop;
 
printk(KERN_INFO "quiescing VP engines...\n");
-   pRegion = pCnalRegions;
+
+   switch (engineType) {
+   case AXXIA_ENGINE_CNAL:
+   pEngineRegions = ncp_cnal_regions_acp55xx;
+   ortOff = 0x1c0;
+   owtOff = 0x1c4;
+   break;
+
+   case AXXIA_ENGINE_CAAL:
+   pEngineRegions = ncp_caal_regions_acp55xx;
+   ortOff = 0xf8;
+   owtOff = 0xfc;
+   break;
+
+   default:
+   return;
+   }
+
+   pRegion = pEngineRegions;
 
while (*pRegion != NCP_REGION_ID(0xff, 0xff)) {
/* set read/write transaction limits to zero */
@@ -145,15 +177,15 @@ quiesce_vp_engine(void)
pRegion++;
}
 
-   pRegion = pCnalRegions;
+   pRegion = pEngineRegions;
loop = 0;
 
while (*pRegion != NCP_REGION_ID(0xff, 0xff)) {
node = (*pRegion & 0x) >> 16;
target = *pRegion & 0x;
/

[linux-yocto] [PATCH 28/30] LSI AXM55xx: Fix PMU handler issue

2014-05-06 Thread Charlie Paul
From: David Mercado 

The AXM55xx has the PMU IRQ lines from each core in a cluster OR'ed
together. As a workaround for this, a PMU handler extension was created
in the BSP to dynamically call irq_set_affinity() to rotate the PMU IRQ
assignment as needed, in order to maintain perf accuracy. However, with
the introduction of the Axxia GIC driver "slow" bus implementation,
irq_set_affinity() cannot be called directly from interrupt context.

Instead, the PMU IRQ handler extension is removed from the BSP and the
rotation of IRQ affinity is performed directly within the Axxia GIC
driver.

Signed-off-by: David Mercado 
---
 arch/arm/mach-axxia/axxia-gic.c |   25 +
 arch/arm/mach-axxia/axxia.c |   37 -
 2 files changed, 25 insertions(+), 37 deletions(-)

diff --git a/arch/arm/mach-axxia/axxia-gic.c b/arch/arm/mach-axxia/axxia-gic.c
index 701d65f..c716dc9 100644
--- a/arch/arm/mach-axxia/axxia-gic.c
+++ b/arch/arm/mach-axxia/axxia-gic.c
@@ -907,6 +907,10 @@ asmlinkage void __exception_irq_entry 
axxia_gic_handle_irq(struct pt_regs *regs)
u32 irqstat, irqnr;
struct gic_chip_data *gic = &gic_data;
void __iomem *cpu_base = gic_data_cpu_base(gic);
+   void __iomem *dist_base = gic_data_dist_base(gic);
+   u32 pcpu = cpu_logical_map(smp_processor_id());
+   u32 cluster = pcpu / CORES_PER_CLUSTER;
+   u32 next, mask;
 
do {
irqstat = readl_relaxed(cpu_base + GIC_CPU_INTACK);
@@ -967,6 +971,27 @@ asmlinkage void __exception_irq_entry 
axxia_gic_handle_irq(struct pt_regs *regs)
writel_relaxed(irqnr, cpu_base + GIC_CPU_EOI);
break;
 
+   case IRQ_PMU:
+   /*
+* The PMU IRQ line is OR'ed among all cores
+* within a cluster, so no way to tell which
+* core actually generated this interrupt.
+* Therefore, rotate PMU IRQ affinity to allow
+* perf to work as accurately as possible. Skip
+* over offline cpus.
+*/
+   do {
+   next = (++pcpu % CORES_PER_CLUSTER) +
+   (cluster * CORES_PER_CLUSTER);
+   } while (!cpu_online(next));
+
+   mask = 0x01 << (next % CORES_PER_CLUSTER);
+   raw_spin_lock(&irq_controller_lock);
+   writeb_relaxed(mask, dist_base +
+   GIC_DIST_TARGET + IRQ_PMU);
+   raw_spin_unlock(&irq_controller_lock);
+   /* Fall through ... */
+
default:
/* External interrupt */
handle_IRQ(irqnr, regs);
diff --git a/arch/arm/mach-axxia/axxia.c b/arch/arm/mach-axxia/axxia.c
index af85305..81d39d1 100644
--- a/arch/arm/mach-axxia/axxia.c
+++ b/arch/arm/mach-axxia/axxia.c
@@ -192,48 +192,11 @@ static struct resource axxia_pmu_resources[] = {
},
 };
 
-/*
- * The PMU IRQ lines of four cores are wired together into a single interrupt.
- * Bounce the interrupt to other cores if it's not ours.
- */
-#define CORES_PER_CLUSTER  4
-static irqreturn_t axxia_pmu_handler(int irq, void *dev, irq_handler_t handler)
-{
-   irqreturn_t ret = handler(irq, dev);
-   int cpu = smp_processor_id();
-   int cluster = cpu / CORES_PER_CLUSTER;
-   int other;
-
-   if (ret == IRQ_NONE) {
-
-   /* Look until we find another cpu that's online. */
-   do {
-   other = (++cpu % CORES_PER_CLUSTER) +
-   (cluster * CORES_PER_CLUSTER);
-   } while (!cpu_online(other));
-
-   irq_set_affinity(irq, cpumask_of(other));
-   }
-
-   /*
-* We should be able to get away with the amount of IRQ_NONEs we give,
-* while still having the spurious IRQ detection code kick in if the
-* interrupt really starts hitting spuriously.
-*/
-   return ret;
-}
-
-static struct arm_pmu_platdata axxia_pmu_platdata = {
-   .handle_irq = axxia_pmu_handler,
-};
-
-
 static struct platform_device pmu_device = {
.name   = "arm-pmu",
.id = ARM_PMU_DEVICE_CPU,
.num_resources  = ARRAY_SIZE(axxia_pmu_resources),
.resource   = axxia_pmu_resources,
-   .dev.platform_data  = &axxia_pmu_platdata,
 };
 
 static inline void
-- 
1.7.9.5

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

[linux-yocto] [PATCH 30/30] i2c: axxia: Add support for 10-bit addressing

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

Add support for I2c transfers using 10-bit address. The upper layer passes the
flag I2C_M_TEN to inform the driver that the msg->addr field is a 10-bit
address. The Axxia I2C controller will transmit a 10-bit address when the 5
most significant bits in address register 1 equals 5'b0. The least
significant part of the address is then read from address register 2.

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

diff --git a/drivers/i2c/busses/i2c-axxia.c b/drivers/i2c/busses/i2c-axxia.c
index b2cdbba..db1a2d3 100644
--- a/drivers/i2c/busses/i2c-axxia.c
+++ b/drivers/i2c/busses/i2c-axxia.c
@@ -251,6 +251,12 @@ i2c_m_rd(const struct i2c_msg *msg)
 }
 
 static int
+i2c_m_ten(const struct i2c_msg *msg)
+{
+   return (msg->flags & I2C_M_TEN) != 0;
+}
+
+static int
 i2c_m_recv_len(const struct i2c_msg *msg)
 {
return (msg->flags & I2C_M_RECV_LEN) != 0;
@@ -376,6 +382,7 @@ static int
 axxia_i2c_xfer_msg(struct axxia_i2c_dev *idev, struct i2c_msg *msg)
 {
u32 int_mask = MST_STATUS_ERR | MST_STATUS_SNS;
+   u32 addr_1, addr_2;
int ret;
 
if (msg->len == 0 || msg->len > 255)
@@ -391,17 +398,32 @@ axxia_i2c_xfer_msg(struct axxia_i2c_dev *idev, struct 
i2c_msg *msg)
writel(0, &idev->regs->mst_tx_xfer);
/* RX # bytes */
writel(msg->len, &idev->regs->mst_rx_xfer);
-   /* Chip address for write */
-   writel(CHIP_READ(msg->addr), &idev->regs->mst_addr_1);
} else {
/* TX # bytes */
writel(msg->len, &idev->regs->mst_tx_xfer);
/* RX 0 bytes */
writel(0, &idev->regs->mst_rx_xfer);
-   /* Chip address for write */
-   writel(CHIP_WRITE(msg->addr), &idev->regs->mst_addr_1);
}
-   writel(msg->addr >> 8, &idev->regs->mst_addr_2);
+
+   if (i2c_m_ten(msg)) {
+   /* 10-bit address
+*   addr_1: 5'b0 | addr[9:8] | (R/W)
+*   addr_2: addr[7:0]
+*/
+   addr_1 = 0xF0 | ((msg->addr >> 7) & 0x06);
+   addr_2 = msg->addr & 0xFF;
+   } else {
+   /* 7-bit address
+*   addr_1: addr[6:0] | (R/W)
+*   addr_2: dont care
+*/
+   addr_1 = (msg->addr << 1) & 0xFF;
+   addr_2 = 0;
+   }
+   if (i2c_m_rd(msg))
+   addr_1 |= 1;
+   writel(addr_1, &idev->regs->mst_addr_1);
+   writel(addr_2, &idev->regs->mst_addr_2);
 
if (i2c_m_rd(msg)) {
int_mask |= MST_STATUS_RFL;
-- 
1.7.9.5

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


[linux-yocto] [PATCH 23/30] axxia: Fix a Size Warning in the SRIO Section of the Device Trees

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

Signed-off-by: John Jacques 
---
 arch/powerpc/boot/dts/acp25xx.dts |2 +-
 arch/powerpc/boot/dts/acp342x.dts |2 +-
 arch/powerpc/boot/dts/acp344x.dts |2 +-
 arch/powerpc/boot/dts/acp35xx.dts |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/boot/dts/acp25xx.dts 
b/arch/powerpc/boot/dts/acp25xx.dts
index b5463c5..9893cf9 100644
--- a/arch/powerpc/boot/dts/acp25xx.dts
+++ b/arch/powerpc/boot/dts/acp25xx.dts
@@ -290,7 +290,7 @@
 #size-cells = <2>;
 compatible = "axxia,rapidio-delta";
 device_type = "rapidio";
-reg = <0x0020 0x0056 0x0 0x1000>; /* SRIO Conf 0 region */
+reg = <0x0020 0x0056 0x1000>; /* SRIO Conf 0 region */
 ranges = <0x0 0x0 0x0021 0x 0x0 0x4000>;
/*
 linkdown-reset = <0x0200 0x100 0x0020 0x0043 0x0 
0x1>;
diff --git a/arch/powerpc/boot/dts/acp342x.dts 
b/arch/powerpc/boot/dts/acp342x.dts
index 99d2858..6e02a8c 100644
--- a/arch/powerpc/boot/dts/acp342x.dts
+++ b/arch/powerpc/boot/dts/acp342x.dts
@@ -291,7 +291,7 @@
 #size-cells = <2>;
 compatible = "axxia,rapidio-delta";
 device_type = "rapidio";
-reg = <0x0020 0x0042 0x0 0x1000>; /* SRIO Conf 0 region */
+reg = <0x0020 0x0042 0x1000>; /* SRIO Conf 0 region */
 ranges = <0x0 0x0 0x0020 0x8000 0x0 0x4000>;
/*
 linkdown-reset = <0x0200 0x100 0x0020 0x0043 0x0 
0x1>;
diff --git a/arch/powerpc/boot/dts/acp344x.dts 
b/arch/powerpc/boot/dts/acp344x.dts
index 51fa547..2c25007 100644
--- a/arch/powerpc/boot/dts/acp344x.dts
+++ b/arch/powerpc/boot/dts/acp344x.dts
@@ -290,7 +290,7 @@
 #size-cells = <2>;
 compatible = "axxia,rapidio-delta";
 device_type = "rapidio";
-reg = <0x0020 0x0042 0x0 0x1000>; /* SRIO Conf 0 region */
+reg = <0x0020 0x0042 0x1000>; /* SRIO Conf 0 region */
 ranges = <0x0 0x0 0x0020 0x8000 0x0 0x4000>;
/*
 linkdown-reset = <0x0200 0x100 0x0020 0x0043 0x0 
0x1>;
diff --git a/arch/powerpc/boot/dts/acp35xx.dts 
b/arch/powerpc/boot/dts/acp35xx.dts
index 8fd366f..0bf153f 100644
--- a/arch/powerpc/boot/dts/acp35xx.dts
+++ b/arch/powerpc/boot/dts/acp35xx.dts
@@ -401,7 +401,7 @@
 #size-cells = <2>;
 compatible = "axxia,rapidio-delta";
 device_type = "rapidio";
-reg = <0x0020 0x0056 0x0 0x1000>; /* SRIO Conf 0 region */
+reg = <0x0020 0x0056 0x1000>; /* SRIO Conf 0 region */
 ranges = <0x0 0x0 0x0021 0x 0x0 0x4000>;
/*
 linkdown-reset = <0x0200 0x100 0x0020 0x0040A000 0x0 
0x1>;
-- 
1.7.9.5

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


Re: [linux-yocto] [PATCH 00/30] LSI AXXIA updates to 3.4 standard/axxia/base

2014-05-06 Thread Bruce Ashfield

On 14-05-06 12:36 PM, Charlie Paul wrote:

This is a resubmittal of the second set of patches

Patch 04/28 was not changed, but noted your explanation.
Patch 05/28 added more information as why the mbox was increased
Patch 07/28 was split into two patches as requested
Patch 10/28 was split into two patches as requested
Patch 17/28 more information added
Patch 24/28 more information added


I assumed that the numbers matched the N/30 that is in this series :)
.. what I see looks better. The series are getting easier to review,
so many thanks for that.

Send a pull request and I'll do the merge.

Bruce




Anders Berg (4):
   i2c-axxia: Adjust tLOW,tHIGH to match fast-mode requirements
   i2c-axxia: Avoid timeout when interrupt delayed
   i2c-axxia: Fixed i2c device minor numbers
   i2c: axxia: Add support for 10-bit addressing

David Mercado (4):
   LSI FEMAC Ethernet: Updated for upstream submittal
   kernel/irq/manage.c: Fix irq_set_affinity to allow use with buslocks
   LSI AXM55xx: Axxia GIC driver improvements (3rd gen)
   LSI AXM55xx: Fix PMU handler issue

Gary McGee (1):
   LSI AXM55xx arm/axxia: improved robustness for DDR retention

John Jacques (4):
   axxia: Device tree and Target Name/Machine Type Update
   axxia: Fix a Size Warning in the SRIO Section of the Device Trees
   arch/powerpc: Updated the UART Driver to Support 3500
   arch/powerpc: Don't Try to Use NAND on Axxia 3500

Michael Bringmann (13):
   LSI AXM55xx: Validate SRIO link ready status during driver
 initialization.
   LSI AXM55xx: Some code optimizations for AXXIA rapidio mport driver.
   LSI AXM55xx: Fixes for mailbox open bounds checks.
   LSI AXM55xx: Improve concurrency protection in AXXIA rapidio calls.
   LSI AXM55xx: Fix concurrency issue for variable
   LSI AXM55xx rapidio: Change the timers for inbound messages
   LSI AXM55xx rapidio: Speed up bottleneck in inbox.
   LSI AXM55x rapidio: removed __devinit from init routines
   LSI AXM55xx/rapidio: Fix NULL pointer reference in
 rio_release_inb_mbox.
   LSI AXM55xx: Various bug fixes for rapidio endpoint controller.
   LSI AXM55xx: Configuration updates and bug fixes for rapidio.
   LSI AXM55xx: Disable linkdown reset configuration.
   LSI AXM55xx: Move datastream APIs and symbols to public header file.

SangeethaRao (2):
   LSI sysdev/pci: Removing the power of 2 size restriction
   LSI AXM55xx i2c: Adding support for AXM3500 I2C driver

ningligong (2):
   LSI AXM55xx rapidio? Fixed offset of RAB_OBDSE_XX registers
   LSI AXM55xx: Fixed inbound data streaming ISR handling

  arch/arm/boot/dts/axm55xx.dts |4 +-
  arch/arm/boot/dts/axm55xxemu.dts  |   25 +-
  arch/arm/boot/dts/axm55xxemu7.dts |  217 +
  arch/arm/boot/dts/axm55xxsim.dts  |   26 +-
  arch/arm/boot/dts/axm55xxsim16.dts|   26 +-
  arch/arm/include/asm/axxia-rio.h  |5 +-
  arch/arm/mach-axxia/Makefile  |2 +-
  arch/arm/mach-axxia/axxia-gic.c   | 1160 +
  arch/arm/mach-axxia/axxia.c   |   40 +-
  arch/arm/mach-axxia/ddr_retention.c   |  258 +++---
  arch/arm/mach-axxia/ddr_shutdown.c|  332 +++
  arch/arm/mach-axxia/rapidio.c |   19 +-
  arch/powerpc/boot/dts/acp25xx.dts |   37 +-
  arch/powerpc/boot/dts/acp342x.dts |   37 +-
  arch/powerpc/boot/dts/acp344x.dts |   37 +-
  arch/powerpc/boot/dts/acp35xx.dts |   29 +-
  arch/powerpc/include/asm/axxia-rio.h  |5 +-
  arch/powerpc/sysdev/lsi_pci.c |   16 +-
  drivers/i2c/busses/i2c-axxia.c|  115 ++-
  drivers/mtd/nand/lsi_acp_nand.c   |9 +-
  drivers/net/ethernet/lsi/Kconfig  |   15 -
  drivers/net/ethernet/lsi/lsi_acp_mdio.c   |  201 +++--
  drivers/net/ethernet/lsi/lsi_acp_net.c|  871 +--
  drivers/net/ethernet/lsi/lsi_acp_net.h|  261 --
  drivers/rapidio/devices/lsi/axxia-rio-ds.c|  647 --
  drivers/rapidio/devices/lsi/axxia-rio-ds.h|  326 +--
  drivers/rapidio/devices/lsi/axxia-rio-irq.c   |  289 +++---
  drivers/rapidio/devices/lsi/axxia-rio-irq.h   |   12 +-
  drivers/rapidio/devices/lsi/axxia-rio-sysfs.c |   15 +-
  drivers/rapidio/devices/lsi/axxia-rio.c   |   16 +-
  drivers/rapidio/devices/lsi/axxia-rio.h   |4 +-
  drivers/rapidio/rio.c |   15 +-
  drivers/tty/serial/lsi_acp_serial.c   |   94 +-
  include/linux/rio-axxia.h |  322 +++
  kernel/irq/manage.c   |6 +-
  35 files changed, 3156 insertions(+), 2337 deletions(-)
  create mode 100644 arch/arm/boot/dts/axm55xxemu7.dts
  create mode 100644 arch/arm/mach-axxia/ddr_shutdown.c
  create mode 100644 include/linux/rio-axxia.h



--
___
linux-yocto mailing list
linux-yocto@yoctoproject.

Re: [linux-yocto] [PULL REQUEST] Kernel: 3.4 Branch: standard/axxia/base

2014-05-06 Thread Bruce Ashfield

On 14-05-06 03:15 PM, Paul, Charlie wrote:

The following changes since commit 6b4b2cce1391ea3480b0170be8aa912c5cc5426d:

   axxia: Remove Wrapper Functions (2014-05-02 09:07:28 -0700)

are available in the git repository at:

   g...@github.com:butlerpaul/lsikernel sab-next-2


Merged.

Bruce



for you to fetch changes up to e865ad95053da22bbf780fa075e59a5c40c1c089:

   i2c: axxia: Add support for 10-bit addressing (2014-05-06 09:27:27 -0700)



Anders Berg (4):

   i2c-axxia: Adjust tLOW,tHIGH to match fast-mode requirements

   i2c-axxia: Avoid timeout when interrupt delayed

   i2c-axxia: Fixed i2c device minor numbers

   i2c: axxia: Add support for 10-bit addressing

David Mercado (4):

   LSI FEMAC Ethernet: Updated for upstream submittal

   kernel/irq/manage.c: Fix irq_set_affinity to allow use with buslocks

   LSI AXM55xx: Axxia GIC driver improvements (3rd gen)

   LSI AXM55xx: Fix PMU handler issue

Gary McGee (1):

   LSI AXM55xx arm/axxia: improved robustness for DDR retention

John Jacques (4):

   axxia: Device tree and Target Name/Machine Type Update

   axxia: Fix a Size Warning in the SRIO Section of the Device Trees

   arch/powerpc: Updated the UART Driver to Support 3500

   arch/powerpc: Don't Try to Use NAND on Axxia 3500

Michael Bringmann (13):

   LSI AXM55xx: Validate SRIO link ready status during driver
initialization.

   LSI AXM55xx: Some code optimizations for AXXIA rapidio mport driver.

   LSI AXM55xx: Fixes for mailbox open bounds checks.

   LSI AXM55xx: Improve concurrency protection in AXXIA rapidio calls.

   LSI AXM55xx: Fix concurrency issue for variable

   LSI AXM55xx rapidio: Change the timers for inbound messages

   LSI AXM55xx rapidio: Speed up bottleneck in inbox.

   LSI AXM55x rapidio: removed __devinit from init routines

   LSI AXM55xx/rapidio: Fix NULL pointer reference in
rio_release_inb_mbox.

   LSI AXM55xx: Various bug fixes for rapidio endpoint controller.

   LSI AXM55xx: Configuration updates and bug fixes for rapidio.

   LSI AXM55xx: Disable linkdown reset configuration.

   LSI AXM55xx: Move datastream APIs and symbols to public header file.

SangeethaRao (2):

   LSI sysdev/pci: Removing the power of 2 size restriction

   LSI AXM55xx i2c: Adding support for AXM3500 I2C driver

ningligong (2):

   LSI AXM55xx rapidio? Fixed offset of RAB_OBDSE_XX registers

   LSI AXM55xx: Fixed inbound data streaming ISR handling

arch/arm/boot/dts/axm55xx.dts |4 +-

arch/arm/boot/dts/axm55xxemu.dts  |   25 +-

arch/arm/boot/dts/axm55xxemu7.dts |  217 +

arch/arm/boot/dts/axm55xxsim.dts  |   26 +-

arch/arm/boot/dts/axm55xxsim16.dts|   26 +-

arch/arm/include/asm/axxia-rio.h  |5 +-

arch/arm/mach-axxia/Makefile  |2 +-

arch/arm/mach-axxia/axxia-gic.c   | 1160
+

arch/arm/mach-axxia/axxia.c   |   40 +-

arch/arm/mach-axxia/ddr_retention.c   |  258 +++---

arch/arm/mach-axxia/ddr_shutdown.c|  332 +++

arch/arm/mach-axxia/rapidio.c |   19 +-

arch/powerpc/boot/dts/acp25xx.dts |   37 +-

arch/powerpc/boot/dts/acp342x.dts |   37 +-

arch/powerpc/boot/dts/acp344x.dts |   37 +-

arch/powerpc/boot/dts/acp35xx.dts |   29 +-

arch/powerpc/include/asm/axxia-rio.h  |5 +-

arch/powerpc/sysdev/lsi_pci.c |   16 +-

drivers/i2c/busses/i2c-axxia.c|  115 ++-

drivers/mtd/nand/lsi_acp_nand.c   |9 +-

drivers/net/ethernet/lsi/Kconfig  |   15 -

drivers/net/ethernet/lsi/lsi_acp_mdio.c   |  201 +++--

drivers/net/ethernet/lsi/lsi_acp_net.c|  871 +--

drivers/net/ethernet/lsi/lsi_acp_net.h|  261 --

drivers/rapidio/devices/lsi/axxia-rio-ds.c|  647 --

drivers/rapidio/devices/lsi/axxia-rio-ds.h|  326 +--

drivers/rapidio/devices/lsi/axxia-rio-irq.c   |  289 +++---

drivers/rapidio/devices/lsi/axxia-rio-irq.h   |   12 +-

drivers/rapidio/devices/lsi/axxia-rio-sysfs.c |   15 +-

drivers/rapidio/devices/lsi/axxia-rio.c   |   16 +-

drivers/rapidio/devices/lsi/axxia-rio.h   |4 +-

drivers/rapidio/rio.c |   15 +-

drivers/tty/serial/lsi_acp_serial.c   |   94 +-

include/linux/rio-axxia.h |  322 +++

kernel/irq/manage.c   |6 +-

35 files changed, 3156 insertions(+), 2337 deletions(-)

create mode 100644 arch/arm/boot/dts/axm55xxemu7.dts

create mode 100644 arch/arm/mach-axxia/ddr_shutdown.c

create mode 100644 include/linux/rio-axxia.h



--
___
linux-yocto mailing list
linux-yocto@yoctoproj

[linux-yocto] [PULL REQUEST] Kernel: 3.4 Branch: standard/axxia/base

2014-05-06 Thread Paul, Charlie
The following changes since commit 6b4b2cce1391ea3480b0170be8aa912c5cc5426d:

  axxia: Remove Wrapper Functions (2014-05-02 09:07:28 -0700)

are available in the git repository at:

  g...@github.com:butlerpaul/lsikernel sab-next-2

for you to fetch changes up to e865ad95053da22bbf780fa075e59a5c40c1c089:

  i2c: axxia: Add support for 10-bit addressing (2014-05-06 09:27:27 -0700)


Anders Berg (4):
  i2c-axxia: Adjust tLOW,tHIGH to match fast-mode requirements
  i2c-axxia: Avoid timeout when interrupt delayed
  i2c-axxia: Fixed i2c device minor numbers
  i2c: axxia: Add support for 10-bit addressing

David Mercado (4):
  LSI FEMAC Ethernet: Updated for upstream submittal
  kernel/irq/manage.c: Fix irq_set_affinity to allow use with buslocks
  LSI AXM55xx: Axxia GIC driver improvements (3rd gen)
  LSI AXM55xx: Fix PMU handler issue

Gary McGee (1):
  LSI AXM55xx arm/axxia: improved robustness for DDR retention

John Jacques (4):
  axxia: Device tree and Target Name/Machine Type Update
  axxia: Fix a Size Warning in the SRIO Section of the Device Trees
  arch/powerpc: Updated the UART Driver to Support 3500
  arch/powerpc: Don't Try to Use NAND on Axxia 3500

Michael Bringmann (13):
  LSI AXM55xx: Validate SRIO link ready status during driver initialization.
  LSI AXM55xx: Some code optimizations for AXXIA rapidio mport driver.
  LSI AXM55xx: Fixes for mailbox open bounds checks.
  LSI AXM55xx: Improve concurrency protection in AXXIA rapidio calls.
  LSI AXM55xx: Fix concurrency issue for variable
  LSI AXM55xx rapidio: Change the timers for inbound messages
  LSI AXM55xx rapidio: Speed up bottleneck in inbox.
  LSI AXM55x rapidio: removed __devinit from init routines
  LSI AXM55xx/rapidio: Fix NULL pointer reference in rio_release_inb_mbox.
  LSI AXM55xx: Various bug fixes for rapidio endpoint controller.
  LSI AXM55xx: Configuration updates and bug fixes for rapidio.
  LSI AXM55xx: Disable linkdown reset configuration.
  LSI AXM55xx: Move datastream APIs and symbols to public header file.

SangeethaRao (2):
  LSI sysdev/pci: Removing the power of 2 size restriction
  LSI AXM55xx i2c: Adding support for AXM3500 I2C driver

ningligong (2):
  LSI AXM55xx rapidio? Fixed offset of RAB_OBDSE_XX registers
  LSI AXM55xx: Fixed inbound data streaming ISR handling

arch/arm/boot/dts/axm55xx.dts |4 +-
arch/arm/boot/dts/axm55xxemu.dts  |   25 +-
arch/arm/boot/dts/axm55xxemu7.dts |  217 +
arch/arm/boot/dts/axm55xxsim.dts  |   26 +-
arch/arm/boot/dts/axm55xxsim16.dts|   26 +-
arch/arm/include/asm/axxia-rio.h  |5 +-
arch/arm/mach-axxia/Makefile  |2 +-
arch/arm/mach-axxia/axxia-gic.c   | 1160 +
arch/arm/mach-axxia/axxia.c   |   40 +-
arch/arm/mach-axxia/ddr_retention.c   |  258 +++---
arch/arm/mach-axxia/ddr_shutdown.c|  332 +++
arch/arm/mach-axxia/rapidio.c |   19 +-
arch/powerpc/boot/dts/acp25xx.dts |   37 +-
arch/powerpc/boot/dts/acp342x.dts |   37 +-
arch/powerpc/boot/dts/acp344x.dts |   37 +-
arch/powerpc/boot/dts/acp35xx.dts |   29 +-
arch/powerpc/include/asm/axxia-rio.h  |5 +-
arch/powerpc/sysdev/lsi_pci.c |   16 +-
drivers/i2c/busses/i2c-axxia.c|  115 ++-
drivers/mtd/nand/lsi_acp_nand.c   |9 +-
drivers/net/ethernet/lsi/Kconfig  |   15 -
drivers/net/ethernet/lsi/lsi_acp_mdio.c   |  201 +++--
drivers/net/ethernet/lsi/lsi_acp_net.c|  871 +--
drivers/net/ethernet/lsi/lsi_acp_net.h|  261 --
drivers/rapidio/devices/lsi/axxia-rio-ds.c|  647 --
drivers/rapidio/devices/lsi/axxia-rio-ds.h|  326 +--
drivers/rapidio/devices/lsi/axxia-rio-irq.c   |  289 +++---
drivers/rapidio/devices/lsi/axxia-rio-irq.h   |   12 +-
drivers/rapidio/devices/lsi/axxia-rio-sysfs.c |   15 +-
drivers/rapidio/devices/lsi/axxia-rio.c   |   16 +-
drivers/rapidio/devices/lsi/axxia-rio.h   |4 +-
drivers/rapidio/rio.c |   15 +-
drivers/tty/serial/lsi_acp_serial.c   |   94 +-
include/linux/rio-axxia.h |  322 +++
kernel/irq/manage.c   |6 +-
35 files changed, 3156 insertions(+), 2337 deletions(-)
create mode 100644 arch/arm/boot/dts/axm55xxemu7.dts
create mode 100644 arch/arm/mach-axxia/ddr_shutdown.c
create mode 100644 include/linux/rio-axxia.h
-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto