Skip to contentSkip to conversation

at91: add missing clkdev changes for at91sam9g45

PATCH In review Hubert Feurstein 2 participants 4 messages Aug 21, 2011 – Sep 15, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 at91: add missing clkdev changes for at91sam9g45

This fixes the following compile errors
arch/arm/mach-at91/at91sam9g45.c:185:3: error: 'ohci_clk' undeclared here (not in a function) arch/arm/mach-at91/at91sam9g45.c:186:3: error: 'tcb1_clk' undeclared here (not in a function) arch/arm/mach-at91/at91sam9g45_devices.c: In function 'at91_add_device_mci':
arch/arm/mach-at91/at91sam9g45_devices.c:258:2: warning: implicit declaration of function 'at91_clock_associate'

    [...]

arch/arm/mach-at91/built-in.o: In function `at91_add_device_mci':
sam9_smc.c:(.text.at91_add_device_mci+0x1d0): undefined reference to `at91_clock_associate'
which were introduced in commit:
"at91: swtich to clkdev" (ae19fe26cc230bc38238c2d66b8f464761286316)

Cc Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
---
 arch/arm/mach-at91/at91sam9g45.c         |    3 ---
 arch/arm/mach-at91/at91sam9g45_devices.c |    7 +------
 2 files changed, 1 insertions(+), 9 deletions(-)
arch/arm/mach-at91/at91sam9g45.c +0 -3
index d4c27f8..f1139da 100644
@@ -181,9 +181,6 @@ static struct clk *periph_clocks[] __initdata = {
 	&isi_clk,
 	&udphs_clk,
 	&mmc1_clk,
-	// irq0
-	&ohci_clk,
-	&tcb1_clk,
 };
 
 static struct clk_lookup periph_clocks_lookups[] = {
arch/arm/mach-at91/at91sam9g45_devices.c +1 -6
index f6e1eb4..022f3e1 100644
@@ -188,8 +188,6 @@ void at91_register_uart(unsigned id, unsigned pins)
 void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data)
 {
 	resource_size_t start;
-	struct device_d *dev;
-	char* clk_name;
 
 	if (!data)
 		return;
@@ -209,7 +207,6 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data)
 
 	if (mmc_id == 0) {		/* MCI0 */
 		start = AT91SAM9G45_BASE_MCI0;
-		clk_name = "mci0_clk";
 		/* CLK */
 		at91_set_A_periph(AT91_PIN_PA0, 0);
 
@@ -231,7 +228,6 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data)
 		}
 	} else {			/* MCI1 */
 		start = AT91SAM9G45_BASE_MCI1;
-		clk_name = "mci1_clk";
 		/* CLK */
 		at91_set_A_periph(AT91_PIN_PA31, 0);
 
@@ -253,9 +249,8 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data)
 		}
 	}
 
-	dev = add_generic_device("atmel_mci", mmc_id, NULL, start, 4096,
+	add_generic_device("atmel_mci", mmc_id, NULL, start, 4096,
 			   IORESOURCE_MEM, data);
-	at91_clock_associate(clk_name, dev, "mci_clk");
 }
 #else
 void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data) {}
Signature · 7 lines
1.7.4.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

Jean-Christophe, do you have comments, maybe an ACK?

Regards
Hubert

2011/8/21 Hubert Feurstein <[email protected]>:

Quoted 73 lines

This fixes the following compile errors
 arch/arm/mach-at91/at91sam9g45.c:185:3: error: 'ohci_clk' undeclared here (not in a function) arch/arm/mach-at91/at91sam9g45.c:186:3: error: 'tcb1_clk' undeclared here (not in a function) arch/arm/mach-at91/at91sam9g45_devices.c: In function 'at91_add_device_mci':
 arch/arm/mach-at91/at91sam9g45_devices.c:258:2: warning: implicit declaration of function 'at91_clock_associate' [...]
 arch/arm/mach-at91/built-in.o: In function `at91_add_device_mci':
 sam9_smc.c:(.text.at91_add_device_mci+0x1d0): undefined reference to `at91_clock_associate' which were introduced in commit:
 "at91: swtich to clkdev" (ae19fe26cc230bc38238c2d66b8f464761286316)

Cc Jean-Christophe PLAGNIOL-VILLARD <[email protected]>

---
 arch/arm/mach-at91/at91sam9g45.c         |    3 --- arch/arm/mach-at91/at91sam9g45_devices.c |    7 +------

 2 files changed, 1 insertions(+), 9 deletions(-)
arch/arm/mach-at91/at91sam9g45.c +0 -3
index d4c27f8..f1139da 100644
@@ -181,9 +181,6 @@ static struct clk *periph_clocks[] __initdata = {
        &isi_clk,
        &udphs_clk,
        &mmc1_clk,
-       // irq0
-       &ohci_clk,
-       &tcb1_clk,
  };
 
  static struct clk_lookup periph_clocks_lookups[] = {
arch/arm/mach-at91/at91sam9g45_devices.c +0 -2
index f6e1eb4..022f3e1 100644
@@ -188,8 +188,6 @@ void at91_register_uart(unsigned id, unsigned pins)
  void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data)
  {
        resource_size_t start;
-       struct device_d *dev;
-       char* clk_name;
 
        if (!data)
                return;
@@ -209,7 +207,6 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data)
 

       if (mmc_id == 0) {              /* MCI0 */ start = AT91SAM9G45_BASE_MCI0;
-               clk_name = "mci0_clk";
               /* CLK */ at91_set_A_periph(AT91_PIN_PA0, 0);

arch/arm/mach-at91/at91sam9g45_devices.c +1 -4
@@ -231,7 +228,6 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data)
                }
        } else {                        /* MCI1 */
                start = AT91SAM9G45_BASE_MCI1;
-               clk_name = "mci1_clk";
                /* CLK */
                at91_set_A_periph(AT91_PIN_PA31, 0);
 
@@ -253,9 +249,8 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data)
                }
        }
 
-       dev = add_generic_device("atmel_mci", mmc_id, NULL, start, 4096,
+       add_generic_device("atmel_mci", mmc_id, NULL, start, 4096,
                           IORESOURCE_MEM, data);
-       at91_clock_associate(clk_name, dev, "mci_clk");
  }
  #else
  void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data) {}
--
Quoted 3 lines

1.7.4.1

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#2 lore raw
In reply to Hubert Feurstein

Hi Sascha,

please apply this patch to 'master', if you don't mind. Otherwise the at91sam9g45-based boards
can _not_ be built anymore.

Thanks.

Regards
Hubert

2011/8/21 Hubert Feurstein <[email protected]>:

Quoted 73 lines

This fixes the following compile errors
 arch/arm/mach-at91/at91sam9g45.c:185:3: error: 'ohci_clk' undeclared here (not in a function) arch/arm/mach-at91/at91sam9g45.c:186:3: error: 'tcb1_clk' undeclared here (not in a function) arch/arm/mach-at91/at91sam9g45_devices.c: In function 'at91_add_device_mci':
 arch/arm/mach-at91/at91sam9g45_devices.c:258:2: warning: implicit declaration of function 'at91_clock_associate' [...]
 arch/arm/mach-at91/built-in.o: In function `at91_add_device_mci':
 sam9_smc.c:(.text.at91_add_device_mci+0x1d0): undefined reference to `at91_clock_associate' which were introduced in commit:
 "at91: swtich to clkdev" (ae19fe26cc230bc38238c2d66b8f464761286316)

Cc Jean-Christophe PLAGNIOL-VILLARD <[email protected]>

---
 arch/arm/mach-at91/at91sam9g45.c         |    3 --- arch/arm/mach-at91/at91sam9g45_devices.c |    7 +------

 2 files changed, 1 insertions(+), 9 deletions(-)
arch/arm/mach-at91/at91sam9g45.c +0 -3
index d4c27f8..f1139da 100644
@@ -181,9 +181,6 @@ static struct clk *periph_clocks[] __initdata = {
        &isi_clk,
        &udphs_clk,
        &mmc1_clk,
-       // irq0
-       &ohci_clk,
-       &tcb1_clk,
  };
 
  static struct clk_lookup periph_clocks_lookups[] = {
arch/arm/mach-at91/at91sam9g45_devices.c +0 -2
index f6e1eb4..022f3e1 100644
@@ -188,8 +188,6 @@ void at91_register_uart(unsigned id, unsigned pins)
  void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data)
  {
        resource_size_t start;
-       struct device_d *dev;
-       char* clk_name;
 
        if (!data)
                return;
@@ -209,7 +207,6 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data)
 

       if (mmc_id == 0) {              /* MCI0 */ start = AT91SAM9G45_BASE_MCI0;
-               clk_name = "mci0_clk";
               /* CLK */ at91_set_A_periph(AT91_PIN_PA0, 0);

arch/arm/mach-at91/at91sam9g45_devices.c +1 -4
@@ -231,7 +228,6 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data)
                }
        } else {                        /* MCI1 */
                start = AT91SAM9G45_BASE_MCI1;
-               clk_name = "mci1_clk";
                /* CLK */
                at91_set_A_periph(AT91_PIN_PA31, 0);
 
@@ -253,9 +249,8 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data)
                }
        }
 
-       dev = add_generic_device("atmel_mci", mmc_id, NULL, start, 4096,
+       add_generic_device("atmel_mci", mmc_id, NULL, start, 4096,
                           IORESOURCE_MEM, data);
-       at91_clock_associate(clk_name, dev, "mci_clk");
  }
  #else
  void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data) {}
--
Quoted 3 lines

1.7.4.1

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#3 lore raw
In reply to Hubert Feurstein
Quoted 5 lines · Hubert Feurstein

This fixes the following compile errors
arch/arm/mach-at91/at91sam9g45.c:185:3: error: 'ohci_clk' undeclared here (not in a function) arch/arm/mach-at91/at91sam9g45.c:186:3: error: 'tcb1_clk' undeclared here (not in a function) arch/arm/mach-at91/at91sam9g45_devices.c: In function 'at91_add_device_mci':
arch/arm/mach-at91/at91sam9g45_devices.c:258:2: warning: implicit declaration of function 'at91_clock_associate'

Quoted 8 lines
    [...]

arch/arm/mach-at91/built-in.o: In function `at91_add_device_mci':
sam9_smc.c:(.text.at91_add_device_mci+0x1d0): undefined reference to `at91_clock_associate'
which were introduced in commit:
"at91: swtich to clkdev" (ae19fe26cc230bc38238c2d66b8f464761286316)

Cc Jean-Christophe PLAGNIOL-VILLARD <[email protected]>

I've a similar patch too

please merge the fix of ALL remove of the at91_clock_assocaite in one commit

Best Regards,
J.

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox