diff options
author | Alan Cox <alan@linux.intel.com> | 2009-08-27 06:01:13 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 15:02:28 -0400 |
commit | df482a0916a0ad7473687745e363475e8ce9cd5a (patch) | |
tree | 687002ed1cfe53bd878d0e2b077a4d09ba309109 /drivers | |
parent | 13071fded6df0979d50307a463be819377fc2822 (diff) |
Staging: et131x: sort out the mmc enable routine
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/et131x/et1310_address_map.h | 34 | ||||
-rw-r--r-- | drivers/staging/et131x/et1310_jagcore.c | 14 |
2 files changed, 10 insertions, 38 deletions
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index 388ac40bfead..3f87d3fef780 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h | |||
@@ -2267,30 +2267,14 @@ typedef struct _MAC_STAT_t { /* Location: */ | |||
2267 | * structure for Main Memory Controller Control reg in mmc address map. | 2267 | * structure for Main Memory Controller Control reg in mmc address map. |
2268 | * located at address 0x7000 | 2268 | * located at address 0x7000 |
2269 | */ | 2269 | */ |
2270 | typedef union _MMC_CTRL_t { | 2270 | |
2271 | u32 value; | 2271 | #define ET_MMC_ENABLE 1 |
2272 | struct { | 2272 | #define ET_MMC_ARB_DISABLE 2 |
2273 | #ifdef _BIT_FIELDS_HTOL | 2273 | #define ET_MMC_RXMAC_DISABLE 4 |
2274 | u32 reserved:25; /* bits 7-31 */ | 2274 | #define ET_MMC_TXMAC_DISABLE 8 |
2275 | u32 force_ce:1; /* bit 6 */ | 2275 | #define ET_MMC_TXDMA_DISABLE 16 |
2276 | u32 rxdma_disable:1; /* bit 5 */ | 2276 | #define ET_MMC_RXDMA_DISABLE 32 |
2277 | u32 txdma_disable:1; /* bit 4 */ | 2277 | #define ET_MMC_FORCE_CE 64 |
2278 | u32 txmac_disable:1; /* bit 3 */ | ||
2279 | u32 rxmac_disable:1; /* bit 2 */ | ||
2280 | u32 arb_disable:1; /* bit 1 */ | ||
2281 | u32 mmc_enable:1; /* bit 0 */ | ||
2282 | #else | ||
2283 | u32 mmc_enable:1; /* bit 0 */ | ||
2284 | u32 arb_disable:1; /* bit 1 */ | ||
2285 | u32 rxmac_disable:1; /* bit 2 */ | ||
2286 | u32 txmac_disable:1; /* bit 3 */ | ||
2287 | u32 txdma_disable:1; /* bit 4 */ | ||
2288 | u32 rxdma_disable:1; /* bit 5 */ | ||
2289 | u32 force_ce:1; /* bit 6 */ | ||
2290 | u32 reserved:25; /* bits 7-31 */ | ||
2291 | #endif | ||
2292 | } bits; | ||
2293 | } MMC_CTRL_t, *PMMC_CTRL_t; | ||
2294 | 2278 | ||
2295 | /* | 2279 | /* |
2296 | * structure for Main Memory Controller Host Memory Access Address reg in mmc | 2280 | * structure for Main Memory Controller Host Memory Access Address reg in mmc |
@@ -2329,7 +2313,7 @@ typedef union _MMC_SRAM_ACCESS_t { | |||
2329 | * Memory Control Module of JAGCore Address Mapping | 2313 | * Memory Control Module of JAGCore Address Mapping |
2330 | */ | 2314 | */ |
2331 | typedef struct _MMC_t { /* Location: */ | 2315 | typedef struct _MMC_t { /* Location: */ |
2332 | MMC_CTRL_t mmc_ctrl; /* 0x7000 */ | 2316 | u32 mmc_ctrl; /* 0x7000 */ |
2333 | MMC_SRAM_ACCESS_t sram_access; /* 0x7004 */ | 2317 | MMC_SRAM_ACCESS_t sram_access; /* 0x7004 */ |
2334 | u32 sram_word1; /* 0x7008 */ | 2318 | u32 sram_word1; /* 0x7008 */ |
2335 | u32 sram_word2; /* 0x700C */ | 2319 | u32 sram_word2; /* 0x700C */ |
diff --git a/drivers/staging/et131x/et1310_jagcore.c b/drivers/staging/et131x/et1310_jagcore.c index 5c847ada17ed..2767e4df0e62 100644 --- a/drivers/staging/et131x/et1310_jagcore.c +++ b/drivers/staging/et131x/et1310_jagcore.c | |||
@@ -175,21 +175,9 @@ void ConfigGlobalRegs(struct et131x_adapter *etdev) | |||
175 | */ | 175 | */ |
176 | void ConfigMMCRegs(struct et131x_adapter *etdev) | 176 | void ConfigMMCRegs(struct et131x_adapter *etdev) |
177 | { | 177 | { |
178 | MMC_CTRL_t mmc_ctrl = { 0 }; | ||
179 | |||
180 | DBG_ENTER(et131x_dbginfo); | 178 | DBG_ENTER(et131x_dbginfo); |
181 | |||
182 | /* All we need to do is initialize the Memory Control Register */ | 179 | /* All we need to do is initialize the Memory Control Register */ |
183 | mmc_ctrl.bits.force_ce = 0x0; | 180 | writel(ET_MMC_ENABLE, &etdev->regs->mmc.mmc_ctrl); |
184 | mmc_ctrl.bits.rxdma_disable = 0x0; | ||
185 | mmc_ctrl.bits.txdma_disable = 0x0; | ||
186 | mmc_ctrl.bits.txmac_disable = 0x0; | ||
187 | mmc_ctrl.bits.rxmac_disable = 0x0; | ||
188 | mmc_ctrl.bits.arb_disable = 0x0; | ||
189 | mmc_ctrl.bits.mmc_enable = 0x1; | ||
190 | |||
191 | writel(mmc_ctrl.value, &etdev->regs->mmc.mmc_ctrl.value); | ||
192 | |||
193 | DBG_LEAVE(et131x_dbginfo); | 181 | DBG_LEAVE(et131x_dbginfo); |
194 | } | 182 | } |
195 | 183 | ||