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

Commit f940b027 authored by Shawn Guo's avatar Shawn Guo
Browse files

ARM: mxs: remove platform device codes



With all the board files removed, there is no user for those platform
device code.  Remove them.

Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
parent 4a1e75b6
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
if ARCH_MXS
if ARCH_MXS


source "arch/arm/mach-mxs/devices/Kconfig"

config SOC_IMX23
config SOC_IMX23
	bool
	bool
	select ARM_AMBA
	select ARM_AMBA
+1 −3
Original line number Original line Diff line number Diff line
# Common support
# Common support
obj-y := devices.o icoll.o iomux.o ocotp.o system.o timer.o mm.o
obj-y := icoll.o iomux.o ocotp.o system.o timer.o mm.o


obj-$(CONFIG_PM) += pm.o
obj-$(CONFIG_PM) += pm.o


obj-$(CONFIG_MACH_MXS_DT) += mach-mxs.o
obj-$(CONFIG_MACH_MXS_DT) += mach-mxs.o

obj-y += devices/

arch/arm/mach-mxs/devices-mx23.h

deleted100644 → 0
+0 −43
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2010 Pengutronix
 * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
 *
 * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved.
 *
 * 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/mx23.h>
#include <mach/devices-common.h>
#include <linux/mxsfb.h>
#include <linux/amba/bus.h>

static inline int mx23_add_duart(void)
{
	struct amba_device *d;

	d = amba_ahb_device_add(NULL, "duart", MX23_DUART_BASE_ADDR, SZ_8K,
				MX23_INT_DUART, 0, 0, 0);
	return IS_ERR(d) ? PTR_ERR(d) : 0;
}

extern const struct mxs_auart_data mx23_auart_data[] __initconst;
#define mx23_add_auart(id)	mxs_add_auart(&mx23_auart_data[id])
#define mx23_add_auart0()		mx23_add_auart(0)
#define mx23_add_auart1()		mx23_add_auart(1)

extern const struct mxs_gpmi_nand_data mx23_gpmi_nand_data __initconst;
#define mx23_add_gpmi_nand(pdata)	\
	mxs_add_gpmi_nand(pdata, &mx23_gpmi_nand_data)

extern const struct mxs_mxs_mmc_data mx23_mxs_mmc_data[] __initconst;
#define mx23_add_mxs_mmc(id, pdata) \
	mxs_add_mxs_mmc(&mx23_mxs_mmc_data[id], pdata)

#define mx23_add_mxs_pwm(id)		mxs_add_mxs_pwm(MX23_PWM_BASE_ADDR, id)

struct platform_device *__init mx23_add_mxsfb(
		const struct mxsfb_platform_data *pdata);

struct platform_device *__init mx23_add_rtc_stmp3xxx(void);

arch/arm/mach-mxs/devices-mx28.h

deleted100644 → 0
+0 −63
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2010 Pengutronix
 * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
 *
 * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved.
 *
 * 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/mx28.h>
#include <mach/devices-common.h>
#include <linux/mxsfb.h>
#include <linux/amba/bus.h>

static inline int mx28_add_duart(void)
{
	struct amba_device *d;

	d = amba_ahb_device_add(NULL, "duart", MX28_DUART_BASE_ADDR, SZ_8K,
				MX28_INT_DUART, 0, 0, 0);
	return IS_ERR(d) ? PTR_ERR(d) : 0;
}

extern const struct mxs_auart_data mx28_auart_data[] __initconst;
#define mx28_add_auart(id)	mxs_add_auart(&mx28_auart_data[id])
#define mx28_add_auart0()		mx28_add_auart(0)
#define mx28_add_auart1()		mx28_add_auart(1)
#define mx28_add_auart2()		mx28_add_auart(2)
#define mx28_add_auart3()		mx28_add_auart(3)
#define mx28_add_auart4()		mx28_add_auart(4)

extern const struct mxs_fec_data mx28_fec_data[] __initconst;
#define mx28_add_fec(id, pdata) \
	mxs_add_fec(&mx28_fec_data[id], pdata)

extern const struct mxs_flexcan_data mx28_flexcan_data[] __initconst;
#define mx28_add_flexcan(id, pdata)	\
	mxs_add_flexcan(&mx28_flexcan_data[id], pdata)
#define mx28_add_flexcan0(pdata)	mx28_add_flexcan(0, pdata)
#define mx28_add_flexcan1(pdata)	mx28_add_flexcan(1, pdata)

extern const struct mxs_gpmi_nand_data mx28_gpmi_nand_data __initconst;
#define mx28_add_gpmi_nand(pdata)	\
	mxs_add_gpmi_nand(pdata, &mx28_gpmi_nand_data)

extern const struct mxs_mxs_i2c_data mx28_mxs_i2c_data[] __initconst;
#define mx28_add_mxs_i2c(id)		mxs_add_mxs_i2c(&mx28_mxs_i2c_data[id])

extern const struct mxs_mxs_mmc_data mx28_mxs_mmc_data[] __initconst;
#define mx28_add_mxs_mmc(id, pdata) \
	mxs_add_mxs_mmc(&mx28_mxs_mmc_data[id], pdata)

#define mx28_add_mxs_pwm(id)		mxs_add_mxs_pwm(MX28_PWM_BASE_ADDR, id)

struct platform_device *__init mx28_add_mxsfb(
		const struct mxsfb_platform_data *pdata);

extern const struct mxs_saif_data mx28_saif_data[] __initconst;
#define mx28_add_saif(id, pdata) \
	mxs_add_saif(&mx28_saif_data[id], pdata)

struct platform_device *__init mx28_add_rtc_stmp3xxx(void);

arch/arm/mach-mxs/devices.c

deleted100644 → 0
+0 −87
Original line number Original line Diff line number Diff line
/*
 * Copyright 2008 Sascha Hauer, kernel@pengutronix.de
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301, USA.
 */

#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/amba/bus.h>

struct platform_device *__init mxs_add_platform_device_dmamask(
		const char *name, int id,
		const struct resource *res, unsigned int num_resources,
		const void *data, size_t size_data, u64 dmamask)
{
	int ret = -ENOMEM;
	struct platform_device *pdev;

	pdev = platform_device_alloc(name, id);
	if (!pdev)
		goto err;

	if (dmamask) {
		/*
		 * This memory isn't freed when the device is put,
		 * I don't have a nice idea for that though.  Conceptually
		 * dma_mask in struct device should not be a pointer.
		 * See http://thread.gmane.org/gmane.linux.kernel.pci/9081
		 */
		pdev->dev.dma_mask =
			kmalloc(sizeof(*pdev->dev.dma_mask), GFP_KERNEL);
		if (!pdev->dev.dma_mask)
			/* ret is still -ENOMEM; */
			goto err;

		*pdev->dev.dma_mask = dmamask;
		pdev->dev.coherent_dma_mask = dmamask;
	}

	if (res) {
		ret = platform_device_add_resources(pdev, res, num_resources);
		if (ret)
			goto err;
	}

	if (data) {
		ret = platform_device_add_data(pdev, data, size_data);
		if (ret)
			goto err;
	}

	ret = platform_device_add(pdev);
	if (ret) {
err:
		if (dmamask)
			kfree(pdev->dev.dma_mask);
		platform_device_put(pdev);
		return ERR_PTR(ret);
	}

	return pdev;
}

struct device mxs_apbh_bus = {
	.init_name	= "mxs_apbh",
	.parent         = &platform_bus,
};

static int __init mxs_device_init(void)
{
	return device_register(&mxs_apbh_bus);
}
core_initcall(mxs_device_init);
Loading