From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 2 Nov 2011 01:46:10 +0000 (+0100)
Subject: Merge branch 'highbank/soc' into next/soc
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=884897e6a10a86de0e611a76f4bf3fd0068a672c;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git

Merge branch 'highbank/soc' into next/soc

Conflicts:
	arch/arm/mach-mxs/include/mach/gpio.h
	arch/arm/mach-omap2/board-generic.c
	arch/arm/plat-mxc/include/mach/gpio.h
---

884897e6a10a86de0e611a76f4bf3fd0068a672c
diff --cc arch/arm/mach-mxs/include/mach/gpio.h
index 56025aa0a639,bb11e63261e4..40a8c178f10d
--- a/arch/arm/mach-mxs/include/mach/gpio.h
+++ b/arch/arm/mach-mxs/include/mach/gpio.h
@@@ -1,31 -1,27 +1,1 @@@
--/*
-- * Copyright 2007 Freescale Semiconductor, Inc. All Rights Reserved.
-- * Copyright 2008 Juergen Beisert, 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.
-- */
--
--#ifndef __MACH_MXS_GPIO_H__
--#define __MACH_MXS_GPIO_H__
--
- #include <asm-generic/gpio.h>
 -#define MXS_GPIO_NR(bank, nr)	((bank) * 32 + (nr))
--
- /* use gpiolib dispatchers */
- #define gpio_get_value		__gpio_get_value
- #define gpio_set_value		__gpio_set_value
- #define gpio_cansleep		__gpio_cansleep
- #define gpio_to_irq		__gpio_to_irq
 -#define irq_to_gpio(irq)	((irq) - MXS_GPIO_IRQ_START)
--
--#endif /* __MACH_MXS_GPIO_H__ */
++/* empty */
diff --cc arch/arm/mach-omap2/board-generic.c
index 0c427976d62f,4431ad364565..67f0a122e18b
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@@ -11,109 -15,60 +11,113 @@@
   * it under the terms of the GNU General Public License version 2 as
   * published by the Free Software Foundation.
   */
- 
+ #include <linux/gpio.h>
+ #include <linux/kernel.h>
+ #include <linux/init.h>
+ #include <linux/device.h>
 +#include <linux/io.h>
 +#include <linux/of_platform.h>
 +#include <linux/irqdomain.h>
 +#include <linux/i2c/twl.h>
  
  #include <mach/hardware.h>
 -#include <asm/mach-types.h>
  #include <asm/mach/arch.h>
 -#include <asm/mach/map.h>
  
+ #include <plat/usb.h>
  #include <plat/board.h>
  #include <plat/common.h>
 +#include <mach/omap4-common.h>
 +#include "common-board-devices.h"
 +
 +/*
 + * XXX: Still needed to boot until the i2c & twl driver is adapted to
 + * device-tree
 + */
 +static struct twl4030_platform_data sdp4430_twldata = {
 +	.irq_base	= TWL6030_IRQ_BASE,
 +	.irq_end	= TWL6030_IRQ_END,
 +};
  
 -static struct omap_board_config_kernel generic_config[] = {
 +static void __init omap4_i2c_init(void)
 +{
 +	omap4_pmic_init("twl6030", &sdp4430_twldata);
 +}
 +
 +static struct twl4030_platform_data beagle_twldata = {
 +	.irq_base	= TWL4030_IRQ_BASE,
 +	.irq_end	= TWL4030_IRQ_END,
  };
  
 -static void __init omap_generic_init_early(void)
 +static void __init omap3_i2c_init(void)
  {
 -	omap2_init_common_infrastructure();
 -	omap2_init_common_devices(NULL, NULL);
 +	omap3_pmic_init("twl4030", &beagle_twldata);
  }
  
 +static struct of_device_id omap_dt_match_table[] __initdata = {
 +	{ .compatible = "simple-bus", },
 +	{ .compatible = "ti,omap-infra", },
 +	{ }
 +};
 +
 +static struct of_device_id intc_match[] __initdata = {
 +	{ .compatible = "ti,omap3-intc", },
 +	{ .compatible = "arm,cortex-a9-gic", },
 +	{ }
 +};
 +
  static void __init omap_generic_init(void)
  {
 +	struct device_node *node = of_find_matching_node(NULL, intc_match);
 +	if (node)
 +		irq_domain_add_simple(node, 0);
 +
  	omap_serial_init();
 -	omap_board_config = generic_config;
 -	omap_board_config_size = ARRAY_SIZE(generic_config);
 +	omap_sdrc_init(NULL, NULL);
 +
 +	of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
 +}
 +
 +static void __init omap4_init(void)
 +{
 +	omap4_i2c_init();
 +	omap_generic_init();
  }
  
 -static void __init omap_generic_map_io(void)
 +static void __init omap3_init(void)
  {
 -	if (cpu_is_omap242x()) {
 -		omap2_set_globals_242x();
 -		omap242x_map_common_io();
 -	} else if (cpu_is_omap243x()) {
 -		omap2_set_globals_243x();
 -		omap243x_map_common_io();
 -	} else if (cpu_is_omap34xx()) {
 -		omap2_set_globals_3xxx();
 -		omap34xx_map_common_io();
 -	} else if (cpu_is_omap44xx()) {
 -		omap2_set_globals_443x();
 -		omap44xx_map_common_io();
 -	}
 +	omap3_i2c_init();
 +	omap_generic_init();
  }
  
 -/* XXX This machine entry name should be updated */
 -MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
 -	/* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
 +#if defined(CONFIG_SOC_OMAP2420)
 +static const char *omap242x_boards_compat[] __initdata = {
 +	"ti,omap2420",
 +	NULL,
 +};
 +
 +DT_MACHINE_START(OMAP242X_DT, "Generic OMAP2420 (Flattened Device Tree)")
 +	.atag_offset	= 0x100,
 +	.reserve	= omap_reserve,
 +	.map_io		= omap242x_map_io,
 +	.init_early	= omap2420_init_early,
 +	.init_irq	= omap2_init_irq,
 +	.init_machine	= omap_generic_init,
 +	.timer		= &omap2_timer,
 +	.dt_compat	= omap242x_boards_compat,
 +MACHINE_END
 +#endif
 +
 +#if defined(CONFIG_SOC_OMAP2430)
 +static const char *omap243x_boards_compat[] __initdata = {
 +	"ti,omap2430",
 +	NULL,
 +};
 +
 +DT_MACHINE_START(OMAP243X_DT, "Generic OMAP2430 (Flattened Device Tree)")
  	.atag_offset	= 0x100,
  	.reserve	= omap_reserve,
 -	.map_io		= omap_generic_map_io,
 -	.init_early	= omap_generic_init_early,
 +	.map_io		= omap243x_map_io,
 +	.init_early	= omap2430_init_early,
  	.init_irq	= omap2_init_irq,
  	.init_machine	= omap_generic_init,
  	.timer		= &omap2_timer,
diff --cc arch/arm/plat-mxc/include/mach/gpio.h
index 44af0064ba1a,3e1ffc8b8f0c..40a8c178f10d
--- a/arch/arm/plat-mxc/include/mach/gpio.h
+++ b/arch/arm/plat-mxc/include/mach/gpio.h
@@@ -1,32 -1,33 +1,1 @@@
--/*
-- * Copyright 2007 Freescale Semiconductor, Inc. All Rights Reserved.
-- * Copyright 2008 Juergen Beisert, 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.
-- */
--
--#ifndef __ASM_ARCH_MXC_GPIO_H__
--#define __ASM_ARCH_MXC_GPIO_H__
--
--#include <linux/spinlock.h>
--#include <mach/hardware.h>
- #include <asm-generic/gpio.h>
--
- /* use gpiolib dispatchers */
- #define gpio_get_value		__gpio_get_value
- #define gpio_set_value		__gpio_set_value
- #define gpio_cansleep		__gpio_cansleep
- #define gpio_to_irq		__gpio_to_irq
 -
 -/* There's a off-by-one betweem the gpio bank number and the gpiochip */
 -/* range e.g. GPIO_1_5 is gpio 5 under linux */
 -#define IMX_GPIO_NR(bank, nr)		(((bank) - 1) * 32 + (nr))
 -
 -#define gpio_to_irq(gpio)	(MXC_GPIO_IRQ_START + (gpio))
 -#define irq_to_gpio(irq)	((irq) - MXC_GPIO_IRQ_START)
--
--#endif
++/* empty */
diff --cc arch/arm/plat-omap/devices.c
index bd9a06b3ee89,64c3bd4aa54e..acd132c29647
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@@ -24,10 -24,55 +24,9 @@@
  #include <plat/tc.h>
  #include <plat/board.h>
  #include <plat/mmc.h>
- #include <mach/gpio.h>
  #include <plat/menelaus.h>
 -#include <plat/mcbsp.h>
  #include <plat/omap44xx.h>
  
 -/*-------------------------------------------------------------------------*/
 -
 -#if defined(CONFIG_OMAP_MCBSP) || defined(CONFIG_OMAP_MCBSP_MODULE)
 -
 -static struct platform_device **omap_mcbsp_devices;
 -
 -void omap_mcbsp_register_board_cfg(struct resource *res, int res_count,
 -			struct omap_mcbsp_platform_data *config, int size)
 -{
 -	int i;
 -
 -	omap_mcbsp_devices = kzalloc(size * sizeof(struct platform_device *),
 -				     GFP_KERNEL);
 -	if (!omap_mcbsp_devices) {
 -		printk(KERN_ERR "Could not register McBSP devices\n");
 -		return;
 -	}
 -
 -	for (i = 0; i < size; i++) {
 -		struct platform_device *new_mcbsp;
 -		int ret;
 -
 -		new_mcbsp = platform_device_alloc("omap-mcbsp", i + 1);
 -		if (!new_mcbsp)
 -			continue;
 -		platform_device_add_resources(new_mcbsp, &res[i * res_count],
 -					res_count);
 -		new_mcbsp->dev.platform_data = &config[i];
 -		ret = platform_device_add(new_mcbsp);
 -		if (ret) {
 -			platform_device_put(new_mcbsp);
 -			continue;
 -		}
 -		omap_mcbsp_devices[i] = new_mcbsp;
 -	}
 -}
 -
 -#else
 -void omap_mcbsp_register_board_cfg(struct resource *res, int res_count,
 -			struct omap_mcbsp_platform_data *config, int size)
 -{  }
 -#endif
 -
 -/*-------------------------------------------------------------------------*/
 -
  #if defined(CONFIG_SND_OMAP_SOC_MCPDM) || \
  		defined(CONFIG_SND_OMAP_SOC_MCPDM_MODULE)