Re: [OpenWrt-Devel] WarpComm TK71 Port
On 9 December 2010 01:12, green openwrt@gadgetweb.de wrote: Hi, KanjiMonster asked me as a response to my threat on the OpenWRT forum (https://forum.openwrt.org/viewtopic.php?pid=122891) to send my patch as a mail attachment to the dev-list. Good to see it here. I probably should have linked you to https://dev.openwrt.org/wiki/SubmittingPatches, as I have some style nitpicks ;-). As I am currently working with the WarpComm TK71 Qseven module based on the Marvell Kirkwood CPU and I liked to use OpenWRT as a basic environment I decided to port it based on the linux kernel patch provided by the board manufacturer ( http://www.warpcomm.org/downloads/tk71/20100805/linux-2.6.34- tk71.diff ). Nice hardware. And it looks like they are actively supporting it by providing updated patches. The kernel is based on the 2.6.34 kernel but works great for the 2.6.35 version as well. Good to know. Now on to my nitpicks: First some meta stuff: Try to send inline, that makes it easier to comment on patches. But if your email client automatically wraps too long lines or replaces tabs with spaces, then it might be better to send inline. See the page linked above for further info. About the patch itself: (...) ++.gpio_card_detect = 29, ++}; ++ ++static unsigned int tk71_mpp_config[] __initdata = { ++#if 0 ++MPP0_SPI_SCn, /* SPI - currently unused */ ++MPP1_SPI_MOSI, ++MPP2_SPI_SCK, ++MPP3_SPI_MISO, ++#endif ++MPP7_PEX_RST_OUTn, /* PCIe #reset */ ++MPP8_TW_SDA,/* I2C */ ++MPP9_TW_SCK,/* I2C */ (...) ++kirkwood_nand_init(ARRAY_AND_SIZE(tk71_nand_parts), 25); ++ ++/* kirkwood_spi_init(); */ /* if you want to use SPI, uncomment this and MPP setup above*/ ++ ++kirkwood_i2c_init(); perhaps this should be exposed by a Kconfig option instead of requiring to edit the sources? +diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig +index 346ae14..e150045 100644 +--- a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig +@@ -382,6 +382,17 @@ config CPU_FEROCEON_OLD_ID + for which the CPU ID is equal to the ARM926 ID. + Relevant for Feroceon-1850 and early Feroceon-2850. + ++config CPU_FEROCEON_DISABLE_WAITFORIRQ ++bool Disable wait_for_irq (for JTAG debugging, see help) ++depends on CPU_FEROCEON ++default n ++help ++ On some Feroceon implementations it is necessary to disable ++ the wait_for_interrupt in cpu_feroceon_do_idle in order to ++ enable proper JTAG debugging (random kernel panics can happen ++ otherwise). ++ For production this can safely be left enabled. ++ + # ARMv6 + config CPU_V6 + bool Support ARM V6 processor if ARCH_INTEGRATOR || MACH_REALVIEW_EB || MACH_REALVIEW_PBX || ARCH_DOVE +diff --git a/arch/arm/mm/proc-feroceon.S b/arch/arm/mm/proc-feroceon.S +index 53e6323..9a99066 100644 +--- a/arch/arm/mm/proc-feroceon.S b/arch/arm/mm/proc-feroceon.S +@@ -123,9 +123,11 @@ ENTRY(cpu_feroceon_reset) + */ + .align 5 + ENTRY(cpu_feroceon_do_idle) ++#ifndef CONFIG_CPU_FEROCEON_DISABLE_WAITFORIRQ + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 @ Drain write buffer + mcr p15, 0, r0, c7, c0, 4 @ Wait for interrupt ++#endif + mov pc, lr + + /* This should be in its own kernel patch as this isn't TK71 specific (I assume). +diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c +index e345ec8..ab16557 100644 +--- a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c +@@ -2781,11 +2781,13 @@ static struct phy_device *phy_scan(struct mv643xx_eth_private *mp, + + if (phydev == NULL) { + phydev = bus-phy_map[addr]; +-if (phydev != NULL) ++if (phydev != NULL) { + phy_addr_set(mp, addr); ++printk(KERN_INFO mv643xx_eth: found PHY @ %d ID %08x\n, phydev-addr, phydev-phy_id); ++} else ++printk(KERN_ERR mv643xx_eth: PHY @ %d not found!\n, addr); + } + } +- Unnecessary white space change. + return phydev; + } + This should also be a separate kernel patch if not dropped since it might produce quite a bit of output when scanning the whole address range. I can't comment the kernel config changes, since I don't know enough about them to recognize which are required, and which aren't (e.g. is the CONFIG_EXT4_FS_XATTR really needed?). You should split this into three patches, one for the board support and one for each of the kernel changes. Also I saw there is an updated version of the patch available on their site, which claims to fix some sata problems, perhaps you could recreate the patch based on this version, assuming it has additional changes? Regards, Jonas ___ openwrt-devel mailing list
[OpenWrt-Devel] WarpComm TK71 Port
Hi, KanjiMonster asked me as a response to my threat on the OpenWRT forum (https://forum.openwrt.org/viewtopic.php?pid=122891) to send my patch as a mail attachment to the dev-list. As I am currently working with the WarpComm TK71 Qseven module based on the Marvell Kirkwood CPU and I liked to use OpenWRT as a basic environment I decided to port it based on the linux kernel patch provided by the board manufacturer ( http://www.warpcomm.org/downloads/tk71/20100805/linux-2.6.34- tk71.diff ). The kernel is based on the 2.6.34 kernel but works great for the 2.6.35 version as well. Regards, green Index: target/linux/kirkwood/profiles/400-WarpCommTK71.mk === --- target/linux/kirkwood/profiles/400-WarpCommTK71.mk (revision 0) +++ target/linux/kirkwood/profiles/400-WarpCommTK71.mk (revision 0) @@ -0,0 +1,17 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/TK71 + NAME:=WarpComm TK71 + PACKAGES:= +endef + +define Profile/TK71/Description +WarpComm TK71 Profile +endef + +$(eval $(call Profile,TK71)) Index: target/linux/kirkwood/patches/400-tk71.patch === --- target/linux/kirkwood/patches/400-tk71.patch (revision 0) +++ target/linux/kirkwood/patches/400-tk71.patch (revision 0) @@ -0,0 +1,1909 @@ +diff --git a/arch/arm/configs/tk71_defconfig b/arch/arm/configs/tk71_defconfig +new file mode 100644 +index 000..b90ac38 +--- /dev/null b/arch/arm/configs/tk71_defconfig +@@ -0,0 +1,1657 @@ ++# ++# Automatically generated make config: don't edit ++# Linux kernel version: 2.6.34 ++# Sat May 22 21:33:15 2010 ++# ++CONFIG_ARM=y ++CONFIG_SYS_SUPPORTS_APM_EMULATION=y ++CONFIG_GENERIC_GPIO=y ++CONFIG_GENERIC_TIME=y ++# CONFIG_ARCH_USES_GETTIMEOFFSET is not set ++CONFIG_GENERIC_CLOCKEVENTS=y ++CONFIG_HAVE_PROC_CPU=y ++CONFIG_GENERIC_HARDIRQS=y ++CONFIG_STACKTRACE_SUPPORT=y ++CONFIG_HAVE_LATENCYTOP_SUPPORT=y ++CONFIG_LOCKDEP_SUPPORT=y ++CONFIG_TRACE_IRQFLAGS_SUPPORT=y ++CONFIG_HARDIRQS_SW_RESEND=y ++CONFIG_GENERIC_IRQ_PROBE=y ++CONFIG_RWSEM_GENERIC_SPINLOCK=y ++CONFIG_GENERIC_HWEIGHT=y ++CONFIG_GENERIC_CALIBRATE_DELAY=y ++CONFIG_NEED_DMA_MAP_STATE=y ++CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y ++CONFIG_VECTORS_BASE=0x ++CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config ++CONFIG_CONSTRUCTORS=y ++ ++# ++# General setup ++# ++CONFIG_EXPERIMENTAL=y ++CONFIG_BROKEN_ON_SMP=y ++CONFIG_INIT_ENV_ARG_LIMIT=32 ++CONFIG_LOCALVERSION= ++CONFIG_LOCALVERSION_AUTO=y ++CONFIG_HAVE_KERNEL_GZIP=y ++CONFIG_HAVE_KERNEL_LZMA=y ++CONFIG_HAVE_KERNEL_LZO=y ++CONFIG_KERNEL_GZIP=y ++# CONFIG_KERNEL_BZIP2 is not set ++# CONFIG_KERNEL_LZMA is not set ++# CONFIG_KERNEL_LZO is not set ++CONFIG_SWAP=y ++CONFIG_SYSVIPC=y ++CONFIG_SYSVIPC_SYSCTL=y ++# CONFIG_POSIX_MQUEUE is not set ++# CONFIG_BSD_PROCESS_ACCT is not set ++# CONFIG_TASKSTATS is not set ++# CONFIG_AUDIT is not set ++ ++# ++# RCU Subsystem ++# ++CONFIG_TREE_RCU=y ++# CONFIG_TREE_PREEMPT_RCU is not set ++# CONFIG_TINY_RCU is not set ++# CONFIG_RCU_TRACE is not set ++CONFIG_RCU_FANOUT=32 ++# CONFIG_RCU_FANOUT_EXACT is not set ++# CONFIG_TREE_RCU_TRACE is not set ++CONFIG_IKCONFIG=y ++CONFIG_IKCONFIG_PROC=y ++CONFIG_LOG_BUF_SHIFT=15 ++# CONFIG_CGROUPS is not set ++# CONFIG_SYSFS_DEPRECATED_V2 is not set ++# CONFIG_RELAY is not set ++CONFIG_NAMESPACES=y ++# CONFIG_UTS_NS is not set ++# 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_BLK_DEV_INITRD is not set ++# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set ++CONFIG_SYSCTL=y ++CONFIG_ANON_INODES=y ++# CONFIG_EMBEDDED is not set ++CONFIG_UID16=y ++CONFIG_SYSCTL_SYSCALL=y ++CONFIG_KALLSYMS=y ++# CONFIG_KALLSYMS_EXTRA_PASS is not set ++CONFIG_HOTPLUG=y ++CONFIG_PRINTK=y ++CONFIG_BUG=y ++CONFIG_ELF_CORE=y ++CONFIG_BASE_FULL=y ++CONFIG_FUTEX=y ++CONFIG_EPOLL=y ++CONFIG_SIGNALFD=y ++CONFIG_TIMERFD=y ++CONFIG_EVENTFD=y ++CONFIG_SHMEM=y ++CONFIG_AIO=y ++CONFIG_HAVE_PERF_EVENTS=y ++CONFIG_PERF_USE_VMALLOC=y ++ ++# ++# Kernel Performance Events And Counters ++# ++# CONFIG_PERF_EVENTS is not set ++# CONFIG_PERF_COUNTERS is not set ++CONFIG_VM_EVENT_COUNTERS=y ++CONFIG_PCI_QUIRKS=y ++CONFIG_SLUB_DEBUG=y ++CONFIG_COMPAT_BRK=y ++# CONFIG_SLAB is not set ++CONFIG_SLUB=y ++# CONFIG_SLOB is not set ++# CONFIG_PROFILING is not set ++CONFIG_HAVE_OPROFILE=y ++# CONFIG_KPROBES is not set ++CONFIG_HAVE_KPROBES=y ++CONFIG_HAVE_KRETPROBES=y ++ ++# ++# GCOV-based kernel profiling ++# ++CONFIG_SLOW_WORK=y ++CONFIG_HAVE_GENERIC_DMA_COHERENT=y ++CONFIG_SLABINFO=y ++CONFIG_RT_MUTEXES=y ++CONFIG_BASE_SMALL=0 ++CONFIG_MODULES=y ++# CONFIG_MODULE_FORCE_LOAD is not set ++CONFIG_MODULE_UNLOAD=y ++# CONFIG_MODULE_FORCE_UNLOAD is not set ++# CONFIG_MODVERSIONS is not set ++# CONFIG_MODULE_SRCVERSION_ALL is not set ++CONFIG_BLOCK=y