Home
last modified time | relevance | path

Searched refs:dev (Results 1 – 25 of 1919) sorted by relevance

12345678910>>...77

/rk3399_rockchip-uboot/fs/yaffs2/
H A Dyaffs_checkptrw.c17 static int yaffs2_checkpt_space_ok(struct yaffs_dev *dev) in yaffs2_checkpt_space_ok() argument
19 int blocks_avail = dev->n_erased_blocks - dev->param.n_reserved_blocks; in yaffs2_checkpt_space_ok()
27 static int yaffs_checkpt_erase(struct yaffs_dev *dev) in yaffs_checkpt_erase() argument
31 if (!dev->param.erase_fn) in yaffs_checkpt_erase()
35 dev->internal_start_block, dev->internal_end_block); in yaffs_checkpt_erase()
37 for (i = dev->internal_start_block; i <= dev->internal_end_block; i++) { in yaffs_checkpt_erase()
38 struct yaffs_block_info *bi = yaffs_get_block_info(dev, i); in yaffs_checkpt_erase()
43 dev->n_erasures++; in yaffs_checkpt_erase()
45 if (dev->param. in yaffs_checkpt_erase()
46 erase_fn(dev, in yaffs_checkpt_erase()
[all …]
H A Dyaffs_nand.c20 int yaffs_rd_chunk_tags_nand(struct yaffs_dev *dev, int nand_chunk, in yaffs_rd_chunk_tags_nand() argument
25 int flash_chunk = nand_chunk - dev->chunk_offset; in yaffs_rd_chunk_tags_nand()
27 dev->n_page_reads++; in yaffs_rd_chunk_tags_nand()
33 if (dev->param.read_chunk_tags_fn) in yaffs_rd_chunk_tags_nand()
35 dev->param.read_chunk_tags_fn(dev, flash_chunk, buffer, in yaffs_rd_chunk_tags_nand()
38 result = yaffs_tags_compat_rd(dev, in yaffs_rd_chunk_tags_nand()
43 bi = yaffs_get_block_info(dev, in yaffs_rd_chunk_tags_nand()
45 dev->param.chunks_per_block); in yaffs_rd_chunk_tags_nand()
46 yaffs_handle_chunk_error(dev, bi); in yaffs_rd_chunk_tags_nand()
51 int yaffs_wr_chunk_tags_nand(struct yaffs_dev *dev, in yaffs_wr_chunk_tags_nand() argument
[all …]
H A Dyaffs_guts.c47 void yaffs_addr_to_chunk(struct yaffs_dev *dev, loff_t addr, in yaffs_addr_to_chunk() argument
53 chunk = (u32) (addr >> dev->chunk_shift); in yaffs_addr_to_chunk()
55 if (dev->chunk_div == 1) { in yaffs_addr_to_chunk()
57 offset = (u32) (addr & dev->chunk_mask); in yaffs_addr_to_chunk()
63 chunk /= dev->chunk_div; in yaffs_addr_to_chunk()
65 chunk_base = ((loff_t) chunk) * dev->data_bytes_per_chunk; in yaffs_addr_to_chunk()
123 static int yaffs_init_tmp_buffers(struct yaffs_dev *dev) in yaffs_init_tmp_buffers() argument
128 memset(dev->temp_buffer, 0, sizeof(dev->temp_buffer)); in yaffs_init_tmp_buffers()
131 dev->temp_buffer[i].in_use = 0; in yaffs_init_tmp_buffers()
132 buf = kmalloc(dev->param.total_bytes_per_chunk, GFP_NOFS); in yaffs_init_tmp_buffers()
[all …]
H A Dyaffs_summary.c55 static void yaffs_summary_clear(struct yaffs_dev *dev) in yaffs_summary_clear() argument
57 if (!dev->sum_tags) in yaffs_summary_clear()
59 memset(dev->sum_tags, 0, dev->chunks_per_summary * in yaffs_summary_clear()
64 void yaffs_summary_deinit(struct yaffs_dev *dev) in yaffs_summary_deinit() argument
66 kfree(dev->sum_tags); in yaffs_summary_deinit()
67 dev->sum_tags = NULL; in yaffs_summary_deinit()
68 kfree(dev->gc_sum_tags); in yaffs_summary_deinit()
69 dev->gc_sum_tags = NULL; in yaffs_summary_deinit()
70 dev->chunks_per_summary = 0; in yaffs_summary_deinit()
73 int yaffs_summary_init(struct yaffs_dev *dev) in yaffs_summary_init() argument
[all …]
/rk3399_rockchip-uboot/include/dm/
H A Dread.h20 static inline const struct device_node *dev_np(struct udevice *dev) in dev_np() argument
22 return ofnode_to_np(dev->node); in dev_np()
25 static inline const struct device_node *dev_np(struct udevice *dev) in dev_np() argument
37 static inline ofnode dev_ofnode(struct udevice *dev) in dev_ofnode() argument
39 return dev->node; in dev_ofnode()
42 static inline bool dev_of_valid(struct udevice *dev) in dev_of_valid() argument
44 return ofnode_valid(dev_ofnode(dev)); in dev_of_valid()
56 int dev_read_u32_default(struct udevice *dev, const char *propname, int def);
66 int dev_read_s32_default(struct udevice *dev, const char *propname, int def);
75 const char *dev_read_string(struct udevice *dev, const char *propname);
[all …]
H A Ddevice.h159 #define device_get_ops(dev) (dev->driver->ops) argument
162 #define device_active(dev) ((dev)->flags & DM_FLAG_ACTIVATED) argument
164 static inline int dev_of_offset(const struct udevice *dev) in dev_of_offset() argument
166 return ofnode_to_offset(dev->node); in dev_of_offset()
169 static inline void dev_set_of_offset(struct udevice *dev, int of_offset) in dev_set_of_offset() argument
171 dev->node = offset_to_ofnode(of_offset); in dev_set_of_offset()
174 static inline bool dev_has_of_node(struct udevice *dev) in dev_has_of_node() argument
176 return ofnode_valid(dev->node); in dev_has_of_node()
245 int (*bind)(struct udevice *dev);
246 int (*probe)(struct udevice *dev);
[all …]
/rk3399_rockchip-uboot/drivers/core/
H A Ddevice.c38 struct udevice *dev; in device_bind_common() local
70 list_for_each_entry(dev, &uc->dev_head, uclass_node) { in device_bind_common()
71 if (!strcmp(name, dev->name)) { in device_bind_common()
73 __func__, dev->name); in device_bind_common()
80 dev->node = node; in device_bind_common()
89 list_for_each_entry_safe(dev, n, &uc->dev_head, uclass_node) { in device_bind_common()
90 if (!strcmp(name, dev->name) && in device_bind_common()
91 (dev_read_bool(dev, "u-boot,dm-pre-reloc") || in device_bind_common()
92 dev_read_bool(dev, "u-boot,dm-spl"))) { in device_bind_common()
98 __func__, dev->name); in device_bind_common()
[all …]
H A Ddevice-remove.c30 static int device_chld_unbind(struct udevice *dev) in device_chld_unbind() argument
35 assert(dev); in device_chld_unbind()
37 list_for_each_entry_safe(pos, n, &dev->child_head, sibling_node) { in device_chld_unbind()
52 static int device_chld_remove(struct udevice *dev, uint flags) in device_chld_remove() argument
57 assert(dev); in device_chld_remove()
59 list_for_each_entry_safe(pos, n, &dev->child_head, sibling_node) { in device_chld_remove()
68 int device_unbind(struct udevice *dev) in device_unbind() argument
73 if (!dev) in device_unbind()
76 if (dev->flags & DM_FLAG_ACTIVATED) in device_unbind()
79 if (!(dev->flags & DM_FLAG_BOUND)) in device_unbind()
[all …]
H A Dread.c14 int dev_read_u32_default(struct udevice *dev, const char *propname, int def) in dev_read_u32_default() argument
16 return ofnode_read_u32_default(dev_ofnode(dev), propname, def); in dev_read_u32_default()
19 int dev_read_s32_default(struct udevice *dev, const char *propname, int def) in dev_read_s32_default() argument
21 return ofnode_read_s32_default(dev_ofnode(dev), propname, def); in dev_read_s32_default()
24 const char *dev_read_string(struct udevice *dev, const char *propname) in dev_read_string() argument
26 return ofnode_read_string(dev_ofnode(dev), propname); in dev_read_string()
29 bool dev_read_bool(struct udevice *dev, const char *propname) in dev_read_bool() argument
31 return ofnode_read_bool(dev_ofnode(dev), propname); in dev_read_bool()
34 ofnode dev_read_subnode(struct udevice *dev, const char *subnode_name) in dev_read_subnode() argument
36 return ofnode_find_subnode(dev_ofnode(dev), subnode_name); in dev_read_subnode()
[all …]
/rk3399_rockchip-uboot/drivers/net/
H A Dlan91c96.c116 static int smc_get_ethaddr(bd_t *bd, struct eth_device *dev);
117 static int get_rom_mac(struct eth_device *dev, unsigned char *v_rom_mac);
143 void dump_memory_info(struct eth_device *dev) in dump_memory_info() argument
148 old_bank = SMC_inw(dev, LAN91C96_BANK_SELECT) & 0xF; in dump_memory_info()
150 SMC_SELECT_BANK(dev, 0); in dump_memory_info()
151 mem_info = SMC_inw(dev, LAN91C96_MIR); in dump_memory_info()
154 SMC_SELECT_BANK(dev, old_bank); in dump_memory_info()
164 static int poll4int (struct eth_device *dev, byte mask, int timeout) in poll4int() argument
168 word old_bank = SMC_inw(dev, LAN91C96_BANK_SELECT); in poll4int()
171 SMC_SELECT_BANK(dev, 2); in poll4int()
[all …]
H A Dks8851_mll.c106 static u8 ks_rdreg8(struct eth_device *dev, u16 offset) in ks_rdreg8() argument
111 writew(offset | (BE0 << shift_bit), dev->iobase + 2); in ks_rdreg8()
113 return (u8)(readw(dev->iobase) >> shift_data); in ks_rdreg8()
116 static u16 ks_rdreg16(struct eth_device *dev, u16 offset) in ks_rdreg16() argument
118 writew(offset | ((BE1 | BE0) << (offset & 0x02)), dev->iobase + 2); in ks_rdreg16()
120 return readw(dev->iobase); in ks_rdreg16()
123 static void ks_wrreg8(struct eth_device *dev, u16 offset, u8 val) in ks_wrreg8() argument
128 writew(offset | (BE0 << shift_bit), dev->iobase + 2); in ks_wrreg8()
129 writew(value_write, dev->iobase); in ks_wrreg8()
132 static void ks_wrreg16(struct eth_device *dev, u16 offset, u16 val) in ks_wrreg16() argument
[all …]
H A Dsmc911x.c17 u32 pkt_data_pull(struct eth_device *dev, u32 addr) \
19 void pkt_data_push(struct eth_device *dev, u32 addr, u32 val) \
22 static void smc911x_handle_mac_address(struct eth_device *dev) in smc911x_handle_mac_address() argument
25 uchar *m = dev->enetaddr; in smc911x_handle_mac_address()
29 smc911x_set_mac_csr(dev, ADDRL, addrl); in smc911x_handle_mac_address()
30 smc911x_set_mac_csr(dev, ADDRH, addrh); in smc911x_handle_mac_address()
35 static int smc911x_eth_phy_read(struct eth_device *dev, in smc911x_eth_phy_read() argument
38 while (smc911x_get_mac_csr(dev, MII_ACC) & MII_ACC_MII_BUSY) in smc911x_eth_phy_read()
41 smc911x_set_mac_csr(dev, MII_ACC, phy << 11 | reg << 6 | in smc911x_eth_phy_read()
44 while (smc911x_get_mac_csr(dev, MII_ACC) & MII_ACC_MII_BUSY) in smc911x_eth_phy_read()
[all …]
H A Dax88180.c52 static void ax88180_rx_handler (struct eth_device *dev);
53 static int ax88180_phy_initial (struct eth_device *dev);
54 static void ax88180_media_config (struct eth_device *dev);
55 static unsigned long get_CicadaPHY_media_mode (struct eth_device *dev);
56 static unsigned long get_MarvellPHY_media_mode (struct eth_device *dev);
57 static unsigned short ax88180_mdio_read (struct eth_device *dev,
59 static void ax88180_mdio_write (struct eth_device *dev,
67 static int ax88180_mdio_check_complete (struct eth_device *dev) in ax88180_mdio_check_complete() argument
74 tmpval = INW (dev, MDIOCTRL); in ax88180_mdio_check_complete()
83 ax88180_mdio_read (struct eth_device *dev, unsigned long regaddr) in ax88180_mdio_read() argument
[all …]
H A Dcs8900.c51 static u16 get_reg_init_bus(struct eth_device *dev, int regno) in get_reg_init_bus() argument
54 struct cs8900_priv *priv = (struct cs8900_priv *)(dev->priv); in get_reg_init_bus()
55 uint8_t volatile * const iob = (uint8_t volatile * const)dev->iobase; in get_reg_init_bus()
68 static u16 get_reg(struct eth_device *dev, int regno) in get_reg() argument
70 struct cs8900_priv *priv = (struct cs8900_priv *)(dev->priv); in get_reg()
76 static void put_reg(struct eth_device *dev, int regno, u16 val) in put_reg() argument
78 struct cs8900_priv *priv = (struct cs8900_priv *)(dev->priv); in put_reg()
83 static void cs8900_reset(struct eth_device *dev) in cs8900_reset() argument
89 put_reg(dev, PP_SelfCTL, get_reg(dev, PP_SelfCTL) | PP_SelfCTL_Reset); in cs8900_reset()
96 while ((((us = get_reg_init_bus(dev, PP_SelfSTAT)) & in cs8900_reset()
[all …]
H A Dnatsemi.c228 static void write_eeprom(struct eth_device *dev, long addr, int location,
231 static int read_eeprom(struct eth_device *dev, long addr, int location);
232 static int mdio_read(struct eth_device *dev, int phy_id, int location);
233 static int natsemi_init(struct eth_device *dev, bd_t * bis);
234 static void natsemi_reset(struct eth_device *dev);
235 static void natsemi_init_rxfilter(struct eth_device *dev);
236 static void natsemi_init_txd(struct eth_device *dev);
237 static void natsemi_init_rxd(struct eth_device *dev);
238 static void natsemi_set_rx_mode(struct eth_device *dev);
239 static void natsemi_check_duplex(struct eth_device *dev);
[all …]
H A Dsmc91111.c145 static void smc_phy_configure(struct eth_device *dev);
169 static inline word SMC_inw(struct eth_device *dev, dword offset) in SMC_inw() argument
172 v = *((volatile word*)(dev->iobase + offset)); in SMC_inw()
177 static inline void SMC_outw(struct eth_device *dev, word value, dword offset) in SMC_outw() argument
179 *((volatile word*)(dev->iobase + offset)) = value; in SMC_outw()
183 static inline byte SMC_inb(struct eth_device *dev, dword offset) in SMC_inb() argument
187 _w = SMC_inw(dev, offset & ~((dword)1)); in SMC_inb()
191 static inline void SMC_outb(struct eth_device *dev, byte value, dword offset) in SMC_outb() argument
195 _w = SMC_inw(dev, offset & ~((dword)1)); in SMC_outb()
197 *((volatile word*)(dev->iobase + (offset & ~((dword)1)))) = in SMC_outb()
[all …]
H A Dns8382x.c251 static int mdio_read(struct eth_device *dev, int phy_id, int addr);
252 static void mdio_write(struct eth_device *dev, int phy_id, int addr, int value);
253 static void mdio_sync(struct eth_device *dev, u32 offset);
254 static int ns8382x_init(struct eth_device *dev, bd_t * bis);
255 static void ns8382x_reset(struct eth_device *dev);
256 static void ns8382x_init_rxfilter(struct eth_device *dev);
257 static void ns8382x_init_txd(struct eth_device *dev);
258 static void ns8382x_init_rxd(struct eth_device *dev);
259 static void ns8382x_set_rx_mode(struct eth_device *dev);
260 static void ns8382x_check_duplex(struct eth_device *dev);
[all …]
/rk3399_rockchip-uboot/test/dm/
H A Dbus.c30 static int testbus_drv_probe(struct udevice *dev) in testbus_drv_probe() argument
32 return dm_scan_fdt_dev(dev); in testbus_drv_probe()
35 static int testbus_child_post_bind(struct udevice *dev) in testbus_child_post_bind() argument
39 plat = dev_get_parent_platdata(dev); in testbus_child_post_bind()
46 static int testbus_child_pre_probe(struct udevice *dev) in testbus_child_pre_probe() argument
48 struct dm_test_parent_data *parent_data = dev_get_parent_priv(dev); in testbus_child_pre_probe()
55 static int testbus_child_pre_probe_uclass(struct udevice *dev) in testbus_child_pre_probe_uclass() argument
57 struct dm_test_priv *priv = dev_get_priv(dev); in testbus_child_pre_probe_uclass()
64 static int testbus_child_post_remove(struct udevice *dev) in testbus_child_post_remove() argument
66 struct dm_test_parent_data *parent_data = dev_get_parent_priv(dev); in testbus_child_post_remove()
[all …]
H A Dtest-fdt.c22 static int testfdt_drv_ping(struct udevice *dev, int pingval, int *pingret) in testfdt_drv_ping() argument
24 const struct dm_test_pdata *pdata = dev->platdata; in testfdt_drv_ping()
25 struct dm_test_priv *priv = dev_get_priv(dev); in testfdt_drv_ping()
37 static int testfdt_ofdata_to_platdata(struct udevice *dev) in testfdt_ofdata_to_platdata() argument
39 struct dm_test_pdata *pdata = dev_get_platdata(dev); in testfdt_ofdata_to_platdata()
41 pdata->ping_add = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), in testfdt_ofdata_to_platdata()
43 pdata->base = fdtdec_get_addr(gd->fdt_blob, dev_of_offset(dev), in testfdt_ofdata_to_platdata()
49 static int testfdt_drv_probe(struct udevice *dev) in testfdt_drv_probe() argument
51 struct dm_test_priv *priv = dev_get_priv(dev); in testfdt_drv_probe()
87 int testfdt_ping(struct udevice *dev, int pingval, int *pingret) in testfdt_ping() argument
[all …]
/rk3399_rockchip-uboot/drivers/power/regulator/
H A Dregulator-uclass.c17 int regulator_mode(struct udevice *dev, struct dm_regulator_mode **modep) in regulator_mode() argument
23 uc_pdata = dev_get_uclass_platdata(dev); in regulator_mode()
31 int regulator_get_value(struct udevice *dev) in regulator_get_value() argument
33 const struct dm_regulator_ops *ops = dev_get_driver_ops(dev); in regulator_get_value()
38 return ops->get_value(dev); in regulator_get_value()
41 int regulator_set_value(struct udevice *dev, int uV) in regulator_set_value() argument
43 const struct dm_regulator_ops *ops = dev_get_driver_ops(dev); in regulator_set_value()
48 uc_pdata = dev_get_uclass_platdata(dev); in regulator_set_value()
60 old_uV = ops->get_value(dev); in regulator_set_value()
65 ret = ops->set_value(dev, uV); in regulator_set_value()
[all …]
/rk3399_rockchip-uboot/common/
H A Dusb.c60 struct usb_device *dev; in usb_init() local
97 ret = usb_alloc_new_device(ctrl, &dev); in usb_init()
105 ret = usb_new_device(dev); in usb_init()
107 usb_free_device(dev->controller); in usb_init()
200 int usb_int_msg(struct usb_device *dev, unsigned long pipe, in usb_int_msg() argument
203 return submit_int_msg(dev, pipe, buffer, transfer_len, interval, in usb_int_msg()
216 int usb_control_msg(struct usb_device *dev, unsigned int pipe, in usb_control_msg() argument
238 dev->status = USB_ST_NOT_PROC; /*not yet processed */ in usb_control_msg()
240 err = submit_control_msg(dev, pipe, data, size, setup_packet); in usb_control_msg()
252 if (!((volatile unsigned long)dev->status & USB_ST_NOT_PROC)) in usb_control_msg()
[all …]
/rk3399_rockchip-uboot/drivers/power/fuel_gauge/
H A Dfuel_gauge_uclass.c13 int fuel_gauge_capability(struct udevice *dev) in fuel_gauge_capability() argument
15 const struct dm_fuel_gauge_ops *ops = dev_get_driver_ops(dev); in fuel_gauge_capability()
20 return ops->capability(dev); in fuel_gauge_capability()
23 int fuel_gauge_bat_is_exist(struct udevice *dev) in fuel_gauge_bat_is_exist() argument
25 const struct dm_fuel_gauge_ops *ops = dev_get_driver_ops(dev); in fuel_gauge_bat_is_exist()
30 return ops->bat_is_exist(dev); in fuel_gauge_bat_is_exist()
33 int fuel_gauge_get_current(struct udevice *dev) in fuel_gauge_get_current() argument
35 const struct dm_fuel_gauge_ops *ops = dev_get_driver_ops(dev); in fuel_gauge_get_current()
40 return ops->get_current(dev); in fuel_gauge_get_current()
43 int fuel_gauge_get_voltage(struct udevice *dev) in fuel_gauge_get_voltage() argument
[all …]
/rk3399_rockchip-uboot/arch/x86/cpu/ivybridge/
H A Dsata.c19 static void common_sata_init(struct udevice *dev, unsigned int port_map) in common_sata_init() argument
26 dm_pci_write_config32(dev, IDE_CONFIG, reg32); in common_sata_init()
29 dm_pci_read_config16(dev, 0x92, &reg16); in common_sata_init()
32 dm_pci_write_config16(dev, 0x92, reg16); in common_sata_init()
36 dm_pci_write_config32(dev, 0x94, ((port_map ^ 0x3f) << 24) | 0x183); in common_sata_init()
39 static void bd82x6x_sata_init(struct udevice *dev, struct udevice *pch) in bd82x6x_sata_init() argument
43 int node = dev_of_offset(dev); in bd82x6x_sata_init()
62 dm_pci_write_config16(dev, IDE_TIM_PRI, IDE_DECODE_ENABLE | in bd82x6x_sata_init()
65 dm_pci_write_config16(dev, IDE_TIM_SEC, IDE_DECODE_ENABLE | in bd82x6x_sata_init()
69 dm_pci_write_config16(dev, IDE_SDMA_CNT, IDE_PSDE0); in bd82x6x_sata_init()
[all …]
/rk3399_rockchip-uboot/net/
H A Deth_legacy.c47 void eth_set_dev(struct eth_device *dev) in eth_set_dev() argument
49 eth_current = dev; in eth_set_dev()
54 struct eth_device *dev, *target_dev; in eth_get_dev_by_name() local
61 dev = eth_devices; in eth_get_dev_by_name()
64 if (strcmp(devname, dev->name) == 0) { in eth_get_dev_by_name()
65 target_dev = dev; in eth_get_dev_by_name()
68 dev = dev->next; in eth_get_dev_by_name()
69 } while (dev != eth_devices); in eth_get_dev_by_name()
76 struct eth_device *dev, *target_dev; in eth_get_dev_by_index() local
81 dev = eth_devices; in eth_get_dev_by_index()
[all …]
/rk3399_rockchip-uboot/drivers/adc/
H A Dadc-uclass.c30 static int check_channel(struct udevice *dev, int value, bool number_or_mask, in check_channel() argument
33 struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev); in check_channel()
45 __FILE__, caller_function, dev->name); in check_channel()
51 static int adc_supply_enable(struct udevice *dev) in adc_supply_enable() argument
53 struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev); in adc_supply_enable()
68 pr_err("%s: can't enable %s-supply!", dev->name, supply_type); in adc_supply_enable()
73 static inline int adc_supply_enable(struct udevice *dev) { return 0; } in adc_supply_enable() argument
76 int adc_data_mask(struct udevice *dev, unsigned int *data_mask) in adc_data_mask() argument
78 struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev); in adc_data_mask()
87 int adc_stop(struct udevice *dev) in adc_stop() argument
[all …]

12345678910>>...77