aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/board-mop500.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-03-16 15:13:58 -0400
committerArnd Bergmann <arnd@arndb.de>2012-03-16 15:13:58 -0400
commitf56b71f5d5a3944acdcb0e5e1739574d95ddf61a (patch)
tree2cdfad1895d7638489a74af22bd6cb760f95c848 /arch/arm/mach-ux500/board-mop500.c
parentc0206e228e34d8b414fcc63db45b831843adea06 (diff)
parent3510ec672319e09fe43bd623b19fcf539c0bd1fa (diff)
Merge branch 'ux500/soc' into ux500/dt
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500.c')
-rw-r--r--arch/arm/mach-ux500/board-mop500.c74
1 files changed, 47 insertions, 27 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 5c00712907d1..04afcdf8b0cf 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -226,7 +226,12 @@ static struct tps6105x_platform_data mop500_tps61052_data = {
226 226
227static void mop500_tc35892_init(struct tc3589x *tc3589x, unsigned int base) 227static void mop500_tc35892_init(struct tc3589x *tc3589x, unsigned int base)
228{ 228{
229 mop500_sdi_tc35892_init(); 229 struct device *parent = NULL;
230#if 0
231 /* FIXME: Is the sdi actually part of tc3589x? */
232 parent = tc3589x->dev;
233#endif
234 mop500_sdi_tc35892_init(parent);
230} 235}
231 236
232static struct tc3589x_gpio_platform_data mop500_tc35892_gpio_data = { 237static struct tc3589x_gpio_platform_data mop500_tc35892_gpio_data = {
@@ -353,12 +358,12 @@ U8500_I2C_CONTROLLER(1, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
353U8500_I2C_CONTROLLER(2, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST); 358U8500_I2C_CONTROLLER(2, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
354U8500_I2C_CONTROLLER(3, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST); 359U8500_I2C_CONTROLLER(3, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
355 360
356static void __init mop500_i2c_init(void) 361static void __init mop500_i2c_init(struct device *parent)
357{ 362{
358 db8500_add_i2c0(&u8500_i2c0_data); 363 db8500_add_i2c0(parent, &u8500_i2c0_data);
359 db8500_add_i2c1(&u8500_i2c1_data); 364 db8500_add_i2c1(parent, &u8500_i2c1_data);
360 db8500_add_i2c2(&u8500_i2c2_data); 365 db8500_add_i2c2(parent, &u8500_i2c2_data);
361 db8500_add_i2c3(&u8500_i2c3_data); 366 db8500_add_i2c3(parent, &u8500_i2c3_data);
362} 367}
363 368
364static struct gpio_keys_button mop500_gpio_keys[] = { 369static struct gpio_keys_button mop500_gpio_keys[] = {
@@ -451,9 +456,9 @@ static struct pl022_ssp_controller ssp0_platform_data = {
451 .num_chipselect = 5, 456 .num_chipselect = 5,
452}; 457};
453 458
454static void __init mop500_spi_init(void) 459static void __init mop500_spi_init(struct device *parent)
455{ 460{
456 db8500_add_ssp0(&ssp0_platform_data); 461 db8500_add_ssp0(parent, &ssp0_platform_data);
457} 462}
458 463
459#ifdef CONFIG_STE_DMA40 464#ifdef CONFIG_STE_DMA40
@@ -587,11 +592,11 @@ static struct amba_pl011_data uart2_plat = {
587#endif 592#endif
588}; 593};
589 594
590static void __init mop500_uart_init(void) 595static void __init mop500_uart_init(struct device *parent)
591{ 596{
592 db8500_add_uart0(&uart0_plat); 597 db8500_add_uart0(parent, &uart0_plat);
593 db8500_add_uart1(&uart1_plat); 598 db8500_add_uart1(parent, &uart1_plat);
594 db8500_add_uart2(&uart2_plat); 599 db8500_add_uart2(parent, &uart2_plat);
595} 600}
596 601
597static struct platform_device *snowball_platform_devs[] __initdata = { 602static struct platform_device *snowball_platform_devs[] __initdata = {
@@ -603,21 +608,26 @@ static struct platform_device *snowball_platform_devs[] __initdata = {
603 608
604static void __init mop500_init_machine(void) 609static void __init mop500_init_machine(void)
605{ 610{
611 struct device *parent = NULL;
606 int i2c0_devs; 612 int i2c0_devs;
613 int i;
607 614
608 mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; 615 mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
609 616
610 u8500_init_devices(); 617 parent = u8500_init_devices();
611 618
612 mop500_pins_init(); 619 mop500_pins_init();
613 620
621 for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
622 mop500_platform_devs[i]->dev.parent = parent;
623
614 platform_add_devices(mop500_platform_devs, 624 platform_add_devices(mop500_platform_devs,
615 ARRAY_SIZE(mop500_platform_devs)); 625 ARRAY_SIZE(mop500_platform_devs));
616 626
617 mop500_i2c_init(); 627 mop500_i2c_init(parent);
618 mop500_sdi_init(); 628 mop500_sdi_init(parent);
619 mop500_spi_init(); 629 mop500_spi_init(parent);
620 mop500_uart_init(); 630 mop500_uart_init(parent);
621 631
622 i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); 632 i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
623 633
@@ -631,19 +641,24 @@ static void __init mop500_init_machine(void)
631 641
632static void __init snowball_init_machine(void) 642static void __init snowball_init_machine(void)
633{ 643{
644 struct device *parent = NULL;
634 int i2c0_devs; 645 int i2c0_devs;
646 int i;
635 647
636 u8500_init_devices(); 648 parent = u8500_init_devices();
637 649
638 snowball_pins_init(); 650 snowball_pins_init();
639 651
652 for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++)
653 snowball_platform_devs[i]->dev.parent = parent;
654
640 platform_add_devices(snowball_platform_devs, 655 platform_add_devices(snowball_platform_devs,
641 ARRAY_SIZE(snowball_platform_devs)); 656 ARRAY_SIZE(snowball_platform_devs));
642 657
643 mop500_i2c_init(); 658 mop500_i2c_init(parent);
644 snowball_sdi_init(); 659 snowball_sdi_init(parent);
645 mop500_spi_init(); 660 mop500_spi_init(parent);
646 mop500_uart_init(); 661 mop500_uart_init(parent);
647 662
648 i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); 663 i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
649 i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); 664 i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
@@ -656,7 +671,9 @@ static void __init snowball_init_machine(void)
656 671
657static void __init hrefv60_init_machine(void) 672static void __init hrefv60_init_machine(void)
658{ 673{
674 struct device *parent = NULL;
659 int i2c0_devs; 675 int i2c0_devs;
676 int i;
660 677
661 /* 678 /*
662 * The HREFv60 board removed a GPIO expander and routed 679 * The HREFv60 board removed a GPIO expander and routed
@@ -665,17 +682,20 @@ static void __init hrefv60_init_machine(void)
665 */ 682 */
666 mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO; 683 mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;
667 684
668 u8500_init_devices(); 685 parent = u8500_init_devices();
669 686
670 hrefv60_pins_init(); 687 hrefv60_pins_init();
671 688
689 for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
690 mop500_platform_devs[i]->dev.parent = parent;
691
672 platform_add_devices(mop500_platform_devs, 692 platform_add_devices(mop500_platform_devs,
673 ARRAY_SIZE(mop500_platform_devs)); 693 ARRAY_SIZE(mop500_platform_devs));
674 694
675 mop500_i2c_init(); 695 mop500_i2c_init(parent);
676 hrefv60_sdi_init(); 696 hrefv60_sdi_init(parent);
677 mop500_spi_init(); 697 mop500_spi_init(parent);
678 mop500_uart_init(); 698 mop500_uart_init(parent);
679 699
680 i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); 700 i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
681 701