aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32/mach-at32ap
diff options
context:
space:
mode:
Diffstat (limited to 'arch/avr32/mach-at32ap')
-rw-r--r--arch/avr32/mach-at32ap/at32ap700x.c52
-rw-r--r--arch/avr32/mach-at32ap/hsmc.c2
2 files changed, 53 insertions, 1 deletions
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index 0f24b4f85c1..b65d3e0667a 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -1730,6 +1730,58 @@ fail:
1730#endif 1730#endif
1731 1731
1732/* -------------------------------------------------------------------- 1732/* --------------------------------------------------------------------
1733 * NAND Flash / SmartMedia
1734 * -------------------------------------------------------------------- */
1735static struct resource smc_cs3_resource[] __initdata = {
1736 {
1737 .start = 0x0c000000,
1738 .end = 0x0fffffff,
1739 .flags = IORESOURCE_MEM,
1740 }, {
1741 .start = 0xfff03c00,
1742 .end = 0xfff03fff,
1743 .flags = IORESOURCE_MEM,
1744 },
1745};
1746
1747struct platform_device *__init
1748at32_add_device_nand(unsigned int id, struct atmel_nand_data *data)
1749{
1750 struct platform_device *pdev;
1751
1752 if (id != 0 || !data)
1753 return NULL;
1754
1755 pdev = platform_device_alloc("atmel_nand", id);
1756 if (!pdev)
1757 goto fail;
1758
1759 if (platform_device_add_resources(pdev, smc_cs3_resource,
1760 ARRAY_SIZE(smc_cs3_resource)))
1761 goto fail;
1762
1763 if (platform_device_add_data(pdev, data,
1764 sizeof(struct atmel_nand_data)))
1765 goto fail;
1766
1767 set_ebi_sfr_bits(HMATRIX_BIT(CS3A));
1768 if (data->enable_pin)
1769 at32_select_gpio(data->enable_pin,
1770 AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH);
1771 if (data->rdy_pin)
1772 at32_select_gpio(data->rdy_pin, 0);
1773 if (data->det_pin)
1774 at32_select_gpio(data->det_pin, 0);
1775
1776 platform_device_add(pdev);
1777 return pdev;
1778
1779fail:
1780 platform_device_put(pdev);
1781 return NULL;
1782}
1783
1784/* --------------------------------------------------------------------
1733 * AC97C 1785 * AC97C
1734 * -------------------------------------------------------------------- */ 1786 * -------------------------------------------------------------------- */
1735static struct resource atmel_ac97c0_resource[] __initdata = { 1787static struct resource atmel_ac97c0_resource[] __initdata = {
diff --git a/arch/avr32/mach-at32ap/hsmc.c b/arch/avr32/mach-at32ap/hsmc.c
index fa427ed4278..b2d9bc61a35 100644
--- a/arch/avr32/mach-at32ap/hsmc.c
+++ b/arch/avr32/mach-at32ap/hsmc.c
@@ -278,4 +278,4 @@ static int __init hsmc_init(void)
278{ 278{
279 return platform_driver_register(&hsmc_driver); 279 return platform_driver_register(&hsmc_driver);
280} 280}
281arch_initcall(hsmc_init); 281core_initcall(hsmc_init);