[linux-yocto] [PATCH 052/269] arch/arm: arm changes to support the axxia BSP

2018-03-02 Thread Daniel Dragomir
From: Charlie Paul 

These files were changed to support the LSI axxia 5500 board.

Signed-off-by: Charlie Paul 
Signed-off-by: John Jacques 
---
 arch/arm/Kconfig  | 84 ++-
 arch/arm/Kconfig.debug|  4 ++
 arch/arm/Makefile |  2 +-
 arch/arm/include/asm/kmap_types.h |  5 +++
 arch/arm/include/asm/spinlock.h   |  6 +++
 arch/arm/kernel/head.S|  8 
 arch/arm/kernel/irq.c |  2 +-
 arch/arm/kernel/perf_event_v7.c   |  3 +-
 arch/arm/tools/mach-types |  1 +
 9 files changed, 111 insertions(+), 4 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c0fcab6..0f6c9e0 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -359,6 +359,29 @@ config ARM_SINGLE_ARMV7M
select SPARSE_IRQ
select USE_OF
 
+config ARCH_AXXIA
+   bool "LSI Axxia family"
+   select ARCH_PHYS_ADDR_T_64BIT
+   select ARCH_DMA_ADDR_T_64BIT
+   select ARCH_WANT_OPTIONAL_GPIOLIB
+   select ARM_AMBA
+   select COMMON_CLK
+   select CLKDEV_LOOKUP
+   select CLKSRC_MMIO
+   select GENERIC_CLOCKEVENTS
+   select HAVE_CLK
+   select HAVE_PATA_PLATFORM
+   select ARM_TIMER_SP804
+   select ICST
+   select NEED_MACH_IO_H
+   select ZONE_DMA
+   select PCI
+   select PCI_DOMAINS if PCI
+   select ARCH_SUPPORTS_MSI if PCI
+   select HAS_RAPIDIO
+   help
+ This enables support for the LSI Axxia boards.
+
 config ARCH_EBSA110
bool "EBSA-110"
select ARCH_USES_GETTIMEOFFSET
@@ -839,6 +862,8 @@ source "arch/arm/mach-ux500/Kconfig"
 
 source "arch/arm/mach-versatile/Kconfig"
 
+source "arch/arm/mach-axxia/Kconfig"
+
 source "arch/arm/mach-vexpress/Kconfig"
 source "arch/arm/plat-versatile/Kconfig"
 
@@ -1268,6 +1293,19 @@ source "drivers/pci/Kconfig"
 
 source "drivers/pcmcia/Kconfig"
 
+config HAS_RAPIDIO
+   bool
+   default n
+
+config RAPIDIO
+   bool "RapidIO support"
+   depends on HAS_RAPIDIO || PCI
+   help
+  If you say Y here, the kernel will include drivers and
+  infrastructure code to support RapidIO interconnect devices.
+
+source "drivers/rapidio/Kconfig"
+
 endmenu
 
 menu "Kernel Features"
@@ -1438,12 +1476,46 @@ config NR_CPUS
depends on SMP
default "4"
 
+menu "Support for hot-pluggable CPUs"
+
 config HOTPLUG_CPU
bool "Support for hot-pluggable CPUs"
-   depends on SMP
+   depends on SMP && HOTPLUG
help
  Say Y here to experiment with turning CPUs off and on.  CPUs
  can be controlled through /sys/devices/system/cpu.
+choice
+   prompt "CPU Power Down Mode"
+   default HOTPLUG_CPU_COMPLETE_POWER_DOWN
+   help
+   This is used to select how the CPU is going to be powered down. 
If LOW POWER
+   is selected then the CPU enters a WFI state and waits for an 
interrupt to
+   wake up. If COMPLETE POWER down is selected the CPU power is 
turned off. The only
+   way to power on the CPU is to execute a command.
+
+config HOTPLUG_CPU_COMPLETE_POWER_DOWN
+   bool "Power off the CPU"
+   help
+   This will power off the CPU completely. The irqs are migrated
+   to another CPU.
+
+config HOTPLUG_CPU_LOW_POWER
+   bool "Low Power CPU (wfi)"
+   help
+   This will put the CPU into a low power mode wfi mode. When an 
interrupt
+   is received the CPU will power on again.
+
+endchoice
+
+config HOTPLUG_CPU_L2_POWER_DOWN
+   bool "Power Off L2 Cache"
+   depends on HOTPLUG_CPU_COMPLETE_POWER_DOWN
+   default n if HOTPLUG_CPU_LOW_POWER
+   help
+   Select this if you want to power down the L2 cache when
+   all CPUS of a cluster have been powered off.
+
+endmenu
 
 config ARM_PSCI
bool "Support for the ARM Power State Coordination Interface (PSCI)"
@@ -1456,6 +1528,16 @@ config ARM_PSCI
  0022A ("Power State Coordination Interface System Software on
  ARM processors").
 
+config LOCAL_TIMERS
+   bool "Use local timer interrupts"
+   depends on SMP
+   default y
+   help
+ Enable support for local timers on SMP platforms, rather then the
+ legacy IPI broadcast method.  Local timers allows the system
+ accounting to be spread across the timer interval, preventing a
+ "thundering herd" at every timer tick.
+
 # The GPIO number here must be sorted by descending number. In case of
 # a multiplatform kernel, we just want the highest value required by the
 # selected platforms.
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 426d271..4f58e22 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -145,6 +145,10 @@ choice
  Say Y here if you want kernel low-level 

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

2018-03-02 Thread Daniel Dragomir
From: David Mercado 

Modify irq_set_affinity() to allow usage of bus locks with "slow bus" IRQ
controllers.  This only affects those BSPs that use bus locks in their IRQ
controllers, such as the LSI Axxia GIC.  The recommendation for this
change originated from Thomax Gleixner at Linutronix.

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 425170d..ff0 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -244,16 +244,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, bool 
force)
 {
-   struct irq_desc *desc = irq_to_desc(irq);
unsigned long flags;
+   struct irq_desc *desc = irq_get_desc_buslock(irq, ,
+   IRQ_GET_DESC_CHECK_GLOBAL);
int ret;
 
if (!desc)
return -EINVAL;
 
-   raw_spin_lock_irqsave(>lock, flags);
ret = irq_set_affinity_locked(irq_desc_get_irq_data(desc), mask, force);
-   raw_spin_unlock_irqrestore(>lock, flags);
+   irq_put_desc_busunlock(desc, flags);
return ret;
 }
 
-- 
2.7.4

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


[linux-yocto] [PULL REQUEST v2] Intel Axxia updates to linux-yocto-4.12

2018-03-02 Thread Daniel Dragomir
Hello Bruce and Paul!

I made a cleanup on the first series of patches as you sugested, but need
your opinion on this v2 series.

For some patches, I spoke with the authors about the need of the changes
since some are beyond my knowledge. I didn't send all 269 patches to the
mailing list, but only some for review:

- without the change in kernel/irq/manage.c the 5500 board (axxiaarm bsp)
  will not boot (details in commit log)

- some changes in arch/arm/kernel required to support axxia 5500 board

- fs/vmfs: Adding arm vmfs file system
  Virtual file system originally available from ARM, deprecated and not 
supported,
  but still needed for Axxia5500 simulator.

I checked all the patches with checkpatch.pl script and fixed all errors.
Also, I compiled Axxia BSP using both branches and successfully booted the
Victoria (axxiaarm64) and Amarillo (axxiaarm) boards.

Please pull the patches from
https://github.com/axxia/axxia_yocto_linux_4.12_pull.git
into
git://git.yoctoproject.org/linux-yocto-4.12

Pull
standard/axxia/base-1.1v2 -> standard/axxia/base
standard/preempt-rt/axxia/base-1.1v2 -> standard/preempt-rt/axxia/base

If you add more patches to standard/(preempt-rt)/axxia/base beforehand
please notify me. I will rebase our changes so you can do a clean,
fast-forward pull.

Thank you,
Daniel Dragomir

Anders Berg (14):
  arm64: dts: Add initial AXM56xx device tree
  arm64: Add Axxia NEMAC Gigabit Ethernet controller
  arm64: dts: Corrected SPI definitions for AXM56xx
  arm64: dts: Added SPI and flash for AXM56xx sim
  arm64: dts: Add VMFS node for simulation DT
  net: ethernet: Enable Axxia FEMAC driver
  arm64: dts: Add device tree for AXC67xx (Lionfish)
  arm64: dts: Fixed bad VMFS reg property
  net: ethernet: Add MDIO driver for LSI AXM55xx
  net: ethernet: Add driver for FEMAC on AXM55xx
  drivers: net: Add Axxia NEMAC driver
  arm64: dts: Add NEMAC device nodes
  net: nemac: Fix crash when using NEMAC from bootloader
  misc: lsi-ncr: Only use AMP lock on PPC platforms.

Charlie Paul (43):
  fs/vmfs: Adding arm vmfs file system
  i2c: Support for i2c to the LSI axxia 5500 board
  drivers/dma: Updated to support Axxia dma
  arch/arm/boot/dts: Files added to support axxia 5500 board
  arch/arm/boot: Changes to support the axxia BSP
  arch/arm/mach-axxia: kernel files to support the mach-axxia
  arch/arm: arm changes to support the axxia BSP
  misc: Changes made to support axxia BSP
  drivers/mtd: Changes to support the axxia BSP
  drivers/net/ethernet: Changes to support the axxia BSP
  drivers/rapidio/devices: Changes to support axxia BSP
  drivers/spi: Changes to support the axxia BSP
  drivers/tty: Changes to support the axxia BSP
  drivers/usb/host: Changes to support the axxia BSP
  arch/arm/mach-axxia: Removed axxia_circular_queue
  arch/arm/mach-axxia: fixed compiler warning
  arch/arm/mach-axxia: fixed NO SMP
  arch/arm/mach-axxia: changed affinity parameter to cpu
  arch/arm/mach-axxia: Reverse checkpatch compatibility
  arch/arm/mach-axxia: Fixed L2 power up failure
  arch/arm/axxia: Remove the axxia zImage.fm build
  drivers/ethernet/lsi: Fixed code to support 4.1
  arm/mach-axxia: Updated to support linux 4.1
  drivers/misc: Updated to support linux 4.1
  drivers/rapidio: Update to support linux 4.9
  drivers/pci: updated to support axxia for 4.9
  drivers/net: Updated to support axxia on 4.9
  driver/net/ethernet: Updated to support axxia on 4.9
  drivers/misc: Updated to support axxia on 4.9
  drivers/i2c/busses: Updated to support axxia on 4.9
  arch/arm/mach-axxia: Updated to support 4.9 on the 5500
  i2c/busses: Updated to support 4.9 on the 5500
  drivers/net: Updated to support 4.9 on the 5500
  boot/dts/axxia: Updated to support 4.9 on the 5500
  arm/mach-axxia: allow interupts (16-32) set to LOW
  drivers/usb/core: fix over-current race condition
  drivers/usb/dwc3: Initialize dma for axxia dwc3
  drivers/misc: Add Fault Handling for Axxia
  drivers/edac: Added axxia edac
  drivers/gpio: updated to support axxia gpio
  drivers/net/ethernet: updated nemac for compile
  drivers/usb/dwc3: updated to compile usb dwc3
  linux/amba: added support for pl061.h

Daniel Dragomir (1):
  tools/perf: Correct the hexa value 0x1ULL from opencsd

David Mercado (1):
  kernel/irq/manage.c: Fix irq_set_affinity to allow use with buslocks

Fredrik Markstrom (1):
  usb ehci-ci13612: Enable HCD_BH mode in ci13612

Gary McGee (9):
  mach-axxia: Make AXXIA_NCR_RESET_CHECK a Kconfig Option
  power: reset: preliminary support for Axxia DDR Retention reset
  arch/arm/mach-axxia: Flush TLB
  axxia-reset.c: Use syscon address from device tree
  axxia: enable trng for axc6732-waco and axm5616-victoria
  axxia: generalize driver support for multi-controller PCI/SRIO/SATA
  axxia: enable PCI1/PCI2 controllers in device tree
  drivers/misc/axxia-pei.c: Update PEI Configuration
  drivers/misc/axxia-pei: Update PCIe/sRIO Lane Configuration

Geoff Levand (1):
  arm64: Enable the identity mapping to allow the MMU