1 /* 2 * Copyright 2011-2012 Freescale Semiconductor, Inc. 3 * 4 * SPDX-License-Identifier: GPL-2.0+ 5 */ 6 7 #ifndef _FSL_SRIO_H_ 8 #define _FSL_SRIO_H_ 9 10 enum atmu_size { 11 ATMU_SIZE_4K = 0xb, 12 ATMU_SIZE_8K, 13 ATMU_SIZE_16K, 14 ATMU_SIZE_32K, 15 ATMU_SIZE_64K, 16 ATMU_SIZE_128K, 17 ATMU_SIZE_256K, 18 ATMU_SIZE_512K, 19 ATMU_SIZE_1M, 20 ATMU_SIZE_2M, 21 ATMU_SIZE_4M, 22 ATMU_SIZE_8M, 23 ATMU_SIZE_16M, 24 ATMU_SIZE_32M, 25 ATMU_SIZE_64M, 26 ATMU_SIZE_128M, 27 ATMU_SIZE_256M, 28 ATMU_SIZE_512M, 29 ATMU_SIZE_1G, 30 ATMU_SIZE_2G, 31 ATMU_SIZE_4G, 32 ATMU_SIZE_8G, 33 ATMU_SIZE_16G, 34 ATMU_SIZE_32G, 35 ATMU_SIZE_64G, 36 }; 37 38 #define atmu_size_mask(sz) (__ilog2_u64(sz) - 1) 39 #define atmu_size_bytes(x) (1ULL << ((x & 0x3f) + 1)) 40 41 extern void srio_init(void); 42 #ifdef CONFIG_FSL_CORENET 43 extern void srio_boot_master(int port); 44 extern void srio_boot_master_release_slave(int port); 45 #endif 46 #endif 47