Re: [linux-yocto] [PATCH 07/94] arm/configs: adding common LSI defconfig

2013-11-09 Thread Bruce Ashfield

Same comment here. I presume there are some BSP meta data updates
lurking ?

Bruce

On 11/7/2013, 8:12 PM, Paul Butler wrote:

Signed-off-by: Paul Butlerpaul.but...@windriver.com
---
  arch/arm/configs/lsisim_defconfig | 48 ---
  1 file changed, 15 insertions(+), 33 deletions(-)


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


Re: [linux-yocto] [PATCH 06/94] powerpc/configs: adding common LSI defconfig

2013-11-09 Thread Bruce Ashfield

While it is fine that we are keeping defconfigs around, the BSP and series
isn't complete until board configuration fragments are available.

Is there a follow series somewhere that updates the meta data for the
BSP with fragments that match the h/w options below ?

Bruce


On 11/7/2013, 8:12 PM, Paul Butler wrote:

Signed-off-by: Paul Butlerpaul.but...@windriver.com
---
  arch/powerpc/configs/lsi_defconfig | 2143 
  1 file changed, 2143 insertions(+)
  create mode 100644 arch/powerpc/configs/lsi_defconfig

diff --git a/arch/powerpc/configs/lsi_defconfig 
b/arch/powerpc/configs/lsi_defconfig
new file mode 100644
index 000..d6169e3
--- /dev/null
+++ b/arch/powerpc/configs/lsi_defconfig
@@ -0,0 +1,2143 @@


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


Re: [linux-yocto] [PATCH 08/94] arm/mach-axxia: Fix irq_set_type() in arch/arm/mach-axxia/axxia-gic.c

2013-11-09 Thread Bruce Ashfield

On 11/7/2013, 8:12 PM, Paul Butler wrote:

From: David Mercado david.merc...@windriver.com

This patch fixes setting of IRQ type to all clusters. Previously was
only working for first cluster.


While I don't doubt that this is true, switching from i/4 to i*4
is significant.

I can't see enough from the context of the patch, what is i, and
how do we know that there's always a cpu at i * 4 ?

Bruce



Signed-off-by: David Mercado david.merc...@windriver.com
---
  arch/arm/mach-axxia/axxia-gic.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-axxia/axxia-gic.c b/arch/arm/mach-axxia/axxia-gic.c
index 2c2dfba..c074f6c 100644
--- a/arch/arm/mach-axxia/axxia-gic.c
+++ b/arch/arm/mach-axxia/axxia-gic.c
@@ -344,7 +344,7 @@ static int gic_set_type(struct irq_data *d, unsigned int 
type)
 * smp_call_function_single().
 */
local_irq_enable();
-   smp_call_function_single((i/4),
+   smp_call_function_single((i * 4),
 gic_set_type_wrapper, data, 1);
local_irq_disable();
if (data.status != 0)



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


Re: [linux-yocto] [PATCH 09/94] powerpc/configs: Address error message when issuing reboot

2013-11-09 Thread Bruce Ashfield

On 11/7/2013, 8:12 PM, Paul Butler wrote:

From: David Mercado david.merc...@windriver.com

The default kernel config was enabling CPU Hotplug, which is a feature
not currently supported by the ACP34xx. For this reason, issuing a reboot
or poweroff command was resulting in a Error taking CPU1 down: -38 error.

This patch disables CONFIG_SUSPEND in order to disable CPU hotplug and
addresses this error message.


Config fragments to address the above ?

Bruce



Signed-off-by: David Mercado david.merc...@windriver.com
---
  arch/powerpc/configs/lsi_defconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/configs/lsi_defconfig 
b/arch/powerpc/configs/lsi_defconfig
index d6169e3..8ed201b 100644
--- a/arch/powerpc/configs/lsi_defconfig
+++ b/arch/powerpc/configs/lsi_defconfig
@@ -376,7 +376,7 @@ CONFIG_FORCE_MAX_ZONEORDER=11
  CONFIG_CMDLINE_BOOL=y
  CONFIG_CMDLINE=console=ttyS0 
mtdparts=acp-nand:512K(2ndStage),512K(env-0),512K(env-1),512K(3rdStage),-(fs) ip=dhcp 
root=/dev/nfs
  CONFIG_EXTRA_TARGETS=
-CONFIG_SUSPEND=y
+# CONFIG_SUSPEND is not set
  CONFIG_SUSPEND_FREEZER=y
  # CONFIG_HIBERNATION is not set
  CONFIG_PM_SLEEP=y



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


Re: [linux-yocto] [PATCH 10/94] drivers/net/ethernet: add ACP wrappers back into kernel

2013-11-09 Thread Bruce Ashfield

On 11/7/2013, 8:12 PM, Paul Butler wrote:

From: David Mercado david.merc...@windriver.com

This patch adds the LSI ACP wrapper routines back into the kernel. These
were previously removed as part of the acp34xx Ethernet driver updates,


Can you put a shortlog of the commit that removes the driver here ?

i.e. removed via [short log], which was part of the ...

That way we can actually locate the commit and see for ourselves.

Bruce


but are needed for the LSI RTE application.

The wrappers are restored at arch/powerpc/sysdev/lsi_acp_wrappers.c

Signed-off-by: David Mercado david.merc...@windriver.com
---
  arch/powerpc/include/asm/lsi/acp_ncr.h |   3 +
  arch/powerpc/sysdev/Makefile   |   2 +-
  arch/powerpc/sysdev/lsi_acp_wrappers.c | 325 +
  drivers/net/ethernet/lsi/lsi_acp_net.c | 117 +---
  drivers/net/ethernet/lsi/lsi_acp_net.h |   2 -
  5 files changed, 333 insertions(+), 116 deletions(-)
  create mode 100644 arch/powerpc/sysdev/lsi_acp_wrappers.c

diff --git a/arch/powerpc/include/asm/lsi/acp_ncr.h 
b/arch/powerpc/include/asm/lsi/acp_ncr.h
index a7399e7..1a08f07 100644
--- a/arch/powerpc/include/asm/lsi/acp_ncr.h
+++ b/arch/powerpc/include/asm/lsi/acp_ncr.h
@@ -39,4 +39,7 @@ int ncr_write(unsigned long, unsigned long, int, void *);

  int is_asic(void);

+extern int acp_mdio_read(unsigned long, unsigned long, unsigned short *);
+extern int acp_mdio_write(unsigned long, unsigned long, unsigned short);
+
  #endif /*  __DRIVERS_LSI_ACP_NCR_H */
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index 6354d1c..a95b59f 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -73,4 +73,4 @@ obj-$(CONFIG_PPC_XICS)+= xics/

  obj-$(CONFIG_GE_FPGA) += ge/

-obj-$(CONFIG_ACP)  += lsi_acp_ncr.o
+obj-$(CONFIG_ACP)  += lsi_acp_ncr.o lsi_acp_wrappers.o
diff --git a/arch/powerpc/sysdev/lsi_acp_wrappers.c 
b/arch/powerpc/sysdev/lsi_acp_wrappers.c
new file mode 100644
index 000..910ed25
--- /dev/null
+++ b/arch/powerpc/sysdev/lsi_acp_wrappers.c
@@ -0,0 +1,325 @@
+/*
+ * arch/powerpc/sysdev/lsi_acp_wrappers.c
+ *
+ * Copyright (C) 2013 LSI
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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
+ */
+
+#include linux/module.h
+#include linux/spinlock.h
+#include linux/sched.h
+#include linux/of.h
+#include linux/io.h
+#include asm/irq.h
+#include asm/lsi/acp_ncr.h
+
+MODULE_AUTHOR(LSI Corporation);
+MODULE_DESCRIPTION(ACP Wrappers);
+MODULE_LICENSE(GPL);
+
+/*
+  
+  
+  MDIO Access
+  
+  
+*/
+
+
+static unsigned long mdio_base;
+DEFINE_SPINLOCK(mdio_lock);
+
+#define MDIO_CONTROL_RD_DATA ((void *)(mdio_base + 0x0))
+#define MDIO_STATUS_RD_DATA  ((void *)(mdio_base + 0x4))
+#define MDIO_CLK_OFFSET  ((void *)(mdio_base + 0x8))
+#define MDIO_CLK_PERIOD  ((void *)(mdio_base + 0xc))
+
+/*
+ * -
+ * acp_mdio_read
+ */
+
+int acp_mdio_read(unsigned long address, unsigned long offset,
+ unsigned short *value)
+{
+   unsigned long command = 0;
+   unsigned long status;
+   unsigned long flags;
+
+   spin_lock_irqsave(mdio_lock, flags);
+
+   /* Set the mdio_busy (status) bit. */
+   status = in_le32(MDIO_STATUS_RD_DATA);
+   status |= 0x4000;
+   out_le32(MDIO_STATUS_RD_DATA, status);
+
+   /* Write the command.*/
+   command |= 0x1000;  /* op_code: read */
+   command |= (address  0x1f)  16; /* port_addr (target device) */
+   command |= (offset  0x1f)  21; /* device_addr (target register) */
+   out_le32(MDIO_CONTROL_RD_DATA, command);
+
+   /* Wait for the mdio_busy (status) bit to clear. */
+   do {
+   status = in_le32(MDIO_STATUS_RD_DATA);
+   } while (0 != (status  0x4000));
+
+   /* Wait for the mdio_busy (control) bit to clear. */
+   do {
+   command = in_le32(MDIO_CONTROL_RD_DATA);
+   } 

Re: [linux-yocto] [PATCH 12/94] arch/powerpc: Release the lock when ncr_read() completes.

2013-11-09 Thread Bruce Ashfield

On 11/7/2013, 8:12 PM, Paul Butler wrote:

From: John Jacques john.jacq...@lsi.com

Without this the RTE won't load.


Anymore detail ? Like the error message the user sees ?

Bruce



Signed-off-by: John Jacques john.jacq...@lsi.com
---
  arch/powerpc/sysdev/lsi_acp_ncr.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/arch/powerpc/sysdev/lsi_acp_ncr.c 
b/arch/powerpc/sysdev/lsi_acp_ncr.c
index 9802110..736ca5d 100644
--- a/arch/powerpc/sysdev/lsi_acp_ncr.c
+++ b/arch/powerpc/sysdev/lsi_acp_ncr.c
@@ -211,6 +211,8 @@ ncr_read(unsigned long region, unsigned long address, int 
number, void *buffer)
memcpy((void *) buffer, temp, number);
}

+   ncr_unlock(LOCK_DOMAIN);
+
return 0;
  }
  EXPORT_SYMBOL(ncr_read);



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


Re: [linux-yocto] [PATCH 16/94] arm: AXM5516 emulation bringup boot

2013-11-09 Thread Bruce Ashfield

On 11/7/2013, 8:12 PM, Paul Butler wrote:

Signed-off-by: Paul Butler paul.but...@windriver.com
---
  arch/arm/boot/compressed/head.S   |  63 ++


There's more code removed here than there is added. Do we have an 
explanation

about how it was once required, and now isn't ? i.e. the bringup
boot shortlog made me expect all new code.

Bruce


  arch/arm/boot/dts/axm55xx.dts | 235 +++---
  arch/arm/boot/emuboot/Makefile|  10 +-
  arch/arm/boot/emuboot/emuboot.S   |  27 -
  arch/arm/boot/emuboot/emuboot.lds |   4 +-
  5 files changed, 109 insertions(+), 230 deletions(-)

diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index f83c98c..001e661 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -171,7 +171,12 @@ not_angel:
@ determine final kernel image address
mov r4, pc
and r4, r4, #0xf800
+#ifdef CONFIG_ARCH_AXXIA
+   ldr r3, =TEXT_OFFSET
+   add r4, r4, r3
+#else
add r4, r4, #TEXT_OFFSET
+#endif
  #else
ldr r4, =zreladdr
  #endif
@@ -269,7 +274,12 @@ restart:   adr r0, LC0
 * of RAM and hope for the best.
 */
cmp r0, #1
+#ifdef CONFIG_ARCH_AXXIA
+   ldr r1, =TEXT_OFFSET
+   sub r0, r4, r1
+#else
sub r0, r4, #TEXT_OFFSET
+#endif
add r0, r0, #0x100
mov r1, r6
sub r2, sp, r6
@@ -567,58 +577,6 @@ __armv3_mpu_cache_on:
mcr p15, 0, r0, c7, c0, 0   @ invalidate whole cache v3
mov pc, lr

-#if defined(CONFIG_ARCH_AXXIA)
-__setup_mmu:
-   sub r3, r4, #16384  @ Page directory size
-   bic r3, r3, #0xff   @ Align the pointer
-   bic r3, r3, #0x3f00
-
-   /*
-* Clear the level 1 page table.
-*/
-
-   mov r0, #0
-   mov r1, r3
-   add r2, r3, #0x4000
-1: str r0, [r1], #4
-   cmp r1, r2
-   blt 1b
-
-   /*
-* First 1G is RAM, cacheable and bufferable.
-*/
-
-   ldr r0, =0x40c1e
-   mov r1, r3
-   add r2, r3, #0x1000
-1: mov r9, #0
-2: str r0, [r1], #4@ Each supersection is repeated
-   add r9, r9, #1  @ 16 times.
-   cmp r9, #16
-   blt 2b
-   add r0, r0, #0x100  @ 16M
-   cmp r1, r2
-   blt 1b
-
-   /*
-* Third 1G is IO, not cacheable or bufferable.
-*/
-
-   ldr r0,=0x10040c52  @ Start at 0x20_1000_
-   add r1, r3, #0x2000
-   add r2, r3, #0x3000
-1: mov r9, #0
-2: str r0, [r1], #4@ Each supersection is repeated
-   add r9, r9, #1  @ 16 times.
-   cmp r9, #16
-   blt 2b
-   add r0, r0, #0x100  @ 16M
-   cmp r1, r2
-   blt 1b
-
-   mov pc, lr
-ENDPROC(__setup_mmu)
-#else
  __setup_mmu:  sub r3, r4, #16384  @ Page directory size
bic r3, r3, #0xff   @ Align the pointer
bic r3, r3, #0x3f00
@@ -662,7 +620,6 @@ __setup_mmu:sub r3, r4, #16384  @ Page 
directory size
str r1, [r0]
mov pc, lr
  ENDPROC(__setup_mmu)
-#endif

  __arm926ejs_mmu_cache_on:
  #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
diff --git a/arch/arm/boot/dts/axm55xx.dts b/arch/arm/boot/dts/axm55xx.dts
index f397394..ae94ca4 100644
--- a/arch/arm/boot/dts/axm55xx.dts
+++ b/arch/arm/boot/dts/axm55xx.dts
@@ -30,8 +30,9 @@
chosen { };

aliases {
-   serial0 = axxia_serial0;
-   timer   = axxia_timers;
+   serial0   = axxia_serial0;
+   timer = axxia_timers;
+   ethernet0 = axxia_femac0;
};

cpus {
@@ -42,12 +43,57 @@
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 = 

Re: [linux-yocto] [PATCH 17/94] arm: AXM5516 emulation bringup mach-axxia

2013-11-09 Thread Bruce Ashfield

On 11/7/2013, 8:12 PM, Paul Butler wrote:

Signed-off-by: Paul Butler paul.but...@windriver.com
---
  arch/arm/Makefile  |  4 ++
  arch/arm/kernel/head.S |  8 +++
  arch/arm/mach-axxia/Kconfig|  3 +
  arch/arm/mach-axxia/include/mach/debug-macro.S | 34 -


How do the debug-macro changes play into bringup ?


  arch/arm/mach-axxia/platsmp.c  | 96 +-
  init/main.c| 11 +++
  6 files changed, 139 insertions(+), 17 deletions(-)

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index db992cd..16a0b42 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -133,6 +133,10 @@ textofs-$(CONFIG_ARCH_MSM7X30) := 0x00208000
  textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
  textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000

+ifneq ($(CONFIG_ARCH_AXXIA_SIM),y)
+textofs-$(CONFIG_ARCH_AXXIA)   := 0x00408000
+endif
+
  # Machine directory name.  This list is sorted alphanumerically
  # by CONFIG_* macro name.
  machine-$(CONFIG_ARCH_AT91)   := at91
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 3bf0c7f..bd39808 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -52,7 +52,12 @@
.equswapper_pg_dir, KERNEL_RAM_VADDR - PG_DIR_SIZE

.macro  pgtbl, rd, phys
+#ifdef CONFIG_ARCH_AXXIA
+   ldr \rd, =(TEXT_OFFSET - PG_DIR_SIZE)
+   add \rd, \rd, \phys
+#else
add \rd, \phys, #TEXT_OFFSET - PG_DIR_SIZE
+#endif
.endm

  #ifdef CONFIG_XIP_KERNEL
@@ -289,6 +294,9 @@ __create_page_tables:
  #else
orr r3, r3, #PMD_SECT_XN
  #endif
+#ifdef CONFIG_ARCH_AXXIA
+   orr r7, r7, #0x20
+#endif
  1:str r3, [r0], #4
  #ifdef CONFIG_ARM_LPAE
str r7, [r0], #4
diff --git a/arch/arm/mach-axxia/Kconfig b/arch/arm/mach-axxia/Kconfig
index 4a4922f..206c344 100644
--- a/arch/arm/mach-axxia/Kconfig
+++ b/arch/arm/mach-axxia/Kconfig
@@ -28,4 +28,7 @@ config ARCH_AXXIA_DT
  If your bootloader supports Flattened Device Tree based booting,
  say Y here.

+config ARCH_AXXIA_SIM
+   bool Build for Simulation instead of Emulation or ASIC
+
  endmenu
diff --git a/arch/arm/mach-axxia/include/mach/debug-macro.S 
b/arch/arm/mach-axxia/include/mach/debug-macro.S
index f25a024..83d6670 100644
--- a/arch/arm/mach-axxia/include/mach/debug-macro.S
+++ b/arch/arm/mach-axxia/include/mach/debug-macro.S
@@ -10,26 +10,28 @@
   * published by the Free Software Foundation.
   */

-#ifdef CONFIG_DEBUG_VEXPRESS_CA9X4_UART
-#define DEBUG_LL_PHYS_BASE 0x1000
-#define DEBUG_LL_UART_OFFSET   0x9000
-#endif
+/*
+ * -- NOTE --
+ *
+*/

-#ifdef CONFIG_DEBUG_VEXPRESS_RS1_UART
-#define DEBUG_LL_PHYS_BASE 0x1c00
-#define DEBUG_LL_UART_OFFSET   0x0009
+#if !defined(CONFIG_ARM_LPAE)
+#error Axxia Peripherals Are Only Accessible Using the LPAE!
  #endif

-#define DEBUG_LL_VIRT_BASE 0xf800
+#define UART0_PHYSICAL_ADDRESS 0x00201008ULL
+#define UART1_PHYSICAL_ADDRESS 0x002010081000ULL
+#define UART2_PHYSICAL_ADDRESS 0x002010082000ULL
+#define UART3_PHYSICAL_ADDRESS 0x002010083000ULL

-#ifndef DEBUG_LL_UART_OFFSET
-#error Unknown vexpress UART offset
-#endif
+#define UART0_VIRTUAL_ADDRESS 0xf008
+#define UART1_VIRTUAL_ADDRESS 0xf0081000
+#define UART2_VIRTUAL_ADDRESS 0xf0082000
+#define UART3_VIRTUAL_ADDRESS 0xf0083000

-   .macro  addruart,rp,rv,tmp
-   mov \rp, #DEBUG_LL_UART_OFFSET
-   orr \rv, \rp, #DEBUG_LL_VIRT_BASE
-   orr \rp, \rp, #DEBUG_LL_PHYS_BASE
-   .endm
+   .macro  addruart, rp, rv, tmp
+   ldr \rp, =0x1008
+   ldr \rv, =0xf008
+   .endm

  #include asm/hardware/debug-pl01x.S
diff --git a/arch/arm/mach-axxia/platsmp.c b/arch/arm/mach-axxia/platsmp.c
index 4ba2e7a..95859ec 100644
--- a/arch/arm/mach-axxia/platsmp.c
+++ b/arch/arm/mach-axxia/platsmp.c
@@ -31,6 +31,9 @@ volatile int __cpuinitdata pen_release = -1;

  extern void axxia_secondary_startup(void);

+#define APB2_SER3_PHY_ADDR  0x00201003ULL
+#define APB2_SER3_ADDR_SIZE   0x1
+
  /*
   * Write pen_release in a way that is guaranteed to be visible to all
   * observers, irrespective of whether they're taking part in coherency
@@ -113,7 +116,12 @@ int __cpuinit boot_secondary(unsigned int cpu, struct 
task_struct *idle)
  #endif

/* Wait for so long, then give up if nothing happens ... */
+#ifdef CONFIG_ARCH_AXXIA_SIM
timeout = jiffies + (1 * HZ);
+#else
+   timeout = jiffies + (10 * HZ);
+#endif
+
while (time_before(jiffies, timeout)) {
smp_rmb();
if (pen_release == -1)
@@ -159,8 +167,10 @@ void __init smp_init_cpus(void)
set_smp_cross_call(axxia_gic_raise_softirq);
  }

-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
+void 

Re: [linux-yocto] [PATCH 19/94] drivers/tty: AXM5516 emulation bringup - amba-pl011.c

2013-11-09 Thread Bruce Ashfield

On 11/7/2013, 8:12 PM, Paul Butler wrote:

Signed-off-by: Paul Butler paul.but...@windriver.com
---
  drivers/tty/serial/amba-pl011.c | 5 +
  1 file changed, 5 insertions(+)

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index b69356c..abe91eb 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1667,8 +1667,13 @@ pl011_set_termios(struct uart_port *port, struct 
ktermios *termios,
quot -= 2;
}
/* Set baud rate */
+#if 0


? Why is the #if 0 code being kept. Drop it completely or give it a
Kconfig value .. or anything, but don't leave it dead in the tree.

Bruce


writew(quot  0x3f, port-membase + UART011_FBRD);
writew(quot  6, port-membase + UART011_IBRD);
+#else
+   writew(0x5, port-membase + UART011_FBRD);
+   writew(0x1, port-membase + UART011_IBRD);
+#endif

/*
 * --v--v--v--v-



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


Re: [linux-yocto] [PATCH 31/94] drivers/net/ethernet: Wrapper Cleanup

2013-11-09 Thread Bruce Ashfield

On 11/7/2013, 8:12 PM, Paul Butler wrote:

From: John Jacques john.jacq...@lsi.com

Hopefully these will go away soon (when the RTE driver
is GPL'd, which is in progress).  For now...


I'd suggest changing the commit log to actually tell us about the change
and not discuss licenses or editorialize the code.

Bruce



Signed-off-by: John Jacques john.jacq...@lsi.com
---
  arch/arm/mach-axxia/Makefile|  3 +-
  arch/arm/mach-axxia/wrappers.c  | 80 ++
  arch/powerpc/sysdev/lsi_acp_wrappers.c  | 87 -
  drivers/net/ethernet/lsi/lsi_acp_mdio.c | 23 +
  4 files changed, 83 insertions(+), 110 deletions(-)
  create mode 100644 arch/arm/mach-axxia/wrappers.c

diff --git a/arch/arm/mach-axxia/Makefile b/arch/arm/mach-axxia/Makefile
index 2d43ee7..e2f59cb 100644
--- a/arch/arm/mach-axxia/Makefile
+++ b/arch/arm/mach-axxia/Makefile
@@ -1,7 +1,8 @@
  #
  # Makefile for the linux kernel.
  #
-obj-y  := axxia.o
+obj-y  := wrappers.o
+obj-y  += axxia.o
  obj-y += clock.o
  obj-y   += io.o
  obj-y += timers.o
diff --git a/arch/arm/mach-axxia/wrappers.c b/arch/arm/mach-axxia/wrappers.c
new file mode 100644
index 000..54d2021
--- /dev/null
+++ b/arch/arm/mach-axxia/wrappers.c
@@ -0,0 +1,80 @@
+/*
+ * arch/arm/mach-axxia/wrappers.c
+ *
+ * Copyright (C) 2013 LSI
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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
+ */
+
+/*
+  
==
+  
==
+  Platform Device Registration
+  
==
+  
==
+*/
+
+#include linux/platform_device.h
+
+/*
+  
--
+  acp_platform_device_register
+*/
+
+int
+acp_platform_device_register(struct platform_device *pdev)
+{
+   return platform_device_register(pdev);
+}
+
+EXPORT_SYMBOL(acp_platform_device_register);
+
+/*
+  
--
+  acp_platform_device_unregister
+*/
+
+void
+acp_platform_device_unregister(struct platform_device *pdev)
+{
+   platform_device_unregister(pdev);
+
+   return;
+}
+
+EXPORT_SYMBOL(acp_platform_device_unregister);
+
+/*
+  
==
+  
==
+  Interrupts
+  
==
+  
==
+*/
+
+#include linux/irqdomain.h
+
+/*
+  
--
+  acp_irq_create_mapping
+*/
+
+unsigned int
+acp_irq_create_mapping(struct irq_domain *host, irq_hw_number_t hwirq)
+{
+return irq_create_mapping(host, hwirq);
+}
+
+EXPORT_SYMBOL(acp_irq_create_mapping);
diff --git a/arch/powerpc/sysdev/lsi_acp_wrappers.c 
b/arch/powerpc/sysdev/lsi_acp_wrappers.c
index cb49067..f944741 100644
--- a/arch/powerpc/sysdev/lsi_acp_wrappers.c
+++ b/arch/powerpc/sysdev/lsi_acp_wrappers.c
@@ -19,8 +19,6 @@
   */

  #include linux/module.h
-#include linux/spinlock.h
-#include linux/sched.h
  #include linux/of.h
  #include linux/io.h
  #include asm/irq.h
@@ -218,91 +216,6 @@ unsigned int acp_irq_create_mapping(struct irq_domain 
*host,
  EXPORT_SYMBOL(acp_irq_create_mapping);

  /*
-  
-  
-  Spin Locks
-  
-  
-*/
-
-/*
- * -
- * acp_spin_lock_init
- */
-
-void 

Re: [linux-yocto] [PATCH 32/94] arm/configs: Add CONFIG_NET_NS and CONFIG_DMATEST to the default ARM configurations.

2013-11-09 Thread Bruce Ashfield

On 11/7/2013, 8:12 PM, Paul Butler wrote:

From: John Jacques john.jacq...@lsi.com


insert Bruce's configuration fragment comment here

Bruce



Signed-off-by: John Jacques john.jacq...@lsi.com
---
  arch/arm/configs/lsi_defconfig| 4 ++--
  arch/arm/configs/lsisim_defconfig | 4 ++--
  2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/configs/lsi_defconfig b/arch/arm/configs/lsi_defconfig
index 5b40c31..f55f19b 100644
--- a/arch/arm/configs/lsi_defconfig
+++ b/arch/arm/configs/lsi_defconfig
@@ -103,7 +103,7 @@ CONFIG_NAMESPACES=y
  # CONFIG_IPC_NS is not set
  # CONFIG_USER_NS is not set
  # CONFIG_PID_NS is not set
-# CONFIG_NET_NS is not set
+CONFIG_NET_NS=y
  CONFIG_SCHED_AUTOGROUP=y
  # CONFIG_SYSFS_DEPRECATED is not set
  CONFIG_RELAY=y
@@ -2021,7 +2021,7 @@ CONFIG_DMA_ENGINE=y
  #
  # CONFIG_NET_DMA is not set
  # CONFIG_ASYNC_TX_DMA is not set
-# CONFIG_DMATEST is not set
+CONFIG_DMATEST=m
  # CONFIG_AUXDISPLAY is not set
  # CONFIG_UIO is not set

diff --git a/arch/arm/configs/lsisim_defconfig 
b/arch/arm/configs/lsisim_defconfig
index fee9c5c..4ccc1ba 100644
--- a/arch/arm/configs/lsisim_defconfig
+++ b/arch/arm/configs/lsisim_defconfig
@@ -103,7 +103,7 @@ CONFIG_NAMESPACES=y
  # CONFIG_IPC_NS is not set
  # CONFIG_USER_NS is not set
  # CONFIG_PID_NS is not set
-# CONFIG_NET_NS is not set
+CONFIG_NET_NS=y
  CONFIG_SCHED_AUTOGROUP=y
  # CONFIG_SYSFS_DEPRECATED is not set
  CONFIG_RELAY=y
@@ -2032,7 +2032,7 @@ CONFIG_DMA_ENGINE=y
  #
  # CONFIG_NET_DMA is not set
  # CONFIG_ASYNC_TX_DMA is not set
-# CONFIG_DMATEST is not set
+CONFIG_DMATEST=m
  # CONFIG_AUXDISPLAY is not set
  # CONFIG_UIO is not set




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


Re: [linux-yocto] [PATCH 33/94] drivers/tty: Handle baud rate changes. The initial port only ran at 115200.

2013-11-09 Thread Bruce Ashfield

The second part of the short log .. should be the long log.

On 11/7/2013, 8:12 PM, Paul Butler wrote:

From: John Jacques john.jacq...@lsi.com

Signed-off-by: John Jacques john.jacq...@lsi.com
---
  arch/arm/mach-axxia/clock.c | 64 +
  drivers/tty/serial/amba-pl011.c |  4 +--
  2 files changed, 66 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-axxia/clock.c b/arch/arm/mach-axxia/clock.c
index 619ba5d..27ace6f 100644
--- a/arch/arm/mach-axxia/clock.c
+++ b/arch/arm/mach-axxia/clock.c
@@ -25,6 +25,7 @@
clkdev_add(cl); \
} while (0)

+#ifdef CONFIG_ARCH_AXXIA_SIM

  void __init
  axxia_init_clocks(void)
@@ -77,3 +78,66 @@ axxia_init_clocks(void)
/* PL180 MMCI */
clk_register_clkdev(clk, NULL, mmci);
  }
+
+#else
+
+/*
+  
---
+  axxia_init_clocks
+
+  Clock setup for Emulation/ASIC systems.
+*/
+
+void __init
+axxia_init_clocks(void)
+{
+   struct clk *clk;
+   int i;
+
+   /* APB clock dummy */
+   clk = clk_register_fixed_rate(NULL, apb_pclk, NULL,
+ CLK_IS_ROOT, AXXIA_SYS_CLOCK/2);
+   clk_register_clkdev(clk, apb_pclk, NULL);
+
+   /* CPU core clock (1400MHz) from CPU_PLL */
+   clk = clk_register_fixed_rate(NULL, clk_cpu, NULL,
+ CLK_IS_ROOT, AXXIA_CPU_CLOCK);
+
+   /* APB and System AXI clock from CPU_PLL */
+   clk = clk_register_fixed_rate(NULL, clk_pclk, NULL,
+ CLK_IS_ROOT, AXXIA_CPU_CLOCK/9);
+
+   /* DDR3 (interface 1) clock from SMEM1_PLL */
+   clk = clk_register_fixed_rate(NULL, clk_smem1_2x, NULL,
+ CLK_IS_ROOT, AXXIA_DDR_CLOCK);
+
+   /* AXIS slow peripheral clock from SMEM1_PLL. */
+   clk = clk_register_fixed_rate(NULL, clk_per, NULL,
+ CLK_IS_ROOT, 200);
+   /* PL011 UART0 */
+   clk_register_clkdev(clk, NULL, 201008.uart);
+   /* PL011 UART1 */
+   clk_register_clkdev(clk, NULL, 2010081000.uart);
+   /* PL011 UART2 */
+   clk_register_clkdev(clk, NULL, 2010082000.uart);
+   /* PL011 UART3 */
+   clk_register_clkdev(clk, NULL, 2010083000.uart);
+   /* PL022 SSP */
+   clk_register_clkdev(clk, NULL, ssp);
+
+   /* Timers 1MHz clock */
+   clk = clk_register_fixed_rate(NULL, clk_1mhz, NULL,
+ CLK_IS_ROOT, 100);
+   /* SP804 timers */
+   clk_register_clkdev(clk, NULL, sp804);
+   for (i = 0; i  8; i++)
+   clk_register_clkdev(clk, NULL, axxia-timer%d, i);
+
+   /* Dummy MMC clk */
+   clk = clk_register_fixed_rate(NULL, clk_mmci, NULL,
+ CLK_IS_ROOT, 2500);
+   /* PL180 MMCI */
+   clk_register_clkdev(clk, NULL, mmci);
+}
+
+#endif
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index abe91eb..aa46383 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1378,7 +1378,7 @@ static void pl010_put_poll_char(struct uart_port *port,

  #endif /* CONFIG_CONSOLE_POLL */

-static int pl011_startup(struct uart_port *port)
+/*ZZZ static*/ int pl011_startup(struct uart_port *port)


ZZZ static ?

Bruce


  {
struct uart_amba_port *uap = (struct uart_amba_port *)port;
unsigned int cr;
@@ -1667,7 +1667,7 @@ pl011_set_termios(struct uart_port *port, struct ktermios 
*termios,
quot -= 2;
}
/* Set baud rate */
-#if 0
+#if 1
writew(quot  0x3f, port-membase + UART011_FBRD);
writew(quot  6, port-membase + UART011_IBRD);
  #else



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


Re: [linux-yocto] [PATCH 36/94] arm/mach-axxia: Don't try to initialize pcie late.

2013-11-09 Thread Bruce Ashfield

On 11/7/2013, 8:12 PM, Paul Butler wrote:

From: John Jacques john.jacq...@lsi.com

This needs to be done earlier.

Signed-off-by: John Jacques john.jacq...@lsi.com
---
  arch/arm/mach-axxia/axxia.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-axxia/axxia.c b/arch/arm/mach-axxia/axxia.c
index 5d4f586..a54aeb7 100644
--- a/arch/arm/mach-axxia/axxia.c
+++ b/arch/arm/mach-axxia/axxia.c
@@ -237,7 +237,7 @@ void __init axxia_dt_init(void)
writel(0x1F, ssp_base+0x30);
}

-   axxia_pcie_init();
+   /*axxia_pcie_init();*/


remove it completely. And where's the patch that makes it earlier ?

Bruce



  #ifdef CONFIG_I2C
axxia_register_i2c_busses();



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


Re: [linux-yocto] [PATCH 37/94] drivers/tty: Hard code the baud rate divisors for now.

2013-11-09 Thread Bruce Ashfield

On 11/7/2013, 8:12 PM, Paul Butler wrote:

From: John Jacques john.jacq...@lsi.com

This assumes that the AXM55xx_533 parameter file is used.

Signed-off-by: John Jacques john.jacq...@lsi.com
---
  drivers/tty/serial/amba-pl011.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index aa46383..4587609 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1667,12 +1667,12 @@ pl011_set_termios(struct uart_port *port, struct 
ktermios *termios,
quot -= 2;
}
/* Set baud rate */
-#if 1
+#if 0


Same comment. Why are we carrying #if 0 code ?

Bruce


writew(quot  0x3f, port-membase + UART011_FBRD);
writew(quot  6, port-membase + UART011_IBRD);
  #else
-   writew(0x5, port-membase + UART011_FBRD);
-   writew(0x1, port-membase + UART011_IBRD);
+   writew(0x3, port-membase + UART011_FBRD);
+   writew(0x364, port-membase + UART011_IBRD);
  #endif

/*



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


Re: [linux-yocto] [PATCH 40/94] Support for the new BCM 5221 phy - acp_mdio

2013-11-09 Thread Bruce Ashfield

On 11/7/2013, 8:12 PM, Paul Butler wrote:

Signed-off-by: Paul Butler paul.but...@windriver.com
---
  drivers/net/ethernet/lsi/lsi_acp_mdio.c | 5 +
  1 file changed, 5 insertions(+)

diff --git a/drivers/net/ethernet/lsi/lsi_acp_mdio.c 
b/drivers/net/ethernet/lsi/lsi_acp_mdio.c
index 90fc135..04c224c 100644
--- a/drivers/net/ethernet/lsi/lsi_acp_mdio.c
+++ b/drivers/net/ethernet/lsi/lsi_acp_mdio.c
@@ -162,8 +162,13 @@ EXPORT_SYMBOL(acp_mdio_write);
  static int
  acp_mdio_initialize(void)
  {
+#if 0


... if this is for support for the new phy, what happens to
the old one ? Considering it is #if 0'd out ?

Bruce


WRITE(MDIO_CLK_OFFSET, 0x10);
WRITE(MDIO_CLK_PERIOD, 0x2c);
+#else
+   WRITE(MDIO_CLK_OFFSET, 0x1c);
+   WRITE(MDIO_CLK_PERIOD, 0xf0);
+#endif

return 0;
  }



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


Re: [linux-yocto] [PATCH 45/94] drivers/usb: USB driver changes for AXM55xx

2013-11-09 Thread Bruce Ashfield

On 11/7/2013, 8:12 PM, Paul Butler wrote:

From: SangeethaRao sangeetha@lsi.com



It would be nice to have a summary of the changes :)


Signed-off-by: SangeethaRao sangeetha@lsi.com
---
  arch/arm/boot/dts/axm55xx.dts   |  9 +++
  drivers/usb/host/ehci-ci13612.c | 59 ++---
  2 files changed, 64 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/axm55xx.dts b/arch/arm/boot/dts/axm55xx.dts
index 1807727..d3cbf1c 100644
--- a/arch/arm/boot/dts/axm55xx.dts
+++ b/arch/arm/boot/dts/axm55xx.dts
@@ -246,6 +246,15 @@
mac-address = [00 00 00 00 00 00];
};

+USB0: usb@004a4000 {
+device_type = usb;
+compatible = acp-usb;
+enabled = 0;
+reg = 0x20 0x1014 0x0 002,
+  0x20 0x10094000 0x0 0002000;
+interrupts = 0 55 4;
+};
+
  amba {
compatible = arm,amba-bus;
#address-cells = 2;
diff --git a/drivers/usb/host/ehci-ci13612.c b/drivers/usb/host/ehci-ci13612.c
index cf0b2e4..02a6d29 100644
--- a/drivers/usb/host/ehci-ci13612.c
+++ b/drivers/usb/host/ehci-ci13612.c
@@ -24,9 +24,15 @@
  #include linux/platform_device.h
  #include linux/irq.h
  #include linux/of_platform.h
+#include linux/of.h
+#include linux/of_address.h
+#include linux/of_irq.h
+#include linux/uaccess.h
+#include linux/io.h


I'm not seeing enough changes in the patch to warrant all these new
includes.


  #include ehci-ci13612.h


+#ifdef CONFIG_LSI_USB_SW_WORKAROUND
  static void ci13612_usb_setup(struct usb_hcd *hcd)
  {
int USB_TXFIFOTHRES, VUSB_HS_TX_BURST;
@@ -64,16 +70,17 @@ static void ci13612_usb_setup(struct usb_hcd *hcd)
USB_TXFIFOTHRES = 0x%x\n, VUSB_HS_TX_BURST, USB_TXFIFOTHRES);
return;
  }
+#endif

  /* called after powerup, by probe or system-pm wakeup */
  static int ehci_ci13612_reinit(struct ehci_hcd *ehci)
  {
+


whitspace change


  #ifdef CONFIG_LSI_USB_SW_WORKAROUND
/* S/W workarounds are not needed in AXM55xx */
ci13612_usb_setup(ehci_to_hcd(ehci));
-#endif
ehci_port_power(ehci, 0);
-
+#endif
return 0;
  }

@@ -84,7 +91,6 @@ static int ci13612_ehci_init(struct usb_hcd *hcd)
int retval = 0;
int len;

-


whitespace change


/* EHCI registers start at offset 0x100 */
ehci-caps = hcd-regs + 0x100;
ehci-regs = hcd-regs + 0x100
@@ -114,11 +120,13 @@ static int ci13612_ehci_init(struct usb_hcd *hcd)
  static int ehci_run_fix(struct usb_hcd *hcd)
  {
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
+#ifdef CONFIG_LSI_USB_SW_WORKAROUND
u32 port_status;
+#endif
unsigned burst_size;
int retval;
-#ifdef CONFIG_LSI_USB_SW_WORKAROUND

+#ifdef CONFIG_LSI_USB_SW_WORKAROUND
/* Fix HW errata 0003256: Do not enable USBCMD.RS for some time after
 * the USB reset has been completed (PORTSCx.PR=0). This ensures that
 * the host does not send the SOF until the ULPI post reset processing
@@ -151,6 +159,25 @@ static int ehci_run_fix(struct usb_hcd *hcd)
burst_size = (burst_size  0x00ff) | 0x4000;/* TXPBURST */
ehci_writel(ehci, burst_size, ehci-regs-reserved[1]);

+#else
+#if 1
+/* Fix for HW errata 9000373951: You can adjust the burst size and fill the
+ * level to minimize under-run possibilities. In the failing case, the
+ * transfer size was 96 bytes, the burst size was 16, and the fill
+ * threshold level was set to 2. Because of this, the Host core issued
+ * the Out token when it requested the second burst of data. If the
+ * burst size had been changed to 8, and the fill level set to 3,
+ * then the core would have pre-fetched the 96 bytes before issuing
+ * the OUT token.
+ */
+   burst_size = ehci_readl(ehci, ehci-regs-reserved[1]);
+   burst_size = (burst_size  0x00ff) | 0x4000;/* TXPBURST */
+   ehci_writel(ehci, burst_size, ehci-regs-reserved[1]);
+
+   retval = ehci_run(hcd);
+   if (retval)
+   return retval;
+#endif


Why the #if 1 block ?


  #endif

return 0;
@@ -190,6 +217,8 @@ static int ci13612_ehci_probe(struct platform_device *pdev)
struct device_node *np = pdev-dev.of_node;
struct resource *res;

+#ifdef CONFIG_LSI_USB_SW_WORKAROUND
+
/* Check if device is enabled */
if (!of_device_is_available(np)) {
printk(KERN_INFO %s: Port disabled via device-tree\n,
@@ -209,12 +238,29 @@ static int ci13612_ehci_probe(struct platform_device 
*pdev)
goto fail_create_hcd;
}

+   if (0 != irq_set_irq_type(87, IRQ_TYPE_LEVEL_HIGH)) {
+   dev_dbg(pdev-dev, set_irq_type() failed\n);
+   retval = -EBUSY;
+   goto fail_create_hcd;
+   }
+#else
+
+   irq = irq_of_parse_and_map(np, 0);
+   if (NO_IRQ == irq) {
+   

Re: [linux-yocto] [PATCH 48/94] drivers/net: Added debug code.

2013-11-09 Thread Bruce Ashfield

On 11/7/2013, 8:13 PM, Paul Butler wrote:

From: John Jacques john.jacq...@lsi.com

Signed-off-by: John Jacques john.jacq...@lsi.com
---
  drivers/net/ethernet/lsi/lsi_acp_mdio.c | 10 ++
  1 file changed, 10 insertions(+)

diff --git a/drivers/net/ethernet/lsi/lsi_acp_mdio.c 
b/drivers/net/ethernet/lsi/lsi_acp_mdio.c
index 04c224c..18aaba1 100644
--- a/drivers/net/ethernet/lsi/lsi_acp_mdio.c
+++ b/drivers/net/ethernet/lsi/lsi_acp_mdio.c
@@ -98,6 +98,11 @@ acp_mdio_read(unsigned long address, unsigned long offset,
*value = (unsigned short)(command  0x);
spin_unlock_irqrestore(mdio_lock, flags);

+#if 0
+   printk(%s - Read 0x%x from 0x%x register 0x%x\n,
+  __FUNCTION__, *value, address, offset);
+#endif
+
return 0;
  }
  EXPORT_SYMBOL(acp_mdio_read);
@@ -150,6 +155,11 @@ acp_mdio_write(unsigned long address, unsigned long offset,

spin_unlock_irqrestore(mdio_lock, flags);

+#if 0


These *really* need to be controlled by a define, or Kconfig that controls
a #define.

Leaving #if 0 code around the tree is bad form.

Bruce


+   printk(%s - Wrote 0x%x to 0x%x register 0x%x\n,
+  __FUNCTION__, value, address, offset);
+#endif
+
return 0;
  }
  EXPORT_SYMBOL(acp_mdio_write);



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


Re: [linux-yocto] [PATCH 52/94] arm/include: A clean up of the femac acp_net.h code.

2013-11-09 Thread Bruce Ashfield

I'd call this more of adding ARM specific code to the common acp_net
driver .. rather than cleanup.

Bruce

On 11/7/2013, 8:13 PM, Paul Butler wrote:

Signed-off-by: Paul Butler paul.but...@windriver.com
---
  drivers/net/ethernet/lsi/lsi_acp_net.h | 76 +++---
  1 file changed, 71 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/lsi/lsi_acp_net.h 
b/drivers/net/ethernet/lsi/lsi_acp_net.h
index f7de38d..9289073 100644
--- a/drivers/net/ethernet/lsi/lsi_acp_net.h
+++ b/drivers/net/ethernet/lsi/lsi_acp_net.h
@@ -40,6 +40,29 @@ extern int ubootenv_get(const char *, char *);

  struct appnic_dma_descriptor {

+#ifdef CONFIG_ARM
+   /* Word 0 */
+   /* 00=Fill|01=Block|10=Scatter */
+   unsigned long transfer_type:2;
+   unsigned long write:1;
+   unsigned long start_of_packet:1;
+   unsigned long end_of_packet:1;
+   unsigned long interrupt_on_completion:1;
+   unsigned long error:1;
+   /* big endian to little endian */
+   unsigned long byte_swapping_on:1;
+   unsigned long unused:24;
+
+   /* Word 1 */
+   unsigned long data_transfer_length:16;
+   unsigned long pdu_length:16;
+
+   /* Word 2 */
+   unsigned long target_memory_address;
+
+   /* Word 3 */
+   unsigned long host_data_memory_pointer;
+#else
/* Word 0 */
unsigned long unused:24;
/* big endian to little endian */
@@ -61,20 +84,27 @@ struct appnic_dma_descriptor {

/* Word 3 */
unsigned long host_data_memory_pointer;
+#endif

-} __packed;
+} __attribute__ ((packed));

  union appnic_queue_pointer {

unsigned long raw;

struct {
+#ifdef CONFIG_ARM
+   unsigned long offset:20;
+   unsigned long generation_bit:1;
+   unsigned long unused:11;
+#else
unsigned long unused:11;
unsigned long generation_bit:1;
unsigned long offset:20;
-   } __packed bits;
+#endif
+   } __attribute__ ((packed)) bits;

-} __packed;
+} __attribute__ ((packed));

  /*

=
@@ -91,10 +121,15 @@ struct appnic_device {
unsigned long rx_base;
unsigned long tx_base;
unsigned long dma_base;
-   unsigned long interrupt;
+   unsigned long tx_interrupt;
+   unsigned long rx_interrupt;
+   unsigned long dma_interrupt;
unsigned long mdio_clock;
unsigned long phy_address;
unsigned long ad_value;
+   unsigned long phy_link_auto;
+   unsigned long phy_link_speed;
+   unsigned long phy_link_duplex;
unsigned char mac_addr[6];

/* NAPI */
@@ -436,6 +471,36 @@ struct appnic_device {
  #define APPNIC_DMA_TX_TAIL_POINTER_LOCAL_COPY_GB  0x10
  #define APPNIC_DMA_TX_TAIL_POINTER_LOCAL_COPY_POINTER 0x0f

+#ifdef CONFIG_ARM
+
+#define read_mac(address) readl((address))
+#define write_mac(value, address) writel((value), (address))
+
+static inline void
+readdescriptor(unsigned long address, struct appnic_dma_descriptor *descriptor)
+{
+   memcpy(descriptor, (void *)address,
+  sizeof(struct appnic_dma_descriptor));
+   return;
+}
+
+static inline void
+writedescriptor(unsigned long address,
+   const struct appnic_dma_descriptor *descriptor)
+{
+   memcpy((void *)address, descriptor,
+  sizeof(struct appnic_dma_descriptor));
+   return;
+}
+
+static inline union appnic_queue_pointer
+swab_queue_pointer(const union appnic_queue_pointer *old_queue)
+{
+   return *old_queue;
+}
+
+#else
+
  #define read_mac(address) in_le32((u32 *) (address))
  #define write_mac(value, address) out_le32((u32 *) (address), (value))

@@ -454,7 +519,7 @@ readdescriptor(unsigned long address, struct 
appnic_dma_descriptor *descriptor)

  static inline void
  writedescriptor(unsigned long address,
-const struct appnic_dma_descriptor *descriptor)
+   const struct appnic_dma_descriptor *descriptor)
  {
unsigned long *to = (unsigned long *) address;
unsigned long *from = (unsigned long *) descriptor;
@@ -473,6 +538,7 @@ swab_queue_pointer(const union appnic_queue_pointer 
*old_queue)
new_queue.raw = swab32(old_queue-raw);
return new_queue;
  }
+#endif /* ifdef CONFIG_ARM */

  #define SWAB_QUEUE_POINTER(pointer) \
  swab_queue_pointer((const union appnic_queue_pointer *) (pointer))



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


Re: [linux-yocto] [PATCH 53/94] drivers/net: The work around for Amarillo needs to be done the first time as well!

2013-11-09 Thread Bruce Ashfield

It would be nice to have a short description about what exactly was
being worked around.

Bruce

On 11/7/2013, 8:13 PM, Paul Butler wrote:

From: John Jacques john.jacq...@lsi.com

Signed-off-by: John Jacques john.jacq...@lsi.com
---
  drivers/net/ethernet/lsi/lsi_acp_net.c | 10 +-
  1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/lsi/lsi_acp_net.c 
b/drivers/net/ethernet/lsi/lsi_acp_net.c
index 331c8e4..cfd8106 100644
--- a/drivers/net/ethernet/lsi/lsi_acp_net.c
+++ b/drivers/net/ethernet/lsi/lsi_acp_net.c
@@ -181,6 +181,11 @@ static void appnic_handle_link_change(struct net_device 
*dev)
status_change = 1;
}

+#ifdef AMARILLO_WA
+   rx_configuration = ~0x1000;
+   tx_configuration = ~0x1000;
+#endif
+
if (status_change) {
if (phydev-link) {
netif_carrier_on(dev);
@@ -193,11 +198,6 @@ static void appnic_handle_link_change(struct net_device 
*dev)
netdev_info(dev, link down\n);
}

-#ifdef AMARILLO_WA
-   rx_configuration = ~0x1000;
-   tx_configuration = ~0x1000;
-#endif
-
if (rx_configuration != read_mac(APPNIC_RX_CONF))
write_mac(rx_configuration, APPNIC_RX_CONF);




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


Re: [linux-yocto] [PATCH 62/94] arm/mach-axxia: add support for SPI flash.

2013-11-09 Thread Bruce Ashfield

On 11/7/2013, 8:13 PM, Paul Butler wrote:

From: John Jacques john.jacq...@lsi.com

Signed-off-by: John Jacques john.jacq...@lsi.com
Signed-off-by: Paul Butler paul.but...@windriver.com
---
  arch/arm/boot/dts/axm55xx.dts  | 157 -
  arch/arm/configs/lsi_defconfig |   3 +-
  arch/arm/mach-axxia/axxia.c|  25 ++-
  3 files changed, 99 insertions(+), 86 deletions(-)

diff --git a/arch/arm/boot/dts/axm55xx.dts b/arch/arm/boot/dts/axm55xx.dts
index 9315ef2..b3df3ad 100644
--- a/arch/arm/boot/dts/axm55xx.dts
+++ b/arch/arm/boot/dts/axm55xx.dts
@@ -10,12 +10,12 @@
   *
   * 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
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the


.. this seems a bit random.


   * 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
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 USA


.. as does this.


   */

  /dts-v1/;
@@ -32,8 +32,8 @@
chosen { };

aliases {
-   serial0   = axxia_serial0;
-   timer = axxia_timers;
+   serial0   = axxia_serial0;
+   timer = axxia_timers;
ethernet0 = axxia_femac0;
};

@@ -45,112 +45,112 @@
device_type = cpu;
compatible = arm,cortex-a15;
reg = 0;
-cpu-release-addr = 0; // Fixed by the boot loader
+   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-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-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-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-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-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
+   cpu-release-addr = 0; // Fixed by the boot loader
};

cpu@7 {
device_type = cpua;
compatible = arm,cortex-a15;
reg = 7;
-cpu-release-addr = 0; // Fixed by the boot loader
+   cpu-release-addr = 0; // Fixed by the boot loader
};

cpu@8 {
device_type = cpu;
compatible = arm,cortex-a15;
reg = 8;
-cpu-release-addr = 0; // Fixed by the boot loader
+   cpu-release-addr = 0; // Fixed by the boot loader
};

cpu@9 {
device_type = cpu;
compatible = arm,cortex-a15;
reg = 9;
-cpu-release-addr = 0; // Fixed by the boot loader
+   cpu-release-addr = 0; // Fixed by the boot loader
};

cpu@10 {
device_type = cpu;
compatible = arm,cortex-a15;
reg = 10;
-   

Re: [linux-yocto] [PATCH 69/94] arm/mach-axxia: Fixed type1 PCIe enumeration issue

2013-11-09 Thread Bruce Ashfield

On 11/7/2013, 8:13 PM, Paul Butler wrote:

From: SangeethaRao sangeetha@lsi.com


Obviously the masking and shifting isn't necessary. But is there a
description of the issues that the masking and shifting was causing ?
It'll save some poor soul that might not have the latest code some
time, if it is logged in the commit.

Bruce



Signed-off-by: SangeethaRao sangeetha@lsi.com
---
  arch/arm/mach-axxia/pci.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-axxia/pci.c b/arch/arm/mach-axxia/pci.c
index b0ddab6..2600892 100644
--- a/arch/arm/mach-axxia/pci.c
+++ b/arch/arm/mach-axxia/pci.c
@@ -209,8 +209,8 @@ axxia_pciex_get_config_base(struct axxia_pciex_port *port,
return port-regs;

relbus = bus-number - (port-root_bus_nr + 1);
-   dev= (PCI_SLOT(devfn)  0xf8)  3;
-   fn = (PCI_FUNC(devfn)  0x7);
+   dev= PCI_SLOT(devfn);
+   fn = PCI_FUNC(devfn);

if (dev  31)
return NULL;



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


Re: [linux-yocto] [PATCH 86/94] arm/mach-axxia: L3 Cache is not available in simulation!

2013-11-09 Thread Bruce Ashfield

On 11/7/2013, 8:18 PM, Paul Butler wrote:

From: John Jacques john.jacq...@lsi.com

Signed-off-by: John Jacques john.jacq...@lsi.com
---
  arch/arm/mach-axxia/axxia.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-axxia/axxia.c b/arch/arm/mach-axxia/axxia.c
index 4d3b476..df63dbd 100644
--- a/arch/arm/mach-axxia/axxia.c
+++ b/arch/arm/mach-axxia/axxia.c
@@ -232,7 +232,7 @@ l3_set_pstate(void __iomem *l3ctrl, unsigned int req, 
unsigned int act)

if (0 == retries)
return -ENODEV;
-
+   }


'nit. whitespace change.

Bruce



return 0;
  }
@@ -243,6 +243,7 @@ void __init axxia_dt_init(void)
int rc;

/* Enable L3-cache */
+#ifndef CONFIG_ARCH_AXXIA_SIM
l3ctrl = ioremap(0x20ULL, SZ_4M);
if (l3ctrl) {
rc = l3_set_pstate(l3ctrl, 0x3, 0xc);
@@ -252,6 +253,7 @@ void __init axxia_dt_init(void)
} else {
pr_warn(axxia: Failed to map L3-cache control regs\n);
}
+#endif

of_platform_populate(NULL, of_default_bus_match_table,
 axxia_auxdata_lookup, NULL);



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


Re: [linux-yocto] [PATCH 88/94] arm/configs: In order to get the Preempt-RT branch building

2013-11-09 Thread Bruce Ashfield

On 11/7/2013, 8:18 PM, Paul Butler wrote:

From: John Jacques john.jacq...@lsi.com

The default configuration had to be refreshed.


And this is the exact thing that we want to avoid with configuration
fragments.

Again, I assume that Paul is going to follow up with configuration
fragments for the -rt and non-rt parts of the support, to go along
with the defconfigs.

Bruce



Signed-off-by: John Jacques john.jacq...@lsi.com
---
  arch/arm/configs/lsisim_rt_defconfig | 13 +++--
  1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/arm/configs/lsisim_rt_defconfig 
b/arch/arm/configs/lsisim_rt_defconfig
index c67904a..83d6226 100644
--- a/arch/arm/configs/lsisim_rt_defconfig
+++ b/arch/arm/configs/lsisim_rt_defconfig
@@ -20,6 +20,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
  CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
  CONFIG_GENERIC_HWEIGHT=y
  CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
  CONFIG_NEED_DMA_MAP_STATE=y
  CONFIG_VECTORS_BASE=0x
  CONFIG_ARM_PATCH_PHYS_VIRT=y
@@ -76,7 +77,6 @@ CONFIG_IRQ_FORCED_THREADING=y
  #
  # RCU Subsystem
  #
-# CONFIG_TREE_RCU is not set
  CONFIG_TREE_PREEMPT_RCU=y
  CONFIG_PREEMPT_RCU=y
  CONFIG_RCU_FANOUT=32
@@ -104,7 +104,7 @@ CONFIG_NAMESPACES=y
  # CONFIG_IPC_NS is not set
  # CONFIG_USER_NS is not set
  # CONFIG_PID_NS is not set
-# CONFIG_NET_NS is not set
+CONFIG_NET_NS=y
  CONFIG_SCHED_AUTOGROUP=y
  # CONFIG_SYSFS_DEPRECATED is not set
  CONFIG_RELAY=y
@@ -150,8 +150,6 @@ CONFIG_VM_EVENT_COUNTERS=y
  CONFIG_PCI_QUIRKS=y
  # CONFIG_COMPAT_BRK is not set
  CONFIG_SLAB=y
-# CONFIG_SLUB is not set
-# CONFIG_SLOB is not set
  CONFIG_PROFILING=y
  CONFIG_HAVE_OPROFILE=y
  # CONFIG_KPROBES is not set
@@ -425,7 +423,8 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
  CONFIG_COMPACTION=y
  CONFIG_MIGRATION=y
  CONFIG_PHYS_ADDR_T_64BIT=y
-CONFIG_ZONE_DMA_FLAG=0
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
  CONFIG_VIRT_TO_BUS=y
  CONFIG_KSM=y
  CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
@@ -779,6 +778,8 @@ CONFIG_BLK_DEV_LOOP_MIN_COUNT=8
  # CONFIG_PCH_PHUB is not set
  # CONFIG_USB_SWITCH_FSA9480 is not set
  # CONFIG_LSI_MTC is not set
+# CONFIG_LSI_NCR is not set
+# CONFIG_LSI_SMMON is not set
  # CONFIG_C2PORT is not set

  #
@@ -2033,7 +2034,7 @@ CONFIG_DMA_ENGINE=y
  #
  # CONFIG_NET_DMA is not set
  # CONFIG_ASYNC_TX_DMA is not set
-# CONFIG_DMATEST is not set
+CONFIG_DMATEST=m
  # CONFIG_AUXDISPLAY is not set
  # CONFIG_UIO is not set




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


Re: [linux-yocto] [PATCH 91/94] drivers/ethernet: Set the watermark correctly in emulation

2013-11-09 Thread Bruce Ashfield

On 11/7/2013, 8:18 PM, Paul Butler wrote:

From: John Jacques john.jacq...@lsi.com

and fix a compile bug on PowerPC.


any chance we have a log of the error message handy ?

Bruce



Signed-off-by: John Jacques john.jacq...@lsi.com
---
  drivers/net/ethernet/lsi/lsi_acp_net.c | 19 ++-
  1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/lsi/lsi_acp_net.c 
b/drivers/net/ethernet/lsi/lsi_acp_net.c
index 95ccd7d..bfb91ad 100644
--- a/drivers/net/ethernet/lsi/lsi_acp_net.c
+++ b/drivers/net/ethernet/lsi/lsi_acp_net.c
@@ -88,6 +88,7 @@
  #include asm/dma.h

  #include lsi_acp_net.h
+#include ../../../misc/lsi-ncr.h

  extern int acp_mdio_read(unsigned long, unsigned long, unsigned short *, int);
  extern int acp_mdio_write(unsigned long, unsigned long, unsigned short, int);
@@ -1366,6 +1367,7 @@ int appnic_init(struct net_device *dev)
unsigned long buf;
struct appnic_dma_descriptor descriptor;
struct sockaddr address;
+   unsigned long node_cfg;

  #ifdef CONFIG_ARM
/* Set FEMAC to uncached */
@@ -1637,7 +1639,18 @@ int appnic_init(struct net_device *dev)
write_mac(0x1, APPNIC_RX_MODE);
write_mac(0x0, APPNIC_TX_SOFT_RESET);
write_mac(0x1, APPNIC_TX_MODE);
-   write_mac(0x300a, APPNIC_TX_WATERMARK);
+
+/*
+* Set the watermark.
+*/
+
+   ncr_read(NCP_REGION_ID(0x16, 0xff), 0x10, 4, node_cfg);
+
+   if (0 == (0x8000  node_cfg))
+   write_mac(0x300a, APPNIC_TX_WATERMARK);
+   else
+   write_mac(0xc00096, APPNIC_TX_WATERMARK);
+
write_mac(0x1, APPNIC_TX_HALF_DUPLEX_CONF);
write_mac(0x, APPNIC_TX_TIME_VALUE_CONF);
write_mac(0x1, APPNIC_TX_INTERRUPT_CONTROL);
@@ -1927,7 +1940,9 @@ device_tree_failed:
iounmap(rx_base);
iounmap(tx_base);
iounmap(dma_base);
+#ifdef CONFIG_ARM
iounmap(gpreg_base);
+#endif
return -EINVAL;
  }
  #else
@@ -2120,7 +2135,9 @@ static int __devexit appnic_drv_remove(struct 
platform_device *pdev)
iounmap(rx_base);
iounmap(tx_base);
iounmap(dma_base);
+#ifdef CONFIG_ARM
iounmap(gpreg_base);
+#endif

return 0;
  }



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


Re: [linux-yocto] [PATCH 07/94] arm/configs: adding common LSI defconfig

2013-11-09 Thread Paul Butler
On Sat, Nov 09, 2013 at 09:12:39AM -0500, Bruce Ashfield wrote:
 Same comment here. I presume there are some BSP meta data updates
 lurking ?
 
Yes, meta data patches will be coming. Just not ready yet.

 Bruce
 
 On 11/7/2013, 8:12 PM, Paul Butler wrote:
 Signed-off-by: Paul Butlerpaul.but...@windriver.com
 ---
   arch/arm/configs/lsisim_defconfig | 48 
  ---
   1 file changed, 15 insertions(+), 33 deletions(-)
 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


Re: [linux-yocto] [PATCH 12/94] arch/powerpc: Release the lock when ncr_read() completes.

2013-11-09 Thread Jacques, John M (John)
The RTE is an external module that allows the rest of the Axxia hardware (the 
network processor part) to be used.  One of the ways to access registers in the 
network processor is via the config ring (ncr).  Since the config ring gets 
used by Linux, the module, and possibly external devices via PCI, there is a 
locking mechanism in the hardware.  Without the patch below, Linux holds the 
lock indefinitely.

-Original Message-
From: Bruce Ashfield [mailto:bruce.ashfi...@windriver.com] 
Sent: Saturday, November 09, 2013 8:19 AM
To: Paul Butler; linux-yocto@yoctoproject.org
Cc: Jacques, John M (John)
Subject: Re: [PATCH 12/94] arch/powerpc: Release the lock when ncr_read() 
completes.

On 11/7/2013, 8:12 PM, Paul Butler wrote:
 From: John Jacques john.jacq...@lsi.com

 Without this the RTE won't load.

Anymore detail ? Like the error message the user sees ?

Bruce


 Signed-off-by: John Jacques john.jacq...@lsi.com
 ---
   arch/powerpc/sysdev/lsi_acp_ncr.c | 2 ++
   1 file changed, 2 insertions(+)

 diff --git a/arch/powerpc/sysdev/lsi_acp_ncr.c 
 b/arch/powerpc/sysdev/lsi_acp_ncr.c
 index 9802110..736ca5d 100644
 --- a/arch/powerpc/sysdev/lsi_acp_ncr.c
 +++ b/arch/powerpc/sysdev/lsi_acp_ncr.c
 @@ -211,6 +211,8 @@ ncr_read(unsigned long region, unsigned long address, int 
 number, void *buffer)
   memcpy((void *) buffer, temp, number);
   }

 + ncr_unlock(LOCK_DOMAIN);
 +
   return 0;
   }
   EXPORT_SYMBOL(ncr_read);



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