Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [NET] Eliminate user-selectable CONFIG_MV643XX_ETH_[012] [MIPS] Drop __init from init_8259A() [MIPS] Fix Kconfig typo bug [MIPS] Fix double signal on trap and break instruction [MIPS] sigset_32 has been made redundand by compat_sigset_t. [MIPS] emma2rh: Remove needless <asm/i8259.h> inclusion. [MIPS] Add MTD device support for Cobalt
This commit is contained in:
@@ -5,5 +5,6 @@
|
|||||||
obj-y := irq.o reset.o setup.o
|
obj-y := irq.o reset.o setup.o
|
||||||
|
|
||||||
obj-$(CONFIG_EARLY_PRINTK) += console.o
|
obj-$(CONFIG_EARLY_PRINTK) += console.o
|
||||||
|
obj-$(CONFIG_MTD_PHYSMAP) += mtd.o
|
||||||
|
|
||||||
EXTRA_AFLAGS := $(CFLAGS)
|
EXTRA_AFLAGS := $(CFLAGS)
|
||||||
|
61
arch/mips/cobalt/mtd.c
Normal file
61
arch/mips/cobalt/mtd.c
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* Registration of Cobalt MTD device.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
#include <linux/init.h>
|
||||||
|
#include <linux/platform_device.h>
|
||||||
|
#include <linux/mtd/partitions.h>
|
||||||
|
#include <linux/mtd/physmap.h>
|
||||||
|
|
||||||
|
static struct mtd_partition cobalt_mtd_partitions[] = {
|
||||||
|
{
|
||||||
|
.name = "Colo",
|
||||||
|
.offset = 0x0,
|
||||||
|
.size = 0x80000,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct physmap_flash_data cobalt_flash_data = {
|
||||||
|
.width = 1,
|
||||||
|
.nr_parts = 1,
|
||||||
|
.parts = cobalt_mtd_partitions,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct resource cobalt_mtd_resource = {
|
||||||
|
.start = 0x1fc00000,
|
||||||
|
.end = 0x1fc7ffff,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device cobalt_mtd = {
|
||||||
|
.name = "physmap-flash",
|
||||||
|
.dev = {
|
||||||
|
.platform_data = &cobalt_flash_data,
|
||||||
|
},
|
||||||
|
.num_resources = 1,
|
||||||
|
.resource = &cobalt_mtd_resource,
|
||||||
|
};
|
||||||
|
|
||||||
|
static int __init cobalt_mtd_init(void)
|
||||||
|
{
|
||||||
|
platform_device_register(&cobalt_mtd);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
module_init(cobalt_mtd_init);
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Automatically generated make config: don't edit
|
# Automatically generated make config: don't edit
|
||||||
# Linux kernel version: 2.6.20
|
# Linux kernel version: 2.6.20
|
||||||
# Sun Feb 18 21:27:37 2007
|
# Mon Feb 19 14:51:58 2007
|
||||||
#
|
#
|
||||||
CONFIG_MIPS=y
|
CONFIG_MIPS=y
|
||||||
|
|
||||||
@@ -373,7 +373,88 @@ CONFIG_PROC_EVENTS=y
|
|||||||
#
|
#
|
||||||
# Memory Technology Devices (MTD)
|
# Memory Technology Devices (MTD)
|
||||||
#
|
#
|
||||||
# CONFIG_MTD is not set
|
CONFIG_MTD=y
|
||||||
|
# CONFIG_MTD_DEBUG is not set
|
||||||
|
# CONFIG_MTD_CONCAT is not set
|
||||||
|
CONFIG_MTD_PARTITIONS=y
|
||||||
|
# CONFIG_MTD_REDBOOT_PARTS is not set
|
||||||
|
# CONFIG_MTD_CMDLINE_PARTS is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# User Modules And Translation Layers
|
||||||
|
#
|
||||||
|
CONFIG_MTD_CHAR=y
|
||||||
|
CONFIG_MTD_BLKDEVS=y
|
||||||
|
# CONFIG_MTD_BLOCK is not set
|
||||||
|
# CONFIG_MTD_BLOCK_RO is not set
|
||||||
|
# CONFIG_FTL is not set
|
||||||
|
# CONFIG_NFTL is not set
|
||||||
|
# CONFIG_INFTL is not set
|
||||||
|
# CONFIG_RFD_FTL is not set
|
||||||
|
# CONFIG_SSFDC is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# RAM/ROM/Flash chip drivers
|
||||||
|
#
|
||||||
|
# CONFIG_MTD_CFI is not set
|
||||||
|
CONFIG_MTD_JEDECPROBE=y
|
||||||
|
CONFIG_MTD_GEN_PROBE=y
|
||||||
|
# CONFIG_MTD_CFI_ADV_OPTIONS is not set
|
||||||
|
CONFIG_MTD_MAP_BANK_WIDTH_1=y
|
||||||
|
CONFIG_MTD_MAP_BANK_WIDTH_2=y
|
||||||
|
CONFIG_MTD_MAP_BANK_WIDTH_4=y
|
||||||
|
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
|
||||||
|
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
|
||||||
|
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
|
||||||
|
CONFIG_MTD_CFI_I1=y
|
||||||
|
CONFIG_MTD_CFI_I2=y
|
||||||
|
# CONFIG_MTD_CFI_I4 is not set
|
||||||
|
# CONFIG_MTD_CFI_I8 is not set
|
||||||
|
# CONFIG_MTD_CFI_INTELEXT is not set
|
||||||
|
CONFIG_MTD_CFI_AMDSTD=y
|
||||||
|
# CONFIG_MTD_CFI_STAA is not set
|
||||||
|
CONFIG_MTD_CFI_UTIL=y
|
||||||
|
# CONFIG_MTD_RAM is not set
|
||||||
|
# CONFIG_MTD_ROM is not set
|
||||||
|
# CONFIG_MTD_ABSENT is not set
|
||||||
|
# CONFIG_MTD_OBSOLETE_CHIPS is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Mapping drivers for chip access
|
||||||
|
#
|
||||||
|
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
|
||||||
|
CONFIG_MTD_PHYSMAP=y
|
||||||
|
CONFIG_MTD_PHYSMAP_START=0x0
|
||||||
|
CONFIG_MTD_PHYSMAP_LEN=0
|
||||||
|
CONFIG_MTD_PHYSMAP_BANKWIDTH=0
|
||||||
|
# CONFIG_MTD_PLATRAM is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Self-contained MTD device drivers
|
||||||
|
#
|
||||||
|
# CONFIG_MTD_PMC551 is not set
|
||||||
|
# CONFIG_MTD_SLRAM is not set
|
||||||
|
# CONFIG_MTD_PHRAM is not set
|
||||||
|
# CONFIG_MTD_MTDRAM is not set
|
||||||
|
# CONFIG_MTD_BLOCK2MTD is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Disk-On-Chip Device Drivers
|
||||||
|
#
|
||||||
|
# CONFIG_MTD_DOC2000 is not set
|
||||||
|
# CONFIG_MTD_DOC2001 is not set
|
||||||
|
# CONFIG_MTD_DOC2001PLUS is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# NAND Flash Device Drivers
|
||||||
|
#
|
||||||
|
# CONFIG_MTD_NAND is not set
|
||||||
|
# CONFIG_MTD_NAND_CAFE is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# OneNAND Flash Device Drivers
|
||||||
|
#
|
||||||
|
# CONFIG_MTD_ONENAND is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# Parallel port support
|
# Parallel port support
|
||||||
@@ -901,6 +982,7 @@ CONFIG_CONFIGFS_FS=y
|
|||||||
# CONFIG_BEFS_FS is not set
|
# CONFIG_BEFS_FS is not set
|
||||||
# CONFIG_BFS_FS is not set
|
# CONFIG_BFS_FS is not set
|
||||||
# CONFIG_EFS_FS is not set
|
# CONFIG_EFS_FS is not set
|
||||||
|
# CONFIG_JFFS2_FS is not set
|
||||||
# CONFIG_CRAMFS is not set
|
# CONFIG_CRAMFS is not set
|
||||||
# CONFIG_VXFS_FS is not set
|
# CONFIG_VXFS_FS is not set
|
||||||
# CONFIG_HPFS_FS is not set
|
# CONFIG_HPFS_FS is not set
|
||||||
|
@@ -27,7 +27,6 @@
|
|||||||
#include <linux/irq.h>
|
#include <linux/irq.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
|
|
||||||
#include <asm/i8259.h>
|
|
||||||
#include <asm/system.h>
|
#include <asm/system.h>
|
||||||
#include <asm/mipsregs.h>
|
#include <asm/mipsregs.h>
|
||||||
#include <asm/debug.h>
|
#include <asm/debug.h>
|
||||||
|
@@ -29,7 +29,6 @@
|
|||||||
#include <linux/ptrace.h>
|
#include <linux/ptrace.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
|
|
||||||
#include <asm/i8259.h>
|
|
||||||
#include <asm/irq_cpu.h>
|
#include <asm/irq_cpu.h>
|
||||||
#include <asm/system.h>
|
#include <asm/system.h>
|
||||||
#include <asm/mipsregs.h>
|
#include <asm/mipsregs.h>
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
* moves to arch independent land
|
* moves to arch independent land
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int i8259A_auto_eoi;
|
static int i8259A_auto_eoi = -1;
|
||||||
DEFINE_SPINLOCK(i8259A_lock);
|
DEFINE_SPINLOCK(i8259A_lock);
|
||||||
/* some platforms call this... */
|
/* some platforms call this... */
|
||||||
void mask_and_ack_8259A(unsigned int);
|
void mask_and_ack_8259A(unsigned int);
|
||||||
@@ -216,6 +216,7 @@ spurious_8259A_irq:
|
|||||||
|
|
||||||
static int i8259A_resume(struct sys_device *dev)
|
static int i8259A_resume(struct sys_device *dev)
|
||||||
{
|
{
|
||||||
|
if (i8259A_auto_eoi >= 0)
|
||||||
init_8259A(i8259A_auto_eoi);
|
init_8259A(i8259A_auto_eoi);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -226,8 +227,10 @@ static int i8259A_shutdown(struct sys_device *dev)
|
|||||||
* the kernel initialization code can get it
|
* the kernel initialization code can get it
|
||||||
* out of.
|
* out of.
|
||||||
*/
|
*/
|
||||||
|
if (i8259A_auto_eoi >= 0) {
|
||||||
outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */
|
outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */
|
||||||
outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-1 */
|
outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-1 */
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,7 +255,7 @@ static int __init i8259A_init_sysfs(void)
|
|||||||
|
|
||||||
device_initcall(i8259A_init_sysfs);
|
device_initcall(i8259A_init_sysfs);
|
||||||
|
|
||||||
void __init init_8259A(int auto_eoi)
|
void init_8259A(int auto_eoi)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
|
@@ -108,13 +108,6 @@ typedef struct compat_siginfo {
|
|||||||
|
|
||||||
/* 32-bit compatibility types */
|
/* 32-bit compatibility types */
|
||||||
|
|
||||||
#define _NSIG_BPW32 32
|
|
||||||
#define _NSIG_WORDS32 (_NSIG / _NSIG_BPW32)
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
unsigned int sig[_NSIG_WORDS32];
|
|
||||||
} sigset_t32;
|
|
||||||
|
|
||||||
typedef unsigned int __sighandler32_t;
|
typedef unsigned int __sighandler32_t;
|
||||||
typedef void (*vfptr_t)(void);
|
typedef void (*vfptr_t)(void);
|
||||||
|
|
||||||
@@ -136,7 +129,7 @@ struct ucontext32 {
|
|||||||
s32 uc_link;
|
s32 uc_link;
|
||||||
stack32_t uc_stack;
|
stack32_t uc_stack;
|
||||||
struct sigcontext32 uc_mcontext;
|
struct sigcontext32 uc_mcontext;
|
||||||
sigset_t32 uc_sigmask; /* mask last for extensibility */
|
compat_sigset_t uc_sigmask; /* mask last for extensibility */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -704,6 +704,7 @@ asmlinkage void do_bp(struct pt_regs *regs)
|
|||||||
die_if_kernel("Break instruction in kernel code", regs);
|
die_if_kernel("Break instruction in kernel code", regs);
|
||||||
force_sig(SIGTRAP, current);
|
force_sig(SIGTRAP, current);
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
out_sigsegv:
|
out_sigsegv:
|
||||||
force_sig(SIGSEGV, current);
|
force_sig(SIGSEGV, current);
|
||||||
@@ -747,6 +748,7 @@ asmlinkage void do_tr(struct pt_regs *regs)
|
|||||||
die_if_kernel("Trap instruction in kernel code", regs);
|
die_if_kernel("Trap instruction in kernel code", regs);
|
||||||
force_sig(SIGTRAP, current);
|
force_sig(SIGTRAP, current);
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
out_sigsegv:
|
out_sigsegv:
|
||||||
force_sig(SIGSEGV, current);
|
force_sig(SIGSEGV, current);
|
||||||
|
@@ -38,8 +38,6 @@ static struct platform_device mv643xx_eth_shared_device = {
|
|||||||
#define MV64x60_IRQ_ETH_1 49
|
#define MV64x60_IRQ_ETH_1 49
|
||||||
#define MV64x60_IRQ_ETH_2 50
|
#define MV64x60_IRQ_ETH_2 50
|
||||||
|
|
||||||
#ifdef CONFIG_MV643XX_ETH_0
|
|
||||||
|
|
||||||
static struct resource mv64x60_eth0_resources[] = {
|
static struct resource mv64x60_eth0_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.name = "eth0 irq",
|
.name = "eth0 irq",
|
||||||
@@ -72,9 +70,6 @@ static struct platform_device eth0_device = {
|
|||||||
.platform_data = ð0_pd,
|
.platform_data = ð0_pd,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
#endif /* CONFIG_MV643XX_ETH_0 */
|
|
||||||
|
|
||||||
#ifdef CONFIG_MV643XX_ETH_1
|
|
||||||
|
|
||||||
static struct resource mv64x60_eth1_resources[] = {
|
static struct resource mv64x60_eth1_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
@@ -108,9 +103,6 @@ static struct platform_device eth1_device = {
|
|||||||
.platform_data = ð1_pd,
|
.platform_data = ð1_pd,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
#endif /* CONFIG_MV643XX_ETH_1 */
|
|
||||||
|
|
||||||
#ifdef CONFIG_MV643XX_ETH_2
|
|
||||||
|
|
||||||
static struct resource mv64x60_eth2_resources[] = {
|
static struct resource mv64x60_eth2_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
@@ -136,19 +128,12 @@ static struct platform_device eth2_device = {
|
|||||||
.platform_data = ð2_pd,
|
.platform_data = ð2_pd,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
#endif /* CONFIG_MV643XX_ETH_2 */
|
|
||||||
|
|
||||||
static struct platform_device *mv643xx_eth_pd_devs[] __initdata = {
|
static struct platform_device *mv643xx_eth_pd_devs[] __initdata = {
|
||||||
&mv643xx_eth_shared_device,
|
&mv643xx_eth_shared_device,
|
||||||
#ifdef CONFIG_MV643XX_ETH_0
|
|
||||||
ð0_device,
|
ð0_device,
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_MV643XX_ETH_1
|
|
||||||
ð1_device,
|
ð1_device,
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_MV643XX_ETH_2
|
|
||||||
ð2_device,
|
ð2_device,
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static u8 __init exchange_bit(u8 val, u8 cs)
|
static u8 __init exchange_bit(u8 val, u8 cs)
|
||||||
@@ -215,15 +200,9 @@ static int __init mv643xx_eth_add_pds(void)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
get_mac(mac);
|
get_mac(mac);
|
||||||
#ifdef CONFIG_MV643XX_ETH_0
|
|
||||||
eth_mac_add(eth1_mac_addr, mac, 0);
|
eth_mac_add(eth1_mac_addr, mac, 0);
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_MV643XX_ETH_1
|
|
||||||
eth_mac_add(eth1_mac_addr, mac, 1);
|
eth_mac_add(eth1_mac_addr, mac, 1);
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_MV643XX_ETH_2
|
|
||||||
eth_mac_add(eth2_mac_addr, mac, 2);
|
eth_mac_add(eth2_mac_addr, mac, 2);
|
||||||
#endif
|
|
||||||
ret = platform_add_devices(mv643xx_eth_pd_devs,
|
ret = platform_add_devices(mv643xx_eth_pd_devs,
|
||||||
ARRAY_SIZE(mv643xx_eth_pd_devs));
|
ARRAY_SIZE(mv643xx_eth_pd_devs));
|
||||||
|
|
||||||
|
@@ -38,8 +38,6 @@ static struct platform_device mv643xx_eth_shared_device = {
|
|||||||
#define MV64x60_IRQ_ETH_1 49
|
#define MV64x60_IRQ_ETH_1 49
|
||||||
#define MV64x60_IRQ_ETH_2 50
|
#define MV64x60_IRQ_ETH_2 50
|
||||||
|
|
||||||
#ifdef CONFIG_MV643XX_ETH_0
|
|
||||||
|
|
||||||
static struct resource mv64x60_eth0_resources[] = {
|
static struct resource mv64x60_eth0_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.name = "eth0 irq",
|
.name = "eth0 irq",
|
||||||
@@ -72,9 +70,6 @@ static struct platform_device eth0_device = {
|
|||||||
.platform_data = ð0_pd,
|
.platform_data = ð0_pd,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
#endif /* CONFIG_MV643XX_ETH_0 */
|
|
||||||
|
|
||||||
#ifdef CONFIG_MV643XX_ETH_1
|
|
||||||
|
|
||||||
static struct resource mv64x60_eth1_resources[] = {
|
static struct resource mv64x60_eth1_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
@@ -108,9 +103,6 @@ static struct platform_device eth1_device = {
|
|||||||
.platform_data = ð1_pd,
|
.platform_data = ð1_pd,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
#endif /* CONFIG_MV643XX_ETH_1 */
|
|
||||||
|
|
||||||
#ifdef CONFIG_MV643XX_ETH_2
|
|
||||||
|
|
||||||
static struct resource mv64x60_eth2_resources[] = {
|
static struct resource mv64x60_eth2_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
@@ -136,19 +128,12 @@ static struct platform_device eth2_device = {
|
|||||||
.platform_data = ð2_pd,
|
.platform_data = ð2_pd,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
#endif /* CONFIG_MV643XX_ETH_2 */
|
|
||||||
|
|
||||||
static struct platform_device *mv643xx_eth_pd_devs[] __initdata = {
|
static struct platform_device *mv643xx_eth_pd_devs[] __initdata = {
|
||||||
&mv643xx_eth_shared_device,
|
&mv643xx_eth_shared_device,
|
||||||
#ifdef CONFIG_MV643XX_ETH_0
|
|
||||||
ð0_device,
|
ð0_device,
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_MV643XX_ETH_1
|
|
||||||
ð1_device,
|
ð1_device,
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_MV643XX_ETH_2
|
|
||||||
ð2_device,
|
ð2_device,
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static u8 __init exchange_bit(u8 val, u8 cs)
|
static u8 __init exchange_bit(u8 val, u8 cs)
|
||||||
@@ -215,15 +200,9 @@ static int __init mv643xx_eth_add_pds(void)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
get_mac(mac);
|
get_mac(mac);
|
||||||
#ifdef CONFIG_MV643XX_ETH_0
|
|
||||||
eth_mac_add(eth1_mac_addr, mac, 0);
|
eth_mac_add(eth1_mac_addr, mac, 0);
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_MV643XX_ETH_1
|
|
||||||
eth_mac_add(eth1_mac_addr, mac, 1);
|
eth_mac_add(eth1_mac_addr, mac, 1);
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_MV643XX_ETH_2
|
|
||||||
eth_mac_add(eth2_mac_addr, mac, 2);
|
eth_mac_add(eth2_mac_addr, mac, 2);
|
||||||
#endif
|
|
||||||
ret = platform_add_devices(mv643xx_eth_pd_devs,
|
ret = platform_add_devices(mv643xx_eth_pd_devs,
|
||||||
ARRAY_SIZE(mv643xx_eth_pd_devs));
|
ARRAY_SIZE(mv643xx_eth_pd_devs));
|
||||||
|
|
||||||
|
@@ -37,8 +37,6 @@ static struct platform_device mv643xx_eth_shared_device = {
|
|||||||
#define MV64x60_IRQ_ETH_0 48
|
#define MV64x60_IRQ_ETH_0 48
|
||||||
#define MV64x60_IRQ_ETH_1 49
|
#define MV64x60_IRQ_ETH_1 49
|
||||||
|
|
||||||
#ifdef CONFIG_MV643XX_ETH_0
|
|
||||||
|
|
||||||
static struct resource mv64x60_eth0_resources[] = {
|
static struct resource mv64x60_eth0_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.name = "eth0 irq",
|
.name = "eth0 irq",
|
||||||
@@ -71,9 +69,6 @@ static struct platform_device eth0_device = {
|
|||||||
.platform_data = ð0_pd,
|
.platform_data = ð0_pd,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
#endif /* CONFIG_MV643XX_ETH_0 */
|
|
||||||
|
|
||||||
#ifdef CONFIG_MV643XX_ETH_1
|
|
||||||
|
|
||||||
static struct resource mv64x60_eth1_resources[] = {
|
static struct resource mv64x60_eth1_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
@@ -107,16 +102,11 @@ static struct platform_device eth1_device = {
|
|||||||
.platform_data = ð1_pd,
|
.platform_data = ð1_pd,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
#endif /* CONFIG_MV643XX_ETH_1 */
|
|
||||||
|
|
||||||
static struct platform_device *mv643xx_eth_pd_devs[] __initdata = {
|
static struct platform_device *mv643xx_eth_pd_devs[] __initdata = {
|
||||||
&mv643xx_eth_shared_device,
|
&mv643xx_eth_shared_device,
|
||||||
#ifdef CONFIG_MV643XX_ETH_0
|
|
||||||
ð0_device,
|
ð0_device,
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_MV643XX_ETH_1
|
|
||||||
ð1_device,
|
ð1_device,
|
||||||
#endif
|
|
||||||
/* The third port is not wired up on the Ocelot C */
|
/* The third port is not wired up on the Ocelot C */
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -184,12 +174,8 @@ static int __init mv643xx_eth_add_pds(void)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
get_mac(mac);
|
get_mac(mac);
|
||||||
#ifdef CONFIG_MV643XX_ETH_0
|
|
||||||
eth_mac_add(eth1_mac_addr, mac, 0);
|
eth_mac_add(eth1_mac_addr, mac, 0);
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_MV643XX_ETH_1
|
|
||||||
eth_mac_add(eth1_mac_addr, mac, 1);
|
eth_mac_add(eth1_mac_addr, mac, 1);
|
||||||
#endif
|
|
||||||
ret = platform_add_devices(mv643xx_eth_pd_devs,
|
ret = platform_add_devices(mv643xx_eth_pd_devs,
|
||||||
ARRAY_SIZE(mv643xx_eth_pd_devs));
|
ARRAY_SIZE(mv643xx_eth_pd_devs));
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@ config PROFILING
|
|||||||
|
|
||||||
config OPROFILE
|
config OPROFILE
|
||||||
tristate "OProfile system profiling (EXPERIMENTAL)"
|
tristate "OProfile system profiling (EXPERIMENTAL)"
|
||||||
depends on PROFILING && !!MIPS_MT_SMTC && EXPERIMENTAL
|
depends on PROFILING && !MIPS_MT_SMTC && EXPERIMENTAL
|
||||||
help
|
help
|
||||||
OProfile is a profiling system capable of profiling the
|
OProfile is a profiling system capable of profiling the
|
||||||
whole system, include the kernel, kernel modules, libraries,
|
whole system, include the kernel, kernel modules, libraries,
|
||||||
|
@@ -845,6 +845,21 @@ config MV64X60
|
|||||||
select PPC_INDIRECT_PCI
|
select PPC_INDIRECT_PCI
|
||||||
default y
|
default y
|
||||||
|
|
||||||
|
config MV643XX_ETH_0
|
||||||
|
bool
|
||||||
|
depends on MV643XX_ETH && (KATANA || RADSTONE_PPC7D || EV64360 || HDPU)
|
||||||
|
default y
|
||||||
|
|
||||||
|
config MV643XX_ETH_1
|
||||||
|
bool
|
||||||
|
depends on MV643XX_ETH && (KATANA || RADSTONE_PPC7D || EV64360)
|
||||||
|
default y
|
||||||
|
|
||||||
|
config MV643XX_ETH_2
|
||||||
|
bool
|
||||||
|
depends on MV643XX_ETH && (KATANA || RADSTONE_PPC7D || EV64360)
|
||||||
|
default y
|
||||||
|
|
||||||
menu "Set bridge options"
|
menu "Set bridge options"
|
||||||
depends on MV64X60
|
depends on MV64X60
|
||||||
|
|
||||||
|
@@ -409,138 +409,6 @@ static int lcd_ioctl(struct inode *inode, struct file *file,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Erase the flash
|
|
||||||
|
|
||||||
case FLASH_Erase:{
|
|
||||||
|
|
||||||
int ctr = 0;
|
|
||||||
|
|
||||||
if ( !capable(CAP_SYS_ADMIN) ) return -EPERM;
|
|
||||||
|
|
||||||
pr_info(LCD "Erasing Flash\n");
|
|
||||||
|
|
||||||
// Chip Erase Sequence
|
|
||||||
WRITE_FLASH(kFlash_Addr1, kFlash_Data1);
|
|
||||||
WRITE_FLASH(kFlash_Addr2, kFlash_Data2);
|
|
||||||
WRITE_FLASH(kFlash_Addr1, kFlash_Erase3);
|
|
||||||
WRITE_FLASH(kFlash_Addr1, kFlash_Data1);
|
|
||||||
WRITE_FLASH(kFlash_Addr2, kFlash_Data2);
|
|
||||||
WRITE_FLASH(kFlash_Addr1, kFlash_Erase6);
|
|
||||||
|
|
||||||
while ((!dqpoll(0x00000000, 0xFF))
|
|
||||||
&& (!timeout(0x00000000))) {
|
|
||||||
ctr++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (READ_FLASH(0x07FFF0) == 0xFF) {
|
|
||||||
pr_info(LCD "Erase Successful\n");
|
|
||||||
} else if (timeout) {
|
|
||||||
pr_info(LCD "Erase Timed Out\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// burn the flash
|
|
||||||
|
|
||||||
case FLASH_Burn:{
|
|
||||||
|
|
||||||
volatile unsigned long burn_addr;
|
|
||||||
unsigned long flags;
|
|
||||||
unsigned int i, index;
|
|
||||||
unsigned char *rom;
|
|
||||||
|
|
||||||
|
|
||||||
struct lcd_display display;
|
|
||||||
|
|
||||||
if ( !capable(CAP_SYS_ADMIN) ) return -EPERM;
|
|
||||||
|
|
||||||
if (copy_from_user
|
|
||||||
(&display, (struct lcd_display *) arg,
|
|
||||||
sizeof(struct lcd_display)))
|
|
||||||
return -EFAULT;
|
|
||||||
rom = kmalloc((128), GFP_ATOMIC);
|
|
||||||
if (rom == NULL) {
|
|
||||||
printk(KERN_ERR LCD "kmalloc() failed in %s\n",
|
|
||||||
__FUNCTION__);
|
|
||||||
return -ENOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
pr_info(LCD "Starting Flash burn\n");
|
|
||||||
for (i = 0; i < FLASH_SIZE; i = i + 128) {
|
|
||||||
|
|
||||||
if (copy_from_user
|
|
||||||
(rom, display.RomImage + i, 128)) {
|
|
||||||
kfree(rom);
|
|
||||||
return -EFAULT;
|
|
||||||
}
|
|
||||||
burn_addr = kFlashBase + i;
|
|
||||||
spin_lock_irqsave(&lcd_lock, flags);
|
|
||||||
for (index = 0; index < (128); index++) {
|
|
||||||
|
|
||||||
WRITE_FLASH(kFlash_Addr1,
|
|
||||||
kFlash_Data1);
|
|
||||||
WRITE_FLASH(kFlash_Addr2,
|
|
||||||
kFlash_Data2);
|
|
||||||
WRITE_FLASH(kFlash_Addr1,
|
|
||||||
kFlash_Prog);
|
|
||||||
*((volatile unsigned char *)burn_addr) =
|
|
||||||
(volatile unsigned char) rom[index];
|
|
||||||
|
|
||||||
while ((!dqpoll (burn_addr,
|
|
||||||
(volatile unsigned char)
|
|
||||||
rom[index])) &&
|
|
||||||
(!timeout(burn_addr))) { }
|
|
||||||
burn_addr++;
|
|
||||||
}
|
|
||||||
spin_unlock_irqrestore(&lcd_lock, flags);
|
|
||||||
if (* ((volatile unsigned char *)
|
|
||||||
(burn_addr - 1)) ==
|
|
||||||
(volatile unsigned char)
|
|
||||||
rom[index - 1]) {
|
|
||||||
} else if (timeout) {
|
|
||||||
pr_info(LCD "Flash burn timed out\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
kfree(rom);
|
|
||||||
|
|
||||||
pr_info(LCD "Flash successfully burned\n");
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// read the flash all at once
|
|
||||||
|
|
||||||
case FLASH_Read:{
|
|
||||||
|
|
||||||
unsigned char *user_bytes;
|
|
||||||
volatile unsigned long read_addr;
|
|
||||||
unsigned int i;
|
|
||||||
|
|
||||||
user_bytes =
|
|
||||||
&(((struct lcd_display *) arg)->RomImage[0]);
|
|
||||||
|
|
||||||
if (!access_ok
|
|
||||||
(VERIFY_WRITE, user_bytes, FLASH_SIZE))
|
|
||||||
return -EFAULT;
|
|
||||||
|
|
||||||
pr_info(LCD "Reading Flash");
|
|
||||||
for (i = 0; i < FLASH_SIZE; i++) {
|
|
||||||
unsigned char tmp_byte;
|
|
||||||
read_addr = kFlashBase + i;
|
|
||||||
tmp_byte =
|
|
||||||
*((volatile unsigned char *)
|
|
||||||
read_addr);
|
|
||||||
if (__put_user(tmp_byte, &user_bytes[i]))
|
|
||||||
return -EFAULT;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
@@ -644,42 +512,6 @@ static void __exit lcd_exit(void)
|
|||||||
misc_deregister(&lcd_dev);
|
misc_deregister(&lcd_dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Function: dqpoll
|
|
||||||
//
|
|
||||||
// Description: Polls the data lines to see if the flash is busy
|
|
||||||
//
|
|
||||||
// In: address, byte data
|
|
||||||
//
|
|
||||||
// Out: 0 = busy, 1 = write or erase complete
|
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
static int dqpoll(volatile unsigned long address, volatile unsigned char data)
|
|
||||||
{
|
|
||||||
volatile unsigned char dq7;
|
|
||||||
|
|
||||||
dq7 = data & 0x80;
|
|
||||||
|
|
||||||
return ((READ_FLASH(address) & 0x80) == dq7);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Function: timeout
|
|
||||||
//
|
|
||||||
// Description: Checks to see if erase or write has timed out
|
|
||||||
// By polling dq5
|
|
||||||
//
|
|
||||||
// In: address
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Out: 0 = not timed out, 1 = timed out
|
|
||||||
|
|
||||||
static int timeout(volatile unsigned long address)
|
|
||||||
{
|
|
||||||
return (READ_FLASH(address) & 0x20) == 0x20;
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(lcd_init);
|
module_init(lcd_init);
|
||||||
module_exit(lcd_exit);
|
module_exit(lcd_exit);
|
||||||
|
|
||||||
|
@@ -14,11 +14,7 @@
|
|||||||
|
|
||||||
// function headers
|
// function headers
|
||||||
|
|
||||||
static int dqpoll(volatile unsigned long, volatile unsigned char );
|
|
||||||
static int timeout(volatile unsigned long);
|
|
||||||
|
|
||||||
#define LCD_CHARS_PER_LINE 40
|
#define LCD_CHARS_PER_LINE 40
|
||||||
#define FLASH_SIZE 524288
|
|
||||||
#define MAX_IDLE_TIME 120
|
#define MAX_IDLE_TIME 120
|
||||||
|
|
||||||
struct lcd_display {
|
struct lcd_display {
|
||||||
@@ -54,26 +50,6 @@ struct lcd_display {
|
|||||||
#define LCDTimeoutValue 0xfff
|
#define LCDTimeoutValue 0xfff
|
||||||
|
|
||||||
|
|
||||||
// Flash definitions AMD 29F040
|
|
||||||
#define kFlashBase 0x0FC00000
|
|
||||||
|
|
||||||
#define kFlash_Addr1 0x5555
|
|
||||||
#define kFlash_Addr2 0x2AAA
|
|
||||||
#define kFlash_Data1 0xAA
|
|
||||||
#define kFlash_Data2 0x55
|
|
||||||
#define kFlash_Prog 0xA0
|
|
||||||
#define kFlash_Erase3 0x80
|
|
||||||
#define kFlash_Erase6 0x10
|
|
||||||
#define kFlash_Read 0xF0
|
|
||||||
|
|
||||||
#define kFlash_ID 0x90
|
|
||||||
#define kFlash_VenAddr 0x00
|
|
||||||
#define kFlash_DevAddr 0x01
|
|
||||||
#define kFlash_VenID 0x01
|
|
||||||
#define kFlash_DevID 0xA4 // 29F040
|
|
||||||
//#define kFlash_DevID 0xAD // 29F016
|
|
||||||
|
|
||||||
|
|
||||||
// Macros
|
// Macros
|
||||||
|
|
||||||
#define LCDWriteData(x) outl((x << 24), kLCD_DR)
|
#define LCDWriteData(x) outl((x << 24), kLCD_DR)
|
||||||
@@ -89,9 +65,6 @@ struct lcd_display {
|
|||||||
#define WRITE_GAL(x,y) outl(y, 0x04000000 | (x))
|
#define WRITE_GAL(x,y) outl(y, 0x04000000 | (x))
|
||||||
#define BusyCheck() while ((LCDReadInst & 0x80) == 0x80)
|
#define BusyCheck() while ((LCDReadInst & 0x80) == 0x80)
|
||||||
|
|
||||||
#define WRITE_FLASH(x,y) outb((char)y, kFlashBase | (x))
|
|
||||||
#define READ_FLASH(x) (inb(kFlashBase | (x)))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -124,11 +97,6 @@ struct lcd_display {
|
|||||||
// Button defs
|
// Button defs
|
||||||
#define BUTTON_Read 50
|
#define BUTTON_Read 50
|
||||||
|
|
||||||
// Flash command codes
|
|
||||||
#define FLASH_Erase 60
|
|
||||||
#define FLASH_Burn 61
|
|
||||||
#define FLASH_Read 62
|
|
||||||
|
|
||||||
|
|
||||||
// Ethernet LINK check hackaroo
|
// Ethernet LINK check hackaroo
|
||||||
#define LINK_Check 90
|
#define LINK_Check 90
|
||||||
|
@@ -2307,27 +2307,6 @@ config MV643XX_ETH
|
|||||||
chipset which is used in the Momenco Ocelot C and Jaguar ATX and
|
chipset which is used in the Momenco Ocelot C and Jaguar ATX and
|
||||||
Pegasos II, amongst other PPC and MIPS boards.
|
Pegasos II, amongst other PPC and MIPS boards.
|
||||||
|
|
||||||
config MV643XX_ETH_0
|
|
||||||
bool "MV-643XX Port 0"
|
|
||||||
depends on MV643XX_ETH
|
|
||||||
help
|
|
||||||
This enables support for Port 0 of the Marvell MV643XX Gigabit
|
|
||||||
Ethernet.
|
|
||||||
|
|
||||||
config MV643XX_ETH_1
|
|
||||||
bool "MV-643XX Port 1"
|
|
||||||
depends on MV643XX_ETH
|
|
||||||
help
|
|
||||||
This enables support for Port 1 of the Marvell MV643XX Gigabit
|
|
||||||
Ethernet.
|
|
||||||
|
|
||||||
config MV643XX_ETH_2
|
|
||||||
bool "MV-643XX Port 2"
|
|
||||||
depends on MV643XX_ETH
|
|
||||||
help
|
|
||||||
This enables support for Port 2 of the Marvell MV643XX Gigabit
|
|
||||||
Ethernet.
|
|
||||||
|
|
||||||
config QLA3XXX
|
config QLA3XXX
|
||||||
tristate "QLogic QLA3XXX Network Driver Support"
|
tristate "QLogic QLA3XXX Network Driver Support"
|
||||||
depends on PCI
|
depends on PCI
|
||||||
|
Reference in New Issue
Block a user