summaryrefslogtreecommitdiff
path: root/src/soc/samsung
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/samsung')
-rw-r--r--src/soc/samsung/exynos5250/clock.c12
-rw-r--r--src/soc/samsung/exynos5250/gpio.c12
-rw-r--r--src/soc/samsung/exynos5250/i2c.c4
-rw-r--r--src/soc/samsung/exynos5250/include/soc/clk.h4
-rw-r--r--src/soc/samsung/exynos5250/include/soc/gpio.h10
-rw-r--r--src/soc/samsung/exynos5250/include/soc/i2c.h2
-rw-r--r--src/soc/samsung/exynos5250/include/soc/tmu.h68
-rw-r--r--src/soc/samsung/exynos5420/clock.c12
-rw-r--r--src/soc/samsung/exynos5420/gpio.c12
-rw-r--r--src/soc/samsung/exynos5420/i2c.c10
-rw-r--r--src/soc/samsung/exynos5420/include/soc/clk.h4
-rw-r--r--src/soc/samsung/exynos5420/include/soc/gpio.h10
-rw-r--r--src/soc/samsung/exynos5420/include/soc/i2c.h2
-rw-r--r--src/soc/samsung/exynos5420/include/soc/tmu.h68
14 files changed, 115 insertions, 115 deletions
diff --git a/src/soc/samsung/exynos5250/clock.c b/src/soc/samsung/exynos5250/clock.c
index 7e7fe97d18..efb0de31f3 100644
--- a/src/soc/samsung/exynos5250/clock.c
+++ b/src/soc/samsung/exynos5250/clock.c
@@ -385,10 +385,10 @@ void set_mmc_clk(int dev_index, unsigned int div)
write32(addr, val);
}
-void clock_ll_set_pre_ratio(enum periph_id periph_id, unsigned divisor)
+void clock_ll_set_pre_ratio(enum periph_id periph_id, unsigned int divisor)
{
- unsigned shift;
- unsigned mask = 0xff;
+ unsigned int shift;
+ unsigned int mask = 0xff;
u32 *reg;
/*
@@ -428,10 +428,10 @@ void clock_ll_set_pre_ratio(enum periph_id periph_id, unsigned divisor)
clrsetbits_le32(reg, mask << shift, (divisor & mask) << shift);
}
-void clock_ll_set_ratio(enum periph_id periph_id, unsigned divisor)
+void clock_ll_set_ratio(enum periph_id periph_id, unsigned int divisor)
{
- unsigned shift;
- unsigned mask = 0xff;
+ unsigned int shift;
+ unsigned int mask = 0xff;
u32 *reg;
switch (periph_id) {
diff --git a/src/soc/samsung/exynos5250/gpio.c b/src/soc/samsung/exynos5250/gpio.c
index 96cfef6528..0ae2d2a87a 100644
--- a/src/soc/samsung/exynos5250/gpio.c
+++ b/src/soc/samsung/exynos5250/gpio.c
@@ -154,14 +154,14 @@ void gpio_set_rate(int gpio, int mode)
write32(&bank->drv, value);
}
-int gpio_direction_input(unsigned gpio)
+int gpio_direction_input(unsigned int gpio)
{
gpio_cfg_pin(gpio, GPIO_INPUT);
return 0;
}
-int gpio_direction_output(unsigned gpio, int value)
+int gpio_direction_output(unsigned int gpio, int value)
{
unsigned int val;
struct gpio_bank *bank = gpio_get_bank(gpio);
@@ -177,7 +177,7 @@ int gpio_direction_output(unsigned gpio, int value)
return 0;
}
-int gpio_get_value(unsigned gpio)
+int gpio_get_value(unsigned int gpio)
{
unsigned int value;
struct gpio_bank *bank = gpio_get_bank(gpio);
@@ -186,7 +186,7 @@ int gpio_get_value(unsigned gpio)
return !!(value & DAT_MASK(GPIO_BIT(gpio)));
}
-int gpio_set_value(unsigned gpio, int value)
+int gpio_set_value(unsigned int gpio, int value)
{
unsigned int val;
struct gpio_bank *bank = gpio_get_bank(gpio);
@@ -207,7 +207,7 @@ int gpio_set_value(unsigned gpio, int value)
*/
#define GPIO_DELAY_US 5
-int gpio_read_mvl3(unsigned gpio)
+int gpio_read_mvl3(unsigned int gpio)
{
int high, low;
enum mvl3 value;
@@ -248,7 +248,7 @@ int gpio_read_mvl3(unsigned gpio)
*/
void gpio_info(void)
{
- unsigned gpio;
+ unsigned int gpio;
for (gpio = 0; gpio < GPIO_MAX_PORT; gpio++) {
int cfg = gpio_get_cfg(gpio);
diff --git a/src/soc/samsung/exynos5250/i2c.c b/src/soc/samsung/exynos5250/i2c.c
index 0efd25c62d..e9aabf81bf 100644
--- a/src/soc/samsung/exynos5250/i2c.c
+++ b/src/soc/samsung/exynos5250/i2c.c
@@ -233,7 +233,7 @@ static int i2c_recv_buf(struct i2c_regs *regs, uint8_t *data, int len)
return 0;
}
-int platform_i2c_transfer(unsigned bus, struct i2c_msg *segments,
+int platform_i2c_transfer(unsigned int bus, struct i2c_msg *segments,
int seg_count)
{
struct s3c24x0_i2c_bus *i2c = &i2c_busses[bus];
@@ -263,7 +263,7 @@ int platform_i2c_transfer(unsigned bus, struct i2c_msg *segments,
return i2c_send_stop(regs) || res;
}
-void i2c_init(unsigned bus, int speed, int slaveadd)
+void i2c_init(unsigned int bus, int speed, int slaveadd)
{
struct s3c24x0_i2c_bus *i2c = &i2c_busses[bus];
diff --git a/src/soc/samsung/exynos5250/include/soc/clk.h b/src/soc/samsung/exynos5250/include/soc/clk.h
index 971bfc291c..fab0444e11 100644
--- a/src/soc/samsung/exynos5250/include/soc/clk.h
+++ b/src/soc/samsung/exynos5250/include/soc/clk.h
@@ -561,7 +561,7 @@ struct st_epll_con_val {
* @param periph_id Peripheral ID of peripheral to change
* @param divisor New divisor for this peripheral's clock
*/
-void clock_ll_set_pre_ratio(enum periph_id periph_id, unsigned divisor);
+void clock_ll_set_pre_ratio(enum periph_id periph_id, unsigned int divisor);
/**
* Low-level function to set the clock ratio for a peripheral
@@ -569,7 +569,7 @@ void clock_ll_set_pre_ratio(enum periph_id periph_id, unsigned divisor);
* @param periph_id Peripheral ID of peripheral to change
* @param divisor New divisor for this peripheral's clock
*/
-void clock_ll_set_ratio(enum periph_id periph_id, unsigned divisor);
+void clock_ll_set_ratio(enum periph_id periph_id, unsigned int divisor);
/**
* Low-level function that selects the best clock scalars for a given rate and
diff --git a/src/soc/samsung/exynos5250/include/soc/gpio.h b/src/soc/samsung/exynos5250/include/soc/gpio.h
index 959fbd199d..a521bea791 100644
--- a/src/soc/samsung/exynos5250/include/soc/gpio.h
+++ b/src/soc/samsung/exynos5250/include/soc/gpio.h
@@ -482,7 +482,7 @@ void gpio_set_rate(int gpio, int mode);
* @return -1 if the value cannot be determined. Otherwise returns
* the corresponding MVL3 enum value.
*/
-int gpio_read_mvl3(unsigned gpio);
+int gpio_read_mvl3(unsigned int gpio);
void gpio_info(void);
@@ -510,7 +510,7 @@ void gpio_info(void);
* @param gpio GPIO number
* @return 0 if ok, -1 on error
*/
-int gpio_direction_input(unsigned gpio);
+int gpio_direction_input(unsigned int gpio);
/**
* Make a GPIO an output, and set its value.
@@ -519,7 +519,7 @@ int gpio_direction_input(unsigned gpio);
* @param value GPIO value (0 for low or 1 for high)
* @return 0 if ok, -1 on error
*/
-int gpio_direction_output(unsigned gpio, int value);
+int gpio_direction_output(unsigned int gpio, int value);
/**
* Get a GPIO's value. This will work whether the GPIO is an input
@@ -528,7 +528,7 @@ int gpio_direction_output(unsigned gpio, int value);
* @param gpio GPIO number
* @return 0 if low, 1 if high, -1 on error
*/
-int gpio_get_value(unsigned gpio);
+int gpio_get_value(unsigned int gpio);
/**
* Set an output GPIO's value. The GPIO must already be an output or
@@ -538,7 +538,7 @@ int gpio_get_value(unsigned gpio);
* @param value GPIO value (0 for low or 1 for high)
* @return 0 if ok, -1 on error
*/
-int gpio_set_value(unsigned gpio, int value);
+int gpio_set_value(unsigned int gpio, int value);
/*
* Many-value logic (3 states). This can be used for inputs whereby presence
diff --git a/src/soc/samsung/exynos5250/include/soc/i2c.h b/src/soc/samsung/exynos5250/include/soc/i2c.h
index d58237c039..aa458838c4 100644
--- a/src/soc/samsung/exynos5250/include/soc/i2c.h
+++ b/src/soc/samsung/exynos5250/include/soc/i2c.h
@@ -16,6 +16,6 @@
#ifndef CPU_SAMSUNG_EXYNOS5250_I2C_H
#define CPU_SAMSUNG_EXYNOS5250_I2C_H
-void i2c_init(unsigned bus, int speed, int slaveadd);
+void i2c_init(unsigned int bus, int speed, int slaveadd);
#endif /* CPU_SAMSUNG_EXYNOS5250_I2C_H */
diff --git a/src/soc/samsung/exynos5250/include/soc/tmu.h b/src/soc/samsung/exynos5250/include/soc/tmu.h
index bd15a209a5..cb92c16e48 100644
--- a/src/soc/samsung/exynos5250/include/soc/tmu.h
+++ b/src/soc/samsung/exynos5250/include/soc/tmu.h
@@ -19,39 +19,39 @@
#define CPU_SAMSUNG_EXYNOS5250_TMU_H
struct tmu_reg {
- unsigned triminfo;
- unsigned rsvd1;
- unsigned rsvd2;
- unsigned rsvd3;
- unsigned rsvd4;
- unsigned triminfo_control;
- unsigned rsvd5;
- unsigned rsvd6;
- unsigned tmu_control;
- unsigned rsvd7;
- unsigned tmu_status;
- unsigned sampling_internal;
- unsigned counter_value0;
- unsigned counter_value1;
- unsigned rsvd8;
- unsigned rsvd9;
- unsigned current_temp;
- unsigned rsvd10;
- unsigned rsvd11;
- unsigned rsvd12;
- unsigned threshold_temp_rise;
- unsigned threshold_temp_fall;
- unsigned rsvd13;
- unsigned rsvd14;
- unsigned past_temp3_0;
- unsigned past_temp7_4;
- unsigned past_temp11_8;
- unsigned past_temp15_12;
- unsigned inten;
- unsigned intstat;
- unsigned intclear;
- unsigned rsvd15;
- unsigned emul_con;
+ unsigned int triminfo;
+ unsigned int rsvd1;
+ unsigned int rsvd2;
+ unsigned int rsvd3;
+ unsigned int rsvd4;
+ unsigned int triminfo_control;
+ unsigned int rsvd5;
+ unsigned int rsvd6;
+ unsigned int tmu_control;
+ unsigned int rsvd7;
+ unsigned int tmu_status;
+ unsigned int sampling_internal;
+ unsigned int counter_value0;
+ unsigned int counter_value1;
+ unsigned int rsvd8;
+ unsigned int rsvd9;
+ unsigned int current_temp;
+ unsigned int rsvd10;
+ unsigned int rsvd11;
+ unsigned int rsvd12;
+ unsigned int threshold_temp_rise;
+ unsigned int threshold_temp_fall;
+ unsigned int rsvd13;
+ unsigned int rsvd14;
+ unsigned int past_temp3_0;
+ unsigned int past_temp7_4;
+ unsigned int past_temp11_8;
+ unsigned int past_temp15_12;
+ unsigned int inten;
+ unsigned int intstat;
+ unsigned int intclear;
+ unsigned int rsvd15;
+ unsigned int emul_con;
};
check_member(tmu_reg, emul_con, 0x80);
@@ -93,7 +93,7 @@ struct tmu_data {
/* TMU device specific details and status */
struct tmu_info {
/* base Address for the TMU */
- unsigned tmu_base;
+ unsigned int tmu_base;
/* mux Address for the TMU */
int tmu_mux;
/* pre-defined values for calibration and thresholds */
diff --git a/src/soc/samsung/exynos5420/clock.c b/src/soc/samsung/exynos5420/clock.c
index 720506c8d5..b578133ea4 100644
--- a/src/soc/samsung/exynos5420/clock.c
+++ b/src/soc/samsung/exynos5420/clock.c
@@ -350,10 +350,10 @@ int clock_set_dwmci(enum periph_id peripheral)
return 0;
}
-void clock_ll_set_pre_ratio(enum periph_id periph_id, unsigned divisor)
+void clock_ll_set_pre_ratio(enum periph_id periph_id, unsigned int divisor)
{
- unsigned shift;
- unsigned mask = 0xff;
+ unsigned int shift;
+ unsigned int mask = 0xff;
u32 *reg;
/*
@@ -393,10 +393,10 @@ void clock_ll_set_pre_ratio(enum periph_id periph_id, unsigned divisor)
clrsetbits_le32(reg, mask << shift, (divisor & mask) << shift);
}
-void clock_ll_set_ratio(enum periph_id periph_id, unsigned divisor)
+void clock_ll_set_ratio(enum periph_id periph_id, unsigned int divisor)
{
- unsigned shift;
- unsigned mask = 0xf;
+ unsigned int shift;
+ unsigned int mask = 0xf;
u32 *reg;
switch (periph_id) {
diff --git a/src/soc/samsung/exynos5420/gpio.c b/src/soc/samsung/exynos5420/gpio.c
index 1462c2928c..97331a0222 100644
--- a/src/soc/samsung/exynos5420/gpio.c
+++ b/src/soc/samsung/exynos5420/gpio.c
@@ -154,14 +154,14 @@ void gpio_set_rate(int gpio, int mode)
write32(&bank->drv, value);
}
-int gpio_direction_input(unsigned gpio)
+int gpio_direction_input(unsigned int gpio)
{
gpio_cfg_pin(gpio, GPIO_INPUT);
return 0;
}
-int gpio_direction_output(unsigned gpio, int value)
+int gpio_direction_output(unsigned int gpio, int value)
{
unsigned int val;
struct gpio_bank *bank = gpio_get_bank(gpio);
@@ -177,7 +177,7 @@ int gpio_direction_output(unsigned gpio, int value)
return 0;
}
-int gpio_get_value(unsigned gpio)
+int gpio_get_value(unsigned int gpio)
{
unsigned int value;
struct gpio_bank *bank = gpio_get_bank(gpio);
@@ -186,7 +186,7 @@ int gpio_get_value(unsigned gpio)
return !!(value & DAT_MASK(GPIO_BIT(gpio)));
}
-int gpio_set_value(unsigned gpio, int value)
+int gpio_set_value(unsigned int gpio, int value)
{
unsigned int val;
struct gpio_bank *bank = gpio_get_bank(gpio);
@@ -207,7 +207,7 @@ int gpio_set_value(unsigned gpio, int value)
*/
#define GPIO_DELAY_US 15
-int gpio_read_mvl3(unsigned gpio)
+int gpio_read_mvl3(unsigned int gpio)
{
int high, low;
enum mvl3 value;
@@ -248,7 +248,7 @@ int gpio_read_mvl3(unsigned gpio)
*/
void gpio_info(void)
{
- unsigned gpio;
+ unsigned int gpio;
for (gpio = 0; gpio < GPIO_MAX_PORT; gpio++) {
int cfg = gpio_get_cfg(gpio);
diff --git a/src/soc/samsung/exynos5420/i2c.c b/src/soc/samsung/exynos5420/i2c.c
index 00ad12f715..4dd9caa16a 100644
--- a/src/soc/samsung/exynos5420/i2c.c
+++ b/src/soc/samsung/exynos5420/i2c.c
@@ -82,8 +82,8 @@ struct i2c_bus
struct hsi2c_regs *hsregs;
int is_highspeed; /* High speed type, rather than I2C */
int id;
- unsigned clk_cycle;
- unsigned clk_div;
+ unsigned int clk_cycle;
+ unsigned int clk_div;
};
@@ -255,7 +255,7 @@ enum {
static int hsi2c_get_clk_details(struct i2c_bus *i2c, int *div, int *cycle,
- unsigned op_clk)
+ unsigned int op_clk)
{
struct hsi2c_regs *regs = i2c->hsregs;
unsigned long clkin = clock_get_periph_rate(i2c->periph_id);
@@ -361,7 +361,7 @@ static void i2c_ch_init(struct i2c_bus *i2c, int speed)
write32(&regs->stat, I2cStatMasterXmit | I2cStatEnable);
}
-void i2c_init(unsigned bus, int speed, int slaveadd)
+void i2c_init(unsigned int bus, int speed, int slaveadd)
{
struct i2c_bus *i2c = &i2c_busses[bus];
@@ -627,7 +627,7 @@ static int i2c_recv_buf(struct i2c_regs *regs, uint8_t *data, int len)
return 0;
}
-int platform_i2c_transfer(unsigned bus, struct i2c_msg *segments, int count)
+int platform_i2c_transfer(unsigned int bus, struct i2c_msg *segments, int count)
{
struct i2c_bus *i2c = &i2c_busses[bus];
if (i2c->is_highspeed)
diff --git a/src/soc/samsung/exynos5420/include/soc/clk.h b/src/soc/samsung/exynos5420/include/soc/clk.h
index 262d6fb969..08663ff307 100644
--- a/src/soc/samsung/exynos5420/include/soc/clk.h
+++ b/src/soc/samsung/exynos5420/include/soc/clk.h
@@ -697,7 +697,7 @@ struct st_epll_con_val {
* @param periph_id Peripheral ID of peripheral to change
* @param divisor New divisor for this peripheral's clock
*/
-void clock_ll_set_pre_ratio(enum periph_id periph_id, unsigned divisor);
+void clock_ll_set_pre_ratio(enum periph_id periph_id, unsigned int divisor);
/**
* Low-level function to set the clock ratio for a peripheral
@@ -705,7 +705,7 @@ void clock_ll_set_pre_ratio(enum periph_id periph_id, unsigned divisor);
* @param periph_id Peripheral ID of peripheral to change
* @param divisor New divisor for this peripheral's clock
*/
-void clock_ll_set_ratio(enum periph_id periph_id, unsigned divisor);
+void clock_ll_set_ratio(enum periph_id periph_id, unsigned int divisor);
/**
* Low-level function that selects the best clock scalars for a given rate and
diff --git a/src/soc/samsung/exynos5420/include/soc/gpio.h b/src/soc/samsung/exynos5420/include/soc/gpio.h
index 69ef046e13..6a40554003 100644
--- a/src/soc/samsung/exynos5420/include/soc/gpio.h
+++ b/src/soc/samsung/exynos5420/include/soc/gpio.h
@@ -465,7 +465,7 @@ void gpio_set_rate(int gpio, int mode);
* @return -1 if the value cannot be determined. Otherwise returns
* the corresponding MVL3 enum value.
*/
-int gpio_read_mvl3(unsigned gpio);
+int gpio_read_mvl3(unsigned int gpio);
void gpio_info(void);
@@ -493,7 +493,7 @@ void gpio_info(void);
* @param gpio GPIO number
* @return 0 if ok, -1 on error
*/
-int gpio_direction_input(unsigned gpio);
+int gpio_direction_input(unsigned int gpio);
/**
* Make a GPIO an output, and set its value.
@@ -502,7 +502,7 @@ int gpio_direction_input(unsigned gpio);
* @param value GPIO value (0 for low or 1 for high)
* @return 0 if ok, -1 on error
*/
-int gpio_direction_output(unsigned gpio, int value);
+int gpio_direction_output(unsigned int gpio, int value);
/**
* Get a GPIO's value. This will work whether the GPIO is an input
@@ -511,7 +511,7 @@ int gpio_direction_output(unsigned gpio, int value);
* @param gpio GPIO number
* @return 0 if low, 1 if high, -1 on error
*/
-int gpio_get_value(unsigned gpio);
+int gpio_get_value(unsigned int gpio);
/**
* Set an output GPIO's value. The GPIO must already be an output or
@@ -521,7 +521,7 @@ int gpio_get_value(unsigned gpio);
* @param value GPIO value (0 for low or 1 for high)
* @return 0 if ok, -1 on error
*/
-int gpio_set_value(unsigned gpio, int value);
+int gpio_set_value(unsigned int gpio, int value);
/*
* Many-value logic (3 states). This can be used for inputs whereby presence
diff --git a/src/soc/samsung/exynos5420/include/soc/i2c.h b/src/soc/samsung/exynos5420/include/soc/i2c.h
index dc894f56d8..ab936985fe 100644
--- a/src/soc/samsung/exynos5420/include/soc/i2c.h
+++ b/src/soc/samsung/exynos5420/include/soc/i2c.h
@@ -16,6 +16,6 @@
#ifndef CPU_SAMSUNG_EXYNOS5420_I2C_H
#define CPU_SAMSUNG_EXYNOS5420_I2C_H
-void i2c_init(unsigned bus, int speed, int slaveadd);
+void i2c_init(unsigned int bus, int speed, int slaveadd);
#endif /* CPU_SAMSUNG_EXYNOS5420_I2C_H */
diff --git a/src/soc/samsung/exynos5420/include/soc/tmu.h b/src/soc/samsung/exynos5420/include/soc/tmu.h
index 9f75131af8..eade11f0ec 100644
--- a/src/soc/samsung/exynos5420/include/soc/tmu.h
+++ b/src/soc/samsung/exynos5420/include/soc/tmu.h
@@ -19,39 +19,39 @@
#define CPU_SAMSUNG_EXYNOS5420_TMU_H
struct tmu_reg {
- unsigned triminfo;
- unsigned rsvd1;
- unsigned rsvd2;
- unsigned rsvd3;
- unsigned rsvd4;
- unsigned triminfo_control;
- unsigned rsvd5;
- unsigned rsvd6;
- unsigned tmu_control;
- unsigned rsvd7;
- unsigned tmu_status;
- unsigned sampling_internal;
- unsigned counter_value0;
- unsigned counter_value1;
- unsigned rsvd8;
- unsigned rsvd9;
- unsigned current_temp;
- unsigned rsvd10;
- unsigned rsvd11;
- unsigned rsvd12;
- unsigned threshold_temp_rise;
- unsigned threshold_temp_fall;
- unsigned rsvd13;
- unsigned rsvd14;
- unsigned past_temp3_0;
- unsigned past_temp7_4;
- unsigned past_temp11_8;
- unsigned past_temp15_12;
- unsigned inten;
- unsigned intstat;
- unsigned intclear;
- unsigned rsvd15;
- unsigned emul_con;
+ unsigned int triminfo;
+ unsigned int rsvd1;
+ unsigned int rsvd2;
+ unsigned int rsvd3;
+ unsigned int rsvd4;
+ unsigned int triminfo_control;
+ unsigned int rsvd5;
+ unsigned int rsvd6;
+ unsigned int tmu_control;
+ unsigned int rsvd7;
+ unsigned int tmu_status;
+ unsigned int sampling_internal;
+ unsigned int counter_value0;
+ unsigned int counter_value1;
+ unsigned int rsvd8;
+ unsigned int rsvd9;
+ unsigned int current_temp;
+ unsigned int rsvd10;
+ unsigned int rsvd11;
+ unsigned int rsvd12;
+ unsigned int threshold_temp_rise;
+ unsigned int threshold_temp_fall;
+ unsigned int rsvd13;
+ unsigned int rsvd14;
+ unsigned int past_temp3_0;
+ unsigned int past_temp7_4;
+ unsigned int past_temp11_8;
+ unsigned int past_temp15_12;
+ unsigned int inten;
+ unsigned int intstat;
+ unsigned int intclear;
+ unsigned int rsvd15;
+ unsigned int emul_con;
};
check_member(tmu_reg, emul_con, 0x80);
@@ -93,7 +93,7 @@ struct tmu_data {
/* TMU device specific details and status */
struct tmu_info {
/* base Address for the TMU */
- unsigned tmu_base;
+ unsigned int tmu_base;
/* mux Address for the TMU */
int tmu_mux;
/* pre-defined values for calibration and thresholds */