diff options
Diffstat (limited to 'src/soc/nvidia')
-rw-r--r-- | src/soc/nvidia/tegra/i2c.c | 8 | ||||
-rw-r--r-- | src/soc/nvidia/tegra/i2c.h | 8 | ||||
-rw-r--r-- | src/soc/nvidia/tegra/software_i2c.c | 12 | ||||
-rw-r--r-- | src/soc/nvidia/tegra124/i2c.c | 2 | ||||
-rw-r--r-- | src/soc/nvidia/tegra124/lp0/tegra_lp0_resume.c | 6 | ||||
-rw-r--r-- | src/soc/nvidia/tegra124/uart.c | 2 | ||||
-rw-r--r-- | src/soc/nvidia/tegra210/i2c.c | 2 | ||||
-rw-r--r-- | src/soc/nvidia/tegra210/lp0/tegra_lp0_resume.c | 4 | ||||
-rw-r--r-- | src/soc/nvidia/tegra210/uart.c | 2 |
9 files changed, 23 insertions, 23 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; diff --git a/src/soc/nvidia/tegra124/i2c.c b/src/soc/nvidia/tegra124/i2c.c index 76b8f138f9..ee339bbe48 100644 --- a/src/soc/nvidia/tegra124/i2c.c +++ b/src/soc/nvidia/tegra124/i2c.c @@ -50,4 +50,4 @@ struct tegra_i2c_bus_info tegra_i2c_info[] = { } }; -unsigned g_num_i2c_buses = ARRAY_SIZE(tegra_i2c_info); +unsigned int g_num_i2c_buses = ARRAY_SIZE(tegra_i2c_info); diff --git a/src/soc/nvidia/tegra124/lp0/tegra_lp0_resume.c b/src/soc/nvidia/tegra124/lp0/tegra_lp0_resume.c index e00dbd1039..0ebe8e7056 100644 --- a/src/soc/nvidia/tegra124/lp0/tegra_lp0_resume.c +++ b/src/soc/nvidia/tegra124/lp0/tegra_lp0_resume.c @@ -292,7 +292,7 @@ static void __noreturn reset(void) halt(); } -static void udelay(unsigned usecs) +static void udelay(unsigned int usecs) { uint32_t start = read32(timer_us_ptr); while (read32(timer_us_ptr) - start < usecs) @@ -313,7 +313,7 @@ static uint32_t get_wakeup_vector(void) return read32(pmc_ctlr_scratch41_ptr); } -static unsigned get_osc_freq(void) +static unsigned int get_osc_freq(void) { return (read32(clk_rst_osc_ctrl_ptr) & OSC_FREQ_MASK) >> OSC_FREQ_SHIFT; } @@ -507,7 +507,7 @@ void ram_repair(void) /* Power. */ -static void power_on_partition(unsigned id) +static void power_on_partition(unsigned int id) { uint32_t bit = 0x1 << id; if (!(read32(pmc_ctlr_pwrgate_status_ptr) & bit)) { diff --git a/src/soc/nvidia/tegra124/uart.c b/src/soc/nvidia/tegra124/uart.c index f5f72aff4b..9bebc72afb 100644 --- a/src/soc/nvidia/tegra124/uart.c +++ b/src/soc/nvidia/tegra124/uart.c @@ -45,7 +45,7 @@ static int tegra124_uart_tst_byte(struct tegra124_uart *uart_ptr); static void tegra124_uart_init(struct tegra124_uart *uart_ptr) { // Use a hardcoded divisor for now. - const unsigned divisor = 221; + const unsigned int divisor = 221; const uint8_t line_config = UART8250_LCR_WLS_8; // 8n1 tegra124_uart_tx_flush(uart_ptr); diff --git a/src/soc/nvidia/tegra210/i2c.c b/src/soc/nvidia/tegra210/i2c.c index 35ee77712e..34aae5a639 100644 --- a/src/soc/nvidia/tegra210/i2c.c +++ b/src/soc/nvidia/tegra210/i2c.c @@ -50,4 +50,4 @@ struct tegra_i2c_bus_info tegra_i2c_info[] = { } }; -unsigned g_num_i2c_buses = ARRAY_SIZE(tegra_i2c_info); +unsigned int g_num_i2c_buses = ARRAY_SIZE(tegra_i2c_info); diff --git a/src/soc/nvidia/tegra210/lp0/tegra_lp0_resume.c b/src/soc/nvidia/tegra210/lp0/tegra_lp0_resume.c index c6a8393905..6ff95b8ac1 100644 --- a/src/soc/nvidia/tegra210/lp0/tegra_lp0_resume.c +++ b/src/soc/nvidia/tegra210/lp0/tegra_lp0_resume.c @@ -456,7 +456,7 @@ static void __noreturn reset(void) halt(); } -static void udelay(unsigned usecs) +static void udelay(unsigned int usecs) { uint32_t start = read32(timer_us_ptr); while (read32(timer_us_ptr) - start < usecs) @@ -638,7 +638,7 @@ void ram_repair(void) /* Power. */ -static void power_on_partition(unsigned id) +static void power_on_partition(unsigned int id) { uint32_t bit = 0x1 << id; if (!(read32(pmc_pwrgate_status_ptr) & bit)) { diff --git a/src/soc/nvidia/tegra210/uart.c b/src/soc/nvidia/tegra210/uart.c index 904aafa076..b5cf5d5a40 100644 --- a/src/soc/nvidia/tegra210/uart.c +++ b/src/soc/nvidia/tegra210/uart.c @@ -49,7 +49,7 @@ static int tegra210_uart_tst_byte(void); static void tegra210_uart_init(void) { // Use a hardcoded divisor for now. - const unsigned divisor = 221; + const unsigned int divisor = 221; const uint8_t line_config = UART8250_LCR_WLS_8; // 8n1 tegra210_uart_tx_flush(); |