diff options
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/bcm47xx/setup.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c index 87a305536604..c95f90bf734c 100644 --- a/arch/mips/bcm47xx/setup.c +++ b/arch/mips/bcm47xx/setup.c | |||
@@ -169,12 +169,28 @@ static int bcm47xx_get_invariants(struct ssb_bus *bus, | |||
169 | void __init plat_mem_setup(void) | 169 | void __init plat_mem_setup(void) |
170 | { | 170 | { |
171 | int err; | 171 | int err; |
172 | char buf[100]; | ||
173 | struct ssb_mipscore *mcore; | ||
172 | 174 | ||
173 | err = ssb_bus_ssbbus_register(&ssb_bcm47xx, SSB_ENUM_BASE, | 175 | err = ssb_bus_ssbbus_register(&ssb_bcm47xx, SSB_ENUM_BASE, |
174 | bcm47xx_get_invariants); | 176 | bcm47xx_get_invariants); |
175 | if (err) | 177 | if (err) |
176 | panic("Failed to initialize SSB bus (err %d)\n", err); | 178 | panic("Failed to initialize SSB bus (err %d)\n", err); |
177 | 179 | ||
180 | mcore = &ssb_bcm47xx.mipscore; | ||
181 | if (nvram_getenv("kernel_args", buf, sizeof(buf)) >= 0) { | ||
182 | if (strstr(buf, "console=ttyS1")) { | ||
183 | struct ssb_serial_port port; | ||
184 | |||
185 | printk(KERN_DEBUG "Swapping serial ports!\n"); | ||
186 | /* swap serial ports */ | ||
187 | memcpy(&port, &mcore->serial_ports[0], sizeof(port)); | ||
188 | memcpy(&mcore->serial_ports[0], &mcore->serial_ports[1], | ||
189 | sizeof(port)); | ||
190 | memcpy(&mcore->serial_ports[1], &port, sizeof(port)); | ||
191 | } | ||
192 | } | ||
193 | |||
178 | _machine_restart = bcm47xx_machine_restart; | 194 | _machine_restart = bcm47xx_machine_restart; |
179 | _machine_halt = bcm47xx_machine_halt; | 195 | _machine_halt = bcm47xx_machine_halt; |
180 | pm_power_off = bcm47xx_machine_halt; | 196 | pm_power_off = bcm47xx_machine_halt; |