Changeset 17826
- Timestamp:
- 10/30/11 20:38:38 (19 months ago)
- Location:
- src/linux/laguna/linux-3.1
- Files:
-
- 7 edited
-
.config_laguna (modified) (3 diffs)
-
arch/arm/mach-cns3xxx/devices.c (modified) (2 diffs)
-
drivers/mmc/core/core.c (modified) (1 diff)
-
drivers/mmc/core/mmc.c (modified) (3 diffs)
-
drivers/mmc/host/sdhci-cns3xxx.c (modified) (3 diffs)
-
drivers/mmc/host/sdhci.c (modified) (2 diffs)
-
drivers/pci/pci.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/linux/laguna/linux-3.1/.config_laguna
r17814 r17826 1092 1092 # CONFIG_CICADA_PHY is not set 1093 1093 # CONFIG_VITESSE_PHY is not set 1094 # CONFIG_SMSC_PHY is not set 1094 CONFIG_SMSC_PHY=m 1095 1095 # CONFIG_BROADCOM_PHY is not set 1096 1096 # CONFIG_ICPLUS_PHY is not set … … 1108 1108 # CONFIG_MDIO_BITBANG is not set 1109 1109 # CONFIG_RTL8366_SMI is not set 1110 # CONFIG_NET_ETHERNET is not set 1110 CONFIG_NET_ETHERNET=y 1111 # CONFIG_AX88796 is not set 1112 # CONFIG_HAPPYMEAL is not set 1113 # CONFIG_SUNGEM is not set 1114 # CONFIG_CASSINI is not set 1115 # CONFIG_NET_VENDOR_3COM is not set 1116 # CONFIG_SMC91X is not set 1117 # CONFIG_DM9000 is not set 1118 # CONFIG_ENC28J60 is not set 1119 # CONFIG_ETHOC is not set 1120 # CONFIG_SMC911X is not set 1121 # CONFIG_SMSC911X is not set 1122 # CONFIG_DNET is not set 1123 CONFIG_NET_TULIP=y 1124 CONFIG_DE2104X=m 1125 CONFIG_DE2104X_DSL=0 1126 CONFIG_TULIP=m 1127 # CONFIG_TULIP_MWI is not set 1128 # CONFIG_TULIP_MMIO is not set 1129 # CONFIG_TULIP_NAPI is not set 1130 CONFIG_DE4X5=m 1131 CONFIG_WINBOND_840=m 1132 CONFIG_DM9102=m 1133 CONFIG_ULI526X=m 1134 CONFIG_HP100=m 1135 # CONFIG_IBM_NEW_EMAC_ZMII is not set 1136 # CONFIG_IBM_NEW_EMAC_RGMII is not set 1137 # CONFIG_IBM_NEW_EMAC_TAH is not set 1138 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set 1139 # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set 1140 # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 1141 # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 1142 CONFIG_NET_PCI=y 1143 CONFIG_PCNET32=m 1144 CONFIG_AMD8111_ETH=m 1145 CONFIG_ADAPTEC_STARFIRE=m 1146 CONFIG_KSZ884X_PCI=m 1147 # CONFIG_B44 is not set 1148 CONFIG_FORCEDETH=m 1149 CONFIG_E100=m 1150 CONFIG_FEALNX=m 1151 CONFIG_NATSEMI=m 1152 CONFIG_NE2K_PCI=m 1153 CONFIG_8139CP=m 1154 CONFIG_8139TOO=m 1155 # CONFIG_8139TOO_PIO is not set 1156 # CONFIG_8139TOO_TUNE_TWISTER is not set 1157 # CONFIG_8139TOO_8129 is not set 1158 # CONFIG_8139_OLD_RX_RESET is not set 1159 CONFIG_R6040=m 1160 CONFIG_SIS900=m 1161 CONFIG_EPIC100=m 1162 CONFIG_SMSC9420=m 1163 CONFIG_SUNDANCE=m 1164 # CONFIG_SUNDANCE_MMIO is not set 1165 CONFIG_TLAN=m 1166 # CONFIG_KS8851 is not set 1167 # CONFIG_KS8851_MLL is not set 1168 # CONFIG_VIA_RHINE is not set 1169 # CONFIG_SC92031 is not set 1170 CONFIG_ATL2=m 1171 # CONFIG_FTMAC100 is not set 1111 1172 CONFIG_NETDEV_1000=y 1112 # CONFIG_ACENIC is not set 1173 CONFIG_ACENIC=m 1174 # CONFIG_ACENIC_OMIT_TIGON_I is not set 1113 1175 CONFIG_CNS3XXX_ETH=m 1114 # CONFIG_DL2K is not set 1115 # CONFIG_E1000 is not set 1116 # CONFIG_E1000E is not set 1117 # CONFIG_IP1000 is not set 1118 # CONFIG_IGB is not set 1119 # CONFIG_IGBVF is not set 1120 # CONFIG_NS83820 is not set 1121 # CONFIG_HAMACHI is not set 1122 # CONFIG_YELLOWFIN is not set 1123 # CONFIG_R8169 is not set 1124 # CONFIG_SIS190 is not set 1125 # CONFIG_SKGE is not set 1176 CONFIG_DL2K=m 1177 CONFIG_E1000=m 1178 CONFIG_E1000E=m 1179 CONFIG_IP1000=m 1180 CONFIG_IGB=m 1181 CONFIG_IGBVF=m 1182 CONFIG_NS83820=m 1183 CONFIG_HAMACHI=m 1184 CONFIG_YELLOWFIN=m 1185 CONFIG_R8169=m 1186 CONFIG_SIS190=m 1187 CONFIG_SKGE=m 1188 CONFIG_SKGE_DEBUG=y 1189 # CONFIG_SKGE_GENESIS is not set 1126 1190 # CONFIG_SKY2 is not set 1127 # CONFIG_VIA_VELOCITY is not set 1128 # CONFIG_TIGON3 is not set 1129 # CONFIG_BNX2 is not set 1130 # CONFIG_CNIC is not set 1131 # CONFIG_QLA3XXX is not set 1132 # CONFIG_ATL1 is not set 1133 # CONFIG_ATL1E is not set 1134 # CONFIG_ATL1C is not set 1135 # CONFIG_JME is not set 1191 CONFIG_VIA_VELOCITY=m 1192 CONFIG_TIGON3=m 1193 CONFIG_BNX2=m 1194 CONFIG_CNIC=m 1195 CONFIG_QLA3XXX=m 1196 CONFIG_ATL1=m 1197 CONFIG_ATL1E=m 1198 CONFIG_ATL1C=m 1199 CONFIG_JME=m 1136 1200 # CONFIG_STMMAC_ETH is not set 1137 # CONFIG_PCH_GBE is not set 1201 CONFIG_PCH_GBE=m 1138 1202 # CONFIG_FTGMAC100 is not set 1139 1203 # CONFIG_NETDEV_10000 is not set … … 1889 1953 # CONFIG_DMADEVICES is not set 1890 1954 # CONFIG_AUXDISPLAY is not set 1891 # CONFIG_UIO is not set 1955 CONFIG_UIO=m 1956 # CONFIG_UIO_CIF is not set 1957 # CONFIG_UIO_PDRV is not set 1958 # CONFIG_UIO_PDRV_GENIRQ is not set 1959 # CONFIG_UIO_AEC is not set 1960 # CONFIG_UIO_SERCOS3 is not set 1961 # CONFIG_UIO_PCI_GENERIC is not set 1962 # CONFIG_UIO_NETX is not set 1892 1963 1893 1964 # -
src/linux/laguna/linux-3.1/arch/arm/mach-cns3xxx/devices.c
r17814 r17826 100 100 { 101 101 u32 __iomem *gpioa = (void __iomem *) (CNS3XXX_MISC_BASE_VIRT + 0x0014); 102 u32 __iomem *iocdb_io = (void __iomem *) (CNS3XXX_MISC_BASE_VIRT + 0x0020); 103 unsigned long iocdb = 0; 102 104 u32 gpioa_pins = __raw_readl(gpioa); 103 105 … … 109 111 cns3xxx_pwr_soft_rst(CNS3XXX_PWR_SOFTWARE_RST(SDIO)); 110 112 113 114 iocdb = __raw_readl(iocdb_io);; 115 iocdb &= (~(3 << 10)); 116 iocdb |= (2 << 10); 117 __raw_writel(iocdb, iocdb_io); 118 111 119 platform_device_register(&cns3xxx_sdhci_pdev); 112 120 } -
src/linux/laguna/linux-3.1/drivers/mmc/core/core.c
r17814 r17826 1081 1081 mmc_host_clk_hold(host); 1082 1082 host->ios.timing = timing; 1083 if (host->ios.timing&MMC_TIMING_MMC_HS) 1084 host->ios.clock = 50000000;//jacky 1083 1085 mmc_set_ios(host); 1084 1086 mmc_host_clk_release(host); -
src/linux/laguna/linux-3.1/drivers/mmc/core/mmc.c
r17814 r17826 300 300 break; 301 301 case EXT_CSD_CARD_TYPE_52 | EXT_CSD_CARD_TYPE_26: 302 card->ext_csd.hs_max_dtr = 5 2000000;302 card->ext_csd.hs_max_dtr = 50000000; 303 303 break; 304 304 case EXT_CSD_CARD_TYPE_26: 305 card->ext_csd.hs_max_dtr = 2 6000000;305 card->ext_csd.hs_max_dtr = 25000000; 306 306 break; 307 307 default: … … 558 558 559 559 /* The extra bit indicates that we support high capacity */ 560 err = mmc_send_op_cond(host, ocr | (1 << 30), &rocr);560 err = mmc_send_op_cond(host, ocr , &rocr); 561 561 if (err) 562 562 goto err; … … 1022 1022 1023 1023 mmc_attach_bus_ops(host); 1024 1025 //Jacky for eMMC capabilities 1026 host->caps |= (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA); 1027 host->caps |= MMC_CAP_MMC_HIGHSPEED; 1028 1024 1029 if (host->ocr_avail_mmc) 1025 1030 host->ocr_avail = host->ocr_avail_mmc; -
src/linux/laguna/linux-3.1/drivers/mmc/host/sdhci-cns3xxx.c
r17814 r17826 1 /******************************************************************************* 2 * 3 * drivers/mmc/host/sdhci-cns3xxx.c 4 * 5 * SDHCI support for the CNS3XXX SOCs 6 * 7 * Author: Scott Shu 8 * 9 * Copyright (c) 2008 Cavium Networks 10 * 11 * This file is free software; you can redistribute it and/or modify 12 * it under the terms of the GNU General Public License, Version 2, as 13 * published by the Free Software Foundation. 14 * 15 * This file is distributed in the hope that it will be useful, 16 * but AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or 18 * NONINFRINGEMENT. See the GNU General Public License for more details. 19 * 20 * You should have received a copy of the GNU General Public License 21 * along with this file; if not, write to the Free Software 22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA or 23 * visit http://www.gnu.org/licenses/. 24 * 25 * This file may also be available under a different license from Cavium. 26 * Contact Cavium Networks for more information 27 * 28 ******************************************************************************/ 29 30 #include <linux/delay.h> 31 #include <linux/highmem.h> 32 #include <linux/platform_device.h> 33 #include <linux/dma-mapping.h> 34 35 #include <linux/mmc/host.h> 36 37 #include <asm/scatterlist.h> 38 #include <asm/io.h> 39 #include <linux/interrupt.h> 40 41 42 #include "sdhci.h" 43 44 #define MAX_BUS_CLK (4) 45 46 static unsigned use_dma = 0; 47 48 struct sdhci_cns3xxx { 49 struct sdhci_host *host; 50 struct platform_device *pdev; 51 struct resource *ioarea; 52 struct clk *clk_io; 53 struct clk *clk_bus[MAX_BUS_CLK]; 54 }; 55 56 static unsigned int sdhci_cns3xxx_get_max_clk(struct sdhci_host *host) 57 { 58 int clk = 50000000; 59 60 return clk; 61 } 62 63 static unsigned int sdhci_cns3xxx_get_timeout_clk(struct sdhci_host *host) 64 { 65 return sdhci_cns3xxx_get_max_clk(host) / 100000; 66 } 67 1 68 /* 2 * SDHCI support for CNS3xxx SoC 3 * 4 * Copyright 2008 Cavium Networks 5 * Copyright 2010 MontaVista Software, LLC. 6 * 7 * Authors: Scott Shu 8 * Anton Vorontsov <avorontsov@mvista.com> 9 * 10 * This program is free software; you can redistribute it and/or modify 11 * it under the terms of the GNU General Public License version 2 as 12 * published by the Free Software Foundation. 69 * sdhci_cns3xxx_set_clock - callback on clock change 70 * 71 * When the card's clock is going to be changed, look at the new frequency 72 * and find the best clock source to go with it. 13 73 */ 14 15 #include <linux/delay.h>16 #include <linux/device.h>17 #include <linux/mmc/host.h>18 #include <mach/cns3xxx.h>19 #include "sdhci-pltfm.h"20 21 static unsigned int sdhci_cns3xxx_get_max_clk(struct sdhci_host *host)22 {23 return 150000000;24 }25 26 74 static void sdhci_cns3xxx_set_clock(struct sdhci_host *host, unsigned int clock) 27 75 { 28 struct device *dev = mmc_dev(host->mmc);29 int div = 1;30 76 u16 clk; 31 77 unsigned long timeout; 78 int max_speed, div = 1; 79 int hclk = cns3xxx_cpu_clock()/4; 32 80 33 81 if (clock == host->clock) … … 39 87 goto out; 40 88 41 while (host->max_clk / div > clock) { 42 /* 43 * On CNS3xxx divider grows linearly up to 4, and then 44 * exponentially up to 256. 45 */ 46 if (div < 4) 47 div += 1; 48 else if (div < 256) 49 div *= 2; 50 else 51 break; 52 } 53 54 dev_dbg(dev, "desired SD clock: %d, actual: %d\n", 55 clock, host->max_clk / div); 56 57 /* Divide by 3 is special. */ 58 if (div != 3) 59 div >>= 1; 60 61 clk = div << SDHCI_DIVIDER_SHIFT; 89 /* 90 * SD frequency divider should be determined by HCLK 91 * the maximum SD clock is 25MHz (normal speed mode) or 50MHz (high speed mode) 92 * formula => SD clock = (HCLK / divisor) 93 */ 94 div = 1; 95 hclk = cns3xxx_cpu_clock()/4; 96 97 if (0x4 & sdhci_readw(host, 0x28)) { 98 max_speed = 50; 99 } else { 100 max_speed = 25; 101 } 102 103 while (max_speed < (hclk/div)) { div++; } 104 105 switch (div) { 106 case 1: 107 clk = 0x00 << SDHCI_DIVIDER_SHIFT; /* */ 108 break; 109 case 2: 110 clk = 0x01 << SDHCI_DIVIDER_SHIFT; /* base clock divided by 2 */ 111 break; 112 case 3: 113 clk = 0x03 << SDHCI_DIVIDER_SHIFT; /* base clock divided by 3 */ 114 break; 115 case 4: 116 clk = 0x02 << SDHCI_DIVIDER_SHIFT; /* base clock divided by 4 */ 117 break; 118 case 5: case 6: case 7: case 8: 119 clk = 0x04 << SDHCI_DIVIDER_SHIFT; /* base clock divided by 8 */ 120 break; 121 default: 122 clk = 0x08 << SDHCI_DIVIDER_SHIFT; /* base clock divided by 16 */ 123 } 124 125 if (clock == 400000) //for eMMC init 126 { 127 clk = 0x80 << 8; 128 } 129 62 130 clk |= SDHCI_CLOCK_INT_EN; 63 131 sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL); 64 132 65 timeout = 20;133 timeout = 10; 66 134 while (!((clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL)) 67 & SDHCI_CLOCK_INT_STABLE)) {135 & SDHCI_CLOCK_INT_STABLE)) { 68 136 if (timeout == 0) { 69 dev_warn(dev, "clock is unstable"); 70 break; 137 return; 71 138 } 72 139 timeout--; … … 76 143 clk |= SDHCI_CLOCK_CARD_EN; 77 144 sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL); 145 146 host->timeout_clk = sdhci_cns3xxx_get_timeout_clk(host); 78 147 out: 79 148 host->clock = clock; 149 150 sdhci_writew(host, 0x0007, SDHCI_TIMEOUT_CONTROL); 80 151 } 81 152 82 153 static struct sdhci_ops sdhci_cns3xxx_ops = { 83 .get_max_clock = sdhci_cns3xxx_get_max_clk, 84 .set_clock = sdhci_cns3xxx_set_clock, 154 .get_max_clock = sdhci_cns3xxx_get_max_clk, 155 .get_timeout_clock = sdhci_cns3xxx_get_timeout_clk, 156 .set_clock = sdhci_cns3xxx_set_clock, 85 157 }; 86 158 87 static struct sdhci_pltfm_data sdhci_cns3xxx_pdata = { 88 .ops = &sdhci_cns3xxx_ops, 89 .quirks = SDHCI_QUIRK_BROKEN_DMA | 90 SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | 91 //SDHCI_QUIRK_INVERTED_WRITE_PROTECT | 92 SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN | 93 SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | 94 SDHCI_QUIRK_NONSTANDARD_CLOCK | 95 SDHCI_QUIRK_BROKEN_CARD_DETECTION, 96 }; 97 98 static int __devinit sdhci_cns3xxx_probe(struct platform_device *pdev) 99 { 100 return sdhci_pltfm_register(pdev, &sdhci_cns3xxx_pdata); 101 } 102 103 static int __devexit sdhci_cns3xxx_remove(struct platform_device *pdev) 104 { 105 return sdhci_pltfm_unregister(pdev); 106 } 159 static int sdhci_cns3xxx_probe(struct platform_device *pdev) 160 { 161 struct device *dev = &pdev->dev; 162 struct sdhci_host *host; 163 struct sdhci_cns3xxx *sc; 164 struct resource *res; 165 int ret, irq; 166 167 irq = platform_get_irq(pdev, 0); 168 if (irq < 0) { 169 dev_err(dev, "no irq specified\n"); 170 return irq; 171 } 172 173 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 174 if (!res) { 175 dev_err(dev, "no memory specified\n"); 176 return -ENOENT; 177 } 178 179 host = sdhci_alloc_host(dev, sizeof(*sc)); 180 if (IS_ERR(host)) { 181 dev_err(dev, "sdhci_alloc_host() failed\n"); 182 return PTR_ERR(host); 183 } 184 185 sc = sdhci_priv(host); 186 187 sc->host = host; 188 sc->pdev = pdev; 189 190 platform_set_drvdata(pdev, host); 191 192 sc->ioarea = request_mem_region(res->start, resource_size(res), mmc_hostname(host->mmc)); 193 if (!sc->ioarea) { 194 dev_err(dev, "failed to reserve register area\n"); 195 ret = -ENXIO; 196 goto err_req_regs; 197 } 198 199 host->ioaddr = ioremap_nocache(res->start, resource_size(res)); 200 if (!host->ioaddr) { 201 dev_err(dev, "failed to map registers\n"); 202 ret = -ENXIO; 203 goto err_req_regs; 204 } 205 206 host->hw_name = "cns3xxx"; 207 host->ops = &sdhci_cns3xxx_ops; 208 host->quirks = 0; 209 host->irq = irq; 210 211 if (use_dma != 1) { 212 host->quirks |= SDHCI_QUIRK_BROKEN_DMA; 213 host->quirks |= SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK; 214 } else { 215 host->quirks |= SDHCI_QUIRK_FORCE_DMA; 216 host->quirks |= SDHCI_QUIRK_BROKEN_ADMA; 217 host->quirks |= (SDHCI_QUIRK_32BIT_DMA_ADDR | SDHCI_QUIRK_32BIT_DMA_SIZE); 218 host->quirks |= SDHCI_QUIRK_NO_BUSY_IRQ; 219 //host->quirks |= SDHCI_QUIRK_FORCE_BLK_SZ_2048; 220 //host->quirks |= SDHCI_QUIRK_NO_MULTIBLOCK; 221 host->quirks |= SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK; 222 // host->quirks |= SDHCI_QUIRK_AUTO_CMD12; 223 // host->quirks |= SDHCI_QUIRK_READ_WAIT_CTRL; 224 } 225 226 host->quirks |= SDHCI_QUIRK_INVERTED_WRITE_PROTECT; 227 228 host->quirks |= SDHCI_QUIRK_NONSTANDARD_CLOCK; 229 230 ret = sdhci_add_host(host); 231 if (ret) { 232 dev_err(dev, "sdhci_add_host() failed (%d)\n", ret); 233 goto err_add_host; 234 } 235 236 return 0; 237 238 err_add_host: 239 free_irq(host->irq, host); 240 iounmap(host->ioaddr); 241 release_resource(sc->ioarea); 242 // kfree(sc->ioarea); 243 244 err_req_regs: 245 sdhci_free_host(host); 246 247 return ret; 248 } 249 250 static int sdhci_cns3xxx_remove(struct platform_device *pdev) 251 { 252 struct device *dev = &pdev->dev; 253 struct sdhci_host *host = dev_get_drvdata(dev); 254 struct resource *res; 255 256 pr_debug("%s: remove=%p\n", __func__, pdev); 257 258 sdhci_remove_host(host, 0); 259 sdhci_free_host(host); 260 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 261 release_mem_region(res->start, resource_size(res)); 262 263 return 0; 264 } 265 266 #ifdef CONFIG_PM 267 268 static int sdhci_cns3xxx_suspend(struct platform_device *dev, pm_message_t state) 269 { 270 271 return 0; 272 } 273 274 static int sdhci_cns3xxx_resume(struct platform_device *dev) 275 { 276 277 return 0; 278 } 279 280 #else 281 #define sdhci_cns3xxx_suspend NULL 282 #define sdhci_cns3xxx_resume NULL 283 #endif /* CONFIG_PM */ 107 284 108 285 static struct platform_driver sdhci_cns3xxx_driver = { 286 .probe = sdhci_cns3xxx_probe, 287 .remove = __devexit_p(sdhci_cns3xxx_remove), 288 .suspend = sdhci_cns3xxx_suspend, 289 .resume = sdhci_cns3xxx_resume, 109 290 .driver = { 110 291 .name = "sdhci-cns3xxx", 111 292 .owner = THIS_MODULE, 112 293 }, 113 .probe = sdhci_cns3xxx_probe,114 .remove = __devexit_p(sdhci_cns3xxx_remove),115 #ifdef CONFIG_PM116 .suspend = sdhci_pltfm_suspend,117 .resume = sdhci_pltfm_resume,118 #endif119 294 }; 120 295 296 static char banner[] __initdata = KERN_INFO "sdhci-cns3xxx, (c) 2009 Cavium Networks\n"; 297 121 298 static int __init sdhci_cns3xxx_init(void) 122 299 { 300 // unsigned long iocdb = 0; 301 // unsigned long gpioapin = __raw_readl(__io(CNS3XXX_MISC_BASE_VIRT + 0x0014)); 302 303 printk(banner); 304 305 // set SDIO drive strength to 2 (15.7 mA) 306 // iocdb = __raw_readl(__io(CNS3XXX_MISC_BASE_VIRT + 0x0020));; 307 // iocdb &= (~(3 << 10)); 308 // iocdb |= (2 << 10); 309 // __raw_writel(iocdb, __io(CNS3XXX_MISC_BASE_VIRT + 0x0020)); 310 123 311 return platform_driver_register(&sdhci_cns3xxx_driver); 124 312 } 313 314 static void __exit sdhci_cns3xxx_exit(void) 315 { 316 platform_driver_unregister(&sdhci_cns3xxx_driver); 317 } 318 125 319 module_init(sdhci_cns3xxx_init); 126 127 static void __exit sdhci_cns3xxx_exit(void)128 {129 platform_driver_unregister(&sdhci_cns3xxx_driver);130 }131 320 module_exit(sdhci_cns3xxx_exit); 132 321 133 MODULE_DESCRIPTION("SDHCI driver for CNS3xxx"); 134 MODULE_AUTHOR("Scott Shu, " 135 "Anton Vorontsov <avorontsov@mvista.com>"); 136 MODULE_LICENSE("GPL v2"); 322 module_param(use_dma, uint, 0); 323 324 MODULE_AUTHOR("Scott Shu"); 325 MODULE_DESCRIPTION("Cavium Networks CNS3XXX SDHCI glue"); 326 MODULE_LICENSE("GPL"); 327 MODULE_ALIAS("platform:sdhci-cns3xxx"); 328 329 MODULE_PARM_DESC(use_dma, "Whether to use DMA or not. Default = 0"); -
src/linux/laguna/linux-3.1/drivers/mmc/host/sdhci.c
r17814 r17826 1328 1328 ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL); 1329 1329 1330 if (ios->bus_width == MMC_BUS_WIDTH_8) //jacky for eMMC 1331 ctrl |= (0x1 << 5);//CNS34xxx proprietary 1332 else 1333 ctrl &= ~(0x1 << 5); 1334 1330 1335 if ((ios->timing == MMC_TIMING_SD_HS || 1331 1336 ios->timing == MMC_TIMING_MMC_HS) … … 1334 1339 else 1335 1340 ctrl &= ~SDHCI_CTRL_HISPD; 1341 1342 if (ios->timing == MMC_TIMING_MMC_HS)//for eMMC 1343 ctrl |= SDHCI_CTRL_HISPD; else 1344 ctrl &= ~SDHCI_CTRL_HISPD; 1345 1346 if (ios->timing == MMC_TIMING_MMC_HS) 1347 { 1348 sdhci_writeb(host, 0x3, 0x2d); 1349 } 1336 1350 1337 1351 if (host->version >= SDHCI_SPEC_300) { -
src/linux/laguna/linux-3.1/drivers/pci/pci.c
r17814 r17826 3201 3201 u16 ctl, v; 3202 3202 3203 #ifdef CONFIG_ARCH_CNS3XXX 3204 if (rq != 128) 3205 rq = 128; 3206 #else 3203 3207 if (rq < 128 || rq > 4096 || !is_power_of_2(rq)) 3204 3208 goto out; 3205 3209 #endif 3206 3210 v = (ffs(rq) - 8) << 12; 3207 3211
Note: See TracChangeset
for help on using the changeset viewer.
