Commit 5f8fe427 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://repo.or.cz/cris-mirror

* 'for-linus' of git://repo.or.cz/cris-mirror:
  CRIS: Cleanup linker script using new linker script macros.
  ARRAY_SIZE changes
  CRIS: convert to asm-generic/hardirq.h
  CRISv10: Don't autonegotiate if autonegotiation is off
  CRIS: fix defconfig build failure
  CRIS: add pgprot_noncached
parents d9fbd9a2 24924ece
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
extern void update_xtime_from_cmos(void); extern void update_xtime_from_cmos(void);
extern int set_rtc_mmss(unsigned long nowtime); extern int set_rtc_mmss(unsigned long nowtime);
extern int setup_irq(int, struct irqaction *);
extern int have_rtc; extern int have_rtc;
unsigned long get_ns_in_jiffie(void) unsigned long get_ns_in_jiffie(void)
......
...@@ -52,8 +52,6 @@ static struct mm_struct* flush_mm; ...@@ -52,8 +52,6 @@ static struct mm_struct* flush_mm;
static struct vm_area_struct* flush_vma; static struct vm_area_struct* flush_vma;
static unsigned long flush_addr; static unsigned long flush_addr;
extern int setup_irq(int, struct irqaction *);
/* Mode registers */ /* Mode registers */
static unsigned long irq_regs[NR_CPUS] = { static unsigned long irq_regs[NR_CPUS] = {
regi_irq, regi_irq,
......
...@@ -46,7 +46,6 @@ unsigned long timer_regs[NR_CPUS] = ...@@ -46,7 +46,6 @@ unsigned long timer_regs[NR_CPUS] =
extern void update_xtime_from_cmos(void); extern void update_xtime_from_cmos(void);
extern int set_rtc_mmss(unsigned long nowtime); extern int set_rtc_mmss(unsigned long nowtime);
extern int setup_irq(int, struct irqaction *);
extern int have_rtc; extern int have_rtc;
#ifdef CONFIG_CPU_FREQ #ifdef CONFIG_CPU_FREQ
......
...@@ -36,7 +36,7 @@ struct crisv32_ioport crisv32_ioports[] = { ...@@ -36,7 +36,7 @@ struct crisv32_ioport crisv32_ioports[] = {
}, },
}; };
#define NBR_OF_PORTS sizeof(crisv32_ioports)/sizeof(struct crisv32_ioport) #define NBR_OF_PORTS ARRAY_SIZE(crisv32_ioports)
struct crisv32_iopin crisv32_led_net0_green; struct crisv32_iopin crisv32_led_net0_green;
struct crisv32_iopin crisv32_led_net0_red; struct crisv32_iopin crisv32_led_net0_red;
......
...@@ -52,7 +52,7 @@ struct crisv32_ioport crisv32_ioports[] = { ...@@ -52,7 +52,7 @@ struct crisv32_ioport crisv32_ioports[] = {
} }
}; };
#define NBR_OF_PORTS sizeof(crisv32_ioports)/sizeof(struct crisv32_ioport) #define NBR_OF_PORTS ARRAY_SIZE(crisv32_ioports)
struct crisv32_iopin crisv32_led_net0_green; struct crisv32_iopin crisv32_led_net0_green;
struct crisv32_iopin crisv32_led_net0_red; struct crisv32_iopin crisv32_led_net0_red;
......
...@@ -33,10 +33,10 @@ typedef struct ...@@ -33,10 +33,10 @@ typedef struct
/* CRIS PTE bits (see R_TLB_LO in the register description) /* CRIS PTE bits (see R_TLB_LO in the register description)
* *
* Bit: 31-13 12-------4 3 2 1 0 * Bit: 31 30-13 12-------4 3 2 1 0
* ________________________________________________ * _______________________________________________________
* | pfn | reserved | global | valid | kernel | we | * | cache |pfn | reserved | global | valid | kernel | we |
* |_____|__________|________|_______|________|_____| * |_______|____|__________|________|_______|________|_____|
* *
* (pfn = physical frame number) * (pfn = physical frame number)
*/ */
...@@ -53,6 +53,7 @@ typedef struct ...@@ -53,6 +53,7 @@ typedef struct
#define _PAGE_VALID (1<<2) /* page is valid */ #define _PAGE_VALID (1<<2) /* page is valid */
#define _PAGE_SILENT_READ (1<<2) /* synonym */ #define _PAGE_SILENT_READ (1<<2) /* synonym */
#define _PAGE_GLOBAL (1<<3) /* global page - context is ignored */ #define _PAGE_GLOBAL (1<<3) /* global page - context is ignored */
#define _PAGE_NO_CACHE (1<<31) /* part of the uncached memory map */
/* Bits the HW doesn't care about but the kernel uses them in SW */ /* Bits the HW doesn't care about but the kernel uses them in SW */
......
...@@ -28,10 +28,10 @@ typedef struct ...@@ -28,10 +28,10 @@ typedef struct
/* /*
* CRISv32 PTE bits: * CRISv32 PTE bits:
* *
* Bit: 31-13 12-5 4 3 2 1 0 * Bit: 31 30-13 12-5 4 3 2 1 0
* +-----+------+--------+-------+--------+-------+---------+ * +-------+-----+------+--------+-------+--------+-------+---------+
* | pfn | zero | global | valid | kernel | write | execute | * | cache | pfn | zero | global | valid | kernel | write | execute |
* +-----+------+--------+-------+--------+-------+---------+ * +-------+-----+------+--------+-------+--------+-------+---------+
*/ */
/* /*
...@@ -45,6 +45,8 @@ typedef struct ...@@ -45,6 +45,8 @@ typedef struct
#define _PAGE_VALID (1 << 3) /* Page is valid. */ #define _PAGE_VALID (1 << 3) /* Page is valid. */
#define _PAGE_SILENT_READ (1 << 3) /* Same as above. */ #define _PAGE_SILENT_READ (1 << 3) /* Same as above. */
#define _PAGE_GLOBAL (1 << 4) /* Global page. */ #define _PAGE_GLOBAL (1 << 4) /* Global page. */
#define _PAGE_NO_CACHE (1 << 31) /* part of the uncached memory map */
/* /*
* The hardware doesn't care about these bits, but the kernel uses them in * The hardware doesn't care about these bits, but the kernel uses them in
......
...@@ -2,16 +2,6 @@ ...@@ -2,16 +2,6 @@
#define __ASM_HARDIRQ_H #define __ASM_HARDIRQ_H
#include <asm/irq.h> #include <asm/irq.h>
#include <linux/threads.h>
#include <linux/cache.h>
typedef struct {
unsigned int __softirq_pending;
} ____cacheline_aligned irq_cpustat_t;
#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
void ack_bad_irq(unsigned int irq);
#define HARDIRQ_BITS 8 #define HARDIRQ_BITS 8
...@@ -24,4 +14,6 @@ void ack_bad_irq(unsigned int irq); ...@@ -24,4 +14,6 @@ void ack_bad_irq(unsigned int irq);
# error HARDIRQ_BITS is too low! # error HARDIRQ_BITS is too low!
#endif #endif
#include <asm-generic/hardirq.h>
#endif /* __ASM_HARDIRQ_H */ #endif /* __ASM_HARDIRQ_H */
...@@ -197,6 +197,8 @@ static inline pte_t __mk_pte(void * page, pgprot_t pgprot) ...@@ -197,6 +197,8 @@ static inline pte_t __mk_pte(void * page, pgprot_t pgprot)
static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
{ pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); return pte; } { pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); return pte; }
#define pgprot_noncached(prot) __pgprot((pgprot_val(prot) | _PAGE_NO_CACHE))
/* pte_val refers to a page in the 0x4xxxxxxx physical DRAM interval /* pte_val refers to a page in the 0x4xxxxxxx physical DRAM interval
* __pte_page(pte_val) refers to the "virtual" DRAM interval * __pte_page(pte_val) refers to the "virtual" DRAM interval
......
...@@ -38,11 +38,6 @@ ...@@ -38,11 +38,6 @@
#include <asm/io.h> #include <asm/io.h>
void ack_bad_irq(unsigned int irq)
{
printk("unexpected IRQ trap at vector %02x\n", irq);
}
int show_interrupts(struct seq_file *p, void *v) int show_interrupts(struct seq_file *p, void *v)
{ {
int i = *(loff_t *) v, j; int i = *(loff_t *) v, j;
......
...@@ -51,10 +51,7 @@ SECTIONS ...@@ -51,10 +51,7 @@ SECTIONS
_etext = . ; /* End of text section. */ _etext = . ; /* End of text section. */
__etext = .; __etext = .;
. = ALIGN(4); /* Exception table. */ EXCEPTION_TABLE(4)
__start___ex_table = .;
__ex_table : { *(__ex_table) }
__stop___ex_table = .;
RODATA RODATA
...@@ -67,36 +64,24 @@ SECTIONS ...@@ -67,36 +64,24 @@ SECTIONS
__edata = . ; /* End of data section. */ __edata = . ; /* End of data section. */
_edata = . ; _edata = . ;
. = ALIGN(PAGE_SIZE); /* init_task and stack, must be aligned. */ INIT_TASK_DATA_SECTION(PAGE_SIZE)
.data.init_task : { *(.data.init_task) }
. = ALIGN(PAGE_SIZE); /* Init code and data. */ . = ALIGN(PAGE_SIZE); /* Init code and data. */
__init_begin = .; __init_begin = .;
.init.text : { INIT_TEXT_SECTION(PAGE_SIZE)
_sinittext = .;
INIT_TEXT
_einittext = .;
}
.init.data : { INIT_DATA } .init.data : { INIT_DATA }
. = ALIGN(16); .init.setup : { INIT_SETUP(16) }
__setup_start = .;
.init.setup : { *(.init.setup) }
__setup_end = .;
#ifdef CONFIG_ETRAX_ARCH_V32 #ifdef CONFIG_ETRAX_ARCH_V32
__start___param = .; __start___param = .;
__param : { *(__param) } __param : { *(__param) }
__stop___param = .; __stop___param = .;
#endif #endif
.initcall.init : { .initcall.init : {
__initcall_start = .; INIT_CALLS
INITCALLS
__initcall_end = .;
} }
.con_initcall.init : { .con_initcall.init : {
__con_initcall_start = .; CON_INITCALL
*(.con_initcall.init)
__con_initcall_end = .;
} }
SECURITY_INIT SECURITY_INIT
...@@ -114,9 +99,7 @@ SECTIONS ...@@ -114,9 +99,7 @@ SECTIONS
PERCPU(PAGE_SIZE) PERCPU(PAGE_SIZE)
.init.ramfs : { .init.ramfs : {
__initramfs_start = .; INIT_RAM_FS
*(.init.ramfs)
__initramfs_end = .;
} }
#endif #endif
...@@ -130,11 +113,7 @@ SECTIONS ...@@ -130,11 +113,7 @@ SECTIONS
__init_end = .; __init_end = .;
__data_end = . ; /* Move to _edata ? */ __data_end = . ; /* Move to _edata ? */
__bss_start = .; /* BSS. */ BSS_SECTION(0, 0, 0)
.bss : {
*(COMMON)
*(.bss)
}
. = ALIGN (0x20); . = ALIGN (0x20);
_end = .; _end = .;
......
...@@ -768,10 +768,24 @@ e100_negotiate(struct net_device* dev) ...@@ -768,10 +768,24 @@ e100_negotiate(struct net_device* dev)
e100_set_mdio_reg(dev, np->mii_if.phy_id, MII_ADVERTISE, data); e100_set_mdio_reg(dev, np->mii_if.phy_id, MII_ADVERTISE, data);
/* Renegotiate with link partner */ data = e100_get_mdio_reg(dev, np->mii_if.phy_id, MII_BMCR);
if (autoneg_normal) { if (autoneg_normal) {
data = e100_get_mdio_reg(dev, np->mii_if.phy_id, MII_BMCR); /* Renegotiate with link partner */
data |= BMCR_ANENABLE | BMCR_ANRESTART; data |= BMCR_ANENABLE | BMCR_ANRESTART;
} else {
/* Don't negotiate speed or duplex */
data &= ~(BMCR_ANENABLE | BMCR_ANRESTART);
/* Set speed and duplex static */
if (current_speed_selection == 10)
data &= ~BMCR_SPEED100;
else
data |= BMCR_SPEED100;
if (current_duplex != full)
data &= ~BMCR_FULLDPLX;
else
data |= BMCR_FULLDPLX;
} }
e100_set_mdio_reg(dev, np->mii_if.phy_id, MII_BMCR, data); e100_set_mdio_reg(dev, np->mii_if.phy_id, MII_BMCR, data);
} }
......
...@@ -18,6 +18,7 @@ static char *serial_version = "$Revision: 1.25 $"; ...@@ -18,6 +18,7 @@ static char *serial_version = "$Revision: 1.25 $";
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/tty_flip.h> #include <linux/tty_flip.h>
#include <linux/major.h> #include <linux/major.h>
#include <linux/smp_lock.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/fcntl.h> #include <linux/fcntl.h>
#include <linux/mm.h> #include <linux/mm.h>
......
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