/u-boot/include/linux/ |
A D | log2.h | 27 int __ilog2_u32(u32 n) in __ilog2_u32() argument 29 return fls(n) - 1; in __ilog2_u32() 35 int __ilog2_u64(u64 n) in __ilog2_u64() argument 37 return fls64(n) - 1; in __ilog2_u64() 52 return (n != 0 && ((n & (n - 1)) == 0)); in is_power_of_2() 85 #define ilog2(n) \ argument 88 (n) < 2 ? 0 : \ 154 __ilog2_u64(n) \ 168 (n == 1) ? 1 : \ 192 return n > 1 ? ilog2(n - 1) + 1 : 0; in __order_base_2() [all …]
|
/u-boot/tools/omap/ |
A D | clocks_get_m_n.c | 53 u32 m, n; in get_m_n_optimized() local 54 n = 1; in get_m_n_optimized() 59 freq = ref_freq_khz * 2 * m / n; in get_m_n_optimized() 71 n_optimal = n; in get_m_n_optimized() 73 n++; in get_m_n_optimized() 75 ((ref_freq_khz / n) < 1000)) { in get_m_n_optimized() 79 n--; in get_m_n_optimized() 89 u32 m, n; in main() local 91 get_m_n_optimized(2000000, 12000, &m, &n); in main() 92 get_m_n_optimized(2000000, 13000, &m, &n); in main() [all …]
|
/u-boot/arch/arm/include/asm/arch-rockchip/ |
A D | sdram_common.h | 30 #define UART_INFO_ID(n) (((n) >> 28) & 0xf) argument 31 #define UART_INFO_IOMUX(n) (((n) >> 24) & 0xf) argument 32 #define UART_INFO_BAUD(n) ((n) & 0xffffff) argument 35 #define STANDBY_IDLE(n) ((n) & 0xffff) argument 37 #define SR_INFO(n) (((n) >> 16) & 0xffff) argument 38 #define PD_INFO(n) ((n) & 0xffff) argument 40 #define FIRST_SCAN_CH(n) (((n) >> 28) & 0xf) argument 41 #define CHANNEL_MASK(n) (((n) >> 24) & 0xf) argument 42 #define STRIDE_TYPE(n) (((n) >> 16) & 0xff) argument 44 #define DDR_2T_INFO(n) ((n) & 1) argument [all …]
|
A D | sdram_px30.h | 19 #define PMUGRF_OS_REG(n) (PMUGRF_OS_REG0 + (n) * 4) argument 22 #define DDR_GRF_CON(n) (0 + (n) * 4) argument 24 #define DDR_GRF_STATUS(n) (DDR_GRF_STATUS_BASE + (n) * 4) argument 42 #define PB(n) ((0x1 << (15 + 16)) | ((n) << 15)) argument 44 #define FBDIV(n) ((0xFFF << 16) | (n)) argument 48 #define RST(n) ((0x1 << (14 + 16)) | ((n) << 14)) argument 49 #define PD(n) ((0x1 << (13 + 16)) | ((n) << 13)) argument 50 #define DSMPD(n) ((0x1 << (12 + 16)) | ((n) << 12)) argument 51 #define LOCK(n) (((n) >> 10) & 0x1) argument 52 #define POSTDIV2(n) ((0x7 << (6 + 16)) | ((n) << 6)) argument [all …]
|
A D | sdram_rk3328.h | 34 #define DDR_GRF_CON(n) (0 + (n) * 4) argument 36 #define DDR_GRF_STATUS(n) (DDR_GRF_STATUS_BASE + (n) * 4) argument 62 #define PB(n) ((0x1 << (15 + 16)) | ((n) << 15)) argument 63 #define POSTDIV1(n) ((0x7 << (12 + 16)) | ((n) << 12)) argument 64 #define FBDIV(n) ((0xFFF << 16) | (n)) argument 67 #define RSTMODE(n) ((0x1 << (15 + 16)) | ((n) << 15)) argument 68 #define RST(n) ((0x1 << (14 + 16)) | ((n) << 14)) argument 69 #define PD(n) ((0x1 << (13 + 16)) | ((n) << 13)) argument 71 #define LOCK(n) (((n) >> 10) & 0x1) argument 72 #define POSTDIV2(n) ((0x7 << (6 + 16)) | ((n) << 6)) argument [all …]
|
A D | sdram_rv1126.h | 181 #define PMUGRF_OS_REG(n) (PMUGRF_OS_REG0 + (n) * 4) argument 187 #define DDR_GRF_CON(n) (0 + (n) * 4) argument 212 #define PB(n) ((0x1 << (15 + 16)) | ((n) << 15)) argument 214 #define FBDIV(n) ((0xFFF << 16) | (n)) argument 218 #define RST(n) ((0x1 << (14 + 16)) | ((n) << 14)) argument 219 #define PD(n) ((0x1 << (13 + 16)) | ((n) << 13)) argument 220 #define DSMPD(n) ((0x1 << (12 + 16)) | ((n) << 12)) argument 221 #define LOCK(n) (((n) >> 10) & 0x1) argument 222 #define POSTDIV2(n) ((0x7 << (6 + 16)) | ((n) << 6)) argument 223 #define REFDIV(n) ((0x3F << 16) | (n)) argument [all …]
|
A D | dram_spec_timing.h | 90 #define DDR3_WR(n) (((n) & 0x7) << 9) argument 97 #define DDR3_MR1_AL(n) (((n) & 0x3) << 3) argument 137 #define LPDDR2_N_WR(n) (((n) - 2) << 5) argument 212 #define LPDDR3_N_WR(n) ((n) << 5) argument 399 #define DDR4_WR_RTP(n) ((n) << 9) argument 400 #define DDR4_CL(n) ((((n) & 0xe) << 3) | ((n) & 1) << 2) argument 401 #define DDR4_DLL_RESET(n) ((n) << 8) argument 421 #define DDR4_MR2_CWL(n) ((n) << 3) argument 432 #define DDR4_RD_DBI(n) ((n) << 12) argument 433 #define DDR4_WR_DBI(n) ((n) << 11) argument [all …]
|
/u-boot/arch/mips/mach-jz47xx/include/mach/ |
A D | jz4780.h | 36 #define GPIO_PXPIN(n) (0x00 + (n) * 0x100) argument 37 #define GPIO_PXINT(n) (0x10 + (n) * 0x100) argument 38 #define GPIO_PXINTS(n) (0x14 + (n) * 0x100) argument 39 #define GPIO_PXINTC(n) (0x18 + (n) * 0x100) argument 40 #define GPIO_PXMASK(n) (0x20 + (n) * 0x100) argument 41 #define GPIO_PXMASKS(n) (0x24 + (n) * 0x100) argument 43 #define GPIO_PXPAT1(n) (0x30 + (n) * 0x100) argument 46 #define GPIO_PXPAT0(n) (0x40 + (n) * 0x100) argument 49 #define GPIO_PXFLG(n) (0x50 + (n) * 0x100) argument 51 #define GPIO_PXOEN(n) (0x60 + (n) * 0x100) argument [all …]
|
/u-boot/arch/arm/include/asm/arch-sunxi/ |
A D | prcm_sun6i.h | 15 #define __PRCM_CPUS_CFG_PRE(n) (((n) & 0x3) << 4) argument 17 #define __PRCM_CPUS_CFG_PRE_DIV(n) (((n) >> 1) - 1) argument 20 #define __PRCM_CPUS_CFG_POST(n) (((n) & 0x1f) << 8) argument 22 #define __PRCM_CPUS_CFG_POST_DIV(n) ((n) - 1) argument 25 #define __PRCM_CPUS_CFG_CLK_SRC(n) (((n) & 0x3) << 16) argument 40 #define __PRCM_APB0_RATIO(n) (((n) & 0x3) << 0) argument 42 #define __PRCM_APB0_RATIO_DIV(n) (((n) >> 1) - 1) argument 126 #define __PRCM_CLK_MOD0_M(n) (((n) & 0xf) << 0) argument 128 #define __PRCM_CLK_MOD0_M_X(n) (n - 1) argument 132 #define _PRCM_CLK_MOD0_N(n) (((n) & 0x3) << 16) argument [all …]
|
A D | p2wi.h | 24 #define __P2WI_CC_CLK(n) (((n) & 0xff) << 0) argument 26 #define __P2WI_CC_CLK_DIV(n) (((n) >> 1) - 1) argument 29 #define P2WI_CC_SDA_OUT_DELAY(n) (((n) & 0x7) << 8) argument 39 #define __P2WI_STAT_TRANS_ERR(n) (((n) & 0xff) << 8) argument 88 #define P2WI_DATA_BYTE_1(n) (((n) & 0xff) << 0) argument 90 #define P2WI_DATA_BYTE_2(n) (((n) & 0xff) << 8) argument 92 #define P2WI_DATA_BYTE_3(n) (((n) & 0xff) << 16) argument 94 #define P2WI_DATA_BYTE_4(n) (((n) & 0xff) << 24) argument 96 #define P2WI_DATA_BYTE_5(n) (((n) & 0xff) << 0) argument 98 #define P2WI_DATA_BYTE_6(n) (((n) & 0xff) << 8) argument [all …]
|
A D | dram_sun4i.h | 107 #define DRAM_DCR_IO_WIDTH(n) (((n) & 0x3) << 1) argument 111 #define DRAM_DCR_CHIP_DENSITY(n) (((n) & 0x7) << 3) argument 119 #define DRAM_DCR_BUS_WIDTH(n) (((n) & 0x7) << 6) argument 124 #define DRAM_DCR_RANK_SEL(n) (((n) & 0x3) << 10) argument 127 #define DRAM_DCR_MODE(n) (((n) & 0x3) << 13) argument 136 #define DRAM_DRR_TRFC(n) ((n) & 0xff) argument 137 #define DRAM_DRR_TREFI(n) (((n) & 0xffff) << 8) argument 140 #define DRAM_MCR_MODE_NORM(n) (((n) & 0x3) << 0) argument 142 #define DRAM_MCR_MODE_DQ_OUT(n) (((n) & 0x3) << 2) argument 152 #define DRAM_MCR_MODE_EN(n) (((n) & 0x3) << 13) argument [all …]
|
A D | clock_sun4i.h | 216 #define CCM_PLL5_CTRL_M(n) (((n) & 0x3) << 0) argument 218 #define CCM_PLL5_CTRL_M_X(n) ((n) - 1) argument 221 #define CCM_PLL5_CTRL_M1_X(n) ((n) - 1) argument 222 #define CCM_PLL5_CTRL_K(n) (((n) & 0x3) << 4) argument 225 #define CCM_PLL5_CTRL_K_X(n) ((n) - 1) argument 230 #define CCM_PLL5_CTRL_N_X(n) (n) argument 234 #define CCM_PLL5_CTRL_P_X(n) ((n) - 1) argument 239 #define CCM_PLL5_CTRL_BIAS_X(n) ((n) - 1) argument 258 #define CCM_MBUS_CTRL_M(n) (((n) & 0xf) << 0) argument 260 #define CCM_MBUS_CTRL_M_X(n) ((n) - 1) argument [all …]
|
/u-boot/arch/arm/include/asm/arch-lpc32xx/ |
A D | timer.h | 28 #define TIMER_IR_CR(n) (1 << ((n) + 4)) argument 29 #define TIMER_IR_MR(n) (1 << (n)) argument 37 #define TIMER_MCR_STOP(n) (1 << (3 * (n) + 2)) argument 38 #define TIMER_MCR_RESET(n) (1 << (3 * (n) + 1)) argument 39 #define TIMER_MCR_INTERRUPT(n) (1 << (3 * (n))) argument 42 #define TIMER_CCR_INTERRUPT(n) (1 << (3 * (n) + 2)) argument 43 #define TIMER_CCR_FALLING_EDGE(n) (1 << (3 * (n) + 1)) argument 44 #define TIMER_CCR_RISING_EDGE(n) (1 << (3 * (n))) argument 48 #define TIMER_EMR_EMC_SET(n) (0x2 << (2 * (n) + 4)) argument 51 #define TIMER_EMR_EM(n) (1 << (n)) argument [all …]
|
/u-boot/arch/x86/cpu/qemu/ |
A D | e820.c | 22 int n = 0; in install_e820_map() local 24 entries[n].addr = 0; in install_e820_map() 26 entries[n].type = E820_RAM; in install_e820_map() 27 n++; in install_e820_map() 32 n++; in install_e820_map() 42 n++; in install_e820_map() 48 n++; in install_e820_map() 53 n++; in install_e820_map() 58 n++; in install_e820_map() 65 n++; in install_e820_map() [all …]
|
/u-boot/arch/arm/mach-tegra/ |
A D | cpu.c | 133 { .n = 0, .m = 0, .p = 0 }, /* (N/A) */ 134 { .n = 0, .m = 0, .p = 0 }, /* (N/A) */ 137 { .n = 0, .m = 0, .p = 0 }, /* (N/A) */ 138 { .n = 0, .m = 0, .p = 0 }, /* (N/A) */ 141 { .n = 0, .m = 0, .p = 0 }, /* (N/A) */ 142 { .n = 0, .m = 0, .p = 0 }, /* (N/A) */ 158 { .n = 0, .m = 0, .p = 0 }, /* (N/A) */ 159 { .n = 0, .m = 0, .p = 0 }, /* (N/A) */ 162 { .n = 0, .m = 0, .p = 0 }, /* (N/A) */ 163 { .n = 0, .m = 0, .p = 0 }, /* (N/A) */ [all …]
|
/u-boot/arch/arm/mach-snapdragon/include/mach/ |
A D | sysmap-apq8016.h | 18 #define SDCC_BCR(n) ((n * 0x1000) + 0x41000) argument 19 #define SDCC_CMD_RCGR(n) ((n * 0x1000) + 0x41004) argument 20 #define SDCC_CFG_RCGR(n) ((n * 0x1000) + 0x41008) argument 21 #define SDCC_M(n) ((n * 0x1000) + 0x4100C) argument 22 #define SDCC_N(n) ((n * 0x1000) + 0x41010) argument 23 #define SDCC_D(n) ((n * 0x1000) + 0x41014) argument 24 #define SDCC_APPS_CBCR(n) ((n * 0x1000) + 0x41018) argument 25 #define SDCC_AHB_CBCR(n) ((n * 0x1000) + 0x4101C) argument
|
A D | sysmap-qcs404.h | 49 #define SDCC_BCR(n) (((n) * 0x1000) + 0x41000) argument 50 #define SDCC_CMD_RCGR(n) (((n) * 0x1000) + 0x41004) argument 51 #define SDCC_CFG_RCGR(n) (((n) * 0x1000) + 0x41008) argument 52 #define SDCC_M(n) (((n) * 0x1000) + 0x4100C) argument 53 #define SDCC_N(n) (((n) * 0x1000) + 0x41010) argument 54 #define SDCC_D(n) (((n) * 0x1000) + 0x41014) argument 55 #define SDCC_APPS_CBCR(n) (((n) * 0x1000) + 0x41018) argument 56 #define SDCC_AHB_CBCR(n) (((n) * 0x1000) + 0x4101C) argument
|
/u-boot/drivers/firmware/scmi/ |
A D | sandbox-scmi_devices.c | 58 size_t n; in sandbox_scmi_devices_remove() local 63 for (n = 0; n < SCMI_TEST_DEVICES_RD_COUNT; n++) { in sandbox_scmi_devices_remove() 77 size_t n; in sandbox_scmi_devices_probe() local 88 for (n = 0; n < SCMI_TEST_DEVICES_CLK_COUNT; n++) { in sandbox_scmi_devices_probe() 89 ret = clk_get_by_index(dev, n, priv->devices.clk + n); in sandbox_scmi_devices_probe() 96 for (n = 0; n < SCMI_TEST_DEVICES_RD_COUNT; n++) { in sandbox_scmi_devices_probe() 97 ret = reset_get_by_index(dev, n, priv->devices.reset + n); in sandbox_scmi_devices_probe() 104 for (n = 0; n < SCMI_TEST_DEVICES_VOLTD_COUNT; n++) { in sandbox_scmi_devices_probe() 111 priv->devices.regul + n); in sandbox_scmi_devices_probe() 121 n = SCMI_TEST_DEVICES_RD_COUNT; in sandbox_scmi_devices_probe() [all …]
|
/u-boot/drivers/usb/dwc3/ |
A D | core.h | 114 #define DWC3_GEVNTSIZ(n) (0xc408 + (n * 0x10)) argument 131 #define DWC3_DEPCMD(n) (0xc80c + (n * 0x10)) argument 154 #define DWC3_GCTL_PWRDNSCALE(n) ((n) << 19) argument 163 #define DWC3_GCTL_PRTCAPDIR(n) ((n) << 12) argument 170 #define DWC3_GCTL_SCALEDOWN(n) ((n) << 4) argument 189 #define DWC3_GUSB2PHYCFG_PHYIF(n) ((n) << 3) argument 278 #define DWC3_DCTL_HIRD_THRES(n) ((n) << 24) argument 284 #define DWC3_DCTL_TRGTULST(n) ((n) << 17) argument 409 #define DWC3_DALEPENA_EP(n) (1 << n) argument 620 #define DWC3_MODE(n) ((n) & 0x7) argument [all …]
|
/u-boot/include/ |
A D | fm_eth.h | 82 .num = n - 1, \ 84 .port = FM##idx##_DTSEC##n, \ 96 .num = n - 1, \ 98 .port = FM##idx##_10GEC##n, \ 110 .num = n - 1, \ 112 .port = FM##idx##_10GEC##n, \ 123 .num = n - 1, \ 125 .port = FM##idx##_10GEC##n, \ 139 .num = n - 1, \ 154 .num = n - 1, \ [all …]
|
/u-boot/drivers/phy/rockchip/ |
A D | phy-rockchip-typec.c | 118 #define XCVR_PSM_RCTRL(n) ((0x4001 | ((n) << 9)) << 2) argument 146 #define TX_PSC_A0(n) ((0x4100 | ((n) << 9)) << 2) argument 147 #define TX_PSC_A1(n) ((0x4101 | ((n) << 9)) << 2) argument 148 #define TX_PSC_A2(n) ((0x4102 | ((n) << 9)) << 2) argument 149 #define TX_PSC_A3(n) ((0x4103 | ((n) << 9)) << 2) argument 217 #define RX_PSC_A0(n) ((0x8000 | ((n) << 9)) << 2) argument 218 #define RX_PSC_A1(n) ((0x8001 | ((n) << 9)) << 2) argument 219 #define RX_PSC_A2(n) ((0x8002 | ((n) << 9)) << 2) argument 220 #define RX_PSC_A3(n) ((0x8003 | ((n) << 9)) << 2) argument 221 #define RX_PSC_CAL(n) ((0x8006 | ((n) << 9)) << 2) argument [all …]
|
/u-boot/drivers/clk/at91/ |
A D | sama7g5.c | 236 const char *n; member 400 const char *n; member 410 .n = "mck1", 421 .n = "mck2", 432 .n = "mck3", 442 .n = "mck4", 459 const char *n; member 483 const char *n; member 506 const char *n; member 597 const char *n; member [all …]
|
/u-boot/fs/btrfs/ |
A D | conv-funcs.h | 29 static inline struct n *n##_to_disk(struct n * r) \ 33 static inline struct n *n##_to_cpu(struct n * r) \ 39 static inline struct n *n##_to_disk_##a(struct n * r) \ 43 static inline struct n *n##_to_cpu_##a(struct n * r) \ 60 static inline struct n * n##_to_disk(struct n *); \ 61 static inline struct n * n##_to_cpu(struct n *); \ 62 static inline struct n n##_to_disk_v(struct n x) { \ 65 static inline struct n n##_to_cpu_v(struct n x) { \ 111 DEFINE_CONV_ONE(n,n##_to_disk,DEFINE_CONV_CPU_TO_LE,##__VA_ARGS__) \ 112 DEFINE_CONV_ONE(n,n##_to_cpu,DEFINE_CONV_LE_TO_CPU,##__VA_ARGS__) [all …]
|
/u-boot/arch/arm/include/asm/ti-common/ |
A D | davinci_nand.h | 76 #define DAVINCI_NANDFCR_NAND_ENABLE(n) (1 << ((n) - 2)) argument 78 #define DAVINCI_NANDFCR_4BIT_ECC_SEL(n) (((n) - 2) << 4) argument 79 #define DAVINCI_NANDFCR_1BIT_ECC_START(n) (1 << (8 + ((n) - 2))) argument 87 #define DAVINCI_ABCR_WSETUP(n) (n << 26) argument 88 #define DAVINCI_ABCR_WSTROBE(n) (n << 20) argument 89 #define DAVINCI_ABCR_WHOLD(n) (n << 17) argument 90 #define DAVINCI_ABCR_RSETUP(n) (n << 13) argument 91 #define DAVINCI_ABCR_RSTROBE(n) (n << 7) argument 92 #define DAVINCI_ABCR_RHOLD(n) (n << 4) argument 93 #define DAVINCI_ABCR_TA(n) (n << 2) argument
|
/u-boot/lib/efi_loader/ |
A D | efi_freestanding.c | 23 int memcmp(const void *s1, const void *s2, size_t n) in memcmp() argument 28 for (; n; --n) { in memcmp() 45 void *memmove(void *dest, const void *src, size_t n) in memmove() argument 51 for (; n; --n) in memmove() 54 d += n; in memmove() 55 s += n; in memmove() 56 for (; n; --n) in memmove() 70 void *memcpy(void *dest, const void *src, size_t n) in memcpy() argument 72 return memmove(dest, src, n); in memcpy() 83 void *memset(void *s, int c, size_t n) in memset() argument [all …]
|