Home
last modified time | relevance | path

Searched refs:uc_priv (Results 1 – 25 of 126) sorted by relevance

123456

/external/u-boot/drivers/ata/
Ddwc_ahsata.c104 static int ahci_setup_oobr(struct ahci_uc_priv *uc_priv, int clk) in ahci_setup_oobr() argument
106 struct sata_host_regs *host_mmio = uc_priv->mmio_base; in ahci_setup_oobr()
114 static int ahci_host_init(struct ahci_uc_priv *uc_priv) in ahci_host_init() argument
119 struct sata_host_regs *host_mmio = uc_priv->mmio_base; in ahci_host_init()
141 ahci_setup_oobr(uc_priv, 0); in ahci_host_init()
154 uc_priv->cap = readl(&host_mmio->cap); in ahci_host_init()
155 uc_priv->port_map = readl(&host_mmio->pi); in ahci_host_init()
158 uc_priv->n_ports = (uc_priv->cap & SATA_HOST_CAP_NP_MASK) + 1; in ahci_host_init()
161 uc_priv->cap, uc_priv->port_map, uc_priv->n_ports); in ahci_host_init()
163 for (i = 0; i < uc_priv->n_ports; i++) { in ahci_host_init()
[all …]
Dahci.c30 static int ata_io_flush(struct ahci_uc_priv *uc_priv, u8 port);
109 int __weak ahci_link_up(struct ahci_uc_priv *uc_priv, u8 port) in ahci_link_up() argument
113 void __iomem *port_mmio = uc_priv->port[port].port_mmio; in ahci_link_up()
166 static int ahci_host_init(struct ahci_uc_priv *uc_priv) in ahci_host_init() argument
170 struct udevice *dev = uc_priv->dev; in ahci_host_init()
173 pci_dev_t pdev = uc_priv->dev; in ahci_host_init()
178 void __iomem *mmio = uc_priv->mmio_base; in ahci_host_init()
190 ret = ahci_reset(uc_priv->mmio_base); in ahci_host_init()
217 uc_priv->cap = readl(mmio + HOST_CAP); in ahci_host_init()
218 uc_priv->port_map = readl(mmio + HOST_PORTS_IMPL); in ahci_host_init()
[all …]
/external/u-boot/drivers/sound/
Dbroadwell_i2s.c52 static void init_shim_clkctl(struct i2s_uc_priv *uc_priv, in init_shim_clkctl() argument
62 if (uc_priv->id) in init_shim_clkctl()
70 static void init_sscr0(struct i2s_uc_priv *uc_priv, in init_sscr0() argument
77 if (uc_priv->bitspersample > 16) in init_sscr0()
78 sscr0 = (uc_priv->bitspersample - 16 - 1) << SSP_SSC0_DSS_SHIFT in init_sscr0()
81 sscr0 = (uc_priv->bitspersample - 1) << SSP_SSC0_DSS_SHIFT; in init_sscr0()
94 scale = uc_priv->audio_pll_clk / uc_priv->samplingrate / uc_priv->bfs; in init_sscr0()
170 struct i2s_uc_priv *uc_priv = dev_get_uclass_priv(dev); in bdw_i2s_init() local
174 init_shim_clkctl(uc_priv, priv); in bdw_i2s_init()
175 init_sscr0(uc_priv, priv); in bdw_i2s_init()
[all …]
Dtegra_sound.c20 struct sound_uc_priv *uc_priv = dev_get_uclass_priv(dev); in tegra_sound_setup() local
21 struct i2s_uc_priv *i2c_priv = dev_get_uclass_priv(uc_priv->i2s); in tegra_sound_setup()
24 if (uc_priv->setup_done) in tegra_sound_setup()
26 ret = audio_codec_set_params(uc_priv->codec, i2c_priv->id, in tegra_sound_setup()
33 uc_priv->setup_done = true; in tegra_sound_setup()
40 struct sound_uc_priv *uc_priv = dev_get_uclass_priv(dev); in tegra_sound_play() local
42 return i2s_tx_data(uc_priv->i2s, data, data_size); in tegra_sound_play()
47 struct sound_uc_priv *uc_priv = dev_get_uclass_priv(dev); in tegra_sound_probe() local
57 &uc_priv->codec); in tegra_sound_probe()
64 &uc_priv->i2s); in tegra_sound_probe()
[all …]
Dsamsung_sound.c17 struct sound_uc_priv *uc_priv = dev_get_uclass_priv(dev); in samsung_sound_setup() local
18 struct i2s_uc_priv *i2c_priv = dev_get_uclass_priv(uc_priv->i2s); in samsung_sound_setup()
21 if (uc_priv->setup_done) in samsung_sound_setup()
23 ret = audio_codec_set_params(uc_priv->codec, i2c_priv->id, in samsung_sound_setup()
30 uc_priv->setup_done = true; in samsung_sound_setup()
37 struct sound_uc_priv *uc_priv = dev_get_uclass_priv(dev); in samsung_sound_play() local
39 return i2s_tx_data(uc_priv->i2s, data, data_size); in samsung_sound_play()
44 struct sound_uc_priv *uc_priv = dev_get_uclass_priv(dev); in samsung_sound_probe() local
59 &uc_priv->codec); in samsung_sound_probe()
75 ret = uclass_get_device_by_ofnode(UCLASS_I2S, args.node, &uc_priv->i2s); in samsung_sound_probe()
[all …]
Drockchip_sound.c21 struct sound_uc_priv *uc_priv = dev_get_uclass_priv(dev); in rockchip_sound_setup() local
22 struct i2s_uc_priv *i2c_priv = dev_get_uclass_priv(uc_priv->i2s); in rockchip_sound_setup()
25 if (uc_priv->setup_done) in rockchip_sound_setup()
27 ret = audio_codec_set_params(uc_priv->codec, i2c_priv->id, in rockchip_sound_setup()
34 uc_priv->setup_done = true; in rockchip_sound_setup()
41 struct sound_uc_priv *uc_priv = dev_get_uclass_priv(dev); in rockchip_sound_play() local
43 return i2s_tx_data(uc_priv->i2s, data, data_size); in rockchip_sound_play()
48 struct sound_uc_priv *uc_priv = dev_get_uclass_priv(dev); in rockchip_sound_probe() local
66 ret = uclass_get_device_by_ofnode(UCLASS_I2S, args.node, &uc_priv->i2s); in rockchip_sound_probe()
84 &uc_priv->codec); in rockchip_sound_probe()
[all …]
Dbroadwell_sound.c24 struct sound_uc_priv *uc_priv = dev_get_uclass_priv(dev); in broadwell_sound_setup() local
25 struct i2s_uc_priv *i2c_priv = dev_get_uclass_priv(uc_priv->i2s); in broadwell_sound_setup()
28 if (uc_priv->setup_done) in broadwell_sound_setup()
30 ret = audio_codec_set_params(uc_priv->codec, i2c_priv->id, in broadwell_sound_setup()
37 uc_priv->setup_done = true; in broadwell_sound_setup()
44 struct sound_uc_priv *uc_priv = dev_get_uclass_priv(dev); in broadwell_sound_play() local
46 return i2s_tx_data(uc_priv->i2s, data, data_size); in broadwell_sound_play()
Dsandbox.c120 struct i2s_uc_priv *uc_priv = dev_get_uclass_priv(dev); in sandbox_i2s_probe() local
124 uc_priv->rfs = 256; in sandbox_i2s_probe()
125 uc_priv->bfs = 32; in sandbox_i2s_probe()
126 uc_priv->audio_pll_clk = 192000000; in sandbox_i2s_probe()
127 uc_priv->samplingrate = 48000; in sandbox_i2s_probe()
128 uc_priv->bitspersample = 16; in sandbox_i2s_probe()
129 uc_priv->channels = 2; in sandbox_i2s_probe()
130 uc_priv->id = 1; in sandbox_i2s_probe()
136 } else if (sandbox_sdl_sound_init(uc_priv->samplingrate, in sandbox_i2s_probe()
137 uc_priv->channels)) { in sandbox_i2s_probe()
[all …]
Dtegra_ahub.c164 struct i2s_uc_priv *uc_priv = dev_get_uclass_priv(priv->i2s); in tegra_ahub_enable() local
182 cif_ctrl = tegra_ahub_get_cif(true, uc_priv->channels, in tegra_ahub_enable()
183 uc_priv->bitspersample, fifo_threshold); in tegra_ahub_enable()
186 cif_ctrl = tegra_ahub_get_cif(false, uc_priv->channels, in tegra_ahub_enable()
187 uc_priv->bitspersample, fifo_threshold); in tegra_ahub_enable()
191 ret = tegra_ahub_xbar_enable_i2s(priv->xbar_regs, uc_priv->id); in tegra_ahub_enable()
195 uc_priv->channels, uc_priv->bitspersample, cif_ctrl, in tegra_ahub_enable()
196 fifo_threshold, uc_priv->id); in tegra_ahub_enable()
Dsound-uclass.c56 struct sound_uc_priv *uc_priv = dev_get_uclass_priv(dev); in sound_beep() local
78 i2s_uc_priv = dev_get_uclass_priv(uc_priv->i2s); in sound_beep()
108 struct sound_uc_priv *uc_priv = dev_get_uclass_priv(dev); in sound_find_codec_i2s() local
126 &uc_priv->codec); in sound_find_codec_i2s()
144 ret = uclass_get_device_by_ofnode(UCLASS_I2S, args.node, &uc_priv->i2s); in sound_find_codec_i2s()
150 uc_priv->codec->name, uc_priv->i2s->name); in sound_find_codec_i2s()
/external/u-boot/drivers/video/meson/
Dmeson_plane.c57 struct video_priv *uc_priv) in meson_vpp_setup_interlace_vscaler_osd1() argument
63 writel(((uc_priv->xsize - 1) << 16) | (uc_priv->ysize - 1), in meson_vpp_setup_interlace_vscaler_osd1()
66 writel((0 << 16) | uc_priv->xsize, in meson_vpp_setup_interlace_vscaler_osd1()
68 writel(((0 >> 1) << 16) | (uc_priv->ysize >> 1), in meson_vpp_setup_interlace_vscaler_osd1()
98 struct video_priv *uc_priv = dev_get_uclass_priv(dev); in meson_vpu_setup_plane() local
107 dest_x2 = src_x2 = uc_priv->xsize; in meson_vpu_setup_plane()
109 dest_y2 = src_y2 = uc_priv->ysize; in meson_vpu_setup_plane()
117 writel(uc_priv->xsize | in meson_vpu_setup_plane()
118 uc_priv->ysize << 16, in meson_vpu_setup_plane()
122 (uc_priv->xsize - 1), in meson_vpu_setup_plane()
[all …]
Dmeson_vpu.c33 struct video_priv *uc_priv = dev_get_uclass_priv(dev); in meson_vpu_setup_mode() local
45 uc_priv->xsize = timing.hactive.typ; in meson_vpu_setup_mode()
46 uc_priv->ysize = timing.vactive.typ; in meson_vpu_setup_mode()
56 uc_priv->xsize = 720; in meson_vpu_setup_mode()
57 uc_priv->ysize = 576; in meson_vpu_setup_mode()
60 uc_priv->bpix = VPU_MAX_LOG2_BPP; in meson_vpu_setup_mode()
63 meson_fb.xsize = uc_priv->xsize; in meson_vpu_setup_mode()
64 meson_fb.ysize = uc_priv->ysize; in meson_vpu_setup_mode()
/external/u-boot/drivers/gpio/
Dhsdk-creg-gpio.c53 struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); in hsdk_creg_gpio_direction_input() local
55 pr_err("%s can't be used as input!\n", uc_priv->bank_name); in hsdk_creg_gpio_direction_input()
79 struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); in hsdk_creg_gpio_probe() local
92 uc_priv->bank_name = dev_read_string(dev, "gpio-bank-name"); in hsdk_creg_gpio_probe()
93 if (!uc_priv->bank_name) in hsdk_creg_gpio_probe()
94 uc_priv->bank_name = dev_read_name(dev); in hsdk_creg_gpio_probe()
98 uc_priv->bank_name); in hsdk_creg_gpio_probe()
105 uc_priv->bank_name); in hsdk_creg_gpio_probe()
112 uc_priv->bank_name, gpio_count * bit_per_gpio + shift); in hsdk_creg_gpio_probe()
119 uc_priv->bank_name, GENMASK(bit_per_gpio - 1, 0)); in hsdk_creg_gpio_probe()
[all …]
Dgpio-uclass.c34 struct gpio_dev_priv *uc_priv; in gpio_to_device() local
41 uc_priv = dev_get_uclass_priv(dev); in gpio_to_device()
42 if (gpio >= uc_priv->gpio_base && in gpio_to_device()
43 gpio < uc_priv->gpio_base + uc_priv->gpio_count) { in gpio_to_device()
45 desc->offset = gpio - uc_priv->gpio_base; in gpio_to_device()
57 struct gpio_dev_priv *uc_priv = NULL; in dm_gpio_lookup_name() local
69 uc_priv = dev_get_uclass_priv(dev); in dm_gpio_lookup_name()
71 offset = numeric - uc_priv->gpio_base; in dm_gpio_lookup_name()
73 if (offset < uc_priv->gpio_count) in dm_gpio_lookup_name()
77 len = uc_priv->bank_name ? strlen(uc_priv->bank_name) : 0; in dm_gpio_lookup_name()
[all …]
Dsifive-gpio.c18 struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); in sifive_gpio_probe() local
25 uc_priv->bank_name = str; in sifive_gpio_probe()
31 uc_priv->gpio_count = dev_read_u32_default(dev, "ngpios", NR_GPIOS); in sifive_gpio_probe()
52 struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); in sifive_gpio_direction_input() local
54 if (offset > uc_priv->gpio_count) in sifive_gpio_direction_input()
68 struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); in sifive_gpio_direction_output() local
70 if (offset > uc_priv->gpio_count) in sifive_gpio_direction_output()
86 struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); in sifive_gpio_get_value() local
90 if (offset > uc_priv->gpio_count) in sifive_gpio_get_value()
107 struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); in sifive_gpio_set_value() local
[all …]
Dpcf8575_gpio.c129 struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); in pcf8575_ofdata_platdata() local
133 uc_priv->gpio_count = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), in pcf8575_ofdata_platdata()
135 uc_priv->bank_name = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), in pcf8575_ofdata_platdata()
137 if (!uc_priv->bank_name) in pcf8575_ofdata_platdata()
138 uc_priv->bank_name = fdt_get_name(gd->fdt_blob, in pcf8575_ofdata_platdata()
150 struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); in pcf8575_gpio_probe() local
153 uc_priv->bank_name, uc_priv->gpio_count); in pcf8575_gpio_probe()
Dpm8916_gpio.c191 struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); in pm8916_gpio_ofdata_to_platdata() local
193 uc_priv->gpio_count = dev_read_u32_default(dev, "gpio-count", 0); in pm8916_gpio_ofdata_to_platdata()
194 uc_priv->bank_name = dev_read_string(dev, "gpio-bank-name"); in pm8916_gpio_ofdata_to_platdata()
195 if (uc_priv->bank_name == NULL) in pm8916_gpio_ofdata_to_platdata()
196 uc_priv->bank_name = "pm8916"; in pm8916_gpio_ofdata_to_platdata()
276 struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); in pm8941_pwrkey_ofdata_to_platdata() local
278 uc_priv->gpio_count = 2; in pm8941_pwrkey_ofdata_to_platdata()
279 uc_priv->bank_name = dev_read_string(dev, "gpio-bank-name"); in pm8941_pwrkey_ofdata_to_platdata()
280 if (uc_priv->bank_name == NULL) in pm8941_pwrkey_ofdata_to_platdata()
281 uc_priv->bank_name = "pm8916_key"; in pm8941_pwrkey_ofdata_to_platdata()
Dsandbox.c27 struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); in get_gpio_flags() local
30 if (offset >= uc_priv->gpio_count) { in get_gpio_flags()
197 struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); in sandbox_gpio_ofdata_to_platdata() local
199 uc_priv->gpio_count = dev_read_u32_default(dev, "sandbox,gpio-count", in sandbox_gpio_ofdata_to_platdata()
201 uc_priv->bank_name = dev_read_string(dev, "gpio-bank-name"); in sandbox_gpio_ofdata_to_platdata()
208 struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); in gpio_sandbox_probe() local
212 uc_priv->gpio_count = CONFIG_SANDBOX_GPIO_COUNT; in gpio_sandbox_probe()
214 dev->priv = calloc(sizeof(struct gpio_state), uc_priv->gpio_count); in gpio_sandbox_probe()
/external/u-boot/drivers/video/bridge/
Dvideo-bridge-uclass.c35 struct video_bridge_priv *uc_priv = dev_get_uclass_priv(dev); in video_bridge_check_attached() local
40 ret = dm_gpio_get_value(&uc_priv->hotplug); in video_bridge_check_attached()
59 struct video_bridge_priv *uc_priv = dev_get_uclass_priv(dev); in video_bridge_pre_probe() local
64 &uc_priv->sleep, GPIOD_IS_OUT); in video_bridge_pre_probe()
79 ret = gpio_request_by_name(dev, "reset-gpios", 0, &uc_priv->reset, in video_bridge_pre_probe()
95 ret = gpio_request_by_name(dev, "hotplug-gpios", 0, &uc_priv->hotplug, in video_bridge_pre_probe()
108 struct video_bridge_priv *uc_priv = dev_get_uclass_priv(dev); in video_bridge_set_active() local
112 if (uc_priv->sleep.dev) { in video_bridge_set_active()
113 ret = dm_gpio_set_value(&uc_priv->sleep, !active); in video_bridge_set_active()
121 if (uc_priv->reset.dev) { in video_bridge_set_active()
[all …]
/external/u-boot/drivers/virtio/
Dvirtio-uclass.c143 struct virtio_dev_priv *uc_priv = dev_get_uclass_priv(vdev->parent); in virtio_finalize_features() local
151 if (uc_priv->legacy) in virtio_finalize_features()
221 struct virtio_dev_priv *uc_priv = dev_get_uclass_priv(udev); in virtio_uclass_post_probe() local
226 if (uc_priv->device > VIRTIO_ID_MAX_NUM) { in virtio_uclass_post_probe()
228 udev->name, uc_priv->device); in virtio_uclass_post_probe()
232 if (!virtio_drv_name[uc_priv->device]) { in virtio_uclass_post_probe()
239 virtio_drv_name[uc_priv->device], udev->seq); in virtio_uclass_post_probe()
244 ret = device_bind_driver(udev, virtio_drv_name[uc_priv->device], in virtio_uclass_post_probe()
256 INIT_LIST_HEAD(&uc_priv->vqs); in virtio_uclass_post_probe()
271 struct virtio_dev_priv *uc_priv = dev_get_uclass_priv(vdev->parent); in virtio_uclass_child_pre_probe() local
[all …]
Dvirtio_mmio.c169 struct virtio_dev_priv *uc_priv = dev_get_uclass_priv(udev); in virtio_mmio_set_features() local
172 if (priv->version == 2 && uc_priv->legacy) { in virtio_mmio_set_features()
178 writel((u32)(uc_priv->features >> 32), in virtio_mmio_set_features()
182 writel((u32)uc_priv->features, in virtio_mmio_set_features()
296 struct virtio_dev_priv *uc_priv = dev_get_uclass_priv(udev); in virtio_mmio_del_vqs() local
299 list_for_each_entry_safe(vq, n, &uc_priv->vqs, list) in virtio_mmio_del_vqs()
348 struct virtio_dev_priv *uc_priv = dev_get_uclass_priv(udev); in virtio_mmio_probe() local
367 uc_priv->device = readl(priv->base + VIRTIO_MMIO_DEVICE_ID); in virtio_mmio_probe()
368 if (uc_priv->device == 0) { in virtio_mmio_probe()
375 uc_priv->vendor = readl(priv->base + VIRTIO_MMIO_VENDOR_ID); in virtio_mmio_probe()
[all …]
/external/u-boot/drivers/video/
Dsimplefb.c15 struct video_priv *uc_priv = dev_get_uclass_priv(dev); in simple_video_probe() local
42 uc_priv->xsize = fdtdec_get_uint(blob, node, "width", 0); in simple_video_probe()
43 uc_priv->ysize = fdtdec_get_uint(blob, node, "height", 0); in simple_video_probe()
44 uc_priv->rot = 0; in simple_video_probe()
47 debug("%s: %dx%d@%s\n", __func__, uc_priv->xsize, uc_priv->ysize, format); in simple_video_probe()
50 uc_priv->bpix = VIDEO_BPP16; in simple_video_probe()
52 uc_priv->bpix = VIDEO_BPP32; in simple_video_probe()
Dsandbox_sdl.c25 struct video_priv *uc_priv = dev_get_uclass_priv(dev); in sandbox_sdl_probe() local
33 uc_priv->xsize = plat->xres; in sandbox_sdl_probe()
34 uc_priv->ysize = plat->yres; in sandbox_sdl_probe()
35 uc_priv->bpix = plat->bpix; in sandbox_sdl_probe()
36 uc_priv->rot = plat->rot; in sandbox_sdl_probe()
37 uc_priv->vidconsole_drv_name = plat->vidconsole_drv_name; in sandbox_sdl_probe()
38 uc_priv->font_size = plat->font_size; in sandbox_sdl_probe()
/external/u-boot/drivers/timer/
Dtimer-uclass.c38 struct timer_dev_priv *uc_priv = dev->uclass_priv; in timer_get_rate() local
40 return uc_priv->clock_rate; in timer_get_rate()
46 struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev); in timer_pre_probe() local
60 uc_priv->clock_rate = ret; in timer_pre_probe()
62 uc_priv->clock_rate = in timer_pre_probe()
72 struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev); in timer_post_probe() local
74 if (!uc_priv->clock_rate) in timer_post_probe()
/external/u-boot/common/
Dlcd_simplefb.c26 struct video_priv *uc_priv; in lcd_dt_simplefb_configure_node() local
33 uc_priv = dev_get_uclass_priv(dev); in lcd_dt_simplefb_configure_node()
35 xsize = uc_priv->xsize; in lcd_dt_simplefb_configure_node()
36 ysize = uc_priv->ysize; in lcd_dt_simplefb_configure_node()
37 bpix = uc_priv->bpix; in lcd_dt_simplefb_configure_node()

123456