brcmfmac: rename chip and core related structures
authorArend van Spriel <arend@broadcom.com>
Mon, 13 Jan 2014 21:20:27 +0000 (22:20 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 16 Jan 2014 19:55:40 +0000 (14:55 -0500)
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.c
drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.h

index b9d5f735a71b917e17ac34ebd9fe844bfb32b422..ef24a1bd24a73864bdf8f4c68ad4c9784582a2cd 100644 (file)
@@ -369,7 +369,7 @@ struct brcmf_sdio_hdrinfo {
 /* Private data for SDIO bus interaction */
 struct brcmf_sdio {
        struct brcmf_sdio_dev *sdiodev; /* sdio device handler */
-       struct chip_info *ci;   /* Chip info struct */
+       struct brcmf_chip *ci;  /* Chip info struct */
 
        u32 ramsize;            /* Size of RAM in SOCRAM (bytes) */
 
index d1de037994cb139ab0581c25d2a368a9be7df219..82bf3c5d3cdcd928ebd2950af86369a198a2799a 100644 (file)
@@ -118,7 +118,7 @@ static const struct sdiod_drive_str sdiod_drvstr_tab2_3v3[] = {
 };
 
 u8
-brcmf_sdio_chip_getinfidx(struct chip_info *ci, u16 coreid)
+brcmf_sdio_chip_getinfidx(struct brcmf_chip *ci, u16 coreid)
 {
        u8 idx;
 
@@ -131,7 +131,7 @@ brcmf_sdio_chip_getinfidx(struct chip_info *ci, u16 coreid)
 
 static u32
 brcmf_sdio_sb_corerev(struct brcmf_sdio_dev *sdiodev,
-                     struct chip_info *ci, u16 coreid)
+                     struct brcmf_chip *ci, u16 coreid)
 {
        u32 regdata;
        u8 idx;
@@ -146,7 +146,7 @@ brcmf_sdio_sb_corerev(struct brcmf_sdio_dev *sdiodev,
 
 static u32
 brcmf_sdio_ai_corerev(struct brcmf_sdio_dev *sdiodev,
-                     struct chip_info *ci, u16 coreid)
+                     struct brcmf_chip *ci, u16 coreid)
 {
        u8 idx;
 
@@ -157,7 +157,7 @@ brcmf_sdio_ai_corerev(struct brcmf_sdio_dev *sdiodev,
 
 static bool
 brcmf_sdio_sb_iscoreup(struct brcmf_sdio_dev *sdiodev,
-                      struct chip_info *ci, u16 coreid)
+                      struct brcmf_chip *ci, u16 coreid)
 {
        u32 regdata;
        u8 idx;
@@ -176,7 +176,7 @@ brcmf_sdio_sb_iscoreup(struct brcmf_sdio_dev *sdiodev,
 
 static bool
 brcmf_sdio_ai_iscoreup(struct brcmf_sdio_dev *sdiodev,
-                      struct chip_info *ci, u16 coreid)
+                      struct brcmf_chip *ci, u16 coreid)
 {
        u32 regdata;
        u8 idx;
@@ -200,7 +200,7 @@ brcmf_sdio_ai_iscoreup(struct brcmf_sdio_dev *sdiodev,
 
 static void
 brcmf_sdio_sb_coredisable(struct brcmf_sdio_dev *sdiodev,
-                         struct chip_info *ci, u16 coreid, u32 pre_resetbits,
+                         struct brcmf_chip *ci, u16 coreid, u32 pre_resetbits,
                          u32 in_resetbits)
 {
        u32 regdata, base;
@@ -287,7 +287,7 @@ brcmf_sdio_sb_coredisable(struct brcmf_sdio_dev *sdiodev,
 
 static void
 brcmf_sdio_ai_coredisable(struct brcmf_sdio_dev *sdiodev,
-                         struct chip_info *ci, u16 coreid, u32 pre_resetbits,
+                         struct brcmf_chip *ci, u16 coreid, u32 pre_resetbits,
                          u32 in_resetbits)
 {
        u8 idx;
@@ -327,7 +327,7 @@ brcmf_sdio_ai_coredisable(struct brcmf_sdio_dev *sdiodev,
 
 static void
 brcmf_sdio_sb_resetcore(struct brcmf_sdio_dev *sdiodev,
-                       struct chip_info *ci, u16 coreid,  u32 pre_resetbits,
+                       struct brcmf_chip *ci, u16 coreid,  u32 pre_resetbits,
                        u32 in_resetbits, u32 post_resetbits)
 {
        u32 regdata;
@@ -395,7 +395,7 @@ brcmf_sdio_sb_resetcore(struct brcmf_sdio_dev *sdiodev,
 
 static void
 brcmf_sdio_ai_resetcore(struct brcmf_sdio_dev *sdiodev,
-                       struct chip_info *ci, u16 coreid, u32 pre_resetbits,
+                       struct brcmf_chip *ci, u16 coreid, u32 pre_resetbits,
                        u32 in_resetbits, u32 post_resetbits)
 {
        u8 idx;
@@ -425,7 +425,7 @@ brcmf_sdio_ai_resetcore(struct brcmf_sdio_dev *sdiodev,
 
 #ifdef DEBUG
 /* safety check for chipinfo */
-static int brcmf_sdio_chip_cichk(struct chip_info *ci)
+static int brcmf_sdio_chip_cichk(struct brcmf_chip *ci)
 {
        u8 core_idx;
 
@@ -452,14 +452,14 @@ static int brcmf_sdio_chip_cichk(struct chip_info *ci)
        return 0;
 }
 #else  /* DEBUG */
-static inline int brcmf_sdio_chip_cichk(struct chip_info *ci)
+static inline int brcmf_sdio_chip_cichk(struct brcmf_chip *ci)
 {
        return 0;
 }
 #endif
 
 static int brcmf_sdio_chip_recognition(struct brcmf_sdio_dev *sdiodev,
-                                      struct chip_info *ci)
+                                      struct brcmf_chip *ci)
 {
        u32 regdata;
        u32 socitype;
@@ -708,7 +708,7 @@ brcmf_sdio_chip_buscoreprep(struct brcmf_sdio_dev *sdiodev)
 
 static void
 brcmf_sdio_chip_buscoresetup(struct brcmf_sdio_dev *sdiodev,
-                            struct chip_info *ci)
+                            struct brcmf_chip *ci)
 {
        u32 base = ci->c_inf[0].base;
 
@@ -743,15 +743,14 @@ brcmf_sdio_chip_buscoresetup(struct brcmf_sdio_dev *sdiodev,
 }
 
 int brcmf_sdio_chip_attach(struct brcmf_sdio_dev *sdiodev,
-                          struct chip_info **ci_ptr)
+                          struct brcmf_chip **ci_ptr)
 {
        int ret;
-       struct chip_info *ci;
+       struct brcmf_chip *ci;
 
        brcmf_dbg(TRACE, "Enter\n");
 
-       /* alloc chip_info_t */
-       ci = kzalloc(sizeof(struct chip_info), GFP_ATOMIC);
+       ci = kzalloc(sizeof(*ci), GFP_ATOMIC);
        if (!ci)
                return -ENOMEM;
 
@@ -779,7 +778,7 @@ err:
 }
 
 void
-brcmf_sdio_chip_detach(struct chip_info **ci_ptr)
+brcmf_sdio_chip_detach(struct brcmf_chip **ci_ptr)
 {
        brcmf_dbg(TRACE, "Enter\n");
 
@@ -798,7 +797,7 @@ static char *brcmf_sdio_chip_name(uint chipid, char *buf, uint len)
 
 void
 brcmf_sdio_chip_drivestrengthinit(struct brcmf_sdio_dev *sdiodev,
-                                 struct chip_info *ci, u32 drivestrength)
+                                 struct brcmf_chip *ci, u32 drivestrength)
 {
        const struct sdiod_drive_str *str_tab = NULL;
        u32 str_mask;
@@ -870,7 +869,7 @@ brcmf_sdio_chip_drivestrengthinit(struct brcmf_sdio_dev *sdiodev,
 
 static void
 brcmf_sdio_chip_cm3_enterdl(struct brcmf_sdio_dev *sdiodev,
-                           struct chip_info *ci)
+                           struct brcmf_chip *ci)
 {
        ci->coredisable(sdiodev, ci, BCMA_CORE_ARM_CM3, 0, 0);
        ci->resetcore(sdiodev, ci, BCMA_CORE_80211,
@@ -879,8 +878,8 @@ brcmf_sdio_chip_cm3_enterdl(struct brcmf_sdio_dev *sdiodev,
        ci->resetcore(sdiodev, ci, BCMA_CORE_INTERNAL_MEM, 0, 0, 0);
 }
 
-static bool
-brcmf_sdio_chip_cm3_exitdl(struct brcmf_sdio_dev *sdiodev, struct chip_info *ci)
+static bool brcmf_sdio_chip_cm3_exitdl(struct brcmf_sdio_dev *sdiodev,
+                                      struct brcmf_chip *ci)
 {
        u8 core_idx;
        u32 reg_addr;
@@ -903,7 +902,7 @@ brcmf_sdio_chip_cm3_exitdl(struct brcmf_sdio_dev *sdiodev, struct chip_info *ci)
 
 static inline void
 brcmf_sdio_chip_cr4_enterdl(struct brcmf_sdio_dev *sdiodev,
-                           struct chip_info *ci)
+                           struct brcmf_chip *ci)
 {
        u8 idx;
        u32 regdata;
@@ -923,9 +922,8 @@ brcmf_sdio_chip_cr4_enterdl(struct brcmf_sdio_dev *sdiodev,
                      D11_BCMA_IOCTL_PHYCLOCKEN, D11_BCMA_IOCTL_PHYCLOCKEN);
 }
 
-static bool
-brcmf_sdio_chip_cr4_exitdl(struct brcmf_sdio_dev *sdiodev, struct chip_info *ci,
-                          u32 rstvec)
+static bool brcmf_sdio_chip_cr4_exitdl(struct brcmf_sdio_dev *sdiodev,
+                                      struct brcmf_chip *ci, u32 rstvec)
 {
        u8 core_idx;
        u32 reg_addr;
@@ -948,7 +946,7 @@ brcmf_sdio_chip_cr4_exitdl(struct brcmf_sdio_dev *sdiodev, struct chip_info *ci,
 }
 
 void brcmf_sdio_chip_enter_download(struct brcmf_sdio_dev *sdiodev,
-                                   struct chip_info *ci)
+                                   struct brcmf_chip *ci)
 {
        u8 arm_core_idx;
 
@@ -962,7 +960,7 @@ void brcmf_sdio_chip_enter_download(struct brcmf_sdio_dev *sdiodev,
 }
 
 bool brcmf_sdio_chip_exit_download(struct brcmf_sdio_dev *sdiodev,
-                                  struct chip_info *ci, u32 rstvec)
+                                  struct brcmf_chip *ci, u32 rstvec)
 {
        u8 arm_core_idx;
 
index a1aadf419536348a3547c4e9c8e1d4f51ee87a52..fb0614329ede718cea7df2082a80969e9456f3b7 100644 (file)
@@ -54,7 +54,7 @@
 
 #define BRCMF_MAX_CORENUM      6
 
-struct chip_core_info {
+struct brcmf_core {
        u16 id;
        u16 rev;
        u32 base;
@@ -63,27 +63,27 @@ struct chip_core_info {
        u32 cib;
 };
 
-struct chip_info {
+struct brcmf_chip {
        u32 chip;
        u32 chiprev;
        /* core info */
        /* always put chipcommon core at 0, bus core at 1 */
-       struct chip_core_info c_inf[BRCMF_MAX_CORENUM];
+       struct brcmf_core c_inf[BRCMF_MAX_CORENUM];
        u32 pmurev;
        u32 pmucaps;
        u32 ramsize;
        u32 rambase;
        u32 rst_vec;    /* reset vertor for ARM CR4 core */
 
-       bool (*iscoreup)(struct brcmf_sdio_dev *sdiodev, struct chip_info *ci,
+       bool (*iscoreup)(struct brcmf_sdio_dev *sdiodev, struct brcmf_chip *ci,
                         u16 coreid);
-       u32 (*corerev)(struct brcmf_sdio_dev *sdiodev, struct chip_info *ci,
+       u32 (*corerev)(struct brcmf_sdio_dev *sdiodev, struct brcmf_chip *ci,
                         u16 coreid);
        void (*coredisable)(struct brcmf_sdio_dev *sdiodev,
-                       struct chip_info *ci, u16 coreid, u32 pre_resetbits,
+                       struct brcmf_chip *ci, u16 coreid, u32 pre_resetbits,
                        u32 in_resetbits);
        void (*resetcore)(struct brcmf_sdio_dev *sdiodev,
-                       struct chip_info *ci, u16 coreid, u32 pre_resetbits,
+                       struct brcmf_chip *ci, u16 coreid, u32 pre_resetbits,
                        u32 in_resetbits, u32 post_resetbits);
 };
 
@@ -217,14 +217,15 @@ struct sdpcmd_regs {
 };
 
 int brcmf_sdio_chip_attach(struct brcmf_sdio_dev *sdiodev,
-                          struct chip_info **ci_ptr);
-void brcmf_sdio_chip_detach(struct chip_info **ci_ptr);
+                          struct brcmf_chip **ci_ptr);
+void brcmf_sdio_chip_detach(struct brcmf_chip **ci_ptr);
 void brcmf_sdio_chip_drivestrengthinit(struct brcmf_sdio_dev *sdiodev,
-                                      struct chip_info *ci, u32 drivestrength);
-u8 brcmf_sdio_chip_getinfidx(struct chip_info *ci, u16 coreid);
+                                      struct brcmf_chip *ci,
+                                      u32 drivestrength);
+u8 brcmf_sdio_chip_getinfidx(struct brcmf_chip *ci, u16 coreid);
 void brcmf_sdio_chip_enter_download(struct brcmf_sdio_dev *sdiodev,
-                                   struct chip_info *ci);
+                                   struct brcmf_chip *ci);
 bool brcmf_sdio_chip_exit_download(struct brcmf_sdio_dev *sdiodev,
-                                  struct chip_info *ci, u32 rstvec);
+                                  struct brcmf_chip *ci, u32 rstvec);
 
 #endif         /* _BRCMFMAC_SDIO_CHIP_H_ */