summaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx-2.6/files/drivers/ssb/driver_chipcommon.c
diff options
context:
space:
mode:
authornoz <noz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-06-25 19:51:09 +0000
committernoz <noz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-06-25 19:51:09 +0000
commit77c9f26cec5d6c35766b5426af980a52fb1fd822 (patch)
tree2de6e1c70d24aebfdb8ffd71705570a88bcf7bcd /target/linux/brcm47xx-2.6/files/drivers/ssb/driver_chipcommon.c
parent6a140db1329a973e671bc2fa23c61a2cf0374cdc (diff)
Merge SSB driver from tree at bu3sch.de, pulled 24/6
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7732 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx-2.6/files/drivers/ssb/driver_chipcommon.c')
-rw-r--r--target/linux/brcm47xx-2.6/files/drivers/ssb/driver_chipcommon.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/target/linux/brcm47xx-2.6/files/drivers/ssb/driver_chipcommon.c b/target/linux/brcm47xx-2.6/files/drivers/ssb/driver_chipcommon.c
index 8e511c77b..a283de9e3 100644
--- a/target/linux/brcm47xx-2.6/files/drivers/ssb/driver_chipcommon.c
+++ b/target/linux/brcm47xx-2.6/files/drivers/ssb/driver_chipcommon.c
@@ -293,15 +293,15 @@ void ssb_chipco_timing_init(struct ssb_chipcommon *cc,
/* set register for external IO to control LED. */
chipco_write32(cc, SSB_CHIPCO_PROG_CFG, 0x11);
- tmp = ceildiv(10, ns) << SSB_PROG_WCNT_3_SHIFT; /* Waitcount-3 = 10ns */
- tmp |= ceildiv(40, ns) << SSB_PROG_WCNT_1_SHIFT; /* Waitcount-1 = 40ns */
- tmp |= ceildiv(240, ns); /* Waitcount-0 = 240ns */
+ tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT; /* Waitcount-3 = 10ns */
+ tmp |= DIV_ROUND_UP(40, ns) << SSB_PROG_WCNT_1_SHIFT; /* Waitcount-1 = 40ns */
+ tmp |= DIV_ROUND_UP(240, ns); /* Waitcount-0 = 240ns */
chipco_write32(cc, SSB_CHIPCO_PROG_WAITCNT, tmp); /* 0x01020a0c for a 100Mhz clock */
/* Set timing for the flash */
- tmp = ceildiv(10, ns) << SSB_FLASH_WCNT_3_SHIFT; /* Waitcount-3 = 10nS */
- tmp |= ceildiv(10, ns) << SSB_FLASH_WCNT_1_SHIFT; /* Waitcount-1 = 10nS */
- tmp |= ceildiv(120, ns); /* Waitcount-0 = 120nS */
+ tmp = DIV_ROUND_UP(10, ns) << SSB_FLASH_WCNT_3_SHIFT; /* Waitcount-3 = 10nS */
+ tmp |= DIV_ROUND_UP(10, ns) << SSB_FLASH_WCNT_1_SHIFT; /* Waitcount-1 = 10nS */
+ tmp |= DIV_ROUND_UP(120, ns); /* Waitcount-0 = 120nS */
if ((bus->chip_id == 0x5365) ||
(dev->id.revision < 9))
chipco_write32(cc, SSB_CHIPCO_FLASH_WAITCNT, tmp);
@@ -312,10 +312,10 @@ void ssb_chipco_timing_init(struct ssb_chipcommon *cc,
if (bus->chip_id == 0x5350) {
/* Enable EXTIF */
- tmp = ceildiv(10, ns) << SSB_PROG_WCNT_3_SHIFT; /* Waitcount-3 = 10ns */
- tmp |= ceildiv(20, ns) << SSB_PROG_WCNT_2_SHIFT; /* Waitcount-2 = 20ns */
- tmp |= ceildiv(100, ns) << SSB_PROG_WCNT_1_SHIFT; /* Waitcount-1 = 100ns */
- tmp |= ceildiv(120, ns); /* Waitcount-0 = 120ns */
+ tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT; /* Waitcount-3 = 10ns */
+ tmp |= DIV_ROUND_UP(20, ns) << SSB_PROG_WCNT_2_SHIFT; /* Waitcount-2 = 20ns */
+ tmp |= DIV_ROUND_UP(100, ns) << SSB_PROG_WCNT_1_SHIFT; /* Waitcount-1 = 100ns */
+ tmp |= DIV_ROUND_UP(120, ns); /* Waitcount-0 = 120ns */
chipco_write32(cc, SSB_CHIPCO_PROG_WAITCNT, tmp); /* 0x01020a0c for a 100Mhz clock */
}
}