This patch is intended for the fc17 3.3 kernel branch. Most of the patches are in the process of being upstreamed. I'm preparing a separate patch for the fc18 3.4 kernel branch. --Mark Langsdorf Calxeda, Inc. On 06/01/2012 08:21 AM, Mark Langsdorf wrote: > Calxeda's ECX-1000 chips are available. Various bugs and issues have been > discovered in lab tests. This patch fixes most of the known issues and > creates a highbank kernel that boots on the ECX-1000 chip. > > Signed-off-by: Mark Langsdorf <mark.langsdorf@xxxxxxxxxxx> > --- > config-arm-highbank | 19 +++++- > highbank-various.patch | 168 ++++++++++++++++++++++++++++++++++++++++++++++++ > kernel.spec | 2 + > 3 files changed, 188 insertions(+), 1 deletion(-) > create mode 100644 highbank-various.patch > > diff --git a/config-arm-highbank b/config-arm-highbank > index 60178dd..d86f89e 100644 > --- a/config-arm-highbank > +++ b/config-arm-highbank > @@ -1,16 +1,25 @@ > CONFIG_ARCH_HIGHBANK=y > # CONFIG_ARM_LPAE is not set > +CONFIG_USE_GENERIC_SMP_HELPERS=y > +CONFIG_HAVE_SMP=y > +CONFIG_SMP=y > +CONFIG_SMP_ON_UP=y > # CONFIG_ARM_THUMBEE is not set > CONFIG_SWP_EMULATE=y > -# CONFIG_CPU_BPREDICT_DISABLE is not set > # CONFIG_ARM_ERRATA_430973 is not set > # CONFIG_ARM_ERRATA_458693 is not set > # CONFIG_ARM_ERRATA_460075 is not set > +# CONFIG_ARM_ERRATA_742230 is not set > +# CONFIG_ARM_ERRATA_742231 is not set > # CONFIG_PL310_ERRATA_588369 is not set > +CONFIG_ARM_ERRATA_720789=y > # CONFIG_PL310_ERRATA_727915 is not set > # CONFIG_ARM_ERRATA_743622 is not set > +CONFIG_ARM_ERRATA_751472=y > # CONFIG_PL310_ERRATA_753970 is not set > # CONFIG_ARM_ERRATA_754322 is not set > +# CONFIG_ARM_ERRATA_754327 is not set > +# CONFIG_ARM_ERRATA_764369 is not set > # CONFIG_PL310_ERRATA_769419 is not set > > # CONFIG_THUMB2_KERNEL is not set > @@ -29,3 +38,11 @@ CONFIG_GPIO_PL061=y > CONFIG_SERIAL_AMBA_PL010=y > CONFIG_SERIAL_AMBA_PL010_CONSOLE=y > > +# CONFIG_CPU_BPREDICT_DISABLE is not set > +CONFIG_ARM_CPU_TOPOLOGY=y > +# CONFIG_SCHED_SMT is not set > +# CONFIG_NET_SCHED is not set > +CONFIG_SCHED_MC=y > +CONFIG_NR_CPUS=4 > +CONFIG_LOCAL_TIMERS=y > +CONFIG_MPCORE_WATCHDOG=y > diff --git a/highbank-various.patch b/highbank-various.patch > new file mode 100644 > index 0000000..0b2f93c > --- /dev/null > +++ b/highbank-various.patch > @@ -0,0 +1,168 @@ > +diff --git a/arch/arm/mach-highbank/Makefile b/arch/arm/mach-highbank/Makefile > +index bfff00d..a6fb6f9 100644 > +--- a/arch/arm/mach-highbank/Makefile > ++++ b/arch/arm/mach-highbank/Makefile > +@@ -1,4 +1,8 @@ > +-obj-y := clock.o highbank.o system.o > ++obj-y := clock.o highbank.o system.o smc.o > ++ > ++plus_sec := $(call as-instr,.arch_extension sec,+sec) > ++AFLAGS_smc.o :=-Wa,-march=armv7-a$(plus_sec) > ++ > + obj-$(CONFIG_DEBUG_HIGHBANK_UART) += lluart.o > + obj-$(CONFIG_SMP) += platsmp.o > + obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o > +diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h > +index 7e33fc9..bc7e77e 100644 > +--- a/arch/arm/mach-highbank/core.h > ++++ b/arch/arm/mach-highbank/core.h > +@@ -7,3 +7,4 @@ extern void highbank_lluart_map_io(void); > + static inline void highbank_lluart_map_io(void) {} > + #endif > + > ++extern void highbank_smc1(int fn, int arg); > +diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c > +index 612e866..6be0b2f 100644 > +--- a/arch/arm/mach-highbank/highbank.c > ++++ b/arch/arm/mach-highbank/highbank.c > +@@ -87,10 +87,25 @@ const static struct of_device_id irq_match[] = { > + {} > + }; > + > ++#ifdef CONFIG_CACHE_L2X0 > ++static void highbank_l2x0_disable(void) > ++{ > ++ /* Disable PL310 L2 Cache controller */ > ++ highbank_smc1(0x102, 0x0); > ++} > ++#endif > ++ > ++ > + static void __init highbank_init_irq(void) > + { > + of_irq_init(irq_match); > ++ > ++#ifdef CONFIG_CACHE_L2X0 > ++ /* Enable PL310 L2 Cache controller */ > ++ highbank_smc1(0x102, 0x1); > + l2x0_of_init(0, ~0UL); > ++ outer_cache.disable = highbank_l2x0_disable; > ++#endif > + } > + > + static struct clk_lookup lookups[] = { > +diff --git a/arch/arm/mach-highbank/smc.S b/arch/arm/mach-highbank/smc.S > +new file mode 100644 > +index 0000000..8b11632 > +--- /dev/null > ++++ b/arch/arm/mach-highbank/smc.S > +@@ -0,0 +1,31 @@ > ++/* > ++ * Copied from omap44xx-smc.S > ++ * Copyright (C) 2010 Texas Instruments, Inc. > ++ * Written by Santosh Shilimkar <santosh.shilimkar@xxxxxx> > ++ * > ++ * > ++ * 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 > ++ * published by the Free Software Foundation. > ++ */ > ++ > ++#include <linux/linkage.h> > ++ > ++/* > ++ * This is common routine to manage secure monitor API > ++ * used to modify the PL310 secure registers. > ++ * 'r0' contains the value to be modified and 'r12' contains > ++ * the monitor API number. It uses few CPU registers > ++ * internally and hence they need be backed up including > ++ * link register "lr". > ++ * Function signature : void omap_smc1(u32 fn, u32 arg) > ++ */ > ++ > ++ENTRY(highbank_smc1) > ++ stmfd sp!, {r2-r12, lr} > ++ mov r12, r0 > ++ mov r0, r1 > ++ dsb > ++ smc #0 > ++ ldmfd sp!, {r2-r12, pc} > ++ENDPROC(highbank_smc1) > +diff --git a/drivers/net/ethernet/calxeda/xgmac.c b/drivers/net/ethernet/calxeda/xgmac.c > +index a733094..616d38b 100644 > +--- a/drivers/net/ethernet/calxeda/xgmac.c > ++++ b/drivers/net/ethernet/calxeda/xgmac.c > +@@ -210,7 +210,7 @@ > + #define DMA_INTR_ENA_TIE 0x00000001 /* Transmit Interrupt */ > + > + #define DMA_INTR_NORMAL (DMA_INTR_ENA_NIE | DMA_INTR_ENA_RIE | \ > +- DMA_INTR_ENA_TUE) > ++ DMA_INTR_ENA_TUE | DMA_INTR_ENA_TIE) > + > + #define DMA_INTR_ABNORMAL (DMA_INTR_ENA_AIE | DMA_INTR_ENA_FBE | \ > + DMA_INTR_ENA_RWE | DMA_INTR_ENA_RSE | \ > +@@ -926,6 +926,7 @@ static void xgmac_tx_err(struct xgmac_priv *priv) > + desc_init_tx_desc(priv->dma_tx, DMA_TX_RING_SZ); > + priv->tx_tail = 0; > + priv->tx_head = 0; > ++ writel(priv->dma_tx_phy, priv->base + XGMAC_DMA_TX_BASE_ADDR); > + writel(reg | DMA_CONTROL_ST, priv->base + XGMAC_DMA_CONTROL); > + > + writel(DMA_STATUS_TU | DMA_STATUS_TPS | DMA_STATUS_NIS | DMA_STATUS_AIS, > +@@ -965,7 +966,7 @@ static int xgmac_hw_init(struct net_device *dev) > + writel(DMA_INTR_DEFAULT_MASK, ioaddr + XGMAC_DMA_INTR_ENA); > + > + /* XGMAC requires AXI bus init. This is a 'magic number' for now */ > +- writel(0x000100E, ioaddr + XGMAC_DMA_AXI_BUS); > ++ writel(0x0077000E, ioaddr + XGMAC_DMA_AXI_BUS); > + > + ctrl |= XGMAC_CONTROL_DDIC | XGMAC_CONTROL_JE | XGMAC_CONTROL_ACS | > + XGMAC_CONTROL_CAR; > +diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig > +index 67f75a0..aeaf699 100644 > +--- a/arch/arm/mm/Kconfig > ++++ b/arch/arm/mm/Kconfig > +@@ -867,7 +867,7 @@ config ARM_L1_CACHE_SHIFT > + config ARM_DMA_MEM_BUFFERABLE > + bool "Use non-cacheable memory for DMA" if (CPU_V6 || CPU_V6K) && !CPU_V7 > + depends on !(MACH_REALVIEW_PB1176 || REALVIEW_EB_ARM11MP || \ > +- MACH_REALVIEW_PB11MP) > ++ MACH_REALVIEW_PB11MP || ARCH_HIGHBANK) > + default y if CPU_V6 || CPU_V6K || CPU_V7 > + help > + Historically, the kernel has used strongly ordered mappings to > +diff --git a/drivers/net/ethernet/calxeda/xgmac.c b/drivers/net/ethernet/calxeda/xgmac.c > +index 616d38b..02444be 100644 > +--- a/drivers/net/ethernet/calxeda/xgmac.c > ++++ b/drivers/net/ethernet/calxeda/xgmac.c > +@@ -332,7 +332,7 @@ > + #define DESC_BUFFER2_SZ_OFFSET 16 > + > + struct xgmac_dma_desc { > +- __le32 flags; > ++ volatile __le32 flags; > + __le32 buf_size; > + __le32 buf1_addr; /* Buffer 1 Address Pointer */ > + __le32 buf2_addr; /* Buffer 2 Address Pointer */ > +@@ -451,15 +451,20 @@ static inline int desc_get_owner(struct xgmac_dma_desc *p) > + static inline void desc_set_rx_owner(struct xgmac_dma_desc *p) > + { > + /* Clear all fields and set the owner */ > ++ wmb(); > + p->flags = cpu_to_le32(DESC_OWN); > ++ wmb(); > + } > + > + static inline void desc_set_tx_owner(struct xgmac_dma_desc *p, u32 flags) > + { > +- u32 tmpflags = le32_to_cpu(p->flags); > ++ u32 tmpflags; > ++ wmb(); > ++ tmpflags = le32_to_cpu(p->flags); > + tmpflags &= TXDESC_END_RING; > + tmpflags |= flags | DESC_OWN; > + p->flags = cpu_to_le32(tmpflags); > ++ wmb(); > + } > + > + static inline int desc_get_tx_ls(struct xgmac_dma_desc *p) > diff --git a/kernel.spec b/kernel.spec > index aa3a86b..93e9aae 100644 > --- a/kernel.spec > +++ b/kernel.spec > @@ -747,6 +747,7 @@ Patch21006: arm-beagle-usb-init.patch > # ARM highbank patches > # Highbank clock functions need to be EXPORT for module builds > Patch21010: highbank-export-clock-functions.patch > +Patch21012: highbank-various.patch > > Patch21070: ext4-Support-check-none-nocheck-mount-options.patch > > @@ -1541,6 +1542,7 @@ ApplyPatch xen-x86-Implement-x86_apic_ops.patch > > #Highbank clock functions > ApplyPatch highbank-export-clock-functions.patch > +ApplyPatch highbank-various.patch > > #rhbz 807632 > ApplyPatch libata-forbid-port-runtime-pm-by-default.patch _______________________________________________ arm mailing list arm@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/arm