@@ -316,29 +316,31 @@ void bcma_chipco_serial_init(struct bcma_drv_cc *cc)
unsigned int ccrev = cc->core->id.rev;
struct bcma_serial_port *ports = cc->serial_ports;
- if (ccrev >= 11 && ccrev != 15) {
- baud_base = bcma_chipco_get_alp_clock(cc);
- if (ccrev >= 21) {
- /* Turn off UART clock before switching clocksource. */
- bcma_cc_write32(cc, BCMA_CC_CORECTL,
- bcma_cc_read32(cc, BCMA_CC_CORECTL)
- & ~BCMA_CC_CORECTL_UARTCLKEN);
- }
- /* Set the override bit so we don't divide it */
- bcma_cc_write32(cc, BCMA_CC_CORECTL,
- bcma_cc_read32(cc, BCMA_CC_CORECTL)
- | BCMA_CC_CORECTL_UARTCLK0);
- if (ccrev >= 21) {
- /* Re-enable the UART clock. */
- bcma_cc_write32(cc, BCMA_CC_CORECTL,
- bcma_cc_read32(cc, BCMA_CC_CORECTL)
- | BCMA_CC_CORECTL_UARTCLKEN);
- }
- } else {
- bcma_err(cc->core->bus, "serial not supported on this device ccrev: 0x%x\n", ccrev);
+ if (ccrev < 11 || ccrev == 15) {
+ bcma_err(cc->core->bus,
+ "serial not supported on this device ccrev: 0x%x\n",
+ ccrev);
return;
}
+ baud_base = bcma_chipco_get_alp_clock(cc);
+ if (ccrev >= 21) {
+ /* Turn off UART clock before switching clocksource */
+ bcma_cc_write32(cc, BCMA_CC_CORECTL,
+ bcma_cc_read32(cc, BCMA_CC_CORECTL)
+ & ~BCMA_CC_CORECTL_UARTCLKEN);
+ }
+ /* Set the override bit so we don't divide it */
+ bcma_cc_write32(cc, BCMA_CC_CORECTL,
+ bcma_cc_read32(cc, BCMA_CC_CORECTL) |
+ BCMA_CC_CORECTL_UARTCLK0);
+ if (ccrev >= 21) {
+ /* Re-enable the UART clock */
+ bcma_cc_write32(cc, BCMA_CC_CORECTL,
+ bcma_cc_read32(cc, BCMA_CC_CORECTL)
+ | BCMA_CC_CORECTL_UARTCLKEN);
+ }
+
irq = bcma_core_irq(cc->core, 0);
/* Determine the registers of the UARTs */