aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.c2
-rw-r--r--arch/arm/mach-ux500/board-mop500-u8500uib.c24
-rw-r--r--arch/arm/mach-ux500/board-u5500.c84
-rw-r--r--arch/arm/mach-ux500/clock.c31
-rw-r--r--arch/arm/mach-ux500/include/mach/clkdev.h7
-rw-r--r--arch/arm/mach-ux500/platsmp.c8
6 files changed, 93 insertions, 63 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c
index c0bc833df903..2735d03996cf 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.c
+++ b/arch/arm/mach-ux500/board-mop500-regulators.c
@@ -77,7 +77,7 @@ static struct regulator_consumer_supply ab8500_vtvout_consumers[] = {
77static struct regulator_consumer_supply ab8500_vintcore_consumers[] = { 77static struct regulator_consumer_supply ab8500_vintcore_consumers[] = {
78 /* SoC core supply, no device */ 78 /* SoC core supply, no device */
79 REGULATOR_SUPPLY("v-intcore", NULL), 79 REGULATOR_SUPPLY("v-intcore", NULL),
80 /* USB Transciever */ 80 /* USB Transceiver */
81 REGULATOR_SUPPLY("vddulpivio18", "ab8500-usb.0"), 81 REGULATOR_SUPPLY("vddulpivio18", "ab8500-usb.0"),
82}; 82};
83 83
diff --git a/arch/arm/mach-ux500/board-mop500-u8500uib.c b/arch/arm/mach-ux500/board-mop500-u8500uib.c
index d8a8734a0eba..8ce46c0fdfd5 100644
--- a/arch/arm/mach-ux500/board-mop500-u8500uib.c
+++ b/arch/arm/mach-ux500/board-mop500-u8500uib.c
@@ -12,34 +12,14 @@
12#include <linux/interrupt.h> 12#include <linux/interrupt.h>
13#include <linux/mfd/tc3589x.h> 13#include <linux/mfd/tc3589x.h>
14#include <linux/input/matrix_keypad.h> 14#include <linux/input/matrix_keypad.h>
15#include <../drivers/staging/ste_rmi4/synaptics_i2c_rmi4.h>
16 15
17#include <mach/gpio.h> 16#include <mach/gpio.h>
18#include <mach/irqs.h> 17#include <mach/irqs.h>
19 18
20#include "board-mop500.h" 19#include "board-mop500.h"
21 20
22/* 21/* Dummy data that can be overridden by staging driver */
23 * Synaptics RMI4 touchscreen interface on the U8500 UIB 22struct i2c_board_info __initdata __weak mop500_i2c3_devices_u8500[] = {
24 */
25
26/*
27 * Descriptor structure.
28 * Describes the number of i2c devices on the bus that speak RMI.
29 */
30static struct synaptics_rmi4_platform_data rmi4_i2c_dev_platformdata = {
31 .irq_number = NOMADIK_GPIO_TO_IRQ(84),
32 .irq_type = (IRQF_TRIGGER_FALLING | IRQF_SHARED),
33 .x_flip = false,
34 .y_flip = true,
35 .regulator_en = false,
36};
37
38static struct i2c_board_info __initdata mop500_i2c3_devices_u8500[] = {
39 {
40 I2C_BOARD_INFO("synaptics_rmi4_i2c", 0x4B),
41 .platform_data = &rmi4_i2c_dev_platformdata,
42 },
43}; 23};
44 24
45/* 25/*
diff --git a/arch/arm/mach-ux500/board-u5500.c b/arch/arm/mach-ux500/board-u5500.c
index 44fd3b5c33ec..e58f0f562426 100644
--- a/arch/arm/mach-ux500/board-u5500.c
+++ b/arch/arm/mach-ux500/board-u5500.c
@@ -10,16 +10,97 @@
10#include <linux/amba/bus.h> 10#include <linux/amba/bus.h>
11#include <linux/gpio.h> 11#include <linux/gpio.h>
12#include <linux/irq.h> 12#include <linux/irq.h>
13#include <linux/i2c.h>
13 14
14#include <asm/mach/arch.h> 15#include <asm/mach/arch.h>
15#include <asm/mach-types.h> 16#include <asm/mach-types.h>
16 17
18#include <plat/pincfg.h>
19#include <plat/i2c.h>
20
17#include <mach/hardware.h> 21#include <mach/hardware.h>
18#include <mach/devices.h> 22#include <mach/devices.h>
19#include <mach/setup.h> 23#include <mach/setup.h>
20 24
25#include "pins-db5500.h"
21#include "devices-db5500.h" 26#include "devices-db5500.h"
27#include <linux/led-lm3530.h>
28
29/*
30 * GPIO
31 */
32
33static pin_cfg_t u5500_pins[] = {
34 /* I2C */
35 GPIO218_I2C2_SCL | PIN_INPUT_PULLUP,
36 GPIO219_I2C2_SDA | PIN_INPUT_PULLUP,
37
38 /* DISPLAY_ENABLE */
39 GPIO226_GPIO | PIN_OUTPUT_LOW,
40
41 /* Backlight Enbale */
42 GPIO224_GPIO | PIN_OUTPUT_HIGH,
43};
44/*
45 * I2C
46 */
47
48#define U5500_I2C_CONTROLLER(id, _slsu, _tft, _rft, clk, _sm) \
49static struct nmk_i2c_controller u5500_i2c##id##_data = { \
50 /* \
51 * slave data setup time, which is \
52 * 250 ns,100ns,10ns which is 14,6,2 \
53 * respectively for a 48 Mhz \
54 * i2c clock \
55 */ \
56 .slsu = _slsu, \
57 /* Tx FIFO threshold */ \
58 .tft = _tft, \
59 /* Rx FIFO threshold */ \
60 .rft = _rft, \
61 /* std. mode operation */ \
62 .clk_freq = clk, \
63 .sm = _sm, \
64}
65/*
66 * The board uses TODO <3> i2c controllers, initialize all of
67 * them with slave data setup time of 250 ns,
68 * Tx & Rx FIFO threshold values as 1 and standard
69 * mode of operation
70 */
71
72U5500_I2C_CONTROLLER(2, 0xe, 1, 1, 400000, I2C_FREQ_MODE_FAST);
73
74static struct lm3530_platform_data u5500_als_platform_data = {
75 .mode = LM3530_BL_MODE_MANUAL,
76 .als_input_mode = LM3530_INPUT_ALS1,
77 .max_current = LM3530_FS_CURR_26mA,
78 .pwm_pol_hi = true,
79 .als_avrg_time = LM3530_ALS_AVRG_TIME_512ms,
80 .brt_ramp_law = 1, /* Linear */
81 .brt_ramp_fall = LM3530_RAMP_TIME_8s,
82 .brt_ramp_rise = LM3530_RAMP_TIME_8s,
83 .als1_resistor_sel = LM3530_ALS_IMPD_13_53kOhm,
84 .als2_resistor_sel = LM3530_ALS_IMPD_Z,
85 .als_vmin = 730, /* mV */
86 .als_vmax = 1020, /* mV */
87 .brt_val = 0x7F, /* Max brightness */
88};
22 89
90
91static struct i2c_board_info __initdata u5500_i2c2_devices[] = {
92 {
93 /* Backlight */
94 I2C_BOARD_INFO("lm3530-led", 0x36),
95 .platform_data = &u5500_als_platform_data,
96 },
97};
98
99static void __init u5500_i2c_init(void)
100{
101 db5500_add_i2c2(&u5500_i2c2_data);
102 i2c_register_board_info(2, ARRAY_AND_SIZE(u5500_i2c2_devices));
103}
23static void __init u5500_uart_init(void) 104static void __init u5500_uart_init(void)
24{ 105{
25 db5500_add_uart0(NULL); 106 db5500_add_uart0(NULL);
@@ -30,7 +111,8 @@ static void __init u5500_uart_init(void)
30static void __init u5500_init_machine(void) 111static void __init u5500_init_machine(void)
31{ 112{
32 u5500_init_devices(); 113 u5500_init_devices();
33 114 nmk_config_pins(u5500_pins, ARRAY_SIZE(u5500_pins));
115 u5500_i2c_init();
34 u5500_sdi_init(); 116 u5500_sdi_init();
35 u5500_uart_init(); 117 u5500_uart_init();
36} 118}
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c
index b4e786a0fa4f..e832664d1bd9 100644
--- a/arch/arm/mach-ux500/clock.c
+++ b/arch/arm/mach-ux500/clock.c
@@ -636,16 +636,13 @@ static const struct file_operations set_rate_fops = {
636static struct dentry *clk_debugfs_register_dir(struct clk *c, 636static struct dentry *clk_debugfs_register_dir(struct clk *c,
637 struct dentry *p_dentry) 637 struct dentry *p_dentry)
638{ 638{
639 struct dentry *d, *clk_d, *child, *child_tmp; 639 struct dentry *d, *clk_d;
640 char s[255]; 640 const char *p = c->name;
641 char *p = s;
642 641
643 if (c->name == NULL) 642 if (!p)
644 p += sprintf(p, "BUG"); 643 p = "BUG";
645 else
646 p += sprintf(p, "%s", c->name);
647 644
648 clk_d = debugfs_create_dir(s, p_dentry); 645 clk_d = debugfs_create_dir(p, p_dentry);
649 if (!clk_d) 646 if (!clk_d)
650 return NULL; 647 return NULL;
651 648
@@ -667,24 +664,10 @@ static struct dentry *clk_debugfs_register_dir(struct clk *c,
667 return clk_d; 664 return clk_d;
668 665
669err_out: 666err_out:
670 d = clk_d; 667 debugfs_remove_recursive(clk_d);
671 list_for_each_entry_safe(child, child_tmp, &d->d_subdirs, d_u.d_child)
672 debugfs_remove(child);
673 debugfs_remove(clk_d);
674 return NULL; 668 return NULL;
675} 669}
676 670
677static void clk_debugfs_remove_dir(struct dentry *cdentry)
678{
679 struct dentry *d, *child, *child_tmp;
680
681 d = cdentry;
682 list_for_each_entry_safe(child, child_tmp, &d->d_subdirs, d_u.d_child)
683 debugfs_remove(child);
684 debugfs_remove(cdentry);
685 return ;
686}
687
688static int clk_debugfs_register_one(struct clk *c) 671static int clk_debugfs_register_one(struct clk *c)
689{ 672{
690 struct clk *pa = c->parent_periph; 673 struct clk *pa = c->parent_periph;
@@ -701,7 +684,7 @@ static int clk_debugfs_register_one(struct clk *c)
701 c->dent_bus = clk_debugfs_register_dir(c, 684 c->dent_bus = clk_debugfs_register_dir(c,
702 bpa->dent_bus ? bpa->dent_bus : bpa->dent); 685 bpa->dent_bus ? bpa->dent_bus : bpa->dent);
703 if ((!c->dent_bus) && (c->dent)) { 686 if ((!c->dent_bus) && (c->dent)) {
704 clk_debugfs_remove_dir(c->dent); 687 debugfs_remove_recursive(c->dent);
705 c->dent = NULL; 688 c->dent = NULL;
706 return -ENOMEM; 689 return -ENOMEM;
707 } 690 }
diff --git a/arch/arm/mach-ux500/include/mach/clkdev.h b/arch/arm/mach-ux500/include/mach/clkdev.h
deleted file mode 100644
index 04b37a89801c..000000000000
--- a/arch/arm/mach-ux500/include/mach/clkdev.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef __ASM_MACH_CLKDEV_H
2#define __ASM_MACH_CLKDEV_H
3
4#define __clk_get(clk) ({ 1; })
5#define __clk_put(clk) do { } while (0)
6
7#endif
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c
index 0c527fe2cebb..a33df5f4c27a 100644
--- a/arch/arm/mach-ux500/platsmp.c
+++ b/arch/arm/mach-ux500/platsmp.c
@@ -172,14 +172,6 @@ void __init smp_init_cpus(void)
172 172
173void __init platform_smp_prepare_cpus(unsigned int max_cpus) 173void __init platform_smp_prepare_cpus(unsigned int max_cpus)
174{ 174{
175 int i;
176
177 /*
178 * Initialise the present map, which describes the set of CPUs
179 * actually populated at the present time.
180 */
181 for (i = 0; i < max_cpus; i++)
182 set_cpu_present(i, true);
183 175
184 scu_enable(scu_base_addr()); 176 scu_enable(scu_base_addr());
185 wakeup_secondary(); 177 wakeup_secondary();