/drivers/net/ethernet/amd/xgbe/ |
D | xgbe-mdio.c | 129 static int xgbe_phy_module_eeprom(struct xgbe_prv_data *pdata, in xgbe_phy_module_eeprom() argument 132 if (!pdata->phy_if.phy_impl.module_eeprom) in xgbe_phy_module_eeprom() 135 return pdata->phy_if.phy_impl.module_eeprom(pdata, eeprom, data); in xgbe_phy_module_eeprom() 138 static int xgbe_phy_module_info(struct xgbe_prv_data *pdata, in xgbe_phy_module_info() argument 141 if (!pdata->phy_if.phy_impl.module_info) in xgbe_phy_module_info() 144 return pdata->phy_if.phy_impl.module_info(pdata, modinfo); in xgbe_phy_module_info() 147 static void xgbe_an37_clear_interrupts(struct xgbe_prv_data *pdata) in xgbe_an37_clear_interrupts() argument 151 reg = XMDIO_READ(pdata, MDIO_MMD_VEND2, MDIO_VEND2_AN_STAT); in xgbe_an37_clear_interrupts() 153 XMDIO_WRITE(pdata, MDIO_MMD_VEND2, MDIO_VEND2_AN_STAT, reg); in xgbe_an37_clear_interrupts() 156 static void xgbe_an37_disable_interrupts(struct xgbe_prv_data *pdata) in xgbe_an37_disable_interrupts() argument [all …]
|
D | xgbe-pci.c | 125 static int xgbe_config_multi_msi(struct xgbe_prv_data *pdata) in xgbe_config_multi_msi() argument 132 vector_count += max(pdata->rx_ring_count, in xgbe_config_multi_msi() 133 pdata->tx_ring_count); in xgbe_config_multi_msi() 135 ret = pci_alloc_irq_vectors(pdata->pcidev, XGBE_MSI_MIN_COUNT, in xgbe_config_multi_msi() 138 dev_info(pdata->dev, "multi MSI/MSI-X enablement failed\n"); in xgbe_config_multi_msi() 142 pdata->isr_as_tasklet = 1; in xgbe_config_multi_msi() 143 pdata->irq_count = ret; in xgbe_config_multi_msi() 145 pdata->dev_irq = pci_irq_vector(pdata->pcidev, 0); in xgbe_config_multi_msi() 146 pdata->ecc_irq = pci_irq_vector(pdata->pcidev, 1); in xgbe_config_multi_msi() 147 pdata->i2c_irq = pci_irq_vector(pdata->pcidev, 2); in xgbe_config_multi_msi() [all …]
|
D | xgbe-main.c | 139 static void xgbe_default_config(struct xgbe_prv_data *pdata) in xgbe_default_config() argument 143 pdata->blen = DMA_SBMR_BLEN_64; in xgbe_default_config() 144 pdata->pbl = DMA_PBL_128; in xgbe_default_config() 145 pdata->aal = 1; in xgbe_default_config() 146 pdata->rd_osr_limit = 8; in xgbe_default_config() 147 pdata->wr_osr_limit = 8; in xgbe_default_config() 148 pdata->tx_sf_mode = MTL_TSF_ENABLE; in xgbe_default_config() 149 pdata->tx_threshold = MTL_TX_THRESHOLD_64; in xgbe_default_config() 150 pdata->tx_osp_mode = DMA_OSP_ENABLE; in xgbe_default_config() 151 pdata->rx_sf_mode = MTL_RSF_DISABLE; in xgbe_default_config() [all …]
|
D | xgbe-dev.c | 127 static inline unsigned int xgbe_get_max_frame(struct xgbe_prv_data *pdata) in xgbe_get_max_frame() argument 129 return pdata->netdev->mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN; in xgbe_get_max_frame() 132 static unsigned int xgbe_usec_to_riwt(struct xgbe_prv_data *pdata, in xgbe_usec_to_riwt() argument 140 rate = pdata->sysclk_rate; in xgbe_usec_to_riwt() 155 static unsigned int xgbe_riwt_to_usec(struct xgbe_prv_data *pdata, in xgbe_riwt_to_usec() argument 163 rate = pdata->sysclk_rate; in xgbe_riwt_to_usec() 178 static int xgbe_config_pbl_val(struct xgbe_prv_data *pdata) in xgbe_config_pbl_val() argument 184 pbl = pdata->pbl; in xgbe_config_pbl_val() 186 if (pdata->pbl > 32) { in xgbe_config_pbl_val() 191 for (i = 0; i < pdata->channel_count; i++) { in xgbe_config_pbl_val() [all …]
|
D | xgbe-i2c.c | 144 static int xgbe_i2c_abort(struct xgbe_prv_data *pdata) in xgbe_i2c_abort() argument 149 XI2C_IOWRITE_BITS(pdata, IC_ENABLE, EN, 1); in xgbe_i2c_abort() 152 XI2C_IOWRITE_BITS(pdata, IC_ENABLE, ABORT, 1); in xgbe_i2c_abort() 155 if (!XI2C_IOREAD_BITS(pdata, IC_ENABLE, ABORT)) in xgbe_i2c_abort() 164 static int xgbe_i2c_set_enable(struct xgbe_prv_data *pdata, bool enable) in xgbe_i2c_set_enable() argument 170 XI2C_IOWRITE_BITS(pdata, IC_ENABLE, EN, mode); in xgbe_i2c_set_enable() 171 if (XI2C_IOREAD_BITS(pdata, IC_ENABLE_STATUS, EN) == mode) in xgbe_i2c_set_enable() 180 static int xgbe_i2c_disable(struct xgbe_prv_data *pdata) in xgbe_i2c_disable() argument 184 ret = xgbe_i2c_set_enable(pdata, false); in xgbe_i2c_disable() 187 ret = xgbe_i2c_abort(pdata); in xgbe_i2c_disable() [all …]
|
D | xgbe-drv.c | 172 static void xgbe_free_channels(struct xgbe_prv_data *pdata) in xgbe_free_channels() argument 176 for (i = 0; i < ARRAY_SIZE(pdata->channel); i++) { in xgbe_free_channels() 177 if (!pdata->channel[i]) in xgbe_free_channels() 180 kfree(pdata->channel[i]->rx_ring); in xgbe_free_channels() 181 kfree(pdata->channel[i]->tx_ring); in xgbe_free_channels() 182 kfree(pdata->channel[i]); in xgbe_free_channels() 184 pdata->channel[i] = NULL; in xgbe_free_channels() 187 pdata->channel_count = 0; in xgbe_free_channels() 190 static int xgbe_alloc_channels(struct xgbe_prv_data *pdata) in xgbe_alloc_channels() argument 198 count = max_t(unsigned int, pdata->tx_ring_count, pdata->rx_ring_count); in xgbe_alloc_channels() [all …]
|
D | xgbe-platform.c | 140 static struct xgbe_version_data *xgbe_acpi_vdata(struct xgbe_prv_data *pdata) in xgbe_acpi_vdata() argument 144 id = acpi_match_device(xgbe_acpi_match, pdata->dev); in xgbe_acpi_vdata() 149 static int xgbe_acpi_support(struct xgbe_prv_data *pdata) in xgbe_acpi_support() argument 151 struct device *dev = pdata->dev; in xgbe_acpi_support() 162 pdata->sysclk_rate = property; in xgbe_acpi_support() 171 pdata->ptpclk_rate = property; in xgbe_acpi_support() 176 static struct xgbe_version_data *xgbe_acpi_vdata(struct xgbe_prv_data *pdata) in xgbe_acpi_vdata() argument 181 static int xgbe_acpi_support(struct xgbe_prv_data *pdata) in xgbe_acpi_support() argument 190 static struct xgbe_version_data *xgbe_of_vdata(struct xgbe_prv_data *pdata) in xgbe_of_vdata() argument 194 id = of_match_device(xgbe_of_match, pdata->dev); in xgbe_of_vdata() [all …]
|
D | xgbe-phy-v1.c | 222 static void xgbe_phy_kr_training_pre(struct xgbe_prv_data *pdata) in xgbe_phy_kr_training_pre() argument 224 XSIR0_IOWRITE_BITS(pdata, SIR0_KR_RT_1, RESET, 1); in xgbe_phy_kr_training_pre() 227 static void xgbe_phy_kr_training_post(struct xgbe_prv_data *pdata) in xgbe_phy_kr_training_post() argument 229 XSIR0_IOWRITE_BITS(pdata, SIR0_KR_RT_1, RESET, 0); in xgbe_phy_kr_training_post() 232 static enum xgbe_mode xgbe_phy_an_outcome(struct xgbe_prv_data *pdata) in xgbe_phy_an_outcome() argument 234 struct ethtool_link_ksettings *lks = &pdata->phy.lks; in xgbe_phy_an_outcome() 235 struct xgbe_phy_data *phy_data = pdata->phy_data; in xgbe_phy_an_outcome() 243 ad_reg = XMDIO_READ(pdata, MDIO_MMD_AN, MDIO_AN_ADVERTISE); in xgbe_phy_an_outcome() 244 lp_reg = XMDIO_READ(pdata, MDIO_MMD_AN, MDIO_AN_LPA); in xgbe_phy_an_outcome() 250 if (pdata->phy.pause_autoneg) { in xgbe_phy_an_outcome() [all …]
|
D | xgbe-phy-v2.c | 389 static enum xgbe_an_mode xgbe_phy_an_mode(struct xgbe_prv_data *pdata); 391 static int xgbe_phy_i2c_xfer(struct xgbe_prv_data *pdata, in xgbe_phy_i2c_xfer() argument 394 return pdata->i2c_if.i2c_xfer(pdata, i2c_op); in xgbe_phy_i2c_xfer() 397 static int xgbe_phy_redrv_write(struct xgbe_prv_data *pdata, unsigned int reg, in xgbe_phy_redrv_write() argument 400 struct xgbe_phy_data *phy_data = pdata->phy_data; in xgbe_phy_redrv_write() 428 ret = xgbe_phy_i2c_xfer(pdata, &i2c_op); in xgbe_phy_redrv_write() 442 ret = xgbe_phy_i2c_xfer(pdata, &i2c_op); in xgbe_phy_redrv_write() 451 netif_dbg(pdata, drv, pdata->netdev, in xgbe_phy_redrv_write() 459 static int xgbe_phy_i2c_write(struct xgbe_prv_data *pdata, unsigned int target, in xgbe_phy_i2c_write() argument 472 ret = xgbe_phy_i2c_xfer(pdata, &i2c_op); in xgbe_phy_i2c_write() [all …]
|
D | xgbe-debugfs.c | 177 struct xgbe_prv_data *pdata = filp->private_data; in xgmac_reg_addr_read() local 179 return xgbe_common_read(buffer, count, ppos, pdata->debugfs_xgmac_reg); in xgmac_reg_addr_read() 186 struct xgbe_prv_data *pdata = filp->private_data; in xgmac_reg_addr_write() local 189 &pdata->debugfs_xgmac_reg); in xgmac_reg_addr_write() 195 struct xgbe_prv_data *pdata = filp->private_data; in xgmac_reg_value_read() local 198 value = XGMAC_IOREAD(pdata, pdata->debugfs_xgmac_reg); in xgmac_reg_value_read() 207 struct xgbe_prv_data *pdata = filp->private_data; in xgmac_reg_value_write() local 215 XGMAC_IOWRITE(pdata, pdata->debugfs_xgmac_reg, value); in xgmac_reg_value_write() 237 struct xgbe_prv_data *pdata = filp->private_data; in xpcs_mmd_read() local 239 return xgbe_common_read(buffer, count, ppos, pdata->debugfs_xpcs_mmd); in xpcs_mmd_read() [all …]
|
/drivers/net/ethernet/smsc/ |
D | smsc911x.c | 76 u32 (*reg_read)(struct smsc911x_data *pdata, u32 reg); 77 void (*reg_write)(struct smsc911x_data *pdata, u32 reg, u32 val); 78 void (*rx_readfifo)(struct smsc911x_data *pdata, 80 void (*tx_writefifo)(struct smsc911x_data *pdata, 146 #define __smsc_shift(pdata, reg) ((reg) << ((pdata)->config.shift)) argument 148 static inline u32 __smsc911x_reg_read(struct smsc911x_data *pdata, u32 reg) in __smsc911x_reg_read() argument 150 if (pdata->config.flags & SMSC911X_USE_32BIT) in __smsc911x_reg_read() 151 return readl(pdata->ioaddr + reg); in __smsc911x_reg_read() 153 if (pdata->config.flags & SMSC911X_USE_16BIT) in __smsc911x_reg_read() 154 return ((readw(pdata->ioaddr + reg) & 0xFFFF) | in __smsc911x_reg_read() [all …]
|
/drivers/gpu/drm/bridge/ |
D | ti-sn65dsi86.c | 177 static void ti_sn_bridge_write_u16(struct ti_sn_bridge *pdata, in ti_sn_bridge_write_u16() argument 180 regmap_write(pdata->regmap, reg, val & 0xFF); in ti_sn_bridge_write_u16() 181 regmap_write(pdata->regmap, reg + 1, val >> 8); in ti_sn_bridge_write_u16() 186 struct ti_sn_bridge *pdata = dev_get_drvdata(dev); in ti_sn_bridge_resume() local 189 ret = regulator_bulk_enable(SN_REGULATOR_SUPPLY_NUM, pdata->supplies); in ti_sn_bridge_resume() 195 gpiod_set_value(pdata->enable_gpio, 1); in ti_sn_bridge_resume() 202 struct ti_sn_bridge *pdata = dev_get_drvdata(dev); in ti_sn_bridge_suspend() local 205 gpiod_set_value(pdata->enable_gpio, 0); in ti_sn_bridge_suspend() 207 ret = regulator_bulk_disable(SN_REGULATOR_SUPPLY_NUM, pdata->supplies); in ti_sn_bridge_suspend() 222 struct ti_sn_bridge *pdata = s->private; in status_show() local [all …]
|
/drivers/net/ethernet/apm/xgene/ |
D | xgene_enet_xgmac.c | 15 static void xgene_enet_wr_csr(struct xgene_enet_pdata *pdata, in xgene_enet_wr_csr() argument 18 void __iomem *addr = pdata->eth_csr_addr + offset; in xgene_enet_wr_csr() 23 static void xgene_enet_wr_ring_if(struct xgene_enet_pdata *pdata, in xgene_enet_wr_ring_if() argument 26 void __iomem *addr = pdata->eth_ring_if_addr + offset; in xgene_enet_wr_ring_if() 31 static void xgene_enet_wr_diag_csr(struct xgene_enet_pdata *pdata, in xgene_enet_wr_diag_csr() argument 34 void __iomem *addr = pdata->eth_diag_csr_addr + offset; in xgene_enet_wr_diag_csr() 62 static void xgene_enet_wr_pcs(struct xgene_enet_pdata *pdata, in xgene_enet_wr_pcs() argument 67 addr = pdata->pcs_addr + PCS_ADDR_REG_OFFSET; in xgene_enet_wr_pcs() 68 wr = pdata->pcs_addr + PCS_WRITE_REG_OFFSET; in xgene_enet_wr_pcs() 69 cmd = pdata->pcs_addr + PCS_COMMAND_REG_OFFSET; in xgene_enet_wr_pcs() [all …]
|
D | xgene_enet_hw.c | 63 struct xgene_enet_pdata *pdata = netdev_priv(ring->ndev); in xgene_enet_ring_wr32() local 65 iowrite32(data, pdata->ring_csr_addr + offset); in xgene_enet_ring_wr32() 71 struct xgene_enet_pdata *pdata = netdev_priv(ring->ndev); in xgene_enet_ring_rd32() local 73 *data = ioread32(pdata->ring_csr_addr + offset); in xgene_enet_ring_rd32() 78 struct xgene_enet_pdata *pdata = netdev_priv(ring->ndev); in xgene_enet_write_ring_state() local 82 for (i = 0; i < pdata->ring_ops->num_ring_config; i++) { in xgene_enet_write_ring_state() 223 static void xgene_enet_wr_csr(struct xgene_enet_pdata *pdata, in xgene_enet_wr_csr() argument 226 void __iomem *addr = pdata->eth_csr_addr + offset; in xgene_enet_wr_csr() 231 static void xgene_enet_wr_ring_if(struct xgene_enet_pdata *pdata, in xgene_enet_wr_ring_if() argument 234 void __iomem *addr = pdata->eth_ring_if_addr + offset; in xgene_enet_wr_ring_if() [all …]
|
D | xgene_enet_main.c | 71 struct xgene_enet_pdata *pdata; in xgene_enet_refill_pagepool() local 84 pdata = netdev_priv(ndev); in xgene_enet_refill_pagepool() 112 pdata->ring_ops->wr_cmd(buf_pool, nbuf); in xgene_enet_refill_pagepool() 123 struct xgene_enet_pdata *pdata; in xgene_enet_refill_bufpool() local 134 pdata = netdev_priv(ndev); in xgene_enet_refill_bufpool() 161 pdata->ring_ops->wr_cmd(buf_pool, nbuf); in xgene_enet_refill_bufpool() 228 struct xgene_enet_pdata *pdata = netdev_priv(cp_ring->ndev); in xgene_enet_tx_completion() local 255 spin_lock(&pdata->mss_lock); in xgene_enet_tx_completion() 256 pdata->mss_refcnt[mss_index]--; in xgene_enet_tx_completion() 257 spin_unlock(&pdata->mss_lock); in xgene_enet_tx_completion() [all …]
|
/drivers/net/ethernet/synopsys/ |
D | dwc-xlgmac-common.c | 34 static void xlgmac_read_mac_addr(struct xlgmac_pdata *pdata) in xlgmac_read_mac_addr() argument 36 struct net_device *netdev = pdata->netdev; in xlgmac_read_mac_addr() 39 memcpy(pdata->mac_addr, dev_addr, netdev->addr_len); in xlgmac_read_mac_addr() 42 static void xlgmac_default_config(struct xlgmac_pdata *pdata) in xlgmac_default_config() argument 44 pdata->tx_osp_mode = DMA_OSP_ENABLE; in xlgmac_default_config() 45 pdata->tx_sf_mode = MTL_TSF_ENABLE; in xlgmac_default_config() 46 pdata->rx_sf_mode = MTL_RSF_DISABLE; in xlgmac_default_config() 47 pdata->pblx8 = DMA_PBL_X8_ENABLE; in xlgmac_default_config() 48 pdata->tx_pbl = DMA_PBL_32; in xlgmac_default_config() 49 pdata->rx_pbl = DMA_PBL_32; in xlgmac_default_config() [all …]
|
D | dwc-xlgmac-hw.c | 36 static int xlgmac_disable_rx_csum(struct xlgmac_pdata *pdata) in xlgmac_disable_rx_csum() argument 40 regval = readl(pdata->mac_regs + MAC_RCR); in xlgmac_disable_rx_csum() 43 writel(regval, pdata->mac_regs + MAC_RCR); in xlgmac_disable_rx_csum() 48 static int xlgmac_enable_rx_csum(struct xlgmac_pdata *pdata) in xlgmac_enable_rx_csum() argument 52 regval = readl(pdata->mac_regs + MAC_RCR); in xlgmac_enable_rx_csum() 55 writel(regval, pdata->mac_regs + MAC_RCR); in xlgmac_enable_rx_csum() 60 static int xlgmac_set_mac_address(struct xlgmac_pdata *pdata, u8 *addr) in xlgmac_set_mac_address() argument 68 writel(mac_addr_hi, pdata->mac_regs + MAC_MACA0HR); in xlgmac_set_mac_address() 69 writel(mac_addr_lo, pdata->mac_regs + MAC_MACA0LR); in xlgmac_set_mac_address() 74 static void xlgmac_set_mac_reg(struct xlgmac_pdata *pdata, in xlgmac_set_mac_reg() argument [all …]
|
D | dwc-xlgmac-net.c | 43 struct xlgmac_pdata *pdata = channel->pdata; in xlgmac_maybe_stop_tx_queue() local 46 netif_info(pdata, drv, pdata->netdev, in xlgmac_maybe_stop_tx_queue() 48 netif_stop_subqueue(pdata->netdev, channel->queue_index); in xlgmac_maybe_stop_tx_queue() 55 pdata->hw_ops.tx_start_xmit(channel, ring); in xlgmac_maybe_stop_tx_queue() 114 static void xlgmac_prep_tx_pkt(struct xlgmac_pdata *pdata, in xlgmac_prep_tx_pkt() argument 207 static void xlgmac_enable_rx_tx_ints(struct xlgmac_pdata *pdata) in xlgmac_enable_rx_tx_ints() argument 209 struct xlgmac_hw_ops *hw_ops = &pdata->hw_ops; in xlgmac_enable_rx_tx_ints() 214 channel = pdata->channel_head; in xlgmac_enable_rx_tx_ints() 215 for (i = 0; i < pdata->channel_count; i++, channel++) { in xlgmac_enable_rx_tx_ints() 229 static void xlgmac_disable_rx_tx_ints(struct xlgmac_pdata *pdata) in xlgmac_disable_rx_tx_ints() argument [all …]
|
/drivers/input/keyboard/ |
D | matrix_keypad.c | 26 const struct matrix_keypad_platform_data *pdata; member 46 static void __activate_col(const struct matrix_keypad_platform_data *pdata, in __activate_col() argument 49 bool level_on = !pdata->active_low; in __activate_col() 52 gpio_direction_output(pdata->col_gpios[col], level_on); in __activate_col() 54 gpio_set_value_cansleep(pdata->col_gpios[col], !level_on); in __activate_col() 55 if (!pdata->drive_inactive_cols) in __activate_col() 56 gpio_direction_input(pdata->col_gpios[col]); in __activate_col() 60 static void activate_col(const struct matrix_keypad_platform_data *pdata, in activate_col() argument 63 __activate_col(pdata, col, on); in activate_col() 65 if (on && pdata->col_scan_delay_us) in activate_col() [all …]
|
/drivers/usb/misc/ |
D | appledisplay.c | 79 struct appledisplay *pdata = urb->context; in appledisplay_complete() local 80 struct device *dev = &pdata->udev->dev; in appledisplay_complete() 91 ACD_URB_BUFFER_LEN, pdata->urb->actual_length); in appledisplay_complete() 106 switch(pdata->urbdata[1]) { in appledisplay_complete() 109 pdata->button_pressed = 1; in appledisplay_complete() 110 schedule_delayed_work(&pdata->work, 0); in appledisplay_complete() 114 pdata->button_pressed = 0; in appledisplay_complete() 119 retval = usb_submit_urb(pdata->urb, GFP_ATOMIC); in appledisplay_complete() 128 struct appledisplay *pdata = bl_get_data(bd); in appledisplay_bl_update_status() local 131 mutex_lock(&pdata->sysfslock); in appledisplay_bl_update_status() [all …]
|
/drivers/power/supply/ |
D | max8903_charger.c | 21 struct max8903_pdata *pdata; member 45 if (gpio_is_valid(data->pdata->chg)) { in max8903_get_property() 46 if (gpio_get_value(data->pdata->chg) == 0) in max8903_get_property() 74 struct max8903_pdata *pdata = data->pdata; in max8903_dcin() local 78 ta_in = gpio_get_value(pdata->dok) ? false : true; in max8903_dcin() 86 if (gpio_is_valid(pdata->dcm)) in max8903_dcin() 87 gpio_set_value(pdata->dcm, ta_in ? 1 : 0); in max8903_dcin() 90 if (gpio_is_valid(pdata->cen)) in max8903_dcin() 91 gpio_set_value(pdata->cen, ta_in ? 0 : in max8903_dcin() 115 struct max8903_pdata *pdata = data->pdata; in max8903_usbin() local [all …]
|
/drivers/uio/ |
D | uio_hv_generic.c | 81 struct hv_uio_private_data *pdata = info->priv; in hv_uio_irqcontrol() local 82 struct hv_device *dev = pdata->device; in hv_uio_irqcontrol() 97 struct hv_uio_private_data *pdata = hv_get_drvdata(hv_dev); in hv_uio_channel_cb() local 102 uio_event_notify(&pdata->info); in hv_uio_channel_cb() 111 struct hv_uio_private_data *pdata = hv_get_drvdata(hv_dev); in hv_uio_rescind() local 117 pdata->info.irq = 0; in hv_uio_rescind() 120 uio_event_notify(&pdata->info); in hv_uio_rescind() 180 hv_uio_cleanup(struct hv_device *dev, struct hv_uio_private_data *pdata) in hv_uio_cleanup() argument 182 if (pdata->send_gpadl) { in hv_uio_cleanup() 183 vmbus_teardown_gpadl(dev->channel, pdata->send_gpadl); in hv_uio_cleanup() [all …]
|
/drivers/rtc/ |
D | rtc-mxc_v2.c | 75 struct mxc_rtc_data *pdata = dev_get_drvdata(dev); in mxc_rtc_interrupt() local 76 void __iomem *ioaddr = pdata->ioaddr; in mxc_rtc_interrupt() 81 spin_lock_irqsave(&pdata->lock, flags); in mxc_rtc_interrupt() 82 if (clk_enable(pdata->clk)) { in mxc_rtc_interrupt() 83 spin_unlock_irqrestore(&pdata->lock, flags); in mxc_rtc_interrupt() 93 rtc_update_irq(pdata->rtc, 1, RTC_AF | RTC_IRQF); in mxc_rtc_interrupt() 106 clk_disable(pdata->clk); in mxc_rtc_interrupt() 107 spin_unlock_irqrestore(&pdata->lock, flags); in mxc_rtc_interrupt() 115 static int mxc_rtc_lock(struct mxc_rtc_data *const pdata) in mxc_rtc_lock() argument 119 spin_lock_irq(&pdata->lock); in mxc_rtc_lock() [all …]
|
D | rtc-pic32.c | 65 static void pic32_rtc_alarm_clk_enable(struct pic32_rtc_dev *pdata, in pic32_rtc_alarm_clk_enable() argument 70 spin_lock_irqsave(&pdata->alarm_lock, flags); in pic32_rtc_alarm_clk_enable() 72 if (!pdata->alarm_clk_enabled) { in pic32_rtc_alarm_clk_enable() 73 clk_enable(pdata->clk); in pic32_rtc_alarm_clk_enable() 74 pdata->alarm_clk_enabled = true; in pic32_rtc_alarm_clk_enable() 77 if (pdata->alarm_clk_enabled) { in pic32_rtc_alarm_clk_enable() 78 clk_disable(pdata->clk); in pic32_rtc_alarm_clk_enable() 79 pdata->alarm_clk_enabled = false; in pic32_rtc_alarm_clk_enable() 82 spin_unlock_irqrestore(&pdata->alarm_lock, flags); in pic32_rtc_alarm_clk_enable() 87 struct pic32_rtc_dev *pdata = (struct pic32_rtc_dev *)id; in pic32_rtc_alarmirq() local [all …]
|
D | rtc-stk17ta8.c | 74 struct rtc_plat_data *pdata = dev_get_drvdata(dev); in stk17ta8_rtc_set_time() local 75 void __iomem *ioaddr = pdata->ioaddr; in stk17ta8_rtc_set_time() 78 flags = readb(pdata->ioaddr + RTC_FLAGS); in stk17ta8_rtc_set_time() 79 writeb(flags | RTC_WRITE, pdata->ioaddr + RTC_FLAGS); in stk17ta8_rtc_set_time() 90 writeb(flags & ~RTC_WRITE, pdata->ioaddr + RTC_FLAGS); in stk17ta8_rtc_set_time() 96 struct rtc_plat_data *pdata = dev_get_drvdata(dev); in stk17ta8_rtc_read_time() local 97 void __iomem *ioaddr = pdata->ioaddr; in stk17ta8_rtc_read_time() 103 if (pdata->last_jiffies == jiffies) in stk17ta8_rtc_read_time() 105 pdata->last_jiffies = jiffies; in stk17ta8_rtc_read_time() 107 flags = readb(pdata->ioaddr + RTC_FLAGS); in stk17ta8_rtc_read_time() [all …]
|