aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/devices.c
diff options
context:
space:
mode:
authorEric Miao <eric.miao@marvell.com>2008-06-02 03:22:03 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-07-09 16:38:32 -0400
commit9ae819a819b4dfc60ac13dd1f1e1a7eaa3d4a6cb (patch)
tree1a10d64da2440c7a7f0f33cb4e044e056879a632 /arch/arm/mach-pxa/devices.c
parent7c3ada4f7cc76fa3912683da83eccf7886fca1b1 (diff)
[ARM] pxa: add pxa3xx NAND device and clock sources
A pxa3xx_set_nand_info() is also introduced to set the PXA3xx NAND driver specific platform_data structure pointer. Signed-off-by: Eric Miao <eric.miao@marvell.com> Cc: Sergey Podstavin <spodstavin@ru.mvista.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/devices.c')
-rw-r--r--arch/arm/mach-pxa/devices.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index abc161dd083a..84489dc51d81 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -16,6 +16,7 @@
16#include <asm/arch/pxa2xx_spi.h> 16#include <asm/arch/pxa2xx_spi.h>
17#include <asm/arch/camera.h> 17#include <asm/arch/camera.h>
18#include <asm/arch/audio.h> 18#include <asm/arch/audio.h>
19#include <asm/arch/pxa3xx_nand.h>
19 20
20#include "devices.h" 21#include "devices.h"
21#include "generic.h" 22#include "generic.h"
@@ -831,6 +832,48 @@ void __init pxa3xx_set_mci3_info(struct pxamci_platform_data *info)
831 pxa_register_device(&pxa3xx_device_mci3, info); 832 pxa_register_device(&pxa3xx_device_mci3, info);
832} 833}
833 834
835static struct resource pxa3xx_resources_nand[] = {
836 [0] = {
837 .start = 0x43100000,
838 .end = 0x43100053,
839 .flags = IORESOURCE_MEM,
840 },
841 [1] = {
842 .start = IRQ_NAND,
843 .end = IRQ_NAND,
844 .flags = IORESOURCE_IRQ,
845 },
846 [2] = {
847 /* DRCMR for Data DMA */
848 .start = 97,
849 .end = 97,
850 .flags = IORESOURCE_DMA,
851 },
852 [3] = {
853 /* DRCMR for Command DMA */
854 .start = 99,
855 .end = 99,
856 .flags = IORESOURCE_DMA,
857 },
858};
859
860static u64 pxa3xx_nand_dma_mask = DMA_BIT_MASK(32);
861
862struct platform_device pxa3xx_device_nand = {
863 .name = "pxa3xx-nand",
864 .id = -1,
865 .dev = {
866 .dma_mask = &pxa3xx_nand_dma_mask,
867 .coherent_dma_mask = DMA_BIT_MASK(32),
868 },
869 .num_resources = ARRAY_SIZE(pxa3xx_resources_nand),
870 .resource = pxa3xx_resources_nand,
871};
872
873void __init pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info)
874{
875 pxa_register_device(&pxa3xx_device_nand, info);
876}
834#endif /* CONFIG_PXA3xx */ 877#endif /* CONFIG_PXA3xx */
835 878
836/* pxa2xx-spi platform-device ID equals respective SSP platform-device ID + 1. 879/* pxa2xx-spi platform-device ID equals respective SSP platform-device ID + 1.