#ifndef PLATFORM_H #define PLATFORM_H #ifndef __spidboot__ # include #endif /* * TODO * ---- * Replace ALL SP_XXX by their real linux CONFIG_XXX name !!! * */ #define PLCP_MAX_HOST (PLCP_MAX_HOST_UNICAST + \ PLCP_MAX_HOST_MULTICAST + \ PLCP_MAX_HOST_BROADCAST) #ifdef CONFIG_SLAVE # define PLCP_MAX_HOST_BROADCAST 1 # define PLCP_MAX_HOST_UNICAST 2 # define PLCP_MAX_HOST_MULTICAST 0 # define DMA_RX_POOL2_NB_BUFFER 12 # define DMA_RX_POOL1_NB_BUFFER 16 # define DMA_RX_POOL0_NB_BUFFER 128 # define DMA_TX_POOL2_NB_BUFFER 12 # define DMA_TX_POOL1_NB_BUFFER 16 # define DMA_TX_POOL0_NB_BUFFER 128 #else # define PLCP_MAX_HOST_BROADCAST 1 # define PLCP_MAX_HOST_UNICAST 64 # define PLCP_MAX_HOST_MULTICAST 4 # define DMA_RX_POOL2_NB_BUFFER 74 # define DMA_RX_POOL1_NB_BUFFER 32 # define DMA_RX_POOL0_NB_BUFFER 128 # define DMA_TX_POOL2_NB_BUFFER 74 # define DMA_TX_POOL1_NB_BUFFER 32 # define DMA_TX_POOL0_NB_BUFFER 128 #endif /* WARNING buffer must no cross a 64 KB boundary ! */ #define DMA_POOL2_BUFFER_SIZE 32768 #define DMA_POOL1_BUFFER_SIZE 4096 #define DMA_POOL0_BUFFER_SIZE 256 #define DMA_RX_POOL2_SIZE (DMA_RX_POOL2_NB_BUFFER * DMA_POOL2_BUFFER_SIZE) #define DMA_RX_POOL1_SIZE (DMA_RX_POOL1_NB_BUFFER * DMA_POOL1_BUFFER_SIZE) #define DMA_RX_POOL0_SIZE (DMA_RX_POOL0_NB_BUFFER * DMA_POOL0_BUFFER_SIZE) #define DMA_TX_POOL2_SIZE (DMA_TX_POOL2_NB_BUFFER * DMA_POOL2_BUFFER_SIZE) #define DMA_TX_POOL1_SIZE (DMA_TX_POOL1_NB_BUFFER * DMA_POOL1_BUFFER_SIZE) #define DMA_TX_POOL0_SIZE (DMA_TX_POOL0_NB_BUFFER * DMA_POOL0_BUFFER_SIZE) #define DMA_RX_POOL_SIZE (DMA_RX_POOL2_SIZE + \ DMA_RX_POOL1_SIZE + \ DMA_RX_POOL0_SIZE) #define DMA_TX_POOL_SIZE (DMA_TX_POOL2_SIZE + \ DMA_TX_POOL1_SIZE + \ DMA_TX_POOL0_SIZE) #define PLC_DMA_ZONE_SIZE (DMA_RX_POOL_SIZE + DMA_TX_POOL_SIZE ) /************************ * Part not-common. ************************/ /* Include types only if we're not using assembler */ #if !defined(__asm__) && !defined(__ASSEMBLY__) && !defined(__KERNEL__) # include "sp_types.h" #endif /* !defined(__asm__) && !defined(__ASSEMBLY__) */ #ifdef SP_SFK_WIN32 # include "sfk-win32/excalibur.h" # include "sfk-win32/flip_defs.h" # include "plc/plc_ex.h" # include "plc/plc_v1.h" # include "plc/plc_v2.h" # include "platform_tina.h" #endif /* SP_SFK_WIN32 */ #ifdef SP_FLIP # include "flip/excalibur.h" # include "flip/flip_defs.h" # include "flip/flip_common.h" # include "plc/plc_ex.h" # include "plc/plc_v1.h" # include "plc/plc_v2.h" # include "platform_tina.h" #endif /* SP_FLIP */ #ifdef CONFIG_ARCH_SPC200E # ifndef SP_CRISTINA /* DEPRECATED. Please use CONFIG_ARCH_SPC200E instead */ # define SP_CRISTINA # endif # include "cristina/tina_g.h" # if defined(ANGELINA) || defined(PLAB) # include "cristina/angelina-board.h" # else # include "cristina/cristina-board.h" # endif # include "plc/plc_ex.h" # include "plc/plc_v1.h" # include "plc/plc_v2.h" # include "platform_tina.h" #endif /* SP_CRISTINA */ #ifdef SP_CRISTINA_EMUL # include "cristina-emul/tina_g.h" # include "cristina-emul/cristina-emul-board.h" # include "platform_tina.h" #endif /* SP_CRISTINA_EMUL */ #ifdef CONFIG_ARCH_SPC200C # ifndef SP_LISA /* DEPRECATED. Please use CONFIG_ARCH_SPC200C instead */ # define SP_LISA # endif # include "lisa/lisa.h" # ifdef CONFIG_MONA # include "lisa/mona-board.h" # endif # include "plc/plc_ex.h" # include "plc/plc_v1_lisa.h" # include "plc/plc_v2_lisa.h" # include "platform_lisa.h" #endif /* SP_SPC2XXC */ #ifdef CONFIG_ARCH_MSE500 # include "mse500/mse500.h" #ifdef CONFIG_MACH_MSE500DINI_200 # include "mse500/mse500dini_200-board.h" #elif defined (CONFIG_MACH_MSE500_200) # include "mse500/msk500-ddr2-board.h" #endif # include "plc/plc_ex.h" # include "plc/plc_v1_mse500.h" # include "plc/plc_v2_mse500.h" # include "platform_mse500.h" #endif /* CONFIG_ARCH_MSE500 */ #endif /* PLATFORM_H */