Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310843
b: refs/heads/master
c: 4149268
h: refs/heads/master
i:
  310841: 5c5eab2
  310839: 0c3939e
v: v3
  • Loading branch information
Joern Engel authored and Nicholas Bellinger committed Jun 13, 2012
1 parent 2fbf13d commit 78b68bf
Show file tree
Hide file tree
Showing 213 changed files with 1,244 additions and 3,493 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 718f58ad61810b7d4a6c9178185495f762e90807
refs/heads/master: 4149268e7816d719b0fde8e89aaa6db8c168fc43
44 changes: 19 additions & 25 deletions trunk/Documentation/networking/stmmac.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Currently this network device driver is for all STM embedded MAC/GMAC
(i.e. 7xxx/5xxx SoCs), SPEAr (arm), Loongson1B (mips) and XLINX XC2V3000
FF1152AMT0221 D1215994A VIRTEX FPGA board.

DWC Ether MAC 10/100/1000 Universal version 3.60a (and older) and DWC Ether
MAC 10/100 Universal version 4.0 have been used for developing this driver.
DWC Ether MAC 10/100/1000 Universal version 3.60a (and older) and DWC Ether MAC 10/100
Universal version 4.0 have been used for developing this driver.

This driver supports both the platform bus and PCI.

Expand Down Expand Up @@ -54,27 +54,27 @@ net_device structure enabling the scatter/gather feature.
When one or more packets are received, an interrupt happens. The interrupts
are not queued so the driver has to scan all the descriptors in the ring during
the receive process.
This is based on NAPI so the interrupt handler signals only if there is work
to be done, and it exits.
This is based on NAPI so the interrupt handler signals only if there is work to be
done, and it exits.
Then the poll method will be scheduled at some future point.
The incoming packets are stored, by the DMA, in a list of pre-allocated socket
buffers in order to avoid the memcpy (Zero-copy).

4.3) Timer-Driver Interrupt
Instead of having the device that asynchronously notifies the frame receptions,
the driver configures a timer to generate an interrupt at regular intervals.
Based on the granularity of the timer, the frames that are received by the
device will experience different levels of latency. Some NICs have dedicated
timer device to perform this task. STMMAC can use either the RTC device or the
TMU channel 2 on STLinux platforms.
Instead of having the device that asynchronously notifies the frame receptions, the
driver configures a timer to generate an interrupt at regular intervals.
Based on the granularity of the timer, the frames that are received by the device
will experience different levels of latency. Some NICs have dedicated timer
device to perform this task. STMMAC can use either the RTC device or the TMU
channel 2 on STLinux platforms.
The timers frequency can be passed to the driver as parameter; when change it,
take care of both hardware capability and network stability/performance impact.
Several performance tests on STM platforms showed this optimisation allows to
spare the CPU while having the maximum throughput.
Several performance tests on STM platforms showed this optimisation allows to spare
the CPU while having the maximum throughput.

4.4) WOL
Wake up on Lan feature through Magic and Unicast frames are supported for the
GMAC core.
Wake up on Lan feature through Magic and Unicast frames are supported for the GMAC
core.

4.5) DMA descriptors
Driver handles both normal and enhanced descriptors. The latter has been only
Expand Down Expand Up @@ -106,8 +106,7 @@ Several driver's information can be passed through the platform
These are included in the include/linux/stmmac.h header file
and detailed below as well:

struct plat_stmmacenet_data {
char *phy_bus_name;
struct plat_stmmacenet_data {
int bus_id;
int phy_addr;
int interface;
Expand All @@ -125,24 +124,19 @@ struct plat_stmmacenet_data {
void (*bus_setup)(void __iomem *ioaddr);
int (*init)(struct platform_device *pdev);
void (*exit)(struct platform_device *pdev);
void *custom_cfg;
void *custom_data;
void *bsp_priv;
};

Where:
o phy_bus_name: phy bus name to attach to the stmmac.
o bus_id: bus identifier.
o phy_addr: the physical address can be passed from the platform.
If it is set to -1 the driver will automatically
detect it at run-time by probing all the 32 addresses.
o interface: PHY device's interface.
o mdio_bus_data: specific platform fields for the MDIO bus.
o dma_cfg: internal DMA parameters
o pbl: the Programmable Burst Length is maximum number of beats to
o pbl: the Programmable Burst Length is maximum number of beats to
be transferred in one DMA transaction.
GMAC also enables the 4xPBL by default.
o fixed_burst/mixed_burst/burst_len
o clk_csr: fixed CSR Clock range selection.
o has_gmac: uses the GMAC core.
o enh_desc: if sets the MAC will use the enhanced descriptor structure.
Expand All @@ -166,9 +160,8 @@ Where:
this is sometime necessary on some platforms (e.g. ST boxes)
where the HW needs to have set some PIO lines or system cfg
registers.
o custom_cfg/custom_data: this is a custom configuration that can be passed
while initialising the resources.
o bsp_priv: another private poiter.
o custom_cfg: this is a custom configuration that can be passed while
initialising the resources.

For MDIO bus The we have:

Expand All @@ -187,6 +180,7 @@ Where:
o irqs: list of IRQs, one per PHY.
o probed_phy_irq: if irqs is NULL, use this for probed PHY.


For DMA engine we have the following internal fields that should be
tuned according to the HW capabilities.

Expand Down
16 changes: 4 additions & 12 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1646,11 +1646,11 @@ S: Maintained
F: drivers/gpio/gpio-bt8xx.c

BTRFS FILE SYSTEM
M: Chris Mason <chris.mason@fusionio.com>
M: Chris Mason <chris.mason@oracle.com>
L: linux-btrfs@vger.kernel.org
W: http://btrfs.wiki.kernel.org/
Q: http://patchwork.kernel.org/project/linux-btrfs/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git
S: Maintained
F: Documentation/filesystems/btrfs.txt
F: fs/btrfs/
Expand Down Expand Up @@ -1800,9 +1800,6 @@ F: include/linux/cfag12864b.h
CFG80211 and NL80211
M: Johannes Berg <johannes@sipsolutions.net>
L: linux-wireless@vger.kernel.org
W: http://wireless.kernel.org/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
S: Maintained
F: include/linux/nl80211.h
F: include/net/cfg80211.h
Expand Down Expand Up @@ -4352,8 +4349,7 @@ MAC80211
M: Johannes Berg <johannes@sipsolutions.net>
L: linux-wireless@vger.kernel.org
W: http://linuxwireless.org/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless.git
S: Maintained
F: Documentation/networking/mac80211-injection.txt
F: include/net/mac80211.h
Expand All @@ -4364,8 +4360,7 @@ M: Stefano Brivio <stefano.brivio@polimi.it>
M: Mattias Nissler <mattias.nissler@gmx.de>
L: linux-wireless@vger.kernel.org
W: http://linuxwireless.org/en/developers/Documentation/mac80211/RateControl/PID
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless.git
S: Maintained
F: net/mac80211/rc80211_pid*

Expand Down Expand Up @@ -5716,9 +5711,6 @@ F: include/linux/remoteproc.h
RFKILL
M: Johannes Berg <johannes@sipsolutions.net>
L: linux-wireless@vger.kernel.org
W: http://wireless.kernel.org/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
S: Maintained
F: Documentation/rfkill.txt
F: net/rfkill/
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-omap2/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,9 @@ static struct platform_device *create_simple_dss_pdev(const char *pdev_name,
goto err;
}

r = platform_device_add(pdev);
r = omap_device_register(pdev);
if (r) {
pr_err("Could not register platform_device for %s\n", pdev_name);
pr_err("Could not register omap_device for %s\n", pdev_name);
goto err;
}

Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/m68k/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ config M68K
select GENERIC_IRQ_SHOW
select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
select GENERIC_CPU_DEVICES
select GENERIC_STRNCPY_FROM_USER if MMU
select GENERIC_STRNLEN_USER if MMU
select FPU if MMU
select ARCH_USES_GETTIMEOFFSET if MMU && !COLDFIRE

Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/m68k/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
include include/asm-generic/Kbuild.asm
header-y += cachectl.h

generic-y += word-at-a-time.h
2 changes: 1 addition & 1 deletion trunk/arch/m68k/include/asm/m528xsim.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
/*
* QSPI module.
*/
#define MCFQSPI_BASE (MCF_IPSBAR + 0x340)
#define MCFQSPI_IOBASE (MCF_IPSBAR + 0x340)
#define MCFQSPI_SIZE 0x40

#define MCFQSPI_CS0 147
Expand Down
11 changes: 4 additions & 7 deletions trunk/arch/m68k/include/asm/uaccess_mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -379,15 +379,12 @@ __constant_copy_to_user(void __user *to, const void *from, unsigned long n)
#define copy_from_user(to, from, n) __copy_from_user(to, from, n)
#define copy_to_user(to, from, n) __copy_to_user(to, from, n)

#define user_addr_max() \
(segment_eq(get_fs(), USER_DS) ? TASK_SIZE : ~0UL)

extern long strncpy_from_user(char *dst, const char __user *src, long count);
extern __must_check long strlen_user(const char __user *str);
extern __must_check long strnlen_user(const char __user *str, long n);

long strncpy_from_user(char *dst, const char __user *src, long count);
long strnlen_user(const char __user *src, long n);
unsigned long __clear_user(void __user *to, unsigned long n);

#define clear_user __clear_user

#define strlen_user(str) strnlen_user(str, 32767)

#endif /* _M68K_UACCESS_H */
2 changes: 1 addition & 1 deletion trunk/arch/m68k/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ asmlinkage void syscall_trace(void)
}
}

#if defined(CONFIG_COLDFIRE) || !defined(CONFIG_MMU)
#ifdef CONFIG_COLDFIRE
asmlinkage int syscall_trace_enter(void)
{
int ret = 0;
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/m68k/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void __init time_init(void)
mach_sched_init(timer_interrupt);
}

#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
#ifdef CONFIG_M68KCLASSIC

u32 arch_gettimeoffset(void)
{
Expand All @@ -108,4 +108,4 @@ static int __init rtc_init(void)

module_init(rtc_init);

#endif /* CONFIG_ARCH_USES_GETTIMEOFFSET */
#endif /* CONFIG_M68KCLASSIC */
74 changes: 74 additions & 0 deletions trunk/arch/m68k/lib/uaccess.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,80 @@ unsigned long __generic_copy_to_user(void __user *to, const void *from,
}
EXPORT_SYMBOL(__generic_copy_to_user);

/*
* Copy a null terminated string from userspace.
*/
long strncpy_from_user(char *dst, const char __user *src, long count)
{
long res;
char c;

if (count <= 0)
return count;

asm volatile ("\n"
"1: "MOVES".b (%2)+,%4\n"
" move.b %4,(%1)+\n"
" jeq 2f\n"
" subq.l #1,%3\n"
" jne 1b\n"
"2: sub.l %3,%0\n"
"3:\n"
" .section .fixup,\"ax\"\n"
" .even\n"
"10: move.l %5,%0\n"
" jra 3b\n"
" .previous\n"
"\n"
" .section __ex_table,\"a\"\n"
" .align 4\n"
" .long 1b,10b\n"
" .previous"
: "=d" (res), "+a" (dst), "+a" (src), "+r" (count), "=&d" (c)
: "i" (-EFAULT), "0" (count));

return res;
}
EXPORT_SYMBOL(strncpy_from_user);

/*
* Return the size of a string (including the ending 0)
*
* Return 0 on exception, a value greater than N if too long
*/
long strnlen_user(const char __user *src, long n)
{
char c;
long res;

asm volatile ("\n"
"1: subq.l #1,%1\n"
" jmi 3f\n"
"2: "MOVES".b (%0)+,%2\n"
" tst.b %2\n"
" jne 1b\n"
" jra 4f\n"
"\n"
"3: addq.l #1,%0\n"
"4: sub.l %4,%0\n"
"5:\n"
" .section .fixup,\"ax\"\n"
" .even\n"
"20: sub.l %0,%0\n"
" jra 5b\n"
" .previous\n"
"\n"
" .section __ex_table,\"a\"\n"
" .align 4\n"
" .long 2b,20b\n"
" .previous\n"
: "=&a" (res), "+d" (n), "=&d" (c)
: "0" (src), "r" (src));

return res;
}
EXPORT_SYMBOL(strnlen_user);

/*
* Zero Userspace
*/
Expand Down
6 changes: 2 additions & 4 deletions trunk/arch/m68k/platform/68328/timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
#endif

static u32 m68328_tick_cnt;
static irq_handler_t timer_interrupt;

/***************************************************************************/

Expand All @@ -63,7 +62,7 @@ static irqreturn_t hw_tick(int irq, void *dummy)
TSTAT &= 0;

m68328_tick_cnt += TICKS_PER_JIFFY;
return timer_interrupt(irq, dummy);
return arch_timer_interrupt(irq, dummy);
}

/***************************************************************************/
Expand Down Expand Up @@ -100,7 +99,7 @@ static struct clocksource m68328_clk = {

/***************************************************************************/

void hw_timer_init(irq_handler_t handler)
void hw_timer_init(void)
{
/* disable timer 1 */
TCTL = 0;
Expand All @@ -116,7 +115,6 @@ void hw_timer_init(irq_handler_t handler)
/* Enable timer 1 */
TCTL |= TCTL_TEN;
clocksource_register_hz(&m68328_clk, TICKS_PER_JIFFY*HZ);
timer_interrupt = handler;
}

/***************************************************************************/
Expand Down
7 changes: 2 additions & 5 deletions trunk/arch/m68k/platform/68360/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ extern void m360_cpm_reset(void);
#define OSCILLATOR (unsigned long int)33000000
#endif

static irq_handler_t timer_interrupt;
unsigned long int system_clock;

extern QUICC *pquicc;
Expand All @@ -53,7 +52,7 @@ static irqreturn_t hw_tick(int irq, void *dummy)

pquicc->timer_ter1 = 0x0002; /* clear timer event */

return timer_interrupt(irq, dummy);
return arch_timer_interrupt(irq, dummy);
}

static struct irqaction m68360_timer_irq = {
Expand All @@ -62,7 +61,7 @@ static struct irqaction m68360_timer_irq = {
.handler = hw_tick,
};

void hw_timer_init(irq_handler_t handler)
void hw_timer_init(void)
{
unsigned char prescaler;
unsigned short tgcr_save;
Expand Down Expand Up @@ -95,8 +94,6 @@ void hw_timer_init(irq_handler_t handler)

pquicc->timer_ter1 = 0x0003; /* clear timer events */

timer_interrupt = handler;

/* enable timer 1 interrupt in CIMR */
setup_irq(CPMVEC_TIMER1, &m68360_timer_irq);

Expand Down
Loading

0 comments on commit 78b68bf

Please sign in to comment.