diff options
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500.c')
| -rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 52 |
1 files changed, 16 insertions, 36 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index d453522edb0d..b03457881c4b 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | #include <linux/mfd/tps6105x.h> | 28 | #include <linux/mfd/tps6105x.h> |
| 29 | #include <linux/mfd/abx500/ab8500-gpio.h> | 29 | #include <linux/mfd/abx500/ab8500-gpio.h> |
| 30 | #include <linux/mfd/abx500/ab8500-codec.h> | 30 | #include <linux/mfd/abx500/ab8500-codec.h> |
| 31 | #include <linux/leds-lp5521.h> | 31 | #include <linux/platform_data/leds-lp55xx.h> |
| 32 | #include <linux/input.h> | 32 | #include <linux/input.h> |
| 33 | #include <linux/smsc911x.h> | 33 | #include <linux/smsc911x.h> |
| 34 | #include <linux/gpio_keys.h> | 34 | #include <linux/gpio_keys.h> |
| @@ -40,7 +40,6 @@ | |||
| 40 | 40 | ||
| 41 | #include <asm/mach-types.h> | 41 | #include <asm/mach-types.h> |
| 42 | #include <asm/mach/arch.h> | 42 | #include <asm/mach/arch.h> |
| 43 | #include <asm/hardware/gic.h> | ||
| 44 | 43 | ||
| 45 | #include <mach/hardware.h> | 44 | #include <mach/hardware.h> |
| 46 | #include <mach/setup.h> | 45 | #include <mach/setup.h> |
| @@ -90,26 +89,8 @@ static struct platform_device snowball_gpio_en_3v3_regulator_dev = { | |||
| 90 | }, | 89 | }, |
| 91 | }; | 90 | }; |
| 92 | 91 | ||
| 93 | static struct ab8500_gpio_platform_data ab8500_gpio_pdata = { | 92 | static struct abx500_gpio_platform_data ab8500_gpio_pdata = { |
| 94 | .gpio_base = MOP500_AB8500_PIN_GPIO(1), | 93 | .gpio_base = MOP500_AB8500_PIN_GPIO(1), |
| 95 | .irq_base = MOP500_AB8500_VIR_GPIO_IRQ_BASE, | ||
| 96 | /* config_reg is the initial configuration of ab8500 pins. | ||
| 97 | * The pins can be configured as GPIO or alt functions based | ||
| 98 | * on value present in GpioSel1 to GpioSel6 and AlternatFunction | ||
| 99 | * register. This is the array of 7 configuration settings. | ||
| 100 | * One has to compile time decide these settings. Below is the | ||
| 101 | * explanation of these setting | ||
| 102 | * GpioSel1 = 0x00 => Pins GPIO1 to GPIO8 are not used as GPIO | ||
| 103 | * GpioSel2 = 0x1E => Pins GPIO10 to GPIO13 are configured as GPIO | ||
| 104 | * GpioSel3 = 0x80 => Pin GPIO24 is configured as GPIO | ||
| 105 | * GpioSel4 = 0x01 => Pin GPIo25 is configured as GPIO | ||
| 106 | * GpioSel5 = 0x7A => Pins GPIO34, GPIO36 to GPIO39 are conf as GPIO | ||
| 107 | * GpioSel6 = 0x00 => Pins GPIO41 & GPIo42 are not configured as GPIO | ||
| 108 | * AlternaFunction = 0x00 => If Pins GPIO10 to 13 are not configured | ||
| 109 | * as GPIO then this register selectes the alternate fucntions | ||
| 110 | */ | ||
| 111 | .config_reg = {0x00, 0x1E, 0x80, 0x01, | ||
| 112 | 0x7A, 0x00, 0x00}, | ||
| 113 | }; | 94 | }; |
| 114 | 95 | ||
| 115 | /* ab8500-codec */ | 96 | /* ab8500-codec */ |
| @@ -215,7 +196,7 @@ static struct platform_device snowball_sbnet_dev = { | |||
| 215 | }, | 196 | }, |
| 216 | }; | 197 | }; |
| 217 | 198 | ||
| 218 | static struct ab8500_platform_data ab8500_platdata = { | 199 | struct ab8500_platform_data ab8500_platdata = { |
| 219 | .irq_base = MOP500_AB8500_IRQ_BASE, | 200 | .irq_base = MOP500_AB8500_IRQ_BASE, |
| 220 | .regulator_reg_init = ab8500_regulator_reg_init, | 201 | .regulator_reg_init = ab8500_regulator_reg_init, |
| 221 | .num_regulator_reg_init = ARRAY_SIZE(ab8500_regulator_reg_init), | 202 | .num_regulator_reg_init = ARRAY_SIZE(ab8500_regulator_reg_init), |
| @@ -320,7 +301,7 @@ static struct tc3589x_platform_data mop500_tc35892_data = { | |||
| 320 | .irq_base = MOP500_EGPIO_IRQ_BASE, | 301 | .irq_base = MOP500_EGPIO_IRQ_BASE, |
| 321 | }; | 302 | }; |
| 322 | 303 | ||
| 323 | static struct lp5521_led_config lp5521_pri_led[] = { | 304 | static struct lp55xx_led_config lp5521_pri_led[] = { |
| 324 | [0] = { | 305 | [0] = { |
| 325 | .chan_nr = 0, | 306 | .chan_nr = 0, |
| 326 | .led_current = 0x2f, | 307 | .led_current = 0x2f, |
| @@ -338,14 +319,14 @@ static struct lp5521_led_config lp5521_pri_led[] = { | |||
| 338 | }, | 319 | }, |
| 339 | }; | 320 | }; |
| 340 | 321 | ||
| 341 | static struct lp5521_platform_data __initdata lp5521_pri_data = { | 322 | static struct lp55xx_platform_data __initdata lp5521_pri_data = { |
| 342 | .label = "lp5521_pri", | 323 | .label = "lp5521_pri", |
| 343 | .led_config = &lp5521_pri_led[0], | 324 | .led_config = &lp5521_pri_led[0], |
| 344 | .num_channels = 3, | 325 | .num_channels = 3, |
| 345 | .clock_mode = LP5521_CLOCK_EXT, | 326 | .clock_mode = LP55XX_CLOCK_EXT, |
| 346 | }; | 327 | }; |
| 347 | 328 | ||
| 348 | static struct lp5521_led_config lp5521_sec_led[] = { | 329 | static struct lp55xx_led_config lp5521_sec_led[] = { |
| 349 | [0] = { | 330 | [0] = { |
| 350 | .chan_nr = 0, | 331 | .chan_nr = 0, |
| 351 | .led_current = 0x2f, | 332 | .led_current = 0x2f, |
| @@ -363,11 +344,11 @@ static struct lp5521_led_config lp5521_sec_led[] = { | |||
| 363 | }, | 344 | }, |
| 364 | }; | 345 | }; |
| 365 | 346 | ||
| 366 | static struct lp5521_platform_data __initdata lp5521_sec_data = { | 347 | static struct lp55xx_platform_data __initdata lp5521_sec_data = { |
| 367 | .label = "lp5521_sec", | 348 | .label = "lp5521_sec", |
| 368 | .led_config = &lp5521_sec_led[0], | 349 | .led_config = &lp5521_sec_led[0], |
| 369 | .num_channels = 3, | 350 | .num_channels = 3, |
| 370 | .clock_mode = LP5521_CLOCK_EXT, | 351 | .clock_mode = LP55XX_CLOCK_EXT, |
| 371 | }; | 352 | }; |
| 372 | 353 | ||
| 373 | static struct i2c_board_info __initdata mop500_i2c0_devices[] = { | 354 | static struct i2c_board_info __initdata mop500_i2c0_devices[] = { |
| @@ -651,6 +632,7 @@ static void __init mop500_init_machine(void) | |||
| 651 | int i2c0_devs; | 632 | int i2c0_devs; |
| 652 | int i; | 633 | int i; |
| 653 | 634 | ||
| 635 | platform_device_register(&db8500_prcmu_device); | ||
| 654 | mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; | 636 | mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; |
| 655 | 637 | ||
| 656 | mop500_pinmaps_init(); | 638 | mop500_pinmaps_init(); |
| @@ -685,6 +667,7 @@ static void __init snowball_init_machine(void) | |||
| 685 | struct device *parent = NULL; | 667 | struct device *parent = NULL; |
| 686 | int i; | 668 | int i; |
| 687 | 669 | ||
| 670 | platform_device_register(&db8500_prcmu_device); | ||
| 688 | snowball_pinmaps_init(); | 671 | snowball_pinmaps_init(); |
| 689 | parent = u8500_init_devices(&ab8500_platdata); | 672 | parent = u8500_init_devices(&ab8500_platdata); |
| 690 | 673 | ||
| @@ -710,6 +693,7 @@ static void __init hrefv60_init_machine(void) | |||
| 710 | int i2c0_devs; | 693 | int i2c0_devs; |
| 711 | int i; | 694 | int i; |
| 712 | 695 | ||
| 696 | platform_device_register(&db8500_prcmu_device); | ||
| 713 | /* | 697 | /* |
| 714 | * The HREFv60 board removed a GPIO expander and routed | 698 | * The HREFv60 board removed a GPIO expander and routed |
| 715 | * all these GPIO pins to the internal GPIO controller | 699 | * all these GPIO pins to the internal GPIO controller |
| @@ -751,8 +735,7 @@ MACHINE_START(U8500, "ST-Ericsson MOP500 platform") | |||
| 751 | .map_io = u8500_map_io, | 735 | .map_io = u8500_map_io, |
| 752 | .init_irq = ux500_init_irq, | 736 | .init_irq = ux500_init_irq, |
| 753 | /* we re-use nomadik timer here */ | 737 | /* we re-use nomadik timer here */ |
| 754 | .timer = &ux500_timer, | 738 | .init_time = ux500_timer_init, |
| 755 | .handle_irq = gic_handle_irq, | ||
| 756 | .init_machine = mop500_init_machine, | 739 | .init_machine = mop500_init_machine, |
| 757 | .init_late = ux500_init_late, | 740 | .init_late = ux500_init_late, |
| 758 | MACHINE_END | 741 | MACHINE_END |
| @@ -761,8 +744,7 @@ MACHINE_START(U8520, "ST-Ericsson U8520 Platform HREFP520") | |||
| 761 | .atag_offset = 0x100, | 744 | .atag_offset = 0x100, |
| 762 | .map_io = u8500_map_io, | 745 | .map_io = u8500_map_io, |
| 763 | .init_irq = ux500_init_irq, | 746 | .init_irq = ux500_init_irq, |
| 764 | .timer = &ux500_timer, | 747 | .init_time = ux500_timer_init, |
| 765 | .handle_irq = gic_handle_irq, | ||
| 766 | .init_machine = mop500_init_machine, | 748 | .init_machine = mop500_init_machine, |
| 767 | .init_late = ux500_init_late, | 749 | .init_late = ux500_init_late, |
| 768 | MACHINE_END | 750 | MACHINE_END |
| @@ -772,8 +754,7 @@ MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+") | |||
| 772 | .smp = smp_ops(ux500_smp_ops), | 754 | .smp = smp_ops(ux500_smp_ops), |
| 773 | .map_io = u8500_map_io, | 755 | .map_io = u8500_map_io, |
| 774 | .init_irq = ux500_init_irq, | 756 | .init_irq = ux500_init_irq, |
| 775 | .timer = &ux500_timer, | 757 | .init_time = ux500_timer_init, |
| 776 | .handle_irq = gic_handle_irq, | ||
| 777 | .init_machine = hrefv60_init_machine, | 758 | .init_machine = hrefv60_init_machine, |
| 778 | .init_late = ux500_init_late, | 759 | .init_late = ux500_init_late, |
| 779 | MACHINE_END | 760 | MACHINE_END |
| @@ -784,8 +765,7 @@ MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") | |||
| 784 | .map_io = u8500_map_io, | 765 | .map_io = u8500_map_io, |
| 785 | .init_irq = ux500_init_irq, | 766 | .init_irq = ux500_init_irq, |
| 786 | /* we re-use nomadik timer here */ | 767 | /* we re-use nomadik timer here */ |
| 787 | .timer = &ux500_timer, | 768 | .init_time = ux500_timer_init, |
| 788 | .handle_irq = gic_handle_irq, | ||
| 789 | .init_machine = snowball_init_machine, | 769 | .init_machine = snowball_init_machine, |
| 790 | .init_late = NULL, | 770 | .init_late = NULL, |
| 791 | MACHINE_END | 771 | MACHINE_END |
