| /platform/bcm28xx/ |
| A D | gpio.c | 24 unsigned offset = (nr % PINS_PER_REG) * BITS_PER_PIN; in gpio_config() local 25 unsigned shifted_mask = mask << offset; in gpio_config() 27 *reg = (*reg & ~shifted_mask) | (flags << offset); in gpio_config() 32 unsigned offset = nr % BITS_PER_REG; in gpio_set() local 33 *GPIOREG(on ? GPIO_GPSET0 : GPIO_GPCLR0, nr) = 1 << offset; in gpio_set() 37 unsigned offset = nr % BITS_PER_REG; in gpio_get() local 38 return (*GPIOREG(GPIO_GPLEV0, nr) & (1 << offset)) >> offset; in gpio_get()
|
| A D | platform.c | 124 int offset = 0; in platform_early_init() local 126 offset = fdt_next_node(fdt, offset, &depth); in platform_early_init() 127 if (offset < 0) in platform_early_init() 131 const char *name = fdt_get_name(fdt, offset, NULL); in platform_early_init() 139 const void *prop_ptr = fdt_getprop(fdt, offset, "reg", &lenp); in platform_early_init()
|
| /platform/stm32f7xx/ |
| A D | flash.c | 94 memcpy(buf, (uint8_t *)FLASHAXI_BASE + offset, len); in stm32_flash_bdev_read() 131 if (offset < 0) { in offset_to_sector() 133 } else if (offset < ERASE_RANGE0_END) { in offset_to_sector() 134 *sector = (offset - ERASE_RANGE0_START) / _32K; in offset_to_sector() 137 } else if (offset < ERASE_RANGE1_END) { in offset_to_sector() 138 *sector = (offset - ERASE_RANGE1_START) / _128K + 4; in offset_to_sector() 141 } else if (offset < ERASE_RANGE2_END) { in offset_to_sector() 142 *sector = (offset - ERASE_RANGE2_START) / _256K + 5; in offset_to_sector() 157 LTRACEF("dev %p, offset 0x%llx, len 0x%zx\n", bdev, offset, len); in stm32_flash_bdev_erase() 201 off_t erased_bytes = next_offset - offset; in stm32_flash_bdev_erase() [all …]
|
| A D | qspi.c | 51 static ssize_t spiflash_bdev_read(struct bdev *device, void *buf, off_t offset, size_t len); 54 static ssize_t spiflash_bdev_erase(struct bdev *device, off_t offset, size_t len); 396 static ssize_t spiflash_bdev_erase(struct bdev *device, off_t offset, in spiflash_bdev_erase() argument 398 len = bio_trim_range(device, offset, len); in spiflash_bdev_erase() 408 if (len == device->total_size && offset == 0) { in spiflash_bdev_erase() 417 ssize_t erased = qspi_erase_sector(device, offset); in spiflash_bdev_erase() 423 offset += erased; in spiflash_bdev_erase() 427 ssize_t erased = qspi_erase_subsector(device, offset); in spiflash_bdev_erase() 433 offset += erased; in spiflash_bdev_erase()
|
| /platform/stm32f4xx/ |
| A D | flash.c | 49 static ssize_t stmflash_bdev_erase(struct bdev *, off_t offset, size_t len); 79 LTRACEF("dev %p, buf %p, offset 0x%llx, len 0x%zx\n", bdev, buf, offset, len); in stmflash_bdev_read() 80 len = bio_trim_range(bdev, offset, len); in stmflash_bdev_read() 84 startAddress += offset; in stmflash_bdev_read() 96 LTRACEF("dev %p, buf %p, offset 0x%llx, len 0x%zx\n",bdev, buf, offset, len); in stmflash_bdev_write() 97 len = bio_trim_range(bdev, offset, len); in stmflash_bdev_write() 101 start_address = sg_flash.start+offset; in stmflash_bdev_write() 126 LTRACEF("dev %p, offset 0x%llx, len 0x%zx\n",bdev, offset, len); in stmflash_bdev_erase() 127 len = bio_trim_range(bdev, offset, len); in stmflash_bdev_erase() 132 if (sectors[n] == sg_flash.start+offset) { in stmflash_bdev_erase() [all …]
|
| /platform/spacemit-k1/ |
| A D | uart.c | 29 static inline uint8_t uart_read_8(size_t offset) { in uart_read_8() argument 30 return uart_base[offset * 4]; in uart_read_8() 33 static inline void uart_write_8(size_t offset, uint8_t val) { in uart_write_8() argument 34 uart_base[offset * 4] = val; in uart_write_8()
|
| /platform/qemu-virt-riscv/ |
| A D | uart.c | 28 static inline uint8_t uart_read_8(size_t offset) { in uart_read_8() argument 29 return uart_base[offset]; in uart_read_8() 32 static inline void uart_write_8(size_t offset, uint8_t val) { in uart_write_8() argument 33 uart_base[offset] = val; in uart_write_8()
|
| /platform/jh7110/ |
| A D | uart.c | 29 static inline uint8_t uart_read_8(size_t offset) { in uart_read_8() argument 30 return uart_base[offset * 4]; in uart_read_8() 33 static inline void uart_write_8(size_t offset, uint8_t val) { in uart_write_8() argument 34 uart_base[offset * 4] = val; in uart_write_8()
|
| /platform/zynq/ |
| A D | spiflash.c | 239 size_t offset = 0; in spiflash_detect() local 253 flash.geometry[i].start = offset; in spiflash_detect() 257 if (offset & erase_mask) { in spiflash_detect() 259 i, offset, erase_size); in spiflash_detect() 263 offset += flash.geometry[i].size; in spiflash_detect() 322 len = bio_trim_range(bdev, offset, len); in spiflash_bdev_read() 327 qspi_rd32(&flash.qspi, offset, buf, len / 4); in spiflash_bdev_read() 369 LTRACEF("dev %p, offset 0x%llx, len 0x%zx\n", bdev, offset, len); in spiflash_bdev_erase() 371 len = bio_trim_range(bdev, offset, len); in spiflash_bdev_erase() 377 ssize_t err = qspi_erase_sector(&flash.qspi, offset); in spiflash_bdev_erase() [all …]
|
| /platform/mediatek/mt6735/ |
| A D | interrupts.c | 174 unsigned int offset; in mt_irq_set_polarity() local 183 offset = (irq - GIC_PRIVATE_SIGNALS) & 0x1F; in mt_irq_set_polarity() 187 value |= (1 << offset); // always invert the incoming IRQ's polarity in mt_irq_set_polarity() 191 value &= ~(0x1 << offset); in mt_irq_set_polarity()
|
| /platform/mediatek/common/gic/ |
| A D | mt_gic_v3.c | 230 unsigned int offset; in mt_irq_set_polarity() local 239 offset = (irq - GIC_PRIVATE_SIGNALS) & 0x1F; in mt_irq_set_polarity() 243 value |= (1 << offset); // always invert the incoming IRQ's polarity in mt_irq_set_polarity() 247 value &= ~(0x1 << offset); in mt_irq_set_polarity()
|
| /platform/pc/ |
| A D | ide.c | 163 static ssize_t ide_write(struct device *dev, off_t offset, const void *buf, size_t count); 164 static ssize_t ide_read(struct device *dev, off_t offset, void *buf, size_t count); 323 static ssize_t ide_write(struct device *dev, off_t offset, const void *buf, size_t count) { in ide_write() argument 360 ide_lba_setup(dev, offset, index); in ide_write() 398 offset += do_sectors; in ide_write() 407 static ssize_t ide_read(struct device *dev, off_t offset, void *buf, size_t count) { in ide_read() argument 444 ide_lba_setup(dev, offset, index); in ide_read() 482 offset += do_sectors; in ide_read()
|