/* * ************************************** * Copyright (C) LSI LOGIC, Inc. 2011 * ************************************** */ #ifndef INCLUDED_ARAPAHO_PLATFORM #define INCLUDED_ARAPAHO_PLATFORM /* * Arapaho SAS chip specific definition, changes when board uses diff SAS chip * This is for LSI SAS 3616 */ #define MAX_IOC_PHYS 16 #define MAX_IOC_GPIO_NUM 40 #define MAX_EXP_PHYS 40 #define IOC_INTERNAL_MEM_START 0xC0000000 // start of bank 0 #define IOC_INTERNAL_MEM_END 0xC01FFFFF // just end of bank 3 #define IOC_INTERNAL_MEM_END_ALL 0xC03FFFFF // end of the last bank 7 #define IOC_INTERNAL_MEM_SIZE (IOC_INTERNAL_MEM_END_ALL - IOC_INTERNAL_MEM_START + 1) /* * Atlanits Board specific definition, changes when ctrl sas hw changes */ #define NUM_HIC_ON_CTRL 1 // HIC can be attached to controller #define NUM_IOC_ON_HIC 1 // IOCs on HIC #define NUM_IOC_ON_BASE_CTRL 1 // IOCs on base ctrl board #define NUM_IOC_TOTAL (NUM_IOC_ON_HIC + NUM_IOC_ON_BASE_CTRL) #define MAX_HIC_IOC_WIDE_PORT 4 // wide-port on a HIC's IOC #define MAX_BASE_IOC_WIDE_PORT 4 // wide-port on a base ctrl's IOC #define MAX_WIDE_PORT_PER_IOC MAX_HIC_IOC_WIDE_PORT #define MAX_REMOTE_EXP_PORT 2 #define MAX_LOCAL_EXP_PORT 2 #define MAX_EXP_EXPAN_PORT 0 #define MAX_EXP_WIDE_PORT MAX_REMOTE_EXP_PORT + MAX_LOCAL_EXP_PORT + MAX_EXP_EXPAN_PORT /* * RBOB specific definitions, this def is for RBOB config that the ctrl can support */ #if defined (RBOD_EBBETS) #define MAX_DRIVES_PER_TRAY 12 #define MAX_DRIVES_PER_PATH MAX_DRIVES_PER_TRAY #define MAX_EXP_QUAD_PORT_TO_DRIVE 3 // to do: fill in exp phy conneciton #elif defined (RBOD_CAMDEN) #define MAX_DRIVES_PER_TRAY 24 #define MAX_DRIVES_PER_PATH MAX_DRIVES_PER_TRAY #define MAX_EXP_QUAD_PORT_TO_DRIVE 6 // not meaningful on Camden/Ebbet // Expander physical phy connection: TBD - wait for next board rev supporting Camden #elif defined (RBOD_WEMBLEY60) #define MAX_EXP_QUAD_PORT_TO_DRIVE 5 // wide-port connecting to drive tray #define MAX_DRIVES_PER_TRAY 12 #define MAX_DRIVES_PER_PATH 5 * MAX_DRIVES_PER_TRAY // 5 trays #define MAX_EXP_PER_PATH 6 // 5 exp on 5 wembley trays + 1 on ctrl // Expander physical phy connection: #define EXP_PHY_IS_HARD_DRIVE_PORT(x) ((x >= 12) && (x <= 31)) #define EXP_PHYSICAL_PHY_TO_LOCAL_IOC_0 0 #define EXP_PHYSICAL_PHY_TO_LOCAL_IOC_1 8 #define EXP_PHYSICAL_PHY_TO_REMOTE_IOC_1 4 //should not use now #define EXP_PHYSICAL_PHY_TO_REMOTE_IOC_2 4 #define EXP_PHYSICAL_PHY_TO_HDD_START 12 #define EXP_PHYSICAL_PHY_TO_EXPANSION 0xFF // no expansion connection #define NUM_EXP_PHYSICAL_PHY_TO_HARD_DRIVE MAX_DRIVES_PER_TRAY #elif defined (RBOD_TEST_MIDPLANE) #define MAX_EXP_QUAD_PORT_TO_DRIVE 5 // wide-port connecting to drive tray #define MAX_DRIVES_PER_TRAY 24 #define MAX_DRIVES_PER_PATH 5 * MAX_DRIVES_PER_TRAY // 5 trays #define MAX_EXP_PER_PATH 6 // 5 exp on 5 wembley trays + 1 on ctrl // Expander physical phy connection: #define EXP_PHY_IS_HARD_DRIVE_PORT(x) ((x >= 12) && (x <= 31)) #define EXP_PHYSICAL_PHY_TO_LOCAL_IOC_0 0 #define EXP_PHYSICAL_PHY_TO_LOCAL_IOC_1 8 #define EXP_PHYSICAL_PHY_TO_REMOTE_IOC_1 4 //should not use now #define EXP_PHYSICAL_PHY_TO_REMOTE_IOC_2 4 #define EXP_PHYSICAL_PHY_TO_HDD_START 12 #define EXP_PHYSICAL_PHY_TO_EXPANSION 0xFF // no expansion connection #define NUM_EXP_PHYSICAL_PHY_TO_HARD_DRIVE MAX_DRIVES_PER_TRAY // .... ADD MORE ENCL here... #else #endif // // HIC GPIO and IOC port definitions // #define GET_HIC_IOC_NUM(ioc, hicPortNum) \ { \ ((hicPortNum == 0) || (hicPortNum == 1)) ? (ioc = 3) : \ ((hicPortNum == 2) || (hicPortNum == 3)) ? (ioc = 4) : \ (ioc = 0xFF); \ } #define GET_HIC_IOC_GPIO_NUM(gpio, hicPortNum, gpioFunc) \ { \ (((hicPortNum == 0) || (hicPortNum == 2)) && (gpioFunc == 0xA)) ? (gpio = 20) : \ (((hicPortNum == 1) || (hicPortNum == 3)) && (gpioFunc == 0xB)) ? (gpio = 21) : \ (gpio = 0xFF); \ } #define SERVER_PRINT(fmt ...) #endif // include