Lines Matching defs:elog

49 static void elog_putchar(struct bcm_elog *elog, unsigned char c)
53 offset = mmio_read_32(elog->base + BCM_ELOG_OFF_OFFSET);
54 len = mmio_read_32(elog->base + BCM_ELOG_LEN_OFFSET);
55 mmio_write_8(elog->base + offset, c);
59 if (offset >= elog->max_size)
63 if (len < elog->max_size - BCM_ELOG_HEADER_LEN)
66 mmio_write_32(elog->base + BCM_ELOG_OFF_OFFSET, offset);
67 mmio_write_32(elog->base + BCM_ELOG_LEN_OFFSET, len);
70 static void elog_unsigned_num(struct bcm_elog *elog, unsigned long unum,
86 elog_putchar(elog, num_buf[i]);
89 static void elog_string(struct bcm_elog *elog, const char *str)
92 elog_putchar(elog, *str++);
100 struct bcm_elog *elog = &global_elog;
103 elog->base = (uintptr_t)base;
104 elog->max_size = size;
105 elog->is_active = 1;
106 elog->level = level / 10;
113 val = mmio_read_32(elog->base + BCM_ELOG_SIG_OFFSET);
115 mmio_write_32(elog->base + BCM_ELOG_SIG_OFFSET,
117 mmio_write_32(elog->base + BCM_ELOG_OFF_OFFSET,
119 mmio_write_32(elog->base + BCM_ELOG_LEN_OFFSET, 0);
130 struct bcm_elog *elog = &global_elog;
132 if (!elog->is_active)
135 elog->is_active = 0;
137 flush_dcache_range(elog->base, elog->max_size);
147 struct bcm_elog *elog = &global_elog;
150 if (!elog->is_active || ((uintptr_t)dst == elog->base))
154 flush_dcache_range(elog->base, max_size);
161 offset = mmio_read_32(elog->base + BCM_ELOG_OFF_OFFSET);
164 mmio_write_32(elog->base + BCM_ELOG_OFF_OFFSET, offset);
168 len = mmio_read_32(elog->base + BCM_ELOG_LEN_OFFSET);
171 mmio_write_32(elog->base + BCM_ELOG_LEN_OFFSET, len);
175 memcpy16(dst, (const void *)elog->base, len + BCM_ELOG_HEADER_LEN);
176 elog->base = (uintptr_t)dst;
177 elog->max_size = max_size;
193 struct bcm_elog *elog = &global_elog;
198 if (!elog->is_active || level > elog->level)
204 elog_putchar(elog, *prefix_str);
226 elog_putchar(elog, '-');
231 elog_unsigned_num(elog, unum, 10);
235 elog_string(elog, str);
243 elog_unsigned_num(elog, unum, 16);
255 elog_unsigned_num(elog, unum, 10);
264 elog_putchar(elog, *fmt++);