Changeset 15718
- Timestamp:
- 2009-05-09T00:48:08+02:00 (9 years ago)
- Location:
- branches/8.09/target/linux
- Files:
-
- 120 added
- 4 deleted
- 1 edited
- 38 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/8.09/target/linux/rb532/Makefile
r14026 r15718 12 12 FEATURES:=jffs2 pci tgz 13 13 14 LINUX_VERSION:=2.6.2 4.714 LINUX_VERSION:=2.6.23.17 15 15 16 16 include $(INCLUDE_DIR)/target.mk -
branches/8.09/target/linux/rb532/config-2.6.23
r15717 r15718 4 4 # CONFIG_ARCH_HAS_ILOG2_U32 is not set 5 5 # CONFIG_ARCH_HAS_ILOG2_U64 is not set 6 CONFIG_ARCH_POPULATES_NODE_MAP=y7 6 # CONFIG_ARCH_SUPPORTS_MSI is not set 8 CONFIG_ARCH_SUPPORTS_OPROFILE=y9 7 # CONFIG_ATM is not set 10 8 # CONFIG_AX25 is not set 11 9 CONFIG_BASE_SMALL=0 12 # CONFIG_BCM47XX is not set13 10 CONFIG_BITREVERSE=y 14 11 CONFIG_BLK_DEV_CF_MIPS=y 15 # CONFIG_BOOT_PRINTK_DELAY is not set16 12 # CONFIG_BT is not set 17 CONFIG_CEVT_R4K=y18 13 # CONFIG_CPU_BIG_ENDIAN is not set 19 14 CONFIG_CPU_HAS_LLSC=y … … 45 40 # CONFIG_CPU_TX49XX is not set 46 41 # CONFIG_CPU_VR41XX is not set 47 CONFIG_CSRC_R4K=y48 # CONFIG_DEBUG_DEVRES is not set49 # CONFIG_DEBUG_DRIVER is not set50 # CONFIG_DEBUG_INFO is not set51 CONFIG_DEBUG_KERNEL=y52 # CONFIG_DEBUG_KOBJECT is not set53 # CONFIG_DEBUG_LIST is not set54 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set55 # CONFIG_DEBUG_LOCK_ALLOC is not set56 # CONFIG_DEBUG_MUTEXES is not set57 # CONFIG_DEBUG_RT_MUTEXES is not set58 # CONFIG_DEBUG_SG is not set59 # CONFIG_DEBUG_SHIRQ is not set60 # CONFIG_DEBUG_SLAB is not set61 # CONFIG_DEBUG_SPINLOCK is not set62 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set63 # CONFIG_DEBUG_STACK_USAGE is not set64 # CONFIG_DEBUG_VM is not set65 # CONFIG_DETECT_SOFTLOCKUP is not set66 42 CONFIG_DEVPORT=y 67 43 # CONFIG_DM9000 is not set … … 69 45 CONFIG_DMA_NONCOHERENT=y 70 46 CONFIG_EXT2_FS=y 71 # CONFIG_FAULT_INJECTION is not set72 CONFIG_FORCED_INLINING=y73 47 CONFIG_FS_POSIX_ACL=y 74 CONFIG_GENERIC_CLOCKEVENTS=y75 CONFIG_GENERIC_CLOCKEVENTS_BUILD=y76 CONFIG_GENERIC_CMOS_UPDATE=y77 48 CONFIG_GENERIC_FIND_NEXT_BIT=y 78 49 CONFIG_GENERIC_GPIO=y … … 81 52 CONFIG_HAS_IOMEM=y 82 53 CONFIG_HAS_IOPORT=y 83 CONFIG_HID=m84 54 CONFIG_HID_SUPPORT=y 85 # CONFIG_HIGH_RES_TIMERS is not set86 55 CONFIG_HW_HAS_PCI=y 87 56 CONFIG_HW_RANDOM=y 88 57 # CONFIG_I2C is not set 89 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set90 # CONFIG_IBM_NEW_EMAC_RGMII is not set91 # CONFIG_IBM_NEW_EMAC_TAH is not set92 # CONFIG_IBM_NEW_EMAC_ZMII is not set93 58 # CONFIG_IDE is not set 94 59 CONFIG_INITRAMFS_SOURCE="" … … 96 61 CONFIG_INPUT_KEYBOARD=y 97 62 CONFIG_IRQ_CPU=y 98 CONFIG_KALLSYMS=y99 CONFIG_KALLSYMS_ALL=y100 CONFIG_KALLSYMS_EXTRA_PASS=y101 63 CONFIG_KEXEC=y 102 64 # CONFIG_KEYBOARD_ATKBD is not set … … 108 70 # CONFIG_KEYBOARD_XTKBD is not set 109 71 CONFIG_KORINA=y 72 # CONFIG_LEDS_ALIX is not set 73 # CONFIG_LEDS_GPIO is not set 110 74 CONFIG_LEDS_RB500=y 111 75 # CONFIG_LEMOTE_FULONG is not set 112 # CONFIG_LOCK_STAT is not set113 76 # CONFIG_MACH_ALCHEMY is not set 114 77 # CONFIG_MACH_DECSTATION is not set … … 127 90 # CONFIG_MIPS_SEAD is not set 128 91 # CONFIG_MIPS_SIM is not set 129 # CONFIG_MIPS_UNCACHED is not set130 92 CONFIG_MTD=y 131 93 # CONFIG_MTD_ABSENT is not set 132 # CONFIG_MTD_ALAUDA is not set133 94 CONFIG_MTD_BLKDEVS=y 134 95 CONFIG_MTD_BLOCK=y … … 177 138 # CONFIG_NET_SCH_ESFQ_NFCT is not set 178 139 # CONFIG_NET_VENDOR_3COM is not set 179 CONFIG_NF_CONNTRACK=y180 140 # CONFIG_NO_IOPORT is not set 181 141 # CONFIG_PAGE_SIZE_16KB is not set … … 183 143 # CONFIG_PAGE_SIZE_64KB is not set 184 144 # CONFIG_PAGE_SIZE_8KB is not set 145 # CONFIG_PCIPCWATCHDOG is not set 185 146 CONFIG_PCI=y 186 # CONFIG_PCIPCWATCHDOG is not set187 # CONFIG_PCI_DEBUG is not set188 CONFIG_PCI_DOMAINS=y189 147 # CONFIG_PMC_MSP is not set 190 148 # CONFIG_PMC_YOSEMITE is not set 191 149 # CONFIG_PNX8550_JBS is not set 192 150 # CONFIG_PNX8550_STB810 is not set 193 # CONFIG_PROVE_LOCKING is not set194 151 CONFIG_RC32434_WDT=y 195 # CONFIG_RCU_TORTURE_TEST is not set196 152 # CONFIG_RTC is not set 197 CONFIG_RTC_LIB=y198 # CONFIG_RT_MUTEX_TESTER is not set199 # CONFIG_RUNTIME_DEBUG is not set200 153 CONFIG_RWSEM_GENERIC_SPINLOCK=y 201 # CONFIG_SCHEDSTATS is not set202 # CONFIG_SCHED_DEBUG is not set203 154 CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 204 155 CONFIG_SCSI_WAIT_SCAN=m … … 216 167 # CONFIG_SIBYTE_SENTOSA is not set 217 168 # CONFIG_SIBYTE_SWARM is not set 218 CONFIG_SLABINFO=y219 169 # CONFIG_SOFT_WATCHDOG is not set 220 170 # CONFIG_SOUND is not set 221 171 # CONFIG_SPARSEMEM_STATIC is not set 222 # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set223 CONFIG_SSB_POSSIBLE=y224 172 CONFIG_SWAP_IO_SPACE=y 225 173 CONFIG_SYSVIPC_SYSCTL=y … … 229 177 CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 230 178 # CONFIG_TC35815 is not set 231 # CONFIG_TICK_ONESHOT is not set232 # CONFIG_TIMER_STATS is not set233 179 # CONFIG_TOSHIBA_JMR3927 is not set 234 180 # CONFIG_TOSHIBA_RBTX4927 is not set … … 236 182 CONFIG_TRAD_SIGNALS=y 237 183 CONFIG_USB=m 238 # CONFIG_USBPCWATCHDOG is not set239 # CONFIG_USB_EHCI_HCD is not set240 # CONFIG_USB_UHCI_HCD is not set241 184 # CONFIG_USER_NS is not set 242 185 # CONFIG_VGASTATE is not set -
branches/8.09/target/linux/rb532/files-2.6.23/arch/mips/rb500/irq.c
r15717 r15718 252 252 253 253 if (cp0_cause & CAUSEF_IP7) { 254 do_IRQ(7);254 ll_timer_interrupt(7); 255 255 } else if ((ip = (cp0_cause & 0x7c00))) { 256 256 group = 21 - rc32434_clz(ip); -
branches/8.09/target/linux/rb532/files-2.6.23/arch/mips/rb500/prom.c
r15717 r15718 90 90 setup_serial_port(); 91 91 92 mips_machgroup = MACH_GROUP_MIKROTIK; 92 93 soft_reboot = read_c0_status() & SR_NMI; 93 94 pm_power_off = NULL; -
branches/8.09/target/linux/rb532/files-2.6.23/arch/mips/rb500/setup.c
r15717 r15718 52 52 unsigned int pciCntlVal; 53 53 54 //board_time_init = rc32434_time_init;54 board_time_init = rc32434_time_init; 55 55 56 56 #ifdef CONFIG_CPU_HAS_WB -
branches/8.09/target/linux/rb532/files-2.6.23/arch/mips/rb500/time.c
r15717 r15718 48 48 49 49 static unsigned long r4k_offset; /* Amount to incr compare reg each time */ 50 static unsigned long r4k_cur; /* What counter should be at next timer irq */ 50 51 extern unsigned int mips_hpt_frequency; 51 52 extern unsigned int idt_cpu_freq; … … 64 65 65 66 66 void __init plat_time_init(void)67 void __init rc32434_time_init(void) 67 68 { 68 69 unsigned int est_freq, flags; … … 81 82 local_irq_restore(flags); 82 83 } 84 85 void __init plat_timer_setup(struct irqaction *irq) 86 { 87 /* we are using the cpu counter for timer interrupts */ 88 setup_irq(MIPS_CPU_TIMER_IRQ, irq); 89 90 /* to generate the first timer interrupt */ 91 r4k_cur = (read_c0_count() + r4k_offset); 92 write_c0_compare(r4k_cur); 93 } 94 -
branches/8.09/target/linux/rb532/files-2.6.23/drivers/net/korina.c
r15717 r15718 203 203 204 204 platform_set_drvdata(pdev, dev); 205 SET_ NETDEV_DEV(dev, &pdev->dev);205 SET_MODULE_OWNER(dev); 206 206 bif->dev = dev; 207 207 … … 272 272 273 273 dev->priv = lp; 274 lp->dev = dev;275 274 276 275 dev->open = rc32434_open; … … 282 281 dev->watchdog_timeo = RC32434_TX_TIMEOUT; 283 282 284 netif_napi_add(dev, &lp->napi, rc32434_poll, 64); 283 #ifdef CONFIG_IDT_USE_NAPI 284 dev->poll = rc32434_poll; 285 dev->weight = 64; 286 printk("Using NAPI with weight %d\n",dev->weight); 287 #else 288 lp->rx_tasklet = kmalloc(sizeof(struct tasklet_struct), GFP_KERNEL); 289 tasklet_init(lp->rx_tasklet, rc32434_rx_tasklet, (unsigned long)dev); 290 #endif 285 291 lp->tx_tasklet = kmalloc(sizeof(struct tasklet_struct), GFP_KERNEL); 286 292 tasklet_init(lp->tx_tasklet, rc32434_tx_tasklet, (unsigned long)dev); … … 355 361 /* Install the interrupt handler that handles the Done Finished Ovr and Und Events */ 356 362 if (request_irq(lp->rx_irq, &rc32434_rx_dma_interrupt, 357 IRQF_SHARED | IRQF_DISABLED,363 SA_SHIRQ | SA_INTERRUPT, 358 364 "Korina ethernet Rx", dev)) { 359 365 ERR(": unable to get Rx DMA IRQ %d\n", … … 362 368 } 363 369 if (request_irq(lp->tx_irq, &rc32434_tx_dma_interrupt, 364 IRQF_SHARED | IRQF_DISABLED,370 SA_SHIRQ | SA_INTERRUPT, 365 371 "Korina ethernet Tx", dev)) { 366 372 ERR(": unable to get Tx DMA IRQ %d\n", … … 373 379 /* Install handler for overrun error. */ 374 380 if (request_irq(lp->ovr_irq, &rc32434_ovr_interrupt, 375 IRQF_SHARED | IRQF_DISABLED,381 SA_SHIRQ | SA_INTERRUPT, 376 382 "Ethernet Overflow", dev)) { 377 383 ERR(": unable to get OVR IRQ %d\n", … … 385 391 /* Install handler for underflow error. */ 386 392 if (request_irq(lp->und_irq, &rc32434_und_interrupt, 387 IRQF_SHARED | IRQF_DISABLED,393 SA_SHIRQ | SA_INTERRUPT, 388 394 "Ethernet Underflow", dev)) { 389 395 ERR(": unable to get UND IRQ %d\n", … … 628 634 lp = (struct rc32434_local *)dev->priv; 629 635 636 spin_lock(&lp->lock); 630 637 dmas = __raw_readl(&lp->rx_dma_regs->dmas); 631 638 if(dmas & (DMAS_d_m|DMAS_h_m|DMAS_e_m)) { … … 633 640 dmasm = __raw_readl(&lp->rx_dma_regs->dmasm); 634 641 __raw_writel(dmasm | (DMASM_d_m | DMASM_h_m | DMASM_e_m), &lp->rx_dma_regs->dmasm); 635 netif_rx_schedule(dev, &lp->napi); 636 642 #ifdef CONFIG_IDT_USE_NAPI 643 if(netif_rx_schedule_prep(dev)) 644 __netif_rx_schedule(dev); 645 #else 646 tasklet_hi_schedule(lp->rx_tasklet); 647 #endif 648 637 649 if (dmas & DMAS_e_m) 638 650 ERR(": DMA error\n"); … … 643 655 retval = IRQ_NONE; 644 656 657 spin_unlock(&lp->lock); 645 658 return retval; 646 659 } 647 660 648 649 static int rc32434_rx(struct net_device *dev, int limit) 650 { 651 struct rc32434_local *lp = netdev_priv(dev); 661 #ifdef CONFIG_IDT_USE_NAPI 662 static int rc32434_poll(struct net_device *rx_data_dev, int *budget) 663 #else 664 static void rc32434_rx_tasklet(unsigned long rx_data_dev) 665 #endif 666 { 667 struct net_device *dev = (struct net_device *)rx_data_dev; 668 struct rc32434_local* lp = netdev_priv(dev); 652 669 volatile DMAD_t rd = &lp->rd_ring[lp->rx_next_done]; 653 struct sk_buff *skb, *skb_new; 654 u8 *pkt_buf; 655 u32 devcs, pkt_len, dmas, rx_free_desc; 656 u32 pktuncrc_len; 657 int count; 670 struct sk_buff *skb, *skb_new; 671 u8* pkt_buf; 672 u32 devcs, count, pkt_len, pktuncrc_len; 673 volatile u32 dmas; 674 #ifdef CONFIG_IDT_USE_NAPI 675 u32 received = 0; 676 int rx_work_limit = min(*budget,dev->quota); 677 #else 678 unsigned long flags; 679 spin_lock_irqsave(&lp->lock, flags); 680 #endif 658 681 659 682 dma_cache_inv((u32)rd, sizeof(*rd)); 660 for (count = 0; count < limit; count++) { 683 while ( (count = RC32434_RBSIZE - (u32)DMA_COUNT(rd->control)) != 0) { 684 #ifdef CONFIG_IDT_USE_NAPI 685 if(--rx_work_limit <0) 686 { 687 break; 688 } 689 #endif 661 690 /* init the var. used for the later operations within the while loop */ 662 691 skb_new = NULL; … … 665 694 skb = lp->rx_skb[lp->rx_next_done]; 666 695 667 if ((devcs & ( ETHRX_ld_m)) != ETHRX_ld_m) { 696 if (count < 64) { 697 lp->stats.rx_errors++; 698 lp->stats.rx_dropped++; 699 } 700 else if ((devcs & ( ETHRX_ld_m)) != ETHRX_ld_m) { 668 701 /* check that this is a whole packet */ 669 702 /* WARNING: DMA_FD bit incorrectly set in Rc32434 (errata ref #077) */ … … 673 706 else if ( (devcs & ETHRX_rok_m) ) { 674 707 708 { 675 709 /* must be the (first and) last descriptor then */ 676 710 pkt_buf = (u8*)lp->rx_skb[lp->rx_next_done]->data; … … 681 715 682 716 /* Malloc up new buffer. */ 683 skb_new = netdev_alloc_skb(dev,RC32434_RBSIZE + 2);717 skb_new = dev_alloc_skb(RC32434_RBSIZE + 2); 684 718 685 719 if (skb_new != NULL){ … … 690 724 691 725 /* pass the packet to upper layers */ 726 #ifdef CONFIG_IDT_USE_NAPI 692 727 netif_receive_skb(skb); 728 #else 729 netif_rx(skb); 730 #endif 693 731 694 732 dev->last_rx = jiffies; … … 710 748 lp->stats.rx_dropped++; 711 749 } 750 } 751 712 752 } 713 753 else { … … 741 781 } 742 782 } 783 743 784 rd->devcs = 0; 744 785 745 786 /* restore descriptor's curr_addr */ 746 if(skb_new) { 747 rd->ca = CPHYSADDR(skb_new->data); 748 } 787 if(skb_new) 788 rd->ca = CPHYSADDR(skb_new->data); 749 789 else 750 790 rd->ca = CPHYSADDR(skb->data); … … 758 798 __raw_writel( ~DMAS_d_m, &lp->rx_dma_regs->dmas); 759 799 } 800 #ifdef CONFIG_IDT_USE_NAPI 801 dev->quota -= received; 802 *budget =- received; 803 if(rx_work_limit < 0) 804 goto not_done; 805 #endif 760 806 761 807 dmas = __raw_readl(&lp->rx_dma_regs->dmas); 762 808 763 809 if(dmas & DMAS_h_m) { 764 /* Mask off halt and error bits */765 810 __raw_writel( ~(DMAS_h_m | DMAS_e_m), &lp->rx_dma_regs->dmas); 766 811 #ifdef RC32434_PROC_DEBUG … … 774 819 } 775 820 776 return count; 777 } 778 779 static int rc32434_poll(struct napi_struct *napi, int budget) 780 { 781 struct rc32434_local *lp = 782 container_of(napi, struct rc32434_local, napi); 783 struct net_device *dev = lp->dev; 784 int work_done; 785 786 work_done = rc32434_rx(dev, budget); 787 if (work_done < budget) { 788 netif_rx_complete(dev, napi); 789 790 /* Mask off interrupts */ 791 writel(readl(&lp->rx_dma_regs->dmasm) & 792 (DMASM_d_m | DMASM_h_m |DMASM_e_m), 793 &lp->rx_dma_regs->dmasm); 794 } 795 return work_done; 796 } 821 #ifdef CONFIG_IDT_USE_NAPI 822 netif_rx_complete(dev); 823 #endif 824 /* Enable D H E bit in Rx DMA */ 825 __raw_writel(__raw_readl(&lp->rx_dma_regs->dmasm) & ~(DMASM_d_m | DMASM_h_m |DMASM_e_m), &lp->rx_dma_regs->dmasm); 826 #ifdef CONFIG_IDT_USE_NAPI 827 return 0; 828 not_done: 829 return 1; 830 #else 831 spin_unlock_irqrestore(&lp->lock, flags); 832 return; 833 #endif 834 835 836 } 797 837 798 838 … … 810 850 811 851 lp = (struct rc32434_local *)dev->priv; 852 853 spin_lock(&lp->lock); 812 854 813 855 dmas = __raw_readl(&lp->tx_dma_regs->dmas); … … 834 876 else 835 877 retval = IRQ_NONE; 878 879 spin_unlock(&lp->lock); 836 880 837 881 return retval; … … 989 1033 __raw_writel(ETHINTFC_en_m, &lp->eth_regs->ethintfc); 990 1034 1035 #ifndef CONFIG_IDT_USE_NAPI 1036 tasklet_disable(lp->rx_tasklet); 1037 #endif 991 1038 tasklet_disable(lp->tx_tasklet); 992 1039 … … 1091 1138 __raw_writel(ETHMAC1_re_m, &lp->eth_regs->ethmac1); 1092 1139 1093 napi_enable(&lp->napi); 1140 #ifndef CONFIG_IDT_USE_NAPI 1141 tasklet_enable(lp->rx_tasklet); 1142 #endif 1094 1143 tasklet_enable(lp->tx_tasklet); 1095 1144 -
branches/8.09/target/linux/rb532/files-2.6.23/drivers/net/rc32434_eth.h
r15717 r15718 103 103 struct sk_buff* rx_skb[RC32434_NUM_RDS]; /* skbuffs for pkt to trans */ 104 104 105 #ifndef CONFIG_IDT_USE_NAPI 106 struct tasklet_struct * rx_tasklet; 107 #endif 105 108 struct tasklet_struct * tx_tasklet; 106 109 … … 131 134 struct proc_dir_entry *ps; 132 135 int dma_halt_cnt; int dma_run_cnt; 133 struct napi_struct napi;134 struct net_device *dev;135 136 }; 136 137 … … 154 155 155 156 static void rc32434_tx_tasklet(unsigned long tx_data_dev); 156 static int rc32434_poll(struct napi_struct *napi, int budget); 157 #ifdef CONFIG_IDT_USE_NAPI 158 static int rc32434_poll(struct net_device *rx_data_dev, int *budget); 159 #else 160 static void rc32434_rx_tasklet(unsigned long rx_data_dev); 161 #endif 157 162 static void rc32434_cleanup_module(void); 158 163
Note: See TracChangeset
for help on using the changeset viewer.