Lines Matching +full:de +full:- +full:assertion
1 // SPDX-License-Identifier: GPL-2.0-only
9 (c) Stefan Eletzhofer (stefan.eletzhofer@inquant.de) 2003,4
31 #include <asm/mach-types.h>
89 return (code / 300000) + ((code % 300000) ? 1 : 0) - 1; in pxa2xx_mcxx_hold()
103 return (code / 100000) + ((code % 100000) ? 1 : 0) - 1; in pxa2xx_mcxx_setup()
106 /* This function returns the (approximate) command assertion period, in
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()
184 if (freqs->new > freqs->old) { in pxa2xx_pcmcia_frequency_change()
186 "pre-updating\n", in pxa2xx_pcmcia_frequency_change()
187 freqs->new / 1000, (freqs->new / 100) % 10, in pxa2xx_pcmcia_frequency_change()
188 freqs->old / 1000, (freqs->old / 100) % 10); in pxa2xx_pcmcia_frequency_change()
194 if (freqs->new < freqs->old) { in pxa2xx_pcmcia_frequency_change()
196 "post-updating\n", in pxa2xx_pcmcia_frequency_change()
197 freqs->new / 1000, (freqs->new / 100) % 10, in pxa2xx_pcmcia_frequency_change()
198 freqs->old / 1000, (freqs->old / 100) % 10); in pxa2xx_pcmcia_frequency_change()
223 skt->res_skt.start = _PCMCIA(skt->nr); in pxa2xx_drv_pcmcia_add_one()
224 skt->res_skt.end = _PCMCIA(skt->nr) + PCMCIASp - 1; in pxa2xx_drv_pcmcia_add_one()
225 skt->res_skt.name = skt_names[skt->nr]; in pxa2xx_drv_pcmcia_add_one()
226 skt->res_skt.flags = IORESOURCE_MEM; in pxa2xx_drv_pcmcia_add_one()
228 skt->res_io.start = _PCMCIAIO(skt->nr); in pxa2xx_drv_pcmcia_add_one()
229 skt->res_io.end = _PCMCIAIO(skt->nr) + PCMCIAIOSp - 1; in pxa2xx_drv_pcmcia_add_one()
230 skt->res_io.name = "io"; in pxa2xx_drv_pcmcia_add_one()
231 skt->res_io.flags = IORESOURCE_MEM | IORESOURCE_BUSY; in pxa2xx_drv_pcmcia_add_one()
233 skt->res_mem.start = _PCMCIAMem(skt->nr); in pxa2xx_drv_pcmcia_add_one()
234 skt->res_mem.end = _PCMCIAMem(skt->nr) + PCMCIAMemSp - 1; in pxa2xx_drv_pcmcia_add_one()
235 skt->res_mem.name = "memory"; in pxa2xx_drv_pcmcia_add_one()
236 skt->res_mem.flags = IORESOURCE_MEM; in pxa2xx_drv_pcmcia_add_one()
238 skt->res_attr.start = _PCMCIAAttr(skt->nr); in pxa2xx_drv_pcmcia_add_one()
239 skt->res_attr.end = _PCMCIAAttr(skt->nr) + PCMCIAAttrSp - 1; in pxa2xx_drv_pcmcia_add_one()
240 skt->res_attr.name = "attribute"; in pxa2xx_drv_pcmcia_add_one()
241 skt->res_attr.flags = IORESOURCE_MEM; in pxa2xx_drv_pcmcia_add_one()
250 ops->set_timing = pxa2xx_pcmcia_set_timing; in pxa2xx_drv_pcmcia_ops()
252 ops->frequency_change = pxa2xx_pcmcia_frequency_change; in pxa2xx_drv_pcmcia_ops()
265 ops = (struct pcmcia_low_level *)dev->dev.platform_data; in pxa2xx_drv_pcmcia_probe()
267 ret = -ENODEV; in pxa2xx_drv_pcmcia_probe()
271 if (cpu_is_pxa320() && ops->nr > 1) { in pxa2xx_drv_pcmcia_probe()
272 dev_err(&dev->dev, "pxa320 supports only one pcmcia slot"); in pxa2xx_drv_pcmcia_probe()
273 ret = -EINVAL; in pxa2xx_drv_pcmcia_probe()
277 clk = devm_clk_get(&dev->dev, NULL); in pxa2xx_drv_pcmcia_probe()
279 return -ENODEV; in pxa2xx_drv_pcmcia_probe()
283 sinfo = devm_kzalloc(&dev->dev, SKT_DEV_INFO_SIZE(ops->nr), in pxa2xx_drv_pcmcia_probe()
286 return -ENOMEM; in pxa2xx_drv_pcmcia_probe()
288 sinfo->nskt = ops->nr; in pxa2xx_drv_pcmcia_probe()
291 for (i = 0; i < ops->nr; i++) { in pxa2xx_drv_pcmcia_probe()
292 skt = &sinfo->skt[i]; in pxa2xx_drv_pcmcia_probe()
294 skt->nr = ops->first + i; in pxa2xx_drv_pcmcia_probe()
295 skt->clk = clk; in pxa2xx_drv_pcmcia_probe()
296 soc_pcmcia_init_one(skt, ops, &dev->dev); in pxa2xx_drv_pcmcia_probe()
303 pxa2xx_configure_sockets(&dev->dev, ops); in pxa2xx_drv_pcmcia_probe()
304 dev_set_drvdata(&dev->dev, sinfo); in pxa2xx_drv_pcmcia_probe()
309 while (--i >= 0) in pxa2xx_drv_pcmcia_probe()
310 soc_pcmcia_remove_one(&sinfo->skt[i]); in pxa2xx_drv_pcmcia_probe()
321 for (i = 0; i < sinfo->nskt; i++) in pxa2xx_drv_pcmcia_remove()
322 soc_pcmcia_remove_one(&sinfo->skt[i]); in pxa2xx_drv_pcmcia_remove()
327 struct pcmcia_low_level *ops = (struct pcmcia_low_level *)dev->platform_data; in pxa2xx_drv_pcmcia_resume()
341 .name = "pxa2xx-pcmcia",
359 MODULE_AUTHOR("Stefan Eletzhofer <stefan.eletzhofer@inquant.de> and Ian Molton <spyro@f2s.com>");
362 MODULE_ALIAS("platform:pxa2xx-pcmcia");