Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 83ae0ffa authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge tag 'mxs-clk-dt-lookup' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/dt

It replaces clk_register_clkdev in mxs clock driver with DT lookup.

* tag 'mxs-clk-dt-lookup' of git://git.linaro.org/people/shawnguo/linux-2.6:
  clk: mxs: replace imx23 clk_register_clkdev with clock DT lookup
  clk: mxs: replace imx28 clk_register_clkdev with clock DT lookup
parents 77ea4a30 53f9443d
Loading
Loading
Loading
Loading
+76 −0
Original line number Original line Diff line number Diff line
* Clock bindings for Freescale i.MX23

Required properties:
- compatible: Should be "fsl,imx23-clkctrl"
- reg: Address and length of the register set
- #clock-cells: Should be <1>

The clock consumer should specify the desired clock by having the clock
ID in its "clocks" phandle cell.  The following is a full list of i.MX23
clocks and IDs.

	Clock		ID
	------------------
	ref_xtal	0
	pll		1
	ref_cpu		2
	ref_emi		3
	ref_pix		4
	ref_io		5
	saif_sel	6
	lcdif_sel	7
	gpmi_sel	8
	ssp_sel		9
	emi_sel		10
	cpu		11
	etm_sel		12
	cpu_pll		13
	cpu_xtal	14
	hbus		15
	xbus		16
	lcdif_div	17
	ssp_div		18
	gpmi_div	19
	emi_pll		20
	emi_xtal	21
	etm_div		22
	saif_div	23
	clk32k_div	24
	rtc		25
	adc		26
	spdif_div	27
	clk32k		28
	dri		29
	pwm		30
	filt		31
	uart		32
	ssp		33
	gpmi		34
	spdif		35
	emi		36
	saif		37
	lcdif		38
	etm		39
	usb		40
	usb_pwr		41

Examples:

clks: clkctrl@80040000 {
	compatible = "fsl,imx23-clkctrl";
	reg = <0x80040000 0x2000>;
	#clock-cells = <1>;
	clock-output-names =
		...
		"uart",		/* 32 */
		...
		"end_of_list";
};

auart0: serial@8006c000 {
	compatible = "fsl,imx23-auart";
	reg = <0x8006c000 0x2000>;
	interrupts = <24 25 23>;
	clocks = <&clks 32>;
	status = "disabled";
};
+99 −0
Original line number Original line Diff line number Diff line
* Clock bindings for Freescale i.MX28

Required properties:
- compatible: Should be "fsl,imx28-clkctrl"
- reg: Address and length of the register set
- #clock-cells: Should be <1>

The clock consumer should specify the desired clock by having the clock
ID in its "clocks" phandle cell.  The following is a full list of i.MX28
clocks and IDs.

	Clock		ID
	------------------
	ref_xtal	0
	pll0		1
	pll1		2
	pll2		3
	ref_cpu		4
	ref_emi		5
	ref_io0		6
	ref_io1		7
	ref_pix		8
	ref_hsadc	9
	ref_gpmi	10
	saif0_sel	11
	saif1_sel	12
	gpmi_sel	13
	ssp0_sel	14
	ssp1_sel	15
	ssp2_sel	16
	ssp3_sel	17
	emi_sel		18
	etm_sel		19
	lcdif_sel	20
	cpu		21
	ptp_sel		22
	cpu_pll		23
	cpu_xtal	24
	hbus		25
	xbus		26
	ssp0_div	27
	ssp1_div	28
	ssp2_div	29
	ssp3_div	30
	gpmi_div	31
	emi_pll		32
	emi_xtal	33
	lcdif_div	34
	etm_div		35
	ptp		36
	saif0_div	37
	saif1_div	38
	clk32k_div	39
	rtc		40
	lradc		41
	spdif_div	42
	clk32k		43
	pwm		44
	uart		45
	ssp0		46
	ssp1		47
	ssp2		48
	ssp3		49
	gpmi		50
	spdif		51
	emi		52
	saif0		53
	saif1		54
	lcdif		55
	etm		56
	fec		57
	can0		58
	can1		59
	usb0		60
	usb1		61
	usb0_pwr	62
	usb1_pwr	63
	enet_out	64

Examples:

clks: clkctrl@80040000 {
	compatible = "fsl,imx28-clkctrl";
	reg = <0x80040000 0x2000>;
	#clock-cells = <1>;
	clock-output-names =
		...
		"uart",		/* 45 */
		...
		"end_of_list";
};

auart0: serial@8006a000 {
	compatible = "fsl,imx28-auart", "fsl,imx23-auart";
	reg = <0x8006a000 0x2000>;
	interrupts = <112 70 71>;
	clocks = <&clks 45>;
	status = "disabled";
};
+14 −2
Original line number Original line Diff line number Diff line
@@ -52,6 +52,7 @@
			dma-apbh@80004000 {
			dma-apbh@80004000 {
				compatible = "fsl,imx23-dma-apbh";
				compatible = "fsl,imx23-dma-apbh";
				reg = <0x80004000 0x2000>;
				reg = <0x80004000 0x2000>;
				clocks = <&clks 15>;
			};
			};


			ecc@80008000 {
			ecc@80008000 {
@@ -67,6 +68,7 @@
				reg-names = "gpmi-nand", "bch";
				reg-names = "gpmi-nand", "bch";
				interrupts = <13>, <56>;
				interrupts = <13>, <56>;
				interrupt-names = "gpmi-dma", "bch";
				interrupt-names = "gpmi-dma", "bch";
				clocks = <&clks 34>;
				fsl,gpmi-dma-channel = <4>;
				fsl,gpmi-dma-channel = <4>;
				status = "disabled";
				status = "disabled";
			};
			};
@@ -74,6 +76,7 @@
			ssp0: ssp@80010000 {
			ssp0: ssp@80010000 {
				reg = <0x80010000 0x2000>;
				reg = <0x80010000 0x2000>;
				interrupts = <15 14>;
				interrupts = <15 14>;
				clocks = <&clks 33>;
				fsl,ssp-dma-channel = <1>;
				fsl,ssp-dma-channel = <1>;
				status = "disabled";
				status = "disabled";
			};
			};
@@ -290,6 +293,7 @@
			dma-apbx@80024000 {
			dma-apbx@80024000 {
				compatible = "fsl,imx23-dma-apbx";
				compatible = "fsl,imx23-dma-apbx";
				reg = <0x80024000 0x2000>;
				reg = <0x80024000 0x2000>;
				clocks = <&clks 16>;
			};
			};


			dcp@80028000 {
			dcp@80028000 {
@@ -316,12 +320,14 @@
				compatible = "fsl,imx23-lcdif";
				compatible = "fsl,imx23-lcdif";
				reg = <0x80030000 2000>;
				reg = <0x80030000 2000>;
				interrupts = <46 45>;
				interrupts = <46 45>;
				clocks = <&clks 38>;
				status = "disabled";
				status = "disabled";
			};
			};


			ssp1: ssp@80034000 {
			ssp1: ssp@80034000 {
				reg = <0x80034000 0x2000>;
				reg = <0x80034000 0x2000>;
				interrupts = <2 20>;
				interrupts = <2 20>;
				clocks = <&clks 33>;
				fsl,ssp-dma-channel = <2>;
				fsl,ssp-dma-channel = <2>;
				status = "disabled";
				status = "disabled";
			};
			};
@@ -339,9 +345,10 @@
			reg = <0x80040000 0x40000>;
			reg = <0x80040000 0x40000>;
			ranges;
			ranges;


			clkctl@80040000 {
			clks: clkctrl@80040000 {
				compatible = "fsl,imx23-clkctrl";
				reg = <0x80040000 0x2000>;
				reg = <0x80040000 0x2000>;
				status = "disabled";
				#clock-cells = <1>;
			};
			};


			saif0: saif@80042000 {
			saif0: saif@80042000 {
@@ -393,6 +400,7 @@
			pwm: pwm@80064000 {
			pwm: pwm@80064000 {
				compatible = "fsl,imx23-pwm";
				compatible = "fsl,imx23-pwm";
				reg = <0x80064000 0x2000>;
				reg = <0x80064000 0x2000>;
				clocks = <&clks 30>;
				#pwm-cells = <2>;
				#pwm-cells = <2>;
				fsl,pwm-number = <5>;
				fsl,pwm-number = <5>;
				status = "disabled";
				status = "disabled";
@@ -407,6 +415,7 @@
				compatible = "fsl,imx23-auart";
				compatible = "fsl,imx23-auart";
				reg = <0x8006c000 0x2000>;
				reg = <0x8006c000 0x2000>;
				interrupts = <24 25 23>;
				interrupts = <24 25 23>;
				clocks = <&clks 32>;
				status = "disabled";
				status = "disabled";
			};
			};


@@ -414,6 +423,7 @@
				compatible = "fsl,imx23-auart";
				compatible = "fsl,imx23-auart";
				reg = <0x8006e000 0x2000>;
				reg = <0x8006e000 0x2000>;
				interrupts = <59 60 58>;
				interrupts = <59 60 58>;
				clocks = <&clks 32>;
				status = "disabled";
				status = "disabled";
			};
			};


@@ -421,6 +431,8 @@
				compatible = "arm,pl011", "arm,primecell";
				compatible = "arm,pl011", "arm,primecell";
				reg = <0x80070000 0x2000>;
				reg = <0x80070000 0x2000>;
				interrupts = <0>;
				interrupts = <0>;
				clocks = <&clks 32>, <&clks 16>;
				clock-names = "uart", "apb_pclk";
				status = "disabled";
				status = "disabled";
			};
			};


+33 −2
Original line number Original line Diff line number Diff line
@@ -65,6 +65,7 @@
			dma-apbh@80004000 {
			dma-apbh@80004000 {
				compatible = "fsl,imx28-dma-apbh";
				compatible = "fsl,imx28-dma-apbh";
				reg = <0x80004000 0x2000>;
				reg = <0x80004000 0x2000>;
				clocks = <&clks 25>;
			};
			};


			perfmon@80006000 {
			perfmon@80006000 {
@@ -81,6 +82,7 @@
				reg-names = "gpmi-nand", "bch";
				reg-names = "gpmi-nand", "bch";
				interrupts = <88>, <41>;
				interrupts = <88>, <41>;
				interrupt-names = "gpmi-dma", "bch";
				interrupt-names = "gpmi-dma", "bch";
				clocks = <&clks 50>;
				fsl,gpmi-dma-channel = <4>;
				fsl,gpmi-dma-channel = <4>;
				status = "disabled";
				status = "disabled";
			};
			};
@@ -90,6 +92,7 @@
				#size-cells = <0>;
				#size-cells = <0>;
				reg = <0x80010000 0x2000>;
				reg = <0x80010000 0x2000>;
				interrupts = <96 82>;
				interrupts = <96 82>;
				clocks = <&clks 46>;
				fsl,ssp-dma-channel = <0>;
				fsl,ssp-dma-channel = <0>;
				status = "disabled";
				status = "disabled";
			};
			};
@@ -99,6 +102,7 @@
				#size-cells = <0>;
				#size-cells = <0>;
				reg = <0x80012000 0x2000>;
				reg = <0x80012000 0x2000>;
				interrupts = <97 83>;
				interrupts = <97 83>;
				clocks = <&clks 47>;
				fsl,ssp-dma-channel = <1>;
				fsl,ssp-dma-channel = <1>;
				status = "disabled";
				status = "disabled";
			};
			};
@@ -108,6 +112,7 @@
				#size-cells = <0>;
				#size-cells = <0>;
				reg = <0x80014000 0x2000>;
				reg = <0x80014000 0x2000>;
				interrupts = <98 84>;
				interrupts = <98 84>;
				clocks = <&clks 48>;
				fsl,ssp-dma-channel = <2>;
				fsl,ssp-dma-channel = <2>;
				status = "disabled";
				status = "disabled";
			};
			};
@@ -117,6 +122,7 @@
				#size-cells = <0>;
				#size-cells = <0>;
				reg = <0x80016000 0x2000>;
				reg = <0x80016000 0x2000>;
				interrupts = <99 85>;
				interrupts = <99 85>;
				clocks = <&clks 49>;
				fsl,ssp-dma-channel = <3>;
				fsl,ssp-dma-channel = <3>;
				status = "disabled";
				status = "disabled";
			};
			};
@@ -606,6 +612,7 @@
			dma-apbx@80024000 {
			dma-apbx@80024000 {
				compatible = "fsl,imx28-dma-apbx";
				compatible = "fsl,imx28-dma-apbx";
				reg = <0x80024000 0x2000>;
				reg = <0x80024000 0x2000>;
				clocks = <&clks 26>;
			};
			};


			dcp@80028000 {
			dcp@80028000 {
@@ -634,6 +641,7 @@
				compatible = "fsl,imx28-lcdif";
				compatible = "fsl,imx28-lcdif";
				reg = <0x80030000 0x2000>;
				reg = <0x80030000 0x2000>;
				interrupts = <38 86>;
				interrupts = <38 86>;
				clocks = <&clks 55>;
				status = "disabled";
				status = "disabled";
			};
			};


@@ -641,6 +649,8 @@
				compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan";
				compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan";
				reg = <0x80032000 0x2000>;
				reg = <0x80032000 0x2000>;
				interrupts = <8>;
				interrupts = <8>;
				clocks = <&clks 58>, <&clks 58>;
				clock-names = "ipg", "per";
				status = "disabled";
				status = "disabled";
			};
			};


@@ -648,6 +658,8 @@
				compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan";
				compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan";
				reg = <0x80034000 0x2000>;
				reg = <0x80034000 0x2000>;
				interrupts = <9>;
				interrupts = <9>;
				clocks = <&clks 59>, <&clks 59>;
				clock-names = "ipg", "per";
				status = "disabled";
				status = "disabled";
			};
			};


@@ -694,15 +706,17 @@
			reg = <0x80040000 0x40000>;
			reg = <0x80040000 0x40000>;
			ranges;
			ranges;


			clkctl@80040000 {
			clks: clkctrl@80040000 {
				compatible = "fsl,imx28-clkctrl";
				reg = <0x80040000 0x2000>;
				reg = <0x80040000 0x2000>;
				status = "disabled";
				#clock-cells = <1>;
			};
			};


			saif0: saif@80042000 {
			saif0: saif@80042000 {
				compatible = "fsl,imx28-saif";
				compatible = "fsl,imx28-saif";
				reg = <0x80042000 0x2000>;
				reg = <0x80042000 0x2000>;
				interrupts = <59 80>;
				interrupts = <59 80>;
				clocks = <&clks 53>;
				fsl,saif-dma-channel = <4>;
				fsl,saif-dma-channel = <4>;
				status = "disabled";
				status = "disabled";
			};
			};
@@ -716,6 +730,7 @@
				compatible = "fsl,imx28-saif";
				compatible = "fsl,imx28-saif";
				reg = <0x80046000 0x2000>;
				reg = <0x80046000 0x2000>;
				interrupts = <58 81>;
				interrupts = <58 81>;
				clocks = <&clks 54>;
				fsl,saif-dma-channel = <5>;
				fsl,saif-dma-channel = <5>;
				status = "disabled";
				status = "disabled";
			};
			};
@@ -763,6 +778,7 @@
			pwm: pwm@80064000 {
			pwm: pwm@80064000 {
				compatible = "fsl,imx28-pwm", "fsl,imx23-pwm";
				compatible = "fsl,imx28-pwm", "fsl,imx23-pwm";
				reg = <0x80064000 0x2000>;
				reg = <0x80064000 0x2000>;
				clocks = <&clks 44>;
				#pwm-cells = <2>;
				#pwm-cells = <2>;
				fsl,pwm-number = <8>;
				fsl,pwm-number = <8>;
				status = "disabled";
				status = "disabled";
@@ -777,6 +793,7 @@
				compatible = "fsl,imx28-auart", "fsl,imx23-auart";
				compatible = "fsl,imx28-auart", "fsl,imx23-auart";
				reg = <0x8006a000 0x2000>;
				reg = <0x8006a000 0x2000>;
				interrupts = <112 70 71>;
				interrupts = <112 70 71>;
				clocks = <&clks 45>;
				status = "disabled";
				status = "disabled";
			};
			};


@@ -784,6 +801,7 @@
				compatible = "fsl,imx28-auart", "fsl,imx23-auart";
				compatible = "fsl,imx28-auart", "fsl,imx23-auart";
				reg = <0x8006c000 0x2000>;
				reg = <0x8006c000 0x2000>;
				interrupts = <113 72 73>;
				interrupts = <113 72 73>;
				clocks = <&clks 45>;
				status = "disabled";
				status = "disabled";
			};
			};


@@ -791,6 +809,7 @@
				compatible = "fsl,imx28-auart", "fsl,imx23-auart";
				compatible = "fsl,imx28-auart", "fsl,imx23-auart";
				reg = <0x8006e000 0x2000>;
				reg = <0x8006e000 0x2000>;
				interrupts = <114 74 75>;
				interrupts = <114 74 75>;
				clocks = <&clks 45>;
				status = "disabled";
				status = "disabled";
			};
			};


@@ -798,6 +817,7 @@
				compatible = "fsl,imx28-auart", "fsl,imx23-auart";
				compatible = "fsl,imx28-auart", "fsl,imx23-auart";
				reg = <0x80070000 0x2000>;
				reg = <0x80070000 0x2000>;
				interrupts = <115 76 77>;
				interrupts = <115 76 77>;
				clocks = <&clks 45>;
				status = "disabled";
				status = "disabled";
			};
			};


@@ -805,6 +825,7 @@
				compatible = "fsl,imx28-auart", "fsl,imx23-auart";
				compatible = "fsl,imx28-auart", "fsl,imx23-auart";
				reg = <0x80072000 0x2000>;
				reg = <0x80072000 0x2000>;
				interrupts = <116 78 79>;
				interrupts = <116 78 79>;
				clocks = <&clks 45>;
				status = "disabled";
				status = "disabled";
			};
			};


@@ -812,18 +833,22 @@
				compatible = "arm,pl011", "arm,primecell";
				compatible = "arm,pl011", "arm,primecell";
				reg = <0x80074000 0x1000>;
				reg = <0x80074000 0x1000>;
				interrupts = <47>;
				interrupts = <47>;
				clocks = <&clks 45>, <&clks 26>;
				clock-names = "uart", "apb_pclk";
				status = "disabled";
				status = "disabled";
			};
			};


			usbphy0: usbphy@8007c000 {
			usbphy0: usbphy@8007c000 {
				compatible = "fsl,imx28-usbphy", "fsl,imx23-usbphy";
				compatible = "fsl,imx28-usbphy", "fsl,imx23-usbphy";
				reg = <0x8007c000 0x2000>;
				reg = <0x8007c000 0x2000>;
				clocks = <&clks 62>;
				status = "disabled";
				status = "disabled";
			};
			};


			usbphy1: usbphy@8007e000 {
			usbphy1: usbphy@8007e000 {
				compatible = "fsl,imx28-usbphy", "fsl,imx23-usbphy";
				compatible = "fsl,imx28-usbphy", "fsl,imx23-usbphy";
				reg = <0x8007e000 0x2000>;
				reg = <0x8007e000 0x2000>;
				clocks = <&clks 63>;
				status = "disabled";
				status = "disabled";
			};
			};
		};
		};
@@ -840,6 +865,7 @@
			compatible = "fsl,imx28-usb", "fsl,imx27-usb";
			compatible = "fsl,imx28-usb", "fsl,imx27-usb";
			reg = <0x80080000 0x10000>;
			reg = <0x80080000 0x10000>;
			interrupts = <93>;
			interrupts = <93>;
			clocks = <&clks 60>;
			fsl,usbphy = <&usbphy0>;
			fsl,usbphy = <&usbphy0>;
			status = "disabled";
			status = "disabled";
		};
		};
@@ -848,6 +874,7 @@
			compatible = "fsl,imx28-usb", "fsl,imx27-usb";
			compatible = "fsl,imx28-usb", "fsl,imx27-usb";
			reg = <0x80090000 0x10000>;
			reg = <0x80090000 0x10000>;
			interrupts = <92>;
			interrupts = <92>;
			clocks = <&clks 61>;
			fsl,usbphy = <&usbphy1>;
			fsl,usbphy = <&usbphy1>;
			status = "disabled";
			status = "disabled";
		};
		};
@@ -861,6 +888,8 @@
			compatible = "fsl,imx28-fec";
			compatible = "fsl,imx28-fec";
			reg = <0x800f0000 0x4000>;
			reg = <0x800f0000 0x4000>;
			interrupts = <101>;
			interrupts = <101>;
			clocks = <&clks 57>, <&clks 57>;
			clock-names = "ipg", "ahb";
			status = "disabled";
			status = "disabled";
		};
		};


@@ -868,6 +897,8 @@
			compatible = "fsl,imx28-fec";
			compatible = "fsl,imx28-fec";
			reg = <0x800f4000 0x4000>;
			reg = <0x800f4000 0x4000>;
			interrupts = <102>;
			interrupts = <102>;
			clocks = <&clks 57>, <&clks 57>;
			clock-names = "ipg", "ahb";
			status = "disabled";
			status = "disabled";
		};
		};


+10 −45
Original line number Original line Diff line number Diff line
@@ -14,6 +14,7 @@
#include <linux/err.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/io.h>
#include <linux/of.h>
#include <mach/common.h>
#include <mach/common.h>
#include <mach/mx23.h>
#include <mach/mx23.h>
#include "clk.h"
#include "clk.h"
@@ -71,44 +72,6 @@ static void __init clk_misc_init(void)
	__mxs_setl(30 << BP_FRAC_IOFRAC, FRAC);
	__mxs_setl(30 << BP_FRAC_IOFRAC, FRAC);
}
}


static struct clk_lookup uart_lookups[] = {
	{ .dev_id = "duart", },
	{ .dev_id = "mxs-auart.0", },
	{ .dev_id = "mxs-auart.1", },
	{ .dev_id = "8006c000.serial", },
	{ .dev_id = "8006e000.serial", },
	{ .dev_id = "80070000.serial", },
};

static struct clk_lookup hbus_lookups[] = {
	{ .dev_id = "imx23-dma-apbh", },
	{ .dev_id = "80004000.dma-apbh", },
};

static struct clk_lookup xbus_lookups[] = {
	{ .dev_id = "duart", .con_id = "apb_pclk"},
	{ .dev_id = "80070000.serial", .con_id = "apb_pclk"},
	{ .dev_id = "imx23-dma-apbx", },
	{ .dev_id = "80024000.dma-apbx", },
};

static struct clk_lookup ssp_lookups[] = {
	{ .dev_id = "imx23-mmc.0", },
	{ .dev_id = "imx23-mmc.1", },
	{ .dev_id = "80010000.ssp", },
	{ .dev_id = "80034000.ssp", },
};

static struct clk_lookup lcdif_lookups[] = {
	{ .dev_id = "imx23-fb", },
	{ .dev_id = "80030000.lcdif", },
};

static struct clk_lookup gpmi_lookups[] = {
	{ .dev_id = "imx23-gpmi-nand", },
	{ .dev_id = "8000c000.gpmi-nand", },
};

static const char *sel_pll[]  __initconst = { "pll", "ref_xtal", };
static const char *sel_pll[]  __initconst = { "pll", "ref_xtal", };
static const char *sel_cpu[]  __initconst = { "ref_cpu", "ref_xtal", };
static const char *sel_cpu[]  __initconst = { "ref_cpu", "ref_xtal", };
static const char *sel_pix[]  __initconst = { "ref_pix", "ref_xtal", };
static const char *sel_pix[]  __initconst = { "ref_pix", "ref_xtal", };
@@ -127,6 +90,7 @@ enum imx23_clk {
};
};


static struct clk *clks[clk_max];
static struct clk *clks[clk_max];
static struct clk_onecell_data clk_data;


static enum imx23_clk clks_init_on[] __initdata = {
static enum imx23_clk clks_init_on[] __initdata = {
	cpu, hbus, xbus, emi, uart,
	cpu, hbus, xbus, emi, uart,
@@ -134,6 +98,7 @@ static enum imx23_clk clks_init_on[] __initdata = {


int __init mx23_clocks_init(void)
int __init mx23_clocks_init(void)
{
{
	struct device_node *np;
	int i;
	int i;


	clk_misc_init();
	clk_misc_init();
@@ -188,14 +153,14 @@ int __init mx23_clocks_init(void)
			return PTR_ERR(clks[i]);
			return PTR_ERR(clks[i]);
		}
		}


	np = of_find_compatible_node(NULL, NULL, "fsl,imx23-clkctrl");
	if (np) {
		clk_data.clks = clks;
		clk_data.clk_num = ARRAY_SIZE(clks);
		of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
	}

	clk_register_clkdev(clks[clk32k], NULL, "timrot");
	clk_register_clkdev(clks[clk32k], NULL, "timrot");
	clk_register_clkdev(clks[pwm], NULL, "80064000.pwm");
	clk_register_clkdevs(clks[hbus], hbus_lookups, ARRAY_SIZE(hbus_lookups));
	clk_register_clkdevs(clks[xbus], xbus_lookups, ARRAY_SIZE(xbus_lookups));
	clk_register_clkdevs(clks[uart], uart_lookups, ARRAY_SIZE(uart_lookups));
	clk_register_clkdevs(clks[ssp], ssp_lookups, ARRAY_SIZE(ssp_lookups));
	clk_register_clkdevs(clks[gpmi], gpmi_lookups, ARRAY_SIZE(gpmi_lookups));
	clk_register_clkdevs(clks[lcdif], lcdif_lookups, ARRAY_SIZE(lcdif_lookups));


	for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
	for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
		clk_prepare_enable(clks[clks_init_on[i]]);
		clk_prepare_enable(clks[clks_init_on[i]]);
Loading