Changeset 4739


Ignore:
Timestamp:
11/02/08 09:46:58 (9 years ago)
Author:
werner
Message:

More cleanup. Separate commit since this moves a lot of code but doesn't
change any functionality.

drivers/ar6000/hif/hif2.c:

  • moved HIF setup/takedown code closer down, where its Linux counterpart is
File:
1 edited

Legend:

Unmodified
Added
Removed
  • developers/werner/wlan-spi/patches-tracking/hif-linux-sdio.patch

    r4738 r4739  
    2626=================================================================== 
    2727--- /dev/null   1970-01-01 00:00:00.000000000 +0000 
    28 +++ ktrack/drivers/ar6000/hif/hif2.c    2008-11-02 07:39:48.000000000 -0200 
     28+++ ktrack/drivers/ar6000/hif/hif2.c    2008-11-02 07:44:12.000000000 -0200 
    2929@@ -0,0 +1,569 @@ 
    3030+/* 
     
    278278+ 
    279279+       return A_OK; 
    280 +} 
    281 + 
    282 + 
    283 +/* ----- Device initialization and shutdown (HIF side) --------------------- */ 
    284 + 
    285 + 
    286 +int HIFInit(HTC_CALLBACKS *callbacks) 
    287 +{ 
    288 +       BUG_ON(!callbacks); 
    289 + 
    290 +       printk(KERN_INFO "HIFInit\n"); 
    291 +       htcCallbacks = *callbacks; 
    292 + 
    293 +       return 0; 
    294 +} 
    295 + 
    296 + 
    297 +A_STATUS HIFConfigureDevice(HIF_DEVICE *hif, 
    298 +    HIF_DEVICE_CONFIG_OPCODE opcode, void *config, A_UINT32 configLen) 
    299 +{ 
    300 +       struct device *dev = HIFGetOSDevice(hif); 
    301 +       HIF_DEVICE_IRQ_PROCESSING_MODE *ipm_cfg = config; 
    302 +       A_UINT32 *mbs_cfg = config; 
    303 +       int i; 
    304 + 
    305 +       dev_dbg(dev, "HIFConfigureDevice\n"); 
    306 + 
    307 +       switch (opcode) { 
    308 +       case HIF_DEVICE_GET_MBOX_BLOCK_SIZE: 
    309 +               for (i = 0; i != MBOXES; i++) 
    310 +                       mbs_cfg[i] = HIF_MBOX_BLOCK_SIZE; 
    311 +               break; 
    312 +       case HIF_DEVICE_GET_MBOX_ADDR: 
    313 +               for (i = 0; i != MBOXES; i++) 
    314 +                       mbs_cfg[i] = HIF_MBOX_START_ADDR(i); 
    315 +               break; 
    316 +       case HIF_DEVICE_GET_IRQ_PROC_MODE: 
    317 +               *ipm_cfg = HIF_DEVICE_IRQ_SYNC_ONLY; 
    318 +//             *ipm_cfg = HIF_DEVICE_IRQ_ASYNC_SYNC; 
    319 +               break; 
    320 +       default: 
    321 +               return A_ERROR; 
    322 +       } 
    323 +       return A_OK; 
    324 +} 
    325 + 
    326 + 
    327 +void HIFShutDownDevice(HIF_DEVICE *hif) 
    328 +{ 
    329 +       struct device *dev = HIFGetOSDevice(hif); 
    330 + 
    331 +       dev_dbg(dev, "HIFShutDownDevice\n"); 
    332280+} 
    333281+ 
     
    459407+ 
    460408+ 
     409+/* ----- Device initialization and shutdown (HIF side) --------------------- */ 
     410+ 
     411+ 
     412+int HIFInit(HTC_CALLBACKS *callbacks) 
     413+{ 
     414+       BUG_ON(!callbacks); 
     415+ 
     416+       printk(KERN_INFO "HIFInit\n"); 
     417+       htcCallbacks = *callbacks; 
     418+ 
     419+       return 0; 
     420+} 
     421+ 
     422+ 
     423+A_STATUS HIFConfigureDevice(HIF_DEVICE *hif, 
     424+    HIF_DEVICE_CONFIG_OPCODE opcode, void *config, A_UINT32 configLen) 
     425+{ 
     426+       struct device *dev = HIFGetOSDevice(hif); 
     427+       HIF_DEVICE_IRQ_PROCESSING_MODE *ipm_cfg = config; 
     428+       A_UINT32 *mbs_cfg = config; 
     429+       int i; 
     430+ 
     431+       dev_dbg(dev, "HIFConfigureDevice\n"); 
     432+ 
     433+       switch (opcode) { 
     434+       case HIF_DEVICE_GET_MBOX_BLOCK_SIZE: 
     435+               for (i = 0; i != MBOXES; i++) 
     436+                       mbs_cfg[i] = HIF_MBOX_BLOCK_SIZE; 
     437+               break; 
     438+       case HIF_DEVICE_GET_MBOX_ADDR: 
     439+               for (i = 0; i != MBOXES; i++) 
     440+                       mbs_cfg[i] = HIF_MBOX_START_ADDR(i); 
     441+               break; 
     442+       case HIF_DEVICE_GET_IRQ_PROC_MODE: 
     443+               *ipm_cfg = HIF_DEVICE_IRQ_SYNC_ONLY; 
     444+//             *ipm_cfg = HIF_DEVICE_IRQ_ASYNC_SYNC; 
     445+               break; 
     446+       default: 
     447+               return A_ERROR; 
     448+       } 
     449+       return A_OK; 
     450+} 
     451+ 
     452+ 
     453+void HIFShutDownDevice(HIF_DEVICE *hif) 
     454+{ 
     455+       struct device *dev = HIFGetOSDevice(hif); 
     456+ 
     457+       dev_dbg(dev, "HIFShutDownDevice\n"); 
     458+} 
     459+ 
     460+ 
    461461+/* ----- Device setup and removal (Linux side) ----------------------------- */ 
    462462+ 
Note: See TracChangeset for help on using the changeset viewer.