From 38ddbfb325866716c9c65a460e388f33d1a773dd Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Wed, 23 Oct 2019 21:41:00 -0600 Subject: src/[arch-lib]: change "unsigned" to "unsigned int" Signed-off-by: Martin Roth Change-Id: Ibb7b48a7a144421aff29acbb7ac30968ae5fe5ab Reviewed-on: https://review.coreboot.org/c/coreboot/+/36329 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Rudolph --- src/drivers/amd/agesa/s3_mtrr.c | 2 +- src/drivers/emulation/qemu/cirrus.c | 30 +++++++++++++++--------------- src/drivers/generic/max98357a/chip.h | 6 +++--- src/drivers/i2c/at24rf08c/lenovo_serials.c | 2 +- src/drivers/i2c/da7219/chip.h | 28 ++++++++++++++-------------- src/drivers/i2c/generic/chip.h | 8 ++++---- src/drivers/i2c/nau8825/chip.h | 30 +++++++++++++++--------------- src/drivers/i2c/ww_ring/ww_ring.c | 16 ++++++++-------- src/drivers/i2c/ww_ring/ww_ring.h | 2 +- src/drivers/intel/gma/edid.c | 2 +- src/drivers/net/chip.h | 2 +- src/drivers/parade/ps8625/ps8625.c | 2 +- src/drivers/parade/ps8625/ps8625.h | 2 +- src/drivers/pc80/pc/udelay_io.c | 2 +- src/drivers/pc80/rtc/mc146818rtc_romcc.c | 4 ++-- src/drivers/pc80/tpm/tis.c | 2 +- src/drivers/spi/acpi/chip.h | 6 +++--- src/drivers/spi/tpm/tpm.c | 6 +++--- src/drivers/uart/uart8250io.c | 14 +++++++------- src/drivers/uart/uart8250mem.c | 2 +- src/drivers/usb/ehci_debug.c | 8 ++++---- src/drivers/usb/ehci_debug.h | 6 +++--- src/drivers/xgi/common/vb_util.c | 6 +++--- src/drivers/xgi/common/vb_util.h | 6 +++--- 24 files changed, 97 insertions(+), 97 deletions(-) (limited to 'src/drivers') diff --git a/src/drivers/amd/agesa/s3_mtrr.c b/src/drivers/amd/agesa/s3_mtrr.c index c773470b94..f81485d87a 100644 --- a/src/drivers/amd/agesa/s3_mtrr.c +++ b/src/drivers/amd/agesa/s3_mtrr.c @@ -19,7 +19,7 @@ #include #include -static void write_mtrr(u8 **p_nvram_pos, unsigned idx) +static void write_mtrr(u8 **p_nvram_pos, unsigned int idx) { msr_t msr_data; msr_data = rdmsr(idx); diff --git a/src/drivers/emulation/qemu/cirrus.c b/src/drivers/emulation/qemu/cirrus.c index c36ce2f47f..43710d9ece 100644 --- a/src/drivers/emulation/qemu/cirrus.c +++ b/src/drivers/emulation/qemu/cirrus.c @@ -197,23 +197,23 @@ write_hidden_dac (uint8_t data) static void cirrus_init_linear_fb(struct device *dev) { uint8_t cr_ext, cr_overlay; - unsigned pitch = (width * 4) / VGA_CR_PITCH_DIVISOR; + unsigned int pitch = (width * 4) / VGA_CR_PITCH_DIVISOR; uint8_t sr_ext = 0, hidden_dac = 0; - unsigned vdisplay_end = height - 2; - unsigned line_compare = 0x3ff; + unsigned int vdisplay_end = height - 2; + unsigned int line_compare = 0x3ff; uint8_t overflow, cell_height_reg; - unsigned horizontal_end = width / VGA_CR_WIDTH_DIVISOR; - unsigned horizontal_total = horizontal_end + 40; - unsigned horizontal_blank_start = horizontal_end; - unsigned horizontal_sync_pulse_start = horizontal_end + 3; - unsigned horizontal_sync_pulse_end = 0; - - unsigned horizontal_blank_end = 0; - unsigned vertical_blank_start = height + 1; - unsigned vertical_blank_end = 0; - unsigned vertical_sync_start = height + 3; - unsigned vertical_sync_end = 0; - unsigned vertical_total = height + 40; + unsigned int horizontal_end = width / VGA_CR_WIDTH_DIVISOR; + unsigned int horizontal_total = horizontal_end + 40; + unsigned int horizontal_blank_start = horizontal_end; + unsigned int horizontal_sync_pulse_start = horizontal_end + 3; + unsigned int horizontal_sync_pulse_end = 0; + + unsigned int horizontal_blank_end = 0; + unsigned int vertical_blank_start = height + 1; + unsigned int vertical_blank_end = 0; + unsigned int vertical_sync_start = height + 3; + unsigned int vertical_sync_end = 0; + unsigned int vertical_total = height + 40; /* find lfb pci bar */ addr = pci_read_config32(dev, PCI_BASE_ADDRESS_0); diff --git a/src/drivers/generic/max98357a/chip.h b/src/drivers/generic/max98357a/chip.h index dc5d48b8ee..ec4e94f3e6 100644 --- a/src/drivers/generic/max98357a/chip.h +++ b/src/drivers/generic/max98357a/chip.h @@ -18,9 +18,9 @@ struct drivers_generic_max98357a_config { struct acpi_gpio sdmode_gpio; /* SDMODE Delay */ - unsigned sdmode_delay; + unsigned int sdmode_delay; /* GPIO used to indicate if this device is present */ - unsigned device_present_gpio; - unsigned device_present_gpio_invert; + unsigned int device_present_gpio; + unsigned int device_present_gpio_invert; }; diff --git a/src/drivers/i2c/at24rf08c/lenovo_serials.c b/src/drivers/i2c/at24rf08c/lenovo_serials.c index 1be9e4e431..aacdb724c6 100644 --- a/src/drivers/i2c/at24rf08c/lenovo_serials.c +++ b/src/drivers/i2c/at24rf08c/lenovo_serials.c @@ -116,7 +116,7 @@ const char *smbios_mainboard_product_name(void) void smbios_system_set_uuid(u8 *uuid) { static char result[16]; - unsigned i; + unsigned int i; static int already_read; struct device *dev; const int remap[16] = { diff --git a/src/drivers/i2c/da7219/chip.h b/src/drivers/i2c/da7219/chip.h index f50362588c..89ee21e217 100644 --- a/src/drivers/i2c/da7219/chip.h +++ b/src/drivers/i2c/da7219/chip.h @@ -25,13 +25,13 @@ struct drivers_i2c_da7219_config { struct acpi_gpio irq_gpio; /* I2C Bus Frequency in Hertz (default 400kHz) */ - unsigned bus_speed; + unsigned int bus_speed; /* * micbias-lvl : Voltage (mV) for Mic Bias * [<1600>, <1800>, <2000>, <2200>, <2400>, <2600>] */ - unsigned micbias_lvl; + unsigned int micbias_lvl; /* * mic-amp-in-sel : Mic input source type @@ -47,30 +47,30 @@ struct drivers_i2c_da7219_config { * micbias-pulse-lvl : Mic bias higher voltage pulse level (mV) * [<2800>, <2900>] */ - unsigned micbias_pulse_lvl; + unsigned int micbias_pulse_lvl; /* * micbias-pulse-time : Mic bias higher voltage pulse duration (ms) */ - unsigned micbias_pulse_time; + unsigned int micbias_pulse_time; /* * btn-cfg : Periodic button press measurements for 4-pole jack (ms) * [<2>, <5>, <10>, <50>, <100>, <200>, <500>] */ - unsigned btn_cfg; + unsigned int btn_cfg; /* * mic-det-thr : Impedance threshold for mic detection measurement (Ohms) * [<200>, <500>, <750>, <1000>] */ - unsigned mic_det_thr; + unsigned int mic_det_thr; /* * jack-ins-deb : Debounce time for jack insertion (ms) * [<5>, <10>, <20>, <50>, <100>, <200>, <500>, <1000>] */ - unsigned jack_ins_deb; + unsigned int jack_ins_deb; /* * jack-det-rate : Jack type detection latency (3/4 pole) @@ -82,43 +82,43 @@ struct drivers_i2c_da7219_config { * jack-rem-deb : Debounce time for jack removal (ms) * [<1>, <5>, <10>, <20>] */ - unsigned jack_rem_deb; + unsigned int jack_rem_deb; /* * a-d-btn-thr : Impedance threshold between buttons A and D * [0x0 - 0xFF] */ - unsigned a_d_btn_thr; + unsigned int a_d_btn_thr; /* * d-b-btn-thr : Impedance threshold between buttons D and B * [0x0 - 0xFF] */ - unsigned d_b_btn_thr; + unsigned int d_b_btn_thr; /* * b-c-btn-thr : Impedance threshold between buttons B and C * [0x0 - 0xFF] */ - unsigned b_c_btn_thr; + unsigned int b_c_btn_thr; /* * c-mic-btn-thr : Impedance threshold between button C and Mic * [0x0 - 0xFF] */ - unsigned c_mic_btn_thr; + unsigned int c_mic_btn_thr; /* * btn-avg : Number of 8-bit readings for averaged button measurement * [<1>, <2>, <4>, <8>] */ - unsigned btn_avg; + unsigned int btn_avg; /* * adc-1bit-rpt : Repeat count for 1-bit button measurement * [<1>, <2>, <4>, <8>] */ - unsigned adc_1bit_rpt; + unsigned int adc_1bit_rpt; /* * mclk-name : Pass the system clk to da7219 diff --git a/src/drivers/i2c/generic/chip.h b/src/drivers/i2c/generic/chip.h index 59224ec972..ffaf7e14e5 100644 --- a/src/drivers/i2c/generic/chip.h +++ b/src/drivers/i2c/generic/chip.h @@ -24,10 +24,10 @@ struct drivers_i2c_generic_config { const char *cid; /* ACPI _CID */ const char *name; /* ACPI Device Name */ const char *desc; /* Device Description */ - unsigned uid; /* ACPI _UID */ + unsigned int uid; /* ACPI _UID */ enum i2c_speed speed; /* Bus speed in Hz, default is I2C_SPEED_FAST */ const char *compat_string; /* Compatible string for _HID=PRP0001 */ - unsigned wake; /* Wake GPE */ + unsigned int wake; /* Wake GPE */ struct acpi_irq irq; /* Interrupt */ /* Use GPIO based interrupt instead of PIRQ */ @@ -43,8 +43,8 @@ struct drivers_i2c_generic_config { int probed; /* GPIO used to indicate if this device is present */ - unsigned device_present_gpio; - unsigned device_present_gpio_invert; + unsigned int device_present_gpio; + unsigned int device_present_gpio_invert; /* Disable reset and enable GPIO export in _CRS */ bool disable_gpio_export_in_crs; diff --git a/src/drivers/i2c/nau8825/chip.h b/src/drivers/i2c/nau8825/chip.h index 72704e5c9d..9fc8e96ac4 100644 --- a/src/drivers/i2c/nau8825/chip.h +++ b/src/drivers/i2c/nau8825/chip.h @@ -24,19 +24,19 @@ struct drivers_i2c_nau8825_config { struct acpi_irq irq; /* I2C Bus Frequency in Hertz (default 400kHz) */ - unsigned bus_speed; + unsigned int bus_speed; /* Enable jack detection via JKDET pin */ - unsigned jkdet_enable; + unsigned int jkdet_enable; /* Enable JKDET pin pull if set, otherwise high impedance state */ - unsigned jkdet_pull_enable; + unsigned int jkdet_pull_enable; /* Pull-up JKDET pin if set, otherwise pull down */ - unsigned jkdet_pull_up; + unsigned int jkdet_pull_up; /* JKDET pin polarity, 0 => active high, 1 => active low */ - unsigned jkdet_polarity; + unsigned int jkdet_polarity; /* * VREF Impedance selection @@ -45,10 +45,10 @@ struct drivers_i2c_nau8825_config { * 2 - 125 kOhm * 3 - 2.5 kOhm */ - unsigned vref_impedance; + unsigned int vref_impedance; /* Button impedance measurement hysteresis */ - unsigned sar_hysteresis; + unsigned int sar_hysteresis; /* * Reference voltage for button impedance measurement and micbias @@ -61,8 +61,8 @@ struct drivers_i2c_nau8825_config { * 6 - VDDA * 1.53 * 7 - VDDA * 1.53 */ - unsigned micbias_voltage; - unsigned sar_voltage; + unsigned int micbias_voltage; + unsigned int sar_voltage; /* * SAR compare time @@ -71,7 +71,7 @@ struct drivers_i2c_nau8825_config { * 2 - 2 us * 3 - 4 us */ - unsigned sar_compare_time; + unsigned int sar_compare_time; /* * SAR sampling time @@ -80,7 +80,7 @@ struct drivers_i2c_nau8825_config { * 2 - 8 us * 3 - 16 us */ - unsigned sar_sampling_time; + unsigned int sar_sampling_time; /* * Button short key press debounce time @@ -89,16 +89,16 @@ struct drivers_i2c_nau8825_config { * 2 - 100 ms * 3 - 30 ms */ - unsigned short_key_debounce; + unsigned int short_key_debounce; /* Debounce time 2^(n+2) ms (0-7) for jack insert */ - unsigned jack_insert_debounce; + unsigned int jack_insert_debounce; /* Debounce time 2^(n+2) ms (0-7) for jack eject */ - unsigned jack_eject_debounce; + unsigned int jack_eject_debounce; /* Number of buttons supported, up to 8 */ - unsigned sar_threshold_num; + unsigned int sar_threshold_num; /* * Impedance threshold for each button, up to 8 diff --git a/src/drivers/i2c/ww_ring/ww_ring.c b/src/drivers/i2c/ww_ring/ww_ring.c index 16f6bd7a77..9957584d28 100644 --- a/src/drivers/i2c/ww_ring/ww_ring.c +++ b/src/drivers/i2c/ww_ring/ww_ring.c @@ -88,12 +88,12 @@ * the program page size. */ typedef struct { - unsigned i2c_bus; + unsigned int i2c_bus; uint8_t dev_addr; uint8_t data_buffer[LP55231_PROG_PAGE_SIZE + 1]; } TiLp55231; -static void ww_ring_init(unsigned i2c_bus); +static void ww_ring_init(unsigned int i2c_bus); /* Controller descriptors. */ static TiLp55231 lp55231s[WW_RING_NUM_LED_CONTROLLERS]; @@ -142,7 +142,7 @@ static int ledc_transfer(TiLp55231 *ledc, struct i2c_msg *segs, * bytes can be transmitted in one write transaction. */ static int ledc_write(TiLp55231 *ledc, uint8_t start_addr, - const uint8_t *data, unsigned count) + const uint8_t *data, unsigned int count) { struct i2c_msg seg; @@ -220,10 +220,10 @@ static int ledc_reset(TiLp55231 *ledc) * into sections fitting into memory pages. */ static void ledc_write_program(TiLp55231 *ledc, uint8_t load_addr, - const uint8_t *program, unsigned count) + const uint8_t *program, unsigned int count) { uint8_t page_num = load_addr / LP55231_PROG_PAGE_SIZE; - unsigned page_offs = load_addr % LP55231_PROG_PAGE_SIZE; + unsigned int page_offs = load_addr % LP55231_PROG_PAGE_SIZE; if ((load_addr + count) > LP55231_MAX_PROG_SIZE) { printk(BIOS_WARNING, @@ -233,7 +233,7 @@ static void ledc_write_program(TiLp55231 *ledc, uint8_t load_addr, } while (count) { - unsigned segment_size = LP55231_PROG_PAGE_SIZE - page_offs; + unsigned int segment_size = LP55231_PROG_PAGE_SIZE - page_offs; if (segment_size > count) segment_size = count; @@ -334,7 +334,7 @@ static int ledc_init_validate(TiLp55231 *ledc) * Find a program matching screen type, and run it on both controllers, if * found. */ -int ww_ring_display_pattern(unsigned i2c_bus, enum display_pattern pattern) +int ww_ring_display_pattern(unsigned int i2c_bus, enum display_pattern pattern) { static int initted; const WwRingStateProg *wwr_prog; @@ -379,7 +379,7 @@ int ww_ring_display_pattern(unsigned i2c_bus, enum display_pattern pattern) #define LP55231_I2C_BASE_ADDR 0x32 -static void ww_ring_init(unsigned i2c_bus) +static void ww_ring_init(unsigned int i2c_bus) { TiLp55231 *ledc; int i, count = 0; diff --git a/src/drivers/i2c/ww_ring/ww_ring.h b/src/drivers/i2c/ww_ring/ww_ring.h index 911a85a1e4..a3c3372c1c 100644 --- a/src/drivers/i2c/ww_ring/ww_ring.h +++ b/src/drivers/i2c/ww_ring/ww_ring.h @@ -30,6 +30,6 @@ enum display_pattern { * * Display pattern on the ring LEDs. */ -int ww_ring_display_pattern(unsigned i2c_bus, enum display_pattern pattern); +int ww_ring_display_pattern(unsigned int i2c_bus, enum display_pattern pattern); #endif diff --git a/src/drivers/intel/gma/edid.c b/src/drivers/intel/gma/edid.c index 8dd31713a5..4d4aec3a6e 100644 --- a/src/drivers/intel/gma/edid.c +++ b/src/drivers/intel/gma/edid.c @@ -27,7 +27,7 @@ static void wait_rdy(u8 *mmio) { - unsigned try = 100; + unsigned int try = 100; while (try--) { if (read32(GMBUS2_ADDR) & GMBUS_HW_RDY) diff --git a/src/drivers/net/chip.h b/src/drivers/net/chip.h index 985a85aac8..430bc334a5 100644 --- a/src/drivers/net/chip.h +++ b/src/drivers/net/chip.h @@ -18,7 +18,7 @@ struct drivers_net_config { uint16_t customized_leds; - unsigned wake; /* Wake pin for ACPI _PRW */ + unsigned int wake; /* Wake pin for ACPI _PRW */ /* * There maybe many NIC cards in a system. * This parameter is for driver to identify what diff --git a/src/drivers/parade/ps8625/ps8625.c b/src/drivers/parade/ps8625/ps8625.c index c31f4dba5f..c86c4d4100 100644 --- a/src/drivers/parade/ps8625/ps8625.c +++ b/src/drivers/parade/ps8625/ps8625.c @@ -17,7 +17,7 @@ #include "ps8625.h" -void parade_ps8625_bridge_setup(unsigned bus, unsigned chip_base, +void parade_ps8625_bridge_setup(unsigned int bus, unsigned int chip_base, const struct parade_write *parade_writes, int parade_write_count) { diff --git a/src/drivers/parade/ps8625/ps8625.h b/src/drivers/parade/ps8625/ps8625.h index 187ad71ab8..7eb8b98df2 100644 --- a/src/drivers/parade/ps8625/ps8625.h +++ b/src/drivers/parade/ps8625/ps8625.h @@ -22,7 +22,7 @@ struct parade_write { uint8_t val; }; -void parade_ps8625_bridge_setup(unsigned bus, unsigned chip_base, +void parade_ps8625_bridge_setup(unsigned int bus, unsigned int chip_base, const struct parade_write *, int parade_write_count); diff --git a/src/drivers/pc80/pc/udelay_io.c b/src/drivers/pc80/pc/udelay_io.c index 35e7af6f39..4fe1caeed9 100644 --- a/src/drivers/pc80/pc/udelay_io.c +++ b/src/drivers/pc80/pc/udelay_io.c @@ -18,7 +18,7 @@ void init_timer(void) { } -void udelay(unsigned usecs) +void udelay(unsigned int usecs) { int i; diff --git a/src/drivers/pc80/rtc/mc146818rtc_romcc.c b/src/drivers/pc80/rtc/mc146818rtc_romcc.c index cdce66a6b9..4405443501 100644 --- a/src/drivers/pc80/rtc/mc146818rtc_romcc.c +++ b/src/drivers/pc80/rtc/mc146818rtc_romcc.c @@ -74,10 +74,10 @@ static inline __attribute__((unused)) int do_normal_boot(void) return boot_use_normal(byte); } -unsigned read_option_lowlevel(unsigned start, unsigned size, unsigned def) +unsigned int read_option_lowlevel(unsigned int start, unsigned int size, unsigned int def) { #if CONFIG(USE_OPTION_TABLE) - unsigned byte; + unsigned int byte; byte = cmos_read(start/8); return (byte >> (start & 7U)) & ((1U << size) - 1U); diff --git a/src/drivers/pc80/tpm/tis.c b/src/drivers/pc80/tpm/tis.c index 33e950496f..5927377d15 100644 --- a/src/drivers/pc80/tpm/tis.c +++ b/src/drivers/pc80/tpm/tis.c @@ -465,7 +465,7 @@ static u32 tis_senddata(const u8 *const data, u32 len) burst = tpm_read_burst_count(locality); while (1) { - unsigned count; + unsigned int count; /* Wait till the device is ready to accept more data. */ while (!burst) { diff --git a/src/drivers/spi/acpi/chip.h b/src/drivers/spi/acpi/chip.h index 14e5f8a789..57c1a5cad1 100644 --- a/src/drivers/spi/acpi/chip.h +++ b/src/drivers/spi/acpi/chip.h @@ -21,11 +21,11 @@ struct drivers_spi_acpi_config { const char *cid; /* ACPI _CID */ const char *name; /* ACPI Device Name */ const char *desc; /* Device Description */ - unsigned uid; /* ACPI _UID */ - unsigned speed; /* Bus speed in Hz (default 1MHz) */ + unsigned int uid; /* ACPI _UID */ + unsigned int speed; /* Bus speed in Hz (default 1MHz) */ const char *compat_string; /* Compatible string for _HID=PRP0001 */ struct acpi_irq irq; /* Interrupt */ - unsigned wake; /* Wake GPE */ + unsigned int wake; /* Wake GPE */ /* Use GPIO based interrupt instead of PIRQ */ struct acpi_gpio irq_gpio; diff --git a/src/drivers/spi/tpm/tpm.c b/src/drivers/spi/tpm/tpm.c index aad7610313..270b15b471 100644 --- a/src/drivers/spi/tpm/tpm.c +++ b/src/drivers/spi/tpm/tpm.c @@ -103,7 +103,7 @@ static int tpm_sync(void) * * Returns 1 on success, 0 on failure (TPM SPI flow control timeout.) */ -static int start_transaction(int read_write, size_t bytes, unsigned addr) +static int start_transaction(int read_write, size_t bytes, unsigned int addr) { spi_frame_header header; uint8_t byte; @@ -291,7 +291,7 @@ static void read_bytes(void *buffer, size_t bytes) * * Returns one to indicate success, zero to indicate failure. */ -static int tpm2_write_reg(unsigned reg_number, const void *buffer, size_t bytes) +static int tpm2_write_reg(unsigned int reg_number, const void *buffer, size_t bytes) { struct spi_slave *spi_slave = car_get_var_ptr(&g_spi_slave); trace_dump("W", reg_number, bytes, buffer, 0); @@ -309,7 +309,7 @@ static int tpm2_write_reg(unsigned reg_number, const void *buffer, size_t bytes) * Returns one to indicate success, zero to indicate failure. In case of * failure zero out the user buffer. */ -static int tpm2_read_reg(unsigned reg_number, void *buffer, size_t bytes) +static int tpm2_read_reg(unsigned int reg_number, void *buffer, size_t bytes) { struct spi_slave *spi_slave = car_get_var_ptr(&g_spi_slave); if (!start_transaction(true, bytes, reg_number)) { diff --git a/src/drivers/uart/uart8250io.c b/src/drivers/uart/uart8250io.c index 6476079bcb..58e014170a 100644 --- a/src/drivers/uart/uart8250io.c +++ b/src/drivers/uart/uart8250io.c @@ -29,30 +29,30 @@ #define SINGLE_CHAR_TIMEOUT (50 * 1000) #define FIFO_TIMEOUT (16 * SINGLE_CHAR_TIMEOUT) -static int uart8250_can_tx_byte(unsigned base_port) +static int uart8250_can_tx_byte(unsigned int base_port) { return inb(base_port + UART8250_LSR) & UART8250_LSR_THRE; } -static void uart8250_tx_byte(unsigned base_port, unsigned char data) +static void uart8250_tx_byte(unsigned int base_port, unsigned char data) { unsigned long int i = SINGLE_CHAR_TIMEOUT; while (i-- && !uart8250_can_tx_byte(base_port)); outb(data, base_port + UART8250_TBR); } -static void uart8250_tx_flush(unsigned base_port) +static void uart8250_tx_flush(unsigned int base_port) { unsigned long int i = FIFO_TIMEOUT; while (i-- && !(inb(base_port + UART8250_LSR) & UART8250_LSR_TEMT)); } -static int uart8250_can_rx_byte(unsigned base_port) +static int uart8250_can_rx_byte(unsigned int base_port) { return inb(base_port + UART8250_LSR) & UART8250_LSR_DR; } -static unsigned char uart8250_rx_byte(unsigned base_port) +static unsigned char uart8250_rx_byte(unsigned int base_port) { unsigned long int i = SINGLE_CHAR_TIMEOUT; while (i && !uart8250_can_rx_byte(base_port)) @@ -64,7 +64,7 @@ static unsigned char uart8250_rx_byte(unsigned base_port) return 0x0; } -static void uart8250_init(unsigned base_port, unsigned divisor) +static void uart8250_init(unsigned int base_port, unsigned int divisor) { DISABLE_TRACE; /* Disable interrupts */ @@ -87,7 +87,7 @@ static void uart8250_init(unsigned base_port, unsigned divisor) ENABLE_TRACE; } -static const unsigned bases[] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 }; +static const unsigned int bases[] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 }; uintptr_t uart_platform_base(int idx) { diff --git a/src/drivers/uart/uart8250mem.c b/src/drivers/uart/uart8250mem.c index 46512ebb78..c519b4d53e 100644 --- a/src/drivers/uart/uart8250mem.c +++ b/src/drivers/uart/uart8250mem.c @@ -88,7 +88,7 @@ static unsigned char uart8250_mem_rx_byte(void *base) return 0x0; } -static void uart8250_mem_init(void *base, unsigned divisor) +static void uart8250_mem_init(void *base, unsigned int divisor) { /* Disable interrupts */ uart8250_write(base, UART8250_IER, 0x0); diff --git a/src/drivers/usb/ehci_debug.c b/src/drivers/usb/ehci_debug.c index 567ef9ba65..ff237265eb 100644 --- a/src/drivers/usb/ehci_debug.c +++ b/src/drivers/usb/ehci_debug.c @@ -109,7 +109,7 @@ static void dbgp_breath(void) } static int dbgp_wait_until_done(struct ehci_dbg_port *ehci_debug, struct dbgp_pipe *pipe, - unsigned ctrl, const int timeout) + unsigned int ctrl, const int timeout) { u32 rd_ctrl, rd_pids; u32 ctrl_prev = 0, pids_prev = 0; @@ -312,7 +312,7 @@ void dbgp_mdelay(int ms) } } -int dbgp_control_msg(struct ehci_dbg_port *ehci_debug, unsigned devnum, int requesttype, +int dbgp_control_msg(struct ehci_dbg_port *ehci_debug, unsigned int devnum, int requesttype, int request, int value, int index, void *data, int size) { struct ehci_debug_info *info = dbgp_ehci_info(); @@ -435,7 +435,7 @@ static int ehci_wait_for_port(struct ehci_regs *ehci_regs, int port) -static int usbdebug_init_(unsigned ehci_bar, unsigned offset, struct ehci_debug_info *info) +static int usbdebug_init_(unsigned int ehci_bar, unsigned int offset, struct ehci_debug_info *info) { struct ehci_caps *ehci_caps; struct ehci_regs *ehci_regs; @@ -654,7 +654,7 @@ void dbgp_put(struct dbgp_pipe *pipe) } #if ENV_RAMSTAGE -void usbdebug_re_enable(unsigned ehci_base) +void usbdebug_re_enable(unsigned int ehci_base) { struct ehci_debug_info *dbg_info = dbgp_ehci_info(); u64 diff; diff --git a/src/drivers/usb/ehci_debug.h b/src/drivers/usb/ehci_debug.h index e87be8afa9..0f20c2f5fb 100644 --- a/src/drivers/usb/ehci_debug.h +++ b/src/drivers/usb/ehci_debug.h @@ -16,13 +16,13 @@ #include -void usbdebug_re_enable(unsigned ehci_base); +void usbdebug_re_enable(unsigned int ehci_base); void usbdebug_disable(void); /* Returns 0 on success and sets MMIO base and dbg_offset if EHCI debug * capability was found and enabled. Returns non-zero on error. */ -int ehci_debug_hw_enable(unsigned *base, unsigned *dbg_offset); +int ehci_debug_hw_enable(unsigned int *base, unsigned int *dbg_offset); void ehci_debug_select_port(unsigned int port); #define DBGP_EP_VALID (1<<0) @@ -60,7 +60,7 @@ int dbgp_ep_is_active(struct dbgp_pipe *pipe); int dbgp_bulk_write_x(struct dbgp_pipe *pipe, const char *bytes, int size); int dbgp_bulk_read_x(struct dbgp_pipe *pipe, void *data, int size); -int dbgp_control_msg(struct ehci_dbg_port *ehci_debug, unsigned devnum, +int dbgp_control_msg(struct ehci_dbg_port *ehci_debug, unsigned int devnum, int requesttype, int request, int value, int index, void *data, int size); void dbgp_mdelay(int ms); diff --git a/src/drivers/xgi/common/vb_util.c b/src/drivers/xgi/common/vb_util.c index b56df08b31..dbaaa0c907 100644 --- a/src/drivers/xgi/common/vb_util.c +++ b/src/drivers/xgi/common/vb_util.c @@ -33,7 +33,7 @@ u8 xgifb_reg_get(unsigned long port, u8 index) } void xgifb_reg_and_or(unsigned long port, u8 index, - unsigned data_and, unsigned data_or) + unsigned int data_and, unsigned int data_or) { u8 temp; @@ -42,7 +42,7 @@ void xgifb_reg_and_or(unsigned long port, u8 index, xgifb_reg_set(port, index, temp); } -void xgifb_reg_and(unsigned long port, u8 index, unsigned data_and) +void xgifb_reg_and(unsigned long port, u8 index, unsigned int data_and) { u8 temp; @@ -51,7 +51,7 @@ void xgifb_reg_and(unsigned long port, u8 index, unsigned data_and) xgifb_reg_set(port, index, temp); } -void xgifb_reg_or(unsigned long port, u8 index, unsigned data_or) +void xgifb_reg_or(unsigned long port, u8 index, unsigned int data_or) { u8 temp; diff --git a/src/drivers/xgi/common/vb_util.h b/src/drivers/xgi/common/vb_util.h index bdf08be456..c71b0df5d8 100644 --- a/src/drivers/xgi/common/vb_util.h +++ b/src/drivers/xgi/common/vb_util.h @@ -17,7 +17,7 @@ #define _VBUTIL_ extern void xgifb_reg_set(unsigned long, u8, u8); extern u8 xgifb_reg_get(unsigned long, u8); -extern void xgifb_reg_or(unsigned long, u8, unsigned); -extern void xgifb_reg_and(unsigned long, u8, unsigned); -extern void xgifb_reg_and_or(unsigned long, u8, unsigned, unsigned); +extern void xgifb_reg_or(unsigned long, u8, unsigned int); +extern void xgifb_reg_and(unsigned long, u8, unsigned int); +extern void xgifb_reg_and_or(unsigned long, u8, unsigned int, unsigned int); #endif -- cgit v1.2.3