aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/avr32/mach-at32ap/at32ap700x.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index 0f24b4f85c17..b65d3e0667a8 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 = {