Searched refs:this (Results 1 - 200 of 22970) sorted by relevance

1234567891011>>

/linux-4.1.27/sound/usb/line6/
H A Dmidibuf.c29 the "Song Position Pointer", but this is used by Line 6 midibuf_message_length()
41 static int midibuf_is_empty(struct midi_buffer *this) midibuf_is_empty() argument
43 return (this->pos_read == this->pos_write) && !this->full; midibuf_is_empty()
46 static int midibuf_is_full(struct midi_buffer *this) midibuf_is_full() argument
48 return this->full; midibuf_is_full()
51 void line6_midibuf_reset(struct midi_buffer *this) line6_midibuf_reset() argument
53 this->pos_read = this->pos_write = this->full = 0; line6_midibuf_reset()
54 this->command_prev = -1; line6_midibuf_reset()
57 int line6_midibuf_init(struct midi_buffer *this, int size, int split) line6_midibuf_init() argument
59 this->buf = kmalloc(size, GFP_KERNEL); line6_midibuf_init()
61 if (this->buf == NULL) line6_midibuf_init()
64 this->size = size; line6_midibuf_init()
65 this->split = split; line6_midibuf_init()
66 line6_midibuf_reset(this); line6_midibuf_init()
70 int line6_midibuf_bytes_free(struct midi_buffer *this) line6_midibuf_bytes_free() argument
73 midibuf_is_full(this) ? line6_midibuf_bytes_free()
75 (this->pos_read - this->pos_write + this->size - 1) % this->size + line6_midibuf_bytes_free()
79 int line6_midibuf_bytes_used(struct midi_buffer *this) line6_midibuf_bytes_used() argument
82 midibuf_is_empty(this) ? line6_midibuf_bytes_used()
84 (this->pos_write - this->pos_read + this->size - 1) % this->size + line6_midibuf_bytes_used()
88 int line6_midibuf_write(struct midi_buffer *this, unsigned char *data, line6_midibuf_write() argument
95 if (midibuf_is_full(this) || (length <= 0)) line6_midibuf_write()
104 bytes_free = line6_midibuf_bytes_free(this); line6_midibuf_write()
110 length1 = this->size - this->pos_write; line6_midibuf_write()
114 memcpy(this->buf + this->pos_write, data, length); line6_midibuf_write()
115 this->pos_write += length; line6_midibuf_write()
119 memcpy(this->buf + this->pos_write, data, length1); line6_midibuf_write()
120 memcpy(this->buf, data + length1, length2); line6_midibuf_write()
121 this->pos_write = length2; line6_midibuf_write()
124 if (this->pos_write == this->pos_read) line6_midibuf_write()
125 this->full = 1; line6_midibuf_write()
131 int line6_midibuf_read(struct midi_buffer *this, unsigned char *data, line6_midibuf_read() argument
145 if (midibuf_is_empty(this)) line6_midibuf_read()
148 bytes_used = line6_midibuf_bytes_used(this); line6_midibuf_read()
153 length1 = this->size - this->pos_read; line6_midibuf_read()
156 command = this->buf[this->pos_read]; line6_midibuf_read()
160 this->command_prev = command; line6_midibuf_read()
162 if (this->command_prev > 0) { line6_midibuf_read()
164 midibuf_message_length(this->command_prev); line6_midibuf_read()
180 if (this->buf[this->pos_read + i] & 0x80) line6_midibuf_read()
189 if (this->buf[this->pos_read + i] & 0x80) line6_midibuf_read()
196 if (this->buf[i] & 0x80) line6_midibuf_read()
208 if (!this->split) line6_midibuf_read()
219 memcpy(data + repeat, this->buf + this->pos_read, length); line6_midibuf_read()
220 this->pos_read += length; line6_midibuf_read()
224 memcpy(data + repeat, this->buf + this->pos_read, length1); line6_midibuf_read()
225 memcpy(data + repeat + length1, this->buf, length2); line6_midibuf_read()
226 this->pos_read = length2; line6_midibuf_read()
230 data[0] = this->command_prev; line6_midibuf_read()
232 this->full = 0; line6_midibuf_read()
236 int line6_midibuf_ignore(struct midi_buffer *this, int length) line6_midibuf_ignore() argument
238 int bytes_used = line6_midibuf_bytes_used(this); line6_midibuf_ignore()
243 this->pos_read = (this->pos_read + length) % this->size; line6_midibuf_ignore()
244 this->full = 0; line6_midibuf_ignore()
248 void line6_midibuf_destroy(struct midi_buffer *this) line6_midibuf_destroy() argument
250 kfree(this->buf); line6_midibuf_destroy()
251 this->buf = NULL; line6_midibuf_destroy()
/linux-4.1.27/drivers/s390/net/
H A Dfsm.c20 fsm_instance *this; init_fsm() local
24 this = kzalloc(sizeof(fsm_instance), order); init_fsm()
25 if (this == NULL) { init_fsm()
30 strlcpy(this->name, name, sizeof(this->name)); init_fsm()
31 init_waitqueue_head(&this->wait_q); init_fsm()
37 kfree_fsm(this); init_fsm()
44 this->f = f; init_fsm()
50 kfree_fsm(this); init_fsm()
62 kfree_fsm(this); init_fsm()
68 return this; init_fsm()
72 kfree_fsm(fsm_instance *this) kfree_fsm() argument
74 if (this) { kfree_fsm()
75 if (this->f) { kfree_fsm()
76 kfree(this->f->jumpmatrix); kfree_fsm()
77 kfree(this->f); kfree_fsm()
79 kfree(this); kfree_fsm()
132 fsm_expire_timer(fsm_timer *this) fsm_expire_timer() argument
136 this->fi->name, this); fsm_expire_timer()
138 fsm_event(this->fi, this->expire_event, this->event_arg); fsm_expire_timer()
142 fsm_settimer(fsm_instance *fi, fsm_timer *this) fsm_settimer() argument
144 this->fi = fi; fsm_settimer()
145 this->tl.function = (void *)fsm_expire_timer; fsm_settimer()
146 this->tl.data = (long)this; fsm_settimer()
149 this); fsm_settimer()
151 init_timer(&this->tl); fsm_settimer()
155 fsm_deltimer(fsm_timer *this) fsm_deltimer() argument
158 printk(KERN_DEBUG "fsm(%s): Delete timer %p\n", this->fi->name, fsm_deltimer()
159 this); fsm_deltimer()
161 del_timer(&this->tl); fsm_deltimer()
165 fsm_addtimer(fsm_timer *this, int millisec, int event, void *arg) fsm_addtimer() argument
170 this->fi->name, this, millisec); fsm_addtimer()
173 init_timer(&this->tl); fsm_addtimer()
174 this->tl.function = (void *)fsm_expire_timer; fsm_addtimer()
175 this->tl.data = (long)this; fsm_addtimer()
176 this->expire_event = event; fsm_addtimer()
177 this->event_arg = arg; fsm_addtimer()
178 this->tl.expires = jiffies + (millisec * HZ) / 1000; fsm_addtimer()
179 add_timer(&this->tl); fsm_addtimer()
183 /* FIXME: this function is never used, why */
185 fsm_modtimer(fsm_timer *this, int millisec, int event, void *arg) fsm_modtimer() argument
190 this->fi->name, this, millisec); fsm_modtimer()
193 del_timer(&this->tl); fsm_modtimer()
194 init_timer(&this->tl); fsm_modtimer()
195 this->tl.function = (void *)fsm_expire_timer; fsm_modtimer()
196 this->tl.data = (long)this; fsm_modtimer()
197 this->expire_event = event; fsm_modtimer()
198 this->event_arg = arg; fsm_modtimer()
199 this->tl.expires = jiffies + (millisec * HZ) / 1000; fsm_modtimer()
200 add_timer(&this->tl); fsm_modtimer()
/linux-4.1.27/include/linux/input/
H A Dcy8ctmg110_pdata.h6 int reset_pin; /* Reset pin is wired to this GPIO (optional) */
7 int irq_pin; /* IRQ pin is wired to this GPIO */
/linux-4.1.27/drivers/net/wireless/
H A Dwl3501_cs.c187 static inline void wl3501_switch_page(struct wl3501_card *this, u8 page) wl3501_switch_page() argument
189 wl3501_outb(page, this->base_addr + WL3501_NIC_BSS); wl3501_switch_page()
198 static int wl3501_get_flash_mac_addr(struct wl3501_card *this) wl3501_get_flash_mac_addr() argument
200 int base_addr = this->base_addr; wl3501_get_flash_mac_addr()
209 this->mac_addr[0] = inb(base_addr + WL3501_NIC_IODPA); wl3501_get_flash_mac_addr()
211 this->mac_addr[1] = inb(base_addr + WL3501_NIC_IODPA); wl3501_get_flash_mac_addr()
213 this->mac_addr[2] = inb(base_addr + WL3501_NIC_IODPA); wl3501_get_flash_mac_addr()
215 this->mac_addr[3] = inb(base_addr + WL3501_NIC_IODPA); wl3501_get_flash_mac_addr()
217 this->mac_addr[4] = inb(base_addr + WL3501_NIC_IODPA); wl3501_get_flash_mac_addr()
219 this->mac_addr[5] = inb(base_addr + WL3501_NIC_IODPA); wl3501_get_flash_mac_addr()
221 this->reg_domain = inb(base_addr + WL3501_NIC_IODPA); wl3501_get_flash_mac_addr()
227 this->version[0] = inb(base_addr + WL3501_NIC_IODPA); wl3501_get_flash_mac_addr()
229 this->version[1] = inb(base_addr + WL3501_NIC_IODPA); wl3501_get_flash_mac_addr()
231 wl3501_switch_page(this, WL3501_BSS_SPAGE0); wl3501_get_flash_mac_addr()
234 return this->mac_addr[0] == 0x00 && this->mac_addr[1] == 0x60; wl3501_get_flash_mac_addr()
245 static void wl3501_set_to_wla(struct wl3501_card *this, u16 dest, void *src, wl3501_set_to_wla() argument
249 wl3501_switch_page(this, (dest & 0x8000) ? WL3501_BSS_SPAGE1 : wl3501_set_to_wla()
252 wl3501_outb(dest & 0xff, this->base_addr + WL3501_NIC_LMAL); wl3501_set_to_wla()
253 wl3501_outb(((dest >> 8) & 0x7f), this->base_addr + WL3501_NIC_LMAH); wl3501_set_to_wla()
256 wl3501_outsb(this->base_addr + WL3501_NIC_IODPA, src, size); wl3501_set_to_wla()
267 static void wl3501_get_from_wla(struct wl3501_card *this, u16 src, void *dest, wl3501_get_from_wla() argument
271 wl3501_switch_page(this, (src & 0x8000) ? WL3501_BSS_SPAGE1 : wl3501_get_from_wla()
274 wl3501_outb(src & 0xff, this->base_addr + WL3501_NIC_LMAL); wl3501_get_from_wla()
275 wl3501_outb((src >> 8) & 0x7f, this->base_addr + WL3501_NIC_LMAH); wl3501_get_from_wla()
278 insb(this->base_addr + WL3501_NIC_IODPA, dest, size); wl3501_get_from_wla()
293 static u16 wl3501_get_tx_buffer(struct wl3501_card *this, u16 len) wl3501_get_tx_buffer() argument
299 if (full_len > this->tx_buffer_cnt * 254) wl3501_get_tx_buffer()
301 ret = this->tx_buffer_head; wl3501_get_tx_buffer()
307 wl3501_get_from_wla(this, this->tx_buffer_head, &next, wl3501_get_tx_buffer()
310 wl3501_set_to_wla(this, this->tx_buffer_head, &zero, wl3501_get_tx_buffer()
312 this->tx_buffer_head = next; wl3501_get_tx_buffer()
316 this->tx_buffer_head = ret; wl3501_get_tx_buffer()
321 this->tx_buffer_cnt -= blk_cnt; wl3501_get_tx_buffer()
329 static void wl3501_free_tx_buffer(struct wl3501_card *this, u16 ptr) wl3501_free_tx_buffer() argument
332 if (!this->tx_buffer_head) wl3501_free_tx_buffer()
333 this->tx_buffer_head = ptr; wl3501_free_tx_buffer()
335 wl3501_set_to_wla(this, this->tx_buffer_tail, wl3501_free_tx_buffer()
340 this->tx_buffer_cnt++; wl3501_free_tx_buffer()
341 wl3501_get_from_wla(this, ptr, &next, sizeof(next)); wl3501_free_tx_buffer()
342 this->tx_buffer_tail = ptr; wl3501_free_tx_buffer()
347 static int wl3501_esbq_req_test(struct wl3501_card *this) wl3501_esbq_req_test() argument
351 wl3501_get_from_wla(this, this->esbq_req_head + 3, &tmp, sizeof(tmp)); wl3501_esbq_req_test()
355 static void wl3501_esbq_req(struct wl3501_card *this, u16 *ptr) wl3501_esbq_req() argument
359 wl3501_set_to_wla(this, this->esbq_req_head, ptr, 2); wl3501_esbq_req()
360 wl3501_set_to_wla(this, this->esbq_req_head + 2, &tmp, sizeof(tmp)); wl3501_esbq_req()
361 this->esbq_req_head += 4; wl3501_esbq_req()
362 if (this->esbq_req_head >= this->esbq_req_end) wl3501_esbq_req()
363 this->esbq_req_head = this->esbq_req_start; wl3501_esbq_req()
366 static int wl3501_esbq_exec(struct wl3501_card *this, void *sig, int sig_size) wl3501_esbq_exec() argument
370 if (wl3501_esbq_req_test(this)) { wl3501_esbq_exec()
371 u16 ptr = wl3501_get_tx_buffer(this, sig_size); wl3501_esbq_exec()
373 wl3501_set_to_wla(this, ptr, sig, sig_size); wl3501_esbq_exec()
374 wl3501_esbq_req(this, &ptr); wl3501_esbq_exec()
381 static int wl3501_get_mib_value(struct wl3501_card *this, u8 index, wl3501_get_mib_value() argument
391 spin_lock_irqsave(&this->lock, flags); wl3501_get_mib_value()
392 if (wl3501_esbq_req_test(this)) { wl3501_get_mib_value()
393 u16 ptr = wl3501_get_tx_buffer(this, sizeof(sig)); wl3501_get_mib_value()
395 wl3501_set_to_wla(this, ptr, &sig, sizeof(sig)); wl3501_get_mib_value()
396 wl3501_esbq_req(this, &ptr); wl3501_get_mib_value()
397 this->sig_get_confirm.mib_status = 255; wl3501_get_mib_value()
398 spin_unlock_irqrestore(&this->lock, flags); wl3501_get_mib_value()
399 rc = wait_event_interruptible(this->wait, wl3501_get_mib_value()
400 this->sig_get_confirm.mib_status != 255); wl3501_get_mib_value()
402 memcpy(bf, this->sig_get_confirm.mib_value, wl3501_get_mib_value()
407 spin_unlock_irqrestore(&this->lock, flags); wl3501_get_mib_value()
412 static int wl3501_pwr_mgmt(struct wl3501_card *this, int suspend) wl3501_pwr_mgmt() argument
423 spin_lock_irqsave(&this->lock, flags); wl3501_pwr_mgmt()
424 if (wl3501_esbq_req_test(this)) { wl3501_pwr_mgmt()
425 u16 ptr = wl3501_get_tx_buffer(this, sizeof(sig)); wl3501_pwr_mgmt()
427 wl3501_set_to_wla(this, ptr, &sig, sizeof(sig)); wl3501_pwr_mgmt()
428 wl3501_esbq_req(this, &ptr); wl3501_pwr_mgmt()
429 this->sig_pwr_mgmt_confirm.status = 255; wl3501_pwr_mgmt()
430 spin_unlock_irqrestore(&this->lock, flags); wl3501_pwr_mgmt()
431 rc = wait_event_interruptible(this->wait, wl3501_pwr_mgmt()
432 this->sig_pwr_mgmt_confirm.status != 255); wl3501_pwr_mgmt()
435 this->sig_pwr_mgmt_confirm.status); wl3501_pwr_mgmt()
439 spin_unlock_irqrestore(&this->lock, flags); wl3501_pwr_mgmt()
446 * @this - card
454 static int wl3501_send_pkt(struct wl3501_card *this, u8 *data, u16 len) wl3501_send_pkt() argument
463 if (wl3501_esbq_req_test(this)) { wl3501_send_pkt()
464 sig_bf = wl3501_get_tx_buffer(this, sizeof(sig)); wl3501_send_pkt()
468 bf = wl3501_get_tx_buffer(this, len + 26 + 24); wl3501_send_pkt()
471 wl3501_free_tx_buffer(this, sig_bf); wl3501_send_pkt()
484 wl3501_set_to_wla(this, bf + 2 + wl3501_send_pkt()
495 wl3501_set_to_wla(this, wl3501_send_pkt()
499 wl3501_get_from_wla(this, bf, &next, sizeof(next)); wl3501_send_pkt()
512 wl3501_set_to_wla(this, bf + 2 + wl3501_send_pkt()
516 wl3501_get_from_wla(this, bf, &next, sizeof(next)); wl3501_send_pkt()
527 wl3501_set_to_wla(this, bf + 2, pdata, tmplen); wl3501_send_pkt()
529 wl3501_get_from_wla(this, bf, &next, sizeof(next)); wl3501_send_pkt()
532 wl3501_set_to_wla(this, sig_bf, &sig, sizeof(sig)); wl3501_send_pkt()
533 wl3501_esbq_req(this, &sig_bf); wl3501_send_pkt()
539 static int wl3501_mgmt_resync(struct wl3501_card *this) wl3501_mgmt_resync() argument
545 return wl3501_esbq_exec(this, &sig, sizeof(sig)); wl3501_mgmt_resync()
548 static inline int wl3501_fw_bss_type(struct wl3501_card *this) wl3501_fw_bss_type() argument
550 return this->net_type == IW_MODE_INFRA ? WL3501_NET_TYPE_INFRA : wl3501_fw_bss_type()
554 static inline int wl3501_fw_cap_info(struct wl3501_card *this) wl3501_fw_cap_info() argument
556 return this->net_type == IW_MODE_INFRA ? WL3501_MGMT_CAPABILITY_ESS : wl3501_fw_cap_info()
560 static int wl3501_mgmt_scan(struct wl3501_card *this, u16 chan_time) wl3501_mgmt_scan() argument
568 .bss_type = wl3501_fw_bss_type(this), wl3501_mgmt_scan()
571 this->bss_cnt = this->join_sta_bss = 0; wl3501_mgmt_scan()
572 return wl3501_esbq_exec(this, &sig, sizeof(sig)); wl3501_mgmt_scan()
575 static int wl3501_mgmt_join(struct wl3501_card *this, u16 stas) wl3501_mgmt_join() argument
585 .chan = this->chan, wl3501_mgmt_join()
589 memcpy(&sig.beacon_period, &this->bss_set[stas].beacon_period, 72); wl3501_mgmt_join()
590 return wl3501_esbq_exec(this, &sig, sizeof(sig)); wl3501_mgmt_join()
593 static int wl3501_mgmt_start(struct wl3501_card *this) wl3501_mgmt_start() argument
604 .chan = this->chan, wl3501_mgmt_start()
637 .bss_type = wl3501_fw_bss_type(this), wl3501_mgmt_start()
638 .cap_info = wl3501_fw_cap_info(this), wl3501_mgmt_start()
641 iw_copy_mgmt_info_element(&sig.ssid.el, &this->essid.el); wl3501_mgmt_start()
642 iw_copy_mgmt_info_element(&this->keep_essid.el, &this->essid.el); wl3501_mgmt_start()
643 return wl3501_esbq_exec(this, &sig, sizeof(sig)); wl3501_mgmt_start()
646 static void wl3501_mgmt_scan_confirm(struct wl3501_card *this, u16 addr) wl3501_mgmt_scan_confirm() argument
653 wl3501_get_from_wla(this, addr, &sig, sizeof(sig)); wl3501_mgmt_scan_confirm()
656 if ((this->net_type == IW_MODE_INFRA && wl3501_mgmt_scan_confirm()
658 (this->net_type == IW_MODE_ADHOC && wl3501_mgmt_scan_confirm()
660 this->net_type == IW_MODE_AUTO) { wl3501_mgmt_scan_confirm()
661 if (!this->essid.el.len) wl3501_mgmt_scan_confirm()
663 else if (this->essid.el.len == 3 && wl3501_mgmt_scan_confirm()
664 !memcmp(this->essid.essid, "ANY", 3)) wl3501_mgmt_scan_confirm()
666 else if (this->essid.el.len != sig.ssid.el.len) wl3501_mgmt_scan_confirm()
668 else if (memcmp(this->essid.essid, sig.ssid.essid, wl3501_mgmt_scan_confirm()
669 this->essid.el.len)) wl3501_mgmt_scan_confirm()
674 for (i = 0; i < this->bss_cnt; i++) { wl3501_mgmt_scan_confirm()
675 if (ether_addr_equal_unaligned(this->bss_set[i].bssid, sig.bssid)) { wl3501_mgmt_scan_confirm()
682 memcpy(&this->bss_set[i].beacon_period, wl3501_mgmt_scan_confirm()
684 this->bss_cnt++; wl3501_mgmt_scan_confirm()
685 this->rssi = sig.rssi; wl3501_mgmt_scan_confirm()
690 this->join_sta_bss = 0; wl3501_mgmt_scan_confirm()
691 for (i = this->join_sta_bss; i < this->bss_cnt; i++) wl3501_mgmt_scan_confirm()
692 if (!wl3501_mgmt_join(this, i)) wl3501_mgmt_scan_confirm()
694 this->join_sta_bss = i; wl3501_mgmt_scan_confirm()
695 if (this->join_sta_bss == this->bss_cnt) { wl3501_mgmt_scan_confirm()
696 if (this->net_type == IW_MODE_INFRA) wl3501_mgmt_scan_confirm()
697 wl3501_mgmt_scan(this, 100); wl3501_mgmt_scan_confirm()
699 this->adhoc_times++; wl3501_mgmt_scan_confirm()
700 if (this->adhoc_times > WL3501_MAX_ADHOC_TRIES) wl3501_mgmt_scan_confirm()
701 wl3501_mgmt_start(this); wl3501_mgmt_scan_confirm()
703 wl3501_mgmt_scan(this, 100); wl3501_mgmt_scan_confirm()
711 * @this - card
716 static int wl3501_block_interrupt(struct wl3501_card *this) wl3501_block_interrupt() argument
718 u8 old = inb(this->base_addr + WL3501_NIC_GCR); wl3501_block_interrupt()
722 wl3501_outb(new, this->base_addr + WL3501_NIC_GCR); wl3501_block_interrupt()
728 * @this - card
733 static int wl3501_unblock_interrupt(struct wl3501_card *this) wl3501_unblock_interrupt() argument
735 u8 old = inb(this->base_addr + WL3501_NIC_GCR); wl3501_unblock_interrupt()
739 wl3501_outb(new, this->base_addr + WL3501_NIC_GCR); wl3501_unblock_interrupt()
748 * @this: card
752 static u16 wl3501_receive(struct wl3501_card *this, u8 *bf, u16 size) wl3501_receive() argument
758 wl3501_get_from_wla(this, this->start_seg + 2, wl3501_receive()
761 wl3501_get_from_wla(this, wl3501_receive()
762 this->start_seg + wl3501_receive()
769 wl3501_get_from_wla(this, wl3501_receive()
770 this->start_seg + wl3501_receive()
777 wl3501_get_from_wla(this, next_addr + 5, data, wl3501_receive()
781 wl3501_get_from_wla(this, next_addr + 2, &next_addr1, wl3501_receive()
785 wl3501_get_from_wla(this, next_addr + 5, data, size); wl3501_receive()
792 static void wl3501_esbq_req_free(struct wl3501_card *this) wl3501_esbq_req_free() argument
797 if (this->esbq_req_head == this->esbq_req_tail) wl3501_esbq_req_free()
799 wl3501_get_from_wla(this, this->esbq_req_tail + 3, &tmp, sizeof(tmp)); wl3501_esbq_req_free()
802 wl3501_get_from_wla(this, this->esbq_req_tail, &addr, sizeof(addr)); wl3501_esbq_req_free()
803 wl3501_free_tx_buffer(this, addr); wl3501_esbq_req_free()
804 this->esbq_req_tail += 4; wl3501_esbq_req_free()
805 if (this->esbq_req_tail >= this->esbq_req_end) wl3501_esbq_req_free()
806 this->esbq_req_tail = this->esbq_req_start; wl3501_esbq_req_free()
811 static int wl3501_esbq_confirm(struct wl3501_card *this) wl3501_esbq_confirm() argument
815 wl3501_get_from_wla(this, this->esbq_confirm + 3, &tmp, sizeof(tmp)); wl3501_esbq_confirm()
821 struct wl3501_card *this = netdev_priv(dev); wl3501_online() local
824 dev->name, this->bssid); wl3501_online()
828 static void wl3501_esbq_confirm_done(struct wl3501_card *this) wl3501_esbq_confirm_done() argument
832 wl3501_set_to_wla(this, this->esbq_confirm + 3, &tmp, sizeof(tmp)); wl3501_esbq_confirm_done()
833 this->esbq_confirm += 4; wl3501_esbq_confirm_done()
834 if (this->esbq_confirm >= this->esbq_confirm_end) wl3501_esbq_confirm_done()
835 this->esbq_confirm = this->esbq_confirm_start; wl3501_esbq_confirm_done()
838 static int wl3501_mgmt_auth(struct wl3501_card *this) wl3501_mgmt_auth() argument
847 memcpy(sig.mac_addr, this->bssid, ETH_ALEN); wl3501_mgmt_auth()
848 return wl3501_esbq_exec(this, &sig, sizeof(sig)); wl3501_mgmt_auth()
851 static int wl3501_mgmt_association(struct wl3501_card *this) wl3501_mgmt_association() argument
857 .cap_info = this->cap_info, wl3501_mgmt_association()
861 memcpy(sig.mac_addr, this->bssid, ETH_ALEN); wl3501_mgmt_association()
862 return wl3501_esbq_exec(this, &sig, sizeof(sig)); wl3501_mgmt_association()
867 struct wl3501_card *this = netdev_priv(dev); wl3501_mgmt_join_confirm() local
871 wl3501_get_from_wla(this, addr, &sig, sizeof(sig)); wl3501_mgmt_join_confirm()
873 if (this->net_type == IW_MODE_INFRA) { wl3501_mgmt_join_confirm()
874 if (this->join_sta_bss < this->bss_cnt) { wl3501_mgmt_join_confirm()
875 const int i = this->join_sta_bss; wl3501_mgmt_join_confirm()
876 memcpy(this->bssid, wl3501_mgmt_join_confirm()
877 this->bss_set[i].bssid, ETH_ALEN); wl3501_mgmt_join_confirm()
878 this->chan = this->bss_set[i].ds_pset.chan; wl3501_mgmt_join_confirm()
879 iw_copy_mgmt_info_element(&this->keep_essid.el, wl3501_mgmt_join_confirm()
880 &this->bss_set[i].ssid.el); wl3501_mgmt_join_confirm()
881 wl3501_mgmt_auth(this); wl3501_mgmt_join_confirm()
884 const int i = this->join_sta_bss; wl3501_mgmt_join_confirm()
886 memcpy(&this->bssid, &this->bss_set[i].bssid, ETH_ALEN); wl3501_mgmt_join_confirm()
887 this->chan = this->bss_set[i].ds_pset.chan; wl3501_mgmt_join_confirm()
888 iw_copy_mgmt_info_element(&this->keep_essid.el, wl3501_mgmt_join_confirm()
889 &this->bss_set[i].ssid.el); wl3501_mgmt_join_confirm()
894 this->join_sta_bss++; wl3501_mgmt_join_confirm()
895 for (i = this->join_sta_bss; i < this->bss_cnt; i++) wl3501_mgmt_join_confirm()
896 if (!wl3501_mgmt_join(this, i)) wl3501_mgmt_join_confirm()
898 this->join_sta_bss = i; wl3501_mgmt_join_confirm()
899 if (this->join_sta_bss == this->bss_cnt) { wl3501_mgmt_join_confirm()
900 if (this->net_type == IW_MODE_INFRA) wl3501_mgmt_join_confirm()
901 wl3501_mgmt_scan(this, 100); wl3501_mgmt_join_confirm()
903 this->adhoc_times++; wl3501_mgmt_join_confirm()
904 if (this->adhoc_times > WL3501_MAX_ADHOC_TRIES) wl3501_mgmt_join_confirm()
905 wl3501_mgmt_start(this); wl3501_mgmt_join_confirm()
907 wl3501_mgmt_scan(this, 100); wl3501_mgmt_join_confirm()
914 struct wl3501_card *this) wl3501_alarm_interrupt()
916 if (this->net_type == IW_MODE_INFRA) { wl3501_alarm_interrupt()
919 wl3501_mgmt_resync(this); wl3501_alarm_interrupt()
924 struct wl3501_card *this, wl3501_md_confirm_interrupt()
930 wl3501_get_from_wla(this, addr, &sig, sizeof(sig)); wl3501_md_confirm_interrupt()
931 wl3501_free_tx_buffer(this, sig.data); wl3501_md_confirm_interrupt()
937 struct wl3501_card *this, u16 addr) wl3501_md_ind_interrupt()
944 wl3501_get_from_wla(this, addr, &sig, sizeof(sig)); wl3501_md_ind_interrupt()
945 this->start_seg = sig.data; wl3501_md_ind_interrupt()
946 wl3501_get_from_wla(this, wl3501_md_ind_interrupt()
949 this->rssi = rssi <= 63 ? (rssi * 100) / 64 : 255; wl3501_md_ind_interrupt()
951 wl3501_get_from_wla(this, wl3501_md_ind_interrupt()
972 wl3501_receive(this, skb->data, pkt_len); wl3501_md_ind_interrupt()
981 static inline void wl3501_get_confirm_interrupt(struct wl3501_card *this, wl3501_get_confirm_interrupt() argument
985 wl3501_get_from_wla(this, addr, &this->sig_get_confirm, wl3501_get_confirm_interrupt()
986 sizeof(this->sig_get_confirm)); wl3501_get_confirm_interrupt()
987 wake_up(&this->wait); wl3501_get_confirm_interrupt()
991 struct wl3501_card *this, wl3501_start_confirm_interrupt()
997 wl3501_get_from_wla(this, addr, &sig, sizeof(sig)); wl3501_start_confirm_interrupt()
1005 struct wl3501_card *this = netdev_priv(dev); wl3501_assoc_confirm_interrupt() local
1009 wl3501_get_from_wla(this, addr, &sig, sizeof(sig)); wl3501_assoc_confirm_interrupt()
1015 static inline void wl3501_auth_confirm_interrupt(struct wl3501_card *this, wl3501_auth_confirm_interrupt() argument
1021 wl3501_get_from_wla(this, addr, &sig, sizeof(sig)); wl3501_auth_confirm_interrupt()
1024 wl3501_mgmt_association(this); wl3501_auth_confirm_interrupt()
1026 wl3501_mgmt_resync(this); wl3501_auth_confirm_interrupt()
1034 struct wl3501_card *this = netdev_priv(dev); wl3501_rx_interrupt() local
1039 if (!wl3501_esbq_confirm(this)) wl3501_rx_interrupt()
1041 wl3501_get_from_wla(this, this->esbq_confirm, &addr, sizeof(addr)); wl3501_rx_interrupt()
1042 wl3501_get_from_wla(this, addr + 2, &sig_id, sizeof(sig_id)); wl3501_rx_interrupt()
1048 wl3501_alarm_interrupt(dev, this); wl3501_rx_interrupt()
1051 wl3501_md_confirm_interrupt(dev, this, addr); wl3501_rx_interrupt()
1054 wl3501_md_ind_interrupt(dev, this, addr); wl3501_rx_interrupt()
1057 wl3501_get_confirm_interrupt(this, addr, wl3501_rx_interrupt()
1058 &this->sig_get_confirm, wl3501_rx_interrupt()
1059 sizeof(this->sig_get_confirm)); wl3501_rx_interrupt()
1062 wl3501_get_confirm_interrupt(this, addr, wl3501_rx_interrupt()
1063 &this->sig_pwr_mgmt_confirm, wl3501_rx_interrupt()
1064 sizeof(this->sig_pwr_mgmt_confirm)); wl3501_rx_interrupt()
1067 wl3501_start_confirm_interrupt(dev, this, addr); wl3501_rx_interrupt()
1070 wl3501_mgmt_scan_confirm(this, addr); wl3501_rx_interrupt()
1079 wl3501_auth_confirm_interrupt(this, addr); wl3501_rx_interrupt()
1082 wl3501_mgmt_resync(this); /* FIXME: should be resync_confirm */ wl3501_rx_interrupt()
1085 wl3501_esbq_confirm_done(this); wl3501_rx_interrupt()
1089 wl3501_esbq_req_free(this); wl3501_rx_interrupt()
1094 static inline void wl3501_ack_interrupt(struct wl3501_card *this) wl3501_ack_interrupt() argument
1096 wl3501_outb(WL3501_GCR_ECINT, this->base_addr + WL3501_NIC_GCR); wl3501_ack_interrupt()
1114 struct wl3501_card *this; wl3501_interrupt() local
1116 this = netdev_priv(dev); wl3501_interrupt()
1117 spin_lock(&this->lock); wl3501_interrupt()
1118 wl3501_ack_interrupt(this); wl3501_interrupt()
1119 wl3501_block_interrupt(this); wl3501_interrupt()
1121 wl3501_unblock_interrupt(this); wl3501_interrupt()
1122 spin_unlock(&this->lock); wl3501_interrupt()
1127 static int wl3501_reset_board(struct wl3501_card *this) wl3501_reset_board() argument
1133 wl3501_outb_p(WL3501_GCR_CORESET, this->base_addr + WL3501_NIC_GCR); wl3501_reset_board()
1134 wl3501_outb_p(0, this->base_addr + WL3501_NIC_GCR); wl3501_reset_board()
1135 wl3501_outb_p(WL3501_GCR_CORESET, this->base_addr + WL3501_NIC_GCR); wl3501_reset_board()
1138 wl3501_set_to_wla(this, 0x480, &tmp, sizeof(tmp)); wl3501_reset_board()
1141 wl3501_outb_p(0, this->base_addr + WL3501_NIC_GCR); wl3501_reset_board()
1145 wl3501_unblock_interrupt(this); /* acme: was commented */ wl3501_reset_board()
1149 wl3501_get_from_wla(this, 0x480, &tmp, sizeof(tmp)); wl3501_reset_board()
1154 wl3501_set_to_wla(this, 0x480, &tmp, sizeof(tmp)); wl3501_reset_board()
1165 static int wl3501_init_firmware(struct wl3501_card *this) wl3501_init_firmware() argument
1168 int rc = wl3501_reset_board(this); wl3501_init_firmware()
1172 this->card_name[0] = '\0'; wl3501_init_firmware()
1173 wl3501_get_from_wla(this, 0x1a00, wl3501_init_firmware()
1174 this->card_name, sizeof(this->card_name)); wl3501_init_firmware()
1175 this->card_name[sizeof(this->card_name) - 1] = '\0'; wl3501_init_firmware()
1176 this->firmware_date[0] = '\0'; wl3501_init_firmware()
1177 wl3501_get_from_wla(this, 0x1a40, wl3501_init_firmware()
1178 this->firmware_date, sizeof(this->firmware_date)); wl3501_init_firmware()
1179 this->firmware_date[sizeof(this->firmware_date) - 1] = '\0'; wl3501_init_firmware()
1181 wl3501_switch_page(this, WL3501_BSS_SPAGE0); wl3501_init_firmware()
1183 wl3501_get_from_wla(this, 0x482, &this->esbq_req_start, 2); wl3501_init_firmware()
1184 wl3501_get_from_wla(this, 0x486, &this->esbq_req_end, 2); wl3501_init_firmware()
1185 wl3501_get_from_wla(this, 0x488, &this->esbq_confirm_start, 2); wl3501_init_firmware()
1186 wl3501_get_from_wla(this, 0x48c, &this->esbq_confirm_end, 2); wl3501_init_firmware()
1187 wl3501_get_from_wla(this, 0x48e, &this->tx_buffer_head, 2); wl3501_init_firmware()
1188 wl3501_get_from_wla(this, 0x492, &this->tx_buffer_size, 2); wl3501_init_firmware()
1189 this->esbq_req_tail = this->esbq_req_head = this->esbq_req_start; wl3501_init_firmware()
1190 this->esbq_req_end += this->esbq_req_start; wl3501_init_firmware()
1191 this->esbq_confirm = this->esbq_confirm_start; wl3501_init_firmware()
1192 this->esbq_confirm_end += this->esbq_confirm_start; wl3501_init_firmware()
1194 this->tx_buffer_cnt = 1; wl3501_init_firmware()
1195 ptr = this->tx_buffer_head; wl3501_init_firmware()
1197 while ((next - this->tx_buffer_head) < this->tx_buffer_size) { wl3501_init_firmware()
1198 this->tx_buffer_cnt++; wl3501_init_firmware()
1199 wl3501_set_to_wla(this, ptr, &next, sizeof(next)); wl3501_init_firmware()
1205 wl3501_set_to_wla(this, ptr, &next, sizeof(next)); wl3501_init_firmware()
1206 this->tx_buffer_tail = ptr; wl3501_init_firmware()
1216 struct wl3501_card *this = netdev_priv(dev); wl3501_close() local
1220 link = this->p_dev; wl3501_close()
1222 spin_lock_irqsave(&this->lock, flags); wl3501_close()
1227 wl3501_ack_interrupt(this); wl3501_close()
1230 wl3501_block_interrupt(this); wl3501_close()
1234 spin_unlock_irqrestore(&this->lock, flags); wl3501_close()
1248 struct wl3501_card *this = netdev_priv(dev); wl3501_reset() local
1251 wl3501_block_interrupt(this); wl3501_reset()
1253 if (wl3501_init_firmware(this)) { wl3501_reset()
1265 this->adhoc_times = 0; wl3501_reset()
1266 wl3501_ack_interrupt(this); wl3501_reset()
1267 wl3501_unblock_interrupt(this); wl3501_reset()
1268 wl3501_mgmt_scan(this, 100); wl3501_reset()
1277 struct wl3501_card *this = netdev_priv(dev); wl3501_tx_timeout() local
1283 spin_lock_irqsave(&this->lock, flags); wl3501_tx_timeout()
1285 spin_unlock_irqrestore(&this->lock, flags); wl3501_tx_timeout()
1304 struct wl3501_card *this = netdev_priv(dev); wl3501_hard_start_xmit() local
1307 spin_lock_irqsave(&this->lock, flags); wl3501_hard_start_xmit()
1308 enabled = wl3501_block_interrupt(this); wl3501_hard_start_xmit()
1309 rc = wl3501_send_pkt(this, skb->data, skb->len); wl3501_hard_start_xmit()
1311 wl3501_unblock_interrupt(this); wl3501_hard_start_xmit()
1320 if (this->tx_buffer_cnt < 2) wl3501_hard_start_xmit()
1323 spin_unlock_irqrestore(&this->lock, flags); wl3501_hard_start_xmit()
1330 struct wl3501_card *this = netdev_priv(dev); wl3501_open() local
1333 link = this->p_dev; wl3501_open()
1335 spin_lock_irqsave(&this->lock, flags); wl3501_open()
1343 if (wl3501_init_firmware(this)) wl3501_open()
1346 this->adhoc_times = 0; wl3501_open()
1348 wl3501_ack_interrupt(this); wl3501_open()
1351 wl3501_unblock_interrupt(this); wl3501_open()
1352 wl3501_mgmt_scan(this, 100); wl3501_open()
1357 dev->name, this->card_name, wl3501_open()
1358 dev->name, this->firmware_date); wl3501_open()
1360 spin_unlock_irqrestore(&this->lock, flags); wl3501_open()
1369 struct wl3501_card *this = netdev_priv(dev); wl3501_get_wireless_stats() local
1370 struct iw_statistics *wstats = &this->wstats; wl3501_get_wireless_stats()
1375 if (!wl3501_get_mib_value(this, WL3501_MIB_ATTR_WEP_ICV_ERROR_COUNT, wl3501_get_wireless_stats()
1378 if (!wl3501_get_mib_value(this, WL3501_MIB_ATTR_WEP_UNDECRYPTABLE_COUNT, wl3501_get_wireless_stats()
1381 if (!wl3501_get_mib_value(this, WL3501_MIB_ATTR_WEP_EXCLUDED_COUNT, wl3501_get_wireless_stats()
1384 if (!wl3501_get_mib_value(this, WL3501_MIB_ATTR_RETRY_COUNT, wl3501_get_wireless_stats()
1387 if (!wl3501_get_mib_value(this, WL3501_MIB_ATTR_FAILED_COUNT, wl3501_get_wireless_stats()
1390 if (!wl3501_get_mib_value(this, WL3501_MIB_ATTR_RTS_FAILURE_COUNT, wl3501_get_wireless_stats()
1393 if (!wl3501_get_mib_value(this, WL3501_MIB_ATTR_ACK_FAILURE_COUNT, wl3501_get_wireless_stats()
1396 if (!wl3501_get_mib_value(this, WL3501_MIB_ATTR_FRAME_DUPLICATE_COUNT, wl3501_get_wireless_stats()
1440 struct wl3501_card *this = netdev_priv(dev); wl3501_set_freq() local
1444 if (iw_valid_channel(this->reg_domain, channel)) { wl3501_set_freq()
1445 this->chan = channel; wl3501_set_freq()
1454 struct wl3501_card *this = netdev_priv(dev); wl3501_get_freq() local
1457 ieee80211_channel_to_frequency(this->chan, IEEE80211_BAND_2GHZ); wl3501_get_freq()
1470 struct wl3501_card *this = netdev_priv(dev); wl3501_set_mode() local
1472 this->net_type = wrqu->mode; wl3501_set_mode()
1481 struct wl3501_card *this = netdev_priv(dev); wl3501_get_mode() local
1483 wrqu->mode = this->net_type; wl3501_get_mode()
1490 struct wl3501_card *this = netdev_priv(dev); wl3501_get_sens() local
1492 wrqu->sens.value = this->rssi; wl3501_get_sens()
1521 struct wl3501_card *this = netdev_priv(dev); wl3501_set_wap() local
1530 memcpy(this->bssid, wrqu->ap_addr.sa_data, ETH_ALEN); wl3501_set_wap()
1540 struct wl3501_card *this = netdev_priv(dev); wl3501_get_wap() local
1543 memcpy(wrqu->ap_addr.sa_data, this->bssid, ETH_ALEN); wl3501_get_wap()
1559 struct wl3501_card *this = netdev_priv(dev); wl3501_get_scan() local
1564 for (i = 0; i < this->bss_cnt; ++i) { wl3501_get_scan()
1567 memcpy(iwe.u.ap_addr.sa_data, this->bss_set[i].bssid, ETH_ALEN); wl3501_get_scan()
1573 iwe.u.data.length = this->bss_set[i].ssid.el.len; wl3501_get_scan()
1577 this->bss_set[i].ssid.essid); wl3501_get_scan()
1579 iwe.u.mode = this->bss_set[i].bss_type; wl3501_get_scan()
1584 iwe.u.freq.m = this->bss_set[i].ds_pset.chan; wl3501_get_scan()
1590 if (this->bss_set[i].cap_info & WL3501_MGMT_CAPABILITY_PRIVACY) wl3501_get_scan()
1609 struct wl3501_card *this = netdev_priv(dev); wl3501_set_essid() local
1613 &this->essid.el, wl3501_set_essid()
1617 &this->essid.el, "ANY", 3); wl3501_set_essid()
1626 struct wl3501_card *this = netdev_priv(dev); wl3501_get_essid() local
1629 spin_lock_irqsave(&this->lock, flags); wl3501_get_essid()
1631 wrqu->essid.length = this->essid.el.len; wl3501_get_essid()
1632 memcpy(extra, this->essid.essid, this->essid.el.len); wl3501_get_essid()
1633 spin_unlock_irqrestore(&this->lock, flags); wl3501_get_essid()
1640 struct wl3501_card *this = netdev_priv(dev); wl3501_set_nick() local
1642 if (wrqu->data.length > sizeof(this->nick)) wl3501_set_nick()
1644 strlcpy(this->nick, extra, wrqu->data.length); wl3501_set_nick()
1651 struct wl3501_card *this = netdev_priv(dev); wl3501_get_nick() local
1653 strlcpy(extra, this->nick, 32); wl3501_get_nick()
1662 * FIXME: have to see from where to get this info, perhaps this card wl3501_get_rate()
1676 struct wl3501_card *this = netdev_priv(dev); wl3501_get_rts_threshold() local
1677 int rc = wl3501_get_mib_value(this, WL3501_MIB_ATTR_RTS_THRESHOLD, wl3501_get_rts_threshold()
1692 struct wl3501_card *this = netdev_priv(dev); wl3501_get_frag_threshold() local
1693 int rc = wl3501_get_mib_value(this, WL3501_MIB_ATTR_FRAG_THRESHOLD, wl3501_get_frag_threshold()
1708 struct wl3501_card *this = netdev_priv(dev); wl3501_get_txpow() local
1709 int rc = wl3501_get_mib_value(this, wl3501_get_txpow()
1716 * From the MIB values I think this can be configurable, wl3501_get_txpow()
1730 struct wl3501_card *this = netdev_priv(dev); wl3501_get_retry() local
1731 int rc = wl3501_get_mib_value(this, wl3501_get_retry()
1740 rc = wl3501_get_mib_value(this, WL3501_MIB_ATTR_SHORT_RETRY_LIMIT, wl3501_get_retry()
1757 struct wl3501_card *this = netdev_priv(dev); wl3501_get_encode() local
1758 int rc = wl3501_get_mib_value(this, wl3501_get_encode()
1767 rc = wl3501_get_mib_value(this, WL3501_MIB_ATTR_EXCLUDE_UNENCRYPTED, wl3501_get_encode()
1773 rc = wl3501_get_mib_value(this, WL3501_MIB_ATTR_WEP_KEY_MAPPINGS_LEN, wl3501_get_encode()
1777 rc = wl3501_get_mib_value(this, WL3501_MIB_ATTR_WEP_KEY_MAPPINGS, wl3501_get_encode()
1794 struct wl3501_card *this = netdev_priv(dev); wl3501_get_power() local
1795 int rc = wl3501_get_mib_value(this, wl3501_get_power()
1854 struct wl3501_card *this; wl3501_probe() local
1872 this = netdev_priv(dev); wl3501_probe()
1873 this->wireless_data.spy_data = &this->spy_data; wl3501_probe()
1874 this->p_dev = p_dev; wl3501_probe()
1875 dev->wireless_data = &this->wireless_data; wl3501_probe()
1889 struct wl3501_card *this; wl3501_config() local
1898 * 0x200-0x2ff, and so on, because this seems safer */ wl3501_config()
1908 /* Now allocate an interrupt line. Note that this does not actually wl3501_config()
1927 this = netdev_priv(dev); wl3501_config()
1929 this->base_addr = dev->base_addr; wl3501_config()
1931 if (!wl3501_get_flash_mac_addr(this)) { wl3501_config()
1939 dev->dev_addr[i] = ((char *)&this->mac_addr)[i]; wl3501_config()
1944 dev->name, this->base_addr, (int)dev->irq, wl3501_config()
1949 this->net_type = IW_MODE_INFRA; wl3501_config()
1950 this->bss_cnt = 0; wl3501_config()
1951 this->join_sta_bss = 0; wl3501_config()
1952 this->adhoc_times = 0; wl3501_config()
1953 iw_set_mgmt_info_element(IW_MGMT_INFO_ELEMENT_SSID, &this->essid.el, wl3501_config()
1955 this->card_name[0] = '\0'; wl3501_config()
1956 this->firmware_date[0] = '\0'; wl3501_config()
1957 this->rssi = 255; wl3501_config()
1958 this->chan = iw_default_channel(this->reg_domain); wl3501_config()
1959 strlcpy(this->nick, "Planet WL3501", sizeof(this->nick)); wl3501_config()
1960 spin_lock_init(&this->lock); wl3501_config()
1961 init_waitqueue_head(&this->wait); wl3501_config()
913 wl3501_alarm_interrupt(struct net_device *dev, struct wl3501_card *this) wl3501_alarm_interrupt() argument
923 wl3501_md_confirm_interrupt(struct net_device *dev, struct wl3501_card *this, u16 addr) wl3501_md_confirm_interrupt() argument
936 wl3501_md_ind_interrupt(struct net_device *dev, struct wl3501_card *this, u16 addr) wl3501_md_ind_interrupt() argument
990 wl3501_start_confirm_interrupt(struct net_device *dev, struct wl3501_card *this, u16 addr) wl3501_start_confirm_interrupt() argument
/linux-4.1.27/arch/x86/include/asm/
H A Dshmparam.h4 #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
H A Dsimd.h5 * may_use_simd - whether it is allowable at this time to issue SIMD
H A Dia32_unistd.h6 * this is for the kernel only.
/linux-4.1.27/include/uapi/asm-generic/
H A Dshmparam.h4 #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
H A Dbitsperlong.h5 * There seems to be no way of detecting this automatically from user
6 * space, so 64 bit architectures should override this in their
/linux-4.1.27/include/linux/sunrpc/
H A Dgss_krb5_enctypes.h2 * Dumb way to share this static piece of information with nfsd
/linux-4.1.27/arch/mn10300/include/asm/
H A Dshmparam.h4 #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
H A Dspinlock_types.h5 # error "please don't include this file directly"
/linux-4.1.27/arch/powerpc/include/asm/
H A Dshmparam.h4 #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
H A Dspinlock_types.h5 # error "please don't include this file directly"
/linux-4.1.27/arch/avr32/include/asm/
H A Dshmparam.h4 #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
H A Dpci.h4 /* We don't support PCI yet, but some drivers require this file anyway */
H A Ddma.h4 /* The maximum address that we can perform a DMA transfer to on this platform.
/linux-4.1.27/arch/frv/include/asm/
H A Dshmparam.h4 #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
/linux-4.1.27/arch/m32r/include/asm/
H A Dshmparam.h4 #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
H A Ddma.h8 * to on this platform
H A Dspinlock_types.h5 # error "please don't include this file directly"
/linux-4.1.27/arch/alpha/include/asm/
H A Dshmparam.h4 #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
H A Dspinlock_types.h5 # error "please don't include this file directly"
/linux-4.1.27/fs/jffs2/
H A Dnodelist.c8 * For licensing information, see the file 'LICENCE' in this directory.
24 struct jffs2_node_frag *this);
102 struct jffs2_node_frag *this) jffs2_obsolete_node_frag()
104 if (this->node) { jffs2_obsolete_node_frag()
105 this->node->frags--; jffs2_obsolete_node_frag()
106 if (!this->node->frags) { jffs2_obsolete_node_frag()
109 ref_offset(this->node->raw), this->node->ofs, this->node->ofs+this->node->size); jffs2_obsolete_node_frag()
110 jffs2_mark_node_obsolete(c, this->node->raw); jffs2_obsolete_node_frag()
111 jffs2_free_full_dnode(this->node); jffs2_obsolete_node_frag()
114 ref_offset(this->node->raw), this->node->ofs, this->node->ofs+this->node->size, this->node->frags); jffs2_obsolete_node_frag()
115 mark_ref_normal(this->node->raw); jffs2_obsolete_node_frag()
119 jffs2_free_node_frag(this); jffs2_obsolete_node_frag()
171 struct jffs2_node_frag *this, uint32_t lastend) no_overlapping_node()
183 if (this) { no_overlapping_node()
184 /* By definition, the 'this' node has no right-hand child, no_overlapping_node()
189 rb_link_node(&holefrag->rb, &this->rb, &this->rb.rb_right); no_overlapping_node()
196 this = holefrag; no_overlapping_node()
199 if (this) { no_overlapping_node()
200 /* By definition, the 'this' node has no right-hand child, no_overlapping_node()
204 rb_link_node(&newfrag->rb, &this->rb, &this->rb.rb_right); no_overlapping_node()
217 struct jffs2_node_frag *this; jffs2_add_frag_to_fragtree() local
220 /* Skip all the nodes which are completed before this one starts */ jffs2_add_frag_to_fragtree()
221 this = jffs2_lookup_node_frag(root, newfrag->node->ofs); jffs2_add_frag_to_fragtree()
223 if (this) { jffs2_add_frag_to_fragtree()
225 this->ofs, this->ofs+this->size, this->node?(ref_offset(this->node->raw)):0xffffffff, this); jffs2_add_frag_to_fragtree()
226 lastend = this->ofs + this->size; jffs2_add_frag_to_fragtree()
236 /* Check if 'this' node was on the same page as the new node. jffs2_add_frag_to_fragtree()
237 If so, both 'this' and the new node get marked REF_NORMAL so jffs2_add_frag_to_fragtree()
241 if (this->node) jffs2_add_frag_to_fragtree()
242 mark_ref_normal(this->node->raw); jffs2_add_frag_to_fragtree()
246 return no_overlapping_node(c, root, newfrag, this, lastend); jffs2_add_frag_to_fragtree()
249 if (this->node) jffs2_add_frag_to_fragtree()
251 this->ofs, this->ofs + this->size, jffs2_add_frag_to_fragtree()
252 ref_offset(this->node->raw), ref_flags(this->node->raw)); jffs2_add_frag_to_fragtree()
255 this->ofs, this->ofs + this->size); jffs2_add_frag_to_fragtree()
257 /* OK. 'this' is pointing at the first frag that newfrag->ofs at least partially obsoletes, jffs2_add_frag_to_fragtree()
258 * - i.e. newfrag->ofs < this->ofs+this->size && newfrag->ofs >= this->ofs jffs2_add_frag_to_fragtree()
260 if (newfrag->ofs > this->ofs) { jffs2_add_frag_to_fragtree()
266 if (this->node) jffs2_add_frag_to_fragtree()
267 mark_ref_normal(this->node->raw); jffs2_add_frag_to_fragtree()
269 if (this->ofs + this->size > newfrag->ofs + newfrag->size) { jffs2_add_frag_to_fragtree()
270 /* The new node splits 'this' frag into two */ jffs2_add_frag_to_fragtree()
273 if (this->node) jffs2_add_frag_to_fragtree()
275 this->ofs, this->ofs+this->size, ref_offset(this->node->raw)); jffs2_add_frag_to_fragtree()
278 this->ofs, this->ofs+this->size); jffs2_add_frag_to_fragtree()
280 /* New second frag pointing to this's node */ jffs2_add_frag_to_fragtree()
281 newfrag2 = new_fragment(this->node, newfrag->ofs + newfrag->size, jffs2_add_frag_to_fragtree()
282 this->ofs + this->size - newfrag->ofs - newfrag->size); jffs2_add_frag_to_fragtree()
285 if (this->node) jffs2_add_frag_to_fragtree()
286 this->node->frags++; jffs2_add_frag_to_fragtree()
288 /* Adjust size of original 'this' */ jffs2_add_frag_to_fragtree()
289 this->size = newfrag->ofs - this->ofs; jffs2_add_frag_to_fragtree()
292 greater than this->ofs but smaller than jffs2_add_frag_to_fragtree()
295 'this' to insert newfrag, and a tree insert jffs2_add_frag_to_fragtree()
297 jffs2_fragtree_insert(newfrag, this); jffs2_add_frag_to_fragtree()
305 /* New node just reduces 'this' frag in size, doesn't split it */ jffs2_add_frag_to_fragtree()
306 this->size = newfrag->ofs - this->ofs; jffs2_add_frag_to_fragtree()
309 jffs2_fragtree_insert(newfrag, this); jffs2_add_frag_to_fragtree()
312 /* New frag starts at the same point as 'this' used to. Replace jffs2_add_frag_to_fragtree()
314 dbg_fragtree2("inserting newfrag (*%p),%d-%d in before 'this' (*%p),%d-%d\n", jffs2_add_frag_to_fragtree()
315 newfrag, newfrag->ofs, newfrag->ofs+newfrag->size, this, this->ofs, this->ofs+this->size); jffs2_add_frag_to_fragtree()
317 rb_replace_node(&this->rb, &newfrag->rb, root); jffs2_add_frag_to_fragtree()
319 if (newfrag->ofs + newfrag->size >= this->ofs+this->size) { jffs2_add_frag_to_fragtree()
320 dbg_fragtree2("obsoleting node frag %p (%x-%x)\n", this, this->ofs, this->ofs+this->size); jffs2_add_frag_to_fragtree()
321 jffs2_obsolete_node_frag(c, this); jffs2_add_frag_to_fragtree()
323 this->ofs += newfrag->size; jffs2_add_frag_to_fragtree()
324 this->size -= newfrag->size; jffs2_add_frag_to_fragtree()
326 jffs2_fragtree_insert(this, newfrag); jffs2_add_frag_to_fragtree()
327 rb_insert_color(&this->rb, root); jffs2_add_frag_to_fragtree()
334 while ((this = frag_next(newfrag)) && newfrag->ofs + newfrag->size >= this->ofs + this->size) { jffs2_add_frag_to_fragtree()
335 /* 'this' frag is obsoleted completely. */ jffs2_add_frag_to_fragtree()
337 this, this->ofs, this->ofs+this->size); jffs2_add_frag_to_fragtree()
338 rb_erase(&this->rb, root); jffs2_add_frag_to_fragtree()
339 jffs2_obsolete_node_frag(c, this); jffs2_add_frag_to_fragtree()
344 if (!this || newfrag->ofs + newfrag->size == this->ofs) jffs2_add_frag_to_fragtree()
348 this->size = (this->ofs + this->size) - (newfrag->ofs + newfrag->size); jffs2_add_frag_to_fragtree()
349 this->ofs = newfrag->ofs + newfrag->size; jffs2_add_frag_to_fragtree()
352 if (this->node) jffs2_add_frag_to_fragtree()
353 mark_ref_normal(this->node->raw); jffs2_add_frag_to_fragtree()
416 /* During mount, this needs no locking. During normal operation, its
490 struct jffs2_inode_cache *this, *next; jffs2_free_ino_caches() local
493 this = c->inocache_list[i]; jffs2_free_ino_caches()
494 while (this) { jffs2_free_ino_caches()
495 next = this->next; jffs2_free_ino_caches()
496 jffs2_xattr_free_inode(c, this); jffs2_free_ino_caches()
497 jffs2_free_inode_cache(this); jffs2_free_ino_caches()
498 this = next; jffs2_free_ino_caches()
507 struct jffs2_raw_node_ref *this, *next; jffs2_free_raw_node_refs() local
510 this = c->blocks[i].first_node; jffs2_free_raw_node_refs()
511 while (this) { jffs2_free_raw_node_refs()
512 if (this[REFS_PER_BLOCK].flash_offset == REF_LINK_NODE) jffs2_free_raw_node_refs()
513 next = this[REFS_PER_BLOCK].next_in_ino; jffs2_free_raw_node_refs()
517 jffs2_free_refblock(this); jffs2_free_raw_node_refs()
518 this = next; jffs2_free_raw_node_refs()
573 of this node. Free the node */ rbtree_postorder_for_each_entry_safe()
101 jffs2_obsolete_node_frag(struct jffs2_sb_info *c, struct jffs2_node_frag *this) jffs2_obsolete_node_frag() argument
169 no_overlapping_node(struct jffs2_sb_info *c, struct rb_root *root, struct jffs2_node_frag *newfrag, struct jffs2_node_frag *this, uint32_t lastend) no_overlapping_node() argument
H A Dcompr.c11 * For licensing information, see the file 'LICENCE' in this directory.
21 /* Available compressors are on this list */
32 * Return 1 to use this compression
34 static int jffs2_is_best_compression(struct jffs2_compressor *this, jffs2_is_best_compression() argument
43 if ((this->compr == JFFS2_COMPR_LZO) && (bestsize > size)) jffs2_is_best_compression()
47 if ((this->compr == JFFS2_COMPR_LZO) && (bestsize > (size * FAVOUR_LZO_PERCENT / 100))) jffs2_is_best_compression()
77 struct jffs2_compressor *this; jffs2_selected_compress() local
90 list_for_each_entry(this, &jffs2_compressor_list, list) { jffs2_selected_compress()
92 if (!this->compress || this->disabled) jffs2_selected_compress()
96 if (compr && (compr != this->compr)) jffs2_selected_compress()
103 this->usecount++; jffs2_selected_compress()
108 err = this->compress(data_in, output_buf, datalen, cdatalen); jffs2_selected_compress()
111 this->usecount--; jffs2_selected_compress()
114 ret = this->compr; jffs2_selected_compress()
115 this->stat_compr_blocks++; jffs2_selected_compress()
116 this->stat_compr_orig_size += *datalen; jffs2_selected_compress()
117 this->stat_compr_new_size += *cdatalen; jffs2_selected_compress()
154 struct jffs2_compressor *this, *best=NULL; jffs2_compress() local
176 list_for_each_entry(this, &jffs2_compressor_list, list) { jffs2_compress()
178 if ((!this->compress)||(this->disabled)) jffs2_compress()
181 if ((this->compr_buf_size < orig_slen) && (this->compr_buf)) { jffs2_compress()
183 kfree(this->compr_buf); jffs2_compress()
185 this->compr_buf_size=0; jffs2_compress()
186 this->compr_buf=NULL; jffs2_compress()
188 if (!this->compr_buf) { jffs2_compress()
198 this->compr_buf = tmp_buf; jffs2_compress()
199 this->compr_buf_size = orig_slen; jffs2_compress()
202 this->usecount++; jffs2_compress()
206 compr_ret = this->compress(data_in, this->compr_buf, datalen, cdatalen); jffs2_compress()
208 this->usecount--; jffs2_compress()
210 if (((!best_dlen) || jffs2_is_best_compression(this, best, *cdatalen, best_dlen)) jffs2_compress()
214 best = this; jffs2_compress()
257 struct jffs2_compressor *this; jffs2_decompress() local
276 list_for_each_entry(this, &jffs2_compressor_list, list) { jffs2_decompress()
277 if (comprtype == this->compr) { jffs2_decompress()
278 this->usecount++; jffs2_decompress()
280 ret = this->decompress(cdata_in, data_out, cdatalen, datalen); jffs2_decompress()
284 this->name, ret); jffs2_decompress()
287 this->stat_decompr_blocks++; jffs2_decompress()
289 this->usecount--; jffs2_decompress()
303 struct jffs2_compressor *this; jffs2_register_compressor() local
320 list_for_each_entry(this, &jffs2_compressor_list, list) { jffs2_register_compressor()
321 if (this->priority < comp->priority) { jffs2_register_compressor()
322 list_add(&comp->list, this->list.prev); jffs2_register_compressor()
328 D2(list_for_each_entry(this, &jffs2_compressor_list, list) { jffs2_register_compressor()
329 printk(KERN_DEBUG "Compressor \"%s\", prio %d\n", this->name, this->priority); jffs2_register_compressor()
339 D2(struct jffs2_compressor *this); jffs2_unregister_compressor()
352 D2(list_for_each_entry(this, &jffs2_compressor_list, list) { jffs2_unregister_compressor()
353 printk(KERN_DEBUG "Compressor \"%s\", prio %d\n", this->name, this->priority); jffs2_unregister_compressor()
H A Dreadinode.c8 * For licensing information, see the file 'LICENCE' in this directory.
83 /* TODO: this is very frequent pattern, make it a separate check_node_data()
210 * bother to keep track of holes in this rbtree, and neither do we deal
223 struct jffs2_tmp_dnode_info *this, *ptn; jffs2_add_tn_to_tree() local
249 /* Find the earliest node which _may_ be relevant to this one */ jffs2_add_tn_to_tree()
250 this = jffs2_lookup_tn(&rii->tn_root, tn->fn->ofs); jffs2_add_tn_to_tree()
251 if (this) { jffs2_add_tn_to_tree()
254 while (this->overlapped) { jffs2_add_tn_to_tree()
255 ptn = tn_prev(this); jffs2_add_tn_to_tree()
261 this->overlapped = 0; jffs2_add_tn_to_tree()
264 this = ptn; jffs2_add_tn_to_tree()
266 dbg_readinode("'this' found %#04x-%#04x (%s)\n", this->fn->ofs, this->fn->ofs + this->fn->size, this->fn ? "data" : "hole"); jffs2_add_tn_to_tree()
269 while (this) { jffs2_add_tn_to_tree()
270 if (this->fn->ofs > fn_end) jffs2_add_tn_to_tree()
272 dbg_readinode("Ponder this ver %d, 0x%x-0x%x\n", jffs2_add_tn_to_tree()
273 this->version, this->fn->ofs, this->fn->size); jffs2_add_tn_to_tree()
275 if (this->version == tn->version) { jffs2_add_tn_to_tree()
278 if (!check_tn_node(c, this)) { jffs2_add_tn_to_tree()
286 rb_replace_node(&this->rb, &tn->rb, &rii->tn_root); jffs2_add_tn_to_tree()
287 jffs2_kill_tn(c, this); jffs2_add_tn_to_tree()
292 if (this->version < tn->version && jffs2_add_tn_to_tree()
293 this->fn->ofs >= tn->fn->ofs && jffs2_add_tn_to_tree()
294 this->fn->ofs + this->fn->size <= fn_end) { jffs2_add_tn_to_tree()
295 /* New node entirely overlaps 'this' */ jffs2_add_tn_to_tree()
301 /* ... and is good. Kill 'this' and any subsequent nodes which are also overlapped */ jffs2_add_tn_to_tree()
302 while (this && this->fn->ofs + this->fn->size <= fn_end) { jffs2_add_tn_to_tree()
303 struct jffs2_tmp_dnode_info *next = tn_next(this); jffs2_add_tn_to_tree()
304 if (this->version < tn->version) { jffs2_add_tn_to_tree()
305 tn_erase(this, &rii->tn_root); jffs2_add_tn_to_tree()
307 this->version, this->fn->ofs, jffs2_add_tn_to_tree()
308 this->fn->ofs+this->fn->size); jffs2_add_tn_to_tree()
309 jffs2_kill_tn(c, this); jffs2_add_tn_to_tree()
311 this = next; jffs2_add_tn_to_tree()
316 if (this->version > tn->version && jffs2_add_tn_to_tree()
317 this->fn->ofs <= tn->fn->ofs && jffs2_add_tn_to_tree()
318 this->fn->ofs+this->fn->size >= fn_end) { jffs2_add_tn_to_tree()
319 /* New node entirely overlapped by 'this' */ jffs2_add_tn_to_tree()
320 if (!check_tn_node(c, this)) { jffs2_add_tn_to_tree()
325 /* ... but 'this' was bad. Replace it... */ jffs2_add_tn_to_tree()
327 tn_erase(this, &rii->tn_root); jffs2_add_tn_to_tree()
328 jffs2_kill_tn(c, this); jffs2_add_tn_to_tree()
332 this = tn_next(this); jffs2_add_tn_to_tree()
358 this = tn_prev(tn); jffs2_add_tn_to_tree()
359 if (this) { jffs2_add_tn_to_tree()
361 if (this->fn->ofs + this->fn->size > tn->fn->ofs) { jffs2_add_tn_to_tree()
363 this, this->version, this->fn->ofs, jffs2_add_tn_to_tree()
364 this->fn->ofs+this->fn->size); jffs2_add_tn_to_tree()
368 if (!this->overlapped) jffs2_add_tn_to_tree()
371 ptn = tn_prev(this); jffs2_add_tn_to_tree()
377 this->overlapped = 0; jffs2_add_tn_to_tree()
380 this = ptn; jffs2_add_tn_to_tree()
385 this = tn_next(tn); jffs2_add_tn_to_tree()
386 while (this && this->fn->ofs < fn_end) { jffs2_add_tn_to_tree()
387 this->overlapped = 1; jffs2_add_tn_to_tree()
389 this->version, this->fn->ofs, jffs2_add_tn_to_tree()
390 this->fn->ofs+this->fn->size); jffs2_add_tn_to_tree()
391 this = tn_next(this); jffs2_add_tn_to_tree()
398 child (if any) take its place under its parent. Since this is only done
455 struct jffs2_tmp_dnode_info *pen, *last, *this; jffs2_build_inode_fragtree() local
465 this = tn_last(&rii->tn_root); jffs2_build_inode_fragtree()
466 while (this) { jffs2_build_inode_fragtree()
467 dbg_readinode("tn %p ver %d range 0x%x-0x%x ov %d\n", this, this->version, this->fn->ofs, jffs2_build_inode_fragtree()
468 this->fn->ofs+this->fn->size, this->overlapped); jffs2_build_inode_fragtree()
469 this = tn_prev(this); jffs2_build_inode_fragtree()
493 this = tn_last(&ver_root); jffs2_build_inode_fragtree()
495 while (this) { jffs2_build_inode_fragtree()
498 vers_next = tn_prev(this); jffs2_build_inode_fragtree()
499 eat_last(&ver_root, &this->rb); jffs2_build_inode_fragtree()
500 if (check_tn_node(c, this)) { jffs2_build_inode_fragtree()
502 this->version, this->fn->ofs, jffs2_build_inode_fragtree()
503 this->fn->ofs+this->fn->size); jffs2_build_inode_fragtree()
504 jffs2_kill_tn(c, this); jffs2_build_inode_fragtree()
506 if (this->version > high_ver) { jffs2_build_inode_fragtree()
507 /* Note that this is different from the other jffs2_build_inode_fragtree()
508 highest_version, because this one is only jffs2_build_inode_fragtree()
511 high_ver = this->version; jffs2_build_inode_fragtree()
512 rii->latest_ref = this->fn->raw; jffs2_build_inode_fragtree()
515 this, this->version, this->fn->ofs, jffs2_build_inode_fragtree()
516 this->fn->ofs+this->fn->size, this->overlapped); jffs2_build_inode_fragtree()
518 ret = jffs2_add_full_dnode_to_inode(c, f, this->fn); jffs2_build_inode_fragtree()
524 vers_next = tn_prev(this); jffs2_build_inode_fragtree()
525 if (check_tn_node(c, this)) jffs2_build_inode_fragtree()
526 jffs2_mark_node_obsolete(c, this->fn->raw); jffs2_build_inode_fragtree()
527 jffs2_free_full_dnode(this->fn); jffs2_build_inode_fragtree()
528 jffs2_free_tmp_dnode_info(this); jffs2_build_inode_fragtree()
529 this = vers_next; jffs2_build_inode_fragtree()
530 if (!this) jffs2_build_inode_fragtree()
536 jffs2_free_tmp_dnode_info(this); jffs2_build_inode_fragtree()
538 this = vers_next; jffs2_build_inode_fragtree()
604 /* If we've never checked the CRCs on this node, check them now */ read_direntry()
722 /* If we've never checked the CRCs on this node, check them now */ read_dnode()
735 /* At this point we are supposed to check the data CRC read_dnode()
738 * figure this out, we need to walk all the nodes of read_dnode()
752 * Of course, this optimization only makes sense in case read_dnode()
792 * the space accounting now. For other nodes this will be done read_dnode()
874 JFFS2_ERROR("Node is {%04x,%04x,%08x,%08x}. Please report this error.\n", read_unknown()
957 with this ino. Perform a preliminary ordering on data nodes, throwing away
974 /* FIXME: in case of NOR and available ->point() this jffs2_get_inode_nodes()
999 * At this point we don't know the type of the node we're going jffs2_get_inode_nodes()
1010 * but this flash has some minimal I/O unit. It is jffs2_get_inode_nodes()
1139 /* Grab all nodes relevant to this ino */ jffs2_do_read_inode_internal()
1180 /* No data nodes for this inode. */ jffs2_do_read_inode_internal()
1205 /* FIXME: If this fails, there seems to be a memory leak. Find it. */ jffs2_do_read_inode_internal()
1242 Remove this when dwmw2 comes to his senses and stops jffs2_do_read_inode_internal()
1324 /* Scan the list of all nodes present for this ino, build map of versions, etc. */ jffs2_do_read_inode()
H A Dioctl.c9 * For licensing information, see the file 'LICENCE' in this directory.
18 /* Later, this will provide for lsattr.jffs2 and chattr.jffs2, which jffs2_ioctl()
H A Ddebug.c9 * For licensing information, see the file 'LICENCE' in this directory.
501 struct list_head *this; __jffs2_dbg_dump_block_lists_nolock() local
505 list_for_each(this, &c->clean_list) { __jffs2_dbg_dump_block_lists_nolock()
506 struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list); __jffs2_dbg_dump_block_lists_nolock()
523 struct list_head *this; __jffs2_dbg_dump_block_lists_nolock() local
527 list_for_each(this, &c->very_dirty_list) { __jffs2_dbg_dump_block_lists_nolock()
528 struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list); __jffs2_dbg_dump_block_lists_nolock()
546 struct list_head *this; __jffs2_dbg_dump_block_lists_nolock() local
550 list_for_each(this, &c->dirty_list) { __jffs2_dbg_dump_block_lists_nolock()
551 struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list); __jffs2_dbg_dump_block_lists_nolock()
569 struct list_head *this; __jffs2_dbg_dump_block_lists_nolock() local
571 list_for_each(this, &c->erasable_list) { __jffs2_dbg_dump_block_lists_nolock()
572 struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list); __jffs2_dbg_dump_block_lists_nolock()
585 struct list_head *this; __jffs2_dbg_dump_block_lists_nolock() local
587 list_for_each(this, &c->erasing_list) { __jffs2_dbg_dump_block_lists_nolock()
588 struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list); __jffs2_dbg_dump_block_lists_nolock()
600 struct list_head *this; __jffs2_dbg_dump_block_lists_nolock() local
602 list_for_each(this, &c->erase_checking_list) { __jffs2_dbg_dump_block_lists_nolock()
603 struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list); __jffs2_dbg_dump_block_lists_nolock()
616 struct list_head *this; __jffs2_dbg_dump_block_lists_nolock() local
618 list_for_each(this, &c->erase_pending_list) { __jffs2_dbg_dump_block_lists_nolock()
619 struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list); __jffs2_dbg_dump_block_lists_nolock()
632 struct list_head *this; __jffs2_dbg_dump_block_lists_nolock() local
634 list_for_each(this, &c->erasable_pending_wbuf_list) { __jffs2_dbg_dump_block_lists_nolock()
635 struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list); __jffs2_dbg_dump_block_lists_nolock()
648 struct list_head *this; __jffs2_dbg_dump_block_lists_nolock() local
650 list_for_each(this, &c->free_list) { __jffs2_dbg_dump_block_lists_nolock()
651 struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list); __jffs2_dbg_dump_block_lists_nolock()
664 struct list_head *this; __jffs2_dbg_dump_block_lists_nolock() local
666 list_for_each(this, &c->bad_list) { __jffs2_dbg_dump_block_lists_nolock()
667 struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list); __jffs2_dbg_dump_block_lists_nolock()
680 struct list_head *this; __jffs2_dbg_dump_block_lists_nolock() local
682 list_for_each(this, &c->bad_used_list) { __jffs2_dbg_dump_block_lists_nolock()
683 struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list); __jffs2_dbg_dump_block_lists_nolock()
705 struct jffs2_node_frag *this = frag_first(&f->fragtree); __jffs2_dbg_dump_fragtree_nolock() local
710 while(this) { __jffs2_dbg_dump_fragtree_nolock()
711 if (this->node) __jffs2_dbg_dump_fragtree_nolock()
713 this->ofs, this->ofs+this->size, ref_offset(this->node->raw), __jffs2_dbg_dump_fragtree_nolock()
714 ref_flags(this->node->raw), this, frag_left(this), frag_right(this), __jffs2_dbg_dump_fragtree_nolock()
715 frag_parent(this)); __jffs2_dbg_dump_fragtree_nolock()
718 this->ofs, this->ofs+this->size, this, frag_left(this), __jffs2_dbg_dump_fragtree_nolock()
719 frag_right(this), frag_parent(this)); __jffs2_dbg_dump_fragtree_nolock()
720 if (this->ofs != lastofs) __jffs2_dbg_dump_fragtree_nolock()
722 lastofs = this->ofs + this->size; __jffs2_dbg_dump_fragtree_nolock()
723 this = frag_next(this); __jffs2_dbg_dump_fragtree_nolock()
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/core/
H A Dmm.c5 * copy of this software and associated documentation files (the "Software"),
11 * The above copyright notice and this permission notice shall be included in
50 struct nvkm_mm_node *this = *pthis; nvkm_mm_free() local
52 if (this) { nvkm_mm_free()
53 struct nvkm_mm_node *prev = node(this, prev); nvkm_mm_free()
54 struct nvkm_mm_node *next = node(this, next); nvkm_mm_free()
57 prev->length += this->length; nvkm_mm_free()
58 list_del(&this->nl_entry); nvkm_mm_free()
59 kfree(this); this = prev; nvkm_mm_free()
63 next->offset = this->offset; nvkm_mm_free()
64 next->length += this->length; nvkm_mm_free()
65 if (this->type == NVKM_MM_TYPE_NONE) nvkm_mm_free()
66 list_del(&this->fl_entry); nvkm_mm_free()
67 list_del(&this->nl_entry); nvkm_mm_free()
68 kfree(this); this = NULL; nvkm_mm_free()
71 if (this && this->type != NVKM_MM_TYPE_NONE) { nvkm_mm_free()
73 if (this->offset < prev->offset) nvkm_mm_free()
77 list_add_tail(&this->fl_entry, &prev->fl_entry); nvkm_mm_free()
78 this->type = NVKM_MM_TYPE_NONE; nvkm_mm_free()
114 struct nvkm_mm_node *prev, *this, *next; nvkm_mm_head() local
121 list_for_each_entry(this, &mm->free, fl_entry) { nvkm_mm_head()
123 if (this->heap != heap) nvkm_mm_head()
126 e = this->offset + this->length; nvkm_mm_head()
127 s = this->offset; nvkm_mm_head()
129 prev = node(this, prev); nvkm_mm_head()
133 next = node(this, next); nvkm_mm_head()
142 splitoff = s - this->offset; nvkm_mm_head()
143 if (splitoff && !region_head(mm, this, splitoff)) nvkm_mm_head()
146 this = region_head(mm, this, min(size_max, e - s)); nvkm_mm_head()
147 if (!this) nvkm_mm_head()
150 this->type = type; nvkm_mm_head()
151 list_del(&this->fl_entry); nvkm_mm_head()
152 *pnode = this; nvkm_mm_head()
188 struct nvkm_mm_node *prev, *this, *next; nvkm_mm_tail() local
193 list_for_each_entry_reverse(this, &mm->free, fl_entry) { nvkm_mm_tail()
194 u32 e = this->offset + this->length; nvkm_mm_tail()
195 u32 s = this->offset; nvkm_mm_tail()
198 if (this->heap != heap) nvkm_mm_tail()
202 prev = node(this, prev); nvkm_mm_tail()
206 next = node(this, next); nvkm_mm_tail()
221 if (c && !region_tail(mm, this, c)) nvkm_mm_tail()
224 this = region_tail(mm, this, a); nvkm_mm_tail()
225 if (!this) nvkm_mm_tail()
228 this->type = type; nvkm_mm_tail()
229 list_del(&this->fl_entry); nvkm_mm_tail()
230 *pnode = this; nvkm_mm_tail()
/linux-4.1.27/drivers/isdn/hardware/eicon/
H A Ddi.c22 along with this program; if not, write to the Free Software
81 ENTITY *this = NULL; pr_out() local
108 this = entity_ptr(a, e_no); pr_out()
110 if (!this) pr_out()
119 DBG_TRC((">A%d Id=0x%x Req=0x%x", ((ISDN_ADAPTER *)a->io)->ANum, this->Id, this->Req)) pr_out()
122 dbug(dprintf("out:Req=%x,Id=%x,Ch=%x", this->Req, this->Id, this->ReqCh)); pr_out()
127 if (!(a->tx_stream[this->Id] && pr_out()
128 this->Req == N_DATA)) { pr_out()
133 i = this->XCurrent; pr_out()
134 X = PTR_X(a, this); pr_out()
135 while (i < this->XNum && length < 270) { pr_out()
136 clength = min((word)(270 - length), (word)(X[i].PLength-this->XOffset)); pr_out()
139 PTR_P(a, this, &X[i].P[this->XOffset]), pr_out()
142 this->XOffset += clength; pr_out()
143 if (this->XOffset == X[i].PLength) { pr_out()
144 this->XCurrent = (byte)++i; pr_out()
145 this->XOffset = 0; pr_out()
150 i = this->XCurrent; pr_out()
151 X = PTR_X(a, this); pr_out()
152 while (i < this->XNum) { pr_out()
154 this->Id, pr_out()
155 PTR_P(a, this, &X[i].P[0]), pr_out()
157 ((i + 1) == this->XNum), pr_out()
159 this->XCurrent = (byte)++i; pr_out()
165 a->ram_out(a, &ReqOut->ReqId, this->Id); pr_out()
166 a->ram_out(a, &ReqOut->ReqCh, this->ReqCh); pr_out()
168 if (this->Id & 0x1f) { pr_out()
171 this->More++; pr_out()
172 if (i < this->XNum && this->MInd) { pr_out()
173 xdi_xlog_request(XDI_A_NR(a), this->Id, this->ReqCh, this->MInd, pr_out()
174 a->IdTypeTable[this->No]); pr_out()
175 a->ram_out(a, &ReqOut->Req, this->MInd); pr_out()
179 xdi_xlog_request(XDI_A_NR(a), this->Id, this->ReqCh, this->Req, pr_out()
180 a->IdTypeTable[this->No]); pr_out()
181 this->More |= XMOREF; pr_out()
182 a->ram_out(a, &ReqOut->Req, this->Req); pr_out()
184 if (a->FlowControlIdTable[this->ReqCh] == this->Id) pr_out()
185 a->FlowControlSkipTable[this->ReqCh] = true; pr_out()
189 if (this->Req == REMOVE) { pr_out()
193 /* if we did chaining, this entity is put back into the */ pr_out()
196 req_queue(a, this->No); pr_out()
202 this->MInd = 0; pr_out()
203 if (this->Id == BLLC_ID) this->MInd = LL_MDATA; pr_out()
204 if (this->Id == NL_ID || pr_out()
205 this->Id == TASK_ID || pr_out()
206 this->Id == MAN_ID pr_out()
207 ) this->MInd = N_MDATA; pr_out()
209 a->IdTypeTable[this->No] = this->Id; pr_out()
210 xdi_xlog_request(XDI_A_NR(a), this->Id, this->ReqCh, this->Req, this->Id); pr_out()
211 this->More |= XMOREF; pr_out()
212 a->ram_out(a, &ReqOut->Req, this->Req); pr_out()
214 assign_queue(a, this->No, a->ram_inw(a, &ReqOut->Reference)); pr_out()
226 if (this && (this->Req == UREMOVE) && this->Id) { pr_out()
227 Id = this->Id; pr_out()
236 this->Id = 0; pr_out()
310 /* indications from the same Id delivered in this interrupt */ pr_dpc()
364 ENTITY *this; isdn_rc() local
384 /* if we know this Id ... */ isdn_rc()
387 this = entity_ptr(a, e_no); isdn_rc()
388 xdi_xlog_rc_event(XDI_A_NR(a), Id, Ch, Rc, 0, a->IdTypeTable[this->No]); isdn_rc()
389 this->RcCh = Ch; isdn_rc()
413 this->Id = 0; isdn_rc()
417 If we send N_REMOVE in this state we will receive only RC==OK isdn_rc()
420 code corrects the counter of outstanding RC's in this case. isdn_rc()
422 if ((this->More & XMOREC) > 1) { isdn_rc()
423 this->More &= ~XMOREC; isdn_rc()
424 this->More |= 1; isdn_rc()
432 this->Rc = Rc; isdn_rc()
433 this->More &= ~(XBUSY | XMOREC); isdn_rc()
434 this->complete = 0xff; isdn_rc()
435 xdi_xlog_rc_event(XDI_A_NR(a), Id, Ch, Rc, 1, a->IdTypeTable[this->No]); isdn_rc()
436 CALLBACK(a, this); isdn_rc()
446 counter due to fact that it was no request for this return code, isdn_rc()
451 this->Rc = Rc; isdn_rc()
452 this->complete = 0xff; isdn_rc()
453 xdi_xlog_rc_event(XDI_A_NR(a), Id, Ch, Rc, 1, a->IdTypeTable[this->No]); isdn_rc()
456 CALLBACK(a, this); isdn_rc()
465 this->Rc = Rc; isdn_rc()
466 if (Ch == this->ReqCh) isdn_rc()
468 this->More &= ~(XBUSY | XMOREC); isdn_rc()
469 this->complete = 0xff; isdn_rc()
471 xdi_xlog_rc_event(XDI_A_NR(a), Id, Ch, Rc, 1, a->IdTypeTable[this->No]); isdn_rc()
472 CALLBACK(a, this); isdn_rc()
476 if (this->More & XMOREC) isdn_rc()
477 this->More--; isdn_rc()
479 if (((!cancel_rc) || (this->More & XMOREF)) && !(this->More & XMOREC)) { isdn_rc()
480 this->Rc = Rc; isdn_rc()
481 this->More &= ~XBUSY; isdn_rc()
482 this->complete = 0xff; isdn_rc()
483 xdi_xlog_rc_event(XDI_A_NR(a), Id, Ch, Rc, 1, a->IdTypeTable[this->No]); isdn_rc()
484 CALLBACK(a, this); isdn_rc()
493 this = entity_ptr(a, e_no); isdn_rc()
494 this->Id = Id; isdn_rc()
495 xdi_xlog_rc_event(XDI_A_NR(a), Id, Ch, Rc, 2, a->IdTypeTable[this->No]); isdn_rc()
497 this->Rc = Rc; isdn_rc()
498 this->More &= ~XBUSY; isdn_rc()
499 this->complete = 0xff; isdn_rc()
502 (a->IdTypeTable[this->No] == NL_ID) && isdn_rc()
519 a->misc_flags_table[this->No] |= DIVA_MISC_FLAGS_RX_DMA; isdn_rc()
523 a->misc_flags_table[this->No] &= ~DIVA_MISC_FLAGS_RX_DMA; isdn_rc()
532 a->misc_flags_table[this->No] &= ~DIVA_MISC_FLAGS_RX_DMA; isdn_rc()
535 CALLBACK(a, this); isdn_rc()
548 this->Id = 0; isdn_rc()
566 ENTITY *this; isdn_ind() local
579 this = entity_ptr(a, a->IdTable[Id]); isdn_ind()
580 this->IndCh = Ch; isdn_ind()
582 0/* rnr_valid */, 0 /* rnr */, a->IdTypeTable[this->No]); isdn_ind()
583 /* if the Receive More flag is not yet set, this is the */ isdn_ind()
585 if (this->RCurrent == 0xff) { isdn_ind()
587 if (Ind == this->MInd) { isdn_ind()
588 this->complete = 0; isdn_ind()
589 this->Ind = MInd; isdn_ind()
592 this->complete = 1; isdn_ind()
593 this->Ind = Ind; isdn_ind()
597 this->RLength = MLength; isdn_ind()
599 if ((a->rx_stream[this->Id] || isdn_ind()
600 (a->misc_flags_table[this->No] & DIVA_MISC_FLAGS_RX_DMA)) && isdn_ind()
604 if (a->misc_flags_table[this->No] & DIVA_MISC_FLAGS_RX_DMA) { isdn_ind()
609 (int)a->rx_stream[this->Id], (void **)&cma, &d); isdn_ind()
614 this->RLength = MLength = (word)*(dword *)cma; isdn_ind()
619 this->RLength = MLength = (word)diva_istream_read(a, isdn_ind()
627 this->complete = 0; isdn_ind()
629 this->complete = 1; isdn_ind()
632 this->RBuffer = (DBUFFER *)&IoAdapter->RBuffer; isdn_ind()
636 a->ram_look_ahead(a, RBuffer, this); isdn_ind()
638 this->RNum = 0; isdn_ind()
639 CALLBACK(a, this); isdn_ind()
642 this = entity_ptr(a, a->IdTable[Id]); isdn_ind()
644 1/* rnr_valid */, this->RNR/* rnr */, a->IdTypeTable[this->No]); isdn_ind()
646 if (this->RNR == 1) { isdn_ind()
647 this->RNR = 0; isdn_ind()
653 if (!this->RNR && !this->RNum) { isdn_ind()
655 2/* rnr_valid */, 0/* rnr */, a->IdTypeTable[this->No]); isdn_ind()
659 this->RCurrent = 0; isdn_ind()
660 this->ROffset = 0; isdn_ind()
662 if (this->RNR == 2) { isdn_ind()
663 if (Ind != this->MInd) { isdn_ind()
664 this->RCurrent = 0xff; isdn_ind()
665 this->RNR = 0; isdn_ind()
672 R = PTR_R(a, this); isdn_ind()
674 if (this->ROffset == R[this->RCurrent].PLength) { isdn_ind()
675 this->ROffset = 0; isdn_ind()
676 this->RCurrent++; isdn_ind()
679 clength = min(MLength, (word)(R[this->RCurrent].PLength-this->ROffset)); isdn_ind()
682 R[this->RCurrent].PLength-this->ROffset); isdn_ind()
684 if (R[this->RCurrent].P) { isdn_ind()
686 memcpy(PTR_P(a, this, &R[this->RCurrent].P[this->ROffset]), isdn_ind()
692 PTR_P(a, this, &R[this->RCurrent].P[this->ROffset]), isdn_ind()
697 this->ROffset += clength; isdn_ind()
708 if (Ind != this->MInd) { isdn_ind()
709 R[this->RCurrent].PLength = this->ROffset; isdn_ind()
710 if (this->ROffset) this->RCurrent++; isdn_ind()
711 this->RNum = this->RCurrent; isdn_ind()
712 this->RCurrent = 0xff; isdn_ind()
713 this->Ind = Ind; isdn_ind()
714 this->complete = 2; isdn_ind()
716 3/* rnr_valid */, 0/* rnr */, a->IdTypeTable[this->No]); isdn_ind()
717 CALLBACK(a, this); isdn_ind()
737 Id - Id of the entity that had sent this return code
738 Ch - Channel of the entity that had sent this return code
746 DELIVERY - have entered isdn_rc with this RC
748 for this RC
751 before of this message
752 type - the Id that was sent by the ASSIGN of this entity.
755 In this case the log.c is to be extended.
773 Id - Id of the entity that had sent this request
774 Ch - Channel of the entity that had sent this request
776 type - the Id that was sent by the ASSIGN of this entity.
779 In this case the log.c is to be extended.
796 Id - Id of the entity that had sent this indication
797 Ch - Channel of the entity that had sent this indication
810 this indication and will copy it self
815 type: the Id that was sent by the ASSIGN of this entity. This should
817 cause "?-" in the front of the request. In this case the
H A Dadapter.h12 struct list_head entity_q; /* entities linked to this adapter */
/linux-4.1.27/drivers/scsi/
H A Dg_NCR5380_mmio.c2 * There is probably a nicer way to do this but this one makes
/linux-4.1.27/net/caif/
H A Dcffrml.c37 struct cffrml *this = kzalloc(sizeof(struct cffrml), GFP_ATOMIC); cffrml_create() local
38 if (!this) cffrml_create()
40 this->pcpu_refcnt = alloc_percpu(int); cffrml_create()
41 if (this->pcpu_refcnt == NULL) { cffrml_create()
42 kfree(this); cffrml_create()
48 this->layer.receive = cffrml_receive; cffrml_create()
49 this->layer.transmit = cffrml_transmit; cffrml_create()
50 this->layer.ctrlcmd = cffrml_ctrlcmd; cffrml_create()
51 snprintf(this->layer.name, CAIF_LAYER_NAME_SZ, "frm%d", phyid); cffrml_create()
52 this->dofcs = use_fcs; cffrml_create()
53 this->layer.id = phyid; cffrml_create()
54 return (struct cflayer *) this; cffrml_create()
59 struct cffrml *this = container_obj(layer); cffrml_free() local
60 free_percpu(this->pcpu_refcnt); cffrml_free()
64 void cffrml_set_uplayer(struct cflayer *this, struct cflayer *up) cffrml_set_uplayer() argument
66 this->up = up; cffrml_set_uplayer()
69 void cffrml_set_dnlayer(struct cflayer *this, struct cflayer *dn) cffrml_set_dnlayer() argument
71 this->dn = dn; cffrml_set_dnlayer()
88 struct cffrml *this; cffrml_receive() local
89 this = container_obj(layr); cffrml_receive()
95 if (!this->dofcs) cffrml_receive()
108 if (this->dofcs) { cffrml_receive()
143 struct cffrml *this = container_obj(layr); cffrml_transmit() local
144 if (this->dofcs) { cffrml_transmit()
178 struct cffrml *this = container_obj(layr); cffrml_put() local
179 if (layr != NULL && this->pcpu_refcnt != NULL) cffrml_put()
180 this_cpu_dec(*this->pcpu_refcnt); cffrml_put()
185 struct cffrml *this = container_obj(layr); cffrml_hold() local
186 if (layr != NULL && this->pcpu_refcnt != NULL) cffrml_hold()
187 this_cpu_inc(*this->pcpu_refcnt); cffrml_hold()
193 struct cffrml *this = container_obj(layr); cffrml_refcnt_read() local
195 refcnt += *per_cpu_ptr(this->pcpu_refcnt, i); cffrml_refcnt_read()
H A Dcaif_usb.c88 struct cfusbl *this = kmalloc(sizeof(struct cfusbl), GFP_ATOMIC); cfusbl_create() local
90 if (!this) cfusbl_create()
95 memset(&this->layer, 0, sizeof(this->layer)); cfusbl_create()
96 this->layer.receive = cfusbl_receive; cfusbl_create()
97 this->layer.transmit = cfusbl_transmit; cfusbl_create()
98 this->layer.ctrlcmd = cfusbl_ctrlcmd; cfusbl_create()
99 snprintf(this->layer.name, CAIF_LAYER_NAME_SZ, "usb%d", phyid); cfusbl_create()
100 this->layer.id = phyid; cfusbl_create()
108 ether_addr_copy(&this->tx_eth_hdr[ETH_ALEN], braddr); cfusbl_create()
109 ether_addr_copy(&this->tx_eth_hdr[ETH_ALEN], ethaddr); cfusbl_create()
110 this->tx_eth_hdr[12] = cpu_to_be16(ETH_P_802_EX1) & 0xff; cfusbl_create()
111 this->tx_eth_hdr[13] = (cpu_to_be16(ETH_P_802_EX1) >> 8) & 0xff; cfusbl_create()
113 this->tx_eth_hdr, this->tx_eth_hdr + ETH_ALEN, cfusbl_create()
114 this->tx_eth_hdr[12], this->tx_eth_hdr[13]); cfusbl_create()
116 return (struct cflayer *) this; cfusbl_create()
/linux-4.1.27/drivers/mtd/nand/gpmi-nand/
H A Dgpmi-nand.c18 * with this program; if not, write to the Free Software Foundation, Inc.,
82 struct gpmi_nand_data *this = cookie; bch_irq() local
84 gpmi_clear_bch(this); bch_irq()
85 complete(&this->bch_done); bch_irq()
107 static inline int get_ecc_strength(struct gpmi_nand_data *this) get_ecc_strength() argument
109 struct bch_geometry *geo = &this->bch_geometry; get_ecc_strength()
110 struct mtd_info *mtd = &this->mtd; get_ecc_strength()
120 static inline bool gpmi_check_ecc(struct gpmi_nand_data *this) gpmi_check_ecc() argument
122 struct bch_geometry *geo = &this->bch_geometry; gpmi_check_ecc()
125 if (GPMI_IS_MX23(this) || GPMI_IS_MX28(this)) { gpmi_check_ecc()
130 return geo->ecc_strength <= this->devdata->bch_max_ecc_strength; gpmi_check_ecc()
137 * We may have available oob space in this case.
139 static bool set_geometry_by_ecc_info(struct gpmi_nand_data *this) set_geometry_by_ecc_info() argument
141 struct bch_geometry *geo = &this->bch_geometry; set_geometry_by_ecc_info()
142 struct mtd_info *mtd = &this->mtd; set_geometry_by_ecc_info()
158 dev_err(this->dev, set_geometry_by_ecc_info()
165 if (!gpmi_check_ecc(this)) set_geometry_by_ecc_info()
170 dev_err(this->dev, set_geometry_by_ecc_info()
244 if (!this->swap_block_mark) set_geometry_by_ecc_info()
257 static int legacy_set_geometry(struct gpmi_nand_data *this) legacy_set_geometry() argument
259 struct bch_geometry *geo = &this->bch_geometry; legacy_set_geometry()
260 struct mtd_info *mtd = &this->mtd; legacy_set_geometry()
285 geo->ecc_strength = get_ecc_strength(this); legacy_set_geometry()
286 if (!gpmi_check_ecc(this)) { legacy_set_geometry()
287 dev_err(this->dev, legacy_set_geometry()
290 this->devdata->bch_max_ecc_strength); legacy_set_geometry()
309 if (!this->swap_block_mark) legacy_set_geometry()
367 int common_nfc_set_geometry(struct gpmi_nand_data *this) common_nfc_set_geometry() argument
369 if (of_property_read_bool(this->dev->of_node, "fsl,use-minimum-ecc") common_nfc_set_geometry()
370 && set_geometry_by_ecc_info(this)) common_nfc_set_geometry()
372 return legacy_set_geometry(this); common_nfc_set_geometry()
375 struct dma_chan *get_dma_chan(struct gpmi_nand_data *this) get_dma_chan() argument
378 return this->dma_chans[0]; get_dma_chan()
382 void prepare_data_dma(struct gpmi_nand_data *this, enum dma_data_direction dr) prepare_data_dma() argument
384 struct scatterlist *sgl = &this->data_sgl; prepare_data_dma()
388 if (virt_addr_valid(this->upper_buf) && prepare_data_dma()
389 !object_is_on_stack(this->upper_buf)) { prepare_data_dma()
390 sg_init_one(sgl, this->upper_buf, this->upper_len); prepare_data_dma()
391 ret = dma_map_sg(this->dev, sgl, 1, dr); prepare_data_dma()
395 this->direct_dma_map_ok = true; prepare_data_dma()
401 sg_init_one(sgl, this->data_buffer_dma, this->upper_len); prepare_data_dma()
404 memcpy(this->data_buffer_dma, this->upper_buf, this->upper_len); prepare_data_dma()
406 dma_map_sg(this->dev, sgl, 1, dr); prepare_data_dma()
408 this->direct_dma_map_ok = false; prepare_data_dma()
414 struct gpmi_nand_data *this = param; dma_irq_callback() local
415 struct completion *dma_c = &this->dma_done; dma_irq_callback()
417 switch (this->dma_type) { dma_irq_callback()
419 dma_unmap_sg(this->dev, &this->cmd_sgl, 1, DMA_TO_DEVICE); dma_irq_callback()
423 dma_unmap_sg(this->dev, &this->data_sgl, 1, DMA_FROM_DEVICE); dma_irq_callback()
424 if (this->direct_dma_map_ok == false) dma_irq_callback()
425 memcpy(this->upper_buf, this->data_buffer_dma, dma_irq_callback()
426 this->upper_len); dma_irq_callback()
430 dma_unmap_sg(this->dev, &this->data_sgl, 1, DMA_TO_DEVICE); dma_irq_callback()
439 dev_err(this->dev, "in wrong DMA operation.\n"); dma_irq_callback()
445 int start_dma_without_bch_irq(struct gpmi_nand_data *this, start_dma_without_bch_irq() argument
448 struct completion *dma_c = &this->dma_done; start_dma_without_bch_irq()
454 desc->callback_param = this; start_dma_without_bch_irq()
456 dma_async_issue_pending(get_dma_chan(this)); start_dma_without_bch_irq()
461 dev_err(this->dev, "DMA timeout, last DMA :%d\n", start_dma_without_bch_irq()
462 this->last_dma_type); start_dma_without_bch_irq()
463 gpmi_dump_info(this); start_dma_without_bch_irq()
476 int start_dma_with_bch_irq(struct gpmi_nand_data *this, start_dma_with_bch_irq() argument
479 struct completion *bch_c = &this->bch_done; start_dma_with_bch_irq()
486 start_dma_without_bch_irq(this, desc); start_dma_with_bch_irq()
491 dev_err(this->dev, "BCH timeout, last DMA :%d\n", start_dma_with_bch_irq()
492 this->last_dma_type); start_dma_with_bch_irq()
493 gpmi_dump_info(this); start_dma_with_bch_irq()
499 static int acquire_register_block(struct gpmi_nand_data *this, acquire_register_block() argument
502 struct platform_device *pdev = this->pdev; acquire_register_block()
503 struct resources *res = &this->resources; acquire_register_block()
517 dev_err(this->dev, "unknown resource name : %s\n", res_name); acquire_register_block()
522 static int acquire_bch_irq(struct gpmi_nand_data *this, irq_handler_t irq_h) acquire_bch_irq() argument
524 struct platform_device *pdev = this->pdev; acquire_bch_irq()
531 dev_err(this->dev, "Can't get resource for %s\n", res_name); acquire_bch_irq()
535 err = devm_request_irq(this->dev, r->start, irq_h, 0, res_name, this); acquire_bch_irq()
537 dev_err(this->dev, "error requesting BCH IRQ\n"); acquire_bch_irq()
542 static void release_dma_channels(struct gpmi_nand_data *this) release_dma_channels() argument
546 if (this->dma_chans[i]) { release_dma_channels()
547 dma_release_channel(this->dma_chans[i]); release_dma_channels()
548 this->dma_chans[i] = NULL; release_dma_channels()
552 static int acquire_dma_channels(struct gpmi_nand_data *this) acquire_dma_channels() argument
554 struct platform_device *pdev = this->pdev; acquire_dma_channels()
560 dev_err(this->dev, "Failed to request DMA channel.\n"); acquire_dma_channels()
564 this->dma_chans[0] = dma_chan; acquire_dma_channels()
568 release_dma_channels(this); acquire_dma_channels()
576 static int gpmi_get_clks(struct gpmi_nand_data *this) gpmi_get_clks() argument
578 struct resources *r = &this->resources; gpmi_get_clks()
584 r->clock[0] = devm_clk_get(this->dev, "gpmi_io"); gpmi_get_clks()
591 if (GPMI_IS_MX6(this)) gpmi_get_clks()
600 clk = devm_clk_get(this->dev, extra_clks[i - 1]); gpmi_get_clks()
609 if (GPMI_IS_MX6(this)) gpmi_get_clks()
621 dev_dbg(this->dev, "failed in finding the clocks.\n"); gpmi_get_clks()
625 static int acquire_resources(struct gpmi_nand_data *this) acquire_resources() argument
629 ret = acquire_register_block(this, GPMI_NAND_GPMI_REGS_ADDR_RES_NAME); acquire_resources()
633 ret = acquire_register_block(this, GPMI_NAND_BCH_REGS_ADDR_RES_NAME); acquire_resources()
637 ret = acquire_bch_irq(this, bch_irq); acquire_resources()
641 ret = acquire_dma_channels(this); acquire_resources()
645 ret = gpmi_get_clks(this); acquire_resources()
651 release_dma_channels(this); acquire_resources()
656 static void release_resources(struct gpmi_nand_data *this) release_resources() argument
658 release_dma_channels(this); release_resources()
661 static int init_hardware(struct gpmi_nand_data *this) init_hardware() argument
681 ret = gpmi_init(this); init_hardware()
685 this->timing = safe_timing; init_hardware()
689 static int read_page_prepare(struct gpmi_nand_data *this, read_page_prepare() argument
694 struct device *dev = this->dev; read_page_prepare()
710 this->direct_dma_map_ok = true; read_page_prepare()
717 this->direct_dma_map_ok = false; read_page_prepare()
721 static inline void read_page_end(struct gpmi_nand_data *this, read_page_end() argument
726 if (this->direct_dma_map_ok) read_page_end()
727 dma_unmap_single(this->dev, used_phys, length, DMA_FROM_DEVICE); read_page_end()
730 static inline void read_page_swap_end(struct gpmi_nand_data *this, read_page_swap_end() argument
735 if (!this->direct_dma_map_ok) read_page_swap_end()
739 static int send_page_prepare(struct gpmi_nand_data *this, send_page_prepare() argument
744 struct device *dev = this->dev; send_page_prepare()
774 static void send_page_end(struct gpmi_nand_data *this, send_page_end() argument
779 struct device *dev = this->dev; send_page_end()
784 static void gpmi_free_dma_buffer(struct gpmi_nand_data *this) gpmi_free_dma_buffer() argument
786 struct device *dev = this->dev; gpmi_free_dma_buffer()
788 if (this->page_buffer_virt && virt_addr_valid(this->page_buffer_virt)) gpmi_free_dma_buffer()
789 dma_free_coherent(dev, this->page_buffer_size, gpmi_free_dma_buffer()
790 this->page_buffer_virt, gpmi_free_dma_buffer()
791 this->page_buffer_phys); gpmi_free_dma_buffer()
792 kfree(this->cmd_buffer); gpmi_free_dma_buffer()
793 kfree(this->data_buffer_dma); gpmi_free_dma_buffer()
794 kfree(this->raw_buffer); gpmi_free_dma_buffer()
796 this->cmd_buffer = NULL; gpmi_free_dma_buffer()
797 this->data_buffer_dma = NULL; gpmi_free_dma_buffer()
798 this->page_buffer_virt = NULL; gpmi_free_dma_buffer()
799 this->page_buffer_size = 0; gpmi_free_dma_buffer()
803 static int gpmi_alloc_dma_buffer(struct gpmi_nand_data *this) gpmi_alloc_dma_buffer() argument
805 struct bch_geometry *geo = &this->bch_geometry; gpmi_alloc_dma_buffer()
806 struct device *dev = this->dev; gpmi_alloc_dma_buffer()
807 struct mtd_info *mtd = &this->mtd; gpmi_alloc_dma_buffer()
810 this->cmd_buffer = kzalloc(PAGE_SIZE, GFP_DMA | GFP_KERNEL); gpmi_alloc_dma_buffer()
811 if (this->cmd_buffer == NULL) gpmi_alloc_dma_buffer()
822 this->data_buffer_dma = kzalloc(mtd->writesize ?: PAGE_SIZE, gpmi_alloc_dma_buffer()
824 if (this->data_buffer_dma == NULL) gpmi_alloc_dma_buffer()
835 this->page_buffer_size = geo->payload_size + geo->auxiliary_size; gpmi_alloc_dma_buffer()
836 this->page_buffer_virt = dma_alloc_coherent(dev, this->page_buffer_size, gpmi_alloc_dma_buffer()
837 &this->page_buffer_phys, GFP_DMA); gpmi_alloc_dma_buffer()
838 if (!this->page_buffer_virt) gpmi_alloc_dma_buffer()
841 this->raw_buffer = kzalloc(mtd->writesize + mtd->oobsize, GFP_KERNEL); gpmi_alloc_dma_buffer()
842 if (!this->raw_buffer) gpmi_alloc_dma_buffer()
846 this->payload_virt = this->page_buffer_virt; gpmi_alloc_dma_buffer()
847 this->payload_phys = this->page_buffer_phys; gpmi_alloc_dma_buffer()
848 this->auxiliary_virt = this->payload_virt + geo->payload_size; gpmi_alloc_dma_buffer()
849 this->auxiliary_phys = this->payload_phys + geo->payload_size; gpmi_alloc_dma_buffer()
853 gpmi_free_dma_buffer(this); gpmi_alloc_dma_buffer()
860 struct gpmi_nand_data *this = chip->priv; gpmi_cmd_ctrl() local
876 this->cmd_buffer[this->command_length++] = data; gpmi_cmd_ctrl()
880 if (!this->command_length) gpmi_cmd_ctrl()
883 ret = gpmi_send_command(this); gpmi_cmd_ctrl()
885 dev_err(this->dev, "Chip: %u, Error %d\n", gpmi_cmd_ctrl()
886 this->current_chip, ret); gpmi_cmd_ctrl()
888 this->command_length = 0; gpmi_cmd_ctrl()
894 struct gpmi_nand_data *this = chip->priv; gpmi_dev_ready() local
896 return gpmi_is_ready(this, this->current_chip); gpmi_dev_ready()
902 struct gpmi_nand_data *this = chip->priv; gpmi_select_chip() local
904 if ((this->current_chip < 0) && (chipnr >= 0)) gpmi_select_chip()
905 gpmi_begin(this); gpmi_select_chip()
906 else if ((this->current_chip >= 0) && (chipnr < 0)) gpmi_select_chip()
907 gpmi_end(this); gpmi_select_chip()
909 this->current_chip = chipnr; gpmi_select_chip()
915 struct gpmi_nand_data *this = chip->priv; gpmi_read_buf() local
917 dev_dbg(this->dev, "len is %d\n", len); gpmi_read_buf()
918 this->upper_buf = buf; gpmi_read_buf()
919 this->upper_len = len; gpmi_read_buf()
921 gpmi_read_data(this); gpmi_read_buf()
927 struct gpmi_nand_data *this = chip->priv; gpmi_write_buf() local
929 dev_dbg(this->dev, "len is %d\n", len); gpmi_write_buf()
930 this->upper_buf = (uint8_t *)buf; gpmi_write_buf()
931 this->upper_len = len; gpmi_write_buf()
933 gpmi_send_data(this); gpmi_write_buf()
939 struct gpmi_nand_data *this = chip->priv; gpmi_read_byte() local
940 uint8_t *buf = this->data_buffer_dma; gpmi_read_byte()
951 static void block_mark_swapping(struct gpmi_nand_data *this, block_mark_swapping() argument
954 struct bch_geometry *nfc_geo = &this->bch_geometry; block_mark_swapping()
962 if (!this->swap_block_mark) block_mark_swapping()
997 struct gpmi_nand_data *this = chip->priv; gpmi_ecc_read_page() local
998 struct bch_geometry *nfc_geo = &this->bch_geometry; gpmi_ecc_read_page()
1008 dev_dbg(this->dev, "page number is : %d\n", page); gpmi_ecc_read_page()
1009 ret = read_page_prepare(this, buf, nfc_geo->payload_size, gpmi_ecc_read_page()
1010 this->payload_virt, this->payload_phys, gpmi_ecc_read_page()
1014 dev_err(this->dev, "Inadequate DMA buffer\n"); gpmi_ecc_read_page()
1018 auxiliary_virt = this->auxiliary_virt; gpmi_ecc_read_page()
1019 auxiliary_phys = this->auxiliary_phys; gpmi_ecc_read_page()
1022 ret = gpmi_read_page(this, payload_phys, auxiliary_phys); gpmi_ecc_read_page()
1023 read_page_end(this, buf, nfc_geo->payload_size, gpmi_ecc_read_page()
1024 this->payload_virt, this->payload_phys, gpmi_ecc_read_page()
1028 dev_err(this->dev, "Error in ECC-based read: %d\n", ret); gpmi_ecc_read_page()
1033 block_mark_swapping(this, payload_virt, auxiliary_virt); gpmi_ecc_read_page()
1065 read_page_swap_end(this, buf, nfc_geo->payload_size, gpmi_ecc_read_page()
1066 this->payload_virt, this->payload_phys, gpmi_ecc_read_page()
1077 struct gpmi_nand_data *this = chip->priv; gpmi_ecc_read_subpage() local
1078 void __iomem *bch_regs = this->resources.bch_regs; gpmi_ecc_read_subpage()
1079 struct bch_geometry old_geo = this->bch_geometry; gpmi_ecc_read_subpage()
1080 struct bch_geometry *geo = &this->bch_geometry; gpmi_ecc_read_subpage()
1088 int old_swap_block_mark = this->swap_block_mark; gpmi_ecc_read_subpage()
1097 if (this->swap_block_mark) { gpmi_ecc_read_subpage()
1100 * If this chunk is in the range of [first, last], gpmi_ecc_read_subpage()
1107 dev_dbg(this->dev, gpmi_ecc_read_subpage()
1146 dev_dbg(this->dev, "page:%d(%d:%d)%d, chunk:(%d:%d), BCH PG size:%d\n", gpmi_ecc_read_subpage()
1150 this->swap_block_mark = false; gpmi_ecc_read_subpage()
1156 this->bch_geometry = old_geo; gpmi_ecc_read_subpage()
1157 this->swap_block_mark = old_swap_block_mark; gpmi_ecc_read_subpage()
1165 struct gpmi_nand_data *this = chip->priv; gpmi_ecc_write_page() local
1166 struct bch_geometry *nfc_geo = &this->bch_geometry; gpmi_ecc_write_page()
1173 dev_dbg(this->dev, "ecc write page.\n"); gpmi_ecc_write_page()
1174 if (this->swap_block_mark) { gpmi_ecc_write_page()
1180 memcpy(this->payload_virt, buf, mtd->writesize); gpmi_ecc_write_page()
1181 payload_virt = this->payload_virt; gpmi_ecc_write_page()
1182 payload_phys = this->payload_phys; gpmi_ecc_write_page()
1184 memcpy(this->auxiliary_virt, chip->oob_poi, gpmi_ecc_write_page()
1186 auxiliary_virt = this->auxiliary_virt; gpmi_ecc_write_page()
1187 auxiliary_phys = this->auxiliary_phys; gpmi_ecc_write_page()
1190 block_mark_swapping(this, gpmi_ecc_write_page()
1197 ret = send_page_prepare(this, gpmi_ecc_write_page()
1199 this->payload_virt, this->payload_phys, gpmi_ecc_write_page()
1203 dev_err(this->dev, "Inadequate payload DMA buffer\n"); gpmi_ecc_write_page()
1207 ret = send_page_prepare(this, gpmi_ecc_write_page()
1209 this->auxiliary_virt, this->auxiliary_phys, gpmi_ecc_write_page()
1213 dev_err(this->dev, "Inadequate auxiliary DMA buffer\n"); gpmi_ecc_write_page()
1219 ret = gpmi_send_page(this, payload_phys, auxiliary_phys); gpmi_ecc_write_page()
1221 dev_err(this->dev, "Error in ECC-based write: %d\n", ret); gpmi_ecc_write_page()
1223 if (!this->swap_block_mark) { gpmi_ecc_write_page()
1224 send_page_end(this, chip->oob_poi, mtd->oobsize, gpmi_ecc_write_page()
1225 this->auxiliary_virt, this->auxiliary_phys, gpmi_ecc_write_page()
1229 send_page_end(this, buf, mtd->writesize, gpmi_ecc_write_page()
1230 this->payload_virt, this->payload_phys, gpmi_ecc_write_page()
1239 * There are several places in this driver where we have to handle the OOB and
1241 * this is where we try to explain it all. All the other places refer back to
1262 * What we do for this specific read operation depends on two questions:
1301 struct gpmi_nand_data *this = chip->priv; gpmi_ecc_read_oob() local
1303 dev_dbg(this->dev, "page number is %d\n", page); gpmi_ecc_read_oob()
1316 if (GPMI_IS_MX23(this)) { gpmi_ecc_read_oob()
1362 struct gpmi_nand_data *this = chip->priv; gpmi_ecc_read_page_raw() local
1363 struct bch_geometry *nfc_geo = &this->bch_geometry; gpmi_ecc_read_page_raw()
1366 u8 *tmp_buf = this->raw_buffer; gpmi_ecc_read_page_raw()
1380 * See the layout description for a detailed explanation on why this gpmi_ecc_read_page_raw()
1383 if (this->swap_block_mark) { gpmi_ecc_read_page_raw()
1391 * Copy the metadata section into the oob buffer (this section is gpmi_ecc_read_page_raw()
1451 struct gpmi_nand_data *this = chip->priv; gpmi_ecc_write_page_raw() local
1452 struct bch_geometry *nfc_geo = &this->bch_geometry; gpmi_ecc_write_page_raw()
1455 u8 *tmp_buf = this->raw_buffer; gpmi_ecc_write_page_raw()
1508 * See the layout description for a detailed explanation on why this gpmi_ecc_write_page_raw()
1511 if (this->swap_block_mark) { gpmi_ecc_write_page_raw()
1542 struct gpmi_nand_data *this = chip->priv; gpmi_block_markbad() local
1550 column = !GPMI_IS_MX23(this) ? mtd->writesize : 0; gpmi_block_markbad()
1553 block_mark = this->data_buffer_dma; gpmi_block_markbad()
1572 static int nand_boot_set_geometry(struct gpmi_nand_data *this) nand_boot_set_geometry() argument
1574 struct boot_rom_geometry *geometry = &this->rom_geometry; nand_boot_set_geometry()
1579 * In principle, we should be reading this from the OTP bits, since nand_boot_set_geometry()
1589 * In principle, we should be reading this from the OTP bits, since nand_boot_set_geometry()
1599 static int mx23_check_transcription_stamp(struct gpmi_nand_data *this) mx23_check_transcription_stamp() argument
1601 struct boot_rom_geometry *rom_geo = &this->rom_geometry; mx23_check_transcription_stamp()
1602 struct device *dev = this->dev; mx23_check_transcription_stamp()
1603 struct mtd_info *mtd = &this->mtd; mx23_check_transcription_stamp()
1604 struct nand_chip *chip = &this->nand; mx23_check_transcription_stamp()
1615 saved_chip_number = this->current_chip; mx23_check_transcription_stamp()
1654 static int mx23_write_transcription_stamp(struct gpmi_nand_data *this) mx23_write_transcription_stamp() argument
1656 struct device *dev = this->dev; mx23_write_transcription_stamp()
1657 struct boot_rom_geometry *rom_geo = &this->rom_geometry; mx23_write_transcription_stamp()
1658 struct mtd_info *mtd = &this->mtd; mx23_write_transcription_stamp()
1659 struct nand_chip *chip = &this->nand; mx23_write_transcription_stamp()
1686 saved_chip_number = this->current_chip; mx23_write_transcription_stamp()
1696 /* Erase this block. */ mx23_write_transcription_stamp()
1734 static int mx23_boot_init(struct gpmi_nand_data *this) mx23_boot_init() argument
1736 struct device *dev = this->dev; mx23_boot_init()
1737 struct nand_chip *chip = &this->nand; mx23_boot_init()
1738 struct mtd_info *mtd = &this->mtd; mx23_boot_init()
1753 if (mx23_check_transcription_stamp(this)) mx23_boot_init()
1771 * Compute the chip, page and byte addresses for this block's mx23_boot_init()
1786 * again, but this time the result will be a mark in the mx23_boot_init()
1800 mx23_write_transcription_stamp(this); mx23_boot_init()
1804 static int nand_boot_init(struct gpmi_nand_data *this) nand_boot_init() argument
1806 nand_boot_set_geometry(this); nand_boot_init()
1809 if (GPMI_IS_MX23(this)) nand_boot_init()
1810 return mx23_boot_init(this); nand_boot_init()
1814 static int gpmi_set_geometry(struct gpmi_nand_data *this) gpmi_set_geometry() argument
1819 gpmi_free_dma_buffer(this); gpmi_set_geometry()
1822 ret = bch_set_geometry(this); gpmi_set_geometry()
1824 dev_err(this->dev, "Error setting BCH geometry : %d\n", ret); gpmi_set_geometry()
1829 return gpmi_alloc_dma_buffer(this); gpmi_set_geometry()
1832 static void gpmi_nand_exit(struct gpmi_nand_data *this) gpmi_nand_exit() argument
1834 nand_release(&this->mtd); gpmi_nand_exit()
1835 gpmi_free_dma_buffer(this); gpmi_nand_exit()
1838 static int gpmi_init_last(struct gpmi_nand_data *this) gpmi_init_last() argument
1840 struct mtd_info *mtd = &this->mtd; gpmi_init_last()
1843 struct bch_geometry *bch_geo = &this->bch_geometry; gpmi_init_last()
1847 ret = gpmi_set_geometry(this); gpmi_init_last()
1870 if (GPMI_IS_MX6(this) && gpmi_init_last()
1882 gpmi_extra_init(this); gpmi_init_last()
1887 static int gpmi_nand_init(struct gpmi_nand_data *this) gpmi_nand_init() argument
1889 struct mtd_info *mtd = &this->mtd; gpmi_nand_init()
1890 struct nand_chip *chip = &this->nand; gpmi_nand_init()
1895 this->current_chip = -1; gpmi_nand_init()
1903 chip->priv = this; gpmi_nand_init()
1915 this->swap_block_mark = !GPMI_IS_MX23(this); gpmi_nand_init()
1917 if (of_get_nand_on_flash_bbt(this->dev->of_node)) { gpmi_nand_init()
1920 if (of_property_read_bool(this->dev->of_node, gpmi_nand_init()
1922 this->swap_block_mark = false; gpmi_nand_init()
1924 dev_dbg(this->dev, "Blockmark swapping %sabled\n", gpmi_nand_init()
1925 this->swap_block_mark ? "en" : "dis"); gpmi_nand_init()
1931 this->bch_geometry.payload_size = 1024; gpmi_nand_init()
1932 this->bch_geometry.auxiliary_size = 128; gpmi_nand_init()
1933 ret = gpmi_alloc_dma_buffer(this); gpmi_nand_init()
1937 ret = nand_scan_ident(mtd, GPMI_IS_MX6(this) ? 2 : 1, NULL); gpmi_nand_init()
1941 ret = gpmi_init_last(this); gpmi_nand_init()
1950 ret = nand_boot_init(this); gpmi_nand_init()
1957 ppdata.of_node = this->pdev->dev.of_node; gpmi_nand_init()
1964 gpmi_nand_exit(this); gpmi_nand_init()
1987 struct gpmi_nand_data *this; gpmi_nand_probe() local
1991 this = devm_kzalloc(&pdev->dev, sizeof(*this), GFP_KERNEL); gpmi_nand_probe()
1992 if (!this) gpmi_nand_probe()
1997 this->devdata = of_id->data; gpmi_nand_probe()
2003 platform_set_drvdata(pdev, this); gpmi_nand_probe()
2004 this->pdev = pdev; gpmi_nand_probe()
2005 this->dev = &pdev->dev; gpmi_nand_probe()
2007 ret = acquire_resources(this); gpmi_nand_probe()
2011 ret = init_hardware(this); gpmi_nand_probe()
2015 ret = gpmi_nand_init(this); gpmi_nand_probe()
2019 dev_info(this->dev, "driver registered.\n"); gpmi_nand_probe()
2024 release_resources(this); gpmi_nand_probe()
2032 struct gpmi_nand_data *this = platform_get_drvdata(pdev); gpmi_nand_remove() local
2034 gpmi_nand_exit(this); gpmi_nand_remove()
2035 release_resources(this); gpmi_nand_remove()
H A Dgpmi-lib.c18 * with this program; if not, write to the Free Software Foundation, Inc.,
79 * You will see a DMA timeout in this case. The bug has been fixed
82 * To avoid this bug, just add a new parameter `just_enable` for
127 static int __gpmi_enable_clk(struct gpmi_nand_data *this, bool v) __gpmi_enable_clk() argument
134 clk = this->resources.clock[i]; __gpmi_enable_clk()
150 clk_disable_unprepare(this->resources.clock[i - 1]); __gpmi_enable_clk()
157 int gpmi_init(struct gpmi_nand_data *this) gpmi_init() argument
159 struct resources *r = &this->resources; gpmi_init()
162 ret = gpmi_enable_clk(this); gpmi_init()
173 ret = gpmi_reset_block(r->bch_regs, GPMI_IS_MX23(this)); gpmi_init()
197 gpmi_disable_clk(this); gpmi_init()
204 void gpmi_dump_info(struct gpmi_nand_data *this) gpmi_dump_info() argument
206 struct resources *r = &this->resources; gpmi_dump_info()
207 struct bch_geometry *geo = &this->bch_geometry; gpmi_dump_info()
211 dev_err(this->dev, "Show GPMI registers :\n"); gpmi_dump_info()
214 dev_err(this->dev, "offset 0x%.3x : 0x%.8x\n", i * 0x10, reg); gpmi_dump_info()
218 dev_err(this->dev, "Show BCH registers :\n"); gpmi_dump_info()
221 dev_err(this->dev, "offset 0x%.3x : 0x%.8x\n", i * 0x10, reg); gpmi_dump_info()
223 dev_err(this->dev, "BCH Geometry :\n" gpmi_dump_info()
249 int bch_set_geometry(struct gpmi_nand_data *this) bch_set_geometry() argument
251 struct resources *r = &this->resources; bch_set_geometry()
252 struct bch_geometry *bch_geo = &this->bch_geometry; bch_set_geometry()
261 if (common_nfc_set_geometry(this)) bch_set_geometry()
271 ret = gpmi_enable_clk(this); bch_set_geometry()
276 * Due to erratum #2847 of the MX23, the BCH cannot be soft reset on this bch_set_geometry()
283 ret = gpmi_reset_block(r->bch_regs, GPMI_IS_MX23(this)); bch_set_geometry()
290 | BF_BCH_FLASH0LAYOUT0_ECC0(ecc_strength, this) bch_set_geometry()
291 | BF_BCH_FLASH0LAYOUT0_GF(gf_len, this) bch_set_geometry()
292 | BF_BCH_FLASH0LAYOUT0_DATA0_SIZE(block_size, this), bch_set_geometry()
296 | BF_BCH_FLASH0LAYOUT1_ECCN(ecc_strength, this) bch_set_geometry()
297 | BF_BCH_FLASH0LAYOUT1_GF(gf_len, this) bch_set_geometry()
298 | BF_BCH_FLASH0LAYOUT1_DATAN_SIZE(block_size, this), bch_set_geometry()
308 gpmi_disable_clk(this); bch_set_geometry()
327 static int gpmi_nfc_compute_hardware_timing(struct gpmi_nand_data *this, gpmi_nfc_compute_hardware_timing() argument
331 struct resources *r = &this->resources; gpmi_nfc_compute_hardware_timing()
332 struct nand_chip *nand = &this->nand; gpmi_nfc_compute_hardware_timing()
333 struct nand_timing target = this->timing; gpmi_nfc_compute_hardware_timing()
414 * Let's re-arrange this in a way that's more useful to us: gpmi_nfc_compute_hardware_timing()
420 * The reference period is either the clock period or half that, so this gpmi_nfc_compute_hardware_timing()
435 * reduce the cost of this conversion by using bit shifts instead of gpmi_nfc_compute_hardware_timing()
521 * sample delay factor. We do this because the form of the gpmi_nfc_compute_hardware_timing()
572 * time by a single clock cycle. We do this until either the eye is gpmi_nfc_compute_hardware_timing()
593 * After some algebra, this simplifies to the code immediately below. gpmi_nfc_compute_hardware_timing()
673 * delay factor. We do this because the form of the computation is the gpmi_nfc_compute_hardware_timing()
858 static void gpmi_compute_edo_timing(struct gpmi_nand_data *this, gpmi_compute_edo_timing() argument
861 struct resources *r = &this->resources; gpmi_compute_edo_timing()
863 int mode = this->timing_mode; gpmi_compute_edo_timing()
864 int dll_threshold = this->devdata->max_chain_delay; gpmi_compute_edo_timing()
918 static int enable_edo_mode(struct gpmi_nand_data *this, int mode) enable_edo_mode() argument
920 struct resources *r = &this->resources; enable_edo_mode()
921 struct nand_chip *nand = &this->nand; enable_edo_mode()
922 struct mtd_info *mtd = &this->mtd; enable_edo_mode()
954 this->flags &= ~GPMI_TIMING_INIT_OK; enable_edo_mode()
956 this->flags |= GPMI_ASYNC_EDO_ENABLED; enable_edo_mode()
957 this->timing_mode = mode; enable_edo_mode()
959 dev_info(this->dev, "enable the asynchronous EDO mode %d\n", mode); enable_edo_mode()
965 dev_err(this->dev, "mode:%d ,failed in set feature.\n", mode); enable_edo_mode()
969 int gpmi_extra_init(struct gpmi_nand_data *this) gpmi_extra_init() argument
971 struct nand_chip *chip = &this->nand; gpmi_extra_init()
974 if (GPMI_IS_MX6(this) && chip->onfi_version) { gpmi_extra_init()
985 return enable_edo_mode(this, mode); gpmi_extra_init()
991 void gpmi_begin(struct gpmi_nand_data *this) gpmi_begin() argument
993 struct resources *r = &this->resources; gpmi_begin()
1002 ret = gpmi_enable_clk(this); gpmi_begin()
1004 dev_err(this->dev, "We failed in enable the clk\n"); gpmi_begin()
1009 if (this->flags & GPMI_TIMING_INIT_OK) gpmi_begin()
1011 this->flags |= GPMI_TIMING_INIT_OK; gpmi_begin()
1013 if (this->flags & GPMI_ASYNC_EDO_ENABLED) gpmi_begin()
1014 gpmi_compute_edo_timing(this, &hw); gpmi_begin()
1016 gpmi_nfc_compute_hardware_timing(this, &hw); gpmi_begin()
1074 void gpmi_end(struct gpmi_nand_data *this) gpmi_end() argument
1076 gpmi_disable_clk(this); gpmi_end()
1080 void gpmi_clear_bch(struct gpmi_nand_data *this) gpmi_clear_bch() argument
1082 struct resources *r = &this->resources; gpmi_clear_bch()
1087 int gpmi_is_ready(struct gpmi_nand_data *this, unsigned chip) gpmi_is_ready() argument
1089 struct resources *r = &this->resources; gpmi_is_ready()
1093 if (GPMI_IS_MX23(this)) { gpmi_is_ready()
1096 } else if (GPMI_IS_MX28(this) || GPMI_IS_MX6(this)) { gpmi_is_ready()
1101 if (GPMI_IS_MX6(this)) gpmi_is_ready()
1108 dev_err(this->dev, "unknown arch.\n"); gpmi_is_ready()
1112 static inline void set_dma_type(struct gpmi_nand_data *this, set_dma_type() argument
1115 this->last_dma_type = this->dma_type; set_dma_type()
1116 this->dma_type = type; set_dma_type()
1119 int gpmi_send_command(struct gpmi_nand_data *this) gpmi_send_command() argument
1121 struct dma_chan *channel = get_dma_chan(this); gpmi_send_command()
1124 int chip = this->current_chip; gpmi_send_command()
1130 | BF_GPMI_CTRL0_CS(chip, this) gpmi_send_command()
1131 | BF_GPMI_CTRL0_LOCK_CS(LOCK_CS_ENABLE, this) gpmi_send_command()
1134 | BF_GPMI_CTRL0_XFER_COUNT(this->command_length); gpmi_send_command()
1143 sgl = &this->cmd_sgl; gpmi_send_command()
1145 sg_init_one(sgl, this->cmd_buffer, this->command_length); gpmi_send_command()
1146 dma_map_sg(this->dev, sgl, 1, DMA_TO_DEVICE); gpmi_send_command()
1154 set_dma_type(this, DMA_FOR_COMMAND); gpmi_send_command()
1155 return start_dma_without_bch_irq(this, desc); gpmi_send_command()
1158 int gpmi_send_data(struct gpmi_nand_data *this) gpmi_send_data() argument
1161 struct dma_chan *channel = get_dma_chan(this); gpmi_send_data()
1162 int chip = this->current_chip; gpmi_send_data()
1173 | BF_GPMI_CTRL0_CS(chip, this) gpmi_send_data()
1174 | BF_GPMI_CTRL0_LOCK_CS(LOCK_CS_ENABLE, this) gpmi_send_data()
1176 | BF_GPMI_CTRL0_XFER_COUNT(this->upper_len); gpmi_send_data()
1184 prepare_data_dma(this, DMA_TO_DEVICE); gpmi_send_data()
1185 desc = dmaengine_prep_slave_sg(channel, &this->data_sgl, gpmi_send_data()
1192 set_dma_type(this, DMA_FOR_WRITE_DATA); gpmi_send_data()
1193 return start_dma_without_bch_irq(this, desc); gpmi_send_data()
1196 int gpmi_read_data(struct gpmi_nand_data *this) gpmi_read_data() argument
1199 struct dma_chan *channel = get_dma_chan(this); gpmi_read_data()
1200 int chip = this->current_chip; gpmi_read_data()
1206 | BF_GPMI_CTRL0_CS(chip, this) gpmi_read_data()
1207 | BF_GPMI_CTRL0_LOCK_CS(LOCK_CS_ENABLE, this) gpmi_read_data()
1209 | BF_GPMI_CTRL0_XFER_COUNT(this->upper_len); gpmi_read_data()
1218 prepare_data_dma(this, DMA_FROM_DEVICE); gpmi_read_data()
1219 desc = dmaengine_prep_slave_sg(channel, &this->data_sgl, gpmi_read_data()
1226 set_dma_type(this, DMA_FOR_READ_DATA); gpmi_read_data()
1227 return start_dma_without_bch_irq(this, desc); gpmi_read_data()
1230 int gpmi_send_page(struct gpmi_nand_data *this, gpmi_send_page() argument
1233 struct bch_geometry *geo = &this->bch_geometry; gpmi_send_page()
1239 struct dma_chan *channel = get_dma_chan(this); gpmi_send_page()
1240 int chip = this->current_chip; gpmi_send_page()
1252 | BF_GPMI_CTRL0_CS(chip, this) gpmi_send_page()
1253 | BF_GPMI_CTRL0_LOCK_CS(LOCK_CS_ENABLE, this) gpmi_send_page()
1271 set_dma_type(this, DMA_FOR_WRITE_ECC_PAGE); gpmi_send_page()
1272 return start_dma_with_bch_irq(this, desc); gpmi_send_page()
1275 int gpmi_read_page(struct gpmi_nand_data *this, gpmi_read_page() argument
1278 struct bch_geometry *geo = &this->bch_geometry; gpmi_read_page()
1284 struct dma_chan *channel = get_dma_chan(this); gpmi_read_page()
1285 int chip = this->current_chip; gpmi_read_page()
1294 | BF_GPMI_CTRL0_CS(chip, this) gpmi_read_page()
1295 | BF_GPMI_CTRL0_LOCK_CS(LOCK_CS_ENABLE, this) gpmi_read_page()
1314 | BF_GPMI_CTRL0_CS(chip, this) gpmi_read_page()
1315 | BF_GPMI_CTRL0_LOCK_CS(LOCK_CS_ENABLE, this) gpmi_read_page()
1339 | BF_GPMI_CTRL0_CS(chip, this) gpmi_read_page()
1340 | BF_GPMI_CTRL0_LOCK_CS(LOCK_CS_ENABLE, this) gpmi_read_page()
1353 set_dma_type(this, DMA_FOR_READ_ECC_PAGE); gpmi_read_page()
1354 return start_dma_with_bch_irq(this, desc); gpmi_read_page()
/linux-4.1.27/arch/parisc/include/asm/
H A Dshmparam.h4 #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
H A Dfixmap.h7 * All of the values in this file are machine virtual addresses.
9 * All of the values in this file must be <4GB (because of assembly
10 * loading restrictions). If you place this region anywhere above
H A Dsignal.h13 /* Most things should be clean enough to redefine this at will, if care
19 /* next_signal() assumes this is a long - no choice */
/linux-4.1.27/arch/cris/include/asm/
H A Dshmparam.h6 #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
H A Ddma.h9 bootmem allocator (but this should do it for this) */
/linux-4.1.27/arch/arm/include/asm/
H A Dkmap_types.h5 * This is the "bare minimum". AIO seems to require this.
H A Dtcm.h19 /* Tag variables with this */
21 /* Tag constants with this */
23 /* Tag functions inside TCM called from outside TCM with this */
25 /* Tag function inside TCM called from inside TCM with this */
H A Dgpio.h8 /* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */
18 * However, some platforms want to do this differently, so allow them
H A Ddma.h74 /* Enable DMA for this channel
76 * On some architectures, this may have other side effects like
81 /* Disable DMA for this channel
83 * On some architectures, this may have other side effects like
92 /* Set the DMA scatter gather list for this channel
100 /* Set the DMA address for this channel
110 /* Set the DMA byte count for this channel
118 /* Set the transfer direction for this channel
127 /* Set the transfer speed for this channel
131 /* Get DMA residue count. After a DMA transfer, this
132 * should return zero. Reading this while a DMA transfer is
/linux-4.1.27/drivers/staging/rtl8192u/
H A Dr8192U_wx.h6 * Parts of this driver are based on the GPL part of the official realtek driver
7 * Parts of this driver are based on the rtl8180 driver skeleton from Patric
9 * Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver
15 /* this file (will) contains wireless extension handlers */
21 /* Enable the rtl819x_core.c to share this function, david 2008.9.22 */
H A Dr8180_93cx6.h6 Parts of this driver are based on the GPL part of the
8 Parts of this driver are based on the rtl8180 driver skeleton
10 Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver
H A Dr819xU_firmware.h5 /* TODO: this definition is TBD */
/linux-4.1.27/net/atm/
H A Daddr.c50 struct atm_dev_addr *this, *p; atm_reset_addr() local
58 list_for_each_entry_safe(this, p, head, entry) { list_for_each_entry_safe()
59 list_del(&this->entry); list_for_each_entry_safe()
60 kfree(this); list_for_each_entry_safe()
71 struct atm_dev_addr *this; atm_add_addr() local
83 list_for_each_entry(this, head, entry) { list_for_each_entry()
84 if (identical(&this->addr, addr)) { list_for_each_entry()
89 this = kmalloc(sizeof(struct atm_dev_addr), GFP_ATOMIC);
90 if (!this) {
94 this->addr = *addr;
95 list_add(&this->entry, head);
106 struct atm_dev_addr *this; atm_del_addr() local
118 list_for_each_entry(this, head, entry) { list_for_each_entry()
119 if (identical(&this->addr, addr)) { list_for_each_entry()
120 list_del(&this->entry); list_for_each_entry()
122 kfree(this); list_for_each_entry()
136 struct atm_dev_addr *this; atm_get_addr() local
146 list_for_each_entry(this, head, entry) atm_get_addr()
153 list_for_each_entry(this, head, entry) atm_get_addr()
154 memcpy(tmp_bufp++, &this->addr, sizeof(struct sockaddr_atmsvc)); atm_get_addr()
/linux-4.1.27/drivers/mtd/onenand/
H A Donenand_base.c190 * @param this onenand chip data structure
196 static int onenand_block_address(struct onenand_chip *this, int block) onenand_block_address() argument
199 if (block & this->density_mask) onenand_block_address()
200 return ONENAND_DDP_CHIP1 | (block ^ this->density_mask); onenand_block_address()
207 * @param this onenand chip data structure
213 static int onenand_bufferram_address(struct onenand_chip *this, int block) onenand_bufferram_address() argument
216 if (block & this->density_mask) onenand_bufferram_address()
270 * @param this - OneNAND device structure
273 static unsigned flexonenand_block(struct onenand_chip *this, loff_t addr) flexonenand_block() argument
277 if (ONENAND_IS_DDP(this) && addr >= this->diesize[0]) { flexonenand_block()
279 addr -= this->diesize[0]; flexonenand_block()
282 boundary = this->boundary[die]; flexonenand_block()
284 blk = addr >> (this->erase_shift - 1); flexonenand_block()
288 blk += die ? this->density_mask : 0; flexonenand_block()
292 inline unsigned onenand_block(struct onenand_chip *this, loff_t addr) onenand_block() argument
294 if (!FLEXONENAND(this)) onenand_block()
295 return addr >> this->erase_shift; onenand_block()
296 return flexonenand_block(this, addr); onenand_block()
301 * @this: OneNAND device structure
306 static loff_t flexonenand_addr(struct onenand_chip *this, int block) flexonenand_addr() argument
311 if (ONENAND_IS_DDP(this) && block >= this->density_mask) { flexonenand_addr()
312 block -= this->density_mask; flexonenand_addr()
314 ofs = this->diesize[0]; flexonenand_addr()
317 boundary = this->boundary[die]; flexonenand_addr()
318 ofs += (loff_t)block << (this->erase_shift - 1); flexonenand_addr()
320 ofs += (loff_t)(block - boundary - 1) << (this->erase_shift - 1); flexonenand_addr()
324 loff_t onenand_addr(struct onenand_chip *this, int block) onenand_addr() argument
326 if (!FLEXONENAND(this)) onenand_addr()
327 return (loff_t)block << this->erase_shift; onenand_addr()
328 return flexonenand_addr(this, block); onenand_addr()
372 struct onenand_chip *this = mtd->priv; onenand_command() local
387 block = addr * this->density_mask; onenand_command()
396 block = onenand_block(this, addr); onenand_command()
402 block = addr * this->density_mask; onenand_command()
407 block = onenand_block(this, addr); onenand_command()
408 if (FLEXONENAND(this)) onenand_command()
409 page = (int) (addr - onenand_addr(this, block))>>\ onenand_command()
410 this->page_shift; onenand_command()
412 page = (int) (addr >> this->page_shift); onenand_command()
413 if (ONENAND_IS_2PLANE(this)) { onenand_command()
417 if (addr & this->writesize) onenand_command()
421 page &= this->page_mask; onenand_command()
428 value = onenand_bufferram_address(this, block); onenand_command()
429 this->write_word(value, this->base + ONENAND_REG_START_ADDRESS2); onenand_command()
431 if (ONENAND_IS_2PLANE(this) || ONENAND_IS_4KB_PAGE(this)) onenand_command()
433 ONENAND_SET_BUFFERRAM0(this); onenand_command()
436 ONENAND_SET_NEXT_BUFFERRAM(this); onenand_command()
443 value = onenand_block_address(this, block); onenand_command()
444 this->write_word(value, this->base + ONENAND_REG_START_ADDRESS1); onenand_command()
447 value = onenand_bufferram_address(this, block); onenand_command()
448 this->write_word(value, this->base + ONENAND_REG_START_ADDRESS2); onenand_command()
460 if (ONENAND_IS_4KB_PAGE(this)) onenand_command()
462 dataram = ONENAND_SET_BUFFERRAM0(this); onenand_command()
464 dataram = ONENAND_SET_NEXT_BUFFERRAM(this); onenand_command()
468 if (ONENAND_IS_2PLANE(this) && cmd == ONENAND_CMD_PROG) onenand_command()
470 dataram = ONENAND_CURRENT_BUFFERRAM(this); onenand_command()
476 this->write_word(value, this->base + ONENAND_REG_START_ADDRESS8); onenand_command()
480 this->write_word(value, this->base + ONENAND_REG_START_BUFFER); onenand_command()
484 this->write_word(ONENAND_INT_CLEAR, this->base + ONENAND_REG_INTERRUPT); onenand_command()
487 this->write_word(cmd, this->base + ONENAND_REG_COMMAND); onenand_command()
494 * @param this onenand chip structure
496 static inline int onenand_read_ecc(struct onenand_chip *this) onenand_read_ecc() argument
500 if (!FLEXONENAND(this) && !ONENAND_IS_4KB_PAGE(this)) onenand_read_ecc()
501 return this->read_word(this->base + ONENAND_REG_ECC_STATUS); onenand_read_ecc()
504 ecc = this->read_word(this->base + ONENAND_REG_ECC_STATUS + i*2); onenand_read_ecc()
527 struct onenand_chip * this = mtd->priv; onenand_wait() local
536 interrupt = this->read_word(this->base + ONENAND_REG_INTERRUPT); onenand_wait()
545 interrupt = this->read_word(this->base + ONENAND_REG_INTERRUPT); onenand_wait()
547 ctrl = this->read_word(this->base + ONENAND_REG_CTRL_STATUS); onenand_wait()
555 int ecc = onenand_read_ecc(this); onenand_wait()
607 struct onenand_chip *this = data; onenand_interrupt() local
610 if (!this->complete.done) onenand_interrupt()
611 complete(&this->complete); onenand_interrupt()
625 struct onenand_chip *this = mtd->priv; onenand_interrupt_wait() local
627 wait_for_completion(&this->complete); onenand_interrupt_wait()
641 struct onenand_chip *this = mtd->priv; onenand_try_interrupt_wait() local
645 this->wait = onenand_interrupt_wait; onenand_try_interrupt_wait()
648 remain = wait_for_completion_timeout(&this->complete, timeout); onenand_try_interrupt_wait()
654 free_irq(this->irq, this); onenand_try_interrupt_wait()
656 this->wait = onenand_wait; onenand_try_interrupt_wait()
672 struct onenand_chip *this = mtd->priv; onenand_setup_wait() local
675 init_completion(&this->complete); onenand_setup_wait()
677 if (this->irq <= 0) { onenand_setup_wait()
678 this->wait = onenand_wait; onenand_setup_wait()
682 if (request_irq(this->irq, &onenand_interrupt, onenand_setup_wait()
683 IRQF_SHARED, "onenand", this)) { onenand_setup_wait()
685 this->wait = onenand_wait; onenand_setup_wait()
690 syscfg = this->read_word(this->base + ONENAND_REG_SYS_CFG1); onenand_setup_wait()
692 this->write_word(syscfg, this->base + ONENAND_REG_SYS_CFG1); onenand_setup_wait()
694 this->wait = onenand_try_interrupt_wait; onenand_setup_wait()
707 struct onenand_chip *this = mtd->priv; onenand_bufferram_offset() local
709 if (ONENAND_CURRENT_BUFFERRAM(this)) { onenand_bufferram_offset()
710 /* Note: the 'this->writesize' is a real page size */ onenand_bufferram_offset()
712 return this->writesize; onenand_bufferram_offset()
733 struct onenand_chip *this = mtd->priv; onenand_read_bufferram() local
736 bufferram = this->base + area; onenand_read_bufferram()
747 word = this->read_word(bufferram + offset + count); onenand_read_bufferram()
769 struct onenand_chip *this = mtd->priv; onenand_sync_read_bufferram() local
772 bufferram = this->base + area; onenand_sync_read_bufferram()
776 this->mmcontrol(mtd, ONENAND_SYS_CFG1_SYNC_READ); onenand_sync_read_bufferram()
785 word = this->read_word(bufferram + offset + count); onenand_sync_read_bufferram()
791 this->mmcontrol(mtd, 0); onenand_sync_read_bufferram()
809 struct onenand_chip *this = mtd->priv; onenand_write_bufferram() local
812 bufferram = this->base + area; onenand_write_bufferram()
827 word = this->read_word(bufferram + byte_offset); onenand_write_bufferram()
829 this->write_word(word, bufferram + byte_offset); onenand_write_bufferram()
847 struct onenand_chip *this = mtd->priv; onenand_get_2x_blockpage() local
851 block = (int) (addr >> this->erase_shift) & ~1; onenand_get_2x_blockpage()
853 if (addr & this->writesize) onenand_get_2x_blockpage()
855 page = (int) (addr >> (this->page_shift + 1)) & this->page_mask; onenand_get_2x_blockpage()
871 struct onenand_chip *this = mtd->priv; onenand_check_bufferram() local
875 if (ONENAND_IS_2PLANE(this)) onenand_check_bufferram()
878 blockpage = (int) (addr >> this->page_shift); onenand_check_bufferram()
881 i = ONENAND_CURRENT_BUFFERRAM(this); onenand_check_bufferram()
882 if (this->bufferram[i].blockpage == blockpage) onenand_check_bufferram()
886 i = ONENAND_NEXT_BUFFERRAM(this); onenand_check_bufferram()
887 if (this->bufferram[i].blockpage == blockpage) { onenand_check_bufferram()
888 ONENAND_SET_NEXT_BUFFERRAM(this); onenand_check_bufferram()
893 if (found && ONENAND_IS_DDP(this)) { onenand_check_bufferram()
895 int block = onenand_block(this, addr); onenand_check_bufferram()
896 int value = onenand_bufferram_address(this, block); onenand_check_bufferram()
897 this->write_word(value, this->base + ONENAND_REG_START_ADDRESS2); onenand_check_bufferram()
914 struct onenand_chip *this = mtd->priv; onenand_update_bufferram() local
918 if (ONENAND_IS_2PLANE(this)) onenand_update_bufferram()
921 blockpage = (int) (addr >> this->page_shift); onenand_update_bufferram()
924 i = ONENAND_NEXT_BUFFERRAM(this); onenand_update_bufferram()
925 if (this->bufferram[i].blockpage == blockpage) onenand_update_bufferram()
926 this->bufferram[i].blockpage = -1; onenand_update_bufferram()
929 i = ONENAND_CURRENT_BUFFERRAM(this); onenand_update_bufferram()
931 this->bufferram[i].blockpage = blockpage; onenand_update_bufferram()
933 this->bufferram[i].blockpage = -1; onenand_update_bufferram()
947 struct onenand_chip *this = mtd->priv; onenand_invalidate_bufferram() local
953 loff_t buf_addr = this->bufferram[i].blockpage << this->page_shift; onenand_invalidate_bufferram()
955 this->bufferram[i].blockpage = -1; onenand_invalidate_bufferram()
968 struct onenand_chip *this = mtd->priv; onenand_get_device() local
975 spin_lock(&this->chip_lock); onenand_get_device()
976 if (this->state == FL_READY) { onenand_get_device()
977 this->state = new_state; onenand_get_device()
978 spin_unlock(&this->chip_lock); onenand_get_device()
979 if (new_state != FL_PM_SUSPENDED && this->enable) onenand_get_device()
980 this->enable(mtd); onenand_get_device()
984 spin_unlock(&this->chip_lock); onenand_get_device()
985 return (this->state == FL_PM_SUSPENDED) ? 0 : -EAGAIN; onenand_get_device()
988 add_wait_queue(&this->wq, &wait); onenand_get_device()
989 spin_unlock(&this->chip_lock); onenand_get_device()
991 remove_wait_queue(&this->wq, &wait); onenand_get_device()
1005 struct onenand_chip *this = mtd->priv; onenand_release_device() local
1007 if (this->state != FL_PM_SUSPENDED && this->disable) onenand_release_device()
1008 this->disable(mtd); onenand_release_device()
1010 spin_lock(&this->chip_lock); onenand_release_device()
1011 this->state = FL_READY; onenand_release_device()
1012 wake_up(&this->wq); onenand_release_device()
1013 spin_unlock(&this->chip_lock); onenand_release_device()
1026 struct onenand_chip *this = mtd->priv; onenand_transfer_auto_oob() local
1032 uint8_t *oob_buf = this->oob_buf; onenand_transfer_auto_oob()
1034 free = this->ecclayout->oobfree; onenand_transfer_auto_oob()
1042 this->read_bufferram(mtd, ONENAND_SPARERAM, oob_buf, 0, mtd->oobsize); onenand_transfer_auto_oob()
1043 free = this->ecclayout->oobfree; onenand_transfer_auto_oob()
1073 struct onenand_chip *this = mtd->priv; onenand_recover_lsb() local
1077 if (!FLEXONENAND(this)) onenand_recover_lsb()
1086 if (mtd->eraseregions[i].erasesize < (1 << this->erase_shift)) onenand_recover_lsb()
1097 this->command(mtd, FLEXONENAND_CMD_RECOVER_LSB, addr, this->writesize); onenand_recover_lsb()
1098 return this->wait(mtd, FL_READING); onenand_recover_lsb()
1113 struct onenand_chip *this = mtd->priv; onenand_mlc_read_ops_nolock() local
1122 int writesize = this->writesize; onenand_mlc_read_ops_nolock()
1128 oobsize = this->ecclayout->oobavail; onenand_mlc_read_ops_nolock()
1155 this->command(mtd, ONENAND_CMD_READ, from, writesize); onenand_mlc_read_ops_nolock()
1157 ret = this->wait(mtd, FL_READING); onenand_mlc_read_ops_nolock()
1167 this->read_bufferram(mtd, ONENAND_DATARAM, buf, column, thislen); onenand_mlc_read_ops_nolock()
1175 this->read_bufferram(mtd, ONENAND_SPARERAM, oobbuf, oobcolumn, thisooblen); onenand_mlc_read_ops_nolock()
1218 struct onenand_chip *this = mtd->priv; onenand_read_ops_nolock() local
1227 int writesize = this->writesize; onenand_read_ops_nolock()
1233 oobsize = this->ecclayout->oobavail; onenand_read_ops_nolock()
1255 this->command(mtd, ONENAND_CMD_READ, from, writesize); onenand_read_ops_nolock()
1256 ret = this->wait(mtd, FL_READING); onenand_read_ops_nolock()
1272 this->command(mtd, ONENAND_CMD_READ, from, writesize); onenand_read_ops_nolock()
1278 if (ONENAND_IS_DDP(this) && onenand_read_ops_nolock()
1279 unlikely(from == (this->chipsize >> 1))) { onenand_read_ops_nolock()
1280 this->write_word(ONENAND_DDP_CHIP0, this->base + ONENAND_REG_START_ADDRESS2); onenand_read_ops_nolock()
1284 ONENAND_SET_PREV_BUFFERRAM(this); onenand_read_ops_nolock()
1287 this->read_bufferram(mtd, ONENAND_DATARAM, buf, column, thislen); onenand_read_ops_nolock()
1297 this->read_bufferram(mtd, ONENAND_SPARERAM, oobbuf, oobcolumn, thisooblen); onenand_read_ops_nolock()
1309 this->write_word(ONENAND_DDP_CHIP1, this->base + ONENAND_REG_START_ADDRESS2); onenand_read_ops_nolock()
1310 ONENAND_SET_NEXT_BUFFERRAM(this); onenand_read_ops_nolock()
1316 ret = this->wait(mtd, FL_READING); onenand_read_ops_nolock()
1351 struct onenand_chip *this = mtd->priv; onenand_read_oob_nolock() local
1368 oobsize = this->ecclayout->oobavail; onenand_read_oob_nolock()
1382 column + len > ((mtd->size >> this->page_shift) - onenand_read_oob_nolock()
1383 (from >> this->page_shift)) * oobsize)) { onenand_read_oob_nolock()
1391 readcmd = ONENAND_IS_4KB_PAGE(this) ? ONENAND_CMD_READ : ONENAND_CMD_READOOB; onenand_read_oob_nolock()
1399 this->command(mtd, readcmd, from, mtd->oobsize); onenand_read_oob_nolock()
1403 ret = this->wait(mtd, FL_READING); onenand_read_oob_nolock()
1416 this->read_bufferram(mtd, ONENAND_SPARERAM, buf, column, thislen); onenand_read_oob_nolock()
1457 struct onenand_chip *this = mtd->priv; onenand_read() local
1467 ret = ONENAND_IS_4KB_PAGE(this) ? onenand_read()
1487 struct onenand_chip *this = mtd->priv; onenand_read_oob() local
1502 ret = ONENAND_IS_4KB_PAGE(this) ? onenand_read_oob()
1521 struct onenand_chip *this = mtd->priv; onenand_bbt_wait() local
1528 interrupt = this->read_word(this->base + ONENAND_REG_INTERRUPT); onenand_bbt_wait()
1533 interrupt = this->read_word(this->base + ONENAND_REG_INTERRUPT); onenand_bbt_wait()
1534 ctrl = this->read_word(this->base + ONENAND_REG_CTRL_STATUS); onenand_bbt_wait()
1535 addr1 = this->read_word(this->base + ONENAND_REG_START_ADDRESS1); onenand_bbt_wait()
1536 addr8 = this->read_word(this->base + ONENAND_REG_START_ADDRESS8); onenand_bbt_wait()
1539 ecc = onenand_read_ecc(this); onenand_bbt_wait()
1574 struct onenand_chip *this = mtd->priv; onenand_bbt_read_oob() local
1598 readcmd = ONENAND_IS_4KB_PAGE(this) ? ONENAND_CMD_READ : ONENAND_CMD_READOOB; onenand_bbt_read_oob()
1606 this->command(mtd, readcmd, from, mtd->oobsize); onenand_bbt_read_oob()
1610 ret = this->bbt_wait(mtd, FL_READING); onenand_bbt_read_oob()
1617 this->read_bufferram(mtd, ONENAND_SPARERAM, buf, column, thislen); onenand_bbt_read_oob()
1627 from += this->writesize; onenand_bbt_read_oob()
1648 struct onenand_chip *this = mtd->priv; onenand_verify_oob() local
1649 u_char *oob_buf = this->oob_buf; onenand_verify_oob()
1652 readcmd = ONENAND_IS_4KB_PAGE(this) ? ONENAND_CMD_READ : ONENAND_CMD_READOOB; onenand_verify_oob()
1654 this->command(mtd, readcmd, to, mtd->oobsize); onenand_verify_oob()
1656 status = this->wait(mtd, FL_READING); onenand_verify_oob()
1660 this->read_bufferram(mtd, ONENAND_SPARERAM, oob_buf, 0, mtd->oobsize); onenand_verify_oob()
1677 struct onenand_chip *this = mtd->priv; onenand_verify() local
1681 column = addr & (this->writesize - 1); onenand_verify()
1684 thislen = min_t(int, this->writesize - column, len); onenand_verify()
1686 this->command(mtd, ONENAND_CMD_READ, addr, this->writesize); onenand_verify()
1690 ret = this->wait(mtd, FL_READING); onenand_verify()
1696 this->read_bufferram(mtd, ONENAND_DATARAM, this->verify_buf, 0, mtd->writesize); onenand_verify()
1698 if (memcmp(buf, this->verify_buf + column, thislen)) onenand_verify()
1714 #define NOTALIGNED(x) ((x & (this->subpagesize - 1)) != 0)
1718 struct onenand_chip *this = mtd->priv; onenand_panic_wait() local
1723 interrupt = this->read_word(this->base + ONENAND_REG_INTERRUPT); onenand_panic_wait()
1743 struct onenand_chip *this = mtd->priv; onenand_panic_write() local
1747 if (this->state == FL_PM_SUSPENDED) onenand_panic_write()
1770 this->command(mtd, ONENAND_CMD_BUFFERRAM, to, thislen); onenand_panic_write()
1775 memset(this->page_buf, 0xff, mtd->writesize); onenand_panic_write()
1776 memcpy(this->page_buf + column, buf, thislen); onenand_panic_write()
1777 wbuf = this->page_buf; onenand_panic_write()
1780 this->write_bufferram(mtd, ONENAND_DATARAM, wbuf, 0, mtd->writesize); onenand_panic_write()
1781 this->write_bufferram(mtd, ONENAND_SPARERAM, ffchars, 0, mtd->oobsize); onenand_panic_write()
1783 this->command(mtd, ONENAND_CMD_PROG, to, mtd->writesize); onenand_panic_write()
1789 if (ONENAND_IS_2PLANE(this)) { onenand_panic_write()
1790 ONENAND_SET_BUFFERRAM1(this); onenand_panic_write()
1791 onenand_update_bufferram(mtd, to + this->writesize, !subpage); onenand_panic_write()
1819 struct onenand_chip *this = mtd->priv; onenand_fill_auto_oob() local
1826 free = this->ecclayout->oobfree; onenand_fill_auto_oob()
1834 free = this->ecclayout->oobfree; onenand_fill_auto_oob()
1860 struct onenand_chip *this = mtd->priv; onenand_write_ops_nolock() local
1890 oobsize = this->ecclayout->oobavail; onenand_write_ops_nolock()
1908 this->command(mtd, ONENAND_CMD_BUFFERRAM, to, thislen); onenand_write_ops_nolock()
1913 memset(this->page_buf, 0xff, mtd->writesize); onenand_write_ops_nolock()
1914 memcpy(this->page_buf + column, buf, thislen); onenand_write_ops_nolock()
1915 wbuf = this->page_buf; onenand_write_ops_nolock()
1918 this->write_bufferram(mtd, ONENAND_DATARAM, wbuf, 0, mtd->writesize); onenand_write_ops_nolock()
1921 oobbuf = this->oob_buf; onenand_write_ops_nolock()
1937 this->write_bufferram(mtd, ONENAND_SPARERAM, oobbuf, 0, mtd->oobsize); onenand_write_ops_nolock()
1939 ONENAND_SET_NEXT_BUFFERRAM(this); onenand_write_ops_nolock()
1945 if (!ONENAND_IS_2PLANE(this) && !ONENAND_IS_4KB_PAGE(this) && !first) { onenand_write_ops_nolock()
1946 ONENAND_SET_PREV_BUFFERRAM(this); onenand_write_ops_nolock()
1948 ret = this->wait(mtd, FL_WRITING); onenand_write_ops_nolock()
1968 ONENAND_SET_NEXT_BUFFERRAM(this); onenand_write_ops_nolock()
1971 this->ongoing = 0; onenand_write_ops_nolock()
1975 if (ONENAND_IS_CACHE_PROGRAM(this) && onenand_write_ops_nolock()
1976 likely(onenand_block(this, to) != 0) && onenand_write_ops_nolock()
1977 ONENAND_IS_4KB_PAGE(this) && onenand_write_ops_nolock()
1980 this->ongoing = 1; onenand_write_ops_nolock()
1983 this->command(mtd, cmd, to, mtd->writesize); onenand_write_ops_nolock()
1988 if (ONENAND_IS_2PLANE(this) || ONENAND_IS_4KB_PAGE(this)) { onenand_write_ops_nolock()
1989 ret = this->wait(mtd, FL_WRITING); onenand_write_ops_nolock()
2049 struct onenand_chip *this = mtd->priv; onenand_write_oob_nolock() local
2066 oobsize = this->ecclayout->oobavail; onenand_write_oob_nolock()
2087 column + len > ((mtd->size >> this->page_shift) - onenand_write_oob_nolock()
2088 (to >> this->page_shift)) * oobsize)) { onenand_write_oob_nolock()
2094 oobbuf = this->oob_buf; onenand_write_oob_nolock()
2096 oobcmd = ONENAND_IS_4KB_PAGE(this) ? ONENAND_CMD_PROG : ONENAND_CMD_PROGOOB; onenand_write_oob_nolock()
2104 this->command(mtd, ONENAND_CMD_BUFFERRAM, to, mtd->oobsize); onenand_write_oob_nolock()
2113 this->write_bufferram(mtd, ONENAND_SPARERAM, oobbuf, 0, mtd->oobsize); onenand_write_oob_nolock()
2115 if (ONENAND_IS_4KB_PAGE(this)) { onenand_write_oob_nolock()
2117 memset(this->page_buf, 0xff, mtd->writesize); onenand_write_oob_nolock()
2118 this->write_bufferram(mtd, ONENAND_DATARAM, onenand_write_oob_nolock()
2119 this->page_buf, 0, mtd->writesize); onenand_write_oob_nolock()
2122 this->command(mtd, oobcmd, to, mtd->oobsize); onenand_write_oob_nolock()
2125 if (ONENAND_IS_2PLANE(this)) { onenand_write_oob_nolock()
2126 ONENAND_SET_BUFFERRAM1(this); onenand_write_oob_nolock()
2127 onenand_update_bufferram(mtd, to + this->writesize, 0); onenand_write_oob_nolock()
2130 ret = this->wait(mtd, FL_WRITING); onenand_write_oob_nolock()
2228 struct onenand_chip *this = mtd->priv; onenand_block_isbad_nolock() local
2229 struct bbm_info *bbm = this->bbm; onenand_block_isbad_nolock()
2239 struct onenand_chip *this = mtd->priv; onenand_multiblock_erase_verify() local
2242 unsigned int block_size = (1 << this->erase_shift); onenand_multiblock_erase_verify()
2246 this->command(mtd, ONENAND_CMD_ERASE_VERIFY, addr, block_size); onenand_multiblock_erase_verify()
2247 ret = this->wait(mtd, FL_VERIFYING_ERASE); onenand_multiblock_erase_verify()
2250 __func__, onenand_block(this, addr)); onenand_multiblock_erase_verify()
2273 struct onenand_chip *this = mtd->priv; onenand_multiblock_erase() local
2282 if (ONENAND_IS_DDP(this)) { onenand_multiblock_erase()
2283 loff_t bdry_addr = this->chipsize >> 1; onenand_multiblock_erase()
2285 bdry_block = bdry_addr >> this->erase_shift; onenand_multiblock_erase()
2315 int this_block = (addr >> this->erase_shift); onenand_multiblock_erase()
2326 this->command(mtd, ONENAND_CMD_MULTIBLOCK_ERASE, onenand_multiblock_erase()
2330 ret = this->wait(mtd, FL_PREPARING_ERASE); onenand_multiblock_erase()
2334 onenand_block(this, addr)); onenand_multiblock_erase()
2347 this->command(mtd, ONENAND_CMD_ERASE, addr, block_size); onenand_multiblock_erase()
2350 ret = this->wait(mtd, FL_ERASING); onenand_multiblock_erase()
2354 __func__, onenand_block(this, addr)); onenand_multiblock_erase()
2391 struct onenand_chip *this = mtd->priv; onenand_block_by_block_erase() local
2417 this->command(mtd, ONENAND_CMD_ERASE, addr, block_size); onenand_block_by_block_erase()
2421 ret = this->wait(mtd, FL_ERASING); onenand_block_by_block_erase()
2425 __func__, onenand_block(this, addr)); onenand_block_by_block_erase()
2462 struct onenand_chip *this = mtd->priv; onenand_erase() local
2474 if (FLEXONENAND(this)) { onenand_erase()
2475 /* Find the eraseregion of this address */ onenand_erase()
2486 block_size = 1 << this->erase_shift; onenand_erase()
2503 if (ONENAND_IS_4KB_PAGE(this) || region || onenand_erase()
2568 struct onenand_chip *this = mtd->priv; onenand_default_block_markbad() local
2569 struct bbm_info *bbm = this->bbm; onenand_default_block_markbad()
2580 block = onenand_block(this, ofs); onenand_default_block_markbad()
2602 struct onenand_chip *this = mtd->priv; onenand_block_markbad() local
2614 ret = this->block_markbad(mtd, ofs); onenand_block_markbad()
2630 struct onenand_chip *this = mtd->priv; onenand_do_lock_cmd() local
2634 start = onenand_block(this, ofs); onenand_do_lock_cmd()
2635 end = onenand_block(this, ofs + len) - 1; onenand_do_lock_cmd()
2643 if (this->options & ONENAND_HAS_CONT_LOCK) { onenand_do_lock_cmd()
2645 this->write_word(start, this->base + ONENAND_REG_START_BLOCK_ADDRESS); onenand_do_lock_cmd()
2647 this->write_word(end, this->base + ONENAND_REG_END_BLOCK_ADDRESS); onenand_do_lock_cmd()
2649 this->command(mtd, cmd, 0, 0); onenand_do_lock_cmd()
2652 this->wait(mtd, FL_LOCKING); onenand_do_lock_cmd()
2655 while (this->read_word(this->base + ONENAND_REG_CTRL_STATUS) onenand_do_lock_cmd()
2660 status = this->read_word(this->base + ONENAND_REG_WP_STATUS); onenand_do_lock_cmd()
2671 value = onenand_block_address(this, block); onenand_do_lock_cmd()
2672 this->write_word(value, this->base + ONENAND_REG_START_ADDRESS1); onenand_do_lock_cmd()
2674 value = onenand_bufferram_address(this, block); onenand_do_lock_cmd()
2675 this->write_word(value, this->base + ONENAND_REG_START_ADDRESS2); onenand_do_lock_cmd()
2677 this->write_word(block, this->base + ONENAND_REG_START_BLOCK_ADDRESS); onenand_do_lock_cmd()
2679 this->command(mtd, cmd, 0, 0); onenand_do_lock_cmd()
2682 this->wait(mtd, FL_LOCKING); onenand_do_lock_cmd()
2685 while (this->read_word(this->base + ONENAND_REG_CTRL_STATUS) onenand_do_lock_cmd()
2690 status = this->read_word(this->base + ONENAND_REG_WP_STATUS); onenand_do_lock_cmd()
2737 * @param this onenand chip data structure
2741 static int onenand_check_lock_status(struct onenand_chip *this) onenand_check_lock_status() argument
2746 end = this->chipsize >> this->erase_shift; onenand_check_lock_status()
2749 value = onenand_block_address(this, block); onenand_check_lock_status()
2750 this->write_word(value, this->base + ONENAND_REG_START_ADDRESS1); onenand_check_lock_status()
2752 value = onenand_bufferram_address(this, block); onenand_check_lock_status()
2753 this->write_word(value, this->base + ONENAND_REG_START_ADDRESS2); onenand_check_lock_status()
2755 this->write_word(block, this->base + ONENAND_REG_START_BLOCK_ADDRESS); onenand_check_lock_status()
2758 status = this->read_word(this->base + ONENAND_REG_WP_STATUS); onenand_check_lock_status()
2777 struct onenand_chip *this = mtd->priv; onenand_unlock_all() local
2781 if (this->options & ONENAND_HAS_UNLOCK_ALL) { onenand_unlock_all()
2783 this->write_word(0, this->base + ONENAND_REG_START_BLOCK_ADDRESS); onenand_unlock_all()
2785 this->command(mtd, ONENAND_CMD_UNLOCK_ALL, 0, 0); onenand_unlock_all()
2788 this->wait(mtd, FL_LOCKING); onenand_unlock_all()
2791 while (this->read_word(this->base + ONENAND_REG_CTRL_STATUS) onenand_unlock_all()
2796 if (this->options & ONENAND_SKIP_UNLOCK_CHECK) onenand_unlock_all()
2800 if (onenand_check_lock_status(this)) onenand_unlock_all()
2804 if (ONENAND_IS_DDP(this) && !FLEXONENAND(this)) { onenand_unlock_all()
2806 ofs = this->chipsize >> 1; onenand_unlock_all()
2807 len = this->chipsize >> 1; onenand_unlock_all()
2826 struct onenand_chip *this = mtd->priv; onenand_otp_command() local
2832 block = (int) (addr >> this->erase_shift); onenand_otp_command()
2837 block = (int) (addr >> this->erase_shift); onenand_otp_command()
2838 page = (int) (addr >> this->page_shift); onenand_otp_command()
2840 if (ONENAND_IS_2PLANE(this)) { onenand_otp_command()
2844 if (addr & this->writesize) onenand_otp_command()
2848 page &= this->page_mask; onenand_otp_command()
2854 value = onenand_block_address(this, block); onenand_otp_command()
2855 this->write_word(value, this->base + onenand_otp_command()
2866 if (ONENAND_IS_2PLANE(this) && cmd == ONENAND_CMD_PROG) onenand_otp_command()
2868 dataram = ONENAND_CURRENT_BUFFERRAM(this); onenand_otp_command()
2874 this->write_word(value, this->base + onenand_otp_command()
2879 this->write_word(value, this->base + ONENAND_REG_START_BUFFER); onenand_otp_command()
2883 this->write_word(ONENAND_INT_CLEAR, this->base + ONENAND_REG_INTERRUPT); onenand_otp_command()
2886 this->write_word(cmd, this->base + ONENAND_REG_COMMAND); onenand_otp_command()
2904 struct onenand_chip *this = mtd->priv; onenand_otp_write_oob_nolock() local
2921 oobbuf = this->oob_buf; onenand_otp_write_oob_nolock()
2929 block = (int) (to >> this->erase_shift); onenand_otp_write_oob_nolock()
2935 value = onenand_block_address(this, block); onenand_otp_write_oob_nolock()
2936 this->write_word(value, this->base + onenand_otp_write_oob_nolock()
2944 value = onenand_bufferram_address(this, block); onenand_otp_write_oob_nolock()
2945 this->write_word(value, this->base + onenand_otp_write_oob_nolock()
2947 ONENAND_SET_NEXT_BUFFERRAM(this); onenand_otp_write_oob_nolock()
2952 this->command(mtd, ONENAND_CMD_OTP_ACCESS, 0, 0); onenand_otp_write_oob_nolock()
2953 this->wait(mtd, FL_OTPING); onenand_otp_write_oob_nolock()
2965 this->write_bufferram(mtd, ONENAND_SPARERAM, onenand_otp_write_oob_nolock()
2970 if (ONENAND_IS_2PLANE(this)) { onenand_otp_write_oob_nolock()
2971 ONENAND_SET_BUFFERRAM1(this); onenand_otp_write_oob_nolock()
2972 onenand_update_bufferram(mtd, to + this->writesize, 0); onenand_otp_write_oob_nolock()
2975 ret = this->wait(mtd, FL_WRITING); onenand_otp_write_oob_nolock()
2982 this->command(mtd, ONENAND_CMD_RESET, 0, 0); onenand_otp_write_oob_nolock()
2983 this->wait(mtd, FL_RESETING); onenand_otp_write_oob_nolock()
2985 status = this->read_word(this->base + ONENAND_REG_CTRL_STATUS); onenand_otp_write_oob_nolock()
3035 struct onenand_chip *this = mtd->priv; do_otp_read() local
3045 this->command(mtd, ONENAND_CMD_OTP_ACCESS, 0, 0); do_otp_read()
3046 this->wait(mtd, FL_OTPING); do_otp_read()
3048 ret = ONENAND_IS_4KB_PAGE(this) ? do_otp_read()
3053 this->command(mtd, ONENAND_CMD_RESET, 0, 0); do_otp_read()
3054 this->wait(mtd, FL_RESETING); do_otp_read()
3072 struct onenand_chip *this = mtd->priv; do_otp_write() local
3079 memcpy(this->page_buf, buf, len); do_otp_write()
3080 memset(this->page_buf + len, 0xff, mtd->writesize - len); do_otp_write()
3081 pbuf = this->page_buf; do_otp_write()
3086 this->command(mtd, ONENAND_CMD_OTP_ACCESS, 0, 0); do_otp_write()
3087 this->wait(mtd, FL_OTPING); do_otp_write()
3097 this->command(mtd, ONENAND_CMD_RESET, 0, 0); do_otp_write()
3098 this->wait(mtd, FL_RESETING); do_otp_write()
3116 struct onenand_chip *this = mtd->priv; do_otp_lock() local
3120 if (FLEXONENAND(this)) { do_otp_lock()
3123 this->command(mtd, ONENAND_CMD_OTP_ACCESS, 0, 0); do_otp_lock()
3124 this->wait(mtd, FL_OTPING); do_otp_lock()
3137 this->command(mtd, ONENAND_CMD_RESET, 0, 0); do_otp_lock()
3138 this->wait(mtd, FL_RESETING); do_otp_lock()
3167 struct onenand_chip *this = mtd->priv; onenand_otp_walk() local
3174 density = onenand_get_density(this->device_id); onenand_otp_walk()
3323 struct onenand_chip *this = mtd->priv; onenand_lock_user_prot_reg() local
3324 u_char *buf = FLEXONENAND(this) ? this->page_buf : this->oob_buf; onenand_lock_user_prot_reg()
3329 memset(buf, 0xff, FLEXONENAND(this) ? this->writesize onenand_lock_user_prot_reg()
3339 len = FLEXONENAND(this) ? mtd->writesize : 16; onenand_lock_user_prot_reg()
3347 if (FLEXONENAND(this)) onenand_lock_user_prot_reg()
3377 struct onenand_chip *this = mtd->priv; onenand_check_features() local
3381 density = onenand_get_density(this->device_id); onenand_check_features()
3382 process = this->version_id >> ONENAND_VERSION_PROCESS_SHIFT; onenand_check_features()
3383 numbufs = this->read_word(this->base + ONENAND_REG_NUM_BUFFERS) >> 8; onenand_check_features()
3388 if (ONENAND_IS_DDP(this)) onenand_check_features()
3389 this->options |= ONENAND_HAS_2PLANE; onenand_check_features()
3391 this->options |= ONENAND_HAS_4KB_PAGE; onenand_check_features()
3392 this->options |= ONENAND_HAS_CACHE_PROGRAM; onenand_check_features()
3404 if ((this->version_id & 0xf) == 0xe) onenand_check_features()
3405 this->options |= ONENAND_HAS_NOP_1; onenand_check_features()
3410 if (!ONENAND_IS_DDP(this)) onenand_check_features()
3411 this->options |= ONENAND_HAS_2PLANE; onenand_check_features()
3412 this->options |= ONENAND_HAS_UNLOCK_ALL; onenand_check_features()
3417 this->options |= ONENAND_HAS_UNLOCK_ALL; onenand_check_features()
3423 this->options |= ONENAND_HAS_CONT_LOCK; onenand_check_features()
3428 if (ONENAND_IS_MLC(this)) onenand_check_features()
3429 this->options |= ONENAND_HAS_4KB_PAGE; onenand_check_features()
3431 if (ONENAND_IS_4KB_PAGE(this)) onenand_check_features()
3432 this->options &= ~ONENAND_HAS_2PLANE; onenand_check_features()
3434 if (FLEXONENAND(this)) { onenand_check_features()
3435 this->options &= ~ONENAND_HAS_CONT_LOCK; onenand_check_features()
3436 this->options |= ONENAND_HAS_UNLOCK_ALL; onenand_check_features()
3439 if (this->options & ONENAND_HAS_CONT_LOCK) onenand_check_features()
3441 if (this->options & ONENAND_HAS_UNLOCK_ALL) onenand_check_features()
3443 if (this->options & ONENAND_HAS_2PLANE) onenand_check_features()
3445 if (this->options & ONENAND_HAS_4KB_PAGE) onenand_check_features()
3447 if (this->options & ONENAND_HAS_CACHE_PROGRAM) onenand_check_features()
3514 struct onenand_chip *this = mtd->priv; flexonenand_get_boundary() local
3519 syscfg = this->read_word(this->base + ONENAND_REG_SYS_CFG1); flexonenand_get_boundary()
3520 this->write_word((syscfg | 0x0100), this->base + ONENAND_REG_SYS_CFG1); flexonenand_get_boundary()
3522 for (die = 0; die < this->dies; die++) { flexonenand_get_boundary()
3523 this->command(mtd, FLEXONENAND_CMD_PI_ACCESS, die, 0); flexonenand_get_boundary()
3524 this->wait(mtd, FL_SYNCING); flexonenand_get_boundary()
3526 this->command(mtd, FLEXONENAND_CMD_READ_PI, die, 0); flexonenand_get_boundary()
3527 this->wait(mtd, FL_READING); flexonenand_get_boundary()
3529 bdry = this->read_word(this->base + ONENAND_DATARAM); flexonenand_get_boundary()
3534 this->boundary[die] = bdry & FLEXONENAND_PI_MASK; flexonenand_get_boundary()
3536 this->command(mtd, ONENAND_CMD_RESET, 0, 0); flexonenand_get_boundary()
3537 this->wait(mtd, FL_RESETING); flexonenand_get_boundary()
3540 this->boundary[die], locked ? "(Locked)" : "(Unlocked)"); flexonenand_get_boundary()
3544 this->write_word(syscfg, this->base + ONENAND_REG_SYS_CFG1); flexonenand_get_boundary()
3555 struct onenand_chip *this = mtd->priv; flexonenand_get_size() local
3560 density = onenand_get_density(this->device_id); flexonenand_get_size()
3561 blksperdie = ((loff_t)(16 << density) << 20) >> (this->erase_shift); flexonenand_get_size()
3562 blksperdie >>= ONENAND_IS_DDP(this) ? 1 : 0; flexonenand_get_size()
3564 eraseshift = this->erase_shift - 1; flexonenand_get_size()
3566 mtd->numeraseregions = this->dies << 1; flexonenand_get_size()
3572 for (; die < this->dies; die++) { flexonenand_get_size()
3573 if (!die || this->boundary[die-1] != maxbdry) { flexonenand_get_size()
3578 this->boundary[die] + 1; flexonenand_get_size()
3584 this->boundary[die] + 1; flexonenand_get_size()
3585 ofs += (this->boundary[die] + 1) << (eraseshift - 1); flexonenand_get_size()
3587 if (this->boundary[die] != maxbdry) { flexonenand_get_size()
3592 this->boundary[die]; flexonenand_get_size()
3600 mtd->erasesize = 1 << this->erase_shift; flexonenand_get_size()
3612 for (die = 0, mtd->size = 0; die < this->dies; die++) { flexonenand_get_size()
3613 this->diesize[die] = (loff_t)blksperdie << this->erase_shift; flexonenand_get_size()
3614 this->diesize[die] -= (loff_t)(this->boundary[die] + 1) flexonenand_get_size()
3615 << (this->erase_shift - 1); flexonenand_get_size()
3616 mtd->size += this->diesize[die]; flexonenand_get_size()
3631 * Avoid this by ensuring that the block to be converted is
3636 struct onenand_chip *this = mtd->priv; flexonenand_check_blocks_erased() local
3644 .oobbuf = this->oob_buf, flexonenand_check_blocks_erased()
3651 addr = flexonenand_addr(this, block); flexonenand_check_blocks_erased()
3664 if (this->oob_buf[i] != 0xff) flexonenand_check_blocks_erased()
3684 struct onenand_chip *this = mtd->priv; flexonenand_set_boundary() local
3689 if (die && (!ONENAND_IS_DDP(this))) flexonenand_set_boundary()
3693 if (boundary < 0 || boundary == this->boundary[die]) flexonenand_set_boundary()
3696 density = onenand_get_density(this->device_id); flexonenand_set_boundary()
3697 blksperdie = ((16 << density) << 20) >> this->erase_shift; flexonenand_set_boundary()
3698 blksperdie >>= ONENAND_IS_DDP(this) ? 1 : 0; flexonenand_set_boundary()
3707 old = this->boundary[die] + (die * this->density_mask); flexonenand_set_boundary()
3708 new = boundary + (die * this->density_mask); flexonenand_set_boundary()
3716 this->command(mtd, FLEXONENAND_CMD_PI_ACCESS, die, 0); flexonenand_set_boundary()
3717 this->wait(mtd, FL_SYNCING); flexonenand_set_boundary()
3720 this->command(mtd, FLEXONENAND_CMD_READ_PI, die, 0); flexonenand_set_boundary()
3721 this->wait(mtd, FL_READING); flexonenand_set_boundary()
3723 thisboundary = this->read_word(this->base + ONENAND_DATARAM); flexonenand_set_boundary()
3733 addr = die ? this->diesize[0] : 0; flexonenand_set_boundary()
3738 this->command(mtd, ONENAND_CMD_ERASE, addr, 0); flexonenand_set_boundary()
3739 ret = this->wait(mtd, FL_ERASING); flexonenand_set_boundary()
3746 this->write_word(boundary, this->base + ONENAND_DATARAM); flexonenand_set_boundary()
3747 this->command(mtd, ONENAND_CMD_PROG, addr, 0); flexonenand_set_boundary()
3748 ret = this->wait(mtd, FL_WRITING); flexonenand_set_boundary()
3755 this->command(mtd, FLEXONENAND_CMD_PI_UPDATE, die, 0); flexonenand_set_boundary()
3756 ret = this->wait(mtd, FL_WRITING); flexonenand_set_boundary()
3758 this->write_word(ONENAND_CMD_RESET, this->base + ONENAND_REG_COMMAND); flexonenand_set_boundary()
3759 this->wait(mtd, FL_RESETING); flexonenand_set_boundary()
3776 struct onenand_chip *this = mtd->priv; onenand_chip_probe() local
3781 syscfg = this->read_word(this->base + ONENAND_REG_SYS_CFG1); onenand_chip_probe()
3783 this->write_word((syscfg & ~ONENAND_SYS_CFG1_SYNC_READ & ~ONENAND_SYS_CFG1_SYNC_WRITE), this->base + ONENAND_REG_SYS_CFG1); onenand_chip_probe()
3786 this->write_word(ONENAND_CMD_READID, this->base + ONENAND_BOOTRAM); onenand_chip_probe()
3789 bram_maf_id = this->read_word(this->base + ONENAND_BOOTRAM + 0x0); onenand_chip_probe()
3790 bram_dev_id = this->read_word(this->base + ONENAND_BOOTRAM + 0x2); onenand_chip_probe()
3793 this->write_word(ONENAND_CMD_RESET, this->base + ONENAND_BOOTRAM); onenand_chip_probe()
3795 this->wait(mtd, FL_RESETING); onenand_chip_probe()
3798 this->write_word(syscfg, this->base + ONENAND_REG_SYS_CFG1); onenand_chip_probe()
3805 maf_id = this->read_word(this->base + ONENAND_REG_MANUFACTURER_ID); onenand_chip_probe()
3806 dev_id = this->read_word(this->base + ONENAND_REG_DEVICE_ID); onenand_chip_probe()
3821 struct onenand_chip *this = mtd->priv; onenand_probe() local
3826 ret = this->chip_probe(mtd); onenand_probe()
3831 dev_id = this->read_word(this->base + ONENAND_REG_DEVICE_ID); onenand_probe()
3832 ver_id = this->read_word(this->base + ONENAND_REG_VERSION_ID); onenand_probe()
3833 this->technology = this->read_word(this->base + ONENAND_REG_TECHNOLOGY); onenand_probe()
3837 this->device_id = dev_id; onenand_probe()
3838 this->version_id = ver_id; onenand_probe()
3844 if (FLEXONENAND(this)) { onenand_probe()
3845 this->dies = ONENAND_IS_DDP(this) ? 2 : 1; onenand_probe()
3847 mtd->numeraseregions = this->dies << 1; onenand_probe()
3849 * (this->dies << 1), GFP_KERNEL); onenand_probe()
3858 this->chipsize = (16 << density) << 20; onenand_probe()
3862 mtd->writesize = this->read_word(this->base + ONENAND_REG_DATA_BUFFER_SIZE); onenand_probe()
3864 if (ONENAND_IS_4KB_PAGE(this)) onenand_probe()
3875 if (FLEXONENAND(this)) onenand_probe()
3878 this->erase_shift = ffs(mtd->erasesize) - 1; onenand_probe()
3879 this->page_shift = ffs(mtd->writesize) - 1; onenand_probe()
3880 this->page_mask = (1 << (this->erase_shift - this->page_shift)) - 1; onenand_probe()
3882 if (ONENAND_IS_DDP(this)) onenand_probe()
3883 this->density_mask = this->chipsize >> (this->erase_shift + 1); onenand_probe()
3885 this->writesize = mtd->writesize; onenand_probe()
3889 if (FLEXONENAND(this)) onenand_probe()
3892 mtd->size = this->chipsize; onenand_probe()
3900 if (ONENAND_IS_2PLANE(this)) { onenand_probe()
3923 struct onenand_chip *this = mtd->priv; onenand_resume() local
3925 if (this->state == FL_PM_SUSPENDED) onenand_resume()
3945 struct onenand_chip *this = mtd->priv; onenand_scan() local
3947 if (!this->read_word) onenand_scan()
3948 this->read_word = onenand_readw; onenand_scan()
3949 if (!this->write_word) onenand_scan()
3950 this->write_word = onenand_writew; onenand_scan()
3952 if (!this->command) onenand_scan()
3953 this->command = onenand_command; onenand_scan()
3954 if (!this->wait) onenand_scan()
3956 if (!this->bbt_wait) onenand_scan()
3957 this->bbt_wait = onenand_bbt_wait; onenand_scan()
3958 if (!this->unlock_all) onenand_scan()
3959 this->unlock_all = onenand_unlock_all; onenand_scan()
3961 if (!this->chip_probe) onenand_scan()
3962 this->chip_probe = onenand_chip_probe; onenand_scan()
3964 if (!this->read_bufferram) onenand_scan()
3965 this->read_bufferram = onenand_read_bufferram; onenand_scan()
3966 if (!this->write_bufferram) onenand_scan()
3967 this->write_bufferram = onenand_write_bufferram; onenand_scan()
3969 if (!this->block_markbad) onenand_scan()
3970 this->block_markbad = onenand_default_block_markbad; onenand_scan()
3971 if (!this->scan_bbt) onenand_scan()
3972 this->scan_bbt = onenand_default_bbt; onenand_scan()
3978 if (this->mmcontrol) { onenand_scan()
3980 this->read_bufferram = onenand_sync_read_bufferram; onenand_scan()
3984 if (!this->page_buf) { onenand_scan()
3985 this->page_buf = kzalloc(mtd->writesize, GFP_KERNEL); onenand_scan()
3986 if (!this->page_buf) onenand_scan()
3989 this->verify_buf = kzalloc(mtd->writesize, GFP_KERNEL); onenand_scan()
3990 if (!this->verify_buf) { onenand_scan()
3991 kfree(this->page_buf); onenand_scan()
3995 this->options |= ONENAND_PAGEBUF_ALLOC; onenand_scan()
3997 if (!this->oob_buf) { onenand_scan()
3998 this->oob_buf = kzalloc(mtd->oobsize, GFP_KERNEL); onenand_scan()
3999 if (!this->oob_buf) { onenand_scan()
4000 if (this->options & ONENAND_PAGEBUF_ALLOC) { onenand_scan()
4001 this->options &= ~ONENAND_PAGEBUF_ALLOC; onenand_scan()
4002 kfree(this->page_buf); onenand_scan()
4006 this->options |= ONENAND_OOBBUF_ALLOC; onenand_scan()
4009 this->state = FL_READY; onenand_scan()
4010 init_waitqueue_head(&this->wq); onenand_scan()
4011 spin_lock_init(&this->chip_lock); onenand_scan()
4018 if (FLEXONENAND(this)) { onenand_scan()
4019 this->ecclayout = &flexonenand_oob_128; onenand_scan()
4022 this->ecclayout = &onenand_oob_128; onenand_scan()
4025 if (ONENAND_IS_NOP_1(this)) onenand_scan()
4029 this->ecclayout = &onenand_oob_64; onenand_scan()
4034 this->ecclayout = &onenand_oob_32; onenand_scan()
4043 this->ecclayout = &onenand_oob_32; onenand_scan()
4047 this->subpagesize = mtd->writesize >> mtd->subpage_sft; onenand_scan()
4053 this->ecclayout->oobavail = 0; onenand_scan()
4055 this->ecclayout->oobfree[i].length; i++) onenand_scan()
4056 this->ecclayout->oobavail += onenand_scan()
4057 this->ecclayout->oobfree[i].length; onenand_scan()
4058 mtd->oobavail = this->ecclayout->oobavail; onenand_scan()
4060 mtd->ecclayout = this->ecclayout; onenand_scan()
4064 mtd->type = ONENAND_IS_MLC(this) ? MTD_MLCNANDFLASH : MTD_NANDFLASH; onenand_scan()
4093 if (!(this->options & ONENAND_SKIP_INITIAL_UNLOCKING)) onenand_scan()
4094 this->unlock_all(mtd); onenand_scan()
4096 ret = this->scan_bbt(mtd); onenand_scan()
4097 if ((!FLEXONENAND(this)) || ret) onenand_scan()
4114 struct onenand_chip *this = mtd->priv; onenand_release() local
4120 if (this->bbm) { onenand_release()
4121 struct bbm_info *bbm = this->bbm; onenand_release()
4123 kfree(this->bbm); onenand_release()
4126 if (this->options & ONENAND_PAGEBUF_ALLOC) { onenand_release()
4127 kfree(this->page_buf); onenand_release()
4129 kfree(this->verify_buf); onenand_release()
4132 if (this->options & ONENAND_OOBBUF_ALLOC) onenand_release()
4133 kfree(this->oob_buf); onenand_release()
H A Donenand_bbt.c59 struct onenand_chip *this = mtd->priv; create_bbt() local
60 struct bbm_info *bbm = this->bbm; create_bbt()
80 numblocks = this->chipsize >> (bbm->bbt_erase_shift - 1); create_bbt()
96 from + j * this->writesize + bd->offs, &ops); create_bbt()
103 scanlen, this->writesize, bd)) { create_bbt()
113 if (FLEXONENAND(this)) { create_bbt()
134 struct onenand_chip *this = mtd->priv; onenand_memory_bbt() local
136 return create_bbt(mtd, this->page_buf, bd, -1); onenand_memory_bbt()
147 struct onenand_chip *this = mtd->priv; onenand_isbad_bbt() local
148 struct bbm_info *bbm = this->bbm; onenand_isbad_bbt()
153 block = (int) (onenand_block(this, offs) << 1); onenand_isbad_bbt()
184 struct onenand_chip *this = mtd->priv; onenand_scan_bbt() local
185 struct bbm_info *bbm = this->bbm; onenand_scan_bbt()
188 len = this->chipsize >> (this->erase_shift + 2); onenand_scan_bbt()
198 bbm->bbt_erase_shift = this->erase_shift; onenand_scan_bbt()
235 struct onenand_chip *this = mtd->priv; onenand_default_bbt() local
238 this->bbm = kzalloc(sizeof(struct bbm_info), GFP_KERNEL); onenand_default_bbt()
239 if (!this->bbm) onenand_default_bbt()
242 bbm = this->bbm; onenand_default_bbt()
/linux-4.1.27/arch/sh/include/asm/
H A Dshmparam.h8 * License. See the file "COPYING" in the main directory of this archive
15 * SH-4 and SH-3 7705 have an aliasing dcache. Bump this up to a sensible value
18 #define SHMLBA 0x4000 /* attach addr a multiple of this */
H A Dspinlock_types.h5 # error "please don't include this file directly"
/linux-4.1.27/arch/sparc/include/asm/
H A Dkmap_types.h4 /* Dummy header just to define km_type. None of this
H A Dshmparam_64.h7 /* attach addr a multiple of this */
H A Dspinlock_types.h5 # error "please don't include this file directly"
H A Dsignal.h13 * SA_STATIC_ALLOC is used for the sparc32 system to indicate that this
17 * of interrupt usage and that sucks. Also without a flag like this
/linux-4.1.27/arch/um/include/asm/
H A Dsetup.h5 * command line, so this choice is ok.
/linux-4.1.27/include/linux/mtd/
H A Donenand.h75 * @chip_lock: [INTERN] spinlock used to protect access to this
157 #define ONENAND_CURRENT_BUFFERRAM(this) (this->bufferram_index)
158 #define ONENAND_NEXT_BUFFERRAM(this) (this->bufferram_index ^ 1)
159 #define ONENAND_SET_NEXT_BUFFERRAM(this) (this->bufferram_index ^= 1)
160 #define ONENAND_SET_PREV_BUFFERRAM(this) (this->bufferram_index ^= 1)
161 #define ONENAND_SET_BUFFERRAM0(this) (this->bufferram_index = 0)
162 #define ONENAND_SET_BUFFERRAM1(this) (this->bufferram_index = 1)
164 #define FLEXONENAND(this) \
165 (this->device_id & DEVICE_IS_FLEXONENAND)
166 #define ONENAND_GET_SYS_CFG1(this) \
167 (this->read_word(this->base + ONENAND_REG_SYS_CFG1))
168 #define ONENAND_SET_SYS_CFG1(v, this) \
169 (this->write_word(v, this->base + ONENAND_REG_SYS_CFG1))
171 #define ONENAND_IS_DDP(this) \
172 (this->device_id & ONENAND_DEVICE_IS_DDP)
174 #define ONENAND_IS_MLC(this) \
175 (this->technology & ONENAND_TECHNOLOGY_IS_MLC)
178 #define ONENAND_IS_2PLANE(this) \
179 (this->options & ONENAND_HAS_2PLANE)
181 #define ONENAND_IS_2PLANE(this) (0)
184 #define ONENAND_IS_CACHE_PROGRAM(this) \
185 (this->options & ONENAND_HAS_CACHE_PROGRAM)
187 #define ONENAND_IS_NOP_1(this) \
188 (this->options & ONENAND_HAS_NOP_1)
207 #define ONENAND_IS_4KB_PAGE(this) \
208 (this->options & ONENAND_HAS_4KB_PAGE)
228 unsigned onenand_block(struct onenand_chip *this, loff_t addr);
229 loff_t onenand_addr(struct onenand_chip *this, int block);
H A Dftl.h5 * The contents of this file are subject to the Mozilla Public License
6 * Version 1.1 (the "License"); you may not use this file except in
19 * Alternatively, the contents of this file may be used under the
22 * above. If you wish to allow the use of your version of this file
24 * your version of this file under the MPL, indicate your decision by
27 * provisions above, a recipient may use your version of this file
/linux-4.1.27/include/linux/platform_data/
H A Dst1232_pdata.h7 * Use this if you want the driver to drive the reset pin.
/linux-4.1.27/arch/s390/include/asm/
H A Dshmparam.h9 #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
H A Dspinlock_types.h5 # error "please don't include this file directly"
/linux-4.1.27/drivers/mtd/nand/
H A Dcmx270_nand.c56 struct nand_chip *this = mtd->priv; cmx270_read_byte() local
58 return (readl(this->IO_ADDR_R) >> 16); cmx270_read_byte()
64 struct nand_chip *this = mtd->priv; cmx270_write_buf() local
67 writel((*buf++ << 16), this->IO_ADDR_W); cmx270_write_buf()
73 struct nand_chip *this = mtd->priv; cmx270_read_buf() local
76 *buf++ = readl(this->IO_ADDR_R) >> 16; cmx270_read_buf()
97 struct nand_chip* this = mtd->priv; cmx270_hwcontrol() local
98 unsigned int nandaddr = (unsigned int)this->IO_ADDR_W; cmx270_hwcontrol()
118 this->IO_ADDR_W = (void __iomem*)nandaddr; cmx270_hwcontrol()
120 writel((dat << 16), this->IO_ADDR_W); cmx270_hwcontrol()
140 struct nand_chip *this; cmx270_init() local
179 this = (struct nand_chip *)(&cmx270_nand_mtd[1]); cmx270_init()
183 cmx270_nand_mtd->priv = this; cmx270_init()
186 this->IO_ADDR_R = cmx270_nand_io; cmx270_init()
187 this->IO_ADDR_W = cmx270_nand_io; cmx270_init()
188 this->cmd_ctrl = cmx270_hwcontrol; cmx270_init()
189 this->dev_ready = cmx270_device_ready; cmx270_init()
192 this->chip_delay = 20; cmx270_init()
193 this->ecc.mode = NAND_ECC_SOFT; cmx270_init()
196 this->read_byte = cmx270_read_byte; cmx270_init()
197 this->read_buf = cmx270_read_buf; cmx270_init()
198 this->write_buf = cmx270_write_buf; cmx270_init()
H A Dcs553x_nand.c100 struct nand_chip *this = mtd->priv; cs553x_read_buf() local
103 memcpy_fromio(buf, this->IO_ADDR_R, 0x800); cs553x_read_buf()
107 memcpy_fromio(buf, this->IO_ADDR_R, len); cs553x_read_buf()
112 struct nand_chip *this = mtd->priv; cs553x_write_buf() local
115 memcpy_toio(this->IO_ADDR_R, buf, 0x800); cs553x_write_buf()
119 memcpy_toio(this->IO_ADDR_R, buf, len); cs553x_write_buf()
124 struct nand_chip *this = mtd->priv; cs553x_read_byte() local
125 return readb(this->IO_ADDR_R); cs553x_read_byte()
130 struct nand_chip *this = mtd->priv; cs553x_write_byte() local
133 while (i && readb(this->IO_ADDR_R + MM_NAND_STS) & CS_NAND_CTLR_BUSY) { cs553x_write_byte()
137 writeb(byte, this->IO_ADDR_W + 0x801); cs553x_write_byte()
143 struct nand_chip *this = mtd->priv; cs553x_hwcontrol() local
144 void __iomem *mmio_base = this->IO_ADDR_R; cs553x_hwcontrol()
155 struct nand_chip *this = mtd->priv; cs553x_device_ready() local
156 void __iomem *mmio_base = this->IO_ADDR_R; cs553x_device_ready()
164 struct nand_chip *this = mtd->priv; cs_enable_hwecc() local
165 void __iomem *mmio_base = this->IO_ADDR_R; cs_enable_hwecc()
173 struct nand_chip *this = mtd->priv; cs_calculate_ecc() local
174 void __iomem *mmio_base = this->IO_ADDR_R; cs_calculate_ecc()
189 struct nand_chip *this; cs553x_init_one() local
207 this = (struct nand_chip *)(&new_mtd[1]); cs553x_init_one()
210 new_mtd->priv = this; cs553x_init_one()
214 this->IO_ADDR_R = this->IO_ADDR_W = ioremap(adr, 4096); cs553x_init_one()
215 if (!this->IO_ADDR_R) { cs553x_init_one()
221 this->cmd_ctrl = cs553x_hwcontrol; cs553x_init_one()
222 this->dev_ready = cs553x_device_ready; cs553x_init_one()
223 this->read_byte = cs553x_read_byte; cs553x_init_one()
224 this->read_buf = cs553x_read_buf; cs553x_init_one()
225 this->write_buf = cs553x_write_buf; cs553x_init_one()
227 this->chip_delay = 0; cs553x_init_one()
229 this->ecc.mode = NAND_ECC_HW; cs553x_init_one()
230 this->ecc.size = 256; cs553x_init_one()
231 this->ecc.bytes = 3; cs553x_init_one()
232 this->ecc.hwctl = cs_enable_hwecc; cs553x_init_one()
233 this->ecc.calculate = cs_calculate_ecc; cs553x_init_one()
234 this->ecc.correct = nand_correct_data; cs553x_init_one()
235 this->ecc.strength = 1; cs553x_init_one()
238 this->bbt_options = NAND_BBT_USE_FLASH; cs553x_init_one()
252 iounmap(this->IO_ADDR_R); cs553x_init_one()
328 struct nand_chip *this; cs553x_cleanup() local
334 this = cs553x_mtd[i]->priv; cs553x_cleanup()
335 mmio_base = this->IO_ADDR_R; cs553x_cleanup()
H A Dau1550nd.c42 struct nand_chip *this = mtd->priv; au_read_byte() local
43 u_char ret = readb(this->IO_ADDR_R); au_read_byte()
57 struct nand_chip *this = mtd->priv; au_write_byte() local
58 writeb(byte, this->IO_ADDR_W); au_write_byte()
70 struct nand_chip *this = mtd->priv; au_read_byte16() local
71 u_char ret = (u_char) cpu_to_le16(readw(this->IO_ADDR_R)); au_read_byte16()
85 struct nand_chip *this = mtd->priv; au_write_byte16() local
86 writew(le16_to_cpu((u16) byte), this->IO_ADDR_W); au_write_byte16()
98 struct nand_chip *this = mtd->priv; au_read_word() local
99 u16 ret = readw(this->IO_ADDR_R); au_read_word()
115 struct nand_chip *this = mtd->priv; au_write_buf() local
118 writeb(buf[i], this->IO_ADDR_W); au_write_buf()
134 struct nand_chip *this = mtd->priv; au_read_buf() local
137 buf[i] = readb(this->IO_ADDR_R); au_read_buf()
153 struct nand_chip *this = mtd->priv; au_write_buf16() local
158 writew(p[i], this->IO_ADDR_W); au_write_buf16()
175 struct nand_chip *this = mtd->priv; au_read_buf16() local
180 p[i] = readw(this->IO_ADDR_R); au_read_buf16()
201 struct nand_chip *this = mtd->priv; au1550_hwcontrol() local
206 this->IO_ADDR_W = ctx->base + MEM_STNAND_CMD; au1550_hwcontrol()
210 this->IO_ADDR_W = ctx->base + MEM_STNAND_DATA; au1550_hwcontrol()
214 this->IO_ADDR_W = ctx->base + MEM_STNAND_ADDR; au1550_hwcontrol()
218 this->IO_ADDR_W = ctx->base + MEM_STNAND_DATA; au1550_hwcontrol()
219 /* FIXME: Nobody knows why this is necessary, au1550_hwcontrol()
235 this->IO_ADDR_R = this->IO_ADDR_W; au1550_hwcontrol()
247 * Forbid driving -CE manually permitting the NAND controller to do this.
265 * @column: the column address for this command, -1 if none
266 * @page_addr: the page address for this command, -1 if none
271 struct nand_chip *this = mtd->priv; au1550_command() local
307 if (this->options & NAND_BUSWIDTH_16 && au1550_command()
322 * are allowed while we do this as we don't au1550_command()
334 if (this->chipsize > (32 << 20)) au1550_command()
368 for (i = this->chip_delay; !this->dev_ready(mtd) && i > 0; --i) au1550_command()
376 /* Apply this short delay always to ensure that we do wait tWB. */ au1550_command()
379 while(!this->dev_ready(mtd)); au1550_command()
392 /* figure out the decoded range of this CS */ find_nand_cs()
407 struct nand_chip *this; au1550nd_probe() local
440 this = &ctx->chip; au1550nd_probe()
441 ctx->info.priv = this; au1550nd_probe()
453 this->dev_ready = au1550_device_ready; au1550nd_probe()
454 this->select_chip = au1550_select_chip; au1550nd_probe()
455 this->cmdfunc = au1550_command; au1550nd_probe()
458 this->chip_delay = 30; au1550nd_probe()
459 this->ecc.mode = NAND_ECC_SOFT; au1550nd_probe()
462 this->options |= NAND_BUSWIDTH_16; au1550nd_probe()
464 this->read_byte = (pd->devwidth) ? au_read_byte16 : au_read_byte; au1550nd_probe()
466 this->read_word = au_read_word; au1550nd_probe()
467 this->write_buf = (pd->devwidth) ? au_write_buf16 : au_write_buf; au1550nd_probe()
468 this->read_buf = (pd->devwidth) ? au_read_buf16 : au_read_buf; au1550nd_probe()
H A Ddiskonchip.c137 * Fabrice Bellard figured this out in the old docecc code. I added
299 struct nand_chip *this = mtd->priv; doc2000_write_byte() local
300 struct doc_priv *doc = this->priv; doc2000_write_byte()
311 struct nand_chip *this = mtd->priv; doc2000_read_byte() local
312 struct doc_priv *doc = this->priv; doc2000_read_byte()
326 struct nand_chip *this = mtd->priv; doc2000_writebuf() local
327 struct doc_priv *doc = this->priv; doc2000_writebuf()
343 struct nand_chip *this = mtd->priv; doc2000_readbuf() local
344 struct doc_priv *doc = this->priv; doc2000_readbuf()
358 struct nand_chip *this = mtd->priv; doc2000_readbuf_dword() local
359 struct doc_priv *doc = this->priv; doc2000_readbuf_dword()
379 struct nand_chip *this = mtd->priv; doc200x_ident_chip() local
380 struct doc_priv *doc = this->priv; doc200x_ident_chip()
394 ret = this->read_byte(mtd) << 8; doc200x_ident_chip()
395 ret |= this->read_byte(mtd); doc200x_ident_chip()
416 this->read_buf = &doc2000_readbuf_dword; doc200x_ident_chip()
425 struct nand_chip *this = mtd->priv; doc2000_count_chips() local
426 struct doc_priv *doc = this->priv; doc2000_count_chips()
445 static int doc200x_wait(struct mtd_info *mtd, struct nand_chip *this) doc200x_wait() argument
447 struct doc_priv *doc = this->priv; doc200x_wait()
452 this->cmdfunc(mtd, NAND_CMD_STATUS, -1, -1); doc200x_wait()
454 status = (int)this->read_byte(mtd); doc200x_wait()
461 struct nand_chip *this = mtd->priv; doc2001_write_byte() local
462 struct doc_priv *doc = this->priv; doc2001_write_byte()
472 struct nand_chip *this = mtd->priv; doc2001_read_byte() local
473 struct doc_priv *doc = this->priv; doc2001_read_byte()
486 struct nand_chip *this = mtd->priv; doc2001_writebuf() local
487 struct doc_priv *doc = this->priv; doc2001_writebuf()
499 struct nand_chip *this = mtd->priv; doc2001_readbuf() local
500 struct doc_priv *doc = this->priv; doc2001_readbuf()
516 struct nand_chip *this = mtd->priv; doc2001plus_read_byte() local
517 struct doc_priv *doc = this->priv; doc2001plus_read_byte()
531 struct nand_chip *this = mtd->priv; doc2001plus_writebuf() local
532 struct doc_priv *doc = this->priv; doc2001plus_writebuf()
549 struct nand_chip *this = mtd->priv; doc2001plus_readbuf() local
550 struct doc_priv *doc = this->priv; doc2001plus_readbuf()
580 struct nand_chip *this = mtd->priv; doc2001plus_select_chip() local
581 struct doc_priv *doc = this->priv; doc2001plus_select_chip()
599 this->cmdfunc(mtd, NAND_CMD_RESET, -1, -1); doc2001plus_select_chip()
607 struct nand_chip *this = mtd->priv; doc200x_select_chip() local
608 struct doc_priv *doc = this->priv; doc200x_select_chip()
638 struct nand_chip *this = mtd->priv; doc200x_hwcontrol() local
639 struct doc_priv *doc = this->priv; doc200x_hwcontrol()
661 struct nand_chip *this = mtd->priv; doc2001plus_command() local
662 struct doc_priv *doc = this->priv; doc2001plus_command()
701 if (this->options & NAND_BUSWIDTH_16 && doc2001plus_command()
710 if (this->chipsize & 0x0c000000) { doc2001plus_command()
737 if (this->dev_ready) doc2001plus_command()
739 udelay(this->chip_delay); doc2001plus_command()
743 while (!(this->read_byte(mtd) & 0x40)) ; doc2001plus_command()
752 if (!this->dev_ready) { doc2001plus_command()
753 udelay(this->chip_delay); doc2001plus_command()
758 /* Apply this short delay always to ensure that we do wait tWB in doc2001plus_command()
762 while (!this->dev_ready(mtd)) ; doc2001plus_command()
767 struct nand_chip *this = mtd->priv; doc200x_dev_ready() local
768 struct doc_priv *doc = this->priv; doc200x_dev_ready()
807 struct nand_chip *this = mtd->priv; doc200x_enable_hwecc() local
808 struct doc_priv *doc = this->priv; doc200x_enable_hwecc()
826 struct nand_chip *this = mtd->priv; doc2001plus_enable_hwecc() local
827 struct doc_priv *doc = this->priv; doc2001plus_enable_hwecc()
846 struct nand_chip *this = mtd->priv; doc200x_calculate_ecc() local
847 struct doc_priv *doc = this->priv; doc200x_calculate_ecc()
884 /* Note: this somewhat expensive test should not be triggered doc200x_calculate_ecc()
907 struct nand_chip *this = mtd->priv; doc200x_correct_data() local
908 struct doc_priv *doc = this->priv; doc200x_correct_data()
951 /* Note: this somewhat expensive test should not be triggered doc200x_correct_data()
961 /* If emptymatch still =1, this is almost certainly a freshly- doc200x_correct_data()
1007 struct nand_chip *this = mtd->priv; find_media_headers() local
1008 struct doc_priv *doc = this->priv; find_media_headers()
1024 doc->mh0_page = offs >> this->page_shift; find_media_headers()
1029 doc->mh1_page = offs >> this->page_shift; find_media_headers()
1038 offs = doc->mh0_page << this->page_shift; find_media_headers()
1050 struct nand_chip *this = mtd->priv; nftl_partscan() local
1051 struct doc_priv *doc = this->priv; nftl_partscan()
1055 const unsigned psize = 1 << this->page_shift; nftl_partscan()
1081 blocks = mtd->size >> this->phys_erase_shift; nftl_partscan()
1101 Unfortunately, we didn't know before this point what these values nftl_partscan()
1102 should be. Thus, this code is somewhat dependent on the exact nftl_partscan()
1105 this->bbt_erase_shift += (0xff - mh->UnitSizeFactor); nftl_partscan()
1108 blocks = mtd->size >> this->bbt_erase_shift; nftl_partscan()
1119 offs <<= this->page_shift; nftl_partscan()
1131 parts[numparts].size = (mh->NumEraseUnits - numheaders) << this->bbt_erase_shift; nftl_partscan()
1152 struct nand_chip *this = mtd->priv; inftl_partscan() local
1153 struct doc_priv *doc = this->priv; inftl_partscan()
1165 end -= (INFTL_BBT_RESERVED_BLOCKS << this->phys_erase_shift); inftl_partscan()
1174 doc->mh1_page = doc->mh0_page + (4096 >> this->page_shift); inftl_partscan()
1202 vshift = this->phys_erase_shift + mh->BlockMultiplierBits; inftl_partscan()
1210 blocks = doc->chips_per_floor << (this->chip_shift - this->phys_erase_shift); inftl_partscan()
1272 struct nand_chip *this = mtd->priv; nftl_scan_bbt() local
1273 struct doc_priv *doc = this->priv; nftl_scan_bbt()
1282 this->bbt_td->options = NAND_BBT_ABSPAGE | NAND_BBT_8BIT | nftl_scan_bbt()
1285 this->bbt_td->veroffs = 7; nftl_scan_bbt()
1286 this->bbt_td->pages[0] = doc->mh0_page + 1; nftl_scan_bbt()
1288 this->bbt_md->options = NAND_BBT_ABSPAGE | NAND_BBT_8BIT | nftl_scan_bbt()
1291 this->bbt_md->veroffs = 7; nftl_scan_bbt()
1292 this->bbt_md->pages[0] = doc->mh1_page + 1; nftl_scan_bbt()
1294 this->bbt_md = NULL; nftl_scan_bbt()
1310 struct nand_chip *this = mtd->priv; inftl_scan_bbt() local
1311 struct doc_priv *doc = this->priv; inftl_scan_bbt()
1314 if (this->numchips > doc->chips_per_floor) { inftl_scan_bbt()
1320 this->bbt_td->options = NAND_BBT_2BIT | NAND_BBT_ABSPAGE; inftl_scan_bbt()
1322 this->bbt_td->options |= NAND_BBT_WRITE; inftl_scan_bbt()
1323 this->bbt_td->pages[0] = 2; inftl_scan_bbt()
1324 this->bbt_md = NULL; inftl_scan_bbt()
1326 this->bbt_td->options = NAND_BBT_LASTBLOCK | NAND_BBT_8BIT | NAND_BBT_VERSION; inftl_scan_bbt()
1328 this->bbt_td->options |= NAND_BBT_WRITE; inftl_scan_bbt()
1329 this->bbt_td->offs = 8; inftl_scan_bbt()
1330 this->bbt_td->len = 8; inftl_scan_bbt()
1331 this->bbt_td->veroffs = 7; inftl_scan_bbt()
1332 this->bbt_td->maxblocks = INFTL_BBT_RESERVED_BLOCKS; inftl_scan_bbt()
1333 this->bbt_td->reserved_block_code = 0x01; inftl_scan_bbt()
1334 this->bbt_td->pattern = "MSYS_BBT"; inftl_scan_bbt()
1336 this->bbt_md->options = NAND_BBT_LASTBLOCK | NAND_BBT_8BIT | NAND_BBT_VERSION; inftl_scan_bbt()
1338 this->bbt_md->options |= NAND_BBT_WRITE; inftl_scan_bbt()
1339 this->bbt_md->offs = 8; inftl_scan_bbt()
1340 this->bbt_md->len = 8; inftl_scan_bbt()
1341 this->bbt_md->veroffs = 7; inftl_scan_bbt()
1342 this->bbt_md->maxblocks = INFTL_BBT_RESERVED_BLOCKS; inftl_scan_bbt()
1343 this->bbt_md->reserved_block_code = 0x01; inftl_scan_bbt()
1344 this->bbt_md->pattern = "TBB_SYSM"; inftl_scan_bbt()
1366 struct nand_chip *this = mtd->priv; doc2000_init() local
1367 struct doc_priv *doc = this->priv; doc2000_init()
1369 this->read_byte = doc2000_read_byte; doc2000_init()
1370 this->write_buf = doc2000_writebuf; doc2000_init()
1371 this->read_buf = doc2000_readbuf; doc2000_init()
1372 this->scan_bbt = nftl_scan_bbt; doc2000_init()
1382 struct nand_chip *this = mtd->priv; doc2001_init() local
1383 struct doc_priv *doc = this->priv; doc2001_init()
1385 this->read_byte = doc2001_read_byte; doc2001_init()
1386 this->write_buf = doc2001_writebuf; doc2001_init()
1387 this->read_buf = doc2001_readbuf; doc2001_init()
1399 this->scan_bbt = inftl_scan_bbt; doc2001_init()
1405 this->scan_bbt = nftl_scan_bbt; doc2001_init()
1412 struct nand_chip *this = mtd->priv; doc2001plus_init() local
1413 struct doc_priv *doc = this->priv; doc2001plus_init()
1415 this->read_byte = doc2001plus_read_byte; doc2001plus_init()
1416 this->write_buf = doc2001plus_writebuf; doc2001plus_init()
1417 this->read_buf = doc2001plus_readbuf; doc2001plus_init()
1418 this->scan_bbt = inftl_scan_bbt; doc2001plus_init()
1419 this->cmd_ctrl = NULL; doc2001plus_init()
1420 this->select_chip = doc2001plus_select_chip; doc2001plus_init()
1421 this->cmdfunc = doc2001plus_command; doc2001plus_init()
1422 this->ecc.hwctl = doc2001plus_enable_hwecc; doc2001plus_init()
1531 /* Use the alias resolution register to determine if this is doc_probe()
H A Dnand_bbt.c178 struct nand_chip *this = mtd->priv; read_bbt() local
188 from = ((loff_t)page) << this->page_shift; read_bbt()
191 len = min(totlen, (size_t)(1 << this->bbt_erase_shift)); read_bbt()
227 this->bbt_erase_shift); read_bbt()
228 bbt_mark_entry(this, offs + act, read_bbt()
235 * move this message to pr_debug. read_bbt()
239 this->bbt_erase_shift); read_bbt()
242 bbt_mark_entry(this, offs + act, read_bbt()
245 bbt_mark_entry(this, offs + act, read_bbt()
269 struct nand_chip *this = mtd->priv; read_abs_bbt() local
274 for (i = 0; i < this->numchips; i++) { read_abs_bbt()
277 this->chipsize >> this->bbt_erase_shift, read_abs_bbt()
281 offs += this->chipsize >> this->bbt_erase_shift; read_abs_bbt()
285 mtd->size >> this->bbt_erase_shift, td, 0); read_abs_bbt()
394 struct nand_chip *this = mtd->priv; read_abs_bbts() local
398 scan_read(mtd, buf, (loff_t)td->pages[0] << this->page_shift, read_abs_bbts()
407 scan_read(mtd, buf, (loff_t)md->pages[0] << this->page_shift, read_abs_bbts()
460 struct nand_chip *this = mtd->priv; create_bbt() local
473 numblocks = mtd->size >> this->bbt_erase_shift; create_bbt()
477 if (chip >= this->numchips) { create_bbt()
479 chip + 1, this->numchips); create_bbt()
482 numblocks = this->chipsize >> this->bbt_erase_shift; create_bbt()
485 from = (loff_t)startblock << this->bbt_erase_shift; create_bbt()
488 if (this->bbt_options & NAND_BBT_SCANLASTPAGE) create_bbt()
501 bbt_mark_entry(this, i, BBT_BLOCK_FACTORY_BAD); create_bbt()
507 from += (1 << this->bbt_erase_shift); create_bbt()
522 * the bad block information of this chip. This is necessary to provide support
529 struct nand_chip *this = mtd->priv; search_bbt() local
534 int blocktopage = this->bbt_erase_shift - this->page_shift; search_bbt()
538 startblock = (mtd->size >> this->bbt_erase_shift) - 1; search_bbt()
547 chips = this->numchips; search_bbt()
548 bbtblocks = this->chipsize >> this->bbt_erase_shift; search_bbt()
552 bbtblocks = mtd->size >> this->bbt_erase_shift; search_bbt()
563 loff_t offs = (loff_t)actblock << this->bbt_erase_shift; search_bbt()
576 startblock += this->chipsize >> this->bbt_erase_shift; search_bbt()
624 struct nand_chip *this = mtd->priv; write_bbt() local
644 numblocks = (int)(this->chipsize >> this->bbt_erase_shift); write_bbt()
647 nrchips = this->numchips; write_bbt()
653 numblocks = (int)(mtd->size >> this->bbt_erase_shift); write_bbt()
684 switch (bbt_get_entry(this, block)) { write_bbt()
690 (this->bbt_erase_shift - this->page_shift); write_bbt()
718 to = ((loff_t)page) << this->page_shift; write_bbt()
723 to &= ~((loff_t)((1 << this->bbt_erase_shift) - 1)); write_bbt()
724 len = 1 << this->bbt_erase_shift; write_bbt()
734 ops.ooblen = (len >> this->page_shift) * mtd->oobsize; write_bbt()
741 pageoffs = page - (int)(to >> this->page_shift); write_bbt()
742 offs = pageoffs << this->page_shift; write_bbt()
769 (len >> this->page_shift)* mtd->oobsize); write_bbt()
783 dat = bbt_get_entry(this, chip * numblocks + i); write_bbt()
791 einfo.len = 1 << this->bbt_erase_shift; write_bbt()
825 struct nand_chip *this = mtd->priv; nand_memory_bbt() local
827 return create_bbt(mtd, this->buffers->databuf, bd, -1); nand_memory_bbt()
844 struct nand_chip *this = mtd->priv; check_create() local
845 struct nand_bbt_descr *td = this->bbt_td; check_create()
846 struct nand_bbt_descr *md = this->bbt_md; check_create()
851 chips = this->numchips; check_create()
900 if (!(this->bbt_options & NAND_BBT_CREATE_EMPTY)) check_create()
968 struct nand_chip *this = mtd->priv; mark_bbt_region() local
974 chips = this->numchips; mark_bbt_region()
975 nrblocks = (int)(this->chipsize >> this->bbt_erase_shift); mark_bbt_region()
978 nrblocks = (int)(mtd->size >> this->bbt_erase_shift); mark_bbt_region()
986 block = td->pages[i] >> (this->bbt_erase_shift - this->page_shift); mark_bbt_region()
987 oldval = bbt_get_entry(this, block); mark_bbt_region()
988 bbt_mark_entry(this, block, BBT_BLOCK_RESERVED); mark_bbt_region()
992 this->bbt_erase_shift); mark_bbt_region()
1001 oldval = bbt_get_entry(this, block); mark_bbt_region()
1002 bbt_mark_entry(this, block, BBT_BLOCK_RESERVED); mark_bbt_region()
1014 this->bbt_erase_shift); mark_bbt_region()
1028 struct nand_chip *this = mtd->priv; verify_bbt_descr() local
1039 BUG_ON((this->bbt_options & NAND_BBT_NO_OOB) && verify_bbt_descr()
1040 !(this->bbt_options & NAND_BBT_USE_FLASH)); verify_bbt_descr()
1047 BUG_ON(!(this->bbt_options & NAND_BBT_USE_FLASH)); verify_bbt_descr()
1048 BUG_ON(!(this->bbt_options & NAND_BBT_NO_OOB)); verify_bbt_descr()
1056 table_size = this->chipsize >> this->bbt_erase_shift; verify_bbt_descr()
1058 table_size = mtd->size >> this->bbt_erase_shift; verify_bbt_descr()
1063 BUG_ON(table_size > (1 << this->bbt_erase_shift)); verify_bbt_descr()
1080 struct nand_chip *this = mtd->priv; nand_scan_bbt() local
1083 struct nand_bbt_descr *td = this->bbt_td; nand_scan_bbt()
1084 struct nand_bbt_descr *md = this->bbt_md; nand_scan_bbt()
1086 len = mtd->size >> (this->bbt_erase_shift + 2); nand_scan_bbt()
1091 this->bbt = kzalloc(len, GFP_KERNEL); nand_scan_bbt()
1092 if (!this->bbt) nand_scan_bbt()
1102 kfree(this->bbt); nand_scan_bbt()
1103 this->bbt = NULL; nand_scan_bbt()
1111 len = (1 << this->bbt_erase_shift); nand_scan_bbt()
1112 len += (len >> this->page_shift) * mtd->oobsize; nand_scan_bbt()
1115 kfree(this->bbt); nand_scan_bbt()
1116 this->bbt = NULL; nand_scan_bbt()
1148 struct nand_chip *this = mtd->priv; nand_update_bbt() local
1152 struct nand_bbt_descr *td = this->bbt_td; nand_update_bbt()
1153 struct nand_bbt_descr *md = this->bbt_md; nand_update_bbt()
1155 if (!this->bbt || !td) nand_update_bbt()
1159 len = (1 << this->bbt_erase_shift); nand_update_bbt()
1160 len += (len >> this->page_shift) * mtd->oobsize; nand_update_bbt()
1167 chip = (int)(offs >> this->chip_shift); nand_update_bbt()
1247 * @this: NAND chip to create descriptor for
1250 * based on the properties of @this. The new descriptor is stored in
1251 * this->badblock_pattern. Thus, this->badblock_pattern should be NULL when
1252 * passed to this function.
1254 static int nand_create_badblock_pattern(struct nand_chip *this) nand_create_badblock_pattern() argument
1257 if (this->badblock_pattern) { nand_create_badblock_pattern()
1264 bd->options = this->bbt_options & BADBLOCK_SCAN_MASK; nand_create_badblock_pattern()
1265 bd->offs = this->badblockpos; nand_create_badblock_pattern()
1266 bd->len = (this->options & NAND_BUSWIDTH_16) ? 2 : 1; nand_create_badblock_pattern()
1269 this->badblock_pattern = bd; nand_create_badblock_pattern()
1282 struct nand_chip *this = mtd->priv; nand_default_bbt() local
1286 if (this->bbt_options & NAND_BBT_USE_FLASH) { nand_default_bbt()
1288 if (!this->bbt_td) { nand_default_bbt()
1289 if (this->bbt_options & NAND_BBT_NO_OOB) { nand_default_bbt()
1290 this->bbt_td = &bbt_main_no_oob_descr; nand_default_bbt()
1291 this->bbt_md = &bbt_mirror_no_oob_descr; nand_default_bbt()
1293 this->bbt_td = &bbt_main_descr; nand_default_bbt()
1294 this->bbt_md = &bbt_mirror_descr; nand_default_bbt()
1298 this->bbt_td = NULL; nand_default_bbt()
1299 this->bbt_md = NULL; nand_default_bbt()
1302 if (!this->badblock_pattern) { nand_default_bbt()
1303 ret = nand_create_badblock_pattern(this); nand_default_bbt()
1308 return nand_scan_bbt(mtd, this->badblock_pattern); nand_default_bbt()
1318 struct nand_chip *this = mtd->priv; nand_isreserved_bbt() local
1321 block = (int)(offs >> this->bbt_erase_shift); nand_isreserved_bbt()
1322 return bbt_get_entry(this, block) == BBT_BLOCK_RESERVED; nand_isreserved_bbt()
1333 struct nand_chip *this = mtd->priv; nand_isbad_bbt() local
1336 block = (int)(offs >> this->bbt_erase_shift); nand_isbad_bbt()
1337 res = bbt_get_entry(this, block); nand_isbad_bbt()
1360 struct nand_chip *this = mtd->priv; nand_markbad_bbt() local
1363 block = (int)(offs >> this->bbt_erase_shift); nand_markbad_bbt()
1366 bbt_mark_entry(this, block, BBT_BLOCK_WORN); nand_markbad_bbt()
1369 if (this->bbt_options & NAND_BBT_USE_FLASH) nand_markbad_bbt()
H A Dsharpsl.c111 struct nand_chip *this; sharpsl_nand_probe() local
143 this = (struct nand_chip *)(&sharpsl->chip); sharpsl_nand_probe()
146 sharpsl->mtd.priv = this; sharpsl_nand_probe()
157 this->IO_ADDR_R = sharpsl->io + FLASHIO; sharpsl_nand_probe()
158 this->IO_ADDR_W = sharpsl->io + FLASHIO; sharpsl_nand_probe()
160 this->cmd_ctrl = sharpsl_nand_hwcontrol; sharpsl_nand_probe()
161 this->dev_ready = sharpsl_nand_dev_ready; sharpsl_nand_probe()
163 this->chip_delay = 15; sharpsl_nand_probe()
165 this->ecc.mode = NAND_ECC_HW; sharpsl_nand_probe()
166 this->ecc.size = 256; sharpsl_nand_probe()
167 this->ecc.bytes = 3; sharpsl_nand_probe()
168 this->ecc.strength = 1; sharpsl_nand_probe()
169 this->badblock_pattern = data->badblock_pattern; sharpsl_nand_probe()
170 this->ecc.layout = data->ecc_layout; sharpsl_nand_probe()
171 this->ecc.hwctl = sharpsl_nand_enable_hwecc; sharpsl_nand_probe()
172 this->ecc.calculate = sharpsl_nand_calculate_ecc; sharpsl_nand_probe()
173 this->ecc.correct = nand_correct_data; sharpsl_nand_probe()
H A Dams-delta.c67 struct nand_chip *this = mtd->priv; ams_delta_write_byte() local
68 void __iomem *io_base = this->priv; ams_delta_write_byte()
71 writew(byte, this->IO_ADDR_W); ams_delta_write_byte()
80 struct nand_chip *this = mtd->priv; ams_delta_read_byte() local
81 void __iomem *io_base = this->priv; ams_delta_read_byte()
86 res = readw(this->IO_ADDR_R); ams_delta_read_byte()
177 struct nand_chip *this; ams_delta_init() local
197 this = (struct nand_chip *) (&ams_delta_mtd[1]); ams_delta_init()
200 ams_delta_mtd->priv = this; ams_delta_init()
215 this->priv = io_base; ams_delta_init()
218 this->IO_ADDR_R = io_base + OMAP_MPUIO_INPUT_LATCH; ams_delta_init()
219 this->IO_ADDR_W = io_base + OMAP_MPUIO_OUTPUT; ams_delta_init()
220 this->read_byte = ams_delta_read_byte; ams_delta_init()
221 this->write_buf = ams_delta_write_buf; ams_delta_init()
222 this->read_buf = ams_delta_read_buf; ams_delta_init()
223 this->cmd_ctrl = ams_delta_hwcontrol; ams_delta_init()
225 this->dev_ready = ams_delta_nand_ready; ams_delta_init()
227 this->dev_ready = NULL; ams_delta_init()
231 this->chip_delay = 30; ams_delta_init()
232 this->ecc.mode = NAND_ECC_SOFT; ams_delta_init()
/linux-4.1.27/arch/mips/include/asm/
H A Dshmparam.h3 * License. See the file "COPYING" in the main directory of this archive
11 #define SHMLBA 0x40000 /* attach addr a multiple of this */
/linux-4.1.27/arch/arm/include/uapi/asm/
H A Dstatfs.h5 * With EABI there is 4 bytes of padding added to this structure.
7 * Note that user space does NOT have to pack this structure.
/linux-4.1.27/include/linux/
H A Dirqreturn.h6 * @IRQ_NONE interrupt was not from this device
7 * @IRQ_HANDLED interrupt was handled by this device
H A Dtask_io_accounting.h5 * Don't include this header file directly - it is designed to be dragged in via
8 * Blame Andrew Morton for all this.
25 * The number of bytes which this task has caused to be read from
31 * The number of bytes which this task has caused, or shall cause to be
37 * A task can cause "negative" IO too. If this task truncates some
H A Dif_link.h7 /* We don't want this structure exposed to user space */
H A Dpatchkey.h7 * clear whether removing this would break anything in userspace.
9 * Do not include this file directly. Please use <sys/soundcard.h> instead.
H A Dpowercap.h15 * this program; if not, write to the Free Software Foundation, Inc.
38 * Default is enabled. But this callback allows all zones
43 * @release: Callback to inform that last reference to this
45 * structure associated with this control type.
61 * @dev: device for this control_type
63 * @root_node: Root holding power zones for this control_type
67 * used by this structure. In this case
68 * this flag is set to false by framework to
70 * Otherwise this flag is set to true.
99 * @release: Callback to inform that last reference to this
101 * data structure associated with this
128 * @control_type_inst: Control type instance for this zone.
134 * @private_data: Private data pointer if any for this zone.
135 * @zone_dev_attrs: Attributes associated with this device.
140 * used by this structure. In this case
141 * this flag is set to false by framework to
143 * Otherwise this flag is set to true.
144 * @constraint_ptr: List of constraints for this zone.
146 * This defines a power zone instance. The fields of this structure are
202 * @id: Instance Id of this constraint.
203 * @power_zone: Pointer to the power zone for this constraint.
249 * structure storage. If this is NULL, powercap framework
251 * Advantage of this parameter is that client can embed
252 * this data in its data structures and allocate in a
254 * @control_type_name: The Name of this control_type, which will be shown
262 * which must be unique, otherwise this function returns NULL.
275 * All power zones registered under this control type have to be unregistered
276 * before calling this function, or it will fail with an error code.
285 * storage. If this is NULL, powercap framework will allocate
286 * memory and own it. Advantage of this parameter is that client
287 * can embed this data in its data structures and allocate in a
289 * @control_type: A control_type instance under which this zone operates.
290 * @name: A name for this zone.
293 * @no_constraints: Number of constraints for this zone
320 * make sure that children for this zone are unregistered first.
H A Dtimb_dma.h15 * along with this program; if not, write to the Free Software
29 * @rx: true if this channel handles data in the direction to
31 * @bytes_per_line: Number of bytes per line, this is specific for channels
32 * handling video data. For other channels this shall be left to 0.
33 * @descriptors: Number of descriptors to allocate for this channel.
H A Dthreads.h11 * Maximum supported processors. Setting this smaller saves quite a
12 * bit of memory. Use nr_cpu_ids instead of this except for static bitmaps.
19 /* Places which use this should consider cpumask_var_t. */
H A Dgetcpu.h7 User programs should not refer to the contents of this structure.
12 The user program must store this information per thread (__thread)
/linux-4.1.27/drivers/video/fbdev/via/
H A DtblDPASetting.c17 * along with this program; if not, write to the Free Software
29 /* LCK/VCK < 30000000 will use this value */
32 /* 30000000 < LCK/VCK < 50000000 will use this value */
35 /* 50000000 < LCK/VCK < 70000000 will use this value */
38 /* 70000000 < LCK/VCK < 100000000 will use this value */
41 /* 100000000 < LCK/VCK < 15000000 will use this value */
44 /* 15000000 < LCK/VCK will use this value */
54 /* LCK/VCK < 30000000 will use this value */
56 /* 30000000 < LCK/VCK < 50000000 will use this value */
58 /* 50000000 < LCK/VCK < 70000000 will use this value */
60 /* 70000000 < LCK/VCK < 100000000 will use this value */
62 /* 100000000 < LCK/VCK < 15000000 will use this value */
64 /* 15000000 < LCK/VCK will use this value */
74 /* LCK/VCK < 30000000 will use this value */
76 /* 30000000 < LCK/VCK < 50000000 will use this value */
78 /* 50000000 < LCK/VCK < 70000000 will use this value */
80 /* 70000000 < LCK/VCK < 100000000 will use this value */
82 /* 100000000 < LCK/VCK < 15000000 will use this value */
84 /* 15000000 < LCK/VCK will use this value */
/linux-4.1.27/fs/freevxfs/
H A Dvxfs_olt.h9 * notice, this list of conditions, and the following disclaimer,
12 * derived from this software without specific prior written permission.
14 * Alternatively, this software may be distributed under the terms of the
67 u_int32_t olt_size; /* size of this entry */
73 vx_daddr_t olt_extents[2]; /* addr of this extent, replica */
74 u_int32_t olt_esize; /* size of this extent */
84 u_int32_t olt_type; /* type of this record */
85 u_int32_t olt_size; /* size of this record */
92 u_int32_t olt_type; /* type of this record */
93 u_int32_t olt_fsize; /* size of this free record */
100 u_int32_t olt_type; /* type of this record */
101 u_int32_t olt_size; /* size of this record */
109 u_int32_t olt_type; /* type of this record */
110 u_int32_t olt_size; /* size of this record */
119 u_int32_t olt_type; /* type of this record */
120 u_int32_t olt_size; /* size of this record */
131 u_int32_t olt_type; /* type of this record */
132 u_int32_t olt_size; /* size of this record */
141 u_int32_t olt_size; /* size of this record */
/linux-4.1.27/drivers/staging/wlan-ng/
H A Dp80211req.h10 * The contents of this file are subject to the Mozilla Public
11 * License Version 1.1 (the "License"); you may not use this file
20 * Alternatively, the contents of this file may be used under the
23 * above. If you wish to allow the use of your version of this file
25 * your version of this file under the MPL, indicate your decision
28 * the provisions above, a recipient may use your version of this
42 * Portions of the development of this software were funded by
H A Dp80211msg.h10 * The contents of this file are subject to the Mozilla Public
11 * License Version 1.1 (the "License"); you may not use this file
20 * Alternatively, the contents of this file may be used under the
23 * above. If you wish to allow the use of your version of this file
25 * your version of this file under the MPL, indicate your decision
28 * the provisions above, a recipient may use your version of this
42 * Portions of the development of this software were funded by
H A Dp80211ioctl.h10 * The contents of this file are subject to the Mozilla Public
11 * License Version 1.1 (the "License"); you may not use this file
20 * Alternatively, the contents of this file may be used under the
23 * above. If you wish to allow the use of your version of this file
25 * your version of this file under the MPL, indicate your decision
28 * the provisions above, a recipient may use your version of this
42 * Portions of the development of this software were funded by
47 * While this file is called 'ioctl' is purpose goes a little beyond
/linux-4.1.27/drivers/staging/unisys/common-spar/include/channels/
H A Dvbuschannel.h23 * We currently use this for the client to provide various information about
39 /* Must increment this whenever you insert or delete fields within this channel
40 * struct. Also increment whenever you change the meaning of fields within this
43 * increment this. */
60 #pragma pack(push, 1) /* both GCC and VC now allow this pragma */
62 u32 struct_bytes; /* size of this struct in bytes */
65 /* (this is the allocated size) */
66 u32 chp_info_offset; /* byte offset from beginning of this struct */
68 u32 bus_info_offset; /* byte offset from beginning of this struct */
70 u32 dev_info_offset; /* byte offset from beginning of this struct */
78 /* the remainder of this channel is filled in by the client */
/linux-4.1.27/drivers/staging/lustre/lustre/include/
H A Dlustre_ver.h5 * Changes made directly to this file will be lost. */
18 * by this amount (set in lustre/autoconf/lustre-version.ac). */
22 * than this amount, client would issue a warning.
/linux-4.1.27/arch/x86/include/asm/uv/
H A Duv_irq.h3 * License. See the file "COPYING" in the main directory of this archive
14 /* If a generic version of this structure gets defined, eliminate this one. */
/linux-4.1.27/arch/sh/lib/
H A Ddelay.c14 * ST40-300 appears to have an issue with this code, __delay()
17 * delay slot straddle an 8 byte boundary, this increases __delay()
19 * This align directive ensures this doesn't occur. __delay()
/linux-4.1.27/arch/um/drivers/
H A Dslirp.h8 * XXX this next definition is here because I don't understand why this
13 * or why I can't typecast like this:
/linux-4.1.27/drivers/net/appletalk/
H A Dcops_ffdrv.h3 * The firmware this driver downloads into the Localtalk card is a
5 * side driver and the routine that loads this data into the card are.
11 * There is no charge for this SDK. And no waranty express or implied
13 * refund every penny you paid for this SDK...
H A Dcops_ltdrv.h2 * The firmware this driver downloads into the Localtalk card is a
4 * side driver and the routine that loads this data into the card are.
10 * There is no charge for this SDK. And no waranty express or implied
12 * refund every penny you paid for this SDK...
/linux-4.1.27/arch/x86/kernel/
H A Dtrace_clock.c11 * Unlike the other clocks, this is not in nanoseconds.
/linux-4.1.27/arch/xtensa/include/asm/
H A Dspinlock_types.h5 # error "please don't include this file directly"
H A Ddma.h5 * License. See the file "COPYING" in the main directory of this archive
18 * By default this is not true on an Xtensa processor,
23 * this is defined, eg. drivers/sound/soundcard.c (as of 2.4).
29 * can be performed on this platform.
35 * space for the kernel. For the Xtensa architecture, this
36 * means the maximum possible size of this DMA area is
H A Dbarrier.h3 * License. See the file "COPYING" in the main directory of this archive
H A Dbugs.h10 * this archive for more details.
H A Dhw_irq.h6 * this archive for more details.
H A Dmmu.h3 * License. See the file "COPYING" in the main directory of this archive
H A Dmodule.h7 * License. See the file "COPYING" in the main directory of this archive
H A Dsegment.h5 * License. See the file "COPYING" in the main directory of this archive
H A Dserial.h7 * License. See the file "COPYING" in the main directory of this archive
H A Dsignal.h7 * License. See the file "COPYING" in the main directory of this archive
H A Dtypes.h5 * License. See the file "COPYING" in the main directory of this archive
H A Ducontext.h5 * License. See the file "COPYING" in the main directory of this archive
H A Dvga.h5 * License. See the file "COPYING" in the main directory of this archive
/linux-4.1.27/drivers/block/drbd/
H A Ddrbd_interval.c11 struct drbd_interval *this = rb_entry(node, struct drbd_interval, rb); interval_end() local
12 return this->end; interval_end()
18 * The end of an interval is the highest (start + (size >> 9)) value of this
47 drbd_insert_interval(struct rb_root *root, struct drbd_interval *this) drbd_insert_interval() argument
50 sector_t this_end = this->sector + (this->size >> 9); drbd_insert_interval()
52 BUG_ON(!IS_ALIGNED(this->size, 512)); drbd_insert_interval()
61 if (this->sector < here->sector) drbd_insert_interval()
63 else if (this->sector > here->sector) drbd_insert_interval()
65 else if (this < here) drbd_insert_interval()
67 else if (this > here) drbd_insert_interval()
73 this->end = this_end; drbd_insert_interval()
74 rb_link_node(&this->rb, parent, new); drbd_insert_interval()
75 rb_insert_augmented(&this->rb, root, &augment_callbacks); drbd_insert_interval()
117 drbd_remove_interval(struct rb_root *root, struct drbd_interval *this) drbd_remove_interval() argument
119 rb_erase_augmented(&this->rb, root, &augment_callbacks); drbd_remove_interval()
/linux-4.1.27/arch/mips/include/asm/mach-generic/
H A Dkmalloc.h8 * Set this one if any device in the system might do non-coherent DMA.
/linux-4.1.27/include/net/netns/
H A Dhash.h12 * shift this right to eliminate bits, that are net_hash_mix()
/linux-4.1.27/include/uapi/linux/
H A Dmatroxfb.h26 /* connect these outputs to this framebuffer */
28 /* which outputs are connected to this framebuffer */
30 /* which outputs are available for this framebuffer */
32 /* which outputs exist on this framebuffer */
H A Dposix_types.h8 * beyond that you'll have to change this too. But 1024 fd's seem to be
9 * enough even for such "real" unices like OSF/1, so hopefully this is
13 * <sys/time.h> (and thus <linux/time.h>) - but this is a more logical
H A Datmbr2684.h22 * Is there FCS inbound on this VC? This currently isn't supported.
29 * Is there FCS outbound on this VC? This currently isn't supported.
36 * Does this VC include LLC encapsulation?
43 * Is this VC bridged or routed?
91 int min_size; /* we will pad smaller packets than this */
97 * efficient per-if in/out filters, this support will be removed
H A Dbpqether.h21 * For SIOCSBPQETHOPT - this is compatible with PI2/PacketTwin card drivers,
23 * to his Ethernet card he may find this useful. ;-)
H A Dpatchkey.h7 * clear whether removing this would break anything in userspace.
9 * Do not include this file directly. Please use <sys/soundcard.h> instead.
/linux-4.1.27/arch/sh/boards/mach-ecovec24/
H A DMakefile5 # License. See the file "COPYING" in the main directory of this archive
/linux-4.1.27/arch/ia64/include/asm/
H A Dbug.h8 /* should this BUG be made generic? */
H A Dspinlock_types.h5 # error "please don't include this file directly"
H A Dsignal.h5 * Unfortunately, this file is being included by bits/signal.h in
20 /* Most things should be clean enough to redefine this at will, if care
/linux-4.1.27/arch/m68k/include/asm/
H A Dsun3-head.h5 #define LOAD_ADDR 0x4000 /* prom jumps to us here unless this is elf /boot */
/linux-4.1.27/arch/metag/include/asm/
H A Dspinlock_types.h5 # error "please don't include this file directly"
/linux-4.1.27/arch/arm/mach-omap2/
H A Ddss-common.h5 * NOTE: this is a transitional file to help with DT adaptation.
H A Domap_opp_data.h34 * @hwmod_name: Name of the hwmod for this domain
35 * @freq: Frequency in hertz corresponding to this OPP
36 * @u_volt: Nominal voltage in microvolts corresponding to this OPP
37 * @default_available: True/false - is this OPP available by default
43 * domain, you can have a set of {frequency, voltage} pairs and this is denoted
48 * of this - but this is handled by the appropriate driver.
72 * XXX Is this needed? Just use C99 initializers in data files?
82 /* Use this to initialize the default table */
/linux-4.1.27/tools/perf/util/
H A Denvironment.c2 * We put all the perf config variables in this same object
/linux-4.1.27/include/asm-generic/
H A Dhw_irq.h6 * In general, this is not needed for new architectures.
H A Dserial.h8 * that have this clock rate.
/linux-4.1.27/drivers/char/xillybus/
H A Dxillybus_of.c83 struct xilly_mapping *this; xilly_map_single_of() local
86 this = kzalloc(sizeof(*this), GFP_KERNEL); xilly_map_single_of()
87 if (!this) xilly_map_single_of()
93 kfree(this); xilly_map_single_of()
97 this->device = ep->dev; xilly_map_single_of()
98 this->dma_addr = addr; xilly_map_single_of()
99 this->size = size; xilly_map_single_of()
100 this->direction = direction; xilly_map_single_of()
104 rc = devm_add_action(ep->dev, xilly_of_unmap, this); xilly_map_single_of()
108 kfree(this); xilly_map_single_of()
H A Dxillybus_pcie.c100 struct xilly_mapping *this; xilly_map_single_pci() local
103 this = kzalloc(sizeof(*this), GFP_KERNEL); xilly_map_single_pci()
104 if (!this) xilly_map_single_pci()
112 kfree(this); xilly_map_single_pci()
116 this->device = ep->pdev; xilly_map_single_pci()
117 this->dma_addr = addr; xilly_map_single_pci()
118 this->size = size; xilly_map_single_pci()
119 this->direction = pci_direction; xilly_map_single_pci()
123 rc = devm_add_action(ep->dev, xilly_pci_unmap, this); xilly_map_single_pci()
126 kfree(this); xilly_map_single_pci()
/linux-4.1.27/drivers/pinctrl/freescale/
H A Dpinctrl-imx.h22 * @pin: the pin_id of this pin
23 * @mux_mode: the mux mode for this pin.
24 * @input_reg: the select input register offset for this pin if any
26 * @input_val: the select input value for this pin.
27 * @configs: the config for this pin.
39 * @name: the name of this specific pin group
40 * @npins: the number of pins in this group array, i.e. the number of
54 * @name: the name of this specific function
H A Dpinctrl-imx1.h34 * @name: the name of this specific pin group
35 * @pins: an array of imx1_pin structs used in this group
36 * @npins: the number of pins in this group array, i.e. the number of
48 * @name: the name of this specific function
/linux-4.1.27/arch/microblaze/include/asm/
H A Dmodule.h5 * License. See the file "COPYING" in the main directory of this archive
26 /* Keep this the last entry. */
/linux-4.1.27/arch/mips/include/asm/mach-ip27/
H A Dirq.h3 * License. See the file "COPYING" in the main directory of this archive
14 * A hardwired interrupt number is completly stupid for this system - a
/linux-4.1.27/drivers/md/
H A Dmultipath.h19 * this is our 'private' 'collective' MULTIPATH buffer head.
21 * for this MULTIPATH operation, and about their status:
/linux-4.1.27/include/net/caif/
H A Dcffrml.h15 void cffrml_set_uplayer(struct cflayer *this, struct cflayer *up);
16 void cffrml_set_dnlayer(struct cflayer *this, struct cflayer *dn);
/linux-4.1.27/include/uapi/linux/netfilter_ipv4/
H A Dipt_LOG.h4 #warning "Please update iptables, this file will be removed soon!"
6 /* make sure not to change this without changing netfilter.h:NF_LOG_* (!) */
/linux-4.1.27/include/uapi/linux/netfilter_ipv6/
H A Dip6t_LOG.h4 #warning "Please update iptables, this file will be removed soon!"
6 /* make sure not to change this without changing netfilter.h:NF_LOG_* (!) */
/linux-4.1.27/arch/arc/include/asm/
H A Dserial.h13 * early 8250 (now earlycon) requires BASE_BAUD to be defined in this header.
15 * we do this in a helper by parsing the FDT early
/linux-4.1.27/drivers/net/wireless/brcm80211/brcmsmac/
H A Dampdu.h4 * Permission to use, copy, modify, and/or distribute this software for any
6 * copyright notice and this permission notice appear in all copies.
26 * max_ampdu_len: maximum length for this AMPDU
27 * max_ampdu_frames: maximum number of frames for this AMPDU
28 * ampdu_len: total number of bytes accumulated for this AMPDU
29 * dma_len: DMA length of this AMPDU
H A Dbrcms_trace_events.c4 * Permission to use, copy, modify, and/or distribute this software for any
6 * copyright notice and this permission notice appear in all copies.
17 #include <linux/module.h> /* bug in tracepoint.h, it should include this */
/linux-4.1.27/arch/cris/arch-v32/drivers/mach-a3/
H A Dnandflash.c55 struct nand_chip *this = mtd->priv; crisv32_hwcontrol() local
67 this->IO_ADDR_W = (void __iomem *)REG_ADDR(pio, crisv32_hwcontrol()
71 this->IO_ADDR_W = (void __iomem *)REG_ADDR(pio, crisv32_hwcontrol()
75 this->IO_ADDR_W = (void __iomem *)REG_ADDR(pio, crisv32_hwcontrol()
88 writeb(cmd, this->IO_ADDR_W); crisv32_hwcontrol()
111 struct nand_chip *this; crisv32_nand_flash_probe() local
150 this = &wrapper->chip; crisv32_nand_flash_probe()
154 crisv32_mtd->priv = this; crisv32_nand_flash_probe()
157 this->IO_ADDR_R = read_cs; crisv32_nand_flash_probe()
158 this->IO_ADDR_W = write_cs; crisv32_nand_flash_probe()
159 this->cmd_ctrl = crisv32_hwcontrol; crisv32_nand_flash_probe()
160 this->dev_ready = crisv32_device_ready; crisv32_nand_flash_probe()
162 this->chip_delay = 20; crisv32_nand_flash_probe()
163 this->ecc.mode = NAND_ECC_SOFT; crisv32_nand_flash_probe()
166 /* this->bbt_options = NAND_BBT_USE_FLASH; */ crisv32_nand_flash_probe()
/linux-4.1.27/drivers/pinctrl/
H A Dcore.h22 * @node: node to include this pin controller in the global pin controller list
23 * @desc: the pin controller descriptor supplied when initializing this pin
25 * @pin_desc_tree: each pin descriptor for this pin controller is stored in
26 * this radix tree
27 * @gpio_ranges: a list of GPIO ranges that is handled by this pin controller,
28 * ranges are added to this list at runtime
29 * @dev: the device entry for this pin controller
33 * @p: result of pinctrl_get() for this device
34 * @hog_default: default state for pins hogged by this device
35 * @hog_sleep: sleep state for pins hogged by this device
37 * @device_root: debugfs root for this device
59 * @dev: the device using this pin control handle
60 * @states: a list of states for this device
63 * this device, if any
78 * @name: the name of this state
79 * @settings: a list of settings for this state
117 * @dev_name: the name of the device using this state
136 * @dynamic_name: if the name of this pin was dynamically allocated
138 * If non-zero, this pin is claimed by @owner. This field is an integer
143 * @mux_setting: The most recent selected mux setting for this pin, if any.
144 * @gpio_owner: If pinctrl_request_gpio() was called for this pin, this is
145 * the name of the GPIO that "owns" this pin.
H A Dpinctrl-adi2.h16 * @name: the name of this pin group
18 * @num: the number of pins in this array
37 * @name: the name of this function mux setting
39 * @num_groups: the number of pin groups in this array
57 * @functions: The functions supported on this SoC.
/linux-4.1.27/arch/tile/include/arch/
H A Dmpipe.h28 * credit counters. Accesses to this address space should use an address of
29 * this form and a value like that specified in IDMA_RELEASE_REGION_VAL.
50 * accessed. For the iDMA release region, this field must be 4.
89 * inflight packets will be decremented by this amount for the associated
107 * buffer stack manager. On an MMIO load, this pops a buffer descriptor from
108 * the top of stack if one is available. On an MMIO store, this pushes a
127 * accessed. For the buffer stack manager region, this field must be 6.
153 * buffer stack manager. On an MMIO load, this pops a buffer descriptor from
154 * the top of stack if one is available. On an MMIO store, this pushes a
174 * Index of the buffer stack to which this buffer belongs. Ignored on
182 * mPIPE instances, this field indicates the buffer owner. If the INST
192 * Reads as one to indicate that this is a hardware managed buffer.
212 * or the hardware's prefetch buffer is empty for this stack.
251 * accessed. For the egress DMA post region, this field must be 5.
287 * For writes, this specifies the current ring tail pointer prior to any
289 * 23, this would contain 23 (not 24). On writes, this index must be
290 * masked based on the ring size. The new tail pointer after this post
293 * For reads, this provides the hardware descriptor fetcher's head
295 * yet have been processed so this indicator is only used to determine
300 * For writes, this specifies number of contiguous descriptors that are
302 * single MMIO store. A zero in this field on a write will "wake up" an
306 * For reads, this field provides a rolling count of the number of
314 * For writes, this specifies the generation number of the tail being
319 * For reads, this is the current generation number. Valid descriptors
320 * will have the inverse of this generation number.
348 /* NotifRing currently assigned to this bucket. */
352 /* Group associated with this bucket. */
354 /* Mode select for this bucket. */
/linux-4.1.27/block/
H A Dblk-iopoll.c26 * Add this blk_iopoll structure to the pending poll list and trigger the
28 * successful return from blk_iopoll_sched_prep() before calling this.
42 * __blk_iopoll_complete - Mark this @iop as un-polled again
58 * blk_iopoll_complete - Mark this @iop as un-polled again
63 * iopoll handler, it'll end the polled mode by calling this function. The
99 /* Even though interrupts have been re-enabled, this blk_iopoll_softirq()
101 * entries to the tail of this list, and only ->poll() blk_iopoll_softirq()
102 * calls can remove this head entry from the list. blk_iopoll_softirq()
119 * entire mask of commands).In such cases this code blk_iopoll_softirq()
138 * blk_iopoll_disable - Disable iopoll on this @iop
154 * blk_iopoll_enable - Enable iopoll on this @iop
158 * Enable iopoll on this @iop. Note that the handler run will not be
170 * blk_iopoll_init - Initialize this @iop
176 * Initialize this blk_iopoll structure. Before being actively used, the
/linux-4.1.27/drivers/mtd/chips/
H A Dchipreg.c34 struct mtd_chip_driver *ret = NULL, *this; get_mtd_chip_driver() local
39 this = list_entry(pos, typeof(*this), list); get_mtd_chip_driver()
41 if (!strcmp(this->name, name)) { get_mtd_chip_driver()
42 ret = this; get_mtd_chip_driver()
73 probe-only module, which is no longer required from this do_map_probe()
83 * Make sure the MTD device is already unregistered before calling this
/linux-4.1.27/drivers/staging/lustre/include/linux/libcfs/linux/
H A Dlinux-cpu.h14 * in the LICENSE file that accompanied this code).
17 * version 2 along with this program; if not, write to the
42 #error Do not #include this file directly. #include <linux/libcfs/libcfs.h> instead
55 /* CPUs mask for this partition */
57 /* nodes mask for this partition */
75 /* all cpus in this partition table */
77 /* all nodes in this partition table */
/linux-4.1.27/fs/nfs_common/
H A Dgrace.c17 * @net: net namespace that this lock manager belongs to
18 * @lm: who this grace period is for
40 * @net: net namespace that this lock manager belongs to
41 * @lm: who this grace period is for
43 * Call this function to state that the given lock manager is ready to
46 * Note that callers count on it being safe to call this more than once,
61 * Lock managers call this function to determine when it is OK for them
/linux-4.1.27/include/crypto/
H A Db128ops.h21 The free distribution and use of this software in both source and binary
24 1. distributions of this source code include the above copyright
25 notice, this list of conditions and the following disclaimer;
28 notice, this list of conditions and the following disclaimer
32 built using this software without specific written permission.
34 ALTERNATIVELY, provided that this notice is retained in full, this product
/linux-4.1.27/include/linux/mfd/
H A Dtps6105x.h55 * @TPS6105X_MODE_SHUTDOWN: this instance is inactive, not used for anything
56 * @TPS61905X_MODE_TORCH: this instance is used as a LED, usually a while
57 * LED, for example as backlight or flashlight. If this is set, the
59 * @TPS6105X_MODE_TORCH_FLASH: this instance is used as a flashgun, usually
61 * @TPS6105X_MODE_VOLTAGE: this instance is used as a voltage regulator and
73 * @mode: what mode this instance shall be operated in,
74 * this is not selectable at runtime
/linux-4.1.27/drivers/usb/gadget/function/
H A Du_ether.h30 * host_addr: this address is invisible to ifconfig
53 * There is a current limitation that only one instance of this link may
55 * layer facilities can be used to package multiple logical links on this
108 * gadget driver using this framework. The link layer addresses are
130 * Registers the net device associated with this ethernet-over-usb link
139 * gadget driver using this framework. The link layer addresses
151 * @net: device representing this link
160 * @net: device representing this link
161 * @dev_addr: eth address of this device
163 * This sets the device-side Ethernet address of this ethernet-over-usb link
171 * @net: device representing this link
175 * This gets the device-side Ethernet address of this ethernet-over-usb link.
182 * @net: device representing this link
185 * This sets the host-side Ethernet address of this ethernet-over-usb link
193 * @net: device representing this link
197 * This gets the host-side Ethernet address of this ethernet-over-usb link.
204 * @net: device representing this link
208 * This gets the CDC formatted host-side Ethernet address of this
216 * @net: device representing this link
219 * This gets the binary formatted host-side Ethernet address of this
226 * @net: device representing this link
229 * This sets the queue length multiplier of this ethernet-over-usb link.
236 * @net: device representing this link
238 * This gets the queue length multiplier of this ethernet-over-usb link.
244 * @net: device representing this link
248 * This gets the interface name of this ethernet-over-usb link.
265 /* Everything else is *presumably* fine ... but this is a bit can_support_ecm()
/linux-4.1.27/include/media/
H A Dtuner-types.h25 /* Many Philips based tuners have a comment like this in their
36 * Set cb_first_if_lower_freq to 1, if this check is
37 * required for this tuner.
39 * I tested this for PAL by first setting the TV frequency to
44 /* Set to 1 if this tuner uses a tda9887 */
47 sensitivity. If this setting is 1, then set PORT1 to 1 to
51 sensitivity. If this setting is 1, then set PORT2 to 1 to
55 sensitivity. If this setting is 1, e register will use cGainNormal
59 use Intercarrier mode. If this setting is 1, then the tuner
73 Set this bit to 1 if this is needed. */
76 Set this bit to 1 if this is needed. */
/linux-4.1.27/arch/cris/arch-v32/drivers/mach-fs/
H A Dnandflash.c54 struct nand_chip *this = mtd->priv; crisv32_hwcontrol() local
67 * Optimize for this case; works for 2.6.18 */ crisv32_hwcontrol()
83 writeb(cmd, this->IO_ADDR_W); crisv32_hwcontrol()
109 struct nand_chip *this; crisv32_nand_flash_probe() local
131 this = &wrapper->chip; crisv32_nand_flash_probe()
145 crisv32_mtd->priv = this; crisv32_nand_flash_probe()
148 this->IO_ADDR_R = read_cs; crisv32_nand_flash_probe()
149 this->IO_ADDR_W = write_cs; crisv32_nand_flash_probe()
150 this->cmd_ctrl = crisv32_hwcontrol; crisv32_nand_flash_probe()
151 this->dev_ready = crisv32_device_ready; crisv32_nand_flash_probe()
153 this->chip_delay = 20; crisv32_nand_flash_probe()
154 this->ecc.mode = NAND_ECC_SOFT; crisv32_nand_flash_probe()
157 /* this->bbt_options = NAND_BBT_USE_FLASH; */ crisv32_nand_flash_probe()
/linux-4.1.27/kernel/irq/
H A Ddevres.c16 struct irq_devres *this = res; devm_irq_release() local
18 free_irq(this->irq, this->dev_id); devm_irq_release()
23 struct irq_devres *this = res, *match = data; devm_irq_match() local
25 return this->irq == match->irq && this->dev_id == match->dev_id; devm_irq_match()
39 * Except for the extra @dev argument, this function takes the
41 * request_threaded_irq(). IRQs requested with this function will be
44 * If an IRQ allocated with this function needs to be freed
86 * Except for the extra @dev argument, this function takes the
88 * request_any_context_irq(). IRQs requested with this function will be
91 * If an IRQ allocated with this function needs to be freed
126 * Except for the extra @dev argument, this function takes the
/linux-4.1.27/arch/tile/include/hv/
H A Ddrv_srom_intf.h23 /** Read this offset to get the total device size. */
26 /** Read this offset to get the device sector size. */
29 /** Read this offset to get the device page size. */
32 /** Write this offset to flush any pending writes. */
35 /** Write this offset, plus the byte offset of the start of a sector, to
/linux-4.1.27/arch/ia64/sn/kernel/sn2/
H A Dtimer_interrupt.c14 * Further, this software is distributed without any warranty that it is
17 * otherwise, applies only to this software file. Patent licenses, if
18 * any, provided herein do not apply to combinations of this program with
22 * License along with this program; if not, write the Free Software
25 * For further information regarding this notice, see:
/linux-4.1.27/tools/perf/arch/arm/tests/
H A Dregs_load.S25 * - the PC at the time at the call to this function. Since this function
33 * - the regs buffer needs to be zeroed before the call to this function,
34 * in this case using a calloc in dwarf-unwind.c.
56 // to this function
/linux-4.1.27/arch/sparc/lib/
H A Dudivdi3.S37 sub %i0,%o3,%i0 ! this kills msb of n
38 addx %i0,%i0,%i0 ! so this cannot give carry
45 sub %i0,%o3,%i0 ! this kills msb of n
50 ! Got carry from n. Subtract next step to cancel this carry.
75 sub %o4,%o3,%o4 ! this kills msb of n
76 addx %o4,%o4,%o4 ! so this cannot give carry
83 sub %o4,%o3,%o4 ! this kills msb of n
88 ! Got carry from n. Subtract next step to cancel this carry.
101 sub %i0,%o3,%i0 ! this kills msb of n
102 addx %i0,%i0,%i0 ! so this cannot give carry
109 sub %i0,%o3,%i0 ! this kills msb of n
114 ! Got carry from n. Subtract next step to cancel this carry.
180 sub %o4,%i2,%o4 ! this kills msb of n
181 addx %o4,%o4,%o4 ! so this cannot give carry
188 sub %o4,%i2,%o4 ! this kills msb of n
193 ! Got carry from n. Subtract next step to cancel this carry.
203 sra %o3,31,%g2 ! Do not move this insn
204 and %o1,%g2,%g2 ! Do not move this insn
205 andcc %g0,0,%g1 ! Do not move this insn
/linux-4.1.27/drivers/net/wireless/brcm80211/brcmfmac/
H A Dtracepoint.c4 * Permission to use, copy, modify, and/or distribute this software for any
6 * copyright notice and this permission notice appear in all copies.
17 #include <linux/module.h> /* bug in tracepoint.h, it should include this */
/linux-4.1.27/fs/reiserfs/
H A DMakefile31 # and causing a panic. Since this behavior only affects ppc32, this ifeq
32 # will work around it. If any other architecture displays this behavior,
/linux-4.1.27/include/linux/usb/
H A Diowarrior.h14 this information.
22 * this is empty string) */
32 /* size of the data-packets on this interface */
/linux-4.1.27/include/xen/interface/
H A Dnmi.h34 * Register NMI callback for this (calling) VCPU. Currently this only makes
46 * Deregister NMI callback for this (calling) VCPU.
/linux-4.1.27/arch/openrisc/include/asm/
H A Dserial.h26 /* There's a generic version of this file, but it assumes a 1.8MHz UART clk...
27 * this, on the other hand, assumes the UART clock is tied to the system
28 * clock... 8250_early.c (early 8250 serial console) actually uses this, so
/linux-4.1.27/kernel/sched/
H A DMakefile7 # needed for x86 only. Why this used to be enabled for all architectures is beyond
8 # me. I suspect most platforms don't need this, but until we know that for sure
9 # I turn this off for IA-64 only. Andreas Schwab says it's also needed on m68k
/linux-4.1.27/include/drm/
H A Ddrm_dp_mst_helper.h4 * Permission to use, copy, modify, distribute, and sell this software and its
7 * notice and this permission notice appear in supporting documentation, and
11 * about the suitability of this software for any purpose. It is provided "as
33 * @pbn: Payload Bandwidth Number for this channel
35 * @num_slots: number of slots for this PBN
46 * @kref: reference count for this port.
48 * @input: if this port is an input port.
53 * @dpcd_rev: DPCD revision of device on this port
56 * @available_pbn: Available bandwidth for this port.
57 * @next: link to next port on this branch device
58 * @mstb: branch device attach below this port
59 * @aux: i2c aux transport to talk to device connected to this port.
60 * @parent: branch device parent of this port
61 * @vcpi: Virtual Channel Payload info for this port.
62 * @connector: DRM connector this port is connected to.
63 * @mgr: topology manager this port lives under.
82 struct drm_dp_mst_branch *mstb; /* pointer to an mstb if this port has one */
83 struct drm_dp_aux aux; /* i2c bus for this port? */
95 * @kref: reference count for this port.
96 * @rad: Relative Address to talk to this branch device.
97 * @lct: Link count total to talk to this branch device.
100 * @ports: linked list of ports on this branch.
102 * @mgr: topology manager for this branch device.
103 * @tx_slots: transmission slots for this device.
104 * @last_seqno: last sequence number used to talk to this.
105 * @link_address_sent: if a link address message has been sent to this device yet.
106 * @guid: guid for DP 1.2 branch device. port under this branch can be
122 /* list of tx ops queue for this port */
277 /* this covers ENUM_RESOURCES, POWER_DOWN_PHY, POWER_UP_PHY */
403 * @conn_base_id: DRM connector ID this mgr is connected to.
407 * @mst_state: if this manager is enabled for an MST capable port.
413 * There should be one instance of this for every MST capable DP connector
421 struct drm_dp_aux *aux; /* auxch for this topology mgr to use */
/linux-4.1.27/drivers/net/wireless/orinoco/
H A Dhermes_dld.h4 * The contents of this file are subject to the Mozilla Public License
5 * Version 1.1 (the "License"); you may not use this file except in
14 * Alternatively, the contents of this file may be used under the
17 * above. If you wish to allow the use of your version of this file
19 * version of this file under the MPL, indicate your decision by
22 * provisions above, a recipient may use your version of this file
/linux-4.1.27/arch/mips/boot/dts/include/dt-bindings/dma/
H A Dsun4i-a10.h7 * of the GPL or the X11 license, at your option. Note that this dual
8 * licensing only applies to this file, and not this project as a
22 * License along with this file; if not, write to the Free
29 * obtaining a copy of this software and associated documentation
37 * The above copyright notice and this permission notice shall be
/linux-4.1.27/arch/sh/include/cpu-sh5/cpu/
H A Dregisters.h11 * License. See the file "COPYING" in the main directory of this archive
68 #define SR_ENABLE_FPU 0xffffffffffff7fff /* AND with this */
71 #define SR_ENABLE_MMU 0x0000000084000000 /* OR with this */
73 #define SR_ENABLE_MMU 0x0000000080000000 /* OR with this */
76 #define SR_UNBLOCK_EXC 0xffffffffefffffff /* AND with this */
77 #define SR_BLOCK_EXC 0x0000000010000000 /* OR with this */
/linux-4.1.27/arch/powerpc/boot/dts/include/dt-bindings/dma/
H A Dsun4i-a10.h7 * of the GPL or the X11 license, at your option. Note that this dual
8 * licensing only applies to this file, and not this project as a
22 * License along with this file; if not, write to the Free
29 * obtaining a copy of this software and associated documentation
37 * The above copyright notice and this permission notice shall be
/linux-4.1.27/arch/arm64/boot/dts/include/dt-bindings/dma/
H A Dsun4i-a10.h7 * of the GPL or the X11 license, at your option. Note that this dual
8 * licensing only applies to this file, and not this project as a
22 * License along with this file; if not, write to the Free
29 * obtaining a copy of this software and associated documentation
37 * The above copyright notice and this permission notice shall be
/linux-4.1.27/arch/metag/boot/dts/include/dt-bindings/dma/
H A Dsun4i-a10.h7 * of the GPL or the X11 license, at your option. Note that this dual
8 * licensing only applies to this file, and not this project as a
22 * License along with this file; if not, write to the Free
29 * obtaining a copy of this software and associated documentation
37 * The above copyright notice and this permission notice shall be
/linux-4.1.27/arch/arm/boot/dts/include/dt-bindings/dma/
H A Dsun4i-a10.h7 * of the GPL or the X11 license, at your option. Note that this dual
8 * licensing only applies to this file, and not this project as a
22 * License along with this file; if not, write to the Free
29 * obtaining a copy of this software and associated documentation
37 * The above copyright notice and this permission notice shall be
/linux-4.1.27/include/dt-bindings/dma/
H A Dsun4i-a10.h7 * of the GPL or the X11 license, at your option. Note that this dual
8 * licensing only applies to this file, and not this project as a
22 * License along with this file; if not, write to the Free
29 * obtaining a copy of this software and associated documentation
37 * The above copyright notice and this permission notice shall be
/linux-4.1.27/drivers/net/fddi/skfp/
H A DMakefile13 # Compiling this driver produces some warnings (and some more are
14 # switched off below), but I did not fix this, because the Hardware
/linux-4.1.27/drivers/s390/char/
H A Dvmcp.h9 * this driver implements a character device that issues these commands and
12 * The idea of this driver is based on cpint from Neale Ferguson
/linux-4.1.27/drivers/pcmcia/
H A Dsa1100_generic.c6 The contents of this file are subject to the Mozilla Public
7 License Version 1.1 (the "License"); you may not use this file
20 Alternatively, the contents of this file may be used under the
23 above. If you wish to allow the use of your version of this file
25 your version of this file under the MPL, indicate your decision
28 the provisions above, a recipient may use your version of this
112 * registers this socket driver with Card Services.
123 * Invokes the low-level kernel service to free IRQs associated with this
/linux-4.1.27/arch/xtensa/include/uapi/asm/
H A Dipcbuf.h5 * Note extra padding because this structure is passed back and forth
21 * this archive for more details.
H A Dpoll.h6 * this archive for more details.
H A Dsetup.h5 * License. See the file "COPYING" in the main directory of this archive
/linux-4.1.27/arch/sparc/math-emu/
H A Dsfp-util_32.h30 "sra %3,31,%%g2 ! Don't move this insn\n\t" \
31 "and %2,%%g2,%%g2 ! Don't move this insn\n\t" \
32 "andcc %%g0,0,%%g1 ! Don't move this insn\n\t" \
74 /* It's quite necessary to add this much assembler for the sparc.
82 "sub %1,%2,%1 ! this kills msb of n\n\t" \
83 "addx %1,%1,%1 ! so this can't give carry\n\t" \
90 "sub %1,%2,%1 ! this kills msb of n\n\t" \
95 "! Got carry from n. Subtract next step to cancel this carry.\n\t" \
/linux-4.1.27/arch/x86/boot/
H A Dregs.c14 * Note that this sets EFLAGS_CF in the input register set; this
/linux-4.1.27/arch/mips/include/uapi/asm/
H A Dioctl.h3 * License. See the file "COPYING" in the main directory of this archive
18 * And this turns out useful to catch old ioctl numbers in header
H A Dtypes.h3 * License. See the file "COPYING" in the main directory of this archive
18 * However, some user programs (e.g. perf) may not want this. They can
/linux-4.1.27/arch/nios2/include/asm/
H A Dpgtable-bits.h6 * License. See the file "COPYING" in the main directory of this archive
15 * which looks like this:
/linux-4.1.27/arch/arm/mach-shmobile/
H A Dsh-gpio.h7 * License. See the file "COPYING" in the main directory of this archive
22 * this function should be replaced by correct gpio function
/linux-4.1.27/tools/testing/selftests/powerpc/
H A Dutils.h25 /* Yes, this is evil */
35 /* The test harness uses this, yes it's gross */
/linux-4.1.27/include/linux/irqchip/
H A Dmetag-ext.h28 /* this should be called in the mask callback */
30 /* this should be called in the unmask callback */
/linux-4.1.27/drivers/iommu/
H A Dmsm_iommu.h13 * along with this program; if not, write to the Free Software
47 * name Human-readable name given to this IOMMU HW instance
48 * ncb Number of context banks present on this IOMMU HW instance
57 * name Human-readable name given to this context bank
58 * num Index of this context bank within the hardware
59 * mids List of Machine IDs that are to be mapped into this context
74 * @ncb The number of contexts on this IOMMU
76 * @clk: The bus clock for this IOMMU hardware instance
92 * @num: Hardware context number of this context
93 * @pdev: Platform device associated wit this HW instance
115 * interrupt is not supported in the API yet, but this will print an error
/linux-4.1.27/include/net/
H A Dregulatory.h8 * Permission to use, copy, modify, and/or distribute this software for any
10 * copyright notice and this permission notice appear in all copies.
40 * @wiphy_idx: this is set if this request's initiator is
45 * @initiator: indicates who sent this request, could be any of
55 * dfs_region represents that region. Drivers can use this and the
58 * %NL80211_REGDOM_SET_BY_USER, this classifies the type
64 * @processed: indicates whether or not this requests has already been
92 * @REGULATORY_CUSTOM_REG: tells us the driver for this device
94 * ISO / IEC 3166 alpha2 it belongs to. When this is enabled
97 * wiphy_apply_custom_regulatory() should have this flag set
103 * @REGULATORY_STRICT_REG: tells us that the wiphy for this device
105 * superset for regulatory rules. After this device gets its regulatory
107 * for this device to enhance regulatory compliance, forcing the
109 * rules. For example if channel 13 and 14 are disabled by this
111 * has these channels enabled would enable them for this wiphy,
113 * base. You can program the superset of regulatory rules for this
119 * @REGULATORY_DISABLE_BEACON_HINTS: enable this if your driver needs to
126 * power settings are updated for this connection with the power settings
140 * all interfaces on this wiphy reside on allowed channels. If this flag
165 * Mixing any of the above flags with this flag will result in a failure
/linux-4.1.27/drivers/net/wireless/ti/wl12xx/
H A Dreg.h19 * along with this program; if not, write to the Free Software
42 0 SOFT_RESET Soft Reset - When this bit is set,
48 contents of the EEPROM. When this bit is cleared
64 Setting a bit in this register masks the
94 Setting a bit in this register sets
104 Setting a bit in this register clears
115 The host can read this register to determine
117 Reading this register doesn't
126 The host can read this register to determine
128 Reading this register clears it,
137 The host can set individual bits in this
157 During a hardware reset, this bit holds
160 set this bit (pull down MDATA2).
161 The host clears this bit after downloading the firmware into
163 When loading firmware from Flash, clear this bit (pull up MDATA2)
179 Setting this bit starts a burst read from
181 If this bit is set (after reset) before an EEPROM read/write,
185 TheWlan hardware hardware clears this bit automatically.
261 The host must read this pointer after a reset to
276 The host must read this pointer after a reset to find
289 1 EE_READ - EEPROM Read Request 1 - Setting this bit
293 The Wlan hardware hardware clears this bit automatically.
294 EE_DATA is valid when this bit is cleared.
296 0 EE_WRITE - EEPROM Write Request - Setting this bit
299 The Wlan hardware hardware clears this bit automatically.
328 The EEPROM provides the lower 15 bits of this address.
460 /* Use this reg for masking during driver access */
494 * Host Command Interrupt. Setting this bit masks
503 * sets this bit to acknowledge that it received
/linux-4.1.27/drivers/gpio/
H A Ddevres.c9 * along with this program; if not, write to the Free Software
33 struct gpio_desc **this = res, **gpio = data; devm_gpiod_match() local
35 return *this == *gpio; devm_gpiod_match()
47 struct gpio_descs **this = res, **gpios = data; devm_gpiod_match_array() local
49 return *this == *gpios; devm_gpiod_match_array()
58 * Managed gpiod_get(). GPIO descriptors returned from this function are
76 * Managed gpiod_get_optional(). GPIO descriptors returned from this function
95 * Managed gpiod_get_index(). GPIO descriptors returned from this function are
131 * GPIO descriptors returned from this function are automatically disposed on
180 * Managed gpiod_get_index_optional(). GPIO descriptors returned from this
208 * Managed gpiod_get_array(). GPIO descriptors returned from this function are
243 * Managed gpiod_get_array_optional(). GPIO descriptors returned from this
267 * devm_gpiod_get_index(). Normally this function will not be called as the GPIO
282 * Normally this function will not be called as the GPIOs will be disposed of
304 unsigned *this = res, *gpio = data; devm_gpio_match() local
306 return *this == *gpio; devm_gpio_match()
315 * Except for the extra @dev argument, this function takes the
317 * gpio_request(). GPIOs requested with this function will be
320 * If an GPIO allocated with this function needs to be freed
351 * @label: a literal description string of this GPIO
381 * Except for the extra @dev argument, this function takes the
/linux-4.1.27/fs/ntfs/
H A Dlogfile.h18 * along with this program (in the main directory of the Linux-NTFS
52 * probably only want to support 1.1 as this seems to be the current version
72 When creating, set this to be immediately
73 after this header structure (without any
79 to "CHKD". Otherwise this is zero. */
82 2. Use this to calculate the required size
89 between 4096 and 8192. Otherwise this is
91 /* 24*/ le16 restart_area_offset;/* Byte offset from the start of this header to
93 to 8-byte boundary. When creating, set this
104 * in this particular client array. Also inside the client records themselves,
105 * this means that there are no client records preceding or following this one.
122 * Log file restart area record. The offset of this record is found by adding
135 log client records which follows this
144 this is != LOGFILE_NO_CLIENT, and it should
149 this would be LOGFILE_NO_CLIENT. On WinXP
151 open, even on clean shutdown so this should
159 presumably earlier, on a clean volume this
164 this would be != LOGFILE_NO_CLIENT, and it
168 open, even on clean shutdown so this should
171 and presumably earlier this is always 0. On
177 thus if the logfile is dirty, this bit is
182 this bit is set, we also know it must be
184 open and this bit is clear, we can be almost
189 size in bytes and this can be used in with
200 /* 22*/ le16 client_array_offset;/* Offset from the start of this record to
202 matched. When creating, set this to be
203 after this restart area structure, aligned
205 match, this is ignored and the offset is
215 earlier, this is 0x30, i.e. immediately
216 following this record. On WinXP and
217 presumably later, this is 0x40, i.e. there
218 are 16 extra bytes between this record and
261 * Log client record. The offset of this record is found by adding the offset
266 /* 0*/ leLSN oldest_lsn; /* Oldest LSN needed by this client. On create
268 /* 8*/ leLSN client_restart_lsn;/* LSN at which this client needs to restart
270 the log file. At present, if clean this
277 client record, i.e. this is the first one.
282 client records, i.e. this is the last one.
284 /* 20*/ le16 seq_number; /* On Win2k and presumably earlier, this is set
289 presumably later, this is always 0. */
/linux-4.1.27/drivers/scsi/isci/
H A Dscu_remote_node_context.h3 * redistributing this file, you may do so under either license.
19 * along with this program; if not, write to the Free Software
21 * The full GNU General Public License is included in this distribution
34 * notice, this list of conditions and the following disclaimer.
36 * notice, this list of conditions and the following disclaimer in
41 * from this software without specific prior written permission.
76 * This field is the remote node index assigned for this remote node. All
86 * this remote node will support.
91 * This field tells the SCU hardware which logical port to associate with this
98 * This field will enable the I_T nexus loss timer for this remote node.
110 * this field must be set to false.
133 * This field reprensets the function number assigned to this remote device.
142 * for this remote node.
148 * This field tells the SCU hardware how long this device may occupy the
161 * This field allows the driver to cheat on the arbitration wait time for this
200 * STP Targets are not yet supported so this definition is a placeholder until
/linux-4.1.27/drivers/staging/sm750fb/
H A Dddk750_help.c9 /* after driver mapped io registers, use this function first */ ddk750_set_mmio()
/linux-4.1.27/arch/x86/include/asm/numachip/
H A Dnumachip.h3 * License. See the file "COPYING" in the main directory of this archive
/linux-4.1.27/arch/x86/realmode/
H A DMakefile5 # License. See the file "COPYING" in the main directory of this archive
/linux-4.1.27/arch/xtensa/boot/boot-uboot/
H A DMakefile3 # License. See the file "COPYING" in the main directory of this archive
/linux-4.1.27/arch/xtensa/boot/dts/
H A DMakefile5 # License. See the file "COPYING" in the main directory of this archive
/linux-4.1.27/arch/xtensa/platforms/iss/include/platform/
H A Dhardware.h5 * License. See the file "COPYING" in the main directory of this archive
H A Dserial.h3 * License. See the file "COPYING" in the main directory of this archive
/linux-4.1.27/arch/xtensa/platforms/xtfpga/include/platform/
H A Dserial.h5 * License. See the file "COPYING" in the main directory of this archive
/linux-4.1.27/arch/sh/lib64/
H A Dpanic.c5 * License. See the file "COPYING" in the main directory of this archive

Completed in 4666 milliseconds

1234567891011>>