Skip to content

Commit

Permalink
Merge tag 'ux500-core-for-arm-soc-2' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/linusw/linux-stericsson into late/all

From Linus Walleij:
Ux500 core changes for ARM SoC:
- Cleanup from Julia Lawall
- Clean out old pin definitions
- Fix the I2C devices

* tag 'ux500-core-for-arm-soc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  ARM: ux500: fix up the I2C devices
  ARM: ux500: delete oldschool pin defines
  arch/arm/mach-ux500/cpu-db8500.c: Avoid using ARRAY_AND_SIZE(e) as a function argument
  ARM: ux500: set coherent_dma_mask for dma40
  ARM: ux500: remove u8500_secondary_startup from INIT section.
  ARM: ux500: add restart support via prcmu

Signed-off-by: Olof Johansson <olof@lixom.net>
  • Loading branch information
Olof Johansson committed Aug 29, 2013
2 parents d8dfad3 + 1e66a3d commit b94c182
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 773 deletions.
1 change: 0 additions & 1 deletion arch/arm/mach-ux500/board-mop500-audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "ste-dma40-db8500.h"
#include "board-mop500.h"
#include "devices-db8500.h"
#include "pins-db8500.h"

static struct stedma40_chan_cfg msp0_dma_rx = {
.high_priority = true,
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-ux500/board-mop500-pins.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

#include <asm/mach-types.h>

#include "pins-db8500.h"
#include "board-mop500.h"

enum custom_pin_cfg_t {
Expand Down
38 changes: 17 additions & 21 deletions arch/arm/mach-ux500/board-mop500.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include <linux/platform_data/dma-ste-dma40.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>

#include "setup.h"
#include "devices.h"
Expand Down Expand Up @@ -325,21 +324,19 @@ static struct lp55xx_platform_data __initdata lp5521_sec_data = {
.clock_mode = LP55XX_CLOCK_EXT,
};

/* I2C0 devices only available on the first HREF/MOP500 */
static struct i2c_board_info __initdata mop500_i2c0_devices[] = {
{
I2C_BOARD_INFO("tc3589x", 0x42),
.irq = NOMADIK_GPIO_TO_IRQ(217),
.platform_data = &mop500_tc35892_data,
},
/* I2C0 devices only available prior to HREFv60 */
{
I2C_BOARD_INFO("tps61052", 0x33),
.platform_data = &mop500_tps61052_data,
},
};

#define NUM_PRE_V60_I2C0_DEVICES 1

static struct i2c_board_info __initdata mop500_i2c2_devices[] = {
{
/* lp5521 LED driver, 1st device */
Expand All @@ -357,6 +354,17 @@ static struct i2c_board_info __initdata mop500_i2c2_devices[] = {
},
};

static int __init mop500_i2c_board_init(void)
{
if (machine_is_u8500())
mop500_uib_i2c_add(0, mop500_i2c0_devices,
ARRAY_SIZE(mop500_i2c0_devices));
mop500_uib_i2c_add(2, mop500_i2c2_devices,
ARRAY_SIZE(mop500_i2c2_devices));
return 0;
}
device_initcall(mop500_i2c_board_init);

static void __init mop500_i2c_init(struct device *parent)
{
db8500_add_i2c0(parent, NULL);
Expand Down Expand Up @@ -565,7 +573,6 @@ static struct platform_device *snowball_platform_devs[] __initdata = {
static void __init mop500_init_machine(void)
{
struct device *parent = NULL;
int i2c0_devs;
int i;

platform_device_register(&db8500_prcmu_device);
Expand All @@ -588,19 +595,13 @@ static void __init mop500_init_machine(void)
mop500_spi_init(parent);
mop500_audio_init(parent);
mop500_uart_init(parent);

u8500_cryp1_hash1_init(parent);

i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);

i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
i2c_register_board_info(2, mop500_i2c2_devices,
ARRAY_SIZE(mop500_i2c2_devices));

/* This board has full regulator constraints */
regulator_has_full_constraints();
}


static void __init snowball_init_machine(void)
{
struct device *parent = NULL;
Expand Down Expand Up @@ -635,7 +636,6 @@ static void __init snowball_init_machine(void)
static void __init hrefv60_init_machine(void)
{
struct device *parent = NULL;
int i2c0_devs;
int i;

platform_device_register(&db8500_prcmu_device);
Expand Down Expand Up @@ -664,14 +664,6 @@ static void __init hrefv60_init_machine(void)
mop500_audio_init(parent);
mop500_uart_init(parent);

i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);

i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES;

i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
i2c_register_board_info(2, mop500_i2c2_devices,
ARRAY_SIZE(mop500_i2c2_devices));

/* This board has full regulator constraints */
regulator_has_full_constraints();
}
Expand All @@ -686,6 +678,7 @@ MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
.init_time = ux500_timer_init,
.init_machine = mop500_init_machine,
.init_late = ux500_init_late,
.restart = ux500_restart,
MACHINE_END

MACHINE_START(U8520, "ST-Ericsson U8520 Platform HREFP520")
Expand All @@ -695,6 +688,7 @@ MACHINE_START(U8520, "ST-Ericsson U8520 Platform HREFP520")
.init_time = ux500_timer_init,
.init_machine = mop500_init_machine,
.init_late = ux500_init_late,
.restart = ux500_restart,
MACHINE_END

MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+")
Expand All @@ -705,6 +699,7 @@ MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+")
.init_time = ux500_timer_init,
.init_machine = hrefv60_init_machine,
.init_late = ux500_init_late,
.restart = ux500_restart,
MACHINE_END

MACHINE_START(SNOWBALL, "Calao Systems Snowball platform")
Expand All @@ -716,4 +711,5 @@ MACHINE_START(SNOWBALL, "Calao Systems Snowball platform")
.init_time = ux500_timer_init,
.init_machine = snowball_init_machine,
.init_late = NULL,
.restart = ux500_restart,
MACHINE_END
5 changes: 3 additions & 2 deletions arch/arm/mach-ux500/cpu-db8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

#include <asm/pmu.h>
#include <asm/mach/map.h>
#include <asm/mach/arch.h>

#include "setup.h"
#include "devices.h"
Expand Down Expand Up @@ -157,7 +156,8 @@ static void __init db8500_add_gpios(struct device *parent)
.supports_sleepmode = true,
};

dbx500_add_gpios(parent, ARRAY_AND_SIZE(db8500_gpio_base),
dbx500_add_gpios(parent, db8500_gpio_base,
ARRAY_SIZE(db8500_gpio_base),
IRQ_DB8500_GPIO0, &pdata);
dbx500_add_pinctrl(parent, "pinctrl-db8500", U8500_PRCMU_BASE);
}
Expand Down Expand Up @@ -325,6 +325,7 @@ DT_MACHINE_START(U8500_DT, "ST-Ericsson Ux5x0 platform (Device Tree Support)")
.init_machine = u8500_init_machine,
.init_late = NULL,
.dt_compat = stericsson_dt_platform_compat,
.restart = ux500_restart,
MACHINE_END

#endif
8 changes: 8 additions & 0 deletions arch/arm/mach-ux500/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@
#include "db8500-regs.h"
#include "id.h"

void ux500_restart(enum reboot_mode mode, const char *cmd)
{
local_irq_disable();
local_fiq_disable();

prcmu_system_reset(0);
}

/*
* FIXME: Should we set up the GPIO domain here?
*
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-ux500/devices-db8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ struct stedma40_platform_data dma40_plat_data = {
struct platform_device u8500_dma40_device = {
.dev = {
.platform_data = &dma40_plat_data,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
.name = "dma40",
.id = 0,
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/mach-ux500/headsmp.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#include <linux/linkage.h>
#include <linux/init.h>

__INIT

/*
* U8500 specific entry point for secondary CPUs.
*/
Expand Down
Loading

0 comments on commit b94c182

Please sign in to comment.