diff options
-rw-r--r-- | drivers/net/ucc_geth.c | 14 | ||||
-rw-r--r-- | drivers/net/ucc_geth.h | 4 |
2 files changed, 13 insertions, 5 deletions
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 44f8392da117..8287bc19868b 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -270,7 +270,7 @@ static int fill_init_enet_entries(struct ucc_geth_private *ugeth, | |||
270 | u8 num_entries, | 270 | u8 num_entries, |
271 | u32 thread_size, | 271 | u32 thread_size, |
272 | u32 thread_alignment, | 272 | u32 thread_alignment, |
273 | enum qe_risc_allocation risc, | 273 | unsigned int risc, |
274 | int skip_page_for_first_entry) | 274 | int skip_page_for_first_entry) |
275 | { | 275 | { |
276 | u32 init_enet_offset; | 276 | u32 init_enet_offset; |
@@ -307,7 +307,7 @@ static int fill_init_enet_entries(struct ucc_geth_private *ugeth, | |||
307 | static int return_init_enet_entries(struct ucc_geth_private *ugeth, | 307 | static int return_init_enet_entries(struct ucc_geth_private *ugeth, |
308 | u32 *p_start, | 308 | u32 *p_start, |
309 | u8 num_entries, | 309 | u8 num_entries, |
310 | enum qe_risc_allocation risc, | 310 | unsigned int risc, |
311 | int skip_page_for_first_entry) | 311 | int skip_page_for_first_entry) |
312 | { | 312 | { |
313 | u32 init_enet_offset; | 313 | u32 init_enet_offset; |
@@ -342,7 +342,7 @@ static int dump_init_enet_entries(struct ucc_geth_private *ugeth, | |||
342 | u32 __iomem *p_start, | 342 | u32 __iomem *p_start, |
343 | u8 num_entries, | 343 | u8 num_entries, |
344 | u32 thread_size, | 344 | u32 thread_size, |
345 | enum qe_risc_allocation risc, | 345 | unsigned int risc, |
346 | int skip_page_for_first_entry) | 346 | int skip_page_for_first_entry) |
347 | { | 347 | { |
348 | u32 init_enet_offset; | 348 | u32 init_enet_offset; |
@@ -2135,6 +2135,14 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth) | |||
2135 | return -ENOMEM; | 2135 | return -ENOMEM; |
2136 | } | 2136 | } |
2137 | 2137 | ||
2138 | /* read the number of risc engines, update the riscTx and riscRx | ||
2139 | * if there are 4 riscs in QE | ||
2140 | */ | ||
2141 | if (qe_get_num_of_risc() == 4) { | ||
2142 | ug_info->riscTx = QE_RISC_ALLOCATION_FOUR_RISCS; | ||
2143 | ug_info->riscRx = QE_RISC_ALLOCATION_FOUR_RISCS; | ||
2144 | } | ||
2145 | |||
2138 | ugeth->ug_regs = ioremap(uf_info->regs, sizeof(*ugeth->ug_regs)); | 2146 | ugeth->ug_regs = ioremap(uf_info->regs, sizeof(*ugeth->ug_regs)); |
2139 | if (!ugeth->ug_regs) { | 2147 | if (!ugeth->ug_regs) { |
2140 | if (netif_msg_probe(ugeth)) | 2148 | if (netif_msg_probe(ugeth)) |
diff --git a/drivers/net/ucc_geth.h b/drivers/net/ucc_geth.h index 2f8ee7c87efe..46bb1d233597 100644 --- a/drivers/net/ucc_geth.h +++ b/drivers/net/ucc_geth.h | |||
@@ -1120,8 +1120,8 @@ struct ucc_geth_info { | |||
1120 | enum ucc_geth_maccfg2_pad_and_crc_mode padAndCrc; | 1120 | enum ucc_geth_maccfg2_pad_and_crc_mode padAndCrc; |
1121 | enum ucc_geth_num_of_threads numThreadsTx; | 1121 | enum ucc_geth_num_of_threads numThreadsTx; |
1122 | enum ucc_geth_num_of_threads numThreadsRx; | 1122 | enum ucc_geth_num_of_threads numThreadsRx; |
1123 | enum qe_risc_allocation riscTx; | 1123 | unsigned int riscTx; |
1124 | enum qe_risc_allocation riscRx; | 1124 | unsigned int riscRx; |
1125 | }; | 1125 | }; |
1126 | 1126 | ||
1127 | /* structure representing UCC GETH */ | 1127 | /* structure representing UCC GETH */ |