diff options
Diffstat (limited to 'drivers/atm/ambassador.c')
-rw-r--r-- | drivers/atm/ambassador.c | 53 |
1 files changed, 30 insertions, 23 deletions
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c index ff7bb8a42ed6..77a7480dc4d1 100644 --- a/drivers/atm/ambassador.c +++ b/drivers/atm/ambassador.c | |||
@@ -1507,9 +1507,9 @@ static void do_housekeeping (unsigned long arg) { | |||
1507 | 1507 | ||
1508 | /********** creation of communication queues **********/ | 1508 | /********** creation of communication queues **********/ |
1509 | 1509 | ||
1510 | static int __devinit create_queues (amb_dev * dev, unsigned int cmds, | 1510 | static int create_queues(amb_dev *dev, unsigned int cmds, unsigned int txs, |
1511 | unsigned int txs, unsigned int * rxs, | 1511 | unsigned int *rxs, unsigned int *rx_buffer_sizes) |
1512 | unsigned int * rx_buffer_sizes) { | 1512 | { |
1513 | unsigned char pool; | 1513 | unsigned char pool; |
1514 | size_t total = 0; | 1514 | size_t total = 0; |
1515 | void * memory; | 1515 | void * memory; |
@@ -1737,8 +1737,9 @@ static int decode_loader_result (loader_command cmd, u32 result) | |||
1737 | return res; | 1737 | return res; |
1738 | } | 1738 | } |
1739 | 1739 | ||
1740 | static int __devinit do_loader_command (volatile loader_block * lb, | 1740 | static int do_loader_command(volatile loader_block *lb, const amb_dev *dev, |
1741 | const amb_dev * dev, loader_command cmd) { | 1741 | loader_command cmd) |
1742 | { | ||
1742 | 1743 | ||
1743 | unsigned long timeout; | 1744 | unsigned long timeout; |
1744 | 1745 | ||
@@ -1793,8 +1794,9 @@ static int __devinit do_loader_command (volatile loader_block * lb, | |||
1793 | 1794 | ||
1794 | /* loader: determine loader version */ | 1795 | /* loader: determine loader version */ |
1795 | 1796 | ||
1796 | static int __devinit get_loader_version (loader_block * lb, | 1797 | static int get_loader_version(loader_block *lb, const amb_dev *dev, |
1797 | const amb_dev * dev, u32 * version) { | 1798 | u32 *version) |
1799 | { | ||
1798 | int res; | 1800 | int res; |
1799 | 1801 | ||
1800 | PRINTD (DBG_FLOW|DBG_LOAD, "get_loader_version"); | 1802 | PRINTD (DBG_FLOW|DBG_LOAD, "get_loader_version"); |
@@ -1809,9 +1811,9 @@ static int __devinit get_loader_version (loader_block * lb, | |||
1809 | 1811 | ||
1810 | /* loader: write memory data blocks */ | 1812 | /* loader: write memory data blocks */ |
1811 | 1813 | ||
1812 | static int __devinit loader_write (loader_block* lb, | 1814 | static int loader_write(loader_block *lb, const amb_dev *dev, |
1813 | const amb_dev *dev, | 1815 | const struct ihex_binrec *rec) |
1814 | const struct ihex_binrec *rec) { | 1816 | { |
1815 | transfer_block * tb = &lb->payload.transfer; | 1817 | transfer_block * tb = &lb->payload.transfer; |
1816 | 1818 | ||
1817 | PRINTD (DBG_FLOW|DBG_LOAD, "loader_write"); | 1819 | PRINTD (DBG_FLOW|DBG_LOAD, "loader_write"); |
@@ -1824,9 +1826,9 @@ static int __devinit loader_write (loader_block* lb, | |||
1824 | 1826 | ||
1825 | /* loader: verify memory data blocks */ | 1827 | /* loader: verify memory data blocks */ |
1826 | 1828 | ||
1827 | static int __devinit loader_verify (loader_block * lb, | 1829 | static int loader_verify(loader_block *lb, const amb_dev *dev, |
1828 | const amb_dev *dev, | 1830 | const struct ihex_binrec *rec) |
1829 | const struct ihex_binrec *rec) { | 1831 | { |
1830 | transfer_block * tb = &lb->payload.transfer; | 1832 | transfer_block * tb = &lb->payload.transfer; |
1831 | int res; | 1833 | int res; |
1832 | 1834 | ||
@@ -1842,8 +1844,8 @@ static int __devinit loader_verify (loader_block * lb, | |||
1842 | 1844 | ||
1843 | /* loader: start microcode */ | 1845 | /* loader: start microcode */ |
1844 | 1846 | ||
1845 | static int __devinit loader_start (loader_block * lb, | 1847 | static int loader_start(loader_block *lb, const amb_dev *dev, u32 address) |
1846 | const amb_dev * dev, u32 address) { | 1848 | { |
1847 | PRINTD (DBG_FLOW|DBG_LOAD, "loader_start"); | 1849 | PRINTD (DBG_FLOW|DBG_LOAD, "loader_start"); |
1848 | 1850 | ||
1849 | lb->payload.start = cpu_to_be32 (address); | 1851 | lb->payload.start = cpu_to_be32 (address); |
@@ -1918,7 +1920,8 @@ static int amb_reset (amb_dev * dev, int diags) { | |||
1918 | 1920 | ||
1919 | /********** transfer and start the microcode **********/ | 1921 | /********** transfer and start the microcode **********/ |
1920 | 1922 | ||
1921 | static int __devinit ucode_init (loader_block * lb, amb_dev * dev) { | 1923 | static int ucode_init(loader_block *lb, amb_dev *dev) |
1924 | { | ||
1922 | const struct firmware *fw; | 1925 | const struct firmware *fw; |
1923 | unsigned long start_address; | 1926 | unsigned long start_address; |
1924 | const struct ihex_binrec *rec; | 1927 | const struct ihex_binrec *rec; |
@@ -1980,7 +1983,8 @@ static inline __be32 bus_addr(void * addr) { | |||
1980 | return cpu_to_be32 (virt_to_bus (addr)); | 1983 | return cpu_to_be32 (virt_to_bus (addr)); |
1981 | } | 1984 | } |
1982 | 1985 | ||
1983 | static int __devinit amb_talk (amb_dev * dev) { | 1986 | static int amb_talk(amb_dev *dev) |
1987 | { | ||
1984 | adap_talk_block a; | 1988 | adap_talk_block a; |
1985 | unsigned char pool; | 1989 | unsigned char pool; |
1986 | unsigned long timeout; | 1990 | unsigned long timeout; |
@@ -2027,7 +2031,8 @@ static int __devinit amb_talk (amb_dev * dev) { | |||
2027 | } | 2031 | } |
2028 | 2032 | ||
2029 | // get microcode version | 2033 | // get microcode version |
2030 | static void __devinit amb_ucode_version (amb_dev * dev) { | 2034 | static void amb_ucode_version(amb_dev *dev) |
2035 | { | ||
2031 | u32 major; | 2036 | u32 major; |
2032 | u32 minor; | 2037 | u32 minor; |
2033 | command cmd; | 2038 | command cmd; |
@@ -2042,7 +2047,8 @@ static void __devinit amb_ucode_version (amb_dev * dev) { | |||
2042 | } | 2047 | } |
2043 | 2048 | ||
2044 | // get end station address | 2049 | // get end station address |
2045 | static void __devinit amb_esi (amb_dev * dev, u8 * esi) { | 2050 | static void amb_esi(amb_dev *dev, u8 *esi) |
2051 | { | ||
2046 | u32 lower4; | 2052 | u32 lower4; |
2047 | u16 upper2; | 2053 | u16 upper2; |
2048 | command cmd; | 2054 | command cmd; |
@@ -2088,7 +2094,7 @@ static void fixup_plx_window (amb_dev *dev, loader_block *lb) | |||
2088 | return; | 2094 | return; |
2089 | } | 2095 | } |
2090 | 2096 | ||
2091 | static int __devinit amb_init (amb_dev * dev) | 2097 | static int amb_init(amb_dev *dev) |
2092 | { | 2098 | { |
2093 | loader_block lb; | 2099 | loader_block lb; |
2094 | 2100 | ||
@@ -2184,7 +2190,8 @@ static void setup_pci_dev(struct pci_dev *pci_dev) | |||
2184 | } | 2190 | } |
2185 | } | 2191 | } |
2186 | 2192 | ||
2187 | static int __devinit amb_probe(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) | 2193 | static int amb_probe(struct pci_dev *pci_dev, |
2194 | const struct pci_device_id *pci_ent) | ||
2188 | { | 2195 | { |
2189 | amb_dev * dev; | 2196 | amb_dev * dev; |
2190 | int err; | 2197 | int err; |
@@ -2285,7 +2292,7 @@ out_disable: | |||
2285 | } | 2292 | } |
2286 | 2293 | ||
2287 | 2294 | ||
2288 | static void __devexit amb_remove_one(struct pci_dev *pci_dev) | 2295 | static void amb_remove_one(struct pci_dev *pci_dev) |
2289 | { | 2296 | { |
2290 | struct amb_dev *dev; | 2297 | struct amb_dev *dev; |
2291 | 2298 | ||
@@ -2379,7 +2386,7 @@ MODULE_DEVICE_TABLE(pci, amb_pci_tbl); | |||
2379 | static struct pci_driver amb_driver = { | 2386 | static struct pci_driver amb_driver = { |
2380 | .name = "amb", | 2387 | .name = "amb", |
2381 | .probe = amb_probe, | 2388 | .probe = amb_probe, |
2382 | .remove = __devexit_p(amb_remove_one), | 2389 | .remove = amb_remove_one, |
2383 | .id_table = amb_pci_tbl, | 2390 | .id_table = amb_pci_tbl, |
2384 | }; | 2391 | }; |
2385 | 2392 | ||