aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@snapgear.com>2007-07-25 08:07:20 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-25 14:05:01 -0400
commitbc72450aebe73587f80bbae8fc0b62c3d81b85fe (patch)
tree90bd852d171be66736a9ae9e2acca07586ec3d4d
parent020f9e16c306f929382ad81e5a0ecf4f41887616 (diff)
m68knommu: make BOOTPARAM setup common
Currently most of the m68knommu cpu/board setup files are handling the setup of fixed boot parameters (via CONFIG_BOOTPARAM) themselves. Move all this into the common setup code. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/m68knommu/kernel/setup.c5
-rw-r--r--arch/m68knommu/platform/5206/config.c8
-rw-r--r--arch/m68knommu/platform/5206e/config.c7
-rw-r--r--arch/m68knommu/platform/520x/config.c7
-rw-r--r--arch/m68knommu/platform/523x/config.c8
-rw-r--r--arch/m68knommu/platform/5249/config.c8
-rw-r--r--arch/m68knommu/platform/5272/config.c7
-rw-r--r--arch/m68knommu/platform/527x/config.c8
-rw-r--r--arch/m68knommu/platform/528x/config.c8
-rw-r--r--arch/m68knommu/platform/5307/config.c7
-rw-r--r--arch/m68knommu/platform/532x/config.c5
-rw-r--r--arch/m68knommu/platform/5407/config.c7
-rw-r--r--arch/m68knommu/platform/68VZ328/config.c7
13 files changed, 9 insertions, 83 deletions
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index 2203f694f26b..a5ac0d40fbec 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -132,6 +132,11 @@ void setup_arch(char **cmdline_p)
132 132
133 config_BSP(&command_line[0], sizeof(command_line)); 133 config_BSP(&command_line[0], sizeof(command_line));
134 134
135#if defined(CONFIG_BOOTPARAM)
136 strncpy(&command_line[0], CONFIG_BOOTPARAM_STRING, sizeof(command_line));
137 command_line[sizeof(command_line) - 1] = 0;
138#endif
139
135 printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU "\n"); 140 printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU "\n");
136 141
137#ifdef CONFIG_UCDIMM 142#ifdef CONFIG_UCDIMM
diff --git a/arch/m68knommu/platform/5206/config.c b/arch/m68knommu/platform/5206/config.c
index 3343830aad10..d265ed4e5afc 100644
--- a/arch/m68knommu/platform/5206/config.c
+++ b/arch/m68knommu/platform/5206/config.c
@@ -98,14 +98,6 @@ int mcf_timerirqpending(int timer)
98void config_BSP(char *commandp, int size) 98void config_BSP(char *commandp, int size)
99{ 99{
100 mcf_setimr(MCFSIM_IMR_MASKALL); 100 mcf_setimr(MCFSIM_IMR_MASKALL);
101
102#if defined(CONFIG_BOOTPARAM)
103 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
104 commandp[size-1] = 0;
105#else
106 memset(commandp, 0, size);
107#endif
108
109 mach_sched_init = coldfire_timer_init; 101 mach_sched_init = coldfire_timer_init;
110 mach_tick = coldfire_tick; 102 mach_tick = coldfire_tick;
111 mach_gettimeoffset = coldfire_timer_offset; 103 mach_gettimeoffset = coldfire_timer_offset;
diff --git a/arch/m68knommu/platform/5206e/config.c b/arch/m68knommu/platform/5206e/config.c
index 0f67320b4031..7fa5e8254c31 100644
--- a/arch/m68knommu/platform/5206e/config.c
+++ b/arch/m68knommu/platform/5206e/config.c
@@ -98,15 +98,10 @@ void config_BSP(char *commandp, int size)
98{ 98{
99 mcf_setimr(MCFSIM_IMR_MASKALL); 99 mcf_setimr(MCFSIM_IMR_MASKALL);
100 100
101#if defined(CONFIG_BOOTPARAM) 101#if defined(CONFIG_NETtel)
102 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
103 commandp[size-1] = 0;
104#elif defined(CONFIG_NETtel)
105 /* Copy command line from FLASH to local buffer... */ 102 /* Copy command line from FLASH to local buffer... */
106 memcpy(commandp, (char *) 0xf0004000, size); 103 memcpy(commandp, (char *) 0xf0004000, size);
107 commandp[size-1] = 0; 104 commandp[size-1] = 0;
108#else
109 memset(commandp, 0, size);
110#endif /* CONFIG_NETtel */ 105#endif /* CONFIG_NETtel */
111 106
112 mach_sched_init = coldfire_timer_init; 107 mach_sched_init = coldfire_timer_init;
diff --git a/arch/m68knommu/platform/520x/config.c b/arch/m68knommu/platform/520x/config.c
index 58b2878deb61..85830f9882f3 100644
--- a/arch/m68knommu/platform/520x/config.c
+++ b/arch/m68knommu/platform/520x/config.c
@@ -48,13 +48,6 @@ void mcf_autovector(unsigned int vec)
48 48
49void config_BSP(char *commandp, int size) 49void config_BSP(char *commandp, int size)
50{ 50{
51#ifdef CONFIG_BOOTPARAM
52 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
53 commandp[size-1] = 0;
54#else
55 memset(commandp, 0, size);
56#endif
57
58 mach_sched_init = coldfire_pit_init; 51 mach_sched_init = coldfire_pit_init;
59 mach_tick = coldfire_pit_tick; 52 mach_tick = coldfire_pit_tick;
60 mach_gettimeoffset = coldfire_pit_offset; 53 mach_gettimeoffset = coldfire_pit_offset;
diff --git a/arch/m68knommu/platform/523x/config.c b/arch/m68knommu/platform/523x/config.c
index 9b054e6caee2..c0157e110035 100644
--- a/arch/m68knommu/platform/523x/config.c
+++ b/arch/m68knommu/platform/523x/config.c
@@ -63,14 +63,6 @@ void mcf_autovector(unsigned int vec)
63void config_BSP(char *commandp, int size) 63void config_BSP(char *commandp, int size)
64{ 64{
65 mcf_disableall(); 65 mcf_disableall();
66
67#ifdef CONFIG_BOOTPARAM
68 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
69 commandp[size-1] = 0;
70#else
71 memset(commandp, 0, size);
72#endif
73
74 mach_sched_init = coldfire_pit_init; 66 mach_sched_init = coldfire_pit_init;
75 mach_tick = coldfire_pit_tick; 67 mach_tick = coldfire_pit_tick;
76 mach_gettimeoffset = coldfire_pit_offset; 68 mach_gettimeoffset = coldfire_pit_offset;
diff --git a/arch/m68knommu/platform/5249/config.c b/arch/m68knommu/platform/5249/config.c
index d6706079d64a..4cdeb719512d 100644
--- a/arch/m68knommu/platform/5249/config.c
+++ b/arch/m68knommu/platform/5249/config.c
@@ -96,14 +96,6 @@ int mcf_timerirqpending(int timer)
96void config_BSP(char *commandp, int size) 96void config_BSP(char *commandp, int size)
97{ 97{
98 mcf_setimr(MCFSIM_IMR_MASKALL); 98 mcf_setimr(MCFSIM_IMR_MASKALL);
99
100#if defined(CONFIG_BOOTPARAM)
101 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
102 commandp[size-1] = 0;
103#else
104 memset(commandp, 0, size);
105#endif
106
107 mach_sched_init = coldfire_timer_init; 99 mach_sched_init = coldfire_timer_init;
108 mach_tick = coldfire_tick; 100 mach_tick = coldfire_tick;
109 mach_gettimeoffset = coldfire_timer_offset; 101 mach_gettimeoffset = coldfire_timer_offset;
diff --git a/arch/m68knommu/platform/5272/config.c b/arch/m68knommu/platform/5272/config.c
index 6b437cc97776..609b10e4b9b9 100644
--- a/arch/m68knommu/platform/5272/config.c
+++ b/arch/m68knommu/platform/5272/config.c
@@ -113,10 +113,7 @@ void config_BSP(char *commandp, int size)
113 113
114 mcf_disableall(); 114 mcf_disableall();
115 115
116#if defined(CONFIG_BOOTPARAM) 116#if defined(CONFIG_NETtel) || defined(CONFIG_SCALES)
117 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
118 commandp[size-1] = 0;
119#elif defined(CONFIG_NETtel) || defined(CONFIG_SCALES)
120 /* Copy command line from FLASH to local buffer... */ 117 /* Copy command line from FLASH to local buffer... */
121 memcpy(commandp, (char *) 0xf0004000, size); 118 memcpy(commandp, (char *) 0xf0004000, size);
122 commandp[size-1] = 0; 119 commandp[size-1] = 0;
@@ -128,8 +125,6 @@ void config_BSP(char *commandp, int size)
128 /* Copy command line from FLASH to local buffer... */ 125 /* Copy command line from FLASH to local buffer... */
129 memcpy(commandp, (char *) 0xf0010000, size); 126 memcpy(commandp, (char *) 0xf0010000, size);
130 commandp[size-1] = 0; 127 commandp[size-1] = 0;
131#else
132 memset(commandp, 0, size);
133#endif 128#endif
134 129
135 mcf_timervector = 69; 130 mcf_timervector = 69;
diff --git a/arch/m68knommu/platform/527x/config.c b/arch/m68knommu/platform/527x/config.c
index 28e7d964eef1..126dac066482 100644
--- a/arch/m68knommu/platform/527x/config.c
+++ b/arch/m68knommu/platform/527x/config.c
@@ -63,14 +63,6 @@ void mcf_autovector(unsigned int vec)
63void config_BSP(char *commandp, int size) 63void config_BSP(char *commandp, int size)
64{ 64{
65 mcf_disableall(); 65 mcf_disableall();
66
67#ifdef CONFIG_BOOTPARAM
68 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
69 commandp[size-1] = 0;
70#else
71 memset(commandp, 0, size);
72#endif
73
74 mach_sched_init = coldfire_pit_init; 66 mach_sched_init = coldfire_pit_init;
75 mach_tick = coldfire_pit_tick; 67 mach_tick = coldfire_pit_tick;
76 mach_gettimeoffset = coldfire_pit_offset; 68 mach_gettimeoffset = coldfire_pit_offset;
diff --git a/arch/m68knommu/platform/528x/config.c b/arch/m68knommu/platform/528x/config.c
index 805b4f74ff19..aab1ef0c1f78 100644
--- a/arch/m68knommu/platform/528x/config.c
+++ b/arch/m68knommu/platform/528x/config.c
@@ -63,14 +63,6 @@ void mcf_autovector(unsigned int vec)
63void config_BSP(char *commandp, int size) 63void config_BSP(char *commandp, int size)
64{ 64{
65 mcf_disableall(); 65 mcf_disableall();
66
67#ifdef CONFIG_BOOTPARAM
68 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
69 commandp[size-1] = 0;
70#else
71 memset(commandp, 0, size);
72#endif
73
74 mach_sched_init = coldfire_pit_init; 66 mach_sched_init = coldfire_pit_init;
75 mach_tick = coldfire_pit_tick; 67 mach_tick = coldfire_pit_tick;
76 mach_gettimeoffset = coldfire_pit_offset; 68 mach_gettimeoffset = coldfire_pit_offset;
diff --git a/arch/m68knommu/platform/5307/config.c b/arch/m68knommu/platform/5307/config.c
index e04b84deb57d..1f10e941b87c 100644
--- a/arch/m68knommu/platform/5307/config.c
+++ b/arch/m68knommu/platform/5307/config.c
@@ -111,10 +111,7 @@ void config_BSP(char *commandp, int size)
111{ 111{
112 mcf_setimr(MCFSIM_IMR_MASKALL); 112 mcf_setimr(MCFSIM_IMR_MASKALL);
113 113
114#if defined(CONFIG_BOOTPARAM) 114#if defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \
115 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
116 commandp[size-1] = 0;
117#elif defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \
118 defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3) || \ 115 defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3) || \
119 defined(CONFIG_CLEOPATRA) 116 defined(CONFIG_CLEOPATRA)
120 /* Copy command line from FLASH to local buffer... */ 117 /* Copy command line from FLASH to local buffer... */
@@ -124,8 +121,6 @@ void config_BSP(char *commandp, int size)
124 mcf_timervector = 30; 121 mcf_timervector = 30;
125 mcf_profilevector = 31; 122 mcf_profilevector = 31;
126 mcf_timerlevel = 6; 123 mcf_timerlevel = 6;
127#else
128 memset(commandp, 0, size);
129#endif 124#endif
130 125
131 mach_sched_init = coldfire_timer_init; 126 mach_sched_init = coldfire_timer_init;
diff --git a/arch/m68knommu/platform/532x/config.c b/arch/m68knommu/platform/532x/config.c
index 664c3a12b0c1..dc39c466e33f 100644
--- a/arch/m68knommu/platform/532x/config.c
+++ b/arch/m68knommu/platform/532x/config.c
@@ -92,10 +92,7 @@ void config_BSP(char *commandp, int size)
92{ 92{
93 mcf_setimr(MCFSIM_IMR_MASKALL); 93 mcf_setimr(MCFSIM_IMR_MASKALL);
94 94
95#if defined(CONFIG_BOOTPARAM) 95#if !defined(CONFIG_BOOTPARAM)
96 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
97 commandp[size-1] = 0;
98#else
99 /* Copy command line from FLASH to local buffer... */ 96 /* Copy command line from FLASH to local buffer... */
100 memcpy(commandp, (char *) 0x4000, 4); 97 memcpy(commandp, (char *) 0x4000, 4);
101 if(strncmp(commandp, "kcl ", 4) == 0){ 98 if(strncmp(commandp, "kcl ", 4) == 0){
diff --git a/arch/m68knommu/platform/5407/config.c b/arch/m68knommu/platform/5407/config.c
index 036f62876241..fde417fdd650 100644
--- a/arch/m68knommu/platform/5407/config.c
+++ b/arch/m68knommu/platform/5407/config.c
@@ -102,13 +102,6 @@ void config_BSP(char *commandp, int size)
102{ 102{
103 mcf_setimr(MCFSIM_IMR_MASKALL); 103 mcf_setimr(MCFSIM_IMR_MASKALL);
104 104
105#if defined(CONFIG_BOOTPARAM)
106 strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
107 commandp[size-1] = 0;
108#else
109 memset(commandp, 0, size);
110#endif
111
112#if defined(CONFIG_CLEOPATRA) 105#if defined(CONFIG_CLEOPATRA)
113 /* Different timer setup - to prevent device clash */ 106 /* Different timer setup - to prevent device clash */
114 mcf_timervector = 30; 107 mcf_timervector = 30;
diff --git a/arch/m68knommu/platform/68VZ328/config.c b/arch/m68knommu/platform/68VZ328/config.c
index 8abe0f6e7235..79dced929c97 100644
--- a/arch/m68knommu/platform/68VZ328/config.c
+++ b/arch/m68knommu/platform/68VZ328/config.c
@@ -191,13 +191,6 @@ void config_BSP(char *command, int size)
191{ 191{
192 printk(KERN_INFO "68VZ328 DragonBallVZ support (c) 2001 Lineo, Inc.\n"); 192 printk(KERN_INFO "68VZ328 DragonBallVZ support (c) 2001 Lineo, Inc.\n");
193 193
194#if defined(CONFIG_BOOTPARAM)
195 strncpy(command, CONFIG_BOOTPARAM_STRING, size);
196 command[size-1] = 0;
197#else
198 memset(command, 0, size);
199#endif
200
201 init_hardware(command, size); 194 init_hardware(command, size);
202 195
203 mach_sched_init = (void *) m68328_timer_init; 196 mach_sched_init = (void *) m68328_timer_init;