diff options
Diffstat (limited to 'drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c')
-rw-r--r-- | drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c index c1b9ade3a0c..47617844c8e 100644 --- a/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c +++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c | |||
@@ -44,7 +44,7 @@ extern void sdio_function_cleanup(void); | |||
44 | static void IRQHandler(struct sdio_func *func); | 44 | static void IRQHandler(struct sdio_func *func); |
45 | static void IRQHandlerF2(struct sdio_func *func); | 45 | static void IRQHandlerF2(struct sdio_func *func); |
46 | #endif /* !defined(OOB_INTR_ONLY) */ | 46 | #endif /* !defined(OOB_INTR_ONLY) */ |
47 | static int sdioh_sdmmc_get_cisaddr(sdioh_info_t *sd, uint32 regaddr); | 47 | static int sdioh_sdmmc_get_cisaddr(sdioh_info_t *sd, u32 regaddr); |
48 | extern int sdio_reset_comm(struct mmc_card *card); | 48 | extern int sdio_reset_comm(struct mmc_card *card); |
49 | 49 | ||
50 | extern PBCMSDH_SDMMC_INSTANCE gInstance; | 50 | extern PBCMSDH_SDMMC_INSTANCE gInstance; |
@@ -66,13 +66,13 @@ DHD_PM_RESUME_WAIT_INIT(sdioh_request_buffer_wait); | |||
66 | 66 | ||
67 | #define DMA_ALIGN_MASK 0x03 | 67 | #define DMA_ALIGN_MASK 0x03 |
68 | 68 | ||
69 | int sdioh_sdmmc_card_regread(sdioh_info_t *sd, int func, uint32 regaddr, | 69 | int sdioh_sdmmc_card_regread(sdioh_info_t *sd, int func, u32 regaddr, |
70 | int regsize, uint32 *data); | 70 | int regsize, u32 *data); |
71 | 71 | ||
72 | static int sdioh_sdmmc_card_enablefuncs(sdioh_info_t *sd) | 72 | static int sdioh_sdmmc_card_enablefuncs(sdioh_info_t *sd) |
73 | { | 73 | { |
74 | int err_ret; | 74 | int err_ret; |
75 | uint32 fbraddr; | 75 | u32 fbraddr; |
76 | u8 func; | 76 | u8 func; |
77 | 77 | ||
78 | sd_trace(("%s\n", __func__)); | 78 | sd_trace(("%s\n", __func__)); |
@@ -406,7 +406,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name, | |||
406 | int val_size; | 406 | int val_size; |
407 | int32 int_val = 0; | 407 | int32 int_val = 0; |
408 | bool bool_val; | 408 | bool bool_val; |
409 | uint32 actionid; | 409 | u32 actionid; |
410 | 410 | ||
411 | ASSERT(name); | 411 | ASSERT(name); |
412 | ASSERT(len >= 0); | 412 | ASSERT(len >= 0); |
@@ -468,7 +468,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name, | |||
468 | break; | 468 | break; |
469 | 469 | ||
470 | case IOV_GVAL(IOV_BLOCKSIZE): | 470 | case IOV_GVAL(IOV_BLOCKSIZE): |
471 | if ((uint32) int_val > si->num_funcs) { | 471 | if ((u32) int_val > si->num_funcs) { |
472 | bcmerror = BCME_BADARG; | 472 | bcmerror = BCME_BADARG; |
473 | break; | 473 | break; |
474 | } | 474 | } |
@@ -478,7 +478,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name, | |||
478 | 478 | ||
479 | case IOV_SVAL(IOV_BLOCKSIZE): | 479 | case IOV_SVAL(IOV_BLOCKSIZE): |
480 | { | 480 | { |
481 | uint func = ((uint32) int_val >> 16); | 481 | uint func = ((u32) int_val >> 16); |
482 | uint blksize = (u16) int_val; | 482 | uint blksize = (u16) int_val; |
483 | uint maxsize; | 483 | uint maxsize; |
484 | 484 | ||
@@ -542,7 +542,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name, | |||
542 | break; | 542 | break; |
543 | 543 | ||
544 | case IOV_GVAL(IOV_DIVISOR): | 544 | case IOV_GVAL(IOV_DIVISOR): |
545 | int_val = (uint32) sd_divisor; | 545 | int_val = (u32) sd_divisor; |
546 | bcopy(&int_val, arg, val_size); | 546 | bcopy(&int_val, arg, val_size); |
547 | break; | 547 | break; |
548 | 548 | ||
@@ -551,7 +551,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name, | |||
551 | break; | 551 | break; |
552 | 552 | ||
553 | case IOV_GVAL(IOV_POWER): | 553 | case IOV_GVAL(IOV_POWER): |
554 | int_val = (uint32) sd_power; | 554 | int_val = (u32) sd_power; |
555 | bcopy(&int_val, arg, val_size); | 555 | bcopy(&int_val, arg, val_size); |
556 | break; | 556 | break; |
557 | 557 | ||
@@ -560,7 +560,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name, | |||
560 | break; | 560 | break; |
561 | 561 | ||
562 | case IOV_GVAL(IOV_CLOCK): | 562 | case IOV_GVAL(IOV_CLOCK): |
563 | int_val = (uint32) sd_clock; | 563 | int_val = (u32) sd_clock; |
564 | bcopy(&int_val, arg, val_size); | 564 | bcopy(&int_val, arg, val_size); |
565 | break; | 565 | break; |
566 | 566 | ||
@@ -569,7 +569,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name, | |||
569 | break; | 569 | break; |
570 | 570 | ||
571 | case IOV_GVAL(IOV_SDMODE): | 571 | case IOV_GVAL(IOV_SDMODE): |
572 | int_val = (uint32) sd_sdmode; | 572 | int_val = (u32) sd_sdmode; |
573 | bcopy(&int_val, arg, val_size); | 573 | bcopy(&int_val, arg, val_size); |
574 | break; | 574 | break; |
575 | 575 | ||
@@ -578,7 +578,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name, | |||
578 | break; | 578 | break; |
579 | 579 | ||
580 | case IOV_GVAL(IOV_HISPEED): | 580 | case IOV_GVAL(IOV_HISPEED): |
581 | int_val = (uint32) sd_hiok; | 581 | int_val = (u32) sd_hiok; |
582 | bcopy(&int_val, arg, val_size); | 582 | bcopy(&int_val, arg, val_size); |
583 | break; | 583 | break; |
584 | 584 | ||
@@ -703,7 +703,7 @@ SDIOH_API_RC sdioh_enable_hw_oob_intr(sdioh_info_t *sd, bool enable) | |||
703 | #endif /* defined(OOB_INTR_ONLY) && defined(HW_OOB) */ | 703 | #endif /* defined(OOB_INTR_ONLY) && defined(HW_OOB) */ |
704 | 704 | ||
705 | extern SDIOH_API_RC | 705 | extern SDIOH_API_RC |
706 | sdioh_cfg_read(sdioh_info_t *sd, uint fnc_num, uint32 addr, u8 *data) | 706 | sdioh_cfg_read(sdioh_info_t *sd, uint fnc_num, u32 addr, u8 *data) |
707 | { | 707 | { |
708 | SDIOH_API_RC status; | 708 | SDIOH_API_RC status; |
709 | /* No lock needed since sdioh_request_byte does locking */ | 709 | /* No lock needed since sdioh_request_byte does locking */ |
@@ -712,7 +712,7 @@ sdioh_cfg_read(sdioh_info_t *sd, uint fnc_num, uint32 addr, u8 *data) | |||
712 | } | 712 | } |
713 | 713 | ||
714 | extern SDIOH_API_RC | 714 | extern SDIOH_API_RC |
715 | sdioh_cfg_write(sdioh_info_t *sd, uint fnc_num, uint32 addr, u8 *data) | 715 | sdioh_cfg_write(sdioh_info_t *sd, uint fnc_num, u32 addr, u8 *data) |
716 | { | 716 | { |
717 | /* No lock needed since sdioh_request_byte does locking */ | 717 | /* No lock needed since sdioh_request_byte does locking */ |
718 | SDIOH_API_RC status; | 718 | SDIOH_API_RC status; |
@@ -720,11 +720,11 @@ sdioh_cfg_write(sdioh_info_t *sd, uint fnc_num, uint32 addr, u8 *data) | |||
720 | return status; | 720 | return status; |
721 | } | 721 | } |
722 | 722 | ||
723 | static int sdioh_sdmmc_get_cisaddr(sdioh_info_t *sd, uint32 regaddr) | 723 | static int sdioh_sdmmc_get_cisaddr(sdioh_info_t *sd, u32 regaddr) |
724 | { | 724 | { |
725 | /* read 24 bits and return valid 17 bit addr */ | 725 | /* read 24 bits and return valid 17 bit addr */ |
726 | int i; | 726 | int i; |
727 | uint32 scratch, regdata; | 727 | u32 scratch, regdata; |
728 | u8 *ptr = (u8 *)&scratch; | 728 | u8 *ptr = (u8 *)&scratch; |
729 | for (i = 0; i < 3; i++) { | 729 | for (i = 0; i < 3; i++) { |
730 | if ((sdioh_sdmmc_card_regread(sd, 0, regaddr, 1, ®data)) != | 730 | if ((sdioh_sdmmc_card_regread(sd, 0, regaddr, 1, ®data)) != |
@@ -742,11 +742,11 @@ static int sdioh_sdmmc_get_cisaddr(sdioh_info_t *sd, uint32 regaddr) | |||
742 | } | 742 | } |
743 | 743 | ||
744 | extern SDIOH_API_RC | 744 | extern SDIOH_API_RC |
745 | sdioh_cis_read(sdioh_info_t *sd, uint func, u8 *cisd, uint32 length) | 745 | sdioh_cis_read(sdioh_info_t *sd, uint func, u8 *cisd, u32 length) |
746 | { | 746 | { |
747 | uint32 count; | 747 | u32 count; |
748 | int offset; | 748 | int offset; |
749 | uint32 foo; | 749 | u32 foo; |
750 | u8 *cis = cisd; | 750 | u8 *cis = cisd; |
751 | 751 | ||
752 | sd_trace(("%s: Func = %d\n", __func__, func)); | 752 | sd_trace(("%s: Func = %d\n", __func__, func)); |
@@ -876,7 +876,7 @@ sdioh_request_byte(sdioh_info_t *sd, uint rw, uint func, uint regaddr, | |||
876 | 876 | ||
877 | extern SDIOH_API_RC | 877 | extern SDIOH_API_RC |
878 | sdioh_request_word(sdioh_info_t *sd, uint cmd_type, uint rw, uint func, | 878 | sdioh_request_word(sdioh_info_t *sd, uint cmd_type, uint rw, uint func, |
879 | uint addr, uint32 *word, uint nbytes) | 879 | uint addr, u32 *word, uint nbytes) |
880 | { | 880 | { |
881 | int err_ret = SDIOH_API_RC_FAIL; | 881 | int err_ret = SDIOH_API_RC_FAIL; |
882 | 882 | ||
@@ -932,7 +932,7 @@ sdioh_request_packet(sdioh_info_t *sd, uint fix_inc, uint write, uint func, | |||
932 | uint addr, void *pkt) | 932 | uint addr, void *pkt) |
933 | { | 933 | { |
934 | bool fifo = (fix_inc == SDIOH_DATA_FIX); | 934 | bool fifo = (fix_inc == SDIOH_DATA_FIX); |
935 | uint32 SGCount = 0; | 935 | u32 SGCount = 0; |
936 | int err_ret = 0; | 936 | int err_ret = 0; |
937 | 937 | ||
938 | void *pnext; | 938 | void *pnext; |
@@ -963,7 +963,7 @@ sdioh_request_packet(sdioh_info_t *sd, uint fix_inc, uint write, uint func, | |||
963 | * is supposed to give | 963 | * is supposed to give |
964 | * us something we can work with. | 964 | * us something we can work with. |
965 | */ | 965 | */ |
966 | ASSERT(((uint32) (PKTDATA(pkt)) & DMA_ALIGN_MASK) == 0); | 966 | ASSERT(((u32) (PKTDATA(pkt)) & DMA_ALIGN_MASK) == 0); |
967 | 967 | ||
968 | if ((write) && (!fifo)) { | 968 | if ((write) && (!fifo)) { |
969 | err_ret = sdio_memcpy_toio(gInstance->func[func], addr, | 969 | err_ret = sdio_memcpy_toio(gInstance->func[func], addr, |
@@ -1067,7 +1067,7 @@ sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write, | |||
1067 | #else | 1067 | #else |
1068 | PKTFREE(sd->osh, mypkt, write ? TRUE : FALSE); | 1068 | PKTFREE(sd->osh, mypkt, write ? TRUE : FALSE); |
1069 | #endif /* DHD_USE_STATIC_BUF */ | 1069 | #endif /* DHD_USE_STATIC_BUF */ |
1070 | } else if (((uint32) (PKTDATA(pkt)) & DMA_ALIGN_MASK) != 0) { | 1070 | } else if (((u32) (PKTDATA(pkt)) & DMA_ALIGN_MASK) != 0) { |
1071 | /* Case 2: We have a packet, but it is unaligned. */ | 1071 | /* Case 2: We have a packet, but it is unaligned. */ |
1072 | 1072 | ||
1073 | /* In this case, we cannot have a chain. */ | 1073 | /* In this case, we cannot have a chain. */ |
@@ -1156,8 +1156,8 @@ void sdioh_sdmmc_devintr_on(sdioh_info_t *sd) | |||
1156 | 1156 | ||
1157 | /* Read client card reg */ | 1157 | /* Read client card reg */ |
1158 | int | 1158 | int |
1159 | sdioh_sdmmc_card_regread(sdioh_info_t *sd, int func, uint32 regaddr, | 1159 | sdioh_sdmmc_card_regread(sdioh_info_t *sd, int func, u32 regaddr, |
1160 | int regsize, uint32 *data) | 1160 | int regsize, u32 *data) |
1161 | { | 1161 | { |
1162 | 1162 | ||
1163 | if ((func == 0) || (regsize == 1)) { | 1163 | if ((func == 0) || (regsize == 1)) { |
@@ -1222,8 +1222,8 @@ static void IRQHandlerF2(struct sdio_func *func) | |||
1222 | #ifdef NOTUSED | 1222 | #ifdef NOTUSED |
1223 | /* Write client card reg */ | 1223 | /* Write client card reg */ |
1224 | static int | 1224 | static int |
1225 | sdioh_sdmmc_card_regwrite(sdioh_info_t *sd, int func, uint32 regaddr, | 1225 | sdioh_sdmmc_card_regwrite(sdioh_info_t *sd, int func, u32 regaddr, |
1226 | int regsize, uint32 data) | 1226 | int regsize, u32 data) |
1227 | { | 1227 | { |
1228 | 1228 | ||
1229 | if ((func == 0) || (regsize == 1)) { | 1229 | if ((func == 0) || (regsize == 1)) { |