/external/u-boot/drivers/ata/ |
D | dwc_ahsata.c | 104 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 …]
|
D | ahci.c | 30 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/ |
D | broadwell_i2s.c | 52 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 …]
|
D | tegra_sound.c | 20 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 …]
|
D | samsung_sound.c | 17 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 …]
|
D | rockchip_sound.c | 21 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 …]
|
D | broadwell_sound.c | 24 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()
|
D | sandbox.c | 120 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 …]
|
D | tegra_ahub.c | 164 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()
|
D | sound-uclass.c | 56 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/ |
D | meson_plane.c | 57 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 …]
|
D | meson_vpu.c | 33 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/ |
D | hsdk-creg-gpio.c | 53 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 …]
|
D | gpio-uclass.c | 34 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 …]
|
D | sifive-gpio.c | 18 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 …]
|
D | pcf8575_gpio.c | 129 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()
|
D | pm8916_gpio.c | 191 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()
|
D | sandbox.c | 27 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/ |
D | video-bridge-uclass.c | 35 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/ |
D | virtio-uclass.c | 143 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 …]
|
D | virtio_mmio.c | 169 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/ |
D | simplefb.c | 15 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()
|
D | sandbox_sdl.c | 25 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/ |
D | timer-uclass.c | 38 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/ |
D | lcd_simplefb.c | 26 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()
|