cns3xxx: update to linux 3.14

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43397
This commit is contained in:
Felix Fietkau 2014-11-26 18:01:29 +00:00
parent 0525ffa4c5
commit 211669da3b
26 changed files with 89 additions and 66 deletions

View file

@ -14,7 +14,7 @@ CPU_TYPE:=mpcore
CPU_SUBTYPE:=vfp
MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
KERNEL_PATCHVER:=3.10
KERNEL_PATCHVER:=3.14
include $(INCLUDE_DIR)/target.mk

View file

@ -4,21 +4,25 @@ CONFIG_ARCH_CNS3XXX=y
CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
CONFIG_ARCH_HAS_TICK_BROADCAST=y
CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
CONFIG_ARCH_MULTIPLATFORM=y
# CONFIG_ARCH_MULTI_CPU_AUTO is not set
CONFIG_ARCH_MULTI_V6=y
CONFIG_ARCH_MULTI_V6_V7=y
# CONFIG_ARCH_MULTI_V7 is not set
# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set
CONFIG_ARCH_NR_GPIO=0
# CONFIG_ARCH_OMAP2 is not set
CONFIG_ARCH_REQUIRE_GPIOLIB=y
# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ARCH_USE_BUILTIN_BSWAP=y
CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
# CONFIG_ARCH_WM8750 is not set
CONFIG_ARM=y
# CONFIG_ARM_APPENDED_DTB is not set
# CONFIG_ARM_CPU_SUSPEND is not set
CONFIG_ARM_GIC=y
CONFIG_ARM_L1_CACHE_SHIFT=5
@ -31,9 +35,9 @@ CONFIG_ATAGS=y
CONFIG_ATA_VERBOSE_ERROR=y
CONFIG_AUTO_ZRELADDR=y
CONFIG_BLK_DEV_SD=y
CONFIG_BROADCOM_PHY=y
CONFIG_CACHE_L2X0=y
CONFIG_CLKDEV_LOOKUP=y
CONFIG_CLKSRC_OF=y
CONFIG_CLONE_BACKWARDS=y
CONFIG_CNS3XXX_ETH=y
CONFIG_COMMON_CLK=y
@ -55,10 +59,9 @@ CONFIG_CPU_V6=y
CONFIG_CPU_V6K=y
CONFIG_DCACHE_WORD_ACCESS=y
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_CNS3XXX=y
CONFIG_DEBUG_LL=y
CONFIG_DEBUG_LL_INCLUDE="debug/cns3xxx.S"
CONFIG_DEBUG_UNCOMPRESS=y
CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
# CONFIG_DEBUG_UART_8250 is not set
# CONFIG_DEBUG_UART_PL01X is not set
# CONFIG_DEBUG_USER is not set
CONFIG_DMA_CACHE_FIQ_BROADCAST=y
CONFIG_DTC=y
@ -66,7 +69,6 @@ CONFIG_DTC=y
# CONFIG_DWC_DEVICE_ONLY is not set
# CONFIG_DWC_HOST_ONLY is not set
CONFIG_DWC_OTG_MODE=y
CONFIG_EARLY_PRINTK=y
CONFIG_EEPROM_AT24=y
CONFIG_FIQ=y
CONFIG_FRAME_POINTER=y
@ -79,7 +81,9 @@ CONFIG_GENERIC_IDLE_POLL_SETUP=y
CONFIG_GENERIC_IO=y
CONFIG_GENERIC_IRQ_CHIP=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_GENERIC_NET_UTILS=y
CONFIG_GENERIC_PCI_IOMAP=y
CONFIG_GENERIC_SCHED_CLOCK=y
CONFIG_GENERIC_SMP_IDLE_THREAD=y
CONFIG_GENERIC_STRNCPY_FROM_USER=y
CONFIG_GENERIC_STRNLEN_USER=y
@ -99,9 +103,9 @@ CONFIG_HAVE_ARCH_PFN_VALID=y
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_ARM_SCU=y
CONFIG_HAVE_ARM_TWD=y
# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set
CONFIG_HAVE_BPF_JIT=y
CONFIG_HAVE_CC_STACKPROTECTOR=y
CONFIG_HAVE_CLK=y
CONFIG_HAVE_CLK_PREPARE=y
CONFIG_HAVE_CONTEXT_TRACKING=y
@ -111,14 +115,15 @@ CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_HAVE_DMA_ATTRS=y
CONFIG_HAVE_DMA_CONTIGUOUS=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_HAVE_GENERIC_HARDIRQS=y
CONFIG_HAVE_IDE=y
CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_LZ4=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_HAVE_KERNEL_XZ=y
@ -126,27 +131,31 @@ CONFIG_HAVE_MEMBLOCK=y
CONFIG_HAVE_NET_DSA=y
CONFIG_HAVE_OPROFILE=y
CONFIG_HAVE_PERF_EVENTS=y
CONFIG_HAVE_PERF_REGS=y
CONFIG_HAVE_PERF_USER_STACK_DUMP=y
CONFIG_HAVE_PROC_CPU=y
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
CONFIG_HAVE_SMP=y
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
CONFIG_HAVE_UID16=y
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_HWMON=y
CONFIG_HW_RANDOM=m
CONFIG_HZ_FIXED=0
CONFIG_HZ_PERIODIC=y
CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_CNS3XXX=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_IOMMU_HELPER=y
CONFIG_IRQCHIP=y
CONFIG_IRQ_DOMAIN=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_IRQ_WORK=y
CONFIG_KTIME_SCALAR=y
CONFIG_LEDS_GPIO=y
# CONFIG_LEDS_TRIGGER_NETDEV is not set
CONFIG_LOCAL_TIMERS=y
CONFIG_M25PXX_USE_FAST_READ=y
# CONFIG_MACH_CNS3420VB is not set
CONFIG_MACH_GW2388=y
CONFIG_MDIO_BOARDINFO=y
@ -160,7 +169,6 @@ CONFIG_MMC_SDHCI_CNS3XXX=y
CONFIG_MMC_SDHCI_PLTFM=y
# CONFIG_MMC_TIFM_SD is not set
CONFIG_MODULES_USE_ELF_REL=y
CONFIG_MPCORE_WATCHDOG=y
CONFIG_MTD_M25P80=y
# CONFIG_MTD_OF_PARTS is not set
CONFIG_MTD_PHYSMAP=y
@ -168,17 +176,17 @@ CONFIG_MTD_PHYSMAP=y
CONFIG_MULTI_IRQ_HANDLER=y
CONFIG_MUTEX_SPIN_ON_OWNER=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NET_FLOW_LIMIT=y
CONFIG_NET_VENDOR_CAVIUM=y
CONFIG_NLS=y
CONFIG_NO_BOOTMEM=y
CONFIG_NR_CPUS=2
CONFIG_NTP_PPS=y
CONFIG_OF=y
CONFIG_OF_ADDRESS=y
CONFIG_OF_DEVICE=y
CONFIG_OF_EARLY_FLATTREE=y
CONFIG_OF_FLATTREE=y
CONFIG_OF_GPIO=y
CONFIG_OF_I2C=y
CONFIG_OF_IRQ=y
CONFIG_OF_MDIO=y
CONFIG_OF_MTD=y
@ -227,16 +235,14 @@ CONFIG_SPI_CNS3XXX=y
CONFIG_SPI_MASTER=y
# CONFIG_STAGING is not set
CONFIG_STOP_MACHINE=y
CONFIG_SWIOTLB=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
# CONFIG_TEGRA_HOST1X is not set
CONFIG_TICK_CPU_ACCOUNTING=y
CONFIG_TREE_RCU=y
CONFIG_UID16=y
CONFIG_UIDGID_CONVERTED=y
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
CONFIG_USB=y
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
CONFIG_USB_ARCH_HAS_XHCI=y
CONFIG_USB_CNS3XXX_EHCI=y
CONFIG_USB_CNS3XXX_OHCI=y
CONFIG_USB_COMMON=y
@ -246,13 +252,10 @@ CONFIG_USB_EHCI_HCD_PLATFORM=y
CONFIG_USB_EHCI_PCI=y
# CONFIG_USB_ETH is not set
CONFIG_USB_GADGET=y
# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_HCD_PLATFORM=y
CONFIG_USB_SUPPORT=y
# CONFIG_USB_UHCI_HCD is not set
CONFIG_USE_GENERIC_SMP_HELPERS=y
CONFIG_USE_OF=y
CONFIG_VECTORS_BASE=0xffff0000
CONFIG_VFP=y

View file

@ -31,8 +31,8 @@
#include <linux/mtd/partitions.h>
#include <linux/leds.h>
#include <linux/i2c.h>
#include <linux/i2c/at24.h>
#include <linux/i2c/pca953x.h>
#include <linux/platform_data/at24.h>
#include <linux/platform_data/pca953x.h>
#include <linux/spi/spi.h>
#include <linux/spi/flash.h>
#include <linux/if_ether.h>

View file

@ -1,6 +1,6 @@
--- a/arch/arm/include/asm/glue-cache.h
+++ b/arch/arm/include/asm/glue-cache.h
@@ -129,11 +129,19 @@
@@ -156,11 +156,19 @@ extern inline void nop_dma_unmap_area(co
#define __cpuc_flush_user_range __glue(_CACHE,_flush_user_cache_range)
#define __cpuc_coherent_kern_range __glue(_CACHE,_coherent_kern_range)
#define __cpuc_coherent_user_range __glue(_CACHE,_coherent_user_range)
@ -22,7 +22,7 @@
#endif
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -823,6 +823,17 @@ config DMA_CACHE_RWFO
@@ -843,6 +843,17 @@ config DMA_CACHE_RWFO
in hardware, other workarounds are needed (e.g. cache
maintenance broadcasting in software via FIQ).
@ -42,15 +42,23 @@
--- a/arch/arm/mm/flush.c
+++ b/arch/arm/mm/flush.c
@@ -286,7 +286,10 @@ void flush_dcache_page(struct page *page
@@ -281,6 +281,7 @@ void __sync_icache_dcache(pte_t pteval)
void flush_dcache_page(struct page *page)
{
struct address_space *mapping;
+ bool skip_broadcast = true;
/*
* The zero page is never written to, so never has any dirty
@@ -291,7 +292,10 @@ void flush_dcache_page(struct page *page
mapping = page_mapping(page);
- if (!cache_ops_need_broadcast() &&
+ if (
+#ifndef CONFIG_DMA_CACHE_FIQ_BROADCAST
+ !cache_ops_need_broadcast() &&
+ skip_broadcast = !cache_ops_need_broadcast();
+#endif
mapping && !mapping_mapped(mapping))
+ if (skip_broadcast &&
mapping && !page_mapped(page))
clear_bit(PG_dcache_clean, &page->flags);
else {

View file

@ -20,9 +20,9 @@
--- a/arch/arm/mach-cns3xxx/core.h
+++ b/arch/arm/mach-cns3xxx/core.h
@@ -11,6 +11,7 @@
#ifndef __CNS3XXX_CORE_H
#define __CNS3XXX_CORE_H
@@ -13,6 +13,7 @@
#include <linux/reboot.h>
+extern struct smp_operations cns3xxx_smp_ops;
extern void cns3xxx_timer_init(void);

View file

@ -29,7 +29,7 @@
*/
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -806,7 +806,7 @@ config KUSER_HELPERS
@@ -826,7 +826,7 @@ config KUSER_HELPERS
config DMA_CACHE_RWFO
bool "Enable read/write for ownership DMA cache maintenance"

View file

@ -24,7 +24,7 @@
.nr_irqs = NR_IRQS_CNS3XXX,
--- a/arch/arm/mach-cns3xxx/core.h
+++ b/arch/arm/mach-cns3xxx/core.h
@@ -13,6 +13,7 @@
@@ -15,6 +15,7 @@
extern struct smp_operations cns3xxx_smp_ops;
extern void cns3xxx_timer_init(void);
@ -32,13 +32,13 @@
#ifdef CONFIG_CACHE_L2X0
void __init cns3xxx_l2x0_init(void);
@@ -22,6 +23,7 @@ static inline void cns3xxx_l2x0_init(voi
@@ -24,6 +25,7 @@ static inline void cns3xxx_l2x0_init(voi
void __init cns3xxx_map_io(void);
void __init cns3xxx_init_irq(void);
+int __init cns3xxx_pcie_init(void);
void cns3xxx_power_off(void);
void cns3xxx_restart(char, const char *);
void cns3xxx_restart(enum reboot_mode, const char *);
--- a/arch/arm/mach-cns3xxx/pcie.c
+++ b/arch/arm/mach-cns3xxx/pcie.c

View file

@ -1,6 +1,6 @@
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -375,6 +375,18 @@ config I2C_CBUS_GPIO
@@ -386,6 +386,18 @@ config I2C_CBUS_GPIO
This driver can also be built as a module. If so, the module
will be called i2c-cbus-gpio.
@ -18,10 +18,10 @@
+
config I2C_CPM
tristate "Freescale CPM1 or CPM2 (MPC8xx/826x)"
depends on (CPM1 || CPM2) && OF_I2C
depends on CPM1 || CPM2
--- a/drivers/i2c/busses/Makefile
+++ b/drivers/i2c/busses/Makefile
@@ -89,6 +89,7 @@ obj-$(CONFIG_I2C_ACORN) += i2c-acorn.o
@@ -95,6 +95,7 @@ obj-$(CONFIG_I2C_BCM_KONA) += i2c-bcm-ko
obj-$(CONFIG_I2C_ELEKTOR) += i2c-elektor.o
obj-$(CONFIG_I2C_PCA_ISA) += i2c-pca-isa.o
obj-$(CONFIG_I2C_SIBYTE) += i2c-sibyte.o

View file

@ -1,6 +1,6 @@
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -142,6 +142,13 @@ config SPI_CLPS711X
@@ -155,6 +155,13 @@ config SPI_CLPS711X
This enables dedicated general purpose SPI/Microwire1-compatible
master mode interface (SSI1) for CLPS711X-based CPUs.
@ -16,7 +16,7 @@
depends on (M520x || M523x || M5249 || M525x || M527x || M528x || M532x)
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -20,6 +20,7 @@ obj-$(CONFIG_SPI_BFIN5XX) += spi-bfin5x
@@ -22,6 +22,7 @@ obj-$(CONFIG_SPI_BFIN_V3)
obj-$(CONFIG_SPI_BFIN_SPORT) += spi-bfin-sport.o
obj-$(CONFIG_SPI_BITBANG) += spi-bitbang.o
obj-$(CONFIG_SPI_BUTTERFLY) += spi-butterfly.o
@ -26,22 +26,20 @@
obj-$(CONFIG_SPI_DAVINCI) += spi-davinci.o
--- a/drivers/spi/spi-bitbang.c
+++ b/drivers/spi/spi-bitbang.c
@@ -328,6 +328,12 @@ static void bitbang_work(struct work_str
*/
if (!m->is_dma_mapped)
t->rx_dma = t->tx_dma = 0;
@@ -333,6 +333,10 @@ static int spi_bitbang_transfer_one(stru
*/
if (!m->is_dma_mapped)
t->rx_dma = t->tx_dma = 0;
+
+ if (t->transfer_list.next == &m->transfers)
+ t->last_in_message_list = 1;
+ else
+ t->last_in_message_list = 0;
+ t->last_in_message_list =
+ list_is_last(&t->transfer_list, &m->transfers);
+
status = bitbang->txrx_bufs(spi, t);
}
if (status > 0)
status = bitbang->txrx_bufs(spi, t);
}
if (status > 0)
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -524,6 +524,13 @@ struct spi_transfer {
@@ -591,6 +591,13 @@ struct spi_transfer {
u32 speed_hz;
struct list_head transfer_list;

View file

@ -29,7 +29,7 @@
/* sentinel */
}
};
@@ -80,6 +84,12 @@ static const struct ata_port_info ahci_p
@@ -81,6 +85,12 @@ static const struct ata_port_info ahci_p
.udma_mask = ATA_UDMA6,
.port_ops = &ahci_platform_ops,
},

View file

@ -1,6 +1,6 @@
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
@@ -32,6 +32,7 @@ source "drivers/net/ethernet/calxeda/Kco
@@ -34,6 +34,7 @@ source "drivers/net/ethernet/calxeda/Kco
source "drivers/net/ethernet/chelsio/Kconfig"
source "drivers/net/ethernet/cirrus/Kconfig"
source "drivers/net/ethernet/cisco/Kconfig"
@ -10,7 +10,7 @@
config DNET
--- a/drivers/net/ethernet/Makefile
+++ b/drivers/net/ethernet/Makefile
@@ -15,6 +15,7 @@ obj-$(CONFIG_NET_BFIN) += adi/
@@ -17,6 +17,7 @@ obj-$(CONFIG_NET_BFIN) += adi/
obj-$(CONFIG_NET_VENDOR_BROADCOM) += broadcom/
obj-$(CONFIG_NET_VENDOR_BROCADE) += brocade/
obj-$(CONFIG_NET_CALXEDA_XGMAC) += calxeda/

View file

@ -13,7 +13,7 @@
}
--- a/arch/arm/mach-cns3xxx/core.h
+++ b/arch/arm/mach-cns3xxx/core.h
@@ -15,12 +15,6 @@ extern struct smp_operations cns3xxx_smp
@@ -17,12 +17,6 @@ extern struct smp_operations cns3xxx_smp
extern void cns3xxx_timer_init(void);
extern void cns3xxx_pcie_iotable_init(void);

View file

@ -1,6 +1,6 @@
--- a/drivers/usb/Kconfig
+++ b/drivers/usb/Kconfig
@@ -136,6 +136,8 @@ source "drivers/usb/musb/Kconfig"
@@ -96,6 +96,8 @@ source "drivers/usb/host/Kconfig"
source "drivers/usb/renesas_usbhs/Kconfig"
@ -26,7 +26,7 @@
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -1404,6 +1404,9 @@ struct urb {
@@ -1431,6 +1431,9 @@ struct urb {
unsigned int transfer_flags; /* (in) URB_SHORT_NOT_OK | ...*/
void *transfer_buffer; /* (in) associated data buffer */
dma_addr_t transfer_dma; /* (in) dma addr for transfer_buffer */
@ -38,10 +38,10 @@
int num_sgs; /* (in) number of entries in the sg list */
--- a/drivers/usb/Makefile
+++ b/drivers/usb/Makefile
@@ -7,6 +7,7 @@
obj-$(CONFIG_USB) += core/
@@ -8,6 +8,7 @@ obj-$(CONFIG_USB) += core/
obj-$(CONFIG_USB_DWC3) += dwc3/
obj-$(CONFIG_USB_DWC2) += dwc2/
+obj-$(CONFIG_USB_DWC_OTG) += dwc/
obj-$(CONFIG_USB_MON) += mon/

View file

@ -11,14 +11,14 @@
--- a/arch/arm/mach-cns3xxx/core.h
+++ b/arch/arm/mach-cns3xxx/core.h
@@ -17,7 +17,7 @@ extern void cns3xxx_pcie_iotable_init(vo
@@ -19,7 +19,7 @@ extern void cns3xxx_pcie_iotable_init(vo
void __init cns3xxx_map_io(void);
void __init cns3xxx_init_irq(void);
-int __init cns3xxx_pcie_init(void);
+int __init cns3xxx_pcie_init(int *pcie0_irqs, int *pcie1_irqs);
void cns3xxx_power_off(void);
void cns3xxx_restart(char, const char *);
void cns3xxx_restart(enum reboot_mode, const char *);
--- a/arch/arm/mach-cns3xxx/laguna.c
+++ b/arch/arm/mach-cns3xxx/laguna.c
@ -30,7 +30,7 @@
#include <linux/gpio.h>
#include <linux/dma-mapping.h>
#include <linux/serial_core.h>
@@ -869,12 +870,42 @@ static int laguna_register_gpio(struct g
@@ -868,12 +869,42 @@ static int laguna_register_gpio(struct g
return ret;
}
@ -74,7 +74,7 @@
}
subsys_initcall(laguna_pcie_init);
@@ -889,8 +923,33 @@ static int __init laguna_model_setup(voi
@@ -888,8 +919,33 @@ static int __init laguna_model_setup(voi
printk("Running on Gateworks Laguna %s\n", laguna_info.model);
cns3xxx_gpio_init( 0, 32, CNS3XXX_GPIOA_BASE_VIRT, IRQ_CNS3XXX_GPIOA,
NR_IRQS_CNS3XXX);

View file

@ -0,0 +1,14 @@
--- a/drivers/net/phy/broadcom.c
+++ b/drivers/net/phy/broadcom.c
@@ -567,6 +567,11 @@ static int bcm5481_config_aneg(struct ph
/* Write bits 14:0. */
reg |= (1 << 15);
phy_write(phydev, 0x18, reg);
+ } else {
+ phy_write(phydev, 0x18, 0xf1e7);
+ phy_write(phydev, 0x1c, 0x8e00);
+
+ phy_write(phydev, 0x1c, 0xa41f);
}
return ret;