Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e7a29a8 authored by Uwe Kleine-König's avatar Uwe Kleine-König
Browse files

ARM: imx: Change the way nand devices are registered (imx27)



Make use of new mechanism to register a nand device.

Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
parent b0c4845c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -81,12 +81,14 @@ comment "MX27 platforms:"

config MACH_MX27ADS
	bool "MX27ADS platform"
	select IMX_HAVE_PLATFORM_MXC_NAND
	help
	  Include support for MX27ADS platform. This includes specific
	  configurations for the board and its peripherals.

config MACH_PCM038
	bool "Phytec phyCORE-i.MX27 CPU module (pcm038)"
	select IMX_HAVE_PLATFORM_MXC_NAND
	select MXC_ULPI if USB_ULPI
	help
	  Include support for phyCORE-i.MX27 (aka pcm038) platform. This
@@ -108,6 +110,7 @@ endchoice

config MACH_CPUIMX27
	bool "Eukrea CPUIMX27 module"
	select IMX_HAVE_PLATFORM_MXC_NAND
	help
	  Include support for Eukrea CPUIMX27 platform. This includes
	  specific configurations for the module and its peripherals.
@@ -147,6 +150,7 @@ config MACH_IMX27LITE

config MACH_PCA100
	bool "Phytec phyCARD-s (pca100)"
	select IMX_HAVE_PLATFORM_MXC_NAND
	select MXC_ULPI if USB_ULPI
	help
	  Include support for phyCARD-s (aka pca100) platform. This
@@ -154,6 +158,7 @@ config MACH_PCA100

config MACH_MXT_TD60
	bool "Maxtrack i-MXT TD60"
	select IMX_HAVE_PLATFORM_MXC_NAND
	help
	  Include support for i-MXT (aka td60) platform. This
	  includes specific configurations for the module and its peripherals.
+13 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2010 Pengutronix
 * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License version 2 as published by the
 * Free Software Foundation.
 */
#include <mach/mx27.h>
#include <mach/devices-common.h>

#define imx27_add_mxc_nand(pdata)	\
	imx_add_mxc_nand_v1(MX27_NFC_BASE_ADDR, MX27_INT_NANDFC, pdata)
+0 −24
Original line number Diff line number Diff line
@@ -337,30 +337,6 @@ struct platform_device mxc_w1_master_device = {
	.resource = mxc_w1_master_resources,
};

#define DEFINE_MXC_NAND_DEVICE(pfx, baseaddr, irq)			\
	static struct resource pfx ## _nand_resources[] = {		\
		{							\
			.start = baseaddr,				\
			.end = baseaddr + SZ_4K - 1,			\
			.flags = IORESOURCE_MEM,			\
		}, {							\
			.start = irq,					\
			.end = irq,					\
			.flags = IORESOURCE_IRQ,			\
		},							\
	};								\
									\
	struct platform_device pfx ## _nand_device = {			\
		.name = "mxc_nand",					\
		.id = 0,						\
		.num_resources = ARRAY_SIZE(pfx ## _nand_resources),	\
		.resource = pfx ## _nand_resources,			\
	}

#ifdef CONFIG_MACH_MX27
DEFINE_MXC_NAND_DEVICE(imx27, MX27_NFC_BASE_ADDR, MX27_INT_NANDFC);
#endif

/*
 * lcdc:
 * - i.MX1: the basic controller
+0 −3
Original line number Diff line number Diff line
@@ -26,9 +26,6 @@ extern struct platform_device imx2x_uart_device4;
extern struct platform_device imx2x_uart_device5;
#endif
extern struct platform_device mxc_w1_master_device;
#ifdef CONFIG_MACH_MX27
extern struct platform_device imx27_nand_device;
#endif
extern struct platform_device mxc_fb_device;
extern struct platform_device mxc_fec_device;
extern struct platform_device mxc_pwm_device;
+4 −3
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@
#include <mach/imx-uart.h>
#include <mach/mxc_nand.h>

#include "devices-imx27.h"
#include "devices.h"

static int eukrea_cpuimx27_pins[] = {
@@ -119,7 +120,8 @@ static struct imxuart_platform_data uart_pdata[] = {
	},
};

static struct mxc_nand_platform_data eukrea_cpuimx27_nand_board_info = {
static const struct mxc_nand_platform_data
cpuimx27_nand_board_info __initconst = {
	.width = 1,
	.hw_ecc = 1,
};
@@ -189,8 +191,7 @@ static void __init eukrea_cpuimx27_init(void)

	mxc_register_device(&imx2x_uart_device0, &uart_pdata[0]);

	mxc_register_device(&imx27_nand_device,
			&eukrea_cpuimx27_nand_board_info);
	imx27_add_mxc_nand(&cpuimx27_nand_board_info);

	i2c_register_board_info(0, eukrea_cpuimx27_i2c_devices,
				ARRAY_SIZE(eukrea_cpuimx27_i2c_devices));
Loading