Commit 6ccaa317 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'at91-fixes-for-linus' of git://github.com/at91linux/linux-2.6-at91

* 'at91-fixes-for-linus' of git://github.com/at91linux/linux-2.6-at91:
  AT91: at91sam9261ek: remove C99 comments but keep information
  AT91: at91sam9261ek board: remove warnings related to use of SPI or SD/MMC
  AT91: dm9000 initialization update
  AT91: SAM9G45 - add a separate clock entry for every single TC block
  AT91: clock: peripheral clocks can have other parent than mck
  AT91: change dma resource index
parents 3657423c 4deb22a6
...@@ -121,8 +121,8 @@ static struct clk ssc1_clk = { ...@@ -121,8 +121,8 @@ static struct clk ssc1_clk = {
.pmc_mask = 1 << AT91SAM9G45_ID_SSC1, .pmc_mask = 1 << AT91SAM9G45_ID_SSC1,
.type = CLK_TYPE_PERIPHERAL, .type = CLK_TYPE_PERIPHERAL,
}; };
static struct clk tcb_clk = { static struct clk tcb0_clk = {
.name = "tcb_clk", .name = "tcb0_clk",
.pmc_mask = 1 << AT91SAM9G45_ID_TCB, .pmc_mask = 1 << AT91SAM9G45_ID_TCB,
.type = CLK_TYPE_PERIPHERAL, .type = CLK_TYPE_PERIPHERAL,
}; };
...@@ -192,6 +192,14 @@ static struct clk ohci_clk = { ...@@ -192,6 +192,14 @@ static struct clk ohci_clk = {
.parent = &uhphs_clk, .parent = &uhphs_clk,
}; };
/* One additional fake clock for second TC block */
static struct clk tcb1_clk = {
.name = "tcb1_clk",
.pmc_mask = 0,
.type = CLK_TYPE_PERIPHERAL,
.parent = &tcb0_clk,
};
static struct clk *periph_clocks[] __initdata = { static struct clk *periph_clocks[] __initdata = {
&pioA_clk, &pioA_clk,
&pioB_clk, &pioB_clk,
...@@ -208,7 +216,7 @@ static struct clk *periph_clocks[] __initdata = { ...@@ -208,7 +216,7 @@ static struct clk *periph_clocks[] __initdata = {
&spi1_clk, &spi1_clk,
&ssc0_clk, &ssc0_clk,
&ssc1_clk, &ssc1_clk,
&tcb_clk, &tcb0_clk,
&pwm_clk, &pwm_clk,
&tsc_clk, &tsc_clk,
&dma_clk, &dma_clk,
...@@ -221,6 +229,7 @@ static struct clk *periph_clocks[] __initdata = { ...@@ -221,6 +229,7 @@ static struct clk *periph_clocks[] __initdata = {
&mmc1_clk, &mmc1_clk,
// irq0 // irq0
&ohci_clk, &ohci_clk,
&tcb1_clk,
}; };
/* /*
......
...@@ -46,7 +46,7 @@ static struct resource hdmac_resources[] = { ...@@ -46,7 +46,7 @@ static struct resource hdmac_resources[] = {
.end = AT91_BASE_SYS + AT91_DMA + SZ_512 - 1, .end = AT91_BASE_SYS + AT91_DMA + SZ_512 - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, },
[2] = { [1] = {
.start = AT91SAM9G45_ID_DMA, .start = AT91SAM9G45_ID_DMA,
.end = AT91SAM9G45_ID_DMA, .end = AT91SAM9G45_ID_DMA,
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
...@@ -835,9 +835,9 @@ static struct platform_device at91sam9g45_tcb1_device = { ...@@ -835,9 +835,9 @@ static struct platform_device at91sam9g45_tcb1_device = {
static void __init at91_add_device_tc(void) static void __init at91_add_device_tc(void)
{ {
/* this chip has one clock and irq for all six TC channels */ /* this chip has one clock and irq for all six TC channels */
at91_clock_associate("tcb_clk", &at91sam9g45_tcb0_device.dev, "t0_clk"); at91_clock_associate("tcb0_clk", &at91sam9g45_tcb0_device.dev, "t0_clk");
platform_device_register(&at91sam9g45_tcb0_device); platform_device_register(&at91sam9g45_tcb0_device);
at91_clock_associate("tcb_clk", &at91sam9g45_tcb1_device.dev, "t0_clk"); at91_clock_associate("tcb1_clk", &at91sam9g45_tcb1_device.dev, "t0_clk");
platform_device_register(&at91sam9g45_tcb1_device); platform_device_register(&at91sam9g45_tcb1_device);
} }
#else #else
......
...@@ -93,11 +93,12 @@ static struct resource dm9000_resource[] = { ...@@ -93,11 +93,12 @@ static struct resource dm9000_resource[] = {
.start = AT91_PIN_PC11, .start = AT91_PIN_PC11,
.end = AT91_PIN_PC11, .end = AT91_PIN_PC11,
.flags = IORESOURCE_IRQ .flags = IORESOURCE_IRQ
| IORESOURCE_IRQ_LOWEDGE | IORESOURCE_IRQ_HIGHEDGE,
} }
}; };
static struct dm9000_plat_data dm9000_platdata = { static struct dm9000_plat_data dm9000_platdata = {
.flags = DM9000_PLATF_16BITONLY, .flags = DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM,
}; };
static struct platform_device dm9000_device = { static struct platform_device dm9000_device = {
...@@ -167,17 +168,6 @@ static struct at91_udc_data __initdata ek_udc_data = { ...@@ -167,17 +168,6 @@ static struct at91_udc_data __initdata ek_udc_data = {
}; };
/*
* MCI (SD/MMC)
*/
static struct at91_mmc_data __initdata ek_mmc_data = {
.wire4 = 1,
// .det_pin = ... not connected
// .wp_pin = ... not connected
// .vcc_pin = ... not connected
};
/* /*
* NAND flash * NAND flash
*/ */
...@@ -246,6 +236,10 @@ static void __init ek_add_device_nand(void) ...@@ -246,6 +236,10 @@ static void __init ek_add_device_nand(void)
at91_add_device_nand(&ek_nand_data); at91_add_device_nand(&ek_nand_data);
} }
/*
* SPI related devices
*/
#if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
/* /*
* ADS7846 Touchscreen * ADS7846 Touchscreen
...@@ -356,6 +350,19 @@ static struct spi_board_info ek_spi_devices[] = { ...@@ -356,6 +350,19 @@ static struct spi_board_info ek_spi_devices[] = {
#endif #endif
}; };
#else /* CONFIG_SPI_ATMEL_* */
/* spi0 and mmc/sd share the same PIO pins: cannot be used at the same time */
/*
* MCI (SD/MMC)
* det_pin, wp_pin and vcc_pin are not connected
*/
static struct at91_mmc_data __initdata ek_mmc_data = {
.wire4 = 1,
};
#endif /* CONFIG_SPI_ATMEL_* */
/* /*
* LCD Controller * LCD Controller
......
...@@ -501,7 +501,8 @@ postcore_initcall(at91_clk_debugfs_init); ...@@ -501,7 +501,8 @@ postcore_initcall(at91_clk_debugfs_init);
int __init clk_register(struct clk *clk) int __init clk_register(struct clk *clk)
{ {
if (clk_is_peripheral(clk)) { if (clk_is_peripheral(clk)) {
clk->parent = &mck; if (!clk->parent)
clk->parent = &mck;
clk->mode = pmc_periph_mode; clk->mode = pmc_periph_mode;
list_add_tail(&clk->node, &clocks); list_add_tail(&clk->node, &clocks);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment