aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/pcm037.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx3/pcm037.c')
-rw-r--r--arch/arm/mach-mx3/pcm037.c70
1 files changed, 70 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c
index 843f68c8ead1..8cea82587222 100644
--- a/arch/arm/mach-mx3/pcm037.c
+++ b/arch/arm/mach-mx3/pcm037.c
@@ -21,7 +21,11 @@
21 21
22#include <linux/platform_device.h> 22#include <linux/platform_device.h>
23#include <linux/mtd/physmap.h> 23#include <linux/mtd/physmap.h>
24#include <linux/mtd/plat-ram.h>
24#include <linux/memory.h> 25#include <linux/memory.h>
26#include <linux/gpio.h>
27#include <linux/smc911x.h>
28#include <linux/interrupt.h>
25 29
26#include <mach/hardware.h> 30#include <mach/hardware.h>
27#include <asm/mach-types.h> 31#include <asm/mach-types.h>
@@ -32,6 +36,7 @@
32#include <mach/imx-uart.h> 36#include <mach/imx-uart.h>
33#include <mach/iomux-mx3.h> 37#include <mach/iomux-mx3.h>
34#include <mach/board-pcm037.h> 38#include <mach/board-pcm037.h>
39#include <mach/mxc_nand.h>
35 40
36#include "devices.h" 41#include "devices.h"
37 42
@@ -59,8 +64,63 @@ static struct imxuart_platform_data uart_pdata = {
59 .flags = IMXUART_HAVE_RTSCTS, 64 .flags = IMXUART_HAVE_RTSCTS,
60}; 65};
61 66
67static struct resource smc911x_resources[] = {
68 [0] = {
69 .start = CS1_BASE_ADDR + 0x300,
70 .end = CS1_BASE_ADDR + 0x300 + SZ_64K - 1,
71 .flags = IORESOURCE_MEM,
72 },
73 [1] = {
74 .start = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1),
75 .end = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1),
76 .flags = IORESOURCE_IRQ,
77 },
78};
79
80static struct smc911x_platdata smc911x_info = {
81 .flags = SMC911X_USE_32BIT,
82 .irq_flags = IRQF_SHARED | IRQF_TRIGGER_LOW,
83};
84
85static struct platform_device pcm037_eth = {
86 .name = "smc911x",
87 .id = -1,
88 .num_resources = ARRAY_SIZE(smc911x_resources),
89 .resource = smc911x_resources,
90 .dev = {
91 .platform_data = &smc911x_info,
92 },
93};
94
95static struct platdata_mtd_ram pcm038_sram_data = {
96 .bankwidth = 2,
97};
98
99static struct resource pcm038_sram_resource = {
100 .start = CS4_BASE_ADDR,
101 .end = CS4_BASE_ADDR + 512 * 1024 - 1,
102 .flags = IORESOURCE_MEM,
103};
104
105static struct platform_device pcm037_sram_device = {
106 .name = "mtd-ram",
107 .id = 0,
108 .dev = {
109 .platform_data = &pcm038_sram_data,
110 },
111 .num_resources = 1,
112 .resource = &pcm038_sram_resource,
113};
114
115static struct mxc_nand_platform_data pcm037_nand_board_info = {
116 .width = 1,
117 .hw_ecc = 1,
118};
119
62static struct platform_device *devices[] __initdata = { 120static struct platform_device *devices[] __initdata = {
63 &pcm037_flash, 121 &pcm037_flash,
122 &pcm037_eth,
123 &pcm037_sram_device,
64}; 124};
65 125
66/* 126/*
@@ -81,6 +141,16 @@ static void __init mxc_board_init(void)
81 mxc_iomux_mode(MX31_PIN_CSPI3_MISO__TXD3); 141 mxc_iomux_mode(MX31_PIN_CSPI3_MISO__TXD3);
82 142
83 mxc_register_device(&mxc_uart_device2, &uart_pdata); 143 mxc_register_device(&mxc_uart_device2, &uart_pdata);
144
145 mxc_iomux_mode(MX31_PIN_BATT_LINE__OWIRE);
146 mxc_register_device(&mxc_w1_master_device, NULL);
147
148 /* SMSC9215 IRQ pin */
149 mxc_iomux_mode(IOMUX_MODE(MX31_PIN_GPIO3_1, IOMUX_CONFIG_GPIO));
150 if (!gpio_request(MX31_PIN_GPIO3_1, "pcm037-eth"))
151 gpio_direction_input(MX31_PIN_GPIO3_1);
152
153 mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info);
84} 154}
85 155
86/* 156/*