diff options
author | Prarit Bhargava <prarit@sgi.com> | 2006-03-08 13:30:18 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2006-03-24 16:13:06 -0500 |
commit | f90aa8c4febb306e1266e1ad34fd8464e201aa7f (patch) | |
tree | 01df1912a309560098bb6e49c39f4bcba4a3b0cb /arch/ia64/sn/kernel | |
parent | b17ea91a43ea0c746ab4cabb698275e1771ed23d (diff) |
[IA64] Tollhouse HP: IA64 arch changes
arch/ia64/sn and include/asm-ia64/sn changes required to support Tollhouse
system PCI hotplug, fixes the ia64_sn_sysctl_ioboard_get call, and introduces
the PRF_HOTPLUG_SUPPORT feature bit.
Signed-off-by: Prarit Bhargava <prarit@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/sn/kernel')
-rw-r--r-- | arch/ia64/sn/kernel/io_init.c | 29 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/tiocx.c | 10 |
2 files changed, 37 insertions, 2 deletions
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index dfb3f2902379..5101ac462643 100644 --- a/arch/ia64/sn/kernel/io_init.c +++ b/arch/ia64/sn/kernel/io_init.c | |||
@@ -13,6 +13,8 @@ | |||
13 | #include <asm/sn/sn_feature_sets.h> | 13 | #include <asm/sn/sn_feature_sets.h> |
14 | #include <asm/sn/geo.h> | 14 | #include <asm/sn/geo.h> |
15 | #include <asm/sn/io.h> | 15 | #include <asm/sn/io.h> |
16 | #include <asm/sn/l1.h> | ||
17 | #include <asm/sn/module.h> | ||
16 | #include <asm/sn/pcibr_provider.h> | 18 | #include <asm/sn/pcibr_provider.h> |
17 | #include <asm/sn/pcibus_provider_defs.h> | 19 | #include <asm/sn/pcibus_provider_defs.h> |
18 | #include <asm/sn/pcidev.h> | 20 | #include <asm/sn/pcidev.h> |
@@ -710,9 +712,36 @@ cnodeid_get_geoid(cnodeid_t cnode) | |||
710 | return hubdev->hdi_geoid; | 712 | return hubdev->hdi_geoid; |
711 | } | 713 | } |
712 | 714 | ||
715 | void sn_generate_path(struct pci_bus *pci_bus, char *address) | ||
716 | { | ||
717 | nasid_t nasid; | ||
718 | cnodeid_t cnode; | ||
719 | geoid_t geoid; | ||
720 | moduleid_t moduleid; | ||
721 | u16 bricktype; | ||
722 | |||
723 | nasid = NASID_GET(SN_PCIBUS_BUSSOFT(pci_bus)->bs_base); | ||
724 | cnode = nasid_to_cnodeid(nasid); | ||
725 | geoid = cnodeid_get_geoid(cnode); | ||
726 | moduleid = geo_module(geoid); | ||
727 | |||
728 | sprintf(address, "module_%c%c%c%c%.2d", | ||
729 | '0'+RACK_GET_CLASS(MODULE_GET_RACK(moduleid)), | ||
730 | '0'+RACK_GET_GROUP(MODULE_GET_RACK(moduleid)), | ||
731 | '0'+RACK_GET_NUM(MODULE_GET_RACK(moduleid)), | ||
732 | MODULE_GET_BTCHAR(moduleid), MODULE_GET_BPOS(moduleid)); | ||
733 | |||
734 | /* Tollhouse requires slot id to be displayed */ | ||
735 | bricktype = MODULE_GET_BTYPE(moduleid); | ||
736 | if ((bricktype == L1_BRICKTYPE_191010) || | ||
737 | (bricktype == L1_BRICKTYPE_1932)) | ||
738 | sprintf(address, "%s^%d", address, geo_slot(geoid)); | ||
739 | } | ||
740 | |||
713 | subsys_initcall(sn_pci_init); | 741 | subsys_initcall(sn_pci_init); |
714 | EXPORT_SYMBOL(sn_pci_fixup_slot); | 742 | EXPORT_SYMBOL(sn_pci_fixup_slot); |
715 | EXPORT_SYMBOL(sn_pci_unfixup_slot); | 743 | EXPORT_SYMBOL(sn_pci_unfixup_slot); |
716 | EXPORT_SYMBOL(sn_pci_controller_fixup); | 744 | EXPORT_SYMBOL(sn_pci_controller_fixup); |
717 | EXPORT_SYMBOL(sn_bus_store_sysdata); | 745 | EXPORT_SYMBOL(sn_bus_store_sysdata); |
718 | EXPORT_SYMBOL(sn_bus_free_sysdata); | 746 | EXPORT_SYMBOL(sn_bus_free_sysdata); |
747 | EXPORT_SYMBOL(sn_generate_path); | ||
diff --git a/arch/ia64/sn/kernel/tiocx.c b/arch/ia64/sn/kernel/tiocx.c index 99cb28e74295..feaf1a6e8101 100644 --- a/arch/ia64/sn/kernel/tiocx.c +++ b/arch/ia64/sn/kernel/tiocx.c | |||
@@ -369,9 +369,15 @@ static void tio_corelet_reset(nasid_t nasid, int corelet) | |||
369 | 369 | ||
370 | static int is_fpga_tio(int nasid, int *bt) | 370 | static int is_fpga_tio(int nasid, int *bt) |
371 | { | 371 | { |
372 | int ioboard_type; | 372 | u16 ioboard_type; |
373 | s64 rc; | ||
373 | 374 | ||
374 | ioboard_type = ia64_sn_sysctl_ioboard_get(nasid); | 375 | rc = ia64_sn_sysctl_ioboard_get(nasid, &ioboard_type); |
376 | if (rc) { | ||
377 | printk(KERN_WARNING "ia64_sn_sysctl_ioboard_get failed: %ld\n", | ||
378 | rc); | ||
379 | return 0; | ||
380 | } | ||
375 | 381 | ||
376 | switch (ioboard_type) { | 382 | switch (ioboard_type) { |
377 | case L1_BRICKTYPE_SA: | 383 | case L1_BRICKTYPE_SA: |