summaryrefslogtreecommitdiffstats
path: root/drivers/clk/mxs
Commit message (Collapse)AuthorAgeFilesLines
* driver: replace dev_request_mem_region with dev_request_mem_resourceSascha Hauer2016-03-072-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dev_request_mem_region doesn't work properly one some SoCs on which PTR_ERR() values clash with valid return values from dev_request_mem_region. Replace them with dev_request_mem_resource where possible. This patch has been generated with the following semantic patch: // <smpl> @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) { ... - return PTR_ERR(io); -} + return PTR_ERR(iores); +} +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) - return PTR_ERR(io); -} + return PTR_ERR(iores); +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { - ret = PTR_ERR(io); +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) { + ret = PTR_ERR(iores); ... } +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) + return PTR_ERR(iores); +io = IOMEM(iores->start); ...+> } @@ identifier func; @@ func(...) { <+... struct resource *iores; -struct resource *iores; ...+> } // </smpl> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX28: Add PWM clk supportSascha Hauer2015-06-121-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: remove unnecessary mach/imx-regs.h includeSascha Hauer2015-01-052-2/+2
| | | | | | And replace the ones needed with the SoC specific header. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* resource: Let dev_request_mem_region return an error pointerSascha Hauer2014-09-162-0/+4
| | | | | | For all users fix or add the error check. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clk: gate: add flags argument to clock gate constructorBeniamino Galvani2014-04-291-1/+1
| | | | | | | | This adds a clk_gate_flags argument to clock gate creation functions to allow the introduction of new clock gate modifiers. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clk: clk-fixed-factor: pass flags to initializersSascha Hauer2014-03-281-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clk: clk-gate: pass flags to initializersSascha Hauer2014-03-282-2/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clk: clk-mux: pass clk flags from initializersSascha Hauer2014-03-281-1/+1
| | | | | | | struct clk has a flags field, let the clk-mux initializers set this field. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX28: unbreak ethernetEric Bénard2013-09-101-2/+3
| | | | | | | | | | | | | | | | | | | | | since the switch to common clock, ethernet driver doesn't works and and access to the network leads to : eth0: Read MDIO failed... unable to handle NULL pointer dereference at address 0x000000c7 The problem is that bit 31 (SLEEP) of register HW_CLKCTRL_ENET is kept to its default value (1) which means : "put Ethernet block in sleep mode. CLK_H_MAC0(1), CLK_H_MAC0(1)_S, and CLK_ENET0(1)_TX are gated off. Ethernet can be wakeup remotely in sleep mode" In that case the FEC don't get its clock. This patch fix the problem by toggling this bit when FEC's clock is enabled. Tested on i.MX28EVK. Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: mxs: make ssp gates parents of ssp dividersSascha Hauer2013-07-151-13/+13
| | | | | | | | | | | | | | | | | | | | When changing the rates of the ssp clocks we have to poll the busy bit, but only when they are enabled. The current code can not check this properly since the gates are registered as children of the dividers. This has the effect that when the gate is disabled the busy bit will be set forever resulting in a freezed system. Fix this by making the gates parents of the dividers which allows clk_is_enabled to return the correct result. The Kernel has the same problem, but here the busy polling is limited to 10ms, so probably noone noticed this. The datasheet mentions that the ssp dividers shall only be changed when the clocks are enabled. The kernel and barebox currently ignore this. I don't know what effect violating this rule has. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clk: MXS: Add is_enabled callback for clkrefJuergen Beisert2013-06-231-0/+12
| | | | | Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: MXS: add clk driversSascha Hauer2013-06-203-0/+354
| | | | | | | This adds support for the i.MX23 and i.MX28 clock modules. This mostly is a copy from the kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: MXS: Add MXS specific clk typesSascha Hauer2013-06-207-0/+646
MXS needs some special MXS specific clock types: - pll - ref (fractional divider) - busy divider (divider with additional busy bit to poll on a rate change) - lcdif (Combined clock out of a fractional divider, a divider and a gate. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>