spi: tegra: Do not use clock name to get clock
Subsystems (12)
Prashant Gaikwad
maintainerPATCH v2 1/10 spi: tegra: Do not use clock name to get clock
Since Tegra spi devices do not have multiple clocks, no need to use clock name to get the clock.
---
This series depends on v4 of Tegra's ccf-rework patch series. Tested on Ventana (Tegra20) and Cardhu (Tegra30). Rebased on Tegra's for-3.9/soc and for-3.9/cleanup.
Changes from V1:
- Fixed clock lookup for SPI and nvec drivers.
- Add clock information for nvec in device tree.
--- drivers/spi/spi-tegra20-sflash.c | 2 +- drivers/spi/spi-tegra20-slink.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/spi/spi-tegra20-sflash.c +1 -1
@@ -525,7 +525,7 @@ static int tegra_sflash_probe(struct platform_device *pdev) goto exit_free_master; } - tsd->clk =devm_clk_get (&pdev->dev,"spi" ); + tsd->clk =devm_clk_get (&pdev->dev,NULL );if (IS_ERR (tsd->clk)) {dev_err (&pdev->dev,"can not get clock\n" ); ret =PTR_ERR (tsd->clk);
drivers/spi/spi-tegra20-slink.c +1 -1
@@ -1191,7 +1191,7 @@ static int tegra_slink_probe(struct platform_device *pdev) goto exit_free_master; } - tspi->clk =devm_clk_get (&pdev->dev,"slink" ); + tspi->clk =devm_clk_get (&pdev->dev,NULL );if (IS_ERR (tspi->clk)) {dev_err (&pdev->dev,"can not get clock\n" ); ret =PTR_ERR (tspi->clk);
Signature · 1 line
1.7.4.1
Prashant Gaikwad
maintainerPATCH v2 2/10 ARM: dt: tegra20: Add clock information
Add clock information to device nodes.
--- arch/arm/boot/dts/tegra20.dtsi | 44 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 44 insertions(+), 0 deletions(-)
arch/arm/boot/dts/tegra20.dtsi +44 -0
@@ -9,6 +9,7 @@ reg = <0x50000000 0x00024000>; interrupts = <0 65 0x04 /* mpcore syncpt */ 0 67 0x04>; /* mpcore general */ + clocks = <&tegra_car 28>; #address-cells = <1>; #size-cells = <1>;
@@ -19,41 +20,49 @@ compatible = "nvidia,tegra20-mpe"; reg = <0x54040000 0x00040000>; interrupts = <0 68 0x04>; + clocks = <&tegra_car 60>; }; vi { compatible = "nvidia,tegra20-vi"; reg = <0x54080000 0x00040000>; interrupts = <0 69 0x04>; + clocks = <&tegra_car 100>; }; epp { compatible = "nvidia,tegra20-epp"; reg = <0x540c0000 0x00040000>; interrupts = <0 70 0x04>; + clocks = <&tegra_car 19>; }; isp { compatible = "nvidia,tegra20-isp"; reg = <0x54100000 0x00040000>; interrupts = <0 71 0x04>; + clocks = <&tegra_car 23>; }; gr2d { compatible = "nvidia,tegra20-gr2d"; reg = <0x54140000 0x00040000>; interrupts = <0 72 0x04>; + clocks = <&tegra_car 21>; }; gr3d { compatible = "nvidia,tegra20-gr3d"; reg = <0x54180000 0x00040000>; + clocks = <&tegra_car 24>; }; dc at 54200000 { compatible = "nvidia,tegra20-dc"; reg = <0x54200000 0x00040000>; interrupts = <0 73 0x04>; + clocks = <&tegra_car 27>, <&tegra_car 121>; + clock-names = "disp1", "parent"; rgb { status = "disabled";
@@ -64,6 +73,8 @@ compatible = "nvidia,tegra20-dc"; reg = <0x54240000 0x00040000>; interrupts = <0 74 0x04>; + clocks = <&tegra_car 26>, <&tegra_car 121>; + clock-names = "disp2", "parent"; rgb { status = "disabled";
@@ -75,6 +86,8 @@ reg = <0x54280000 0x00040000>; interrupts = <0 75 0x04>; status = "disabled"; + clocks = <&tegra_car 51>, <&tegra_car 117>; + clock-names = "hdmi", "parent"; }; tvo {
@@ -82,12 +95,14 @@ reg = <0x542c0000 0x00040000>; interrupts = <0 76 0x04>; status = "disabled"; + clocks = <&tegra_car 102>; }; dsi { compatible = "nvidia,tegra20-dsi"; reg = <0x54300000 0x00040000>; status = "disabled"; + clocks = <&tegra_car 48>; }; };
@@ -148,6 +163,7 @@ 0 117 0x04 0 118 0x04 0 119 0x04>; + clocks = <&tegra_car 34>; }; ahb {
@@ -190,6 +206,7 @@ interrupts = <0 13 0x04>; nvidia,dma-request-selector = <&apbdma 2>; status = "disabled"; + clocks = <&tegra_car 11>; }; tegra_i2s2: i2s at 70002a00 {
@@ -198,6 +215,7 @@ interrupts = <0 3 0x04>; nvidia,dma-request-selector = <&apbdma 1>; status = "disabled"; + clocks = <&tegra_car 18>; }; serial at 70006000 {
@@ -206,6 +224,7 @@ reg-shift = <2>; interrupts = <0 36 0x04>; status = "disabled"; + clocks = <&tegra_car 6>; }; serial at 70006040 {
@@ -214,6 +233,7 @@ reg-shift = <2>; interrupts = <0 37 0x04>; status = "disabled"; + clocks = <&tegra_car 96>; }; serial at 70006200 {
@@ -222,6 +242,7 @@ reg-shift = <2>; interrupts = <0 46 0x04>; status = "disabled"; + clocks = <&tegra_car 55>; }; serial at 70006300 {
@@ -230,6 +251,7 @@ reg-shift = <2>; interrupts = <0 90 0x04>; status = "disabled"; + clocks = <&tegra_car 65>; }; serial at 70006400 {
@@ -238,12 +260,14 @@ reg-shift = <2>; interrupts = <0 91 0x04>; status = "disabled"; + clocks = <&tegra_car 66>; }; pwm: pwm { compatible = "nvidia,tegra20-pwm"; reg = <0x7000a000 0x100>; #pwm-cells = <2>; + clocks = <&tegra_car 17>; }; rtc {
@@ -259,6 +283,8 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + clocks = <&tegra_car 12>, <&tegra_car 124>; + clock-names = "div-clk", "fast-clk"; }; spi at 7000c380 {
@@ -269,6 +295,7 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + clocks = <&tegra_car 43>; }; i2c at 7000c400 {
@@ -278,6 +305,8 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + clocks = <&tegra_car 54>, <&tegra_car 124>; + clock-names = "div-clk", "fast-clk"; }; i2c at 7000c500 {
@@ -287,6 +316,8 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + clocks = <&tegra_car 67>, <&tegra_car 124>; + clock-names = "div-clk", "fast-clk"; }; i2c at 7000d000 {
@@ -296,6 +327,8 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + clocks = <&tegra_car 47>, <&tegra_car 124>; + clock-names = "div-clk", "fast-clk"; }; spi at 7000d400 {
@@ -306,6 +339,7 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + clocks = <&tegra_car 41>; }; spi at 7000d600 {
@@ -316,6 +350,7 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + clocks = <&tegra_car 44>; }; spi at 7000d800 {
@@ -326,6 +361,7 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + clocks = <&tegra_car 46>; }; spi at 7000da00 {
@@ -336,6 +372,7 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + clocks = <&tegra_car 68>; }; pmc {
@@ -370,6 +407,7 @@ phy_type = "utmi"; nvidia,has-legacy-mode; status = "disabled"; + clocks = <&tegra_car 22>; }; usb at c5004000 {
@@ -378,6 +416,7 @@ interrupts = <0 21 0x04>; phy_type = "ulpi"; status = "disabled"; + clocks = <&tegra_car 58>; }; usb at c5008000 {
@@ -386,6 +425,7 @@ interrupts = <0 97 0x04>; phy_type = "utmi"; status = "disabled"; + clocks = <&tegra_car 59>; }; sdhci at c8000000 {
@@ -393,6 +433,7 @@ reg = <0xc8000000 0x200>; interrupts = <0 14 0x04>; status = "disabled"; + clocks = <&tegra_car 14>; }; sdhci at c8000200 {
@@ -400,6 +441,7 @@ reg = <0xc8000200 0x200>; interrupts = <0 15 0x04>; status = "disabled"; + clocks = <&tegra_car 9>; }; sdhci at c8000400 {
@@ -407,6 +449,7 @@ reg = <0xc8000400 0x200>; interrupts = <0 19 0x04>; status = "disabled"; + clocks = <&tegra_car 69>; }; sdhci at c8000600 {
@@ -414,6 +457,7 @@ reg = <0xc8000600 0x200>; interrupts = <0 31 0x04>; status = "disabled"; + clocks = <&tegra_car 15>; }; pmu {
Signature · 1 line
1.7.4.1
Prashant Gaikwad
maintainerPATCH v2 3/10 ARM: dt: tegra30: Add clock information
In reply to Prashant GaikwadAdd clock information to device nodes.
--- arch/arm/boot/dts/tegra30.dtsi | 55 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 54 insertions(+), 1 deletions(-)
arch/arm/boot/dts/tegra30.dtsi +54 -1
@@ -9,6 +9,7 @@ reg = <0x50000000 0x00024000>; interrupts = <0 65 0x04 /* mpcore syncpt */ 0 67 0x04>; /* mpcore general */ + clocks = <&tegra_car 28>; #address-cells = <1>; #size-cells = <1>;
@@ -19,41 +20,49 @@ compatible = "nvidia,tegra30-mpe"; reg = <0x54040000 0x00040000>; interrupts = <0 68 0x04>; + clocks = <&tegra_car 60>; }; vi { compatible = "nvidia,tegra30-vi"; reg = <0x54080000 0x00040000>; interrupts = <0 69 0x04>; + clocks = <&tegra_car 164>; }; epp { compatible = "nvidia,tegra30-epp"; reg = <0x540c0000 0x00040000>; interrupts = <0 70 0x04>; + clocks = <&tegra_car 19>; }; isp { compatible = "nvidia,tegra30-isp"; reg = <0x54100000 0x00040000>; interrupts = <0 71 0x04>; + clocks = <&tegra_car 23>; }; gr2d { compatible = "nvidia,tegra30-gr2d"; reg = <0x54140000 0x00040000>; interrupts = <0 72 0x04>; + clocks = <&tegra_car 21>; }; gr3d { compatible = "nvidia,tegra30-gr3d"; reg = <0x54180000 0x00040000>; + clocks = <&tegra_car 24>; }; dc at 54200000 { compatible = "nvidia,tegra30-dc"; reg = <0x54200000 0x00040000>; interrupts = <0 73 0x04>; + clocks = <&tegra_car 27>, <&tegra_car 179>; + clock-names = "disp1", "parent"; rgb { status = "disabled";
@@ -64,6 +73,8 @@ compatible = "nvidia,tegra30-dc"; reg = <0x54240000 0x00040000>; interrupts = <0 74 0x04>; + clocks = <&tegra_car 26>, <&tegra_car 179>; + clock-names = "disp2", "parent"; rgb { status = "disabled";
@@ -75,6 +86,8 @@ reg = <0x54280000 0x00040000>; interrupts = <0 75 0x04>; status = "disabled"; + clocks = <&tegra_car 51>, <&tegra_car 189>; + clock-names = "hdmi", "parent"; }; tvo {
@@ -82,12 +95,14 @@ reg = <0x542c0000 0x00040000>; interrupts = <0 76 0x04>; status = "disabled"; + clocks = <&tegra_car 169>; }; dsi { compatible = "nvidia,tegra30-dsi"; reg = <0x54300000 0x00040000>; status = "disabled"; + clocks = <&tegra_car 48>; }; };
@@ -166,6 +181,7 @@ 0 141 0x04 0 142 0x04 0 143 0x04>; + clocks = <&tegra_car 34>; }; ahb: ahb {
@@ -202,6 +218,7 @@ reg-shift = <2>; interrupts = <0 36 0x04>; status = "disabled"; + clocks = <&tegra_car 6>; }; serial at 70006040 {
@@ -210,6 +227,7 @@ reg-shift = <2>; interrupts = <0 37 0x04>; status = "disabled"; + clocks = <&tegra_car 160>; }; serial at 70006200 {
@@ -218,6 +236,7 @@ reg-shift = <2>; interrupts = <0 46 0x04>; status = "disabled"; + clocks = <&tegra_car 55>; }; serial at 70006300 {
@@ -226,6 +245,7 @@ reg-shift = <2>; interrupts = <0 90 0x04>; status = "disabled"; + clocks = <&tegra_car 65>; }; serial at 70006400 {
@@ -234,12 +254,14 @@ reg-shift = <2>; interrupts = <0 91 0x04>; status = "disabled"; + clocks = <&tegra_car 66>; }; pwm: pwm { compatible = "nvidia,tegra30-pwm", "nvidia,tegra20-pwm"; reg = <0x7000a000 0x100>; #pwm-cells = <2>; + clocks = <&tegra_car 17>; }; rtc {
@@ -255,6 +277,8 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + clocks = <&tegra_car 12>, <&tegra_car 182>; + clock-names = "div-clk", "fast-clk"; }; i2c at 7000c400 {
@@ -264,6 +288,8 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + clocks = <&tegra_car 54>, <&tegra_car 182>; + clock-names = "div-clk", "fast-clk"; }; i2c at 7000c500 {
@@ -273,6 +299,8 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + clocks = <&tegra_car 67>, <&tegra_car 182>; + clock-names = "div-clk", "fast-clk"; }; i2c at 7000c700 {
@@ -282,6 +310,8 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + clocks = <&tegra_car 103>, <&tegra_car 182>; + clock-names = "div-clk", "fast-clk"; }; i2c at 7000d000 {
@@ -291,6 +321,8 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + clocks = <&tegra_car 47>, <&tegra_car 182>; + clock-names = "div-clk", "fast-clk"; }; spi at 7000d400 {
@@ -301,6 +333,7 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + clocks = <&tegra_car 41>; }; spi at 7000d600 {
@@ -311,6 +344,7 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + clocks = <&tegra_car 44>; }; spi at 7000d800 {
@@ -321,6 +355,7 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + clocks = <&tegra_car 46>; }; spi at 7000da00 {
@@ -331,6 +366,7 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + clocks = <&tegra_car 68>; }; spi at 7000dc00 {
@@ -341,6 +377,7 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + clocks = <&tegra_car 104>; }; spi at 7000de00 {
@@ -351,6 +388,7 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + clocks = <&tegra_car 105>; }; pmc {
@@ -383,7 +421,13 @@ 0x70080200 0x100>; interrupts = <0 103 0x04>; nvidia,dma-request-selector = <&apbdma 1>; - + clocks = <&tegra_car 106>, <&tegra_car 107>, <&tegra_car 30>, + <&tegra_car 11>, <&tegra_car 18>, <&tegra_car 101>, + <&tegra_car 102>, <&tegra_car 108>, <&tegra_car 109>, + <&tegra_car 110>, <&tegra_car 162>; + clock-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2", + "i2s3", "i2s4", "dam0", "dam1", "dam2", + "spdif_in"; ranges; #address-cells = <1>; #size-cells = <1>;
@@ -393,6 +437,7 @@ reg = <0x70080300 0x100>; nvidia,ahub-cif-ids = <4 4>; status = "disabled"; + clocks = <&tegra_car 30>; }; tegra_i2s1: i2s at 70080400 {
@@ -400,6 +445,7 @@ reg = <0x70080400 0x100>; nvidia,ahub-cif-ids = <5 5>; status = "disabled"; + clocks = <&tegra_car 11>; }; tegra_i2s2: i2s at 70080500 {
@@ -407,6 +453,7 @@ reg = <0x70080500 0x100>; nvidia,ahub-cif-ids = <6 6>; status = "disabled"; + clocks = <&tegra_car 18>; }; tegra_i2s3: i2s at 70080600 {
@@ -414,6 +461,7 @@ reg = <0x70080600 0x100>; nvidia,ahub-cif-ids = <7 7>; status = "disabled"; + clocks = <&tegra_car 101>; }; tegra_i2s4: i2s at 70080700 {
@@ -421,6 +469,7 @@ reg = <0x70080700 0x100>; nvidia,ahub-cif-ids = <8 8>; status = "disabled"; + clocks = <&tegra_car 102>; }; };
@@ -429,6 +478,7 @@ reg = <0x78000000 0x200>; interrupts = <0 14 0x04>; status = "disabled"; + clocks = <&tegra_car 14>; }; sdhci at 78000200 {
@@ -436,6 +486,7 @@ reg = <0x78000200 0x200>; interrupts = <0 15 0x04>; status = "disabled"; + clocks = <&tegra_car 9>; }; sdhci at 78000400 {
@@ -443,6 +494,7 @@ reg = <0x78000400 0x200>; interrupts = <0 19 0x04>; status = "disabled"; + clocks = <&tegra_car 69>; }; sdhci at 78000600 {
@@ -450,6 +502,7 @@ reg = <0x78000600 0x200>; interrupts = <0 31 0x04>; status = "disabled"; + clocks = <&tegra_car 15>; }; pmu {
Signature · 1 line
1.7.4.1
PATCH v2 3/10 ARM: dt: tegra30: Add clock information
arch/arm/boot/dts/tegra30.dtsi line 58
Quoted 9 lines · Prashant Gaikwad
arch/arm/boot/dts/tegra30.dtsi +1
-0gr3d { compatible = "nvidia,tegra30-gr3d"; reg = <0x54180000 0x00040000>; + clocks = <&tegra_car 24>; };
In Tegra3, 3D has two clocks. I believe you'd need to add <&tegra_car 98> here.
Terje
PATCH v2 3/10 ARM: dt: tegra30: Add clock information
Quoted 13 lines · Terje Bergstr?m
arch/arm/boot/dts/tegra30.dtsi
Quoted 9 lines · Prashant Gaikwad
arch/arm/boot/dts/tegra30.dtsi +1
-0gr3d { compatible = "nvidia,tegra30-gr3d"; reg = <0x54180000 0x00040000>; + clocks = <&tegra_car 24>; };In Tegra3, 3D has two clocks. I believe you'd need to add <
&tegra_car98> here.
Thanks. I've squashed the following into the patch. Do those clock names make sense to you?
arch/arm/boot/dts/tegra30.dtsi +2 -1
@@ -54,7 +54,8 @@ gr3d { compatible = "nvidia,tegra30-gr3d"; reg = <0x54180000 0x00040000>; - clocks = <&tegra_car 24>; + clocks = <&tegra_car 24 &tegra_car 98>; + clock-names = "3d", "3d2"; }; dc at 54200000 {
PATCH v2 3/10 ARM: dt: tegra30: Add clock information
Quoted 12 lines · Stephen Warren
Quoted 2 lines · Terje Bergstr?m
In Tegra3, 3D has two clocks. I believe you'd need to add <
&tegra_car98> here.Thanks. I've squashed the following into the patch. Do those clock names make sense to you?
arch/arm/boot/dts/tegra30.dtsi +0
-0
arch/arm/boot/dts/tegra30.dtsi line 61
Quoted 9 lines
arch/arm/boot/dts/tegra30.dtsi +2
-1@@ -54,7 +54,8 @@ gr3d { compatible = "nvidia,tegra30-gr3d"; reg = <0x54180000 0x00040000>; - clocks = <&tegra_car 24>; + clocks = <&tegra_car 24 &tegra_car 98>; + clock-names = "3d", "3d2"; }; dc at 54200000 {
Yep, this looks right.
Terje
Prashant Gaikwad
maintainerPATCH v2 4/10 ARM: dt: tegra: paz00: add clock information
In reply to Prashant GaikwadAdd clock i2c clock information to device node.
--- arch/arm/boot/dts/tegra20-paz00.dts | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/boot/dts/tegra20-paz00.dts +2 -0
@@ -266,6 +266,8 @@ clock-frequency = <80000>; request-gpios = <&gpio 170 0>; /* gpio PV2 */ slave-addr = <138>; + clocks = <&tegra_car 67>, <&tegra_car 124>; + clock-names = "div-clk", "fast-clk"; }; i2c at 7000d000 {
Signature · 1 line
1.7.4.1
Prashant Gaikwad
maintainerPATCH v2 5/10 staging: nvec: remove use of clk_get_sys
In reply to Prashant GaikwadAs clock information is added to device tree clock can be looked up using clk_get. Remove use of clk_get_sys.
--- drivers/staging/nvec/nvec.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/nvec/nvec.c +1 -1
@@ -770,7 +770,7 @@ static int tegra_nvec_probe(struct platform_device *pdev)return -ENODEV ; } - i2c_clk =clk_get_sys ("tegra-i2c.2" ,"div-clk" ); + i2c_clk =clk_get (&pdev->dev,"div-clk" );if (IS_ERR (i2c_clk)) {dev_err (nvec->dev,"failed to get controller clock\n" );return -ENODEV ;
Signature · 1 line
1.7.4.1
Prashant Gaikwad
maintainerPATCH v2 6/10 ASoC: tegra: remove auxdata
In reply to Prashant GaikwadConfiglink clock information is added to device tree. Get the clocks using device node. Remove AUXDATA.
--- sound/soc/tegra/tegra30_ahub.c | 14 ++------------ 1 files changed, 2 insertions(+), 12 deletions(-)
sound/soc/tegra/tegra30_ahub.c +2 -12
@@ -299,15 +299,6 @@ static const char * const configlink_clocks[] = { "spdif_in", }; -struct of_dev_auxdata ahub_auxdata[] = { -OF_DEV_AUXDATA ("nvidia,tegra30-i2s" ,0x70080300 ,"tegra30-i2s.0" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-i2s" ,0x70080400 ,"tegra30-i2s.1" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-i2s" ,0x70080500 ,"tegra30-i2s.2" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-i2s" ,0x70080600 ,"tegra30-i2s.3" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-i2s" ,0x70080700 ,"tegra30-i2s.4" ,NULL ), - {} -}; -#define LAST_REG (name) \ (TEGRA30_AHUB_##name + \ (TEGRA30_AHUB_##name##_STRIDE * TEGRA30_AHUB_##name##_COUNT) - 4)
@@ -451,7 +442,7 @@ static int tegra30_ahub_probe(struct platform_device *pdev)* Ensure that here. */ for (i =0 ; i <ARRAY_SIZE (configlink_clocks); i++) { - clk =clk_get_sys (NULL , configlink_clocks[i]); + clk =clk_get (&pdev->dev, configlink_clocks[i]);if (IS_ERR (clk)) {dev_err (&pdev->dev,"Can't get clock %s\n" , configlink_clocks[i]);
@@ -569,8 +560,7 @@ static int tegra30_ahub_probe(struct platform_device *pdev) goto err_pm_disable; } -of_platform_populate (pdev->dev.of_node,NULL , ahub_auxdata, - &pdev->dev); +of_platform_populate (pdev->dev.of_node,NULL ,NULL , &pdev->dev);return 0 ;
Signature · 1 line
1.7.4.1
A message that is not in the archive (sent off-list or not yet received): 1357891289-23500-6-git-send-email-pgaikwad-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org
Re: [PATCH v2 06/10] ASoC: tegra: remove auxdata
Quoted 2 lines · Prashant Gaikwad
Configlink clock information is added to device tree. Get the clocks using device node. Remove AUXDATA.
Cc'ing in the ASoC maintainers as an FYI and for Acks; this patch needs to go through the Tegra tree due to dependencies.
Quoted 46 lines
Signed-off-by Prashant Gaikwad <[email protected]>--- sound/soc/tegra/tegra30_ahub.c | 14 ++------------ 1 files changed, 2 insertions(+), 12 deletions(-)sound/soc/tegra/tegra30_ahub.c +2
-12@@ -299,15 +299,6 @@ static const char * const configlink_clocks[] = { "spdif_in", }; -struct of_dev_auxdata ahub_auxdata[] = { -OF_DEV_AUXDATA ("nvidia,tegra30-i2s" ,0x70080300 ,"tegra30-i2s.0" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-i2s" ,0x70080400 ,"tegra30-i2s.1" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-i2s" ,0x70080500 ,"tegra30-i2s.2" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-i2s" ,0x70080600 ,"tegra30-i2s.3" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-i2s" ,0x70080700 ,"tegra30-i2s.4" ,NULL ), - {} -}; -#define LAST_REG (name) \ (TEGRA30_AHUB_##name + \ (TEGRA30_AHUB_##name##_STRIDE * TEGRA30_AHUB_##name##_COUNT) - 4)@@ -451,7 +442,7 @@ static int tegra30_ahub_probe(struct platform_device *pdev)* Ensure that here. */ for (i =0 ; i <ARRAY_SIZE (configlink_clocks); i++) { - clk =clk_get_sys (NULL , configlink_clocks[i]); + clk =clk_get (&pdev->dev, configlink_clocks[i]);if (IS_ERR (clk)) {dev_err (&pdev->dev,"Can't get clock %s\n" , configlink_clocks[i]);@@ -569,8 +560,7 @@ static int tegra30_ahub_probe(struct platform_device *pdev) goto err_pm_disable; } -of_platform_populate (pdev->dev.of_node,NULL , ahub_auxdata, - &pdev->dev); +of_platform_populate (pdev->dev.of_node,NULL ,NULL , &pdev->dev);return 0 ;
A message that is not in the archive (sent off-list or not yet received): [email protected]
Mark Brown
Acked-byRe: [PATCH v2 06/10] ASoC: tegra: remove auxdata
Quoted 6 lines · Stephen Warren
Quoted 2 lines · Prashant Gaikwad
Configlink clock information is added to device tree. Get the clocks using device node. Remove AUXDATA.
Cc'ing in the ASoC maintainers as an FYI and for Acks; this patch needs to go through the Tegra tree due to dependencies.
Prashant Gaikwad
maintainerPATCH v2 7/10 arm: tegra20: remove auxdata
In reply to Prashant GaikwadRemove AUXDATA as clock are initialized from device node.
--- arch/arm/mach-tegra/board-dt-tegra20.c | 26 +------------------------- 1 files changed, 1 insertions(+), 25 deletions(-)
arch/arm/mach-tegra/board-dt-tegra20.c +1 -25
@@ -69,37 +69,13 @@ static struct tegra_ehci_platform_data tegra_ehci3_pdata = { .vbus_gpio = -1, }; -static struct of_dev_auxdata tegra20_auxdata_lookup[]__initdata = { -OF_DEV_AUXDATA ("nvidia,tegra20-sdhci" ,TEGRA_SDMMC1_BASE ,"sdhci-tegra.0" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-sdhci" ,TEGRA_SDMMC2_BASE ,"sdhci-tegra.1" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-sdhci" ,TEGRA_SDMMC3_BASE ,"sdhci-tegra.2" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-sdhci" ,TEGRA_SDMMC4_BASE ,"sdhci-tegra.3" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-i2c" ,TEGRA_I2C_BASE ,"tegra-i2c.0" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-i2c" ,TEGRA_I2C2_BASE ,"tegra-i2c.1" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-i2c" ,TEGRA_I2C3_BASE ,"tegra-i2c.2" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-i2c-dvc" ,TEGRA_DVC_BASE ,"tegra-i2c.3" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-i2s" ,TEGRA_I2S1_BASE ,"tegra20-i2s.0" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-i2s" ,TEGRA_I2S2_BASE ,"tegra20-i2s.1" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-das" ,TEGRA_APB_MISC_DAS_BASE ,"tegra20-das" ,NULL ), +struct of_dev_auxdata tegra20_auxdata_lookup[]__initdata = {OF_DEV_AUXDATA ("nvidia,tegra20-ehci" ,TEGRA_USB_BASE ,"tegra-ehci.0" , &tegra_ehci1_pdata),OF_DEV_AUXDATA ("nvidia,tegra20-ehci" ,TEGRA_USB2_BASE ,"tegra-ehci.1" , &tegra_ehci2_pdata),OF_DEV_AUXDATA ("nvidia,tegra20-ehci" ,TEGRA_USB3_BASE ,"tegra-ehci.2" , &tegra_ehci3_pdata), -OF_DEV_AUXDATA ("nvidia,tegra20-apbdma" ,TEGRA_APB_DMA_BASE ,"tegra-apbdma" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-pwm" ,TEGRA_PWFM_BASE ,"tegra-pwm" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-sflash" ,0x7000c380 ,"spi" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-slink" ,0x7000D400 ,"spi_tegra.0" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-slink" ,0x7000D600 ,"spi_tegra.1" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-slink" ,0x7000D800 ,"spi_tegra.2" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-slink" ,0x7000DA00 ,"spi_tegra.3" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-host1x" ,0x50000000 ,"host1x" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-dc" ,0x54200000 ,"tegradc.0" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-dc" ,0x54240000 ,"tegradc.1" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-hdmi" ,0x54280000 ,"hdmi" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-dsi" ,0x54300000 ,"dsi" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-tvo" ,0x542c0000 ,"tvo" ,NULL ), {} };
Signature · 1 line
1.7.4.1
Prashant Gaikwad
maintainerPATCH v2 8/10 arm: tegra30: remove auxdata
In reply to Prashant GaikwadRemove AUXDATA as clocks are initialized from device node.
--- arch/arm/mach-tegra/board-dt-tegra30.c | 31 +------------------------------ 1 files changed, 1 insertions(+), 30 deletions(-)
arch/arm/mach-tegra/board-dt-tegra30.c +1 -30
@@ -38,38 +38,9 @@#include "common.h" #include "iomap.h" -static struct of_dev_auxdata tegra30_auxdata_lookup[]__initdata = { -OF_DEV_AUXDATA ("nvidia,tegra20-sdhci" ,0x78000000 ,"sdhci-tegra.0" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-sdhci" ,0x78000200 ,"sdhci-tegra.1" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-sdhci" ,0x78000400 ,"sdhci-tegra.2" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-sdhci" ,0x78000600 ,"sdhci-tegra.3" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-i2c" ,0x7000C000 ,"tegra-i2c.0" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-i2c" ,0x7000C400 ,"tegra-i2c.1" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-i2c" ,0x7000C500 ,"tegra-i2c.2" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-i2c" ,0x7000C700 ,"tegra-i2c.3" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra20-i2c" ,0x7000D000 ,"tegra-i2c.4" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-ahub" ,0x70080000 ,"tegra30-ahub" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-apbdma" ,0x6000a000 ,"tegra-apbdma" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-pwm" ,TEGRA_PWFM_BASE ,"tegra-pwm" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-slink" ,0x7000D400 ,"spi_tegra.0" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-slink" ,0x7000D600 ,"spi_tegra.1" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-slink" ,0x7000D800 ,"spi_tegra.2" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-slink" ,0x7000DA00 ,"spi_tegra.3" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-slink" ,0x7000DC00 ,"spi_tegra.4" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-slink" ,0x7000DE00 ,"spi_tegra.5" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-host1x" ,0x50000000 ,"host1x" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-dc" ,0x54200000 ,"tegradc.0" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-dc" ,0x54240000 ,"tegradc.1" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-hdmi" ,0x54280000 ,"hdmi" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-dsi" ,0x54300000 ,"dsi" ,NULL ), -OF_DEV_AUXDATA ("nvidia,tegra30-tvo" ,0x542c0000 ,"tvo" ,NULL ), - {} -}; -static void __init tegra30_dt_init (void ) { -of_platform_populate (NULL , of_default_bus_match_table, - tegra30_auxdata_lookup,NULL ); +of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL ); }static const char *tegra30_dt_board_compat[] = {
Signature · 1 line
1.7.4.1
Prashant Gaikwad
maintainerPATCH v2 9/10 clk: tegra20: remove unused TEGRA_CLK_DUPLICATE()s
In reply to Prashant GaikwadWith device tree support added for Tegra clocks look up is done from device tree, remove unused TEGRA_CLK_DUPLICATE()s.
--- drivers/clk/tegra/clk-tegra20.c | 17 ----------------- 1 files changed, 0 insertions(+), 17 deletions(-)
drivers/clk/tegra/clk-tegra20.c +0 -17
@@ -1174,28 +1174,11 @@ static __initdata struct tegra_clk_init_table init_table[] = {* table under two names. */ static struct tegra_clk_duplicate tegra_clk_duplicates[] = { -TEGRA_CLK_DUPLICATE (uarta,"serial8250.0" ,NULL ), -TEGRA_CLK_DUPLICATE (uartb,"serial8250.1" ,NULL ), -TEGRA_CLK_DUPLICATE (uartc,"serial8250.2" ,NULL ), -TEGRA_CLK_DUPLICATE (uartd,"serial8250.3" ,NULL ), -TEGRA_CLK_DUPLICATE (uarte,"serial8250.4" ,NULL ),TEGRA_CLK_DUPLICATE (usbd,"utmip-pad" ,NULL ),TEGRA_CLK_DUPLICATE (usbd,"tegra-ehci.0" ,NULL ),TEGRA_CLK_DUPLICATE (usbd,"tegra-otg" ,NULL ), -TEGRA_CLK_DUPLICATE (pll_p,"tegradc.0" ,"parent" ), -TEGRA_CLK_DUPLICATE (pll_p,"tegradc.1" ,"parent" ), -TEGRA_CLK_DUPLICATE (pll_d_out0,"hdmi" ,"parent" ), -TEGRA_CLK_DUPLICATE (gr2d,"tegra_grhost" ,"gr2d" ), -TEGRA_CLK_DUPLICATE (gr3d,"tegra_grhost" ,"gr3d" ), -TEGRA_CLK_DUPLICATE (epp,"tegra_grhost" ,"epp" ), -TEGRA_CLK_DUPLICATE (mpe,"tegra_grhost" ,"mpe" ), -TEGRA_CLK_DUPLICATE (vde,"tegra-aes" ,"vde" ),TEGRA_CLK_DUPLICATE (cclk,NULL ,"cpu" ),TEGRA_CLK_DUPLICATE (twd,"smp_twd" ,NULL ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.0" ,"fast-clk" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.1" ,"fast-clk" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.2" ,"fast-clk" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.3" ,"fast-clk" ),TEGRA_CLK_DUPLICATE (clk_max,NULL ,NULL ),/* Must be the last entry */ };
Signature · 1 line
1.7.4.1
PATCH v2 9/10 clk: tegra20: remove unused TEGRA_CLK_DUPLICATE()s
Quoted 2 lines · Prashant Gaikwad
With device tree support added for Tegra clocks look up is done from device tree, remove unused TEGRA_CLK_DUPLICATE()s.
Cc'ing in the drivers/clk maintainer as an FYI and for Acks; this patch needs to go through the Tegra tree due to dependencies.
Quoted 39 lines
Signed-off-by Prashant Gaikwad <[email protected]>--- drivers/clk/tegra/clk-tegra20.c | 17 ----------------- 1 files changed, 0 insertions(+), 17 deletions(-)drivers/clk/tegra/clk-tegra20.c +0
-17@@ -1174,28 +1174,11 @@ static __initdata struct tegra_clk_init_table init_table[] = {* table under two names. */ static struct tegra_clk_duplicate tegra_clk_duplicates[] = { -TEGRA_CLK_DUPLICATE (uarta,"serial8250.0" ,NULL ), -TEGRA_CLK_DUPLICATE (uartb,"serial8250.1" ,NULL ), -TEGRA_CLK_DUPLICATE (uartc,"serial8250.2" ,NULL ), -TEGRA_CLK_DUPLICATE (uartd,"serial8250.3" ,NULL ), -TEGRA_CLK_DUPLICATE (uarte,"serial8250.4" ,NULL ),TEGRA_CLK_DUPLICATE (usbd,"utmip-pad" ,NULL ),TEGRA_CLK_DUPLICATE (usbd,"tegra-ehci.0" ,NULL ),TEGRA_CLK_DUPLICATE (usbd,"tegra-otg" ,NULL ), -TEGRA_CLK_DUPLICATE (pll_p,"tegradc.0" ,"parent" ), -TEGRA_CLK_DUPLICATE (pll_p,"tegradc.1" ,"parent" ), -TEGRA_CLK_DUPLICATE (pll_d_out0,"hdmi" ,"parent" ), -TEGRA_CLK_DUPLICATE (gr2d,"tegra_grhost" ,"gr2d" ), -TEGRA_CLK_DUPLICATE (gr3d,"tegra_grhost" ,"gr3d" ), -TEGRA_CLK_DUPLICATE (epp,"tegra_grhost" ,"epp" ), -TEGRA_CLK_DUPLICATE (mpe,"tegra_grhost" ,"mpe" ), -TEGRA_CLK_DUPLICATE (vde,"tegra-aes" ,"vde" ),TEGRA_CLK_DUPLICATE (cclk,NULL ,"cpu" ),TEGRA_CLK_DUPLICATE (twd,"smp_twd" ,NULL ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.0" ,"fast-clk" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.1" ,"fast-clk" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.2" ,"fast-clk" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.3" ,"fast-clk" ),TEGRA_CLK_DUPLICATE (clk_max,NULL ,NULL ),/* Must be the last entry */ };
PATCH v2 9/10 clk: tegra20: remove unused TEGRA_CLK_DUPLICATE()s
Quoting Stephen Warren (2013-01-11 13:00:55)
Quoted 7 lines · Prashant Gaikwad
Quoted 2 lines
With device tree support added for Tegra clocks look up is done from device tree, remove unused TEGRA_CLK_DUPLICATE()s.
Cc'ing in the
drivers/clkmaintainer as an FYI and for Acks; this patch needs to go through the Tegra tree due to dependencies.
Quoted 39 lines
Quoted 39 lines
Signed-off-by Prashant Gaikwad <[email protected]>--- drivers/clk/tegra/clk-tegra20.c | 17 ----------------- 1 files changed, 0 insertions(+), 17 deletions(-)drivers/clk/tegra/clk-tegra20.c +0
-17@@ -1174,28 +1174,11 @@ static __initdata struct tegra_clk_init_table init_table[] = {* table under two names. */ static struct tegra_clk_duplicate tegra_clk_duplicates[] = { -TEGRA_CLK_DUPLICATE (uarta,"serial8250.0" ,NULL ), -TEGRA_CLK_DUPLICATE (uartb,"serial8250.1" ,NULL ), -TEGRA_CLK_DUPLICATE (uartc,"serial8250.2" ,NULL ), -TEGRA_CLK_DUPLICATE (uartd,"serial8250.3" ,NULL ), -TEGRA_CLK_DUPLICATE (uarte,"serial8250.4" ,NULL ),TEGRA_CLK_DUPLICATE (usbd,"utmip-pad" ,NULL ),TEGRA_CLK_DUPLICATE (usbd,"tegra-ehci.0" ,NULL ),TEGRA_CLK_DUPLICATE (usbd,"tegra-otg" ,NULL ), -TEGRA_CLK_DUPLICATE (pll_p,"tegradc.0" ,"parent" ), -TEGRA_CLK_DUPLICATE (pll_p,"tegradc.1" ,"parent" ), -TEGRA_CLK_DUPLICATE (pll_d_out0,"hdmi" ,"parent" ), -TEGRA_CLK_DUPLICATE (gr2d,"tegra_grhost" ,"gr2d" ), -TEGRA_CLK_DUPLICATE (gr3d,"tegra_grhost" ,"gr3d" ), -TEGRA_CLK_DUPLICATE (epp,"tegra_grhost" ,"epp" ), -TEGRA_CLK_DUPLICATE (mpe,"tegra_grhost" ,"mpe" ), -TEGRA_CLK_DUPLICATE (vde,"tegra-aes" ,"vde" ),TEGRA_CLK_DUPLICATE (cclk,NULL ,"cpu" ),TEGRA_CLK_DUPLICATE (twd,"smp_twd" ,NULL ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.0" ,"fast-clk" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.1" ,"fast-clk" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.2" ,"fast-clk" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.3" ,"fast-clk" ),TEGRA_CLK_DUPLICATE (clk_max,NULL ,NULL ),/* Must be the last entry */ };
Prashant Gaikwad
maintainerPATCH v2 10/10 clk: tegra30: remove unused TEGRA_CLK_DUPLICATE()s
In reply to Prashant GaikwadWith device tree support added for Tegra clocks look up is done from device tree, remove unused TEGRA_CLK_DUPLICATE()s.
--- drivers/clk/tegra/clk-tegra30.c | 70 --------------------------------------- 1 files changed, 0 insertions(+), 70 deletions(-)
drivers/clk/tegra/clk-tegra30.c +0 -70
@@ -1642,41 +1642,6 @@ static void __init tegra30_periph_clk_init(void)clk_register_clkdev (clk,"emc" ,NULL ); clks[emc] = clk; -/* i2c1-fast */ - clk =clk_register_fixed_factor (NULL ,"i2c1-fast" ,"pll_p_out3" , -CLK_SET_RATE_PARENT ,1 ,1 ); -clk_register_clkdev (clk,"fast-clk" ,"tegra-i2c.0" ); - -/* i2c2-fast */ - clk =clk_register_fixed_factor (NULL ,"i2c2-fast" ,"pll_p_out3" , -CLK_SET_RATE_PARENT ,1 ,1 ); -clk_register_clkdev (clk,"fast-clk" ,"tegra-i2c.1" ); - -/* i2c3-fast */ - clk =clk_register_fixed_factor (NULL ,"i2c3-fast" ,"pll_p_out3" , -CLK_SET_RATE_PARENT ,1 ,1 ); -clk_register_clkdev (clk,"fast-clk" ,"tegra-i2c.2" ); - -/* i2c4-fast */ - clk =clk_register_fixed_factor (NULL ,"i2c4-fast" ,"pll_p_out3" , -CLK_SET_RATE_PARENT ,1 ,1 ); -clk_register_clkdev (clk,"fast-clk" ,"tegra-i2c.3" ); - -/* i2c5-fast */ - clk =clk_register_fixed_factor (NULL ,"i2c5-fast" ,"pll_p_out3" , -CLK_SET_RATE_PARENT ,1 ,1 ); -clk_register_clkdev (clk,"fast-clk" ,"tegra-i2c.5" ); - -/* dsi1-fixed */ - clk =clk_register_fixed_factor (NULL ,"dsi1-fixed" ,"pll_p_out3" , -CLK_SET_RATE_PARENT ,1 ,1 ); -clk_register_clkdev (clk,"dsi-fixed" ,"tegradc.0" ); - -/* dsi2-fixed */ - clk =clk_register_fixed_factor (NULL ,"dsi2-fixed" ,"pll_p_out3" , -CLK_SET_RATE_PARENT ,1 ,1 ); -clk_register_clkdev (clk,"dsi-fixed" ,"tegradc.1" ); -for (i =0 ; i <ARRAY_SIZE (tegra_periph_clk_list); i++) { data = &tegra_periph_clk_list[i]; clk = tegra_clk_periph(data->name, data->parent_names,
@@ -1935,19 +1900,9 @@ static __initdata struct tegra_clk_init_table init_table[] = {* table under two names. */ static struct tegra_clk_duplicate tegra_clk_duplicates[] = { -TEGRA_CLK_DUPLICATE (uarta,"serial8250.0" ,NULL ), -TEGRA_CLK_DUPLICATE (uartb,"serial8250.1" ,NULL ), -TEGRA_CLK_DUPLICATE (uartc,"serial8250.2" ,NULL ), -TEGRA_CLK_DUPLICATE (uartd,"serial8250.3" ,NULL ), -TEGRA_CLK_DUPLICATE (uarte,"serial8250.4" ,NULL ),TEGRA_CLK_DUPLICATE (usbd,"utmip-pad" ,NULL ),TEGRA_CLK_DUPLICATE (usbd,"tegra-ehci.0" ,NULL ),TEGRA_CLK_DUPLICATE (usbd,"tegra-otg" ,NULL ), -TEGRA_CLK_DUPLICATE (pll_p,"tegradc.0" ,"parent" ), -TEGRA_CLK_DUPLICATE (pll_p,"tegradc.1" ,"parent" ), -TEGRA_CLK_DUPLICATE (pll_d2_out0,"hdmi" ,"parent" ), -TEGRA_CLK_DUPLICATE (dsib,"tegradc.0" ,"dsib" ), -TEGRA_CLK_DUPLICATE (dsia,"tegradc.1" ,"dsia" ),TEGRA_CLK_DUPLICATE (bsev,"tegra-avp" ,"bsev" ),TEGRA_CLK_DUPLICATE (bsev,"nvavp" ,"bsev" ),TEGRA_CLK_DUPLICATE (vde,"tegra-aes" ,"vde" ),
@@ -1956,33 +1911,8 @@ static struct tegra_clk_duplicate tegra_clk_duplicates[] = {TEGRA_CLK_DUPLICATE (cml1,"tegra_sata_cml" ,NULL ),TEGRA_CLK_DUPLICATE (cml0,"tegra_pcie" ,"cml" ),TEGRA_CLK_DUPLICATE (pciex,"tegra_pcie" ,"pciex" ), -TEGRA_CLK_DUPLICATE (i2c1,"tegra-i2c-slave.0" ,NULL ), -TEGRA_CLK_DUPLICATE (i2c2,"tegra-i2c-slave.1" ,NULL ), -TEGRA_CLK_DUPLICATE (i2c3,"tegra-i2c-slave.2" ,NULL ), -TEGRA_CLK_DUPLICATE (i2c4,"tegra-i2c-slave.3" ,NULL ), -TEGRA_CLK_DUPLICATE (i2c5,"tegra-i2c-slave.4" ,NULL ), -TEGRA_CLK_DUPLICATE (sbc1,"spi_slave_tegra.0" ,NULL ), -TEGRA_CLK_DUPLICATE (sbc2,"spi_slave_tegra.1" ,NULL ), -TEGRA_CLK_DUPLICATE (sbc3,"spi_slave_tegra.2" ,NULL ), -TEGRA_CLK_DUPLICATE (sbc4,"spi_slave_tegra.3" ,NULL ), -TEGRA_CLK_DUPLICATE (sbc5,"spi_slave_tegra.4" ,NULL ), -TEGRA_CLK_DUPLICATE (sbc6,"spi_slave_tegra.5" ,NULL ),TEGRA_CLK_DUPLICATE (twd,"smp_twd" ,NULL ),TEGRA_CLK_DUPLICATE (vcp,"nvavp" ,"vcp" ), -TEGRA_CLK_DUPLICATE (i2s0,NULL ,"i2s0" ), -TEGRA_CLK_DUPLICATE (i2s1,NULL ,"i2s1" ), -TEGRA_CLK_DUPLICATE (i2s2,NULL ,"i2s2" ), -TEGRA_CLK_DUPLICATE (i2s3,NULL ,"i2s3" ), -TEGRA_CLK_DUPLICATE (i2s4,NULL ,"i2s4" ), -TEGRA_CLK_DUPLICATE (dam0,NULL ,"dam0" ), -TEGRA_CLK_DUPLICATE (dam1,NULL ,"dam1" ), -TEGRA_CLK_DUPLICATE (dam2,NULL ,"dam2" ), -TEGRA_CLK_DUPLICATE (spdif_in,NULL ,"spdif_in" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.0" ,"fast-clk" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.1" ,"fast-clk" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.2" ,"fast-clk" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.3" ,"fast-clk" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.4" ,"fast-clk" ), TEGRA_CLK_DUPLICATE(clk_max, NULL, NULL), /* MUST be the last entry */ };
Signature · 1 line
1.7.4.1
PATCH v2 10/10 clk: tegra30: remove unused TEGRA_CLK_DUPLICATE()s
Quoted 2 lines · Prashant Gaikwad
With device tree support added for Tegra clocks look up is done from device tree, remove unused TEGRA_CLK_DUPLICATE()s.
Cc'ing in the drivers/clk maintainer as an FYI and for Acks; this patch needs to go through the Tegra tree due to dependencies.
Quoted 106 lines
Signed-off-by Prashant Gaikwad <[email protected]>--- drivers/clk/tegra/clk-tegra30.c | 70 --------------------------------------- 1 files changed, 0 insertions(+), 70 deletions(-)drivers/clk/tegra/clk-tegra30.c +0
-70@@ -1642,41 +1642,6 @@ static void __init tegra30_periph_clk_init(void)clk_register_clkdev (clk,"emc" ,NULL ); clks[emc] = clk; -/* i2c1-fast */ - clk =clk_register_fixed_factor (NULL ,"i2c1-fast" ,"pll_p_out3" , -CLK_SET_RATE_PARENT ,1 ,1 ); -clk_register_clkdev (clk,"fast-clk" ,"tegra-i2c.0" ); - -/* i2c2-fast */ - clk =clk_register_fixed_factor (NULL ,"i2c2-fast" ,"pll_p_out3" , -CLK_SET_RATE_PARENT ,1 ,1 ); -clk_register_clkdev (clk,"fast-clk" ,"tegra-i2c.1" ); - -/* i2c3-fast */ - clk =clk_register_fixed_factor (NULL ,"i2c3-fast" ,"pll_p_out3" , -CLK_SET_RATE_PARENT ,1 ,1 ); -clk_register_clkdev (clk,"fast-clk" ,"tegra-i2c.2" ); - -/* i2c4-fast */ - clk =clk_register_fixed_factor (NULL ,"i2c4-fast" ,"pll_p_out3" , -CLK_SET_RATE_PARENT ,1 ,1 ); -clk_register_clkdev (clk,"fast-clk" ,"tegra-i2c.3" ); - -/* i2c5-fast */ - clk =clk_register_fixed_factor (NULL ,"i2c5-fast" ,"pll_p_out3" , -CLK_SET_RATE_PARENT ,1 ,1 ); -clk_register_clkdev (clk,"fast-clk" ,"tegra-i2c.5" ); - -/* dsi1-fixed */ - clk =clk_register_fixed_factor (NULL ,"dsi1-fixed" ,"pll_p_out3" , -CLK_SET_RATE_PARENT ,1 ,1 ); -clk_register_clkdev (clk,"dsi-fixed" ,"tegradc.0" ); - -/* dsi2-fixed */ - clk =clk_register_fixed_factor (NULL ,"dsi2-fixed" ,"pll_p_out3" , -CLK_SET_RATE_PARENT ,1 ,1 ); -clk_register_clkdev (clk,"dsi-fixed" ,"tegradc.1" ); -for (i =0 ; i <ARRAY_SIZE (tegra_periph_clk_list); i++) { data = &tegra_periph_clk_list[i]; clk = tegra_clk_periph(data->name, data->parent_names,@@ -1935,19 +1900,9 @@ static __initdata struct tegra_clk_init_table init_table[] = {* table under two names. */ static struct tegra_clk_duplicate tegra_clk_duplicates[] = { -TEGRA_CLK_DUPLICATE (uarta,"serial8250.0" ,NULL ), -TEGRA_CLK_DUPLICATE (uartb,"serial8250.1" ,NULL ), -TEGRA_CLK_DUPLICATE (uartc,"serial8250.2" ,NULL ), -TEGRA_CLK_DUPLICATE (uartd,"serial8250.3" ,NULL ), -TEGRA_CLK_DUPLICATE (uarte,"serial8250.4" ,NULL ),TEGRA_CLK_DUPLICATE (usbd,"utmip-pad" ,NULL ),TEGRA_CLK_DUPLICATE (usbd,"tegra-ehci.0" ,NULL ),TEGRA_CLK_DUPLICATE (usbd,"tegra-otg" ,NULL ), -TEGRA_CLK_DUPLICATE (pll_p,"tegradc.0" ,"parent" ), -TEGRA_CLK_DUPLICATE (pll_p,"tegradc.1" ,"parent" ), -TEGRA_CLK_DUPLICATE (pll_d2_out0,"hdmi" ,"parent" ), -TEGRA_CLK_DUPLICATE (dsib,"tegradc.0" ,"dsib" ), -TEGRA_CLK_DUPLICATE (dsia,"tegradc.1" ,"dsia" ),TEGRA_CLK_DUPLICATE (bsev,"tegra-avp" ,"bsev" ),TEGRA_CLK_DUPLICATE (bsev,"nvavp" ,"bsev" ),TEGRA_CLK_DUPLICATE (vde,"tegra-aes" ,"vde" ),@@ -1956,33 +1911,8 @@ static struct tegra_clk_duplicate tegra_clk_duplicates[] = {TEGRA_CLK_DUPLICATE (cml1,"tegra_sata_cml" ,NULL ),TEGRA_CLK_DUPLICATE (cml0,"tegra_pcie" ,"cml" ),TEGRA_CLK_DUPLICATE (pciex,"tegra_pcie" ,"pciex" ), -TEGRA_CLK_DUPLICATE (i2c1,"tegra-i2c-slave.0" ,NULL ), -TEGRA_CLK_DUPLICATE (i2c2,"tegra-i2c-slave.1" ,NULL ), -TEGRA_CLK_DUPLICATE (i2c3,"tegra-i2c-slave.2" ,NULL ), -TEGRA_CLK_DUPLICATE (i2c4,"tegra-i2c-slave.3" ,NULL ), -TEGRA_CLK_DUPLICATE (i2c5,"tegra-i2c-slave.4" ,NULL ), -TEGRA_CLK_DUPLICATE (sbc1,"spi_slave_tegra.0" ,NULL ), -TEGRA_CLK_DUPLICATE (sbc2,"spi_slave_tegra.1" ,NULL ), -TEGRA_CLK_DUPLICATE (sbc3,"spi_slave_tegra.2" ,NULL ), -TEGRA_CLK_DUPLICATE (sbc4,"spi_slave_tegra.3" ,NULL ), -TEGRA_CLK_DUPLICATE (sbc5,"spi_slave_tegra.4" ,NULL ), -TEGRA_CLK_DUPLICATE (sbc6,"spi_slave_tegra.5" ,NULL ),TEGRA_CLK_DUPLICATE (twd,"smp_twd" ,NULL ),TEGRA_CLK_DUPLICATE (vcp,"nvavp" ,"vcp" ), -TEGRA_CLK_DUPLICATE (i2s0,NULL ,"i2s0" ), -TEGRA_CLK_DUPLICATE (i2s1,NULL ,"i2s1" ), -TEGRA_CLK_DUPLICATE (i2s2,NULL ,"i2s2" ), -TEGRA_CLK_DUPLICATE (i2s3,NULL ,"i2s3" ), -TEGRA_CLK_DUPLICATE (i2s4,NULL ,"i2s4" ), -TEGRA_CLK_DUPLICATE (dam0,NULL ,"dam0" ), -TEGRA_CLK_DUPLICATE (dam1,NULL ,"dam1" ), -TEGRA_CLK_DUPLICATE (dam2,NULL ,"dam2" ), -TEGRA_CLK_DUPLICATE (spdif_in,NULL ,"spdif_in" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.0" ,"fast-clk" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.1" ,"fast-clk" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.2" ,"fast-clk" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.3" ,"fast-clk" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.4" ,"fast-clk" ), TEGRA_CLK_DUPLICATE(clk_max, NULL, NULL), /* MUST be the last entry */ };
PATCH v2 10/10 clk: tegra30: remove unused TEGRA_CLK_DUPLICATE()s
Quoting Stephen Warren (2013-01-11 13:01:20)
Quoted 7 lines · Prashant Gaikwad
Quoted 2 lines
With device tree support added for Tegra clocks look up is done from device tree, remove unused TEGRA_CLK_DUPLICATE()s.
Cc'ing in the
drivers/clkmaintainer as an FYI and for Acks; this patch needs to go through the Tegra tree due to dependencies.
Quoted 106 lines
Quoted 106 lines
Signed-off-by Prashant Gaikwad <[email protected]>--- drivers/clk/tegra/clk-tegra30.c | 70 --------------------------------------- 1 files changed, 0 insertions(+), 70 deletions(-)drivers/clk/tegra/clk-tegra30.c +0
-70@@ -1642,41 +1642,6 @@ static void __init tegra30_periph_clk_init(void)clk_register_clkdev (clk,"emc" ,NULL ); clks[emc] = clk; -/* i2c1-fast */ - clk =clk_register_fixed_factor (NULL ,"i2c1-fast" ,"pll_p_out3" , -CLK_SET_RATE_PARENT ,1 ,1 ); -clk_register_clkdev (clk,"fast-clk" ,"tegra-i2c.0" ); - -/* i2c2-fast */ - clk =clk_register_fixed_factor (NULL ,"i2c2-fast" ,"pll_p_out3" , -CLK_SET_RATE_PARENT ,1 ,1 ); -clk_register_clkdev (clk,"fast-clk" ,"tegra-i2c.1" ); - -/* i2c3-fast */ - clk =clk_register_fixed_factor (NULL ,"i2c3-fast" ,"pll_p_out3" , -CLK_SET_RATE_PARENT ,1 ,1 ); -clk_register_clkdev (clk,"fast-clk" ,"tegra-i2c.2" ); - -/* i2c4-fast */ - clk =clk_register_fixed_factor (NULL ,"i2c4-fast" ,"pll_p_out3" , -CLK_SET_RATE_PARENT ,1 ,1 ); -clk_register_clkdev (clk,"fast-clk" ,"tegra-i2c.3" ); - -/* i2c5-fast */ - clk =clk_register_fixed_factor (NULL ,"i2c5-fast" ,"pll_p_out3" , -CLK_SET_RATE_PARENT ,1 ,1 ); -clk_register_clkdev (clk,"fast-clk" ,"tegra-i2c.5" ); - -/* dsi1-fixed */ - clk =clk_register_fixed_factor (NULL ,"dsi1-fixed" ,"pll_p_out3" , -CLK_SET_RATE_PARENT ,1 ,1 ); -clk_register_clkdev (clk,"dsi-fixed" ,"tegradc.0" ); - -/* dsi2-fixed */ - clk =clk_register_fixed_factor (NULL ,"dsi2-fixed" ,"pll_p_out3" , -CLK_SET_RATE_PARENT ,1 ,1 ); -clk_register_clkdev (clk,"dsi-fixed" ,"tegradc.1" ); -for (i =0 ; i <ARRAY_SIZE (tegra_periph_clk_list); i++) { data = &tegra_periph_clk_list[i]; clk = tegra_clk_periph(data->name, data->parent_names,@@ -1935,19 +1900,9 @@ static __initdata struct tegra_clk_init_table init_table[] = {* table under two names. */ static struct tegra_clk_duplicate tegra_clk_duplicates[] = { -TEGRA_CLK_DUPLICATE (uarta,"serial8250.0" ,NULL ), -TEGRA_CLK_DUPLICATE (uartb,"serial8250.1" ,NULL ), -TEGRA_CLK_DUPLICATE (uartc,"serial8250.2" ,NULL ), -TEGRA_CLK_DUPLICATE (uartd,"serial8250.3" ,NULL ), -TEGRA_CLK_DUPLICATE (uarte,"serial8250.4" ,NULL ),TEGRA_CLK_DUPLICATE (usbd,"utmip-pad" ,NULL ),TEGRA_CLK_DUPLICATE (usbd,"tegra-ehci.0" ,NULL ),TEGRA_CLK_DUPLICATE (usbd,"tegra-otg" ,NULL ), -TEGRA_CLK_DUPLICATE (pll_p,"tegradc.0" ,"parent" ), -TEGRA_CLK_DUPLICATE (pll_p,"tegradc.1" ,"parent" ), -TEGRA_CLK_DUPLICATE (pll_d2_out0,"hdmi" ,"parent" ), -TEGRA_CLK_DUPLICATE (dsib,"tegradc.0" ,"dsib" ), -TEGRA_CLK_DUPLICATE (dsia,"tegradc.1" ,"dsia" ),TEGRA_CLK_DUPLICATE (bsev,"tegra-avp" ,"bsev" ),TEGRA_CLK_DUPLICATE (bsev,"nvavp" ,"bsev" ),TEGRA_CLK_DUPLICATE (vde,"tegra-aes" ,"vde" ),@@ -1956,33 +1911,8 @@ static struct tegra_clk_duplicate tegra_clk_duplicates[] = {TEGRA_CLK_DUPLICATE (cml1,"tegra_sata_cml" ,NULL ),TEGRA_CLK_DUPLICATE (cml0,"tegra_pcie" ,"cml" ),TEGRA_CLK_DUPLICATE (pciex,"tegra_pcie" ,"pciex" ), -TEGRA_CLK_DUPLICATE (i2c1,"tegra-i2c-slave.0" ,NULL ), -TEGRA_CLK_DUPLICATE (i2c2,"tegra-i2c-slave.1" ,NULL ), -TEGRA_CLK_DUPLICATE (i2c3,"tegra-i2c-slave.2" ,NULL ), -TEGRA_CLK_DUPLICATE (i2c4,"tegra-i2c-slave.3" ,NULL ), -TEGRA_CLK_DUPLICATE (i2c5,"tegra-i2c-slave.4" ,NULL ), -TEGRA_CLK_DUPLICATE (sbc1,"spi_slave_tegra.0" ,NULL ), -TEGRA_CLK_DUPLICATE (sbc2,"spi_slave_tegra.1" ,NULL ), -TEGRA_CLK_DUPLICATE (sbc3,"spi_slave_tegra.2" ,NULL ), -TEGRA_CLK_DUPLICATE (sbc4,"spi_slave_tegra.3" ,NULL ), -TEGRA_CLK_DUPLICATE (sbc5,"spi_slave_tegra.4" ,NULL ), -TEGRA_CLK_DUPLICATE (sbc6,"spi_slave_tegra.5" ,NULL ),TEGRA_CLK_DUPLICATE (twd,"smp_twd" ,NULL ),TEGRA_CLK_DUPLICATE (vcp,"nvavp" ,"vcp" ), -TEGRA_CLK_DUPLICATE (i2s0,NULL ,"i2s0" ), -TEGRA_CLK_DUPLICATE (i2s1,NULL ,"i2s1" ), -TEGRA_CLK_DUPLICATE (i2s2,NULL ,"i2s2" ), -TEGRA_CLK_DUPLICATE (i2s3,NULL ,"i2s3" ), -TEGRA_CLK_DUPLICATE (i2s4,NULL ,"i2s4" ), -TEGRA_CLK_DUPLICATE (dam0,NULL ,"dam0" ), -TEGRA_CLK_DUPLICATE (dam1,NULL ,"dam1" ), -TEGRA_CLK_DUPLICATE (dam2,NULL ,"dam2" ), -TEGRA_CLK_DUPLICATE (spdif_in,NULL ,"spdif_in" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.0" ,"fast-clk" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.1" ,"fast-clk" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.2" ,"fast-clk" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.3" ,"fast-clk" ), -TEGRA_CLK_DUPLICATE (pll_p_out3,"tegra-i2c.4" ,"fast-clk" ), TEGRA_CLK_DUPLICATE(clk_max, NULL, NULL), /* MUST be the last entry */ };
PATCH v2 1/10 spi: tegra: Do not use clock name to get clock
In reply to Prashant GaikwadQuoted 2 lines · Prashant Gaikwad
Since Tegra spi devices do not have multiple clocks, no need to use clock name to get the clock.
Cc'ing in the SPI maintainers as an FYI and for Acks; this patch needs to go through the Tegra tree due to dependencies.
Quoted 41 lines
Signed-off-by Prashant Gaikwad <[email protected]>---
This series depends on v4 of Tegra's ccf-rework patch series. Tested on Ventana (Tegra20) and Cardhu (Tegra30). Rebased on Tegra's for-3.9/soc and for-3.9/cleanup.Changes from V1:
- Fixed clock lookup for SPI and nvec drivers.
- Add clock information for nvec in device tree.--- drivers/spi/spi-tegra20-sflash.c | 2 +- drivers/spi/spi-tegra20-slink.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/spi/spi-tegra20-sflash.c +1
-1@@ -525,7 +525,7 @@ static int tegra_sflash_probe(struct platform_device *pdev) goto exit_free_master; } - tsd->clk =devm_clk_get (&pdev->dev,"spi" ); + tsd->clk =devm_clk_get (&pdev->dev,NULL );if (IS_ERR (tsd->clk)) {dev_err (&pdev->dev,"can not get clock\n" ); ret =PTR_ERR (tsd->clk);drivers/spi/spi-tegra20-slink.c +1
-1@@ -1191,7 +1191,7 @@ static int tegra_slink_probe(struct platform_device *pdev) goto exit_free_master; } - tspi->clk =devm_clk_get (&pdev->dev,"slink" ); + tspi->clk =devm_clk_get (&pdev->dev,NULL );if (IS_ERR (tspi->clk)) {dev_err (&pdev->dev,"can not get clock\n" ); ret =PTR_ERR (tspi->clk);
PATCH v2 1/10 spi: tegra: Do not use clock name to get clock
Quoted 6 lines · Stephen Warren
Quoted 2 lines · Prashant Gaikwad
Since Tegra spi devices do not have multiple clocks, no need to use clock name to get the clock.
Cc'ing in the SPI maintainers as an FYI and for Acks; this patch needs to go through the Tegra tree due to dependencies.
No problem merging it via the Tegra tree.
g.