• Home
  • Raw
  • Download

Lines Matching refs:dmamux

46 	struct lpc18xx_dmamux_data *dmamux = dev_get_drvdata(dev);  in lpc18xx_dmamux_free()  local
50 spin_lock_irqsave(&dmamux->lock, flags); in lpc18xx_dmamux_free()
52 spin_unlock_irqrestore(&dmamux->lock, flags); in lpc18xx_dmamux_free()
59 struct lpc18xx_dmamux_data *dmamux = platform_get_drvdata(pdev); in lpc18xx_dmamux_reserve() local
69 if (mux >= dmamux->dma_master_requests) { in lpc18xx_dmamux_reserve()
88 spin_lock_irqsave(&dmamux->lock, flags); in lpc18xx_dmamux_reserve()
89 if (dmamux->muxes[mux].busy) { in lpc18xx_dmamux_reserve()
90 spin_unlock_irqrestore(&dmamux->lock, flags); in lpc18xx_dmamux_reserve()
92 mux, mux, dmamux->muxes[mux].value); in lpc18xx_dmamux_reserve()
97 dmamux->muxes[mux].busy = true; in lpc18xx_dmamux_reserve()
98 dmamux->muxes[mux].value = dma_spec->args[1]; in lpc18xx_dmamux_reserve()
100 regmap_update_bits(dmamux->reg, LPC18XX_CREG_DMAMUX, in lpc18xx_dmamux_reserve()
102 LPC18XX_DMAMUX_VAL(dmamux->muxes[mux].value, mux)); in lpc18xx_dmamux_reserve()
103 spin_unlock_irqrestore(&dmamux->lock, flags); in lpc18xx_dmamux_reserve()
109 dmamux->muxes[mux].value, mux); in lpc18xx_dmamux_reserve()
111 return &dmamux->muxes[mux]; in lpc18xx_dmamux_reserve()
117 struct lpc18xx_dmamux_data *dmamux; in lpc18xx_dmamux_probe() local
120 dmamux = devm_kzalloc(&pdev->dev, sizeof(*dmamux), GFP_KERNEL); in lpc18xx_dmamux_probe()
121 if (!dmamux) in lpc18xx_dmamux_probe()
124 dmamux->reg = syscon_regmap_lookup_by_compatible("nxp,lpc1850-creg"); in lpc18xx_dmamux_probe()
125 if (IS_ERR(dmamux->reg)) { in lpc18xx_dmamux_probe()
127 return PTR_ERR(dmamux->reg); in lpc18xx_dmamux_probe()
131 &dmamux->dma_mux_requests); in lpc18xx_dmamux_probe()
144 &dmamux->dma_master_requests); in lpc18xx_dmamux_probe()
151 dmamux->muxes = devm_kcalloc(&pdev->dev, dmamux->dma_master_requests, in lpc18xx_dmamux_probe()
154 if (!dmamux->muxes) in lpc18xx_dmamux_probe()
157 spin_lock_init(&dmamux->lock); in lpc18xx_dmamux_probe()
158 platform_set_drvdata(pdev, dmamux); in lpc18xx_dmamux_probe()
159 dmamux->dmarouter.dev = &pdev->dev; in lpc18xx_dmamux_probe()
160 dmamux->dmarouter.route_free = lpc18xx_dmamux_free; in lpc18xx_dmamux_probe()
163 &dmamux->dmarouter); in lpc18xx_dmamux_probe()