diff options
Diffstat (limited to 'src/device')
-rw-r--r-- | src/device/device_util.c | 8 | ||||
-rw-r--r-- | src/device/hypertransport.c | 20 | ||||
-rw-r--r-- | src/device/i2c.c | 4 | ||||
-rw-r--r-- | src/device/oprom/x86emu/decode.c | 14 | ||||
-rw-r--r-- | src/device/oprom/x86emu/decode.h | 8 | ||||
-rw-r--r-- | src/device/pci_device.c | 10 | ||||
-rw-r--r-- | src/device/pciexp_device.c | 16 | ||||
-rw-r--r-- | src/device/software_i2c.c | 28 |
8 files changed, 54 insertions, 54 deletions
diff --git a/src/device/device_util.c b/src/device/device_util.c index d8a84316c0..36bcbe9c4d 100644 --- a/src/device/device_util.c +++ b/src/device/device_util.c @@ -25,7 +25,7 @@ * @param apic_id The Local APIC ID number. * @return Pointer to the device structure (if found), 0 otherwise. */ -struct device *dev_find_lapic(unsigned apic_id) +struct device *dev_find_lapic(unsigned int apic_id) { struct device *dev; struct device *result = NULL; @@ -325,7 +325,7 @@ void compact_resources(struct device *dev) * @param index The index of the resource on the device. * @return The resource, if it already exists. */ -struct resource *probe_resource(const struct device *dev, unsigned index) +struct resource *probe_resource(const struct device *dev, unsigned int index) { struct resource *res; @@ -348,7 +348,7 @@ struct resource *probe_resource(const struct device *dev, unsigned index) * @param index The index of the resource on the device. * @return TODO. */ -struct resource *new_resource(struct device *dev, unsigned index) +struct resource *new_resource(struct device *dev, unsigned int index) { struct resource *resource, *tail; @@ -395,7 +395,7 @@ struct resource *new_resource(struct device *dev, unsigned index) * @param index The index of the resource on the device. * return TODO. */ -struct resource *find_resource(const struct device *dev, unsigned index) +struct resource *find_resource(const struct device *dev, unsigned int index) { struct resource *resource; diff --git a/src/device/hypertransport.c b/src/device/hypertransport.c index 1a8f7e6dc1..03e3375b91 100644 --- a/src/device/hypertransport.c +++ b/src/device/hypertransport.c @@ -21,7 +21,7 @@ struct ht_link { struct device *dev; - unsigned pos; + unsigned int pos; unsigned char ctrl_off, config_off, freq_off, freq_cap_off; }; @@ -64,7 +64,7 @@ static struct device *ht_scan_get_devs(struct device **old_devices) return first; } -static int ht_setup_link(struct ht_link *prev, struct device *dev, unsigned pos) +static int ht_setup_link(struct ht_link *prev, struct device *dev, unsigned int pos) { struct ht_link cur[1]; int linkb_to_host; @@ -113,9 +113,9 @@ static int ht_setup_link(struct ht_link *prev, struct device *dev, unsigned pos) return 0; } -static unsigned ht_lookup_slave_capability(struct device *dev) +static unsigned int ht_lookup_slave_capability(struct device *dev) { - unsigned pos; + unsigned int pos; pos = 0; do { @@ -135,7 +135,7 @@ static unsigned ht_lookup_slave_capability(struct device *dev) } static void ht_collapse_early_enumeration(struct bus *bus, - unsigned offset_unitid) + unsigned int offset_unitid) { unsigned int devfn; struct ht_link prev; @@ -207,7 +207,7 @@ static void ht_collapse_early_enumeration(struct bus *bus, for (devfn = PCI_DEVFN(1, 0); devfn <= 0xff; devfn += 8) { struct device dummy; u32 id; - unsigned pos, flags; + unsigned int pos, flags; dummy.bus = bus; dummy.path.type = DEVICE_PATH_PCI; @@ -236,10 +236,10 @@ static void ht_collapse_early_enumeration(struct bus *bus, } } -static unsigned int do_hypertransport_scan_chain(struct bus *bus, unsigned min_devfn, - unsigned max_devfn, - unsigned *ht_unitid_base, - unsigned offset_unitid) +static unsigned int do_hypertransport_scan_chain(struct bus *bus, unsigned int min_devfn, + unsigned int max_devfn, + unsigned int *ht_unitid_base, + unsigned int offset_unitid) { /* * Even CONFIG_HT_CHAIN_UNITID_BASE == 0, we still can go through this diff --git a/src/device/i2c.c b/src/device/i2c.c index fb29b7291d..72e5525df1 100644 --- a/src/device/i2c.c +++ b/src/device/i2c.c @@ -14,7 +14,7 @@ #include <device/i2c_simple.h> #include <stdint.h> -int i2c_read_field(unsigned bus, uint8_t chip, uint8_t reg, uint8_t *data, +int i2c_read_field(unsigned int bus, uint8_t chip, uint8_t reg, uint8_t *data, uint8_t mask, uint8_t shift) { int ret; @@ -28,7 +28,7 @@ int i2c_read_field(unsigned bus, uint8_t chip, uint8_t reg, uint8_t *data, return ret; } -int i2c_write_field(unsigned bus, uint8_t chip, uint8_t reg, uint8_t data, +int i2c_write_field(unsigned int bus, uint8_t chip, uint8_t reg, uint8_t data, uint8_t mask, uint8_t shift) { int ret; diff --git a/src/device/oprom/x86emu/decode.c b/src/device/oprom/x86emu/decode.c index b7a6f35b51..3b7bde727a 100644 --- a/src/device/oprom/x86emu/decode.c +++ b/src/device/oprom/x86emu/decode.c @@ -735,7 +735,7 @@ REMARKS: Decodes scale/index of SIB byte and returns relevant offset part of effective address. ****************************************************************************/ -static unsigned decode_sib_si( +static unsigned int decode_sib_si( int scale, int index) { @@ -785,7 +785,7 @@ Offset in memory for the address decoding REMARKS: Decodes SIB addressing byte and returns calculated effective address. ****************************************************************************/ -static unsigned decode_sib_address( +static unsigned int decode_sib_address( int mod) { int sib = fetch_byte_imm(); @@ -874,10 +874,10 @@ NOTE: The code which specifies the corresponding segment (ds vs ss) if a SS access is needed, set this bit. Otherwise, DS access occurs (unless any of the segment override bits are set). ****************************************************************************/ -unsigned decode_rm00_address( +unsigned int decode_rm00_address( int rm) { - unsigned offset; + unsigned int offset; if (M.x86.mode & SYSMODE_PREFIX_ADDR) { /* 32-bit addressing */ @@ -954,7 +954,7 @@ REMARKS: Return the offset given by mod=01 addressing. Also enables the decoding of instructions. ****************************************************************************/ -unsigned decode_rm01_address( +unsigned int decode_rm01_address( int rm) { int displacement; @@ -1043,7 +1043,7 @@ REMARKS: Return the offset given by mod=10 addressing. Also enables the decoding of instructions. ****************************************************************************/ -unsigned decode_rm10_address( +unsigned int decode_rm10_address( int rm) { if (M.x86.mode & SYSMODE_PREFIX_ADDR) { @@ -1136,7 +1136,7 @@ REMARKS: Return the offset given by "mod" addressing. ****************************************************************************/ -unsigned decode_rmXX_address(int mod, int rm) +unsigned int decode_rmXX_address(int mod, int rm) { if (mod == 0) return decode_rm00_address(rm); diff --git a/src/device/oprom/x86emu/decode.h b/src/device/oprom/x86emu/decode.h index 99ed7f6f35..530b7d9a51 100644 --- a/src/device/oprom/x86emu/decode.h +++ b/src/device/oprom/x86emu/decode.h @@ -76,10 +76,10 @@ u8* decode_rm_byte_register(int reg); u16* decode_rm_word_register(int reg); u32* decode_rm_long_register(int reg); u16* decode_rm_seg_register(int reg); -unsigned decode_rm00_address(int rm); -unsigned decode_rm01_address(int rm); -unsigned decode_rm10_address(int rm); -unsigned decode_rmXX_address(int mod, int rm); +unsigned int decode_rm00_address(int rm); +unsigned int decode_rm01_address(int rm); +unsigned int decode_rm10_address(int rm); +unsigned int decode_rmXX_address(int mod, int rm); #ifdef __cplusplus } /* End of "C" linkage for C++ */ diff --git a/src/device/pci_device.c b/src/device/pci_device.c index 191c8460c8..36b7c82d2a 100644 --- a/src/device/pci_device.c +++ b/src/device/pci_device.c @@ -345,7 +345,7 @@ static void pci_read_bases(struct device *dev, unsigned int howmany) } static void pci_record_bridge_resource(struct device *dev, resource_t moving, - unsigned index, unsigned long type) + unsigned int index, unsigned long type) { struct resource *resource; unsigned long gran; @@ -1162,8 +1162,8 @@ unsigned int pci_match_simple_dev(struct device *dev, pci_devfn_t sdev) * @param min_devfn Minimum devfn to look at in the scan, usually 0x00. * @param max_devfn Maximum devfn to look at in the scan, usually 0xff. */ -void pci_scan_bus(struct bus *bus, unsigned min_devfn, - unsigned max_devfn) +void pci_scan_bus(struct bus *bus, unsigned int min_devfn, + unsigned int max_devfn) { unsigned int devfn; struct device *dev, **prev; @@ -1311,8 +1311,8 @@ static void pci_bridge_route(struct bus *link, scan_state state) */ void do_pci_scan_bridge(struct device *dev, void (*do_scan_bus) (struct bus * bus, - unsigned min_devfn, - unsigned max_devfn)) + unsigned int min_devfn, + unsigned int max_devfn)) { struct bus *bus; diff --git a/src/device/pciexp_device.c b/src/device/pciexp_device.c index 71702a7360..72aac4c7c5 100644 --- a/src/device/pciexp_device.c +++ b/src/device/pciexp_device.c @@ -45,7 +45,7 @@ unsigned int pciexp_find_extended_cap(struct device *dev, unsigned int cap) * Re-train a PCIe link */ #define PCIE_TRAIN_RETRY 10000 -static int pciexp_retrain_link(struct device *dev, unsigned cap) +static int pciexp_retrain_link(struct device *dev, unsigned int cap) { unsigned int try; u16 lnk; @@ -90,8 +90,8 @@ static int pciexp_retrain_link(struct device *dev, unsigned cap) * and enable Common Clock Configuration if possible. If CCC is * enabled the link must be retrained. */ -static void pciexp_enable_common_clock(struct device *root, unsigned root_cap, - struct device *endp, unsigned endp_cap) +static void pciexp_enable_common_clock(struct device *root, unsigned int root_cap, + struct device *endp, unsigned int endp_cap) { u16 root_scc, endp_scc, lnkctl; @@ -122,7 +122,7 @@ static void pciexp_enable_common_clock(struct device *root, unsigned root_cap, } } -static void pciexp_enable_clock_power_pm(struct device *endp, unsigned endp_cap) +static void pciexp_enable_clock_power_pm(struct device *endp, unsigned int endp_cap) { /* check if per port clk req is supported in device */ u32 endp_ca; @@ -328,8 +328,8 @@ static void pciexp_config_L1_sub_state(struct device *root, struct device *dev) * by checking both root port and endpoint and returning * the highest latency value. */ -static int pciexp_aspm_latency(struct device *root, unsigned root_cap, - struct device *endp, unsigned endp_cap, +static int pciexp_aspm_latency(struct device *root, unsigned int root_cap, + struct device *endp, unsigned int endp_cap, enum aspm_type type) { int root_lat = 0, endp_lat = 0; @@ -364,8 +364,8 @@ static int pciexp_aspm_latency(struct device *root, unsigned root_cap, /* * Enable ASPM on PCIe root port and endpoint. */ -static void pciexp_enable_aspm(struct device *root, unsigned root_cap, - struct device *endp, unsigned endp_cap) +static void pciexp_enable_aspm(struct device *root, unsigned int root_cap, + struct device *endp, unsigned int endp_cap) { const char *aspm_type_str[] = { "None", "L0s", "L1", "L0s and L1" }; enum aspm_type apmc = PCIE_ASPM_NONE; diff --git a/src/device/software_i2c.c b/src/device/software_i2c.c index 5dc99906da..3bb9708bfa 100644 --- a/src/device/software_i2c.c +++ b/src/device/software_i2c.c @@ -38,7 +38,7 @@ struct software_i2c_ops *software_i2c[SOFTWARE_I2C_MAX_BUS]; * Waits until either timeout_us have passed or (iff for_scl is set) until SCL * goes high. Will report random line changes during the wait and return SCL. */ -static int __wait(unsigned bus, int timeout_us, int for_scl) +static int __wait(unsigned int bus, int timeout_us, int for_scl) { int us; int sda = software_i2c[bus]->get_sda(bus); @@ -63,13 +63,13 @@ static int __wait(unsigned bus, int timeout_us, int for_scl) } /* Waits the default DELAY_US to allow line state to stabilize. */ -static void wait(unsigned bus) +static void wait(unsigned int bus) { __wait(bus, DELAY_US, 0); } /* Waits until SCL goes high. Prints a contextual error message on timeout. */ -static int wait_for_scl(unsigned bus, const char *error_context) +static int wait_for_scl(unsigned int bus, const char *error_context) { if (!__wait(bus, TIMEOUT_US, 1)) { printk(BIOS_ERR, "software_i2c(%d): ERROR: Clock stretching " @@ -80,7 +80,7 @@ static int wait_for_scl(unsigned bus, const char *error_context) return 0; } -static int start_cond(unsigned bus) +static int start_cond(unsigned int bus) { spew("software_i2c(%d): Sending start condition... ", bus); @@ -112,7 +112,7 @@ static int start_cond(unsigned bus) return 0; } -static int stop_cond(unsigned bus) +static int stop_cond(unsigned int bus) { spew("software_i2c(%d): Sending stop condition... ", bus); @@ -141,7 +141,7 @@ static int stop_cond(unsigned bus) return 0; } -static int out_bit(unsigned bus, int bit) +static int out_bit(unsigned int bus, int bit) { spew("software_i2c(%d): Sending a %d bit... ", bus, bit); @@ -174,7 +174,7 @@ static int out_bit(unsigned bus, int bit) return 0; } -static int in_bit(unsigned bus) +static int in_bit(unsigned int bus) { int bit; @@ -202,9 +202,9 @@ static int in_bit(unsigned bus) } /* Write a byte to I2C bus. Return 0 if ack by the slave. */ -static int out_byte(unsigned bus, u8 byte) +static int out_byte(unsigned int bus, u8 byte) { - unsigned bit; + unsigned int bit; int nack, ret; for (bit = 0; bit < 8; bit++) @@ -220,7 +220,7 @@ static int out_byte(unsigned bus, u8 byte) return nack > 0 ? ERR_NACK : nack; } -static int in_byte(unsigned bus, int ack) +static int in_byte(unsigned int bus, int ack) { u8 byte = 0; int i, ret; @@ -241,7 +241,7 @@ static int in_byte(unsigned bus, int ack) return byte; } -int software_i2c_transfer(unsigned bus, struct i2c_msg *segments, int count) +int software_i2c_transfer(unsigned int bus, struct i2c_msg *segments, int count) { int i, ret; struct i2c_msg *seg; @@ -269,7 +269,7 @@ int software_i2c_transfer(unsigned bus, struct i2c_msg *segments, int count) return 0; } -void software_i2c_wedge_ack(unsigned bus, u8 chip) +void software_i2c_wedge_ack(unsigned int bus, u8 chip) { int i; @@ -292,7 +292,7 @@ void software_i2c_wedge_ack(unsigned bus, u8 chip) software_i2c[bus]->get_scl(bus)); } -void software_i2c_wedge_read(unsigned bus, u8 chip, u8 reg, int bits) +void software_i2c_wedge_read(unsigned int bus, u8 chip, u8 reg, int bits) { int i; @@ -321,7 +321,7 @@ void software_i2c_wedge_read(unsigned bus, u8 chip, u8 reg, int bits) software_i2c[bus]->get_scl(bus)); } -void software_i2c_wedge_write(unsigned bus, u8 chip, u8 reg, int bits) +void software_i2c_wedge_write(unsigned int bus, u8 chip, u8 reg, int bits) { int i; |