Date:2010-08-22 19:03:25 (8 years 3 months ago)
Author:lars
Commit:9fa119851e44106d5621329e422eb3a39975a6b0
Message:[kirkwood] Add Seagate Dockstar support

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22765 3c298f89-4303-0410-b956-a3cf2f4a3e73
Files: target/linux/kirkwood/config-default (4 diffs)
target/linux/kirkwood/image/Makefile (2 diffs)
target/linux/kirkwood/patches/100-dockstar.patch (1 diff)

Change Details

target/linux/kirkwood/config-default
11# CONFIG_AEABI is not set
22CONFIG_ALIGNMENT_TRAP=y
3CONFIG_ARCH_FLATMEM_HAS_HOLES=y
3# CONFIG_ARCH_HAS_HOLES_MEMORYMODEL is not set
44# CONFIG_ARCH_HAS_ILOG2_U32 is not set
55# CONFIG_ARCH_HAS_ILOG2_U64 is not set
66CONFIG_ARCH_KIRKWOOD=y
...... 
88# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
99# CONFIG_ARCH_SUPPORTS_MSI is not set
1010CONFIG_ARCH_SUSPEND_POSSIBLE=y
11# CONFIG_ARM_THUMB is not set
1211CONFIG_ARM=y
12# CONFIG_ARM_THUMB is not set
1313# CONFIG_ARPD is not set
1414CONFIG_ATA=m
15# CONFIG_BINARY_PRINTF is not set
1516CONFIG_BITREVERSE=y
16# CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH is not set
1717CONFIG_CACHE_FEROCEON_L2=y
18# CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH is not set
1819CONFIG_CMDLINE="rootdelay=1 root=/dev/mmcblk0p1 noinitrd console=ttyS0,115200"
19CONFIG_CPU_32v5=y
2020CONFIG_CPU_32=y
21CONFIG_CPU_32v5=y
2122CONFIG_CPU_ABRT_EV5T=y
2223CONFIG_CPU_CACHE_VIVT=y
2324CONFIG_CPU_COPY_FEROCEON=y
24CONFIG_CPU_CP15_MMU=y
2525CONFIG_CPU_CP15=y
26# CONFIG_CPU_FEROCEON_OLD_ID is not set
26CONFIG_CPU_CP15_MMU=y
2727CONFIG_CPU_FEROCEON=y
28# CONFIG_CPU_FEROCEON_OLD_ID is not set
2829# CONFIG_CPU_ICACHE_DISABLE is not set
29CONFIG_CPU_IDLE_GOV_LADDER=y
30CONFIG_CPU_IDLE_GOV_MENU=y
3130CONFIG_CPU_IDLE=y
31CONFIG_CPU_IDLE_GOV_LADDER=y
3232CONFIG_CPU_PABRT_NOIFAR=y
3333CONFIG_CPU_TLB_FEROCEON=y
34# CONFIG_DCB is not set
34CONFIG_DEBUG_KERNEL=y
3535# CONFIG_DEBUG_USER is not set
36CONFIG_DECOMPRESS_LZMA=y
3637CONFIG_DEVPORT=y
37# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
3838CONFIG_DLCI=m
3939CONFIG_DLCI_MAX=8
4040# CONFIG_DM9000 is not set
4141CONFIG_DNOTIFY=y
4242# CONFIG_DSCC4 is not set
43# CONFIG_EEPROM_AT24 is not set
44# CONFIG_EEPROM_LEGACY is not set
4543CONFIG_EXT2_FS=y
4644CONFIG_EXT3_FS=y
4745# CONFIG_FARSYNC is not set
48# CONFIG_FCOE is not set
4946# CONFIG_FPE_FASTFPE is not set
5047# CONFIG_FPE_NWFPE is not set
5148CONFIG_FRAME_POINTER=y
52CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
5349CONFIG_GENERIC_CLOCKEVENTS=y
50CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
5451CONFIG_GENERIC_FIND_LAST_BIT=y
5552CONFIG_GENERIC_GPIO=y
5653CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
...... 
6764CONFIG_HAVE_KPROBES=y
6865CONFIG_HAVE_KRETPROBES=y
6966CONFIG_HAVE_LATENCYTOP_SUPPORT=y
67CONFIG_HAVE_MLOCK=y
7068CONFIG_HAVE_OPROFILE=y
69CONFIG_HDLC=m
7170CONFIG_HDLC_CISCO=m
7271CONFIG_HDLC_FR=m
73CONFIG_HDLC=m
7472CONFIG_HDLC_PPP=m
7573CONFIG_HDLC_RAW=m
76# CONFIG_HWMON_DEBUG_CHIP is not set
7774CONFIG_HWMON=y
75# CONFIG_HWMON_DEBUG_CHIP is not set
7876CONFIG_HW_RANDOM=y
77CONFIG_I2C=y
7978CONFIG_I2C_BOARDINFO=y
8079CONFIG_I2C_CHARDEV=y
8180CONFIG_I2C_MV64XXX=y
82CONFIG_I2C=y
81CONFIG_INET_LRO=y
8382CONFIG_INITRAMFS_SOURCE=""
8483# CONFIG_IP_ADVANCED_ROUTER is not set
85CONFIG_IP_MROUTE=y
8684CONFIG_IP_PIMSM_V1=y
8785CONFIG_IP_PIMSM_V2=y
86# CONFIG_ISDN_CAPI is not set
87# CONFIG_ISDN_I4L is not set
8888CONFIG_JBD=y
89# CONFIG_LEDS_GPIO is not set
90CONFIG_LEGACY_PTY_COUNT=256
89CONFIG_LEDS_GPIO=y
9190CONFIG_LEGACY_PTYS=y
92# CONFIG_LIB80211 is not set
93# CONFIG_LIBFC is not set
91CONFIG_LEGACY_PTY_COUNT=256
9492# CONFIG_MACH_DB88F6281_BP is not set
93CONFIG_MACH_DOCKSTAR=y
9594# CONFIG_MACH_RD88F6192_NAS is not set
9695# CONFIG_MACH_RD88F6281 is not set
9796CONFIG_MACH_SHEEVAPLUG=y
9897# CONFIG_MACH_TS219 is not set
99CONFIG_MISC_FILESYSTEMS=y
100CONFIG_MMC_BLOCK=m
98CONFIG_MMC=y
10199CONFIG_MMC_BLOCK=y
102CONFIG_MMC=m
103CONFIG_MMC_MVSDIO=m
104100CONFIG_MMC_MVSDIO=y
105CONFIG_MMC=y
106101# CONFIG_MTD_CFI is not set
107CONFIG_MTD_NAND_ORION=y
102CONFIG_MTD_CMDLINE_PARTS=y
108103CONFIG_MTD_NAND=y
109# CONFIG_MTD_PHYSMAP_COMPAT is not set
110CONFIG_MTD_PHYSMAP=y
111# CONFIG_MTD_REDBOOT_PARTSis not set
104CONFIG_MTD_NAND_ORION=y
112105# CONFIG_MTD_ROOTFS_ROOT_DEV is not set
113106# CONFIG_MTD_ROOTFS_SPLIT is not set
114107CONFIG_MV643XX_ETH=y
108CONFIG_NET_DSA=y
115109# CONFIG_NET_DSA_MV88E6060 is not set
116110# CONFIG_NET_DSA_MV88E6123_61_65 is not set
117111CONFIG_NET_DSA_MV88E6131=y
118CONFIG_NET_DSA_MV88E6XXX_NEED_PPU=y
119112CONFIG_NET_DSA_MV88E6XXX=y
113CONFIG_NET_DSA_MV88E6XXX_NEED_PPU=y
120114CONFIG_NET_DSA_TAG_DSA=y
121115# CONFIG_NET_DSA_TAG_EDSA is not set
122116# CONFIG_NET_DSA_TAG_TRAILER is not set
123CONFIG_NET_DSA=y
124# CONFIG_NET_SCH_DRR is not set
125117# CONFIG_NO_IOPORT is not set
126118CONFIG_OUTER_CACHE=y
127119CONFIG_PAGEFLAGS_EXTENDED=y
128120CONFIG_PAGE_OFFSET=0xC0000000
129121CONFIG_PATA_ARTOP=m
130122CONFIG_PCI=y
131# CONFIG_PCI_STUB is not set
132123CONFIG_PHYLIB=y
133124CONFIG_PLAT_ORION=y
134125CONFIG_RTC_CLASS=y
...... 
138129# CONFIG_SCSI_MULTI_LUN is not set
139130# CONFIG_SDIO_UART is not set
140131# CONFIG_SERIAL_8250_EXTENDED is not set
132# CONFIG_SLOW_WORK is not set
141133CONFIG_SPLIT_PTLOCK_CPUS=4096
142CONFIG_SWAP=y
143134CONFIG_SYS_SUPPORTS_APM_EMULATION=y
135CONFIG_TRACING_SUPPORT=y
144136CONFIG_UID16=y
145CONFIG_USB_EHCI_HCD=m
146# CONFIG_USB_GPIO_VBUS is not set
147137CONFIG_USB=m
138CONFIG_USB_EHCI_HCD=m
148139# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
149140# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
150141CONFIG_USB_OHCI_HCD=m
151# CONFIG_USB_OXU210HP_HCD is not set
152142CONFIG_USB_SUPPORT=y
153143CONFIG_USB_UHCI_HCD=m
154144CONFIG_VECTORS_BASE=0xffff0000
target/linux/kirkwood/image/Makefile
77include $(TOPDIR)/rules.mk
88include $(INCLUDE_DIR)/image.mk
99
10add_jffs2_mark=
10JFFS2OPTS_NAND += --little-endian --pagesize=0x800 --no-cleanmarkers --pad
11
12define Image/mkfs/jffs2/sub/sub
13    $(STAGING_DIR_HOST)/bin/mkfs.jffs2 $(3) \
14        -e $(patsubst %k,%KiB,$(1)) -o $(KDIR)/root.jffs2-$(1)-$(2) -d $(TARGET_DIR) -v 2>&1 1>/dev/null | awk '/^.+$$$$/'
15endef
16
17define Image/mkfs/jffs2/sub
18    # Do not remov this line
19    $(call Image/mkfs/jffs2/sub/sub,$(1),nor,$(JFFS2OPTS))
20    ( \
21        dd if=$(KDIR)/uImage bs=4096k conv=sync; \
22        dd if=$(KDIR)/root.jffs2-$(1)-nor bs=128k conv=sync; \
23    ) > $(BIN_DIR)/$(IMG_PREFIX)-jffs2-$(1)-nor.img
24
25    $(call Image/mkfs/jffs2/sub/sub,$(1),nand,$(JFFS2OPTS) $(JFFS2OPTS_NAND))
26    $(call add_jffs2_mark,$(KDIR)/root.jffs2-$(1)-nand)
27    cp $(KDIR)/root.jffs2-$(1)-nand $(BIN_DIR)/$(IMG_PREFIX)-jffs2-$(1)-nand.img
28endef
1129
1230define Image/Prepare
1331    cp $(LINUX_DIR)/arch/arm/boot/uImage $(KDIR)/uImage
...... 
2644    ( \
2745        dd if=$(KDIR)/uImage bs=4096k conv=sync; \
2846        dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
29    ) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).img
47    ) > $(BIN_DIR)/$(IMG_PREFIX)-$(1)-nor.img
48
49    cp $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-nand.img
3050endef
3151
3252define Image/Build/squashfs
target/linux/kirkwood/patches/100-dockstar.patch
1This patch adds support for the Seagate FreeAgent DockStar, a Marvell
2Sheevaplug derivative. I have already registered the DOCKSTAR machine
3ID.
4
5Signed-off-by: Eric Cooper <ecc@xxxxxxx>
6---
7 arch/arm/mach-kirkwood/Kconfig | 6 ++
8 arch/arm/mach-kirkwood/Makefile | 1 +
9 arch/arm/mach-kirkwood/dockstar-setup.c | 112 +++++++++++++++++++++++++++++++
10 arch/arm/tools/mach-types | 1 +
11 4 files changed, 120 insertions(+), 0 deletions(-)
12 create mode 100644 arch/arm/mach-kirkwood/dockstar-setup.c
13
14diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
15index 29b2163..74d832f 100644
16--- a/arch/arm/mach-kirkwood/Kconfig
17@@ -32,6 +32,12 @@ config MACH_TS219
18       Say 'Y' here if you want your kernel to support the
19       QNAP TS-119 and TS-219 Turbo NAS devices.
20
21+config MACH_DOCKSTAR
22+ bool "Seagate FreeAgent DockStar"
23+ help
24+ Say 'Y' here if you want your kernel to support the
25+ Seagate FreeAgent DockStar.
26+
27 endmenu
28
29 endif
30diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
31index c0cd5d3..025b256 100644
32--- a/arch/arm/mach-kirkwood/Makefile
33@@ -6,4 +6,5 @@ obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o
34 obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o
35 obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o
36+obj-$(CONFIG_MACH_DOCKSTAR) += dockstar-setup.o
37
38 obj-$(CONFIG_CPU_IDLE) += cpuidle.o
39diff --git a/arch/arm/mach-kirkwood/dockstar-setup.c b/arch/arm/mach-kirkwood/dockstar-setup.c
40new file mode 100644
41index 0000000..a90475d
42--- /dev/null
43@@ -0,0 +1,148 @@
44+/*
45+ * arch/arm/mach-kirkwood/dockstar-setup.c
46+ *
47+ * Seagate FreeAgent DockStar Setup
48+ *
49+ * This file is licensed under the terms of the GNU General Public
50+ * License version 2. This program is licensed "as is" without any
51+ * warranty of any kind, whether express or implied.
52+ */
53+
54+#include <linux/kernel.h>
55+#include <linux/init.h>
56+#include <linux/platform_device.h>
57+#include <linux/ata_platform.h>
58+#include <linux/mtd/partitions.h>
59+#include <linux/mv643xx_eth.h>
60+#include <linux/gpio.h>
61+#include <linux/leds.h>
62+#include <asm/mach-types.h>
63+#include <asm/mach/arch.h>
64+#include <mach/kirkwood.h>
65+#include <plat/mvsdio.h>
66+#include <plat/orion_nand.h>
67+#include "common.h"
68+#include "mpp.h"
69+
70+static struct mtd_partition dockstar_nand_parts[] = {
71+ {
72+ .name = "u-boot",
73+ .offset = 0,
74+ .size = SZ_1M
75+ }, {
76+ .name = "second_stage_u-boot",
77+ .offset = MTDPART_OFS_NXTBLK,
78+ .size = SZ_1M
79+ }, {
80+ .name = "uImage",
81+ .offset = MTDPART_OFS_NXTBLK,
82+ .size = SZ_1M + SZ_2M,
83+ }, {
84+ .name = "rootfs",
85+ .offset = MTDPART_OFS_NXTBLK,
86+ .size = SZ_64M,
87+ }, {
88+ .name = "data",
89+ .offset = MTDPART_OFS_NXTBLK,
90+ .size = MTDPART_SIZ_FULL
91+ },
92+};
93+
94+static struct resource dockstar_nand_resource = {
95+ .flags = IORESOURCE_MEM,
96+ .start = KIRKWOOD_NAND_MEM_PHYS_BASE,
97+ .end = KIRKWOOD_NAND_MEM_PHYS_BASE +
98+ KIRKWOOD_NAND_MEM_SIZE - 1,
99+};
100+
101+static struct orion_nand_data dockstar_nand_data = {
102+ .parts = dockstar_nand_parts,
103+ .nr_parts = ARRAY_SIZE(dockstar_nand_parts),
104+ .cle = 0,
105+ .ale = 1,
106+ .width = 8,
107+ .chip_delay = 25,
108+};
109+
110+static struct platform_device dockstar_nand_flash = {
111+ .name = "orion_nand",
112+ .id = -1,
113+ .dev = {
114+ .platform_data = &dockstar_nand_data,
115+ },
116+ .resource = &dockstar_nand_resource,
117+ .num_resources = 1,
118+};
119+
120+
121+static struct mv643xx_eth_platform_data dockstar_ge00_data = {
122+ .phy_addr = MV643XX_ETH_PHY_ADDR(0),
123+};
124+
125+static struct gpio_led dockstar_led_pins[] = {
126+ {
127+ .name = "dockstar:green:health",
128+ .default_trigger = "default-on",
129+ .gpio = 46,
130+ .active_low = 1,
131+ },
132+ {
133+ .name = "dockstar:orange:misc",
134+ .default_trigger = "none",
135+ .gpio = 47,
136+ .active_low = 1,
137+ },
138+};
139+
140+static struct gpio_led_platform_data dockstar_led_data = {
141+ .leds = dockstar_led_pins,
142+ .num_leds = ARRAY_SIZE(dockstar_led_pins),
143+};
144+
145+static struct platform_device dockstar_leds = {
146+ .name = "leds-gpio",
147+ .id = -1,
148+ .dev = {
149+ .platform_data = &dockstar_led_data,
150+ }
151+};
152+
153+static unsigned int dockstar_mpp_config[] __initdata = {
154+ MPP29_GPIO, /* USB Power Enable */
155+ MPP46_GPIO, /* LED green */
156+ MPP47_GPIO, /* LED orange */
157+ 0
158+};
159+
160+static void __init dockstar_init(void)
161+{
162+ /*
163+ * Basic setup. Needs to be called early.
164+ */
165+ kirkwood_init();
166+
167+ /* setup gpio pin select */
168+ kirkwood_mpp_conf(dockstar_mpp_config);
169+
170+ kirkwood_uart0_init();
171+
172+ if (gpio_request(29, "USB Power Enable") != 0 ||
173+ gpio_direction_output(29, 1) != 0)
174+ printk(KERN_ERR "can't set up GPIO 29 (USB Power Enable)\n");
175+ kirkwood_ehci_init();
176+
177+ kirkwood_ge00_init(&dockstar_ge00_data);
178+
179+ platform_device_register(&dockstar_nand_flash);
180+ platform_device_register(&dockstar_leds);
181+}
182+
183+MACHINE_START(DOCKSTAR, "Seagate FreeAgent DockStar")
184+ .phys_io = KIRKWOOD_REGS_PHYS_BASE,
185+ .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
186+ .boot_params = 0x00000100,
187+ .init_machine = dockstar_init,
188+ .map_io = kirkwood_map_io,
189+ .init_irq = kirkwood_init_irq,
190+ .timer = &kirkwood_timer,
191+MACHINE_END
192diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
193index 48cbdcb..8d56837 100644
194--- a/arch/arm/tools/mach-types
195@@ -2245,3 +2245,4 @@ davinci_dm365_dvr MACH_DAVINCI_DM365_DVR DAVINCI_DM365_DVR 2963
196 omap3_wl_ff MACH_OMAP3_WL_FF OMAP3_WL_FF 2258
197 simcom MACH_SIMCOM SIMCOM 2259
198 mcwebio MACH_MCWEBIO MCWEBIO 2260
199+dockstar MACH_DOCKSTAR DOCKSTAR 2998
200--
2011.7.1
202

Archive Download the corresponding diff file



interactive