/drivers/pcmcia/ |
D | cs.c | 73 struct pcmcia_socket *pcmcia_get_socket(struct pcmcia_socket *skt) in pcmcia_get_socket() argument 75 struct device *dev = get_device(&skt->dev); in pcmcia_get_socket() 83 void pcmcia_put_socket(struct pcmcia_socket *skt) in pcmcia_put_socket() argument 85 put_device(&skt->dev); in pcmcia_put_socket() 249 static int socket_reset(struct pcmcia_socket *skt) in socket_reset() argument 253 dev_dbg(&skt->dev, "reset\n"); in socket_reset() 255 skt->socket.flags |= SS_OUTPUT_ENA | SS_RESET; in socket_reset() 256 skt->ops->set_socket(skt, &skt->socket); in socket_reset() 259 skt->socket.flags &= ~SS_RESET; in socket_reset() 260 skt->ops->set_socket(skt, &skt->socket); in socket_reset() [all …]
|
D | soc_common.c | 60 void soc_pcmcia_debug(struct soc_pcmcia_socket *skt, const char *func, in soc_pcmcia_debug() argument 71 printk(KERN_DEBUG "skt%u: %s: %pV", skt->nr, func, &vaf); in soc_pcmcia_debug() 83 int soc_pcmcia_regulator_set(struct soc_pcmcia_socket *skt, in soc_pcmcia_regulator_set() argument 101 dev_warn(&skt->socket.dev, in soc_pcmcia_regulator_set() 103 r == &skt->vcc ? "Vcc" : "Vpp", in soc_pcmcia_regulator_set() 133 void soc_common_pcmcia_get_timing(struct soc_pcmcia_socket *skt, in soc_common_pcmcia_get_timing() argument 137 calc_speed(skt->spd_io, MAX_IO_WIN, SOC_PCMCIA_IO_ACCESS); in soc_common_pcmcia_get_timing() 139 calc_speed(skt->spd_mem, MAX_WIN, SOC_PCMCIA_3V_MEM_ACCESS); in soc_common_pcmcia_get_timing() 141 calc_speed(skt->spd_attr, MAX_WIN, SOC_PCMCIA_3V_MEM_ACCESS); in soc_common_pcmcia_get_timing() 145 static void __soc_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt, in __soc_pcmcia_hw_shutdown() argument [all …]
|
D | sa11xx_base.c | 63 sa1100_pcmcia_default_mecr_timing(struct soc_pcmcia_socket *skt, in sa1100_pcmcia_default_mecr_timing() argument 79 sa1100_pcmcia_set_mecr(struct soc_pcmcia_socket *skt, unsigned int cpu_clock) in sa1100_pcmcia_set_mecr() argument 86 soc_common_pcmcia_get_timing(skt, &timing); in sa1100_pcmcia_set_mecr() 88 bs_io = skt->ops->get_timing(skt, cpu_clock, timing.io); in sa1100_pcmcia_set_mecr() 89 bs_mem = skt->ops->get_timing(skt, cpu_clock, timing.mem); in sa1100_pcmcia_set_mecr() 90 bs_attr = skt->ops->get_timing(skt, cpu_clock, timing.attr); in sa1100_pcmcia_set_mecr() 95 MECR_FAST_SET(mecr, skt->nr, 0); in sa1100_pcmcia_set_mecr() 96 MECR_BSIO_SET(mecr, skt->nr, bs_io); in sa1100_pcmcia_set_mecr() 97 MECR_BSA_SET(mecr, skt->nr, bs_attr); in sa1100_pcmcia_set_mecr() 98 MECR_BSM_SET(mecr, skt->nr, bs_mem); in sa1100_pcmcia_set_mecr() [all …]
|
D | bcm63xx_pcmcia.c | 34 static inline u32 pcmcia_readl(struct bcm63xx_pcmcia_socket *skt, u32 off) in pcmcia_readl() argument 36 return bcm_readl(skt->base + off); in pcmcia_readl() 39 static inline void pcmcia_writel(struct bcm63xx_pcmcia_socket *skt, in pcmcia_writel() argument 42 bcm_writel(val, skt->base + off); in pcmcia_writel() 78 struct bcm63xx_pcmcia_socket *skt; in bcm63xx_pcmcia_set_socket() local 82 skt = sock->driver_data; in bcm63xx_pcmcia_set_socket() 84 spin_lock_irqsave(&skt->lock, flags); in bcm63xx_pcmcia_set_socket() 90 val = pcmcia_readl(skt, PCMCIA_C1_REG); in bcm63xx_pcmcia_set_socket() 97 if (skt->card_detected && (skt->card_type & CARD_CARDBUS)) in bcm63xx_pcmcia_set_socket() 100 pcmcia_writel(skt, val, PCMCIA_C1_REG); in bcm63xx_pcmcia_set_socket() [all …]
|
D | sa1100_generic.c | 53 static int sa11x0_cf_hw_init(struct soc_pcmcia_socket *skt) in sa11x0_cf_hw_init() argument 55 struct device *dev = skt->socket.dev.parent; in sa11x0_cf_hw_init() 58 skt->gpio_reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); in sa11x0_cf_hw_init() 59 if (IS_ERR(skt->gpio_reset)) in sa11x0_cf_hw_init() 60 return PTR_ERR(skt->gpio_reset); in sa11x0_cf_hw_init() 62 skt->gpio_bus_enable = devm_gpiod_get_optional(dev, "bus-enable", in sa11x0_cf_hw_init() 64 if (IS_ERR(skt->gpio_bus_enable)) in sa11x0_cf_hw_init() 65 return PTR_ERR(skt->gpio_bus_enable); in sa11x0_cf_hw_init() 67 skt->vcc.reg = devm_regulator_get_optional(dev, "vcc"); in sa11x0_cf_hw_init() 68 if (IS_ERR(skt->vcc.reg)) in sa11x0_cf_hw_init() [all …]
|
D | pxa2xx_base.c | 159 static int pxa2xx_pcmcia_set_timing(struct soc_pcmcia_socket *skt) in pxa2xx_pcmcia_set_timing() argument 161 unsigned long clk = clk_get_rate(skt->clk) / 10000; in pxa2xx_pcmcia_set_timing() 163 int sock = skt->nr; in pxa2xx_pcmcia_set_timing() 165 soc_common_pcmcia_get_timing(skt, &timing); in pxa2xx_pcmcia_set_timing() 178 pxa2xx_pcmcia_frequency_change(struct soc_pcmcia_socket *skt, in pxa2xx_pcmcia_frequency_change() argument 185 debug(skt, 2, "new frequency %u.%uMHz > %u.%uMHz, " in pxa2xx_pcmcia_frequency_change() 189 pxa2xx_pcmcia_set_timing(skt); in pxa2xx_pcmcia_frequency_change() 195 debug(skt, 2, "new frequency %u.%uMHz < %u.%uMHz, " in pxa2xx_pcmcia_frequency_change() 199 pxa2xx_pcmcia_set_timing(skt); in pxa2xx_pcmcia_frequency_change() 221 int pxa2xx_drv_pcmcia_add_one(struct soc_pcmcia_socket *skt) in pxa2xx_drv_pcmcia_add_one() argument [all …]
|
D | pxa2xx_sharpsl.c | 26 static void sharpsl_pcmcia_init_reset(struct soc_pcmcia_socket *skt) in sharpsl_pcmcia_init_reset() argument 28 struct scoop_pcmcia_dev *scoopdev = &SCOOP_DEV[skt->nr]; in sharpsl_pcmcia_init_reset() 34 platform_scoop_config->power_ctrl(scoopdev->dev, 0x0000, skt->nr); in sharpsl_pcmcia_init_reset() 42 static int sharpsl_pcmcia_hw_init(struct soc_pcmcia_socket *skt) in sharpsl_pcmcia_hw_init() argument 44 if (SCOOP_DEV[skt->nr].cd_irq >= 0) { in sharpsl_pcmcia_hw_init() 45 skt->stat[SOC_STAT_CD].irq = SCOOP_DEV[skt->nr].cd_irq; in sharpsl_pcmcia_hw_init() 46 skt->stat[SOC_STAT_CD].name = SCOOP_DEV[skt->nr].cd_irq_str; in sharpsl_pcmcia_hw_init() 49 skt->socket.pci_irq = SCOOP_DEV[skt->nr].irq; in sharpsl_pcmcia_hw_init() 54 static void sharpsl_pcmcia_socket_state(struct soc_pcmcia_socket *skt, in sharpsl_pcmcia_socket_state() argument 58 struct device *scoop = SCOOP_DEV[skt->nr].dev; in sharpsl_pcmcia_socket_state() [all …]
|
D | sa1100_h3600.c | 23 static int h3600_pcmcia_hw_init(struct soc_pcmcia_socket *skt) in h3600_pcmcia_hw_init() argument 27 skt->stat[SOC_STAT_CD].name = skt->nr ? "pcmcia1-detect" : "pcmcia0-detect"; in h3600_pcmcia_hw_init() 28 skt->stat[SOC_STAT_RDY].name = skt->nr ? "pcmcia1-ready" : "pcmcia0-ready"; in h3600_pcmcia_hw_init() 30 err = soc_pcmcia_request_gpiods(skt); in h3600_pcmcia_hw_init() 34 switch (skt->nr) { in h3600_pcmcia_hw_init() 74 static void h3600_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt) in h3600_pcmcia_hw_shutdown() argument 76 switch (skt->nr) { in h3600_pcmcia_hw_shutdown() 94 h3600_pcmcia_socket_state(struct soc_pcmcia_socket *skt, struct pcmcia_state *state) in h3600_pcmcia_socket_state() argument 103 h3600_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state_t *state) in h3600_pcmcia_configure_socket() argument 118 static void h3600_pcmcia_socket_init(struct soc_pcmcia_socket *skt) in h3600_pcmcia_socket_init() argument [all …]
|
D | soc_common.h | 26 struct soc_pcmcia_socket skt[]; member 37 void soc_pcmcia_init_one(struct soc_pcmcia_socket *skt, 39 void soc_pcmcia_remove_one(struct soc_pcmcia_socket *skt); 40 int soc_pcmcia_add_one(struct soc_pcmcia_socket *skt); 41 int soc_pcmcia_request_gpiods(struct soc_pcmcia_socket *skt); 43 void soc_common_cf_socket_state(struct soc_pcmcia_socket *skt, 46 int soc_pcmcia_regulator_set(struct soc_pcmcia_socket *skt, 51 extern void soc_pcmcia_debug(struct soc_pcmcia_socket *skt, const char *func, 54 #define debug(skt, lvl, fmt, arg...) \ argument 55 soc_pcmcia_debug(skt, __func__, lvl, fmt , ## arg) [all …]
|
D | sa1111_jornada720.c | 36 static int jornada720_pcmcia_hw_init(struct soc_pcmcia_socket *skt) in jornada720_pcmcia_hw_init() argument 38 struct device *dev = skt->socket.dev.parent; in jornada720_pcmcia_hw_init() 45 j->gpio[J720_GPIO_PWR] = devm_gpiod_get(dev, skt->nr ? "s1-power" : in jornada720_pcmcia_hw_init() 50 j->gpio[J720_GPIO_3V] = devm_gpiod_get(dev, skt->nr ? "s1-3v" : in jornada720_pcmcia_hw_init() 55 skt->driver_data = j; in jornada720_pcmcia_hw_init() 61 jornada720_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state_t *state) in jornada720_pcmcia_configure_socket() argument 63 struct jornada720_data *j = skt->driver_data; in jornada720_pcmcia_configure_socket() 68 skt->nr, state->Vcc, state->Vpp); in jornada720_pcmcia_configure_socket() 70 switch (skt->nr) { in jornada720_pcmcia_configure_socket() 114 ret = sa1111_pcmcia_configure_socket(skt, state); in jornada720_pcmcia_configure_socket()
|
D | sa1111_neponset.c | 41 static int neponset_pcmcia_hw_init(struct soc_pcmcia_socket *skt) in neponset_pcmcia_hw_init() argument 46 ret = max1600_init(skt->socket.dev.parent, &m, in neponset_pcmcia_hw_init() 47 skt->nr ? MAX1600_CHAN_B : MAX1600_CHAN_A, in neponset_pcmcia_hw_init() 50 skt->driver_data = m; in neponset_pcmcia_hw_init() 56 neponset_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state_t *state) in neponset_pcmcia_configure_socket() argument 58 struct max1600 *m = skt->driver_data; in neponset_pcmcia_configure_socket() 61 ret = sa1111_pcmcia_configure_socket(skt, state); in neponset_pcmcia_configure_socket()
|
D | ds.c | 1216 struct pcmcia_socket *skt = _data; in pcmcia_bus_suspend_callback() local 1219 if (p_dev->socket != skt || p_dev->suspended) in pcmcia_bus_suspend_callback() 1227 struct pcmcia_socket *skt = _data; in pcmcia_bus_resume_callback() local 1230 if (p_dev->socket != skt || !p_dev->suspended) in pcmcia_bus_resume_callback() 1238 static int pcmcia_bus_resume(struct pcmcia_socket *skt) in pcmcia_bus_resume() argument 1240 dev_dbg(&skt->dev, "resuming socket %d\n", skt->sock); in pcmcia_bus_resume() 1241 bus_for_each_dev(&pcmcia_bus_type, NULL, skt, pcmcia_bus_resume_callback); in pcmcia_bus_resume() 1245 static int pcmcia_bus_suspend(struct pcmcia_socket *skt) in pcmcia_bus_suspend() argument 1247 dev_dbg(&skt->dev, "suspending socket %d\n", skt->sock); in pcmcia_bus_suspend() 1248 if (bus_for_each_dev(&pcmcia_bus_type, NULL, skt, in pcmcia_bus_suspend() [all …]
|
D | xxs1500_ss.c | 78 static int xxs1500_pcmcia_configure(struct pcmcia_socket *skt, in xxs1500_pcmcia_configure() argument 81 struct xxs1500_pcmcia_sock *sock = to_xxs_socket(skt); in xxs1500_pcmcia_configure() 115 static int xxs1500_pcmcia_get_status(struct pcmcia_socket *skt, in xxs1500_pcmcia_get_status() argument 156 static int xxs1500_pcmcia_sock_init(struct pcmcia_socket *skt) in xxs1500_pcmcia_sock_init() argument 171 static int xxs1500_pcmcia_sock_suspend(struct pcmcia_socket *skt) in xxs1500_pcmcia_sock_suspend() argument 176 static int au1x00_pcmcia_set_io_map(struct pcmcia_socket *skt, in au1x00_pcmcia_set_io_map() argument 179 struct xxs1500_pcmcia_sock *sock = to_xxs_socket(skt); in au1x00_pcmcia_set_io_map() 187 static int au1x00_pcmcia_set_mem_map(struct pcmcia_socket *skt, in au1x00_pcmcia_set_mem_map() argument 190 struct xxs1500_pcmcia_sock *sock = to_xxs_socket(skt); in au1x00_pcmcia_set_mem_map()
|
D | db1xxx_ss.c | 242 static int db1x_pcmcia_configure(struct pcmcia_socket *skt, in db1x_pcmcia_configure() argument 245 struct db1x_pcmcia_sock *sock = to_db1x_socket(skt); in db1x_pcmcia_configure() 338 static int db1x_pcmcia_get_status(struct pcmcia_socket *skt, in db1x_pcmcia_get_status() argument 341 struct db1x_pcmcia_sock *sock = to_db1x_socket(skt); in db1x_pcmcia_get_status() 381 static int db1x_pcmcia_sock_init(struct pcmcia_socket *skt) in db1x_pcmcia_sock_init() argument 386 static int db1x_pcmcia_sock_suspend(struct pcmcia_socket *skt) in db1x_pcmcia_sock_suspend() argument 391 static int au1x00_pcmcia_set_io_map(struct pcmcia_socket *skt, in au1x00_pcmcia_set_io_map() argument 394 struct db1x_pcmcia_sock *sock = to_db1x_socket(skt); in au1x00_pcmcia_set_io_map() 402 static int au1x00_pcmcia_set_mem_map(struct pcmcia_socket *skt, in au1x00_pcmcia_set_mem_map() argument 405 struct db1x_pcmcia_sock *sock = to_db1x_socket(skt); in au1x00_pcmcia_set_mem_map()
|
D | sa1111_generic.c | 68 void sa1111_pcmcia_socket_state(struct soc_pcmcia_socket *skt, struct pcmcia_state *state) in sa1111_pcmcia_socket_state() argument 70 struct sa1111_pcmcia_socket *s = to_skt(skt); in sa1111_pcmcia_socket_state() 73 switch (skt->nr) { in sa1111_pcmcia_socket_state() 96 int sa1111_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state_t *state) in sa1111_pcmcia_configure_socket() argument 98 struct sa1111_pcmcia_socket *s = to_skt(skt); in sa1111_pcmcia_configure_socket() 102 switch (skt->nr) { in sa1111_pcmcia_configure_socket()
|
D | cs_internal.h | 128 struct pcmcia_socket *pcmcia_get_socket(struct pcmcia_socket *skt); 129 void pcmcia_put_socket(struct pcmcia_socket *skt);
|
D | pxa2xx_base.h | 1 int pxa2xx_drv_pcmcia_add_one(struct soc_pcmcia_socket *skt);
|
D | sa11xx_base.h | 121 int sa11xx_drv_pcmcia_add_one(struct soc_pcmcia_socket *skt);
|