diff options
Diffstat (limited to 'arch/mips/mips-boards/generic/init.c')
-rw-r--r-- | arch/mips/mips-boards/generic/init.c | 62 |
1 files changed, 44 insertions, 18 deletions
diff --git a/arch/mips/mips-boards/generic/init.c b/arch/mips/mips-boards/generic/init.c index 88e9c2a7a2f9..4eabc1eadd23 100644 --- a/arch/mips/mips-boards/generic/init.c +++ b/arch/mips/mips-boards/generic/init.c | |||
@@ -57,7 +57,8 @@ int *_prom_argv, *_prom_envp; | |||
57 | 57 | ||
58 | int init_debug = 0; | 58 | int init_debug = 0; |
59 | 59 | ||
60 | unsigned int mips_revision_corid; | 60 | int mips_revision_corid; |
61 | int mips_revision_sconid; | ||
61 | 62 | ||
62 | /* Bonito64 system controller register base. */ | 63 | /* Bonito64 system controller register base. */ |
63 | unsigned long _pcictrl_bonito; | 64 | unsigned long _pcictrl_bonito; |
@@ -275,13 +276,38 @@ void __init prom_init(void) | |||
275 | else | 276 | else |
276 | mips_revision_corid = MIPS_REVISION_CORID_CORE_EMUL_MSC; | 277 | mips_revision_corid = MIPS_REVISION_CORID_CORE_EMUL_MSC; |
277 | } | 278 | } |
278 | switch(mips_revision_corid) { | 279 | |
280 | mips_revision_sconid = MIPS_REVISION_SCONID; | ||
281 | if (mips_revision_sconid == MIPS_REVISION_SCON_OTHER) { | ||
282 | switch (mips_revision_corid) { | ||
283 | case MIPS_REVISION_CORID_QED_RM5261: | ||
284 | case MIPS_REVISION_CORID_CORE_LV: | ||
285 | case MIPS_REVISION_CORID_CORE_FPGA: | ||
286 | case MIPS_REVISION_CORID_CORE_FPGAR2: | ||
287 | mips_revision_sconid = MIPS_REVISION_SCON_GT64120; | ||
288 | break; | ||
289 | case MIPS_REVISION_CORID_CORE_EMUL_BON: | ||
290 | case MIPS_REVISION_CORID_BONITO64: | ||
291 | case MIPS_REVISION_CORID_CORE_20K: | ||
292 | mips_revision_sconid = MIPS_REVISION_SCON_BONITO; | ||
293 | break; | ||
294 | case MIPS_REVISION_CORID_CORE_MSC: | ||
295 | case MIPS_REVISION_CORID_CORE_FPGA2: | ||
296 | case MIPS_REVISION_CORID_CORE_FPGA3: | ||
297 | case MIPS_REVISION_CORID_CORE_24K: | ||
298 | case MIPS_REVISION_CORID_CORE_EMUL_MSC: | ||
299 | mips_revision_sconid = MIPS_REVISION_SCON_SOCIT; | ||
300 | break; | ||
301 | default: | ||
302 | mips_display_message("CC Error"); | ||
303 | while (1); /* We die here... */ | ||
304 | } | ||
305 | } | ||
306 | |||
307 | switch (mips_revision_sconid) { | ||
279 | u32 start, map, mask, data; | 308 | u32 start, map, mask, data; |
280 | 309 | ||
281 | case MIPS_REVISION_CORID_QED_RM5261: | 310 | case MIPS_REVISION_SCON_GT64120: |
282 | case MIPS_REVISION_CORID_CORE_LV: | ||
283 | case MIPS_REVISION_CORID_CORE_FPGA: | ||
284 | case MIPS_REVISION_CORID_CORE_FPGAR2: | ||
285 | /* | 311 | /* |
286 | * Setup the North bridge to do Master byte-lane swapping | 312 | * Setup the North bridge to do Master byte-lane swapping |
287 | * when running in bigendian. | 313 | * when running in bigendian. |
@@ -305,9 +331,7 @@ void __init prom_init(void) | |||
305 | set_io_port_base(MALTA_GT_PORT_BASE); | 331 | set_io_port_base(MALTA_GT_PORT_BASE); |
306 | break; | 332 | break; |
307 | 333 | ||
308 | case MIPS_REVISION_CORID_CORE_EMUL_BON: | 334 | case MIPS_REVISION_SCON_BONITO: |
309 | case MIPS_REVISION_CORID_BONITO64: | ||
310 | case MIPS_REVISION_CORID_CORE_20K: | ||
311 | _pcictrl_bonito_pcicfg = (unsigned long)ioremap(BONITO_PCICFG_BASE, BONITO_PCICFG_SIZE); | 335 | _pcictrl_bonito_pcicfg = (unsigned long)ioremap(BONITO_PCICFG_BASE, BONITO_PCICFG_SIZE); |
312 | 336 | ||
313 | /* | 337 | /* |
@@ -334,13 +358,10 @@ void __init prom_init(void) | |||
334 | set_io_port_base(MALTA_BONITO_PORT_BASE); | 358 | set_io_port_base(MALTA_BONITO_PORT_BASE); |
335 | break; | 359 | break; |
336 | 360 | ||
337 | case MIPS_REVISION_CORID_CORE_MSC: | 361 | case MIPS_REVISION_SCON_SOCIT: |
338 | case MIPS_REVISION_CORID_CORE_FPGA2: | 362 | case MIPS_REVISION_SCON_ROCIT: |
339 | case MIPS_REVISION_CORID_CORE_FPGA3: | ||
340 | case MIPS_REVISION_CORID_CORE_24K: | ||
341 | case MIPS_REVISION_CORID_CORE_EMUL_MSC: | ||
342 | _pcictrl_msc = (unsigned long)ioremap(MIPS_MSC01_PCI_REG_BASE, 0x2000); | 363 | _pcictrl_msc = (unsigned long)ioremap(MIPS_MSC01_PCI_REG_BASE, 0x2000); |
343 | 364 | mips_pci_controller: | |
344 | mb(); | 365 | mb(); |
345 | MSC_READ(MSC01_PCI_CFG, data); | 366 | MSC_READ(MSC01_PCI_CFG, data); |
346 | MSC_WRITE(MSC01_PCI_CFG, data & ~MSC01_PCI_CFG_EN_BIT); | 367 | MSC_WRITE(MSC01_PCI_CFG, data & ~MSC01_PCI_CFG_EN_BIT); |
@@ -374,10 +395,15 @@ void __init prom_init(void) | |||
374 | set_io_port_base(MALTA_MSC_PORT_BASE); | 395 | set_io_port_base(MALTA_MSC_PORT_BASE); |
375 | break; | 396 | break; |
376 | 397 | ||
398 | case MIPS_REVISION_SCON_SOCITSC: | ||
399 | case MIPS_REVISION_SCON_SOCITSCP: | ||
400 | _pcictrl_msc = (unsigned long)ioremap(MIPS_SOCITSC_PCI_REG_BASE, 0x2000); | ||
401 | goto mips_pci_controller; | ||
402 | |||
377 | default: | 403 | default: |
378 | /* Unknown Core card */ | 404 | /* Unknown system controller */ |
379 | mips_display_message("CC Error"); | 405 | mips_display_message("SC Error"); |
380 | while(1); /* We die here... */ | 406 | while (1); /* We die here... */ |
381 | } | 407 | } |
382 | #endif | 408 | #endif |
383 | board_nmi_handler_setup = mips_nmi_setup; | 409 | board_nmi_handler_setup = mips_nmi_setup; |