aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mach-pcm037.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx3/mach-pcm037.c')
-rw-r--r--arch/arm/mach-mx3/mach-pcm037.c34
1 files changed, 15 insertions, 19 deletions
diff --git a/arch/arm/mach-mx3/mach-pcm037.c b/arch/arm/mach-mx3/mach-pcm037.c
index cce410662383..8a292dd1a714 100644
--- a/arch/arm/mach-mx3/mach-pcm037.c
+++ b/arch/arm/mach-mx3/mach-pcm037.c
@@ -10,10 +10,6 @@
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */ 13 */
18 14
19#include <linux/types.h> 15#include <linux/types.h>
@@ -43,20 +39,17 @@
43#include <asm/mach/arch.h> 39#include <asm/mach/arch.h>
44#include <asm/mach/time.h> 40#include <asm/mach/time.h>
45#include <asm/mach/map.h> 41#include <asm/mach/map.h>
46#include <mach/board-pcm037.h>
47#include <mach/common.h> 42#include <mach/common.h>
48#include <mach/hardware.h> 43#include <mach/hardware.h>
49#include <mach/i2c.h>
50#include <mach/imx-uart.h>
51#include <mach/iomux-mx3.h> 44#include <mach/iomux-mx3.h>
52#include <mach/ipu.h> 45#include <mach/ipu.h>
53#include <mach/mmc.h> 46#include <mach/mmc.h>
54#include <mach/mx3_camera.h> 47#include <mach/mx3_camera.h>
55#include <mach/mx3fb.h> 48#include <mach/mx3fb.h>
56#include <mach/mxc_nand.h>
57#include <mach/mxc_ehci.h> 49#include <mach/mxc_ehci.h>
58#include <mach/ulpi.h> 50#include <mach/ulpi.h>
59 51
52#include "devices-imx31.h"
60#include "devices.h" 53#include "devices.h"
61#include "pcm037.h" 54#include "pcm037.h"
62 55
@@ -225,7 +218,7 @@ static struct platform_device pcm037_flash = {
225 .num_resources = 1, 218 .num_resources = 1,
226}; 219};
227 220
228static struct imxuart_platform_data uart_pdata = { 221static const struct imxuart_platform_data uart_pdata __initconst = {
229 .flags = IMXUART_HAVE_RTSCTS, 222 .flags = IMXUART_HAVE_RTSCTS,
230}; 223};
231 224
@@ -279,16 +272,17 @@ static struct platform_device pcm037_sram_device = {
279 .resource = &pcm038_sram_resource, 272 .resource = &pcm038_sram_resource,
280}; 273};
281 274
282static struct mxc_nand_platform_data pcm037_nand_board_info = { 275static const struct mxc_nand_platform_data
276pcm037_nand_board_info __initconst = {
283 .width = 1, 277 .width = 1,
284 .hw_ecc = 1, 278 .hw_ecc = 1,
285}; 279};
286 280
287static struct imxi2c_platform_data pcm037_i2c_1_data = { 281static const struct imxi2c_platform_data pcm037_i2c1_data __initconst = {
288 .bitrate = 100000, 282 .bitrate = 100000,
289}; 283};
290 284
291static struct imxi2c_platform_data pcm037_i2c_2_data = { 285static const struct imxi2c_platform_data pcm037_i2c2_data __initconst = {
292 .bitrate = 20000, 286 .bitrate = 20000,
293}; 287};
294 288
@@ -545,6 +539,7 @@ static struct platform_device pcm970_sja1000 = {
545 .num_resources = ARRAY_SIZE(pcm970_sja1000_resources), 539 .num_resources = ARRAY_SIZE(pcm970_sja1000_resources),
546}; 540};
547 541
542#if defined(CONFIG_USB_ULPI)
548static struct mxc_usbh_platform_data otg_pdata = { 543static struct mxc_usbh_platform_data otg_pdata = {
549 .portsc = MXC_EHCI_MODE_ULPI, 544 .portsc = MXC_EHCI_MODE_ULPI,
550 .flags = MXC_EHCI_INTERFACE_DIFF_UNI, 545 .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
@@ -554,6 +549,7 @@ static struct mxc_usbh_platform_data usbh2_pdata = {
554 .portsc = MXC_EHCI_MODE_ULPI, 549 .portsc = MXC_EHCI_MODE_ULPI,
555 .flags = MXC_EHCI_INTERFACE_DIFF_UNI, 550 .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
556}; 551};
552#endif
557 553
558static struct fsl_usb2_platform_data otg_device_pdata = { 554static struct fsl_usb2_platform_data otg_device_pdata = {
559 .operating_mode = FSL_USB2_DR_DEVICE, 555 .operating_mode = FSL_USB2_DR_DEVICE,
@@ -581,7 +577,6 @@ __setup("otg_mode=", pcm037_otg_mode);
581static void __init mxc_board_init(void) 577static void __init mxc_board_init(void)
582{ 578{
583 int ret; 579 int ret;
584 u32 tmp;
585 580
586 mxc_iomux_set_gpr(MUX_PGP_UH2, 1); 581 mxc_iomux_set_gpr(MUX_PGP_UH2, 1);
587 582
@@ -614,9 +609,10 @@ static void __init mxc_board_init(void)
614 609
615 platform_add_devices(devices, ARRAY_SIZE(devices)); 610 platform_add_devices(devices, ARRAY_SIZE(devices));
616 611
617 mxc_register_device(&mxc_uart_device0, &uart_pdata); 612 imx31_add_imx_uart0(&uart_pdata);
618 mxc_register_device(&mxc_uart_device1, &uart_pdata); 613 /* XXX: should't this have .flags = 0 (i.e. no RTSCTS) on PCM037_EET? */
619 mxc_register_device(&mxc_uart_device2, &uart_pdata); 614 imx31_add_imx_uart1(&uart_pdata);
615 imx31_add_imx_uart2(&uart_pdata);
620 616
621 mxc_register_device(&mxc_w1_master_device, NULL); 617 mxc_register_device(&mxc_w1_master_device, NULL);
622 618
@@ -634,10 +630,10 @@ static void __init mxc_board_init(void)
634 i2c_register_board_info(1, pcm037_i2c_devices, 630 i2c_register_board_info(1, pcm037_i2c_devices,
635 ARRAY_SIZE(pcm037_i2c_devices)); 631 ARRAY_SIZE(pcm037_i2c_devices));
636 632
637 mxc_register_device(&mxc_i2c_device1, &pcm037_i2c_1_data); 633 imx31_add_imx_i2c1(&pcm037_i2c1_data);
638 mxc_register_device(&mxc_i2c_device2, &pcm037_i2c_2_data); 634 imx31_add_imx_i2c2(&pcm037_i2c2_data);
639 635
640 mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info); 636 imx31_add_mxc_nand(&pcm037_nand_board_info);
641 mxc_register_device(&mxcsdhc_device0, &sdhc_pdata); 637 mxc_register_device(&mxcsdhc_device0, &sdhc_pdata);
642 mxc_register_device(&mx3_ipu, &mx3_ipu_data); 638 mxc_register_device(&mx3_ipu, &mx3_ipu_data);
643 mxc_register_device(&mx3_fb, &mx3fb_pdata); 639 mxc_register_device(&mx3_fb, &mx3fb_pdata);