Home
last modified time | relevance | path

Searched refs:offset (Results 1 – 25 of 880) sorted by relevance

12345678910>>...36

/rk3399_rockchip-uboot/scripts/dtc/libfdt/
H A Dfdt.c77 const void *fdt_offset_ptr(const void *fdt, int offset, unsigned int len) in fdt_offset_ptr() argument
79 unsigned absoffset = offset + fdt_off_dt_struct(fdt); in fdt_offset_ptr()
81 if ((absoffset < offset) in fdt_offset_ptr()
87 if (((offset + len) < offset) in fdt_offset_ptr()
88 || ((offset + len) > fdt_size_dt_struct(fdt))) in fdt_offset_ptr()
91 return _fdt_offset_ptr(fdt, offset); in fdt_offset_ptr()
98 int offset = startoffset; in fdt_next_tag() local
102 tagp = fdt_offset_ptr(fdt, offset, FDT_TAGSIZE); in fdt_next_tag()
106 offset += FDT_TAGSIZE; in fdt_next_tag()
113 p = fdt_offset_ptr(fdt, offset++, 1); in fdt_next_tag()
[all …]
H A Dfdt_ro.c58 static int _fdt_nodename_eq(const void *fdt, int offset, in _fdt_nodename_eq() argument
61 const char *p = fdt_offset_ptr(fdt, offset + FDT_TAGSIZE, len+1); in _fdt_nodename_eq()
94 int offset; in fdt_get_max_phandle() local
96 for (offset = fdt_next_node(fdt, -1, NULL);; in fdt_get_max_phandle()
97 offset = fdt_next_node(fdt, offset, NULL)) { in fdt_get_max_phandle()
100 if (offset == -FDT_ERR_NOTFOUND) in fdt_get_max_phandle()
103 if (offset < 0) in fdt_get_max_phandle()
106 phandle = fdt_get_phandle(fdt, offset); in fdt_get_max_phandle()
134 static int _nextprop(const void *fdt, int offset) in _nextprop() argument
140 tag = fdt_next_tag(fdt, offset, &nextoffset); in _nextprop()
[all …]
/rk3399_rockchip-uboot/drivers/gpio/
H A Dsandbox.c27 static u8 *get_gpio_flags(struct udevice *dev, unsigned offset) in get_gpio_flags() argument
32 if (offset >= uc_priv->gpio_count) { in get_gpio_flags()
34 printf("sandbox_gpio: error: invalid gpio %u\n", offset); in get_gpio_flags()
38 return &state[offset].flags; in get_gpio_flags()
41 static int get_gpio_flag(struct udevice *dev, unsigned offset, int flag) in get_gpio_flag() argument
43 return (*get_gpio_flags(dev, offset) & flag) != 0; in get_gpio_flag()
46 static int set_gpio_flag(struct udevice *dev, unsigned offset, int flag, in set_gpio_flag() argument
49 u8 *gpio = get_gpio_flags(dev, offset); in set_gpio_flag()
63 int sandbox_gpio_get_value(struct udevice *dev, unsigned offset) in sandbox_gpio_get_value() argument
65 if (get_gpio_flag(dev, offset, GPIOF_OUTPUT)) in sandbox_gpio_get_value()
[all …]
H A Dintel_ich6_gpio.c57 static int _ich6_gpio_set_value(struct ich6_bank_priv *bank, unsigned offset, in _ich6_gpio_set_value() argument
68 val |= (1UL << offset); in _ich6_gpio_set_value()
70 val &= ~(1UL << offset); in _ich6_gpio_set_value()
78 static int _ich6_gpio_set_direction(uint16_t base, unsigned offset, int dir) in _ich6_gpio_set_direction() argument
84 val |= (1UL << offset); in _ich6_gpio_set_direction()
88 val &= ~(1UL << offset); in _ich6_gpio_set_direction()
99 int offset; in gpio_ich6_ofdata_to_platdata() local
106 offset = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "reg", -1); in gpio_ich6_ofdata_to_platdata()
107 if (offset == -1) { in gpio_ich6_ofdata_to_platdata()
108 debug("%s: Invalid register offset %d\n", __func__, offset); in gpio_ich6_ofdata_to_platdata()
[all …]
H A Dintel_broadwell_gpio.c32 int offset; member
35 static int broadwell_gpio_request(struct udevice *dev, unsigned offset, in broadwell_gpio_request() argument
47 debug("%s: request bank %d offset %d: ", __func__, priv->bank, offset); in broadwell_gpio_request()
49 if (!(val & (1UL << offset))) { in broadwell_gpio_request()
58 static int broadwell_gpio_direction_input(struct udevice *dev, unsigned offset) in broadwell_gpio_direction_input() argument
63 setio_32(&regs->config[priv->offset + offset], CONFA_DIR_INPUT); in broadwell_gpio_direction_input()
68 static int broadwell_gpio_get_value(struct udevice *dev, unsigned offset) in broadwell_gpio_get_value() argument
73 return inl(&regs->config[priv->offset + offset]) & CONFA_LEVEL_HIGH ? in broadwell_gpio_get_value()
77 static int broadwell_gpio_set_value(struct udevice *dev, unsigned offset, in broadwell_gpio_set_value() argument
83 debug("%s: dev=%s, offset=%d, value=%d\n", __func__, dev->name, offset, in broadwell_gpio_set_value()
[all …]
H A Dnca9539_gpio.c76 static int nca9539_gpio_get_direction(struct udevice *dev, unsigned int offset) in nca9539_gpio_get_direction() argument
78 unsigned int port = offset / NCA9539_BANK_SZ; in nca9539_gpio_get_direction()
79 unsigned int pin = offset % NCA9539_BANK_SZ; in nca9539_gpio_get_direction()
83 dev_dbg(dev, "%s offset(%d)\n", __func__, offset); in nca9539_gpio_get_direction()
87 offset); in nca9539_gpio_get_direction()
98 unsigned int offset) in nca9539_gpio_direction_input() argument
100 unsigned int port = offset / NCA9539_BANK_SZ; in nca9539_gpio_direction_input()
101 unsigned int pin = offset % NCA9539_BANK_SZ; in nca9539_gpio_direction_input()
105 dev_dbg(dev, "%s offset(%d)\n", __func__, offset); in nca9539_gpio_direction_input()
117 offset); in nca9539_gpio_direction_input()
[all …]
H A Dgpio-uniphier.c26 static void uniphier_gpio_offset_write(struct udevice *dev, unsigned offset, in uniphier_gpio_offset_write() argument
34 tmp |= BIT(offset); in uniphier_gpio_offset_write()
36 tmp &= ~BIT(offset); in uniphier_gpio_offset_write()
40 static int uniphier_gpio_offset_read(struct udevice *dev, unsigned offset, in uniphier_gpio_offset_read() argument
45 return !!(readl(priv->base + reg) & BIT(offset)); in uniphier_gpio_offset_read()
48 static int uniphier_gpio_direction_input(struct udevice *dev, unsigned offset) in uniphier_gpio_direction_input() argument
50 uniphier_gpio_offset_write(dev, offset, UNIPHIER_GPIO_REG_DIR, 1); in uniphier_gpio_direction_input()
55 static int uniphier_gpio_direction_output(struct udevice *dev, unsigned offset, in uniphier_gpio_direction_output() argument
58 uniphier_gpio_offset_write(dev, offset, UNIPHIER_GPIO_REG_DATA, value); in uniphier_gpio_direction_output()
59 uniphier_gpio_offset_write(dev, offset, UNIPHIER_GPIO_REG_DIR, 0); in uniphier_gpio_direction_output()
[all …]
H A Dimx_rgpio2p.c35 static int imx_rgpio2p_is_output(struct gpio_regs *regs, int offset) in imx_rgpio2p_is_output() argument
41 return val & (1 << offset) ? 1 : 0; in imx_rgpio2p_is_output()
44 static void imx_rgpio2p_bank_direction(struct gpio_regs *regs, int offset, in imx_rgpio2p_bank_direction() argument
53 l |= 1 << offset; in imx_rgpio2p_bank_direction()
56 l &= ~(1 << offset); in imx_rgpio2p_bank_direction()
61 static void imx_rgpio2p_bank_set_value(struct gpio_regs *regs, int offset, in imx_rgpio2p_bank_set_value() argument
65 writel((1 << offset), &regs->gpio_psor); in imx_rgpio2p_bank_set_value()
67 writel((1 << offset), &regs->gpio_pcor); in imx_rgpio2p_bank_set_value()
70 static int imx_rgpio2p_bank_get_value(struct gpio_regs *regs, int offset) in imx_rgpio2p_bank_get_value() argument
72 return (readl(&regs->gpio_pdir) >> offset) & 0x01; in imx_rgpio2p_bank_get_value()
[all …]
H A Dbcm6345_gpio.c24 static int bcm6345_gpio_get_value(struct udevice *dev, unsigned offset) in bcm6345_gpio_get_value() argument
28 return !!(readl_be(priv->reg_data) & BIT(offset)); in bcm6345_gpio_get_value()
31 static int bcm6345_gpio_set_value(struct udevice *dev, unsigned offset, in bcm6345_gpio_set_value() argument
37 setbits_be32(priv->reg_data, BIT(offset)); in bcm6345_gpio_set_value()
39 clrbits_be32(priv->reg_data, BIT(offset)); in bcm6345_gpio_set_value()
44 static int bcm6345_gpio_set_direction(void __iomem *dirout, unsigned offset, in bcm6345_gpio_set_direction() argument
48 clrbits_be32(dirout, BIT(offset)); in bcm6345_gpio_set_direction()
50 setbits_be32(dirout, BIT(offset)); in bcm6345_gpio_set_direction()
55 static int bcm6345_gpio_direction_input(struct udevice *dev, unsigned offset) in bcm6345_gpio_direction_input() argument
59 return bcm6345_gpio_set_direction(priv->reg_dirout, offset, 1); in bcm6345_gpio_direction_input()
[all …]
H A Dtegra186_gpio.c24 uint32_t offset; member
46 static int tegra186_gpio_set_out(struct udevice *dev, unsigned offset, in tegra186_gpio_set_out() argument
52 reg = tegra186_gpio_reg(dev, TEGRA186_GPIO_OUTPUT_CONTROL, offset); in tegra186_gpio_set_out()
60 reg = tegra186_gpio_reg(dev, TEGRA186_GPIO_ENABLE_CONFIG, offset); in tegra186_gpio_set_out()
72 static int tegra186_gpio_set_val(struct udevice *dev, unsigned offset, bool val) in tegra186_gpio_set_val() argument
77 reg = tegra186_gpio_reg(dev, TEGRA186_GPIO_OUTPUT_VALUE, offset); in tegra186_gpio_set_val()
88 static int tegra186_gpio_direction_input(struct udevice *dev, unsigned offset) in tegra186_gpio_direction_input() argument
90 return tegra186_gpio_set_out(dev, offset, false); in tegra186_gpio_direction_input()
93 static int tegra186_gpio_direction_output(struct udevice *dev, unsigned offset, in tegra186_gpio_direction_output() argument
98 ret = tegra186_gpio_set_val(dev, offset, value != 0); in tegra186_gpio_direction_output()
[all …]
/rk3399_rockchip-uboot/lib/libfdt/
H A Dfdt_ro.c17 static int _fdt_nodename_eq(const void *fdt, int offset, in _fdt_nodename_eq() argument
20 const char *p = fdt_offset_ptr(fdt, offset + FDT_TAGSIZE, len+1); in _fdt_nodename_eq()
53 int offset; in fdt_get_max_phandle() local
55 for (offset = fdt_next_node(fdt, -1, NULL);; in fdt_get_max_phandle()
56 offset = fdt_next_node(fdt, offset, NULL)) { in fdt_get_max_phandle()
59 if (offset == -FDT_ERR_NOTFOUND) in fdt_get_max_phandle()
62 if (offset < 0) in fdt_get_max_phandle()
65 phandle = fdt_get_phandle(fdt, offset); in fdt_get_max_phandle()
93 static int _nextprop(const void *fdt, int offset) in _nextprop() argument
99 tag = fdt_next_tag(fdt, offset, &nextoffset); in _nextprop()
[all …]
H A Dfdt_region.c55 int offset; in fdt_find_regions() local
58 offset = nextoffset; in fdt_find_regions()
59 tag = fdt_next_tag(fdt, offset, &nextoffset); in fdt_find_regions()
65 stop_at = offset; in fdt_find_regions()
66 prop = fdt_get_property_by_offset(fdt, offset, NULL); in fdt_find_regions()
74 stop_at = offset; in fdt_find_regions()
81 name = fdt_get_name(fdt, offset, &len); in fdt_find_regions()
90 stop_at = offset; in fdt_find_regions()
96 stop_at = offset; in fdt_find_regions()
116 offset == region[count - 1].offset + in fdt_find_regions()
[all …]
/rk3399_rockchip-uboot/test/dm/
H A Dgpio.c21 unsigned int offset, gpio; in dm_test_gpio() local
34 ut_assertok(gpio_lookup_name("b4", &dev, &offset, &gpio)); in dm_test_gpio()
36 ut_asserteq(4, offset); in dm_test_gpio()
53 ut_assertok(gpio_get_status(dev, offset, buf, sizeof(buf))); in dm_test_gpio()
57 sandbox_gpio_set_direction(dev, offset, 1); in dm_test_gpio()
58 ut_assertok(gpio_get_status(dev, offset, buf, sizeof(buf))); in dm_test_gpio()
61 sandbox_gpio_set_value(dev, offset, 1); in dm_test_gpio()
62 ut_assertok(gpio_get_status(dev, offset, buf, sizeof(buf))); in dm_test_gpio()
66 ut_assertok(gpio_get_status(dev, offset, buf, sizeof(buf))); in dm_test_gpio()
70 ut_asserteq(1, ops->get_value(dev, offset)); in dm_test_gpio()
[all …]
/rk3399_rockchip-uboot/arch/arm/cpu/armv7/ls102xa/
H A Dfsl_epu.c163 while (data->offset != FSM_END_FLAG) { in fsl_epu_setup()
164 out_be32(epu_base + data->offset, data->value); in fsl_epu_setup()
174 u32 offset; in fsl_epu_clean() local
178 for (offset = EPACR0; offset <= EPACR15; offset += EPACR_STRIDE) in fsl_epu_clean()
179 out_be32(epu_base + offset, 0); in fsl_epu_clean()
182 for (offset = EPEVTCR0; offset <= EPEVTCR9; offset += EPEVTCR_STRIDE) in fsl_epu_clean()
183 out_be32(epu_base + offset, 0); in fsl_epu_clean()
189 for (offset = EPSMCR0; offset <= EPSMCR15; offset += EPSMCR_STRIDE) in fsl_epu_clean()
190 out_be32(epu_base + offset, 0); in fsl_epu_clean()
193 for (offset = EPCCR0; offset <= EPCCR31; offset += EPCCR_STRIDE) in fsl_epu_clean()
[all …]
/rk3399_rockchip-uboot/drivers/usb/musb-new/
H A Dmusb_io.h46 static inline u16 musb_readw(const void __iomem *addr, unsigned offset) in musb_readw() argument
47 { return __raw_readw(addr + offset); } in musb_readw()
49 static inline u32 musb_readl(const void __iomem *addr, unsigned offset) in musb_readl() argument
50 { return __raw_readl(addr + offset); } in musb_readl()
53 static inline void musb_writew(void __iomem *addr, unsigned offset, u16 data) in musb_writew() argument
54 { __raw_writew(data, addr + offset); } in musb_writew()
56 static inline void musb_writel(void __iomem *addr, unsigned offset, u32 data) in musb_writel() argument
57 { __raw_writel(data, addr + offset); } in musb_writel()
65 static inline u8 musb_readb(const void __iomem *addr, unsigned offset) in musb_readb() argument
70 tmp = __raw_readw(addr + (offset & ~1)); in musb_readb()
[all …]
/rk3399_rockchip-uboot/drivers/pinctrl/rockchip/
H A Dpinctrl-rockchip.h211 int offset; member
267 int offset; member
301 { .offset = -1 }, \
302 { .offset = -1 }, \
303 { .offset = -1 }, \
304 { .offset = -1 }, \
314 { .type = iom0, .offset = -1 }, \
315 { .type = iom1, .offset = -1 }, \
316 { .type = iom2, .offset = -1 }, \
317 { .type = iom3, .offset = -1 }, \
[all …]
/rk3399_rockchip-uboot/arch/arm/cpu/armv8/
H A Dspin_table.c14 int cpus_offset, offset; in spin_table_update_dt() local
25 for (offset = fdt_first_subnode(fdt, cpus_offset); in spin_table_update_dt()
26 offset >= 0; in spin_table_update_dt()
27 offset = fdt_next_subnode(fdt, offset)) { in spin_table_update_dt()
28 prop = fdt_getprop(fdt, offset, "device_type", NULL); in spin_table_update_dt()
37 prop = fdt_getprop(fdt, offset, "enable-method", NULL); in spin_table_update_dt()
42 for (offset = fdt_first_subnode(fdt, cpus_offset); in spin_table_update_dt()
43 offset >= 0; in spin_table_update_dt()
44 offset = fdt_next_subnode(fdt, offset)) { in spin_table_update_dt()
45 prop = fdt_getprop(fdt, offset, "device_type", NULL); in spin_table_update_dt()
[all …]
/rk3399_rockchip-uboot/board/armltd/vexpress/
H A Dvexpress_tc2.c42 int offset, tmp, len;
53 offset = fdt_path_offset(fdt, "/cpus");
54 if (offset < 0) {
56 return offset;
60 for (tmp = fdt_first_subnode(fdt, offset); tmp >= 0;
65 offset = fdt_node_offset_by_prop_value(fdt, offset, "compatible",
67 while (offset > 0) {
68 prop = fdt_get_property(fdt, offset, "interface-type",
77 fdt_setprop_string(fdt, offset, "status", "disabled");
79 offset = fdt_node_offset_by_prop_value(fdt, offset, "compatible",
/rk3399_rockchip-uboot/arch/arm/mach-rockchip/
H A Diomem.c20 unsigned long val, offset = start, nr = 0; in iomem_show() local
25 printf("%08lx: ", base + offset); in iomem_show()
26 for (offset = start; offset <= end; offset += 0x04) { in iomem_show()
28 printf("\n%08lx: ", base + offset); in iomem_show()
31 val = readl((void __iomem *)base + offset); in iomem_show()
45 int offset; in iomem_show_by_match() local
47 for (offset = fdt_next_node(fdt, 0, NULL); in iomem_show_by_match()
48 offset >= 0; in iomem_show_by_match()
49 offset = fdt_next_node(fdt, offset, NULL)) { in iomem_show_by_match()
51 name = fdt_getprop(fdt, offset, "compatible", NULL); in iomem_show_by_match()
[all …]
/rk3399_rockchip-uboot/arch/x86/cpu/quark/
H A Dhte.c91 u32 offset; in hte_basic_data_cmp() local
108 for (offset = 0x80; offset <= 0x8f; offset++) in hte_basic_data_cmp()
109 msg_port_write(HTE, offset, pattern); in hte_basic_data_cmp()
146 u32 offset; in hte_rw_data_cmp() local
166 for (offset = 0x80; offset <= 0x8f; offset++) { in hte_rw_data_cmp()
167 if ((offset % 8) == victim_bit) in hte_rw_data_cmp()
168 msg_port_write(HTE, offset, 0x55555555); in hte_rw_data_cmp()
170 msg_port_write(HTE, offset, 0xcccccccc); in hte_rw_data_cmp()
210 u32 offset; in hte_mem_init() local
222 for (offset = 0x80; offset <= 0x8f; offset++) in hte_mem_init()
[all …]
/rk3399_rockchip-uboot/drivers/bios_emulator/x86emu/
H A Ddecode.c304 uint offset) in fetch_data_byte() argument
308 x86emu_check_data_access((u16)get_data_segment(), offset); in fetch_data_byte()
310 return (*sys_rdb)((get_data_segment() << 4) + offset); in fetch_data_byte()
323 uint offset) in fetch_data_word() argument
327 x86emu_check_data_access((u16)get_data_segment(), offset); in fetch_data_word()
329 return (*sys_rdw)((get_data_segment() << 4) + offset); in fetch_data_word()
342 uint offset) in fetch_data_long() argument
346 x86emu_check_data_access((u16)get_data_segment(), offset); in fetch_data_long()
348 return (*sys_rdl)((get_data_segment() << 4) + offset); in fetch_data_long()
363 uint offset) in fetch_data_byte_abs() argument
[all …]
/rk3399_rockchip-uboot/fs/cramfs/
H A Dcramfs.c46 #define PART_OFFSET(x) ((ulong)x->offset + \
49 #define PART_OFFSET(x) ((ulong)x->offset)
52 static int cramfs_uncompress (unsigned long begin, unsigned long offset,
101 static char *cramfs_uncompress_link (unsigned long begin, unsigned long offset) in cramfs_uncompress_link() argument
103 struct cramfs_inode *inode = (struct cramfs_inode *)(begin + offset); in cramfs_uncompress_link()
107 if (!link || cramfs_uncompress (begin, offset, (unsigned long)link) != size) { in cramfs_uncompress_link()
116 static unsigned long cramfs_resolve (unsigned long begin, unsigned long offset, in cramfs_resolve() argument
127 inode = (struct cramfs_inode *) (begin + offset + in cramfs_resolve()
154 return offset + inodeoffset; in cramfs_resolve()
164 return offset + inodeoffset; in cramfs_resolve()
[all …]
/rk3399_rockchip-uboot/include/
H A Dspi_flash.h33 int (*read)(struct udevice *dev, u32 offset, size_t len, void *buf);
34 int (*write)(struct udevice *dev, u32 offset, size_t len,
36 int (*erase)(struct udevice *dev, u32 offset, size_t len);
65 int spi_flash_read_dm(struct udevice *dev, u32 offset, size_t len, void *buf);
76 int spi_flash_write_dm(struct udevice *dev, u32 offset, size_t len,
89 int spi_flash_erase_dm(struct udevice *dev, u32 offset, size_t len);
116 static inline int spi_flash_read(struct spi_flash *flash, u32 offset, in spi_flash_read() argument
119 return spi_flash_read_dm(flash->dev, offset, len, buf); in spi_flash_read()
122 static inline int spi_flash_write(struct spi_flash *flash, u32 offset, in spi_flash_write() argument
125 return spi_flash_write_dm(flash->dev, offset, len, buf); in spi_flash_write()
[all …]
/rk3399_rockchip-uboot/drivers/bios_emulator/include/x86emu/
H A Ddecode.h63 u8 fetch_data_byte (uint offset);
64 u8 fetch_data_byte_abs (uint segment, uint offset);
65 u16 fetch_data_word (uint offset);
66 u16 fetch_data_word_abs (uint segment, uint offset);
67 u32 fetch_data_long (uint offset);
68 u32 fetch_data_long_abs (uint segment, uint offset);
69 void store_data_byte (uint offset, u8 val);
70 void store_data_byte_abs (uint segment, uint offset, u8 val);
71 void store_data_word (uint offset, u16 val);
72 void store_data_word_abs (uint segment, uint offset, u16 val);
[all …]
/rk3399_rockchip-uboot/drivers/net/fsl-mc/dpio/
H A Dqbman_sys.h128 static inline void qbman_cinh_write(struct qbman_swp_sys *s, uint32_t offset, in qbman_cinh_write() argument
131 __raw_writel(val, s->addr_cinh + offset); in qbman_cinh_write()
134 s->addr_cinh, offset, val); in qbman_cinh_write()
138 static inline uint32_t qbman_cinh_read(struct qbman_swp_sys *s, uint32_t offset) in qbman_cinh_read() argument
140 uint32_t reg = __raw_readl(s->addr_cinh + offset); in qbman_cinh_read()
144 s->addr_cinh, offset, reg); in qbman_cinh_read()
150 uint32_t offset) in qbman_cena_write_start() argument
152 void *shadow = s->cena + offset; in qbman_cena_write_start()
156 s->addr_cena, offset, shadow); in qbman_cena_write_start()
158 BUG_ON(offset & 63); in qbman_cena_write_start()
[all …]

12345678910>>...36