aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2010-08-22 17:03:25 +0000
committerLars-Peter Clausen <lars@metafoo.de>2010-08-22 17:03:25 +0000
commit0e974c50edac8e4e5607e9eb1fcf68e1e822c3be (patch)
treef6a9c404012e6dc2a744290ce6797449650f76fb
parent2233a27d4381331aed3dfe33882146bdae44c9fe (diff)
downloadupstream-0e974c50edac8e4e5607e9eb1fcf68e1e822c3be.tar.gz
upstream-0e974c50edac8e4e5607e9eb1fcf68e1e822c3be.tar.bz2
upstream-0e974c50edac8e4e5607e9eb1fcf68e1e822c3be.zip
Add Seagate Dockstar support
SVN-Revision: 22765
-rw-r--r--target/linux/kirkwood/config-default68
-rw-r--r--target/linux/kirkwood/image/Makefile24
-rw-r--r--target/linux/kirkwood/patches/100-dockstar.patch206
3 files changed, 257 insertions, 41 deletions
diff --git a/target/linux/kirkwood/config-default b/target/linux/kirkwood/config-default
index 5af3957543..3d9c408e93 100644
--- a/target/linux/kirkwood/config-default
+++ b/target/linux/kirkwood/config-default
@@ -1,6 +1,6 @@
# CONFIG_AEABI is not set
CONFIG_ALIGNMENT_TRAP=y
-CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_HAS_HOLES_MEMORYMODEL is not set
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_ARCH_KIRKWOOD=y
@@ -8,49 +8,46 @@ CONFIG_ARCH_KIRKWOOD=y
# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
# CONFIG_ARCH_SUPPORTS_MSI is not set
CONFIG_ARCH_SUSPEND_POSSIBLE=y
-# CONFIG_ARM_THUMB is not set
CONFIG_ARM=y
+# CONFIG_ARM_THUMB is not set
# CONFIG_ARPD is not set
CONFIG_ATA=m
+# CONFIG_BINARY_PRINTF is not set
CONFIG_BITREVERSE=y
-# CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH is not set
CONFIG_CACHE_FEROCEON_L2=y
+# CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH is not set
CONFIG_CMDLINE="rootdelay=1 root=/dev/mmcblk0p1 noinitrd console=ttyS0,115200"
-CONFIG_CPU_32v5=y
CONFIG_CPU_32=y
+CONFIG_CPU_32v5=y
CONFIG_CPU_ABRT_EV5T=y
CONFIG_CPU_CACHE_VIVT=y
CONFIG_CPU_COPY_FEROCEON=y
-CONFIG_CPU_CP15_MMU=y
CONFIG_CPU_CP15=y
-# CONFIG_CPU_FEROCEON_OLD_ID is not set
+CONFIG_CPU_CP15_MMU=y
CONFIG_CPU_FEROCEON=y
+# CONFIG_CPU_FEROCEON_OLD_ID is not set
# CONFIG_CPU_ICACHE_DISABLE is not set
-CONFIG_CPU_IDLE_GOV_LADDER=y
-CONFIG_CPU_IDLE_GOV_MENU=y
CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_PABRT_NOIFAR=y
CONFIG_CPU_TLB_FEROCEON=y
-# CONFIG_DCB is not set
+CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_USER is not set
+CONFIG_DECOMPRESS_LZMA=y
CONFIG_DEVPORT=y
-# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
CONFIG_DLCI=m
CONFIG_DLCI_MAX=8
# CONFIG_DM9000 is not set
CONFIG_DNOTIFY=y
# CONFIG_DSCC4 is not set
-# CONFIG_EEPROM_AT24 is not set
-# CONFIG_EEPROM_LEGACY is not set
CONFIG_EXT2_FS=y
CONFIG_EXT3_FS=y
# CONFIG_FARSYNC is not set
-# CONFIG_FCOE is not set
# CONFIG_FPE_FASTFPE is not set
# CONFIG_FPE_NWFPE is not set
CONFIG_FRAME_POINTER=y
-CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_GENERIC_FIND_LAST_BIT=y
CONFIG_GENERIC_GPIO=y
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
@@ -67,68 +64,62 @@ CONFIG_HAVE_IDE=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_HAVE_MLOCK=y
CONFIG_HAVE_OPROFILE=y
+CONFIG_HDLC=m
CONFIG_HDLC_CISCO=m
CONFIG_HDLC_FR=m
-CONFIG_HDLC=m
CONFIG_HDLC_PPP=m
CONFIG_HDLC_RAW=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
CONFIG_HWMON=y
+# CONFIG_HWMON_DEBUG_CHIP is not set
CONFIG_HW_RANDOM=y
+CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_MV64XXX=y
-CONFIG_I2C=y
+CONFIG_INET_LRO=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_ISDN_CAPI is not set
+# CONFIG_ISDN_I4L is not set
CONFIG_JBD=y
-# CONFIG_LEDS_GPIO is not set
-CONFIG_LEGACY_PTY_COUNT=256
+CONFIG_LEDS_GPIO=y
CONFIG_LEGACY_PTYS=y
-# CONFIG_LIB80211 is not set
-# CONFIG_LIBFC is not set
+CONFIG_LEGACY_PTY_COUNT=256
# CONFIG_MACH_DB88F6281_BP is not set
+CONFIG_MACH_DOCKSTAR=y
# CONFIG_MACH_RD88F6192_NAS is not set
# CONFIG_MACH_RD88F6281 is not set
CONFIG_MACH_SHEEVAPLUG=y
# CONFIG_MACH_TS219 is not set
-CONFIG_MISC_FILESYSTEMS=y
-CONFIG_MMC_BLOCK=m
+CONFIG_MMC=y
CONFIG_MMC_BLOCK=y
-CONFIG_MMC=m
-CONFIG_MMC_MVSDIO=m
CONFIG_MMC_MVSDIO=y
-CONFIG_MMC=y
# CONFIG_MTD_CFI is not set
-CONFIG_MTD_NAND_ORION=y
+CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_NAND=y
-# CONFIG_MTD_PHYSMAP_COMPAT is not set
-CONFIG_MTD_PHYSMAP=y
-# CONFIG_MTD_REDBOOT_PARTSis not set
+CONFIG_MTD_NAND_ORION=y
# CONFIG_MTD_ROOTFS_ROOT_DEV is not set
# CONFIG_MTD_ROOTFS_SPLIT is not set
CONFIG_MV643XX_ETH=y
+CONFIG_NET_DSA=y
# CONFIG_NET_DSA_MV88E6060 is not set
# CONFIG_NET_DSA_MV88E6123_61_65 is not set
CONFIG_NET_DSA_MV88E6131=y
-CONFIG_NET_DSA_MV88E6XXX_NEED_PPU=y
CONFIG_NET_DSA_MV88E6XXX=y
+CONFIG_NET_DSA_MV88E6XXX_NEED_PPU=y
CONFIG_NET_DSA_TAG_DSA=y
# CONFIG_NET_DSA_TAG_EDSA is not set
# CONFIG_NET_DSA_TAG_TRAILER is not set
-CONFIG_NET_DSA=y
-# CONFIG_NET_SCH_DRR is not set
# CONFIG_NO_IOPORT is not set
CONFIG_OUTER_CACHE=y
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_PAGE_OFFSET=0xC0000000
CONFIG_PATA_ARTOP=m
CONFIG_PCI=y
-# CONFIG_PCI_STUB is not set
CONFIG_PHYLIB=y
CONFIG_PLAT_ORION=y
CONFIG_RTC_CLASS=y
@@ -138,17 +129,16 @@ CONFIG_SCSI=m
# CONFIG_SCSI_MULTI_LUN is not set
# CONFIG_SDIO_UART is not set
# CONFIG_SERIAL_8250_EXTENDED is not set
+# CONFIG_SLOW_WORK is not set
CONFIG_SPLIT_PTLOCK_CPUS=4096
-CONFIG_SWAP=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_TRACING_SUPPORT=y
CONFIG_UID16=y
-CONFIG_USB_EHCI_HCD=m
-# CONFIG_USB_GPIO_VBUS is not set
CONFIG_USB=m
+CONFIG_USB_EHCI_HCD=m
# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OXU210HP_HCD is not set
CONFIG_USB_SUPPORT=y
CONFIG_USB_UHCI_HCD=m
CONFIG_VECTORS_BASE=0xffff0000
diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile
index 86d6a01e91..0989d35f0a 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -7,7 +7,25 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
-add_jffs2_mark=
+JFFS2OPTS_NAND += --little-endian --pagesize=0x800 --no-cleanmarkers --pad
+
+define Image/mkfs/jffs2/sub/sub
+ $(STAGING_DIR_HOST)/bin/mkfs.jffs2 $(3) \
+ -e $(patsubst %k,%KiB,$(1)) -o $(KDIR)/root.jffs2-$(1)-$(2) -d $(TARGET_DIR) -v 2>&1 1>/dev/null | awk '/^.+$$$$/'
+endef
+
+define Image/mkfs/jffs2/sub
+ # Do not remov this line
+ $(call Image/mkfs/jffs2/sub/sub,$(1),nor,$(JFFS2OPTS))
+ ( \
+ dd if=$(KDIR)/uImage bs=4096k conv=sync; \
+ dd if=$(KDIR)/root.jffs2-$(1)-nor bs=128k conv=sync; \
+ ) > $(BIN_DIR)/$(IMG_PREFIX)-jffs2-$(1)-nor.img
+
+ $(call Image/mkfs/jffs2/sub/sub,$(1),nand,$(JFFS2OPTS) $(JFFS2OPTS_NAND))
+ $(call add_jffs2_mark,$(KDIR)/root.jffs2-$(1)-nand)
+ cp $(KDIR)/root.jffs2-$(1)-nand $(BIN_DIR)/$(IMG_PREFIX)-jffs2-$(1)-nand.img
+endef
define Image/Prepare
cp $(LINUX_DIR)/arch/arm/boot/uImage $(KDIR)/uImage
@@ -26,7 +44,9 @@ define Image/Build/jffs2-128k
( \
dd if=$(KDIR)/uImage bs=4096k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
- ) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).img
+ ) > $(BIN_DIR)/$(IMG_PREFIX)-$(1)-nor.img
+
+ cp $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-nand.img
endef
define Image/Build/squashfs
diff --git a/target/linux/kirkwood/patches/100-dockstar.patch b/target/linux/kirkwood/patches/100-dockstar.patch
new file mode 100644
index 0000000000..921faaf55a
--- /dev/null
+++ b/target/linux/kirkwood/patches/100-dockstar.patch
@@ -0,0 +1,206 @@
+This patch adds support for the Seagate FreeAgent DockStar, a Marvell
+Sheevaplug derivative. I have already registered the DOCKSTAR machine
+ID.
+
+Signed-off-by: Eric Cooper <ecc@xxxxxxx>
+---
+ arch/arm/mach-kirkwood/Kconfig | 6 ++
+ arch/arm/mach-kirkwood/Makefile | 1 +
+ arch/arm/mach-kirkwood/dockstar-setup.c | 112 +++++++++++++++++++++++++++++++
+ arch/arm/tools/mach-types | 1 +
+ 4 files changed, 120 insertions(+), 0 deletions(-)
+ create mode 100644 arch/arm/mach-kirkwood/dockstar-setup.c
+
+diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
+index 29b2163..74d832f 100644
+--- a/arch/arm/mach-kirkwood/Kconfig
++++ b/arch/arm/mach-kirkwood/Kconfig
+@@ -32,6 +32,12 @@ config MACH_TS219
+ Say 'Y' here if you want your kernel to support the
+ QNAP TS-119 and TS-219 Turbo NAS devices.
+
++config MACH_DOCKSTAR
++ bool "Seagate FreeAgent DockStar"
++ help
++ Say 'Y' here if you want your kernel to support the
++ Seagate FreeAgent DockStar.
++
+ endmenu
+
+ endif
+diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
+index c0cd5d3..025b256 100644
+--- a/arch/arm/mach-kirkwood/Makefile
++++ b/arch/arm/mach-kirkwood/Makefile
+@@ -6,4 +6,5 @@ obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o
+ obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o
+ obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o
++obj-$(CONFIG_MACH_DOCKSTAR) += dockstar-setup.o
+
+ obj-$(CONFIG_CPU_IDLE) += cpuidle.o
+diff --git a/arch/arm/mach-kirkwood/dockstar-setup.c b/arch/arm/mach-kirkwood/dockstar-setup.c
+new file mode 100644
+index 0000000..a90475d
+--- /dev/null
++++ b/arch/arm/mach-kirkwood/dockstar-setup.c
+@@ -0,0 +1,148 @@
++/*
++ * arch/arm/mach-kirkwood/dockstar-setup.c
++ *
++ * Seagate FreeAgent DockStar Setup
++ *
++ * This file is licensed under the terms of the GNU General Public
++ * License version 2. This program is licensed "as is" without any
++ * warranty of any kind, whether express or implied.
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/ata_platform.h>
++#include <linux/mtd/partitions.h>
++#include <linux/mv643xx_eth.h>
++#include <linux/gpio.h>
++#include <linux/leds.h>
++#include <asm/mach-types.h>
++#include <asm/mach/arch.h>
++#include <mach/kirkwood.h>
++#include <plat/mvsdio.h>
++#include <plat/orion_nand.h>
++#include "common.h"
++#include "mpp.h"
++
++static struct mtd_partition dockstar_nand_parts[] = {
++ {
++ .name = "u-boot",
++ .offset = 0,
++ .size = SZ_1M
++ }, {
++ .name = "second_stage_u-boot",
++ .offset = MTDPART_OFS_NXTBLK,
++ .size = SZ_1M
++ }, {
++ .name = "uImage",
++ .offset = MTDPART_OFS_NXTBLK,
++ .size = SZ_1M + SZ_2M,
++ }, {
++ .name = "rootfs",
++ .offset = MTDPART_OFS_NXTBLK,
++ .size = SZ_64M,
++ }, {
++ .name = "data",
++ .offset = MTDPART_OFS_NXTBLK,
++ .size = MTDPART_SIZ_FULL
++ },
++};
++
++static struct resource dockstar_nand_resource = {
++ .flags = IORESOURCE_MEM,
++ .start = KIRKWOOD_NAND_MEM_PHYS_BASE,
++ .end = KIRKWOOD_NAND_MEM_PHYS_BASE +
++ KIRKWOOD_NAND_MEM_SIZE - 1,
++};
++
++static struct orion_nand_data dockstar_nand_data = {
++ .parts = dockstar_nand_parts,
++ .nr_parts = ARRAY_SIZE(dockstar_nand_parts),
++ .cle = 0,
++ .ale = 1,
++ .width = 8,
++ .chip_delay = 25,
++};
++
++static struct platform_device dockstar_nand_flash = {
++ .name = "orion_nand",
++ .id = -1,
++ .dev = {
++ .platform_data = &dockstar_nand_data,
++ },
++ .resource = &dockstar_nand_resource,
++ .num_resources = 1,
++};
++
++
++static struct mv643xx_eth_platform_data dockstar_ge00_data = {
++ .phy_addr = MV643XX_ETH_PHY_ADDR(0),
++};
++
++static struct gpio_led dockstar_led_pins[] = {
++ {
++ .name = "dockstar:green:health",
++ .default_trigger = "default-on",
++ .gpio = 46,
++ .active_low = 1,
++ },
++ {
++ .name = "dockstar:orange:misc",
++ .default_trigger = "none",
++ .gpio = 47,
++ .active_low = 1,
++ },
++};
++
++static struct gpio_led_platform_data dockstar_led_data = {
++ .leds = dockstar_led_pins,
++ .num_leds = ARRAY_SIZE(dockstar_led_pins),
++};
++
++static struct platform_device dockstar_leds = {
++ .name = "leds-gpio",
++ .id = -1,
++ .dev = {
++ .platform_data = &dockstar_led_data,
++ }
++};
++
++static unsigned int dockstar_mpp_config[] __initdata = {
++ MPP29_GPIO, /* USB Power Enable */
++ MPP46_GPIO, /* LED green */
++ MPP47_GPIO, /* LED orange */
++ 0
++};
++
++static void __init dockstar_init(void)
++{
++ /*
++ * Basic setup. Needs to be called early.
++ */
++ kirkwood_init();
++
++ /* setup gpio pin select */
++ kirkwood_mpp_conf(dockstar_mpp_config);
++
++ kirkwood_uart0_init();
++
++ if (gpio_request(29, "USB Power Enable") != 0 ||
++ gpio_direction_output(29, 1) != 0)
++ printk(KERN_ERR "can't set up GPIO 29 (USB Power Enable)\n");
++ kirkwood_ehci_init();
++
++ kirkwood_ge00_init(&dockstar_ge00_data);
++
++ platform_device_register(&dockstar_nand_flash);
++ platform_device_register(&dockstar_leds);
++}
++
++MACHINE_START(DOCKSTAR, "Seagate FreeAgent DockStar")
++ .phys_io = KIRKWOOD_REGS_PHYS_BASE,
++ .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
++ .boot_params = 0x00000100,
++ .init_machine = dockstar_init,
++ .map_io = kirkwood_map_io,
++ .init_irq = kirkwood_init_irq,
++ .timer = &kirkwood_timer,
++MACHINE_END
+diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
+index 48cbdcb..8d56837 100644
+--- a/arch/arm/tools/mach-types
++++ b/arch/arm/tools/mach-types
+@@ -2245,3 +2245,4 @@ davinci_dm365_dvr MACH_DAVINCI_DM365_DVR DAVINCI_DM365_DVR 2963
+ omap3_wl_ff MACH_OMAP3_WL_FF OMAP3_WL_FF 2258
+ simcom MACH_SIMCOM SIMCOM 2259
+ mcwebio MACH_MCWEBIO MCWEBIO 2260
++dockstar MACH_DOCKSTAR DOCKSTAR 2998
+--
+1.7.1
+