add preliminary support for the successor of the storm port

SVN-Revision: 15772
This commit is contained in:
Imre Kaloz 2009-05-11 18:27:33 +00:00
parent 35d1918758
commit f24a7c7a68
8 changed files with 5653 additions and 0 deletions

View file

@ -0,0 +1,19 @@
#
# Copyright (C) 2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
ARCH:=arm
BOARD:=gemini
BOARDNAME:=Cortina Systems CS351x
FEATURES:=jffs2 broken
CFLAGS:=-Os -pipe -march=armv4 -mtune=arm9tdmi -mno-thumb-interwork -funit-at-a-time
LINUX_VERSION:=2.6.30-rc5
include $(INCLUDE_DIR)/target.mk
$(eval $(call BuildTarget))

View file

@ -0,0 +1,198 @@
CONFIG_DEBUG_LL=y
CONFIG_DEBUG_KERNEL=y
# CONFIG_AEABI is not set
CONFIG_ALIGNMENT_TRAP=y
# CONFIG_ARCH_AAEC2000 is not set
# CONFIG_ARCH_AT91 is not set
# CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_DAVINCI is not set
# CONFIG_ARCH_EBSA110 is not set
# CONFIG_ARCH_EP93XX is not set
CONFIG_ARCH_FLATMEM_HAS_HOLES=y
# CONFIG_ARCH_FOOTBRIDGE is not set
CONFIG_ARCH_GEMINI=y
# CONFIG_ARCH_H720X is not set
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
# CONFIG_ARCH_IMX is not set
# CONFIG_ARCH_INTEGRATOR is not set
# CONFIG_ARCH_IOP13XX is not set
# CONFIG_ARCH_IOP32X is not set
# CONFIG_ARCH_IOP33X is not set
# CONFIG_ARCH_IXP2000 is not set
# CONFIG_ARCH_IXP23XX is not set
# CONFIG_ARCH_IXP4XX is not set
# CONFIG_ARCH_KIRKWOOD is not set
# CONFIG_ARCH_KS8695 is not set
# CONFIG_ARCH_L7200 is not set
# CONFIG_ARCH_LH7A40X is not set
# CONFIG_ARCH_LOKI is not set
# CONFIG_ARCH_MMP is not set
# CONFIG_ARCH_MSM is not set
# CONFIG_ARCH_MV78XX0 is not set
# CONFIG_ARCH_MXC is not set
# CONFIG_ARCH_NETX is not set
# CONFIG_ARCH_NS9XXX is not set
# CONFIG_ARCH_OMAP is not set
# CONFIG_ARCH_ORION5X is not set
# CONFIG_ARCH_PNX4008 is not set
# CONFIG_ARCH_PXA is not set
# CONFIG_ARCH_REALVIEW is not set
CONFIG_ARCH_REQUIRE_GPIOLIB=y
# CONFIG_ARCH_RPC is not set
# CONFIG_ARCH_S3C2410 is not set
# CONFIG_ARCH_S3C64XX is not set
# CONFIG_ARCH_SA1100 is not set
# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
# CONFIG_ARCH_SHARK is not set
# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
# CONFIG_ARCH_SUPPORTS_MSI is not set
CONFIG_ARCH_SUSPEND_POSSIBLE=y
# CONFIG_ARCH_VERSATILE is not set
# CONFIG_ARCH_W90X900 is not set
CONFIG_ARM=y
# CONFIG_ARPD is not set
CONFIG_ATA=m
# CONFIG_ATA_NONSTANDARD is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
CONFIG_BASE_SMALL=0
CONFIG_BITREVERSE=y
# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
# CONFIG_BOOT_PRINTK_DELAY is not set
# CONFIG_BOOT_TRACER is not set
CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,19200 init=/etc/preinit mem=32M"
CONFIG_COMPAT_NET_DEV_OPS=y
# CONFIG_CONFIGFS_FS is not set
CONFIG_CPU_32v4=y
CONFIG_CPU_32=y
CONFIG_CPU_ABRT_EV4=y
# CONFIG_CPU_BPREDICT_DISABLE is not set
CONFIG_CPU_CACHE_FA=y
CONFIG_CPU_CACHE_VIVT=y
CONFIG_CPU_COPY_FA=y
CONFIG_CPU_CP15_MMU=y
CONFIG_CPU_CP15=y
# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
CONFIG_CPU_FA526=y
# CONFIG_CPU_ICACHE_DISABLE is not set
CONFIG_CPU_PABRT_NOIFAR=y
CONFIG_CPU_TLB_FA=y
CONFIG_CRC16=y
CONFIG_CRYPTO_AUTHENC=m
CONFIG_CRYPTO_GF128MUL=m
# CONFIG_DCB is not set
# CONFIG_DEBUG_USER is not set
CONFIG_DEFAULT_TCP_CONG="westwood"
CONFIG_DETECT_SOFTLOCKUP=y
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
CONFIG_DLCI=m
CONFIG_DLCI_MAX=8
# CONFIG_DM9000 is not set
CONFIG_DMADEVICES=y
CONFIG_DNOTIFY=y
# CONFIG_EEPROM_AT24 is not set
# CONFIG_EEPROM_LEGACY is not set
# CONFIG_FAULT_INJECTION is not set
# CONFIG_FPE_FASTFPE is not set
# CONFIG_FPE_NWFPE is not set
CONFIG_FRAME_POINTER=y
# CONFIG_FREEZER is not set
# CONFIG_FUNCTION_TRACER is not set
CONFIG_GEMINI_MEM_SWAP=y
CONFIG_GEMINI_NET_ENGINE_GMAC=y
CONFIG_GEMINI_WATCHDOG=y
# CONFIG_GENERIC_CLOCKEVENTS is not set
CONFIG_GENERIC_FIND_LAST_BIT=y
CONFIG_GENERIC_GPIO=y
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
# CONFIG_GENERIC_TIME is not set
CONFIG_GPIOLIB=y
# CONFIG_HAMRADIO is not set
CONFIG_HARDIRQS_SW_RESEND=y
CONFIG_HAS_DMA=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAVE_AOUT=y
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_HAVE_IDE=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_HAVE_OPROFILE=y
CONFIG_HDLC_CISCO=m
CONFIG_HDLC_FR=m
CONFIG_HDLC=m
CONFIG_HDLC_PPP=m
CONFIG_HDLC_RAW=m
# CONFIG_HTC_EGPIO is not set
# CONFIG_HWMON_DEBUG_CHIP is not set
CONFIG_HWMON=y
CONFIG_HW_RANDOM=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C=y
CONFIG_INITRAMFS_SOURCE=""
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_MROUTE=y
CONFIG_IP_PIMSM_V1=y
CONFIG_IP_PIMSM_V2=y
# CONFIG_KGDB is not set
CONFIG_LEGACY_PTY_COUNT=256
CONFIG_LEGACY_PTYS=y
# CONFIG_LIB80211 is not set
# CONFIG_LOCK_STAT is not set
# CONFIG_MACH_NAS4220B is not set
# CONFIG_MACH_RUT100 is not set
CONFIG_MACH_WBD111=y
# CONFIG_MAC_PARTITION is not set
CONFIG_MDIO_BITBANG=y
CONFIG_MDIO_GPIO=y
CONFIG_MISC_FILESYSTEMS=y
CONFIG_MTD_PHYSMAP=y
CONFIG_MTD_REDBOOT_PARTS=y
CONFIG_MTD=y
# CONFIG_NET_SCH_DRR is not set
# CONFIG_NEW_LEDS is not set
# CONFIG_NF_DEFRAG_IPV4 is not set
# CONFIG_NO_IOPORT is not set
# CONFIG_NVRAM is not set
# CONFIG_OUTER_CACHE is not set
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_PAGE_OFFSET=0xC0000000
# CONFIG_PCI_SYSCALL is not set
# CONFIG_PHYS_ADDR_T_64BIT is not set
# CONFIG_PROVE_LOCKING is not set
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_RTC_CLASS is not set
# CONFIG_RT_MUTEX_TESTER is not set
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_SCHEDSTATS is not set
CONFIG_SCSI=m
# CONFIG_SCSI_MULTI_LUN is not set
CONFIG_SCSI_WAIT_SCAN=m
# CONFIG_SERIAL_8250_EXTENDED is not set
# CONFIG_SHMEM is not set
CONFIG_SPLIT_PTLOCK_CPUS=4096
CONFIG_SSB_POSSIBLE=y
# CONFIG_STACK_TRACER is not set
# CONFIG_SWAP is not set
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_TCP_CONG_VEGAS=m
CONFIG_TCP_CONG_WESTWOOD=y
# CONFIG_TIMER_STATS is not set
# CONFIG_TRACE_BRANCH_PROFILING is not set
CONFIG_UID16=y
# CONFIG_USB_ARCH_HAS_EHCI is not set
# CONFIG_USB_ARCH_HAS_OHCI is not set
CONFIG_USB=m
CONFIG_USB_SUPPORT=y
CONFIG_VECTORS_BASE=0xffff0000
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_WAN=y
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZONE_DMA_FLAG=0

View file

@ -0,0 +1,43 @@
#
# Copyright (C) 2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
define Image/Prepare
# WBD111: mach id 1690 (0x69a)
echo -en "\x06\x1c\xa0\xe3\x9a\x10\x81\xe3" > $(KDIR)/openwrt-$(BOARD)-wbd111-zImage
cat $(LINUX_DIR)/arch/arm/boot/zImage >> $(KDIR)/openwrt-$(BOARD)-wbd111-zImage
endef
define Image/BuildKernel
cp $(KDIR)/openwrt-$(BOARD)-wbd111-zImage $(BIN_DIR)/openwrt-$(BOARD)-wbd111-zImage
endef
define Image/Build/jffs2-64k
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=64k conv=sync
endef
define Image/Build/jffs2-128k
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=128k conv=sync
endef
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
endef
define Image/Build
$(call Image/Build/$(1),$(1))
-$(STAGING_DIR_HOST)/bin/mkfwimage2 \
-m GEOS -f 0x30000000 -z \
-v WILI-S.WILIBOARD.v5.00.SL3512.OpenWrt.00000.000000.000000 \
-o $(BIN_DIR)/openwrt-$(BOARD)-wbd111-$(1).bin \
-p Kernel:0x020000:0x100000:0:0:$(BIN_DIR)/openwrt-$(BOARD)-wbd111-zImage \
-p Ramdisk:0x120000:0x500000:0:0:$(BIN_DIR)/openwrt-$(BOARD)-$(1).img
endef
$(eval $(call BuildImage))

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,149 @@
--- /dev/null
+++ b/arch/arm/mach-gemini/board-wbd111.c
@@ -0,0 +1,123 @@
+/*
+ * Support for Wiliboard WBD-111
+ *
+ * Copyright (C) 2009 Imre Kaloz <kaloz@openwrt.org>
+ *
+ * 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.
+ */
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/leds.h>
+#include <linux/input.h>
+#include <linux/gpio_keys.h>
+#include <linux/mdio-gpio.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/time.h>
+
+#include <mach/gmac.h>
+
+#include "common.h"
+
+static struct mdio_gpio_platform_data wbd111_mdio = {
+ .mdc = 22,
+ .mdio = 21,
+ .phy_mask = ~(1 << 1),
+};
+
+static struct platform_device wbd111_phy_device = {
+ .name = "mdio-gpio",
+ .id = 0,
+ .dev = {
+ .platform_data = &wbd111_mdio,
+ },
+};
+
+static struct gemini_gmac_platform_data gmac_data = {
+ .bus_id[0] = "0:01",
+ .interface[0] = PHY_INTERFACE_MODE_MII,
+};
+
+static struct gpio_keys_button wbd111_keys[] = {
+ {
+ .code = KEY_SETUP,
+ .gpio = 5,
+ .active_low = 1,
+ .desc = "reset",
+ .type = EV_KEY,
+ },
+};
+
+static struct gpio_keys_platform_data wbd111_keys_data = {
+ .buttons = wbd111_keys,
+ .nbuttons = ARRAY_SIZE(wbd111_keys),
+};
+
+static struct platform_device wbd111_keys_device = {
+ .name = "gpio-keys",
+ .id = -1,
+ .dev = {
+ .platform_data = &wbd111_keys_data,
+ },
+};
+
+static struct gpio_led wbd111_leds[] = {
+ {
+ .name = "L3red",
+ .gpio = 1,
+ },
+ {
+ .name = "L4green",
+ .gpio = 2,
+ },
+ {
+ .name = "L4red",
+ .gpio = 3,
+ },
+ {
+ .name = "L3green",
+ .gpio = 5,
+ },
+};
+
+static struct gpio_led_platform_data wbd111_leds_data = {
+ .num_leds = ARRAY_SIZE(wbd111_leds),
+ .leds = wbd111_leds,
+};
+
+static struct platform_device wbd111_leds_device = {
+ .name = "leds-gpio",
+ .id = -1,
+ .dev = {
+ .platform_data = &wbd111_leds_data,
+ },
+};
+
+static struct sys_timer wbd111_timer = {
+ .init = gemini_timer_init,
+};
+
+static void __init wbd111_init(void)
+{
+ gemini_gpio_init();
+ platform_register_uart();
+ platform_register_pflash(SZ_8M, NULL, 0);
+ platform_device_register(&wbd111_leds_device);
+ platform_device_register(&wbd111_keys_device);
+ platform_device_register(&wbd111_phy_device);
+ platform_register_ethernet(&gmac_data);
+}
+
+MACHINE_START(WBD111, "Wiliboard WBD-111")
+ .phys_io = 0x7fffc000,
+ .io_pg_offst = ((0xffffc000) >> 18) & 0xfffc,
+ .boot_params = 0x100,
+ .map_io = gemini_map_io,
+ .init_irq = gemini_init_irq,
+ .timer = &wbd111_timer,
+ .init_machine = wbd111_init,
+MACHINE_END
--- a/arch/arm/mach-gemini/Kconfig
+++ b/arch/arm/mach-gemini/Kconfig
@@ -16,6 +16,13 @@ config MACH_RUT100
Say Y here if you intend to run this kernel on a
Teltonika 3G Router RUT100.
+config MACH_WBD111
+ bool "Wiliboard WBD-111"
+ select GEMINI_MEM_SWAP
+ help
+ Say Y here if you intend to run this kernel on a
+ Wiliboard WBD-111.
+
endmenu
config GEMINI_MEM_SWAP
--- a/arch/arm/mach-gemini/Makefile
+++ b/arch/arm/mach-gemini/Makefile
@@ -11,3 +11,4 @@ obj-$(CONFIG_PCI) += pci.o
# Board-specific support
obj-$(CONFIG_MACH_NAS4220B) += board-nas4220b.o
obj-$(CONFIG_MACH_RUT100) += board-rut1xx.o
+obj-$(CONFIG_MACH_WBD111) += board-wbd111.o

View file

@ -0,0 +1,25 @@
ARCH_ANY_ENDIAN=y
ARCH_WANTS_LITTLE_ENDIAN=y
# CONFIG_ARM10T is not set
# CONFIG_ARM1136JF_S is not set
# CONFIG_ARM1176JZF_S is not set
# CONFIG_ARM1176JZ_S is not set
# CONFIG_ARM610 is not set
# CONFIG_ARM710 is not set
# CONFIG_ARM720T is not set
# CONFIG_ARM7TDMI is not set
CONFIG_ARM920T=y
# CONFIG_ARM922T is not set
# CONFIG_ARM926T is not set
CONFIG_ARM_EABI=y
# CONFIG_ARM_IWMMXT is not set
# CONFIG_ARM_OABI is not set
# CONFIG_ARM_SA110 is not set
# CONFIG_ARM_SA1100 is not set
# CONFIG_ARM_XSCALE is not set
# CONFIG_GENERIC_ARM is not set
KERNEL_HEADERS="./toolchain_build_arm/linux/include"
KERNEL_SOURCE="./toolchain_build_arm/linux"
TARGET_ARCH="arm"
TARGET_arm=y
# USE_BX is not set

View file

@ -0,0 +1,26 @@
ARCH_ANY_ENDIAN=y
ARCH_LITTLE_ENDIAN=y
ARCH_WANTS_LITTLE_ENDIAN=y
# CONFIG_ARM10T is not set
# CONFIG_ARM1136JF_S is not set
# CONFIG_ARM1176JZF_S is not set
# CONFIG_ARM1176JZ_S is not set
# CONFIG_ARM610 is not set
# CONFIG_ARM710 is not set
# CONFIG_ARM720T is not set
# CONFIG_ARM7TDMI is not set
CONFIG_ARM920T=y
# CONFIG_ARM922T is not set
# CONFIG_ARM926T is not set
# CONFIG_ARM_CORTEX_M1 is not set
# CONFIG_ARM_CORTEX_M3 is not set
# CONFIG_ARM_EABI is not set
# CONFIG_ARM_IWMMXT is not set
CONFIG_ARM_OABI=y
# CONFIG_ARM_SA110 is not set
# CONFIG_ARM_SA1100 is not set
# CONFIG_ARM_XSCALE is not set
# CONFIG_GENERIC_ARM is not set
TARGET_ARCH="arm"
TARGET_arm=y
# USE_BX is not set

View file

@ -0,0 +1,26 @@
ARCH_ANY_ENDIAN=y
ARCH_LITTLE_ENDIAN=y
ARCH_WANTS_LITTLE_ENDIAN=y
# CONFIG_ARM10T is not set
# CONFIG_ARM1136JF_S is not set
# CONFIG_ARM1176JZF_S is not set
# CONFIG_ARM1176JZ_S is not set
# CONFIG_ARM610 is not set
# CONFIG_ARM710 is not set
# CONFIG_ARM720T is not set
# CONFIG_ARM7TDMI is not set
CONFIG_ARM920T=y
# CONFIG_ARM922T is not set
# CONFIG_ARM926T is not set
# CONFIG_ARM_CORTEX_M1 is not set
# CONFIG_ARM_CORTEX_M3 is not set
# CONFIG_ARM_EABI is not set
# CONFIG_ARM_IWMMXT is not set
CONFIG_ARM_OABI=y
# CONFIG_ARM_SA110 is not set
# CONFIG_ARM_SA1100 is not set
# CONFIG_ARM_XSCALE is not set
# CONFIG_GENERIC_ARM is not set
TARGET_ARCH="arm"
TARGET_arm=y
# USE_BX is not set