All apex patches are now upstream
[nslu2-linux/kernel.git] / patches / apex / variation-fsg3.patch
bloba93f555331e863bae2b62a819b8df6dfdff189f9
1 From: Rod Whitby <rod@whitby.id.au>
2 Subject: FSG3 variations support
4 Enable fail-safe variations support on the FSG-3.
6 Signed-off-by: Rod Whitby <rod@whitby.id.au>
7 --
9 Index: apex/src/mach-ixp42x/Makefile
10 ===================================================================
11 --- apex.orig/src/mach-ixp42x/Makefile 2008-05-28 10:52:31.000000000 +0930
12 +++ apex/src/mach-ixp42x/Makefile 2008-05-28 10:53:07.000000000 +0930
13 @@ -38,6 +38,7 @@
15 obj-x$(CONFIG_MACH_NSLU2)$(CONFIG_SPINNER) += spinner-nslu2.o
16 obj-x$(CONFIG_MACH_NSLU2)$(CONFIG_VARIATIONS) += variation-nslu2.o
17 +obj-x$(CONFIG_MACH_FSG3)$(CONFIG_VARIATIONS) += variation-fsg3.o
18 obj-$(CONFIG_INTERRUPTS) += exception_vectors.o
20 obj-$(CONFIG_NPE) += npe.o npe-interface.o
21 Index: apex/src/mach-ixp42x/variation-fsg3.c
22 ===================================================================
23 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
24 +++ apex/src/mach-ixp42x/variation-fsg3.c 2008-05-28 10:53:07.000000000 +0930
25 @@ -0,0 +1,40 @@
26 +/* variation-fsg3.c
28 + written by Rod Whitby
29 + 2 Jan 2008
31 + based on variation-nslu2.c
32 + written by Marc Singer
33 + 6 Jan 2007
35 + Copyright (C) 2007 Marc Singer
36 + Copyright (C) 2008 Rod Whitby
38 + -----------
39 + DESCRIPTION
40 + -----------
42 + Service to support variable variations on the fsg3. Essetially,
43 + this is the interface with the user to select the variation at
44 + boot-time.
46 +*/
48 +#include <config.h>
49 +#include <alias.h>
50 +#include <service.h>
51 +#include <apex.h>
53 +#include "hardware.h"
55 +static void variation_init (void)
57 + int button_pressed = (GPIO_INR & (1<<GPIO_I_SYNCBUTTON)) == 0;
59 + if (button_pressed)
60 + alias_set ("variation", CONFIG_VARIATION_SUFFIX);
63 +static __service_9 struct service_d variation_service = {
64 + .init = variation_init,
65 +};
66 Index: apex/src/mach-ixp42x/slugos-fsg3-armeb_config
67 ===================================================================
68 --- apex.orig/src/mach-ixp42x/slugos-fsg3-armeb_config 2008-05-28 10:52:50.000000000 +0930
69 +++ apex/src/mach-ixp42x/slugos-fsg3-armeb_config 2008-05-28 10:53:07.000000000 +0930
70 @@ -118,7 +118,8 @@
71 CONFIG_ENV_REGION="nor:0x3bc000+15k"
72 # CONFIG_ENV_SAVEATONCE is not set
73 CONFIG_ENV_CHECK_LEN=1024
74 -# CONFIG_VARIATIONS is not set
75 +CONFIG_VARIATIONS=y
76 +CONFIG_VARIATION_SUFFIX="-alt"
77 # CONFIG_NO_BOOTSTRAP is not set
78 CONFIG_NOR_BOOT=y
79 # CONFIG_NAND_BOOT is not set
80 @@ -139,13 +140,18 @@
81 # Regions
83 CONFIG_ENV_REGION_KERNEL="fis://kern1"
84 +CONFIG_ENV_REGION_KERNEL_ALT_P=y
85 +CONFIG_ENV_REGION_KERNEL_ALT="fis://kern2"
88 # Overrides
90 CONFIG_ENV_DEFAULT_CMDLINE_OVERRIDE=y
91 -CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/hda1 console=ttyS0,115200"
92 +CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/hda1 rootdelay=10 console=ttyS0,115200"
93 +CONFIG_ENV_DEFAULT_CMDLINE_ALT_P=y
94 +CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/hda2 rootdelay=10 console=ttyS0,115200"
95 # CONFIG_ENV_DEFAULT_STARTUP_OVERRIDE is not set
96 +# CONFIG_ENV_DEFAULT_STARTUP_ALT_P is not set
97 CONFIG_USES_NOR_BOOTFLASH=y
98 CONFIG_RELOCATE_SIMPLE=y
99 CONFIG_INLINE_PLATFORM_INITIALIZATION=y
100 Index: apex/src/mach-ixp42x/slugos-fsg3-arm_config
101 ===================================================================
102 --- apex.orig/src/mach-ixp42x/slugos-fsg3-arm_config 2008-05-28 10:52:58.000000000 +0930
103 +++ apex/src/mach-ixp42x/slugos-fsg3-arm_config 2008-05-28 10:53:07.000000000 +0930
104 @@ -118,7 +118,8 @@
105 CONFIG_ENV_REGION="nor:0x3bc000+15k"
106 # CONFIG_ENV_SAVEATONCE is not set
107 CONFIG_ENV_CHECK_LEN=1024
108 -# CONFIG_VARIATIONS is not set
109 +CONFIG_VARIATIONS=y
110 +CONFIG_VARIATION_SUFFIX="-alt"
111 # CONFIG_NO_BOOTSTRAP is not set
112 CONFIG_NOR_BOOT=y
113 # CONFIG_NAND_BOOT is not set
114 @@ -139,13 +140,18 @@
115 # Regions
117 CONFIG_ENV_REGION_KERNEL="fis://kern1"
118 +CONFIG_ENV_REGION_KERNEL_ALT_P=y
119 +CONFIG_ENV_REGION_KERNEL_ALT="fis://kern2"
122 # Overrides
124 CONFIG_ENV_DEFAULT_CMDLINE_OVERRIDE=y
125 -CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/hda1 console=ttyS0,115200"
126 +CONFIG_ENV_DEFAULT_CMDLINE="root=/dev/hda1 rootdelay=10 console=ttyS0,115200"
127 +CONFIG_ENV_DEFAULT_CMDLINE_ALT_P=y
128 +CONFIG_ENV_DEFAULT_CMDLINE_ALT="root=/dev/hda2 rootdelay=10 console=ttyS0,115200"
129 # CONFIG_ENV_DEFAULT_STARTUP_OVERRIDE is not set
130 +# CONFIG_ENV_DEFAULT_STARTUP_ALT_P is not set
131 CONFIG_USES_NOR_BOOTFLASH=y
132 CONFIG_RELOCATE_SIMPLE=y
133 CONFIG_INLINE_PLATFORM_INITIALIZATION=y