aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bcma/driver_chipcommon.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bcma/driver_chipcommon.c')
-rw-r--r--drivers/bcma/driver_chipcommon.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/bcma/driver_chipcommon.c b/drivers/bcma/driver_chipcommon.c
index 19f679667ca4..b7c8a8d4e6d1 100644
--- a/drivers/bcma/driver_chipcommon.c
+++ b/drivers/bcma/driver_chipcommon.c
@@ -79,7 +79,9 @@ static int bcma_chipco_watchdog_ticks_per_ms(struct bcma_drv_cc *cc)
79 79
80 if (cc->capabilities & BCMA_CC_CAP_PMU) { 80 if (cc->capabilities & BCMA_CC_CAP_PMU) {
81 if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4706) 81 if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4706)
82 /* 4706 CC and PMU watchdogs are clocked at 1/4 of ALP clock */ 82 /* 4706 CC and PMU watchdogs are clocked at 1/4 of ALP
83 * clock
84 */
83 return bcma_chipco_get_alp_clock(cc) / 4000; 85 return bcma_chipco_get_alp_clock(cc) / 4000;
84 else 86 else
85 /* based on 32KHz ILP clock */ 87 /* based on 32KHz ILP clock */
@@ -97,7 +99,8 @@ int bcma_chipco_watchdog_register(struct bcma_drv_cc *cc)
97 wdt.driver_data = cc; 99 wdt.driver_data = cc;
98 wdt.timer_set = bcma_chipco_watchdog_timer_set_wdt; 100 wdt.timer_set = bcma_chipco_watchdog_timer_set_wdt;
99 wdt.timer_set_ms = bcma_chipco_watchdog_timer_set_ms_wdt; 101 wdt.timer_set_ms = bcma_chipco_watchdog_timer_set_ms_wdt;
100 wdt.max_timer_ms = bcma_chipco_watchdog_get_max_timer(cc) / cc->ticks_per_ms; 102 wdt.max_timer_ms =
103 bcma_chipco_watchdog_get_max_timer(cc) / cc->ticks_per_ms;
101 104
102 pdev = platform_device_register_data(NULL, "bcm47xx-wdt", 105 pdev = platform_device_register_data(NULL, "bcm47xx-wdt",
103 cc->core->bus->num, &wdt, 106 cc->core->bus->num, &wdt,
@@ -175,7 +178,6 @@ void bcma_core_chipcommon_init(struct bcma_drv_cc *cc)
175u32 bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, u32 ticks) 178u32 bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, u32 ticks)
176{ 179{
177 u32 maxt; 180 u32 maxt;
178 enum bcma_clkmode clkmode;
179 181
180 maxt = bcma_chipco_watchdog_get_max_timer(cc); 182 maxt = bcma_chipco_watchdog_get_max_timer(cc);
181 if (cc->capabilities & BCMA_CC_CAP_PMU) { 183 if (cc->capabilities & BCMA_CC_CAP_PMU) {
@@ -185,8 +187,13 @@ u32 bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, u32 ticks)
185 ticks = maxt; 187 ticks = maxt;
186 bcma_cc_write32(cc, BCMA_CC_PMU_WATCHDOG, ticks); 188 bcma_cc_write32(cc, BCMA_CC_PMU_WATCHDOG, ticks);
187 } else { 189 } else {
188 clkmode = ticks ? BCMA_CLKMODE_FAST : BCMA_CLKMODE_DYNAMIC; 190 struct bcma_bus *bus = cc->core->bus;
189 bcma_core_set_clockmode(cc->core, clkmode); 191
192 if (bus->chipinfo.id != BCMA_CHIP_ID_BCM4707 &&
193 bus->chipinfo.id != BCMA_CHIP_ID_BCM53018)
194 bcma_core_set_clockmode(cc->core,
195 ticks ? BCMA_CLKMODE_FAST : BCMA_CLKMODE_DYNAMIC);
196
190 if (ticks > maxt) 197 if (ticks > maxt)
191 ticks = maxt; 198 ticks = maxt;
192 /* instant NMI */ 199 /* instant NMI */
@@ -335,7 +342,8 @@ void bcma_chipco_serial_init(struct bcma_drv_cc *cc)
335 | BCMA_CC_CORECTL_UARTCLKEN); 342 | BCMA_CC_CORECTL_UARTCLKEN);
336 } 343 }
337 } else { 344 } else {
338 bcma_err(cc->core->bus, "serial not supported on this device ccrev: 0x%x\n", ccrev); 345 bcma_err(cc->core->bus, "serial not supported on this device ccrev: 0x%x\n",
346 ccrev);
339 return; 347 return;
340 } 348 }
341 349