Commit 31ba0466 authored by Anton Altaparmakov's avatar Anton Altaparmakov

Merge cantab.net:/home/src/bklinux-2.6

into cantab.net:/home/src/ntfs-2.6
parents 32e5fcaa 2e5ae683
......@@ -19,19 +19,23 @@ CONFIG_BROKEN_ON_SMP=y
#
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
# CONFIG_POSIX_MQUEUE is not set
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
# CONFIG_AUDIT is not set
CONFIG_LOG_BUF_SHIFT=14
# CONFIG_HOTPLUG is not set
CONFIG_IKCONFIG=y
# CONFIG_IKCONFIG_PROC is not set
CONFIG_EMBEDDED=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
CONFIG_FUTEX=y
# CONFIG_EPOLL is not set
CONFIG_IOSCHED_NOOP=y
# CONFIG_IOSCHED_AS is not set
# CONFIG_IOSCHED_DEADLINE is not set
CONFIG_IOSCHED_CFQ=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
#
......@@ -43,21 +47,24 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
# System Type
#
# CONFIG_ARCH_ADIFCC is not set
# CONFIG_ARCH_ANAKIN is not set
# CONFIG_ARCH_CLPS7500 is not set
# CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_CO285 is not set
# CONFIG_ARCH_PXA is not set
# CONFIG_ARCH_EBSA110 is not set
# CONFIG_ARCH_CAMELOT is not set
# CONFIG_ARCH_FOOTBRIDGE is not set
# CONFIG_ARCH_INTEGRATOR is not set
# CONFIG_ARCH_IOP3XX is not set
# CONFIG_ARCH_IXP4XX is not set
# CONFIG_ARCH_L7200 is not set
# CONFIG_ARCH_PXA is not set
# CONFIG_ARCH_RPC is not set
# CONFIG_ARCH_SA1100 is not set
# CONFIG_ARCH_S3C2410 is not set
# CONFIG_ARCH_SHARK is not set
CONFIG_ARCH_LH7A40X=y
# CONFIG_ARCH_OMAP is not set
# CONFIG_ARCH_VERSATILE_PB is not set
#
# CLPS711X/EP721X Implementations
......@@ -82,13 +89,45 @@ CONFIG_ARCH_LH7A40X=y
#
#
# Intel PXA250/210 Implementations
# Intel IXP4xx Implementation Options
#
#
# IXP4xx Platforms
#
#
# IXP4xx Options
#
#
# Intel PXA2xx Implementations
#
#
# SA11x0 Implementations
#
#
# TI OMAP Implementations
#
#
# OMAP Core Type
#
#
# OMAP Board Type
#
#
# OMAP Feature Selections
#
#
# S3C2410 Implementations
#
#
# LH7A40X Implementations
#
......@@ -254,23 +293,21 @@ CONFIG_IP_PNP_RARP=y
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_ARPD is not set
# CONFIG_INET_ECN is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_IPV6 is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_NETFILTER is not set
#
# SCTP Configuration (EXPERIMENTAL)
#
CONFIG_IPV6_SCTP__=y
# CONFIG_IP_SCTP is not set
# CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
......@@ -291,6 +328,11 @@ CONFIG_IPV6_SCTP__=y
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
CONFIG_NETDEVICES=y
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
......@@ -311,38 +353,24 @@ CONFIG_SMC91X=y
#
# Ethernet (10000 Mbit)
#
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
#
# Wireless LAN (non-hamradio)
# Token Ring devices
#
# CONFIG_NET_RADIO is not set
#
# Token Ring devices
# Wireless LAN (non-hamradio)
#
# CONFIG_SHAPER is not set
# CONFIG_NET_RADIO is not set
#
# Wan interfaces
#
# CONFIG_WAN is not set
#
# Amateur Radio support
#
# CONFIG_HAMRADIO is not set
#
# IrDA (infrared) support
#
# CONFIG_IRDA is not set
#
# Bluetooth support
#
# CONFIG_BT is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
# CONFIG_SHAPER is not set
# CONFIG_NETCONSOLE is not set
#
# ATA/ATAPI/MFM/RLL support
......@@ -367,9 +395,9 @@ CONFIG_IDE_POLL=y
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=y
CONFIG_IDE_ARM=y
# CONFIG_BLK_DEV_IDEDMA is not set
# CONFIG_IDEDMA_AUTO is not set
# CONFIG_DMA_NONPCI is not set
# CONFIG_BLK_DEV_HD is not set
#
......@@ -452,11 +480,6 @@ CONFIG_SERIAL_LH7A40X_CONSOLE=y
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
#
# Mice
#
# CONFIG_BUSMOUSE is not set
# CONFIG_QIC02_TAPE is not set
#
......@@ -536,6 +559,7 @@ CONFIG_VFAT_FS=y
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_SYSFS=y
# CONFIG_DEVFS_FS is not set
# CONFIG_DEVPTS_FS_XATTR is not set
CONFIG_TMPFS=y
......@@ -576,7 +600,7 @@ CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
# CONFIG_EXPORTFS is not set
CONFIG_SUNRPC=y
# CONFIG_SUNRPC_GSS is not set
# CONFIG_RPCSEC_GSS_KRB5 is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
......@@ -664,6 +688,11 @@ CONFIG_NLS_DEFAULT="iso8859-1"
# CONFIG_MDA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y
#
# Sound
#
# CONFIG_SOUND is not set
#
# Misc devices
#
......@@ -706,5 +735,6 @@ CONFIG_DEBUG_ERRORS=y
# Library routines
#
CONFIG_CRC32=y
# CONFIG_LIBCRC32C is not set
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
......@@ -19,19 +19,23 @@ CONFIG_BROKEN_ON_SMP=y
#
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
# CONFIG_POSIX_MQUEUE is not set
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
# CONFIG_AUDIT is not set
CONFIG_LOG_BUF_SHIFT=14
# CONFIG_HOTPLUG is not set
CONFIG_IKCONFIG=y
# CONFIG_IKCONFIG_PROC is not set
CONFIG_EMBEDDED=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
CONFIG_FUTEX=y
# CONFIG_EPOLL is not set
CONFIG_IOSCHED_NOOP=y
# CONFIG_IOSCHED_AS is not set
# CONFIG_IOSCHED_DEADLINE is not set
CONFIG_IOSCHED_CFQ=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
#
......@@ -46,19 +50,21 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
# CONFIG_ARCH_CLPS7500 is not set
# CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_CO285 is not set
# CONFIG_ARCH_PXA is not set
# CONFIG_ARCH_EBSA110 is not set
# CONFIG_ARCH_CAMELOT is not set
# CONFIG_ARCH_FOOTBRIDGE is not set
# CONFIG_ARCH_INTEGRATOR is not set
# CONFIG_ARCH_IOP3XX is not set
# CONFIG_ARCH_IXP4XX is not set
# CONFIG_ARCH_L7200 is not set
# CONFIG_ARCH_PXA is not set
# CONFIG_ARCH_RPC is not set
# CONFIG_ARCH_SA1100 is not set
# CONFIG_ARCH_SHARK is not set
# CONFIG_ARCH_S3C2410 is not set
# CONFIG_ARCH_OMAP is not set
# CONFIG_ARCH_SHARK is not set
CONFIG_ARCH_LH7A40X=y
# CONFIG_ARCH_OMAP is not set
# CONFIG_ARCH_VERSATILE_PB is not set
#
# CLPS711X/EP721X Implementations
......@@ -83,7 +89,19 @@ CONFIG_ARCH_LH7A40X=y
#
#
# Intel PXA250/210 Implementations
# Intel IXP4xx Implementation Options
#
#
# IXP4xx Platforms
#
#
# IXP4xx Options
#
#
# Intel PXA2xx Implementations
#
#
......@@ -94,6 +112,14 @@ CONFIG_ARCH_LH7A40X=y
# TI OMAP Implementations
#
#
# OMAP Core Type
#
#
# OMAP Board Type
#
#
# OMAP Feature Selections
#
......@@ -271,8 +297,6 @@ CONFIG_IP_PNP_RARP=y
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_IPV6 is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_NETFILTER is not set
#
......@@ -280,7 +304,9 @@ CONFIG_IP_PNP_RARP=y
#
# CONFIG_IP_SCTP is not set
# CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
......@@ -301,6 +327,11 @@ CONFIG_IP_PNP_RARP=y
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
CONFIG_NETDEVICES=y
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
......@@ -321,41 +352,24 @@ CONFIG_SMC91X=y
#
# Ethernet (10000 Mbit)
#
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
#
# Wireless LAN (non-hamradio)
# Token Ring devices
#
# CONFIG_NET_RADIO is not set
#
# Token Ring devices
# Wireless LAN (non-hamradio)
#
# CONFIG_SHAPER is not set
# CONFIG_NETCONSOLE is not set
# CONFIG_NET_RADIO is not set
#
# Wan interfaces
#
# CONFIG_WAN is not set
#
# Amateur Radio support
#
# CONFIG_HAMRADIO is not set
#
# IrDA (infrared) support
#
# CONFIG_IRDA is not set
#
# Bluetooth support
#
# CONFIG_BT is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
# CONFIG_SHAPER is not set
# CONFIG_NETCONSOLE is not set
#
# ATA/ATAPI/MFM/RLL support
......@@ -381,6 +395,7 @@ CONFIG_IDE_POLL=y
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=y
CONFIG_IDE_ARM=y
# CONFIG_BLK_DEV_IDEDMA is not set
# CONFIG_IDEDMA_AUTO is not set
# CONFIG_BLK_DEV_HD is not set
......@@ -404,7 +419,6 @@ CONFIG_SCSI=y
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
# CONFIG_SCSI_MULTI_LUN is not set
# CONFIG_SCSI_REPORT_LUNS is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
......@@ -418,6 +432,7 @@ CONFIG_SCSI=y
# SCSI low-level drivers
#
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_SCSI_SATA is not set
# CONFIG_SCSI_EATA_PIO is not set
# CONFIG_SCSI_DEBUG is not set
......@@ -573,6 +588,7 @@ CONFIG_VFAT_FS=y
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_SYSFS=y
# CONFIG_DEVFS_FS is not set
# CONFIG_DEVPTS_FS_XATTR is not set
CONFIG_TMPFS=y
......@@ -618,7 +634,6 @@ CONFIG_SUNRPC=y
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_INTERMEZZO_FS is not set
# CONFIG_AFS_FS is not set
#
......@@ -761,6 +776,7 @@ CONFIG_USB_HIDINPUT=y
# CONFIG_USB_KBTAB is not set
# CONFIG_USB_POWERMATE is not set
# CONFIG_USB_MTOUCH is not set
# CONFIG_USB_EGALAX is not set
# CONFIG_USB_XPAD is not set
# CONFIG_USB_ATI_REMOTE is not set
......@@ -809,6 +825,8 @@ CONFIG_USB_HIDINPUT=y
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_LED is not set
# CONFIG_USB_CYTHERM is not set
# CONFIG_USB_PHIDGETSERVO is not set
# CONFIG_USB_TEST is not set
#
......@@ -845,5 +863,6 @@ CONFIG_DEBUG_ERRORS=y
# Library routines
#
CONFIG_CRC32=y
# CONFIG_LIBCRC32C is not set
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
......@@ -116,7 +116,12 @@ extern void lpd7a400_map_io (void);
static void __init lpd7a40x_init (void)
{
CPLD_CONTROL = 0x0; /* Enable LAN (Disable LCD) */
CPLD_CONTROL |= (1<<6); /* Mask USB1 connection IRQ */
CPLD_CONTROL &= ~(0
| (1<<1) /* Disable LCD */
| (1<<0) /* Enable WLAN */
);
platform_add_devices (lpd7a40x_devs, ARRAY_SIZE (lpd7a40x_devs));
}
......@@ -191,7 +196,7 @@ void __init lh7a40x_init_board_irq (void)
int pinCPLD = (cpld_version == 0x28) ? 7 : 3;
#if defined CONFIG_MACH_LPD7A404
cpld_version = 0x34; /* Override, for now */
cpld_version = 0x34; /* Coerce LPD7A404 to RevB */
#endif
/* First, configure user controlled GPIOF interrupts */
......@@ -204,7 +209,7 @@ void __init lh7a40x_init_board_irq (void)
/* Then, configure CPLD interrupt */
CPLD_INTERRUPTS = 0x0c; /* Disable all CPLD interrupts */
CPLD_INTERRUPTS = 0x9c; /* Disable all CPLD interrupts */
GPIO_PFDD &= ~(1 << pinCPLD); /* Make input */
GPIO_INTTYPE1 |= (1 << pinCPLD); /* Edge triggered */
GPIO_INTTYPE2 &= ~(1 << pinCPLD); /* Active low */
......
......@@ -158,12 +158,21 @@ static int fcc_enet_set_mac_address(struct net_device *dev, void *addr);
#define PA1_DIRA0 (PA1_RXDAT | PA1_CRS | PA1_COL | PA1_RXER | PA1_RXDV)
#define PA1_DIRA1 (PA1_TXDAT | PA1_TXEN | PA1_TXER)
#ifdef CONFIG_SBC82xx
/* rx is clk9, tx is clk10
*/
#define PC_F1RXCLK ((uint)0x00000100)
#define PC_F1TXCLK ((uint)0x00000200)
#define CMX1_CLK_ROUTE ((uint)0x25000000)
#define CMX1_CLK_MASK ((uint)0xff000000)
#else
/* CLK12 is receive, CLK11 is transmit. These are board specific.
*/
#define PC_F1RXCLK ((uint)0x00000800)
#define PC_F1TXCLK ((uint)0x00000400)
#define CMX1_CLK_ROUTE ((uint)0x3e000000)
#define CMX1_CLK_MASK ((uint)0xff000000)
#endif /* !CONFIG_SBC82xx */
/* I/O Pin assignment for FCC2. I don't yet know the best way to do this,
* but there is little variation among the choices.
......@@ -288,6 +297,8 @@ struct fcc_enet_private {
ushort skb_cur;
ushort skb_dirty;
atomic_t n_pkts; /* Number of packets in tx ring */
/* CPM dual port RAM relative addresses.
*/
cbd_t *rx_bd_base; /* Address of Rx and Tx buffers. */
......@@ -347,6 +358,7 @@ fcc_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct fcc_enet_private *cep = (struct fcc_enet_private *)dev->priv;
volatile cbd_t *bdp;
int idx;
if (!cep->link) {
/* Link is down or autonegotiation is in progress. */
......@@ -379,13 +391,24 @@ fcc_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
bdp->cbd_datlen = skb->len;
bdp->cbd_bufaddr = __pa(skb->data);
spin_lock_irq(&cep->lock);
/* Save skb pointer. */
cep->tx_skbuff[cep->skb_cur] = skb;
idx = cep->skb_cur & TX_RING_MOD_MASK;
if (cep->tx_skbuff[idx]) {
/* This should never happen (any more).
Leave the sanity check in for now... */
printk(KERN_ERR "EEP. cep->tx_skbuff[%d] is %p not NULL in %s\n",
idx, cep->tx_skbuff[idx], __func__);
printk(KERN_ERR "Expect to lose %d bytes of sock space",
cep->tx_skbuff[idx]->truesize);
}
cep->tx_skbuff[idx] = skb;
cep->stats.tx_bytes += skb->len;
cep->skb_cur = (cep->skb_cur+1) & TX_RING_MOD_MASK;
cep->skb_cur++;
spin_lock_irq(&cep->lock);
atomic_inc(&cep->n_pkts);
/* Send it on its way. Tell CPM its ready, interrupt when done,
* its the last BD of the frame, and to put the CRC on the end.
......@@ -404,9 +427,13 @@ fcc_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
else
bdp++;
if (bdp->cbd_sc & BD_ENET_TX_READY) {
netif_stop_queue(dev);
/* If the tx_ring is full, stop the queue */
if (atomic_read(&cep->n_pkts) >= (TX_RING_SIZE-1)) {
if (!netif_queue_stopped(dev)) {
netif_stop_queue(dev);
cep->tx_full = 1;
}
}
cep->cur_tx = (cbd_t *)bdp;
......@@ -460,6 +487,7 @@ fcc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs)
volatile cbd_t *bdp;
ushort int_events;
int must_restart;
int idx;
cep = (struct fcc_enet_private *)dev->priv;
......@@ -522,8 +550,12 @@ fcc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs)
cep->stats.collisions++;
/* Free the sk buffer associated with this last transmit. */
dev_kfree_skb_irq(cep->tx_skbuff[cep->skb_dirty]);
cep->skb_dirty = (cep->skb_dirty + 1) & TX_RING_MOD_MASK;
idx = cep->skb_dirty & TX_RING_MOD_MASK;
dev_kfree_skb_irq(cep->tx_skbuff[idx]);
cep->tx_skbuff[idx] = NULL;
cep->skb_dirty++;
atomic_dec(&cep->n_pkts);
/* Update pointer to next buffer descriptor to be transmitted. */
if (bdp->cbd_sc & BD_ENET_TX_WRAP)
......@@ -1594,11 +1626,21 @@ init_fcc_param(fcc_info_t *fip, struct net_device *dev,
*/
eap = (unsigned char *)&(ep->fen_paddrh);
for (i=5; i>=0; i--) {
#ifdef CONFIG_SBC82xx
if (i == 5) {
/* bd->bi_enetaddr holds the SCC0 address; the FCC
devices count up from there */
dev->dev_addr[i] = bd->bi_enetaddr[i] & ~3;
dev->dev_addr[i] += 1 + fip->fc_fccnum;
*eap++ = dev->dev_addr[i];
}
#else
if (i == 3) {
dev->dev_addr[i] = bd->bi_enetaddr[i];
dev->dev_addr[i] |= (1 << (7 - fip->fc_fccnum));
*eap++ = dev->dev_addr[i];
}
#endif
else {
*eap++ = dev->dev_addr[i] = bd->bi_enetaddr[i];
}
......@@ -1683,6 +1725,7 @@ init_fcc_param(fcc_info_t *fip, struct net_device *dev,
while (cp->cp_cpcr & CPM_CR_FLG);
cep->skb_cur = cep->skb_dirty = 0;
atomic_set(&cep->n_pkts, 0);
}
/* Let 'er rip.
......
......@@ -475,7 +475,7 @@ static _INLINE_ void receive_chars(ser_info_t *info, struct pt_regs *regs)
if (break_pressed && info->line == sercons.index) {
if (ch != 0 && time_before(jiffies,
break_pressed + HZ*5)) {
handle_sysrq(ch, regs, NULL, NULL);
handle_sysrq(ch, regs, NULL);
break_pressed = 0;
goto ignore_char;
} else
......
......@@ -542,6 +542,15 @@ config EST8260
<http://www.windriver.com/>, but the EST8260 cannot be found on it
and has probably been discontinued or rebadged.
config SBC82xx
bool "SBC82xx"
---help---
SBC PowerQUICC II, single-board computer with MPC82xx CPU
Manufacturer: Wind River Systems, Inc.
Date of Release: May 2003
End of Life: -
URL: <http://www.windriver.com/>
config SBS8260
bool "SBS8260"
......@@ -575,7 +584,7 @@ config EMBEDDEDBOOT
config 8260
bool "MPC8260 CPM Support" if WILLOW
depends on 6xx
default y if TQM8260 || RPXSUPER || EST8260 || SBS8260
default y if TQM8260 || RPXSUPER || EST8260 || SBS8260 || SBC82xx
help
The MPC8260 CPM (Communications Processor Module) is a typical
embedded CPU made by Motorola. Selecting this option means that
......
......@@ -10,6 +10,7 @@
#include <linux/types.h>
#include <linux/config.h>
#include <linux/string.h>
#include <asm/reg.h>
#ifdef CONFIG_8xx
#include <asm/mpc8xx.h>
#endif
......@@ -402,14 +403,18 @@ embed_config(bd_t **bdp)
#ifdef CONFIG_8260
/* Compute 8260 clock values if the rom doesn't provide them.
* We can't compute the internal core frequency (I don't know how to
* do that).
*/
static unsigned char bus2core_8260[] = {
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
3, 2, 2, 2, 4, 4, 5, 9, 6, 11, 8, 10, 3, 12, 7, 2,
6, 5, 13, 2, 14, 4, 15, 2, 3, 11, 8, 10, 16, 12, 7, 2,
};
static void
clk_8260(bd_t *bd)
{
uint scmr, vco_out, clkin;
uint plldf, pllmf, busdf, brgdf, cpmdf;
uint plldf, pllmf, corecnf;
volatile immap_t *ip;
ip = (immap_t *)IMAP_ADDR;
......@@ -423,8 +428,7 @@ clk_8260(bd_t *bd)
*/
plldf = (scmr >> 12) & 1;
pllmf = scmr & 0xfff;
cpmdf = (scmr >> 16) & 0x0f;
busdf = (scmr >> 20) & 0x0f;
corecnf = (scmr >> 24) &0x1f;
/* This is arithmetic from the 8260 manual.
*/
......@@ -433,6 +437,7 @@ clk_8260(bd_t *bd)
bd->bi_vco = vco_out; /* Save for later */
bd->bi_cpmfreq = vco_out / 2; /* CPM Freq, in MHz */
bd->bi_intfreq = bd->bi_busfreq * bus2core_8260[corecnf] / 2;
/* Set Baud rate divisor. The power up default is divide by 16,
* but we set it again here in case it was changed.
......@@ -440,8 +445,79 @@ clk_8260(bd_t *bd)
ip->im_clkrst.car_sccr = 1; /* DIV 16 BRG */
bd->bi_brgfreq = vco_out / 16;
}
static unsigned char bus2core_8280[] = {
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
3, 2, 2, 2, 4, 4, 5, 9, 6, 11, 8, 10, 3, 12, 7, 2,
6, 5, 13, 2, 14, 2, 15, 2, 3, 2, 2, 2, 16, 2, 2, 2,
};
static void
clk_8280(bd_t *bd)
{
uint scmr, main_clk, clkin;
uint pllmf, corecnf;
volatile immap_t *ip;
ip = (immap_t *)IMAP_ADDR;
scmr = ip->im_clkrst.car_scmr;
/* The clkin is always bus frequency.
*/
clkin = bd->bi_busfreq;
/* Collect the bits from the scmr.
*/
pllmf = scmr & 0xf;
corecnf = (scmr >> 24) & 0x1f;
/* This is arithmetic from the 8280 manual.
*/
main_clk = clkin * (pllmf + 1);
bd->bi_cpmfreq = main_clk / 2; /* CPM Freq, in MHz */
bd->bi_intfreq = bd->bi_busfreq * bus2core_8280[corecnf] / 2;
/* Set Baud rate divisor. The power up default is divide by 16,
* but we set it again here in case it was changed.
*/
ip->im_clkrst.car_sccr = (ip->im_clkrst.car_sccr & 0x3) | 0x1;
bd->bi_brgfreq = main_clk / 16;
}
#endif
#ifdef CONFIG_SBC82xx
void
embed_config(bd_t **bdp)
{
u_char *cp;
int i;
bd_t *bd;
unsigned long pvr;
bd = *bdp;
bd = &bdinfo;
*bdp = bd;
bd->bi_baudrate = 9600;
bd->bi_memsize = 256 * 1024 * 1024; /* just a guess */
cp = (void*)SBC82xx_MACADDR_NVRAM_SCC1;
memcpy(bd->bi_enetaddr, cp, 6);
/* can busfreq be calculated? */
pvr = mfspr(PVR);
if ((pvr & 0xffff0000) == 0x80820000) {
bd->bi_busfreq = 100000000;
clk_8280(bd);
} else {
bd->bi_busfreq = 66000000;
clk_8260(bd);
}
}
#endif /* SBC82xx */
#if defined(CONFIG_EST8260) || defined(CONFIG_TQM8260)
void
embed_config(bd_t **bdp)
......
......@@ -350,6 +350,14 @@ struct cpu_spec cpu_specs[] = {
32, 32,
__setup_cpu_603
},
{ /* 8280 is a G2_LE (603e core, plus some) */
0x7fff0000, 0x00820000, "8280",
CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB |
CPU_FTR_CAN_NAP | CPU_FTR_HAS_HIGH_BATS,
COMMON_PPC,
32, 32,
__setup_cpu_603
},
{ /* default match, we assume split I/D cache & TB (non-601)... */
0x00000000, 0x00000000, "(generic PPC)",
CPU_FTR_COMMON |
......
......@@ -45,6 +45,7 @@ obj-$(CONFIG_PPLUS) += pplus.o
obj-$(CONFIG_PRPMC750) += prpmc750.o
obj-$(CONFIG_PRPMC800) += prpmc800.o
obj-$(CONFIG_SANDPOINT) += sandpoint.o
obj-$(CONFIG_SBC82xx) += sbc82xx.o
obj-$(CONFIG_SPRUCE) += spruce.o
ifeq ($(CONFIG_SMP),y)
......
/*
* arch/ppc/platforms/sbc82xx.c
*
* SBC82XX platform support
*
* Author: Guy Streeter <streeter@redhat.com>
*
* Derived from: est8260_setup.c by Allen Curtis, ONZ
*
* Copyright 2004 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
#include <linux/config.h>
#include <linux/seq_file.h>
#include <linux/stddef.h>
#include <asm/mpc8260.h>
#include <asm/machdep.h>
#include <asm/io.h>
#include <asm/todc.h>
#include <asm/immap_8260.h>
static void (*callback_setup_arch)(void);
extern unsigned char __res[sizeof(bd_t)];
extern void m8260_init(unsigned long r3, unsigned long r4,
unsigned long r5, unsigned long r6, unsigned long r7);
extern void (*late_time_init)(void);
static int
sbc82xx_show_cpuinfo(struct seq_file *m)
{
bd_t *binfo = (bd_t *)__res;
seq_printf(m, "vendor\t\t: Wind River\n"
"machine\t\t: SBC PowerQUICC II\n"
"\n"
"mem size\t\t: 0x%08lx\n"
"console baud\t\t: %ld\n"
"\n",
binfo->bi_memsize,
binfo->bi_baudrate);
return 0;
}
static void __init
sbc82xx_setup_arch(void)
{
printk("SBC PowerQUICC II Port\n");
callback_setup_arch();
}
TODC_ALLOC();
/*
* Timer init happens before mem_init but after paging init, so we cannot
* directly use ioremap() at that time.
* late_time_init() is call after paging init.
*/
#ifdef CONFIG_GEN_RTC
static void sbc82xx_time_init(void)
{
volatile memctl8260_t *mc = &immr->im_memctl;
TODC_INIT(TODC_TYPE_MK48T59, 0, 0, SBC82xx_TODC_NVRAM_ADDR, 0);
/* Set up CS11 for RTC chip */
mc->memc_br11=0;
mc->memc_or11=0xffff0836;
mc->memc_br11=0x80000801;
todc_info->nvram_data =
(unsigned int)ioremap(todc_info->nvram_data, 0x2000);
BUG_ON(!todc_info->nvram_data);
ppc_md.get_rtc_time = todc_get_rtc_time;
ppc_md.set_rtc_time = todc_set_rtc_time;
ppc_md.nvram_read_val = todc_direct_read_val;
ppc_md.nvram_write_val = todc_direct_write_val;
todc_time_init();
}
#endif /* CONFIG_GEN_RTC */
void __init
platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7)
{
/* Generic 8260 platform initialization */
m8260_init(r3, r4, r5, r6, r7);
/* u-boot may be using one of the FCC Ethernet devices.
Use the MAC address to the SCC. */
__res[offsetof(bd_t, bi_enetaddr[5])] &= ~3;
/* Anything special for this platform */
ppc_md.show_cpuinfo = sbc82xx_show_cpuinfo;
callback_setup_arch = ppc_md.setup_arch;
ppc_md.setup_arch = sbc82xx_setup_arch;
#ifdef CONFIG_GEN_RTC
ppc_md.time_init = NULL;
ppc_md.get_rtc_time = NULL;
ppc_md.set_rtc_time = NULL;
ppc_md.nvram_read_val = NULL;
ppc_md.nvram_write_val = NULL;
late_time_init = sbc82xx_time_init;
#endif /* CONFIG_GEN_RTC */
}
/* Board information for the SBCPowerQUICCII, which should be generic for
* all 8260 boards. The IMMR is now given to us so the hard define
* will soon be removed. All of the clock values are computed from
* the configuration SCMR and the Power-On-Reset word.
*/
#ifndef __PPC_SBC82xx_H__
#define __PPC_SBC82xx_H__
#include <asm/ppcboot.h>
#define IMAP_ADDR 0xf0000000
#define CPM_MAP_ADDR 0xf0000000
#define SBC82xx_TODC_NVRAM_ADDR 0x80000000
#define SBC82xx_MACADDR_NVRAM_FCC1 0x220000c9 /* JP6B */
#define SBC82xx_MACADDR_NVRAM_SCC1 0x220000cf /* JP6A */
#define SBC82xx_MACADDR_NVRAM_FCC2 0x220000d5 /* JP7A */
#define SBC82xx_MACADDR_NVRAM_FCC3 0x220000db /* JP7B */
#define BOOTROM_RESTART_ADDR ((uint)0x40000104)
#endif /* __PPC_SBC82xx_H__ */
......@@ -63,6 +63,7 @@ obj-$(CONFIG_PRPMC750) += open_pic.o indirect_pci.o pci_auto.o \
obj-$(CONFIG_HARRIER) += harrier.o
obj-$(CONFIG_PRPMC800) += open_pic.o indirect_pci.o pci_auto.o
obj-$(CONFIG_SANDPOINT) += i8259.o open_pic.o pci_auto.o todc_time.o
obj-$(CONFIG_SBC82xx) += todc_time.o
obj-$(CONFIG_SPRUCE) += cpc700_pic.o indirect_pci.o pci_auto.o \
todc_time.o
obj-$(CONFIG_8260) += m8260_setup.o ppc8260_pic.o
......
......@@ -390,8 +390,7 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu)
}
/* Fixup atomic count: it exited inside IRQ handler. */
((struct task_struct *)paca[lcpu].xCurrent)->thread_info->preempt_count
= 0;
paca[lcpu].xCurrent->thread_info->preempt_count = 0;
/* Fixup SLB round-robin so next segment (kernel) goes in segment 0 */
paca[lcpu].xStab_data.next_round_robin = 0;
......@@ -817,7 +816,7 @@ static void __init smp_create_idle(unsigned int cpu)
init_idle(p, cpu);
unhash_process(p);
paca[cpu].xCurrent = (u64)p;
paca[cpu].xCurrent = p;
current_set[cpu] = p->thread_info;
}
......@@ -869,7 +868,7 @@ void __devinit smp_prepare_boot_cpu(void)
/* cpu_possible is set up in prom.c */
cpu_set(boot_cpuid, cpu_online_map);
paca[boot_cpuid].xCurrent = (u64)current;
paca[boot_cpuid].xCurrent = current;
current_set[boot_cpuid] = current->thread_info;
}
......
......@@ -466,6 +466,18 @@ SingleStepException(struct pt_regs *regs)
_exception(SIGTRAP, &info, regs);
}
/*
* After we have successfully emulated an instruction, we have to
* check if the instruction was being single-stepped, and if so,
* pretend we got a single-step exception. This was pointed out
* by Kumar Gala. -- paulus
*/
static inline void emulate_single_step(struct pt_regs *regs)
{
if (regs->msr & MSR_SE)
SingleStepException(regs);
}
static void dummy_perf(struct pt_regs *regs)
{
}
......@@ -487,10 +499,8 @@ AlignmentException(struct pt_regs *regs)
fixed = fix_alignment(regs);
if (fixed == 1) {
if (!user_mode(regs))
PPCDBG(PPCDBG_ALIGNFIXUP, "fix alignment at %lx\n",
regs->nip);
regs->nip += 4; /* skip over emulated instruction */
emulate_single_step(regs);
return;
}
......
......@@ -190,6 +190,7 @@ static int tda10045h_fwinfo_count = sizeof(tda10045h_fwinfo) / sizeof(struct fwi
static struct fwinfo tda10046h_fwinfo[] = { {.file_size = 286720,.fw_offset = 0x3c4f9,.fw_size = 24479} };
static int tda10046h_fwinfo_count = sizeof(tda10046h_fwinfo) / sizeof(struct fwinfo);
static int errno;
static int tda1004x_write_byte(struct dvb_i2c_bus *i2c, struct tda1004x_state *tda_state, int reg, int data)
......
......@@ -489,5 +489,13 @@ config MTD_UCLINUX
help
Map driver to support image based filesystems for uClinux.
config MTD_WRSBC8260
tristate "Map driver for WindRiver PowerQUICC II MPC82xx board"
depends on MTD_PARTITIONS && SBC82xx
help
Map driver for WindRiver PowerQUICC II MPC82xx board. Drives
all three flash regions on CS0, CS1 and CS6 if they are configured
correctly by the boot loader.
endmenu
......@@ -56,3 +56,4 @@ obj-$(CONFIG_MTD_BEECH) += beech-mtd.o
obj-$(CONFIG_MTD_ARCTIC) += arctic-mtd.o
obj-$(CONFIG_MTD_H720X) += h720x-flash.o
obj-$(CONFIG_MTD_IXP4XX) += ixp4xx.o
obj-$(CONFIG_MTD_WRSBC8260) += wr_sbc82xx_flash.o
/*
* $Id: wr_sbc82xx_flash.c,v 1.1 2004/06/07 10:21:32 dwmw2 Exp $
*
* Map for flash chips on Wind River PowerQUICC II SBC82xx board.
*
* Copyright (C) 2004 Red Hat, Inc.
*
* Author: David Woodhouse <dwmw2@infradead.org>
*
*/
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <asm/io.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/map.h>
#include <linux/config.h>
#include <linux/mtd/partitions.h>
#include <asm/immap_8260.h>
static struct mtd_info *sbcmtd[3];
static struct mtd_partition *sbcmtd_parts[3];
struct map_info sbc82xx_flash_map[3] = {
{.name = "Boot flash"},
{.name = "Alternate boot flash"},
{.name = "User flash"}
};
static struct mtd_partition smallflash_parts[] = {
{
.name = "space",
.size = 0x100000,
.offset = 0,
}, {
.name = "bootloader",
.size = MTDPART_SIZ_FULL,
.offset = MTDPART_OFS_APPEND,
}
};
static struct mtd_partition bigflash_parts[] = {
{
.name = "bootloader",
.size = 0x80000,
.offset = 0,
}, {
.name = "file system",
.size = MTDPART_SIZ_FULL,
.offset = MTDPART_OFS_APPEND,
}
};
static const char *part_probes[] __initdata = {"cmdlinepart", "RedBoot", NULL};
int __init init_sbc82xx_flash(void)
{
volatile memctl8260_t *mc = &immr->im_memctl;
int bigflash;
int i;
/* First, register the boot flash, whichever we're booting from */
if ((mc->memc_br0 & 0x00001800) == 0x00001800) {
bigflash = 0;
} else if ((mc->memc_br0 & 0x00001800) == 0x00000800) {
bigflash = 1;
} else {
printk(KERN_WARNING "Bus Controller register BR0 is %08x. Cannot determine flash configuration\n", mc->memc_br0);
return 1;
}
/* Set parameters for the big flash chip (CS6 or CS0) */
sbc82xx_flash_map[bigflash].buswidth = 4;
sbc82xx_flash_map[bigflash].size = 0x4000000;
/* Set parameters for the small flash chip (CS0 or CS6) */
sbc82xx_flash_map[!bigflash].buswidth = 1;
sbc82xx_flash_map[!bigflash].size = 0x200000;
/* Set parameters for the user flash chip (CS1) */
sbc82xx_flash_map[2].buswidth = 4;
sbc82xx_flash_map[2].size = 0x4000000;
sbc82xx_flash_map[0].phys = mc->memc_br0 & 0xffff8000;
sbc82xx_flash_map[1].phys = mc->memc_br6 & 0xffff8000;
sbc82xx_flash_map[2].phys = mc->memc_br1 & 0xffff8000;
for (i=0; i<3; i++) {
int8_t flashcs[3] = { 0, 6, 1 };
int nr_parts;
printk(KERN_NOTICE "PowerQUICC II %s (%ld MiB on CS%d",
sbc82xx_flash_map[i].name, sbc82xx_flash_map[i].size >> 20, flashcs[i]);
if (!sbc82xx_flash_map[i].phys) {
/* We know it can't be at zero. */
printk("): disabled by bootloader.\n");
continue;
}
printk(" at %08lx)\n", sbc82xx_flash_map[i].phys);
sbc82xx_flash_map[i].virt = (unsigned long)ioremap(sbc82xx_flash_map[i].phys, sbc82xx_flash_map[i].size);
if (!sbc82xx_flash_map[i].virt) {
printk("Failed to ioremap\n");
continue;
}
simple_map_init(&sbc82xx_flash_map[i]);
sbcmtd[i] = do_map_probe("cfi_probe", &sbc82xx_flash_map[i]);
if (!sbcmtd[i])
continue;
sbcmtd[i]->owner = THIS_MODULE;
nr_parts = parse_mtd_partitions(sbcmtd[i], part_probes,
&sbcmtd_parts[i], 0);
if (nr_parts > 0) {
add_mtd_partitions (sbcmtd[i], sbcmtd_parts[i], nr_parts);
continue;
}
/* No partitioning detected. Use default */
if (i == 2) {
add_mtd_device(sbcmtd[i]);
} else if (i == bigflash) {
add_mtd_partitions (sbcmtd[i], bigflash_parts, ARRAY_SIZE(bigflash_parts));
} else {
add_mtd_partitions (sbcmtd[i], smallflash_parts, ARRAY_SIZE(smallflash_parts));
}
}
return 0;
}
static void __exit cleanup_sbc82xx_flash(void)
{
int i;
for (i=0; i<3; i++) {
if (!sbcmtd[i])
continue;
if (i<2 || sbcmtd_parts[i])
del_mtd_partitions(sbcmtd[i]);
else
del_mtd_device(sbcmtd[i]);
kfree(sbcmtd_parts[i]);
map_destroy(sbcmtd[i]);
iounmap((void *)sbc82xx_flash_map[i].virt);
sbc82xx_flash_map[i].virt = 0;
}
}
module_init(init_sbc82xx_flash);
module_exit(cleanup_sbc82xx_flash);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
MODULE_DESCRIPTION("Flash map driver for WindRiver PowerQUICC II");
......@@ -287,6 +287,7 @@ struct net_device *__init mc32_probe(int unit)
}
}
free_netdev(dev);
return ERR_PTR(-ENODEV);
}
......
......@@ -242,7 +242,7 @@ static void cleanup_card(struct net_device *dev)
{
#ifdef CONFIG_MCA
struct net_local *lp = netdev_priv(dev);
if (lp->mca_slot)
if (lp->mca_slot >= 0)
mca_mark_as_unused(lp->mca_slot);
#endif
free_irq(dev->irq, NULL);
......@@ -444,11 +444,11 @@ static int __init at1700_probe1(struct net_device *dev, int ioaddr)
break;
}
if (i == 8) {
goto err_out;
goto err_mca;
}
} else {
if (fmv18x_probe_list[inb(ioaddr + IOCONFIG) & 0x07] != ioaddr)
goto err_out;
goto err_mca;
irq = fmv_irqmap[(inb(ioaddr + IOCONFIG)>>6) & 0x03];
}
}
......@@ -546,11 +546,16 @@ static int __init at1700_probe1(struct net_device *dev, int ioaddr)
if (ret) {
printk (" AT1700 at %#3x is unusable due to a conflict on"
"IRQ %d.\n", ioaddr, irq);
goto err_out;
goto err_mca;
}
return 0;
err_mca:
#ifdef CONFIG_MCA
if (slot >= 0)
mca_mark_as_unused(slot);
#endif
err_out:
#ifndef CONFIG_X86_PC9800
release_region(ioaddr, AT1700_IO_EXTENT);
......
......@@ -52,7 +52,7 @@
char e1000_driver_name[] = "e1000";
char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver";
char e1000_driver_version[] = "5.2.52-k2";
char e1000_driver_version[] = "5.2.52-k4";
char e1000_copyright[] = "Copyright (c) 1999-2004 Intel Corporation.";
/* e1000_pci_tbl - PCI Device ID Table
......@@ -2143,6 +2143,7 @@ e1000_clean(struct net_device *netdev, int *budget)
if(work_done < work_to_do || !netif_running(netdev)) {
netif_rx_complete(netdev);
e1000_irq_enable(adapter);
return 0;
}
return (work_done >= work_to_do);
......
......@@ -66,12 +66,15 @@
LK1.1.14 (Kryzsztof Halasa):
* fix spurious bad initializations
* pound phy a la SMSC's app note on the subject
AC1.1.14ac
* fix power up/down for ethtool that broke in 1.11
*/
#define DRV_NAME "epic100"
#define DRV_VERSION "1.11+LK1.1.14"
#define DRV_RELDATE "Aug 4, 2002"
#define DRV_VERSION "1.11+LK1.1.14+AC1.1.14"
#define DRV_RELDATE "June 2, 2004"
/* The user-configurable values.
These may be modified when a driver module is loaded.*/
......@@ -1424,6 +1427,27 @@ static void netdev_set_msglevel(struct net_device *dev, u32 value)
debug = value;
}
static int ethtool_begin(struct net_device *dev)
{
unsigned long ioaddr = dev->base_addr;
/* power-up, if interface is down */
if (! netif_running(dev)) {
outl(0x0200, ioaddr + GENCTL);
outl((inl(ioaddr + NVCTL) & ~0x003C) | 0x4800, ioaddr + NVCTL);
}
return 0;
}
static void ethtool_complete(struct net_device *dev)
{
unsigned long ioaddr = dev->base_addr;
/* power-down, if interface is down */
if (! netif_running(dev)) {
outl(0x0008, ioaddr + GENCTL);
outl((inl(ioaddr + NVCTL) & ~0x483C) | 0x0000, ioaddr + NVCTL);
}
}
static struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo = netdev_get_drvinfo,
.get_settings = netdev_get_settings,
......@@ -1434,6 +1458,8 @@ static struct ethtool_ops netdev_ethtool_ops = {
.set_msglevel = netdev_set_msglevel,
.get_sg = ethtool_op_get_sg,
.get_tx_csum = ethtool_op_get_tx_csum,
.begin = ethtool_begin,
.complete = ethtool_complete
};
static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
......
......@@ -133,6 +133,10 @@ int tulip_poll(struct net_device *dev, int *budget)
tp->rx_ring[entry].status);
do {
if (inl(dev->base_addr + CSR5) == 0xffffffff) {
printk(KERN_DEBUG " In tulip_poll(), hardware disappeared.\n");
break;
}
/* Acknowledge current RX interrupt sources. */
outl((RxIntr | RxNoBuf), dev->base_addr + CSR5);
......
......@@ -259,6 +259,7 @@ config SERIAL_S3C2410
config SERIAL_S3C2410_CONSOLE
bool "Support for console on S3C2410 serial port"
depends on SERIAL_S3C2410=y
select SERIAL_CORE_CONSOLE
help
Allow selection of the S3C2410 on-board serial ports for use as
an virtual console.
......
......@@ -719,7 +719,7 @@ static int proc_connectinfo(struct dev_state *ps, void __user *arg)
static int proc_resetdevice(struct dev_state *ps)
{
return usb_reset_device(ps->dev);
return __usb_reset_device(ps->dev);
}
......
......@@ -108,7 +108,7 @@ config USB_OV511
config USB_PWC
tristate "USB Philips Cameras"
depends on USB && VIDEO_DEV && BROKEN
depends on USB && VIDEO_DEV
---help---
Say Y or M here if you want to use one of these Philips & OEM
webcams:
......
......@@ -129,7 +129,6 @@ static struct {
static int pwc_video_open(struct inode *inode, struct file *file);
static int pwc_video_close(struct inode *inode, struct file *file);
static int pwc_video_release(struct video_device *);
static ssize_t pwc_video_read(struct file *file, char *buf,
size_t count, loff_t *ppos);
static unsigned int pwc_video_poll(struct file *file, poll_table *wait);
......@@ -1121,12 +1120,6 @@ static int pwc_video_close(struct inode *inode, struct file *file)
return 0;
}
static int pwc_video_release(struct video_device *vfd)
{
Trace(TRACE_OPEN, "pwc_video_release() called. Now what?\n");
}
/*
* FIXME: what about two parallel reads ????
* ANSWER: Not supported. You can't open the device more than once,
......@@ -1855,7 +1848,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
}
}
pdev->vdev.release = pwc_video_release;
pdev->vdev.release = video_device_release;
i = video_register_device(&pdev->vdev, VFL_TYPE_GRABBER, video_nr);
if (i < 0) {
Err("Failed to register as video device (%d).\n", i);
......
......@@ -109,7 +109,7 @@ struct cyberjack_private {
short rdtodo; /* Bytes still to read */
unsigned char wrbuf[5*64]; /* Buffer for collecting data to write */
short wrfilled; /* Overall data size we already got */
short wrsent; /* Data akready sent */
short wrsent; /* Data already sent */
};
/* do some startup allocations not currently performed by usb_serial_probe() */
......@@ -159,8 +159,6 @@ static int cyberjack_open (struct usb_serial_port *port, struct file *filp)
dbg("%s - usb_clear_halt", __FUNCTION__ );
usb_clear_halt(port->serial->dev, port->write_urb->pipe);
usb_clear_halt(port->serial->dev, port->read_urb->pipe);
usb_clear_halt(port->serial->dev, port->interrupt_in_urb->pipe);
/* force low_latency on so that our tty_push actually forces
* the data through, otherwise it is scheduled, and with high
......@@ -212,7 +210,6 @@ static int cyberjack_write (struct usb_serial_port *port, int from_user, const u
unsigned long flags;
int result;
int wrexpected;
unsigned char localbuf[CYBERJACK_LOCAL_BUF_SIZE]; /* Buffer for collecting data to write */
dbg("%s - port %d", __FUNCTION__, port->number);
dbg("%s - from_user %d", __FUNCTION__, from_user);
......@@ -229,29 +226,23 @@ static int cyberjack_write (struct usb_serial_port *port, int from_user, const u
spin_lock_irqsave(&priv->lock, flags);
if( (count+priv->wrfilled)>sizeof(priv->wrbuf) ||
(count>sizeof(localbuf)) ) {
/* To much data for buffer. Reset buffer. */
if( (count+priv->wrfilled)>sizeof(priv->wrbuf) ) {
/* To much data for buffer. Reset buffer. */
priv->wrfilled=0;
spin_unlock_irqrestore(&priv->lock, flags);
return (0);
}
spin_unlock_irqrestore(&priv->lock, flags);
/* Copy data */
if (from_user) {
if (copy_from_user(localbuf, buf, count)) {
if (copy_from_user(priv->wrbuf+priv->wrfilled, buf, count)) {
spin_unlock_irqrestore(&priv->lock, flags);
return -EFAULT;
}
} else {
memcpy (localbuf, buf, count);
memcpy (priv->wrbuf+priv->wrfilled, buf, count);
}
spin_lock_irqsave(&priv->lock, flags);
memcpy (priv->wrbuf+priv->wrfilled, localbuf, count);
usb_serial_debug_data (__FILE__, __FUNCTION__, count,
priv->wrbuf+priv->wrfilled);
priv->wrfilled += count;
......
......@@ -37,10 +37,10 @@ typedef struct { volatile u32 offset[4096]; } __regbase;
# define __REGP(x) ((__regbase *)((x)&~4095))->offset[((x)&4095)>>2]
# define __REG(x) __REGP(io_p2v(x))
typedef struct { volatile u16 offset[4096]; } __regbase16;
# define __REGP16(x) ((__regbase16 *)((x)&~4095))->offset[((x)&4095)>>2]
# define __REGP16(x) ((__regbase16 *)((x)&~4095))->offset[((x)&4095)>>1]
# define __REG16(x) __REGP16(io_p2v(x))
typedef struct { volatile u8 offset[4096]; } __regbase8;
# define __REGP8(x) ((__regbase8 *)((x)&~4095))->offset[((x)&4095)>>2]
# define __REGP8(x) ((__regbase8 *)((x)&~4095))->offset[(x)&4095]
# define __REG8(x) __REGP8(io_p2v(x))
#endif
......
......@@ -574,12 +574,7 @@
#define S3C2410_EINFLT2 S3C2410_GPIOREG(0x9C)
#define S3C2410_EINFLT3 S3C2410_GPIOREG(0xA0)
/* mask: 0=enable, 1=disable
* 1 bit EINT, 4=EINT4, 23=EINT23
* EINT0,1,2,3 are not handled here.
*/
#define S3C2410_EINTMASK S3C2410_GPIOREG(0xA4)
#define S3C2410_EINTPEND S3C2410_GPIOREG(0xA8)
/* removed EINTxxxx defs from here, not meant for this */
/* GSTATUS have miscellaneous information in them
*
......
......@@ -32,6 +32,11 @@
#define S3C2410_SUBSRCPND S3C2410_IRQREG(0x018)
#define S3C2410_INTSUBMSK S3C2410_IRQREG(0x01C)
/* mask: 0=enable, 1=disable
* 1 bit EINT, 4=EINT4, 23=EINT23
* EINT0,1,2,3 are not handled here.
*/
#define S3C2410_EINTMASK S3C2410_EINTREG(0x0A4)
#define S3C2410_EINTPEND S3C2410_EINTREG(0X0A8)
......
......@@ -16,6 +16,10 @@
#include <platforms/est8260.h>
#endif
#ifdef CONFIG_SBC82xx
#include <platforms/sbc82xx.h>
#endif
#ifdef CONFIG_SBS8260
#include <platforms/sbs8260.h>
#endif
......
......@@ -8,13 +8,11 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Use r13 for current since the ppc64 ABI reserves it - Anton
*/
#include <asm/thread_info.h>
#define get_current() ((struct task_struct *)(get_paca()->xCurrent))
#define get_current() (get_paca()->xCurrent)
#define current get_current()
#endif /* !(_PPC64_CURRENT_H) */
......@@ -37,6 +37,8 @@ extern struct paca_struct paca[];
register struct paca_struct *local_paca asm("r13");
#define get_paca() local_paca
struct task_struct;
/*============================================================================
* Name_______: paca
*
......@@ -59,7 +61,7 @@ struct paca_struct {
*/
struct ItLpPaca *xLpPacaPtr; /* Pointer to LpPaca for PLIC 0x00 */
struct ItLpRegSave *xLpRegSavePtr; /* Pointer to LpRegSave for PLIC 0x08 */
u64 xCurrent; /* Pointer to current 0x10 */
struct task_struct *xCurrent; /* Pointer to current 0x10 */
/* Note: the spinlock functions in arch/ppc64/lib/locks.c load lock_token and
xPacaIndex with a single lwz instruction, using the constant offset 24.
If you move either field, fix the spinlocks and rwlocks. */
......
......@@ -351,6 +351,8 @@ struct ethtool_ops {
int (*phys_id)(struct net_device *, u32);
int (*get_stats_count)(struct net_device *);
void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *);
int (*begin)(struct net_device *);
void (*complete)(struct net_device *);
};
/* CMDs currently supported */
......
......@@ -17,5 +17,4 @@
#define NF_ARP_FORWARD 2
#define NF_ARP_NUMHOOKS 3
static DECLARE_MUTEX(arpt_mutex);
#endif /* __LINUX_ARP_NETFILTER_H */
......@@ -183,6 +183,9 @@ struct tcp_info
__u32 tcpi_snd_cwnd;
__u32 tcpi_advmss;
__u32 tcpi_reordering;
__u32 tcpi_rcv_rtt;
__u32 tcpi_rcv_space;
};
#ifdef __KERNEL__
......@@ -351,11 +354,11 @@ struct tcp_opt {
__u8 urg_mode; /* In urgent mode */
__u32 snd_up; /* Urgent pointer */
/* The syn_wait_lock is necessary only to avoid tcp_get_info having
/* The syn_wait_lock is necessary only to avoid proc interface having
* to grab the main lock sock while browsing the listening hash
* (otherwise it's deadlock prone).
* This lock is acquired in read mode only from tcp_get_info() and
* it's acquired in write mode _only_ from code that is actively
* This lock is acquired in read mode only from listening_get_next()
* and it's acquired in write mode _only_ from code that is actively
* changing the syn_wait_queue. All readers that are holding
* the master sock lock don't need to grab this lock in read mode
* too as the syn_wait_queue writes are always protected from
......
......@@ -334,6 +334,7 @@ extern void usb_put_dev(struct usb_device *dev);
/* mostly for devices emulating SCSI over USB */
extern int usb_reset_device(struct usb_device *dev);
extern int __usb_reset_device(struct usb_device *dev);
extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id);
......
......@@ -29,15 +29,15 @@ void rwsemtrace(struct rw_semaphore *sem, const char *str)
/*
* handle the lock being released whilst there are processes blocked on it that can now run
* - if we come here, then:
* - the 'active part' of the count (&0x0000ffff) reached zero but has been re-incremented
* - if we come here from up_xxxx(), then:
* - the 'active part' of the count (&0x0000ffff) had reached zero (but may have changed)
* - the 'waiting part' of the count (&0xffff0000) is negative (and will still be so)
* - there must be someone on the queue
* - the spinlock must be held by the caller
* - woken process blocks are discarded from the list after having task zeroed
* - writers are only woken if wakewrite is non-zero
* - writers are only woken if downgrading is false
*/
static inline struct rw_semaphore *__rwsem_do_wake(struct rw_semaphore *sem, int wakewrite)
static inline struct rw_semaphore *__rwsem_do_wake(struct rw_semaphore *sem, int downgrading)
{
struct rwsem_waiter *waiter;
struct task_struct *tsk;
......@@ -46,10 +46,12 @@ static inline struct rw_semaphore *__rwsem_do_wake(struct rw_semaphore *sem, int
rwsemtrace(sem,"Entering __rwsem_do_wake");
if (!wakewrite)
if (downgrading)
goto dont_wake_writers;
/* only wake someone up if we can transition the active part of the count from 0 -> 1 */
/* if we came through an up_xxxx() call, we only only wake someone up
* if we can transition the active part of the count from 0 -> 1
*/
try_again:
oldcount = rwsem_atomic_update(RWSEM_ACTIVE_BIAS,sem) - RWSEM_ACTIVE_BIAS;
if (oldcount & RWSEM_ACTIVE_MASK)
......@@ -78,9 +80,10 @@ static inline struct rw_semaphore *__rwsem_do_wake(struct rw_semaphore *sem, int
if (waiter->flags & RWSEM_WAITING_FOR_WRITE)
goto out;
/* grant an infinite number of read locks to the readers at the front of the queue
* - note we increment the 'active part' of the count by the number of readers (less one
* for the activity decrement we've already done) before waking any processes up
/* grant an infinite number of read locks to the readers at the front
* of the queue
* - note we increment the 'active part' of the count by the number of
* readers before waking any processes up
*/
readers_only:
woken = 0;
......@@ -95,8 +98,10 @@ static inline struct rw_semaphore *__rwsem_do_wake(struct rw_semaphore *sem, int
} while (waiter->flags & RWSEM_WAITING_FOR_READ);
loop = woken;
woken *= RWSEM_ACTIVE_BIAS-RWSEM_WAITING_BIAS;
woken -= RWSEM_ACTIVE_BIAS;
woken *= RWSEM_ACTIVE_BIAS - RWSEM_WAITING_BIAS;
if (!downgrading)
woken -= RWSEM_ACTIVE_BIAS; /* we'd already done one increment
* earlier */
rwsem_atomic_add(woken,sem);
next = sem->wait_list.next;
......@@ -150,7 +155,7 @@ static inline struct rw_semaphore *rwsem_down_failed_common(struct rw_semaphore
* - it might even be this process, since the waker takes a more active part
*/
if (!(count & RWSEM_ACTIVE_MASK))
sem = __rwsem_do_wake(sem,1);
sem = __rwsem_do_wake(sem, 0);
spin_unlock(&sem->wait_lock);
......@@ -201,7 +206,7 @@ struct rw_semaphore fastcall __sched *rwsem_down_write_failed(struct rw_semaphor
/*
* handle waking up a waiter on the semaphore
* - up_read has decremented the active part of the count if we come here
* - up_read/up_write has decremented the active part of the count if we come here
*/
struct rw_semaphore fastcall *rwsem_wake(struct rw_semaphore *sem)
{
......@@ -211,7 +216,7 @@ struct rw_semaphore fastcall *rwsem_wake(struct rw_semaphore *sem)
/* do nothing if list empty */
if (!list_empty(&sem->wait_list))
sem = __rwsem_do_wake(sem,1);
sem = __rwsem_do_wake(sem, 0);
spin_unlock(&sem->wait_lock);
......@@ -233,7 +238,7 @@ struct rw_semaphore fastcall *rwsem_downgrade_wake(struct rw_semaphore *sem)
/* do nothing if list empty */
if (!list_empty(&sem->wait_list))
sem = __rwsem_do_wake(sem,0);
sem = __rwsem_do_wake(sem, 1);
spin_unlock(&sem->wait_lock);
......
......@@ -652,6 +652,7 @@ int dev_ethtool(struct ifreq *ifr)
struct net_device *dev = __dev_get_by_name(ifr->ifr_name);
void __user *useraddr = ifr->ifr_data;
u32 ethcmd;
int rc;
/*
* XXX: This can be pushed down into the ethtool_* handlers that
......@@ -669,70 +670,109 @@ int dev_ethtool(struct ifreq *ifr)
if (copy_from_user(&ethcmd, useraddr, sizeof (ethcmd)))
return -EFAULT;
if(dev->ethtool_ops->begin)
if ((rc = dev->ethtool_ops->begin(dev)) < 0)
return rc;
switch (ethcmd) {
case ETHTOOL_GSET:
return ethtool_get_settings(dev, useraddr);
rc = ethtool_get_settings(dev, useraddr);
break;
case ETHTOOL_SSET:
return ethtool_set_settings(dev, useraddr);
rc = ethtool_set_settings(dev, useraddr);
break;
case ETHTOOL_GDRVINFO:
return ethtool_get_drvinfo(dev, useraddr);
rc = ethtool_get_drvinfo(dev, useraddr);
break;
case ETHTOOL_GREGS:
return ethtool_get_regs(dev, useraddr);
rc = ethtool_get_regs(dev, useraddr);
break;
case ETHTOOL_GWOL:
return ethtool_get_wol(dev, useraddr);
rc = ethtool_get_wol(dev, useraddr);
break;
case ETHTOOL_SWOL:
return ethtool_set_wol(dev, useraddr);
rc = ethtool_set_wol(dev, useraddr);
break;
case ETHTOOL_GMSGLVL:
return ethtool_get_msglevel(dev, useraddr);
rc = ethtool_get_msglevel(dev, useraddr);
break;
case ETHTOOL_SMSGLVL:
return ethtool_set_msglevel(dev, useraddr);
rc = ethtool_set_msglevel(dev, useraddr);
break;
case ETHTOOL_NWAY_RST:
return ethtool_nway_reset(dev);
rc = ethtool_nway_reset(dev);
break;
case ETHTOOL_GLINK:
return ethtool_get_link(dev, useraddr);
rc = ethtool_get_link(dev, useraddr);
break;
case ETHTOOL_GEEPROM:
return ethtool_get_eeprom(dev, useraddr);
rc = ethtool_get_eeprom(dev, useraddr);
break;
case ETHTOOL_SEEPROM:
return ethtool_set_eeprom(dev, useraddr);
rc = ethtool_set_eeprom(dev, useraddr);
break;
case ETHTOOL_GCOALESCE:
return ethtool_get_coalesce(dev, useraddr);
rc = ethtool_get_coalesce(dev, useraddr);
break;
case ETHTOOL_SCOALESCE:
return ethtool_set_coalesce(dev, useraddr);
rc = ethtool_set_coalesce(dev, useraddr);
break;
case ETHTOOL_GRINGPARAM:
return ethtool_get_ringparam(dev, useraddr);
rc = ethtool_get_ringparam(dev, useraddr);
break;
case ETHTOOL_SRINGPARAM:
return ethtool_set_ringparam(dev, useraddr);
rc = ethtool_set_ringparam(dev, useraddr);
break;
case ETHTOOL_GPAUSEPARAM:
return ethtool_get_pauseparam(dev, useraddr);
rc = ethtool_get_pauseparam(dev, useraddr);
break;
case ETHTOOL_SPAUSEPARAM:
return ethtool_set_pauseparam(dev, useraddr);
rc = ethtool_set_pauseparam(dev, useraddr);
break;
case ETHTOOL_GRXCSUM:
return ethtool_get_rx_csum(dev, useraddr);
rc = ethtool_get_rx_csum(dev, useraddr);
break;
case ETHTOOL_SRXCSUM:
return ethtool_set_rx_csum(dev, useraddr);
rc = ethtool_set_rx_csum(dev, useraddr);
break;
case ETHTOOL_GTXCSUM:
return ethtool_get_tx_csum(dev, useraddr);
rc = ethtool_get_tx_csum(dev, useraddr);
break;
case ETHTOOL_STXCSUM:
return ethtool_set_tx_csum(dev, useraddr);
rc = ethtool_set_tx_csum(dev, useraddr);
break;
case ETHTOOL_GSG:
return ethtool_get_sg(dev, useraddr);
rc = ethtool_get_sg(dev, useraddr);
break;
case ETHTOOL_SSG:
return ethtool_set_sg(dev, useraddr);
rc = ethtool_set_sg(dev, useraddr);
break;
case ETHTOOL_GTSO:
return ethtool_get_tso(dev, useraddr);
rc = ethtool_get_tso(dev, useraddr);
break;
case ETHTOOL_STSO:
return ethtool_set_tso(dev, useraddr);
rc = ethtool_set_tso(dev, useraddr);
break;
case ETHTOOL_TEST:
return ethtool_self_test(dev, useraddr);
rc = ethtool_self_test(dev, useraddr);
break;
case ETHTOOL_GSTRINGS:
return ethtool_get_strings(dev, useraddr);
rc = ethtool_get_strings(dev, useraddr);
break;
case ETHTOOL_PHYS_ID:
return ethtool_phys_id(dev, useraddr);
rc = ethtool_phys_id(dev, useraddr);
break;
case ETHTOOL_GSTATS:
return ethtool_get_stats(dev, useraddr);
rc = ethtool_get_stats(dev, useraddr);
break;
default:
return -EOPNOTSUPP;
rc = -EOPNOTSUPP;
}
if(dev->ethtool_ops->complete)
dev->ethtool_ops->complete(dev);
return rc;
ioctl:
if (dev->do_ioctl)
......
......@@ -62,6 +62,8 @@ do { \
#include <linux/netfilter_ipv4/lockhelp.h>
#include <linux/netfilter_ipv4/listhelp.h>
static DECLARE_MUTEX(arpt_mutex);
struct arpt_table_info {
unsigned int size;
unsigned int number;
......
......@@ -91,6 +91,9 @@ void tcp_get_info(struct sock *sk, struct tcp_info *info)
info->tcpi_snd_cwnd = tp->snd_cwnd;
info->tcpi_advmss = tp->advmss;
info->tcpi_reordering = tp->reordering;
info->tcpi_rcv_rtt = ((1000000*tp->rcv_rtt_est.rtt)/HZ)>>3;
info->tcpi_rcv_space = tp->rcvq_space.space;
}
static int tcpdiag_fill(struct sk_buff *skb, struct sock *sk,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment