summaryrefslogtreecommitdiff
path: root/src/soc/nvidia/tegra
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/nvidia/tegra')
-rw-r--r--src/soc/nvidia/tegra/i2c.c8
-rw-r--r--src/soc/nvidia/tegra/i2c.h8
-rw-r--r--src/soc/nvidia/tegra/software_i2c.c12
3 files changed, 14 insertions, 14 deletions
diff --git a/src/soc/nvidia/tegra/i2c.c b/src/soc/nvidia/tegra/i2c.c
index c28cd0b1de..0e9553c8ed 100644
--- a/src/soc/nvidia/tegra/i2c.c
+++ b/src/soc/nvidia/tegra/i2c.c
@@ -138,7 +138,7 @@ static int tegra_i2c_send_recv(int bus, int read,
return 0;
}
-static int tegra_i2c_request(int bus, unsigned chip, int cont, int restart,
+static int tegra_i2c_request(int bus, unsigned int chip, int cont, int restart,
int read, void *data, int data_len)
{
uint32_t headers[3];
@@ -170,7 +170,7 @@ static int tegra_i2c_request(int bus, unsigned chip, int cont, int restart,
data, data_len);
}
-static int i2c_transfer_segment(unsigned bus, unsigned chip, int restart,
+static int i2c_transfer_segment(unsigned int bus, unsigned int chip, int restart,
int read, void *buf, int len)
{
const uint32_t max_payload =
@@ -188,7 +188,7 @@ static int i2c_transfer_segment(unsigned bus, unsigned chip, int restart,
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_msg *seg = segments;
int i;
@@ -208,7 +208,7 @@ int platform_i2c_transfer(unsigned bus, struct i2c_msg *segments, int count)
return 0;
}
-void i2c_init(unsigned bus)
+void i2c_init(unsigned int bus)
{
struct tegra_i2c_regs *regs;
diff --git a/src/soc/nvidia/tegra/i2c.h b/src/soc/nvidia/tegra/i2c.h
index 07480c15ca..a2bf9508be 100644
--- a/src/soc/nvidia/tegra/i2c.h
+++ b/src/soc/nvidia/tegra/i2c.h
@@ -18,9 +18,9 @@
#include <stdint.h>
-void i2c_init(unsigned bus);
-void tegra_software_i2c_init(unsigned bus);
-void tegra_software_i2c_disable(unsigned bus);
+void i2c_init(unsigned int bus);
+void tegra_software_i2c_init(unsigned int bus);
+void tegra_software_i2c_disable(unsigned int bus);
enum {
/* Word 0 */
@@ -168,6 +168,6 @@ struct tegra_i2c_regs {
};
check_member(tegra_i2c_regs, config_load, 0x8C);
-extern unsigned g_num_i2c_buses;
+extern unsigned int g_num_i2c_buses;
#endif /* __SOC_NVIDIA_TEGRA_I2C_H__ */
diff --git a/src/soc/nvidia/tegra/software_i2c.c b/src/soc/nvidia/tegra/software_i2c.c
index 50aac8c45a..e215c0275d 100644
--- a/src/soc/nvidia/tegra/software_i2c.c
+++ b/src/soc/nvidia/tegra/software_i2c.c
@@ -36,7 +36,7 @@ static struct {
.sda = GPIO(Z7), .scl = GPIO(Z6)},
};
-static void tegra_set_sda(unsigned bus, int high)
+static void tegra_set_sda(unsigned int bus, int high)
{
if (high)
gpio_input_pullup(pins[bus].sda);
@@ -44,7 +44,7 @@ static void tegra_set_sda(unsigned bus, int high)
gpio_output(pins[bus].sda, 0);
}
-static void tegra_set_scl(unsigned bus, int high)
+static void tegra_set_scl(unsigned int bus, int high)
{
if (high)
gpio_input_pullup(pins[bus].scl);
@@ -52,12 +52,12 @@ static void tegra_set_scl(unsigned bus, int high)
gpio_output(pins[bus].scl, 0);
}
-static int tegra_get_sda(unsigned bus)
+static int tegra_get_sda(unsigned int bus)
{
return gpio_get(pins[bus].sda);
}
-static int tegra_get_scl(unsigned bus)
+static int tegra_get_scl(unsigned int bus)
{
return gpio_get(pins[bus].scl);
}
@@ -69,7 +69,7 @@ static struct software_i2c_ops tegra_ops = {
.get_scl = tegra_get_scl,
};
-void tegra_software_i2c_init(unsigned bus)
+void tegra_software_i2c_init(unsigned int bus)
{
software_i2c[bus] = &tegra_ops;
@@ -78,7 +78,7 @@ void tegra_software_i2c_init(unsigned bus)
tegra_set_scl(bus, 1);
}
-void tegra_software_i2c_disable(unsigned bus)
+void tegra_software_i2c_disable(unsigned int bus)
{
software_i2c[bus] = NULL;