mirror of
https://github.com/a52xq-dev/kernel.git
synced 2026-10-18 21:58:11 +07:00
MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs.
Signed-off-by: Maxime Bizon <mbizon@freebox.fr> Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
parent
0de663ef86
commit
e7300d04bd
40 changed files with 5896 additions and 0 deletions
|
|
@ -80,6 +80,21 @@ config BCM47XX
|
|||
help
|
||||
Support for BCM47XX based boards
|
||||
|
||||
config BCM63XX
|
||||
bool "Broadcom BCM63XX based boards"
|
||||
select CEVT_R4K
|
||||
select CSRC_R4K
|
||||
select DMA_NONCOHERENT
|
||||
select IRQ_CPU
|
||||
select SYS_HAS_CPU_MIPS32_R1
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
select SWAP_IO_SPACE
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
help
|
||||
Support for BCM63XX based boards
|
||||
|
||||
config MIPS_COBALT
|
||||
bool "Cobalt Server"
|
||||
select CEVT_R4K
|
||||
|
|
@ -645,6 +660,7 @@ endchoice
|
|||
|
||||
source "arch/mips/alchemy/Kconfig"
|
||||
source "arch/mips/basler/excite/Kconfig"
|
||||
source "arch/mips/bcm63xx/Kconfig"
|
||||
source "arch/mips/jazz/Kconfig"
|
||||
source "arch/mips/lasat/Kconfig"
|
||||
source "arch/mips/pmc-sierra/Kconfig"
|
||||
|
|
|
|||
|
|
@ -564,6 +564,13 @@ core-$(CONFIG_BCM47XX) += arch/mips/bcm47xx/
|
|||
cflags-$(CONFIG_BCM47XX) += -I$(srctree)/arch/mips/include/asm/mach-bcm47xx
|
||||
load-$(CONFIG_BCM47XX) := 0xffffffff80001000
|
||||
|
||||
#
|
||||
# Broadcom BCM63XX boards
|
||||
#
|
||||
core-$(CONFIG_BCM63XX) += arch/mips/bcm63xx/
|
||||
cflags-$(CONFIG_BCM63XX) += -I$(srctree)/arch/mips/include/asm/mach-bcm63xx/
|
||||
load-$(CONFIG_BCM63XX) := 0xffffffff80010000
|
||||
|
||||
#
|
||||
# SNI RM
|
||||
#
|
||||
|
|
|
|||
25
arch/mips/bcm63xx/Kconfig
Normal file
25
arch/mips/bcm63xx/Kconfig
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
menu "CPU support"
|
||||
depends on BCM63XX
|
||||
|
||||
config BCM63XX_CPU_6338
|
||||
bool "support 6338 CPU"
|
||||
select HW_HAS_PCI
|
||||
select USB_ARCH_HAS_OHCI
|
||||
select USB_OHCI_BIG_ENDIAN_DESC
|
||||
select USB_OHCI_BIG_ENDIAN_MMIO
|
||||
|
||||
config BCM63XX_CPU_6345
|
||||
bool "support 6345 CPU"
|
||||
select USB_OHCI_BIG_ENDIAN_DESC
|
||||
select USB_OHCI_BIG_ENDIAN_MMIO
|
||||
|
||||
config BCM63XX_CPU_6348
|
||||
bool "support 6348 CPU"
|
||||
select HW_HAS_PCI
|
||||
|
||||
config BCM63XX_CPU_6358
|
||||
bool "support 6358 CPU"
|
||||
select HW_HAS_PCI
|
||||
endmenu
|
||||
|
||||
source "arch/mips/bcm63xx/boards/Kconfig"
|
||||
7
arch/mips/bcm63xx/Makefile
Normal file
7
arch/mips/bcm63xx/Makefile
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
obj-y += clk.o cpu.o cs.o gpio.o irq.o prom.o setup.o timer.o \
|
||||
dev-dsp.o
|
||||
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
|
||||
|
||||
obj-y += boards/
|
||||
|
||||
EXTRA_CFLAGS += -Werror
|
||||
11
arch/mips/bcm63xx/boards/Kconfig
Normal file
11
arch/mips/bcm63xx/boards/Kconfig
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
choice
|
||||
prompt "Board support"
|
||||
depends on BCM63XX
|
||||
default BOARD_BCM963XX
|
||||
|
||||
config BOARD_BCM963XX
|
||||
bool "Generic Broadcom 963xx boards"
|
||||
select SSB
|
||||
help
|
||||
|
||||
endchoice
|
||||
3
arch/mips/bcm63xx/boards/Makefile
Normal file
3
arch/mips/bcm63xx/boards/Makefile
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
obj-$(CONFIG_BOARD_BCM963XX) += board_bcm963xx.o
|
||||
|
||||
EXTRA_CFLAGS += -Werror
|
||||
837
arch/mips/bcm63xx/boards/board_bcm963xx.c
Normal file
837
arch/mips/bcm63xx/boards/board_bcm963xx.c
Normal file
|
|
@ -0,0 +1,837 @@
|
|||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
|
||||
* Copyright (C) 2008 Florian Fainelli <florian@openwrt.org>
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/ssb/ssb.h>
|
||||
#include <asm/addrspace.h>
|
||||
#include <bcm63xx_board.h>
|
||||
#include <bcm63xx_cpu.h>
|
||||
#include <bcm63xx_regs.h>
|
||||
#include <bcm63xx_io.h>
|
||||
#include <bcm63xx_board.h>
|
||||
#include <bcm63xx_dev_pci.h>
|
||||
#include <bcm63xx_dev_enet.h>
|
||||
#include <bcm63xx_dev_dsp.h>
|
||||
#include <board_bcm963xx.h>
|
||||
|
||||
#define PFX "board_bcm963xx: "
|
||||
|
||||
static struct bcm963xx_nvram nvram;
|
||||
static unsigned int mac_addr_used;
|
||||
static struct board_info board;
|
||||
|
||||
/*
|
||||
* known 6338 boards
|
||||
*/
|
||||
#ifdef CONFIG_BCM63XX_CPU_6338
|
||||
static struct board_info __initdata board_96338gw = {
|
||||
.name = "96338GW",
|
||||
.expected_cpu_id = 0x6338,
|
||||
|
||||
.has_enet0 = 1,
|
||||
.enet0 = {
|
||||
.force_speed_100 = 1,
|
||||
.force_duplex_full = 1,
|
||||
},
|
||||
|
||||
.has_ohci0 = 1,
|
||||
|
||||
.leds = {
|
||||
{
|
||||
.name = "adsl",
|
||||
.gpio = 3,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "ses",
|
||||
.gpio = 5,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "ppp-fail",
|
||||
.gpio = 4,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "power",
|
||||
.gpio = 0,
|
||||
.active_low = 1,
|
||||
.default_trigger = "default-on",
|
||||
},
|
||||
{
|
||||
.name = "stop",
|
||||
.gpio = 1,
|
||||
.active_low = 1,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
static struct board_info __initdata board_96338w = {
|
||||
.name = "96338W",
|
||||
.expected_cpu_id = 0x6338,
|
||||
|
||||
.has_enet0 = 1,
|
||||
.enet0 = {
|
||||
.force_speed_100 = 1,
|
||||
.force_duplex_full = 1,
|
||||
},
|
||||
|
||||
.leds = {
|
||||
{
|
||||
.name = "adsl",
|
||||
.gpio = 3,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "ses",
|
||||
.gpio = 5,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "ppp-fail",
|
||||
.gpio = 4,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "power",
|
||||
.gpio = 0,
|
||||
.active_low = 1,
|
||||
.default_trigger = "default-on",
|
||||
},
|
||||
{
|
||||
.name = "stop",
|
||||
.gpio = 1,
|
||||
.active_low = 1,
|
||||
},
|
||||
},
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* known 6345 boards
|
||||
*/
|
||||
#ifdef CONFIG_BCM63XX_CPU_6345
|
||||
static struct board_info __initdata board_96345gw2 = {
|
||||
.name = "96345GW2",
|
||||
.expected_cpu_id = 0x6345,
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* known 6348 boards
|
||||
*/
|
||||
#ifdef CONFIG_BCM63XX_CPU_6348
|
||||
static struct board_info __initdata board_96348r = {
|
||||
.name = "96348R",
|
||||
.expected_cpu_id = 0x6348,
|
||||
|
||||
.has_enet0 = 1,
|
||||
.has_pci = 1,
|
||||
|
||||
.enet0 = {
|
||||
.has_phy = 1,
|
||||
.use_internal_phy = 1,
|
||||
},
|
||||
|
||||
.leds = {
|
||||
{
|
||||
.name = "adsl-fail",
|
||||
.gpio = 2,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "ppp",
|
||||
.gpio = 3,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "ppp-fail",
|
||||
.gpio = 4,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "power",
|
||||
.gpio = 0,
|
||||
.active_low = 1,
|
||||
.default_trigger = "default-on",
|
||||
|
||||
},
|
||||
{
|
||||
.name = "stop",
|
||||
.gpio = 1,
|
||||
.active_low = 1,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct board_info __initdata board_96348gw_10 = {
|
||||
.name = "96348GW-10",
|
||||
.expected_cpu_id = 0x6348,
|
||||
|
||||
.has_enet0 = 1,
|
||||
.has_enet1 = 1,
|
||||
.has_pci = 1,
|
||||
|
||||
.enet0 = {
|
||||
.has_phy = 1,
|
||||
.use_internal_phy = 1,
|
||||
},
|
||||
.enet1 = {
|
||||
.force_speed_100 = 1,
|
||||
.force_duplex_full = 1,
|
||||
},
|
||||
|
||||
.has_ohci0 = 1,
|
||||
.has_pccard = 1,
|
||||
.has_ehci0 = 1,
|
||||
|
||||
.has_dsp = 1,
|
||||
.dsp = {
|
||||
.gpio_rst = 6,
|
||||
.gpio_int = 34,
|
||||
.cs = 2,
|
||||
.ext_irq = 2,
|
||||
},
|
||||
|
||||
.leds = {
|
||||
{
|
||||
.name = "adsl-fail",
|
||||
.gpio = 2,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "ppp",
|
||||
.gpio = 3,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "ppp-fail",
|
||||
.gpio = 4,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "power",
|
||||
.gpio = 0,
|
||||
.active_low = 1,
|
||||
.default_trigger = "default-on",
|
||||
},
|
||||
{
|
||||
.name = "stop",
|
||||
.gpio = 1,
|
||||
.active_low = 1,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct board_info __initdata board_96348gw_11 = {
|
||||
.name = "96348GW-11",
|
||||
.expected_cpu_id = 0x6348,
|
||||
|
||||
.has_enet0 = 1,
|
||||
.has_enet1 = 1,
|
||||
.has_pci = 1,
|
||||
|
||||
.enet0 = {
|
||||
.has_phy = 1,
|
||||
.use_internal_phy = 1,
|
||||
},
|
||||
|
||||
.enet1 = {
|
||||
.force_speed_100 = 1,
|
||||
.force_duplex_full = 1,
|
||||
},
|
||||
|
||||
|
||||
.has_ohci0 = 1,
|
||||
.has_pccard = 1,
|
||||
.has_ehci0 = 1,
|
||||
|
||||
.leds = {
|
||||
{
|
||||
.name = "adsl-fail",
|
||||
.gpio = 2,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "ppp",
|
||||
.gpio = 3,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "ppp-fail",
|
||||
.gpio = 4,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "power",
|
||||
.gpio = 0,
|
||||
.active_low = 1,
|
||||
.default_trigger = "default-on",
|
||||
},
|
||||
{
|
||||
.name = "stop",
|
||||
.gpio = 1,
|
||||
.active_low = 1,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct board_info __initdata board_96348gw = {
|
||||
.name = "96348GW",
|
||||
.expected_cpu_id = 0x6348,
|
||||
|
||||
.has_enet0 = 1,
|
||||
.has_enet1 = 1,
|
||||
.has_pci = 1,
|
||||
|
||||
.enet0 = {
|
||||
.has_phy = 1,
|
||||
.use_internal_phy = 1,
|
||||
},
|
||||
.enet1 = {
|
||||
.force_speed_100 = 1,
|
||||
.force_duplex_full = 1,
|
||||
},
|
||||
|
||||
.has_ohci0 = 1,
|
||||
|
||||
.has_dsp = 1,
|
||||
.dsp = {
|
||||
.gpio_rst = 6,
|
||||
.gpio_int = 34,
|
||||
.ext_irq = 2,
|
||||
.cs = 2,
|
||||
},
|
||||
|
||||
.leds = {
|
||||
{
|
||||
.name = "adsl-fail",
|
||||
.gpio = 2,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "ppp",
|
||||
.gpio = 3,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "ppp-fail",
|
||||
.gpio = 4,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "power",
|
||||
.gpio = 0,
|
||||
.active_low = 1,
|
||||
.default_trigger = "default-on",
|
||||
},
|
||||
{
|
||||
.name = "stop",
|
||||
.gpio = 1,
|
||||
.active_low = 1,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct board_info __initdata board_FAST2404 = {
|
||||
.name = "F@ST2404",
|
||||
.expected_cpu_id = 0x6348,
|
||||
|
||||
.has_enet0 = 1,
|
||||
.has_enet1 = 1,
|
||||
.has_pci = 1,
|
||||
|
||||
.enet0 = {
|
||||
.has_phy = 1,
|
||||
.use_internal_phy = 1,
|
||||
},
|
||||
|
||||
.enet1 = {
|
||||
.force_speed_100 = 1,
|
||||
.force_duplex_full = 1,
|
||||
},
|
||||
|
||||
|
||||
.has_ohci0 = 1,
|
||||
.has_pccard = 1,
|
||||
.has_ehci0 = 1,
|
||||
};
|
||||
|
||||
static struct board_info __initdata board_DV201AMR = {
|
||||
.name = "DV201AMR",
|
||||
.expected_cpu_id = 0x6348,
|
||||
|
||||
.has_pci = 1,
|
||||
.has_ohci0 = 1,
|
||||
|
||||
.has_enet0 = 1,
|
||||
.has_enet1 = 1,
|
||||
.enet0 = {
|
||||
.has_phy = 1,
|
||||
.use_internal_phy = 1,
|
||||
},
|
||||
.enet1 = {
|
||||
.force_speed_100 = 1,
|
||||
.force_duplex_full = 1,
|
||||
},
|
||||
};
|
||||
|
||||
static struct board_info __initdata board_96348gw_a = {
|
||||
.name = "96348GW-A",
|
||||
.expected_cpu_id = 0x6348,
|
||||
|
||||
.has_enet0 = 1,
|
||||
.has_enet1 = 1,
|
||||
.has_pci = 1,
|
||||
|
||||
.enet0 = {
|
||||
.has_phy = 1,
|
||||
.use_internal_phy = 1,
|
||||
},
|
||||
.enet1 = {
|
||||
.force_speed_100 = 1,
|
||||
.force_duplex_full = 1,
|
||||
},
|
||||
|
||||
.has_ohci0 = 1,
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* known 6358 boards
|
||||
*/
|
||||
#ifdef CONFIG_BCM63XX_CPU_6358
|
||||
static struct board_info __initdata board_96358vw = {
|
||||
.name = "96358VW",
|
||||
.expected_cpu_id = 0x6358,
|
||||
|
||||
.has_enet0 = 1,
|
||||
.has_enet1 = 1,
|
||||
.has_pci = 1,
|
||||
|
||||
.enet0 = {
|
||||
.has_phy = 1,
|
||||
.use_internal_phy = 1,
|
||||
},
|
||||
|
||||
.enet1 = {
|
||||
.force_speed_100 = 1,
|
||||
.force_duplex_full = 1,
|
||||
},
|
||||
|
||||
|
||||
.has_ohci0 = 1,
|
||||
.has_pccard = 1,
|
||||
.has_ehci0 = 1,
|
||||
|
||||
.leds = {
|
||||
{
|
||||
.name = "adsl-fail",
|
||||
.gpio = 15,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "ppp",
|
||||
.gpio = 22,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "ppp-fail",
|
||||
.gpio = 23,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "power",
|
||||
.gpio = 4,
|
||||
.default_trigger = "default-on",
|
||||
},
|
||||
{
|
||||
.name = "stop",
|
||||
.gpio = 5,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct board_info __initdata board_96358vw2 = {
|
||||
.name = "96358VW2",
|
||||
.expected_cpu_id = 0x6358,
|
||||
|
||||
.has_enet0 = 1,
|
||||
.has_enet1 = 1,
|
||||
.has_pci = 1,
|
||||
|
||||
.enet0 = {
|
||||
.has_phy = 1,
|
||||
.use_internal_phy = 1,
|
||||
},
|
||||
|
||||
.enet1 = {
|
||||
.force_speed_100 = 1,
|
||||
.force_duplex_full = 1,
|
||||
},
|
||||
|
||||
|
||||
.has_ohci0 = 1,
|
||||
.has_pccard = 1,
|
||||
.has_ehci0 = 1,
|
||||
|
||||
.leds = {
|
||||
{
|
||||
.name = "adsl",
|
||||
.gpio = 22,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "ppp-fail",
|
||||
.gpio = 23,
|
||||
},
|
||||
{
|
||||
.name = "power",
|
||||
.gpio = 5,
|
||||
.active_low = 1,
|
||||
.default_trigger = "default-on",
|
||||
},
|
||||
{
|
||||
.name = "stop",
|
||||
.gpio = 4,
|
||||
.active_low = 1,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct board_info __initdata board_AGPFS0 = {
|
||||
.name = "AGPF-S0",
|
||||
.expected_cpu_id = 0x6358,
|
||||
|
||||
.has_enet0 = 1,
|
||||
.has_enet1 = 1,
|
||||
.has_pci = 1,
|
||||
|
||||
.enet0 = {
|
||||
.has_phy = 1,
|
||||
.use_internal_phy = 1,
|
||||
},
|
||||
|
||||
.enet1 = {
|
||||
.force_speed_100 = 1,
|
||||
.force_duplex_full = 1,
|
||||
},
|
||||
|
||||
.has_ohci0 = 1,
|
||||
.has_ehci0 = 1,
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* all boards
|
||||
*/
|
||||
static const struct board_info __initdata *bcm963xx_boards[] = {
|
||||
#ifdef CONFIG_BCM63XX_CPU_6338
|
||||
&board_96338gw,
|
||||
&board_96338w,
|
||||
#endif
|
||||
#ifdef CONFIG_BCM63XX_CPU_6345
|
||||
&board_96345gw2,
|
||||
#endif
|
||||
#ifdef CONFIG_BCM63XX_CPU_6348
|
||||
&board_96348r,
|
||||
&board_96348gw,
|
||||
&board_96348gw_10,
|
||||
&board_96348gw_11,
|
||||
&board_FAST2404,
|
||||
&board_DV201AMR,
|
||||
&board_96348gw_a,
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BCM63XX_CPU_6358
|
||||
&board_96358vw,
|
||||
&board_96358vw2,
|
||||
&board_AGPFS0,
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
* early init callback, read nvram data from flash and checksum it
|
||||
*/
|
||||
void __init board_prom_init(void)
|
||||
{
|
||||
unsigned int check_len, i;
|
||||
u8 *boot_addr, *cfe, *p;
|
||||
char cfe_version[32];
|
||||
u32 val;
|
||||
|
||||
/* read base address of boot chip select (0)
|
||||
* 6345 does not have MPI but boots from standard
|
||||
* MIPS Flash address */
|
||||
if (BCMCPU_IS_6345())
|
||||
val = 0x1fc00000;
|
||||
else {
|
||||
val = bcm_mpi_readl(MPI_CSBASE_REG(0));
|
||||
val &= MPI_CSBASE_BASE_MASK;
|
||||
}
|
||||
boot_addr = (u8 *)KSEG1ADDR(val);
|
||||
|
||||
/* dump cfe version */
|
||||
cfe = boot_addr + BCM963XX_CFE_VERSION_OFFSET;
|
||||
if (!memcmp(cfe, "cfe-v", 5))
|
||||
snprintf(cfe_version, sizeof(cfe_version), "%u.%u.%u-%u.%u",
|
||||
cfe[5], cfe[6], cfe[7], cfe[8], cfe[9]);
|
||||
else
|
||||
strcpy(cfe_version, "unknown");
|
||||
printk(KERN_INFO PFX "CFE version: %s\n", cfe_version);
|
||||
|
||||
/* extract nvram data */
|
||||
memcpy(&nvram, boot_addr + BCM963XX_NVRAM_OFFSET, sizeof(nvram));
|
||||
|
||||
/* check checksum before using data */
|
||||
if (nvram.version <= 4)
|
||||
check_len = offsetof(struct bcm963xx_nvram, checksum_old);
|
||||
else
|
||||
check_len = sizeof(nvram);
|
||||
val = 0;
|
||||
p = (u8 *)&nvram;
|
||||
while (check_len--)
|
||||
val += *p;
|
||||
if (val) {
|
||||
printk(KERN_ERR PFX "invalid nvram checksum\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* find board by name */
|
||||
for (i = 0; i < ARRAY_SIZE(bcm963xx_boards); i++) {
|
||||
if (strncmp(nvram.name, bcm963xx_boards[i]->name,
|
||||
sizeof(nvram.name)))
|
||||
continue;
|
||||
/* copy, board desc array is marked initdata */
|
||||
memcpy(&board, bcm963xx_boards[i], sizeof(board));
|
||||
break;
|
||||
}
|
||||
|
||||
/* bail out if board is not found, will complain later */
|
||||
if (!board.name[0]) {
|
||||
char name[17];
|
||||
memcpy(name, nvram.name, 16);
|
||||
name[16] = 0;
|
||||
printk(KERN_ERR PFX "unknown bcm963xx board: %s\n",
|
||||
name);
|
||||
return;
|
||||
}
|
||||
|
||||
/* setup pin multiplexing depending on board enabled device,
|
||||
* this has to be done this early since PCI init is done
|
||||
* inside arch_initcall */
|
||||
val = 0;
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
if (board.has_pci) {
|
||||
bcm63xx_pci_enabled = 1;
|
||||
if (BCMCPU_IS_6348())
|
||||
val |= GPIO_MODE_6348_G2_PCI;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (board.has_pccard) {
|
||||
if (BCMCPU_IS_6348())
|
||||
val |= GPIO_MODE_6348_G1_MII_PCCARD;
|
||||
}
|
||||
|
||||
if (board.has_enet0 && !board.enet0.use_internal_phy) {
|
||||
if (BCMCPU_IS_6348())
|
||||
val |= GPIO_MODE_6348_G3_EXT_MII |
|
||||
GPIO_MODE_6348_G0_EXT_MII;
|
||||
}
|
||||
|
||||
if (board.has_enet1 && !board.enet1.use_internal_phy) {
|
||||
if (BCMCPU_IS_6348())
|
||||
val |= GPIO_MODE_6348_G3_EXT_MII |
|
||||
GPIO_MODE_6348_G0_EXT_MII;
|
||||
}
|
||||
|
||||
bcm_gpio_writel(val, GPIO_MODE_REG);
|
||||
}
|
||||
|
||||
/*
|
||||
* second stage init callback, good time to panic if we couldn't
|
||||
* identify on which board we're running since early printk is working
|
||||
*/
|
||||
void __init board_setup(void)
|
||||
{
|
||||
if (!board.name[0])
|
||||
panic("unable to detect bcm963xx board");
|
||||
printk(KERN_INFO PFX "board name: %s\n", board.name);
|
||||
|
||||
/* make sure we're running on expected cpu */
|
||||
if (bcm63xx_get_cpu_id() != board.expected_cpu_id)
|
||||
panic("unexpected CPU for bcm963xx board");
|
||||
}
|
||||
|
||||
/*
|
||||
* return board name for /proc/cpuinfo
|
||||
*/
|
||||
const char *board_get_name(void)
|
||||
{
|
||||
return board.name;
|
||||
}
|
||||
|
||||
/*
|
||||
* register & return a new board mac address
|
||||
*/
|
||||
static int board_get_mac_address(u8 *mac)
|
||||
{
|
||||
u8 *p;
|
||||
int count;
|
||||
|
||||
if (mac_addr_used >= nvram.mac_addr_count) {
|
||||
printk(KERN_ERR PFX "not enough mac address\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
memcpy(mac, nvram.mac_addr_base, ETH_ALEN);
|
||||
p = mac + ETH_ALEN - 1;
|
||||
count = mac_addr_used;
|
||||
|
||||
while (count--) {
|
||||
do {
|
||||
(*p)++;
|
||||
if (*p != 0)
|
||||
break;
|
||||
p--;
|
||||
} while (p != mac);
|
||||
}
|
||||
|
||||
if (p == mac) {
|
||||
printk(KERN_ERR PFX "unable to fetch mac address\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
mac_addr_used++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct mtd_partition mtd_partitions[] = {
|
||||
{
|
||||
.name = "cfe",
|
||||
.offset = 0x0,
|
||||
.size = 0x40000,
|
||||
}
|
||||
};
|
||||
|
||||
static struct physmap_flash_data flash_data = {
|
||||
.width = 2,
|
||||
.nr_parts = ARRAY_SIZE(mtd_partitions),
|
||||
.parts = mtd_partitions,
|
||||
};
|
||||
|
||||
static struct resource mtd_resources[] = {
|
||||
{
|
||||
.start = 0, /* filled at runtime */
|
||||
.end = 0, /* filled at runtime */
|
||||
.flags = IORESOURCE_MEM,
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device mtd_dev = {
|
||||
.name = "physmap-flash",
|
||||
.resource = mtd_resources,
|
||||
.num_resources = ARRAY_SIZE(mtd_resources),
|
||||
.dev = {
|
||||
.platform_data = &flash_data,
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
* Register a sane SPROMv2 to make the on-board
|
||||
* bcm4318 WLAN work
|
||||
*/
|
||||
#ifdef CONFIG_SSB_PCIHOST
|
||||
static struct ssb_sprom bcm63xx_sprom = {
|
||||
.revision = 0x02,
|
||||
.board_rev = 0x17,
|
||||
.country_code = 0x0,
|
||||
.ant_available_bg = 0x3,
|
||||
.pa0b0 = 0x15ae,
|
||||
.pa0b1 = 0xfa85,
|
||||
.pa0b2 = 0xfe8d,
|
||||
.pa1b0 = 0xffff,
|
||||
.pa1b1 = 0xffff,
|
||||
.pa1b2 = 0xffff,
|
||||
.gpio0 = 0xff,
|
||||
.gpio1 = 0xff,
|
||||
.gpio2 = 0xff,
|
||||
.gpio3 = 0xff,
|
||||
.maxpwr_bg = 0x004c,
|
||||
.itssi_bg = 0x00,
|
||||
.boardflags_lo = 0x2848,
|
||||
.boardflags_hi = 0x0000,
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct gpio_led_platform_data bcm63xx_led_data;
|
||||
|
||||
static struct platform_device bcm63xx_gpio_leds = {
|
||||
.name = "leds-gpio",
|
||||
.id = 0,
|
||||
.dev.platform_data = &bcm63xx_led_data,
|
||||
};
|
||||
|
||||
/*
|
||||
* third stage init callback, register all board devices.
|
||||
*/
|
||||
int __init board_register_devices(void)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
if (board.has_enet0 &&
|
||||
!board_get_mac_address(board.enet0.mac_addr))
|
||||
bcm63xx_enet_register(0, &board.enet0);
|
||||
|
||||
if (board.has_enet1 &&
|
||||
!board_get_mac_address(board.enet1.mac_addr))
|
||||
bcm63xx_enet_register(1, &board.enet1);
|
||||
|
||||
if (board.has_dsp)
|
||||
bcm63xx_dsp_register(&board.dsp);
|
||||
|
||||
/* Generate MAC address for WLAN and
|
||||
* register our SPROM */
|
||||
#ifdef CONFIG_SSB_PCIHOST
|
||||
if (!board_get_mac_address(bcm63xx_sprom.il0mac)) {
|
||||
memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN);
|
||||
memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN);
|
||||
if (ssb_arch_set_fallback_sprom(&bcm63xx_sprom) < 0)
|
||||
printk(KERN_ERR "failed to register fallback SPROM\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
/* read base address of boot chip select (0) */
|
||||
if (BCMCPU_IS_6345())
|
||||
val = 0x1fc00000;
|
||||
else {
|
||||
val = bcm_mpi_readl(MPI_CSBASE_REG(0));
|
||||
val &= MPI_CSBASE_BASE_MASK;
|
||||
}
|
||||
mtd_resources[0].start = val;
|
||||
mtd_resources[0].end = 0x1FFFFFFF;
|
||||
|
||||
platform_device_register(&mtd_dev);
|
||||
|
||||
bcm63xx_led_data.num_leds = ARRAY_SIZE(board.leds);
|
||||
bcm63xx_led_data.leds = board.leds;
|
||||
|
||||
platform_device_register(&bcm63xx_gpio_leds);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
226
arch/mips/bcm63xx/clk.c
Normal file
226
arch/mips/bcm63xx/clk.c
Normal file
|
|
@ -0,0 +1,226 @@
|
|||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/clk.h>
|
||||
#include <bcm63xx_cpu.h>
|
||||
#include <bcm63xx_io.h>
|
||||
#include <bcm63xx_regs.h>
|
||||
#include <bcm63xx_clk.h>
|
||||
|
||||
static DEFINE_MUTEX(clocks_mutex);
|
||||
|
||||
|
||||
static void clk_enable_unlocked(struct clk *clk)
|
||||
{
|
||||
if (clk->set && (clk->usage++) == 0)
|
||||
clk->set(clk, 1);
|
||||
}
|
||||
|
||||
static void clk_disable_unlocked(struct clk *clk)
|
||||
{
|
||||
if (clk->set && (--clk->usage) == 0)
|
||||
clk->set(clk, 0);
|
||||
}
|
||||
|
||||
static void bcm_hwclock_set(u32 mask, int enable)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
reg = bcm_perf_readl(PERF_CKCTL_REG);
|
||||
if (enable)
|
||||
reg |= mask;
|
||||
else
|
||||
reg &= ~mask;
|
||||
bcm_perf_writel(reg, PERF_CKCTL_REG);
|
||||
}
|
||||
|
||||
/*
|
||||
* Ethernet MAC "misc" clock: dma clocks and main clock on 6348
|
||||
*/
|
||||
static void enet_misc_set(struct clk *clk, int enable)
|
||||
{
|
||||
u32 mask;
|
||||
|
||||
if (BCMCPU_IS_6338())
|
||||
mask = CKCTL_6338_ENET_EN;
|
||||
else if (BCMCPU_IS_6345())
|
||||
mask = CKCTL_6345_ENET_EN;
|
||||
else if (BCMCPU_IS_6348())
|
||||
mask = CKCTL_6348_ENET_EN;
|
||||
else
|
||||
/* BCMCPU_IS_6358 */
|
||||
mask = CKCTL_6358_EMUSB_EN;
|
||||
bcm_hwclock_set(mask, enable);
|
||||
}
|
||||
|
||||
static struct clk clk_enet_misc = {
|
||||
.set = enet_misc_set,
|
||||
};
|
||||
|
||||
/*
|
||||
* Ethernet MAC clocks: only revelant on 6358, silently enable misc
|
||||
* clocks
|
||||
*/
|
||||
static void enetx_set(struct clk *clk, int enable)
|
||||
{
|
||||
if (enable)
|
||||
clk_enable_unlocked(&clk_enet_misc);
|
||||
else
|
||||
clk_disable_unlocked(&clk_enet_misc);
|
||||
|
||||
if (BCMCPU_IS_6358()) {
|
||||
u32 mask;
|
||||
|
||||
if (clk->id == 0)
|
||||
mask = CKCTL_6358_ENET0_EN;
|
||||
else
|
||||
mask = CKCTL_6358_ENET1_EN;
|
||||
bcm_hwclock_set(mask, enable);
|
||||
}
|
||||
}
|
||||
|
||||
static struct clk clk_enet0 = {
|
||||
.id = 0,
|
||||
.set = enetx_set,
|
||||
};
|
||||
|
||||
static struct clk clk_enet1 = {
|
||||
.id = 1,
|
||||
.set = enetx_set,
|
||||
};
|
||||
|
||||
/*
|
||||
* Ethernet PHY clock
|
||||
*/
|
||||
static void ephy_set(struct clk *clk, int enable)
|
||||
{
|
||||
if (!BCMCPU_IS_6358())
|
||||
return;
|
||||
bcm_hwclock_set(CKCTL_6358_EPHY_EN, enable);
|
||||
}
|
||||
|
||||
|
||||
static struct clk clk_ephy = {
|
||||
.set = ephy_set,
|
||||
};
|
||||
|
||||
/*
|
||||
* PCM clock
|
||||
*/
|
||||
static void pcm_set(struct clk *clk, int enable)
|
||||
{
|
||||
if (!BCMCPU_IS_6358())
|
||||
return;
|
||||
bcm_hwclock_set(CKCTL_6358_PCM_EN, enable);
|
||||
}
|
||||
|
||||
static struct clk clk_pcm = {
|
||||
.set = pcm_set,
|
||||
};
|
||||
|
||||
/*
|
||||
* USB host clock
|
||||
*/
|
||||
static void usbh_set(struct clk *clk, int enable)
|
||||
{
|
||||
if (!BCMCPU_IS_6348())
|
||||
return;
|
||||
bcm_hwclock_set(CKCTL_6348_USBH_EN, enable);
|
||||
}
|
||||
|
||||
static struct clk clk_usbh = {
|
||||
.set = usbh_set,
|
||||
};
|
||||
|
||||
/*
|
||||
* SPI clock
|
||||
*/
|
||||
static void spi_set(struct clk *clk, int enable)
|
||||
{
|
||||
u32 mask;
|
||||
|
||||
if (BCMCPU_IS_6338())
|
||||
mask = CKCTL_6338_SPI_EN;
|
||||
else if (BCMCPU_IS_6348())
|
||||
mask = CKCTL_6348_SPI_EN;
|
||||
else
|
||||
/* BCMCPU_IS_6358 */
|
||||
mask = CKCTL_6358_SPI_EN;
|
||||
bcm_hwclock_set(mask, enable);
|
||||
}
|
||||
|
||||
static struct clk clk_spi = {
|
||||
.set = spi_set,
|
||||
};
|
||||
|
||||
/*
|
||||
* Internal peripheral clock
|
||||
*/
|
||||
static struct clk clk_periph = {
|
||||
.rate = (50 * 1000 * 1000),
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Linux clock API implementation
|
||||
*/
|
||||
int clk_enable(struct clk *clk)
|
||||
{
|
||||
mutex_lock(&clocks_mutex);
|
||||
clk_enable_unlocked(clk);
|
||||
mutex_unlock(&clocks_mutex);
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(clk_enable);
|
||||
|
||||
void clk_disable(struct clk *clk)
|
||||
{
|
||||
mutex_lock(&clocks_mutex);
|
||||
clk_disable_unlocked(clk);
|
||||
mutex_unlock(&clocks_mutex);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(clk_disable);
|
||||
|
||||
unsigned long clk_get_rate(struct clk *clk)
|
||||
{
|
||||
return clk->rate;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(clk_get_rate);
|
||||
|
||||
struct clk *clk_get(struct device *dev, const char *id)
|
||||
{
|
||||
if (!strcmp(id, "enet0"))
|
||||
return &clk_enet0;
|
||||
if (!strcmp(id, "enet1"))
|
||||
return &clk_enet1;
|
||||
if (!strcmp(id, "ephy"))
|
||||
return &clk_ephy;
|
||||
if (!strcmp(id, "usbh"))
|
||||
return &clk_usbh;
|
||||
if (!strcmp(id, "spi"))
|
||||
return &clk_spi;
|
||||
if (!strcmp(id, "periph"))
|
||||
return &clk_periph;
|
||||
if (BCMCPU_IS_6358() && !strcmp(id, "pcm"))
|
||||
return &clk_pcm;
|
||||
return ERR_PTR(-ENOENT);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(clk_get);
|
||||
|
||||
void clk_put(struct clk *clk)
|
||||
{
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(clk_put);
|
||||
345
arch/mips/bcm63xx/cpu.c
Normal file
345
arch/mips/bcm63xx/cpu.c
Normal file
|
|
@ -0,0 +1,345 @@
|
|||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
|
||||
* Copyright (C) 2009 Florian Fainelli <florian@openwrt.org>
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <bcm63xx_cpu.h>
|
||||
#include <bcm63xx_regs.h>
|
||||
#include <bcm63xx_io.h>
|
||||
#include <bcm63xx_irq.h>
|
||||
|
||||
const unsigned long *bcm63xx_regs_base;
|
||||
EXPORT_SYMBOL(bcm63xx_regs_base);
|
||||
|
||||
const int *bcm63xx_irqs;
|
||||
EXPORT_SYMBOL(bcm63xx_irqs);
|
||||
|
||||
static u16 bcm63xx_cpu_id;
|
||||
static u16 bcm63xx_cpu_rev;
|
||||
static unsigned int bcm63xx_cpu_freq;
|
||||
static unsigned int bcm63xx_memory_size;
|
||||
|
||||
/*
|
||||
* 6338 register sets and irqs
|
||||
*/
|
||||
static const unsigned long bcm96338_regs_base[] = {
|
||||
[RSET_DSL_LMEM] = BCM_6338_DSL_LMEM_BASE,
|
||||
[RSET_PERF] = BCM_6338_PERF_BASE,
|
||||
[RSET_TIMER] = BCM_6338_TIMER_BASE,
|
||||
[RSET_WDT] = BCM_6338_WDT_BASE,
|
||||
[RSET_UART0] = BCM_6338_UART0_BASE,
|
||||
[RSET_GPIO] = BCM_6338_GPIO_BASE,
|
||||
[RSET_SPI] = BCM_6338_SPI_BASE,
|
||||
[RSET_OHCI0] = BCM_6338_OHCI0_BASE,
|
||||
[RSET_OHCI_PRIV] = BCM_6338_OHCI_PRIV_BASE,
|
||||
[RSET_USBH_PRIV] = BCM_6338_USBH_PRIV_BASE,
|
||||
[RSET_UDC0] = BCM_6338_UDC0_BASE,
|
||||
[RSET_MPI] = BCM_6338_MPI_BASE,
|
||||
[RSET_PCMCIA] = BCM_6338_PCMCIA_BASE,
|
||||
[RSET_SDRAM] = BCM_6338_SDRAM_BASE,
|
||||
[RSET_DSL] = BCM_6338_DSL_BASE,
|
||||
[RSET_ENET0] = BCM_6338_ENET0_BASE,
|
||||
[RSET_ENET1] = BCM_6338_ENET1_BASE,
|
||||
[RSET_ENETDMA] = BCM_6338_ENETDMA_BASE,
|
||||
[RSET_MEMC] = BCM_6338_MEMC_BASE,
|
||||
[RSET_DDR] = BCM_6338_DDR_BASE,
|
||||
};
|
||||
|
||||
static const int bcm96338_irqs[] = {
|
||||
[IRQ_TIMER] = BCM_6338_TIMER_IRQ,
|
||||
[IRQ_UART0] = BCM_6338_UART0_IRQ,
|
||||
[IRQ_DSL] = BCM_6338_DSL_IRQ,
|
||||
[IRQ_ENET0] = BCM_6338_ENET0_IRQ,
|
||||
[IRQ_ENET_PHY] = BCM_6338_ENET_PHY_IRQ,
|
||||
[IRQ_ENET0_RXDMA] = BCM_6338_ENET0_RXDMA_IRQ,
|
||||
[IRQ_ENET0_TXDMA] = BCM_6338_ENET0_TXDMA_IRQ,
|
||||
};
|
||||
|
||||
/*
|
||||
* 6345 register sets and irqs
|
||||
*/
|
||||
static const unsigned long bcm96345_regs_base[] = {
|
||||
[RSET_DSL_LMEM] = BCM_6345_DSL_LMEM_BASE,
|
||||
[RSET_PERF] = BCM_6345_PERF_BASE,
|
||||
[RSET_TIMER] = BCM_6345_TIMER_BASE,
|
||||
[RSET_WDT] = BCM_6345_WDT_BASE,
|
||||
[RSET_UART0] = BCM_6345_UART0_BASE,
|
||||
[RSET_GPIO] = BCM_6345_GPIO_BASE,
|
||||
[RSET_SPI] = BCM_6345_SPI_BASE,
|
||||
[RSET_UDC0] = BCM_6345_UDC0_BASE,
|
||||
[RSET_OHCI0] = BCM_6345_OHCI0_BASE,
|
||||
[RSET_OHCI_PRIV] = BCM_6345_OHCI_PRIV_BASE,
|
||||
[RSET_USBH_PRIV] = BCM_6345_USBH_PRIV_BASE,
|
||||
[RSET_MPI] = BCM_6345_MPI_BASE,
|
||||
[RSET_PCMCIA] = BCM_6345_PCMCIA_BASE,
|
||||
[RSET_DSL] = BCM_6345_DSL_BASE,
|
||||
[RSET_ENET0] = BCM_6345_ENET0_BASE,
|
||||
[RSET_ENET1] = BCM_6345_ENET1_BASE,
|
||||
[RSET_ENETDMA] = BCM_6345_ENETDMA_BASE,
|
||||
[RSET_EHCI0] = BCM_6345_EHCI0_BASE,
|
||||
[RSET_SDRAM] = BCM_6345_SDRAM_BASE,
|
||||
[RSET_MEMC] = BCM_6345_MEMC_BASE,
|
||||
[RSET_DDR] = BCM_6345_DDR_BASE,
|
||||
};
|
||||
|
||||
static const int bcm96345_irqs[] = {
|
||||
[IRQ_TIMER] = BCM_6345_TIMER_IRQ,
|
||||
[IRQ_UART0] = BCM_6345_UART0_IRQ,
|
||||
[IRQ_DSL] = BCM_6345_DSL_IRQ,
|
||||
[IRQ_ENET0] = BCM_6345_ENET0_IRQ,
|
||||
[IRQ_ENET_PHY] = BCM_6345_ENET_PHY_IRQ,
|
||||
[IRQ_ENET0_RXDMA] = BCM_6345_ENET0_RXDMA_IRQ,
|
||||
[IRQ_ENET0_TXDMA] = BCM_6345_ENET0_TXDMA_IRQ,
|
||||
};
|
||||
|
||||
/*
|
||||
* 6348 register sets and irqs
|
||||
*/
|
||||
static const unsigned long bcm96348_regs_base[] = {
|
||||
[RSET_DSL_LMEM] = BCM_6348_DSL_LMEM_BASE,
|
||||
[RSET_PERF] = BCM_6348_PERF_BASE,
|
||||
[RSET_TIMER] = BCM_6348_TIMER_BASE,
|
||||
[RSET_WDT] = BCM_6348_WDT_BASE,
|
||||
[RSET_UART0] = BCM_6348_UART0_BASE,
|
||||
[RSET_GPIO] = BCM_6348_GPIO_BASE,
|
||||
[RSET_SPI] = BCM_6348_SPI_BASE,
|
||||
[RSET_OHCI0] = BCM_6348_OHCI0_BASE,
|
||||
[RSET_OHCI_PRIV] = BCM_6348_OHCI_PRIV_BASE,
|
||||
[RSET_USBH_PRIV] = BCM_6348_USBH_PRIV_BASE,
|
||||
[RSET_MPI] = BCM_6348_MPI_BASE,
|
||||
[RSET_PCMCIA] = BCM_6348_PCMCIA_BASE,
|
||||
[RSET_SDRAM] = BCM_6348_SDRAM_BASE,
|
||||
[RSET_DSL] = BCM_6348_DSL_BASE,
|
||||
[RSET_ENET0] = BCM_6348_ENET0_BASE,
|
||||
[RSET_ENET1] = BCM_6348_ENET1_BASE,
|
||||
[RSET_ENETDMA] = BCM_6348_ENETDMA_BASE,
|
||||
[RSET_MEMC] = BCM_6348_MEMC_BASE,
|
||||
[RSET_DDR] = BCM_6348_DDR_BASE,
|
||||
};
|
||||
|
||||
static const int bcm96348_irqs[] = {
|
||||
[IRQ_TIMER] = BCM_6348_TIMER_IRQ,
|
||||
[IRQ_UART0] = BCM_6348_UART0_IRQ,
|
||||
[IRQ_DSL] = BCM_6348_DSL_IRQ,
|
||||
[IRQ_ENET0] = BCM_6348_ENET0_IRQ,
|
||||
[IRQ_ENET1] = BCM_6348_ENET1_IRQ,
|
||||
[IRQ_ENET_PHY] = BCM_6348_ENET_PHY_IRQ,
|
||||
[IRQ_OHCI0] = BCM_6348_OHCI0_IRQ,
|
||||
[IRQ_PCMCIA] = BCM_6348_PCMCIA_IRQ,
|
||||
[IRQ_ENET0_RXDMA] = BCM_6348_ENET0_RXDMA_IRQ,
|
||||
[IRQ_ENET0_TXDMA] = BCM_6348_ENET0_TXDMA_IRQ,
|
||||
[IRQ_ENET1_RXDMA] = BCM_6348_ENET1_RXDMA_IRQ,
|
||||
[IRQ_ENET1_TXDMA] = BCM_6348_ENET1_TXDMA_IRQ,
|
||||
[IRQ_PCI] = BCM_6348_PCI_IRQ,
|
||||
};
|
||||
|
||||
/*
|
||||
* 6358 register sets and irqs
|
||||
*/
|
||||
static const unsigned long bcm96358_regs_base[] = {
|
||||
[RSET_DSL_LMEM] = BCM_6358_DSL_LMEM_BASE,
|
||||
[RSET_PERF] = BCM_6358_PERF_BASE,
|
||||
[RSET_TIMER] = BCM_6358_TIMER_BASE,
|
||||
[RSET_WDT] = BCM_6358_WDT_BASE,
|
||||
[RSET_UART0] = BCM_6358_UART0_BASE,
|
||||
[RSET_GPIO] = BCM_6358_GPIO_BASE,
|
||||
[RSET_SPI] = BCM_6358_SPI_BASE,
|
||||
[RSET_OHCI0] = BCM_6358_OHCI0_BASE,
|
||||
[RSET_EHCI0] = BCM_6358_EHCI0_BASE,
|
||||
[RSET_OHCI_PRIV] = BCM_6358_OHCI_PRIV_BASE,
|
||||
[RSET_USBH_PRIV] = BCM_6358_USBH_PRIV_BASE,
|
||||
[RSET_MPI] = BCM_6358_MPI_BASE,
|
||||
[RSET_PCMCIA] = BCM_6358_PCMCIA_BASE,
|
||||
[RSET_SDRAM] = BCM_6358_SDRAM_BASE,
|
||||
[RSET_DSL] = BCM_6358_DSL_BASE,
|
||||
[RSET_ENET0] = BCM_6358_ENET0_BASE,
|
||||
[RSET_ENET1] = BCM_6358_ENET1_BASE,
|
||||
[RSET_ENETDMA] = BCM_6358_ENETDMA_BASE,
|
||||
[RSET_MEMC] = BCM_6358_MEMC_BASE,
|
||||
[RSET_DDR] = BCM_6358_DDR_BASE,
|
||||
};
|
||||
|
||||
static const int bcm96358_irqs[] = {
|
||||
[IRQ_TIMER] = BCM_6358_TIMER_IRQ,
|
||||
[IRQ_UART0] = BCM_6358_UART0_IRQ,
|
||||
[IRQ_DSL] = BCM_6358_DSL_IRQ,
|
||||
[IRQ_ENET0] = BCM_6358_ENET0_IRQ,
|
||||
[IRQ_ENET1] = BCM_6358_ENET1_IRQ,
|
||||
[IRQ_ENET_PHY] = BCM_6358_ENET_PHY_IRQ,
|
||||
[IRQ_OHCI0] = BCM_6358_OHCI0_IRQ,
|
||||
[IRQ_EHCI0] = BCM_6358_EHCI0_IRQ,
|
||||
[IRQ_PCMCIA] = BCM_6358_PCMCIA_IRQ,
|
||||
[IRQ_ENET0_RXDMA] = BCM_6358_ENET0_RXDMA_IRQ,
|
||||
[IRQ_ENET0_TXDMA] = BCM_6358_ENET0_TXDMA_IRQ,
|
||||
[IRQ_ENET1_RXDMA] = BCM_6358_ENET1_RXDMA_IRQ,
|
||||
[IRQ_ENET1_TXDMA] = BCM_6358_ENET1_TXDMA_IRQ,
|
||||
[IRQ_PCI] = BCM_6358_PCI_IRQ,
|
||||
};
|
||||
|
||||
u16 __bcm63xx_get_cpu_id(void)
|
||||
{
|
||||
return bcm63xx_cpu_id;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(__bcm63xx_get_cpu_id);
|
||||
|
||||
u16 bcm63xx_get_cpu_rev(void)
|
||||
{
|
||||
return bcm63xx_cpu_rev;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(bcm63xx_get_cpu_rev);
|
||||
|
||||
unsigned int bcm63xx_get_cpu_freq(void)
|
||||
{
|
||||
return bcm63xx_cpu_freq;
|
||||
}
|
||||
|
||||
unsigned int bcm63xx_get_memory_size(void)
|
||||
{
|
||||
return bcm63xx_memory_size;
|
||||
}
|
||||
|
||||
static unsigned int detect_cpu_clock(void)
|
||||
{
|
||||
unsigned int tmp, n1 = 0, n2 = 0, m1 = 0;
|
||||
|
||||
/* BCM6338 has a fixed 240 Mhz frequency */
|
||||
if (BCMCPU_IS_6338())
|
||||
return 240000000;
|
||||
|
||||
/* BCM6345 has a fixed 140Mhz frequency */
|
||||
if (BCMCPU_IS_6345())
|
||||
return 140000000;
|
||||
|
||||
/*
|
||||
* frequency depends on PLL configuration:
|
||||
*/
|
||||
if (BCMCPU_IS_6348()) {
|
||||
/* 16MHz * (N1 + 1) * (N2 + 2) / (M1_CPU + 1) */
|
||||
tmp = bcm_perf_readl(PERF_MIPSPLLCTL_REG);
|
||||
n1 = (tmp & MIPSPLLCTL_N1_MASK) >> MIPSPLLCTL_N1_SHIFT;
|
||||
n2 = (tmp & MIPSPLLCTL_N2_MASK) >> MIPSPLLCTL_N2_SHIFT;
|
||||
m1 = (tmp & MIPSPLLCTL_M1CPU_MASK) >> MIPSPLLCTL_M1CPU_SHIFT;
|
||||
n1 += 1;
|
||||
n2 += 2;
|
||||
m1 += 1;
|
||||
}
|
||||
|
||||
if (BCMCPU_IS_6358()) {
|
||||
/* 16MHz * N1 * N2 / M1_CPU */
|
||||
tmp = bcm_ddr_readl(DDR_DMIPSPLLCFG_REG);
|
||||
n1 = (tmp & DMIPSPLLCFG_N1_MASK) >> DMIPSPLLCFG_N1_SHIFT;
|
||||
n2 = (tmp & DMIPSPLLCFG_N2_MASK) >> DMIPSPLLCFG_N2_SHIFT;
|
||||
m1 = (tmp & DMIPSPLLCFG_M1_MASK) >> DMIPSPLLCFG_M1_SHIFT;
|
||||
}
|
||||
|
||||
return (16 * 1000000 * n1 * n2) / m1;
|
||||
}
|
||||
|
||||
/*
|
||||
* attempt to detect the amount of memory installed
|
||||
*/
|
||||
static unsigned int detect_memory_size(void)
|
||||
{
|
||||
unsigned int cols = 0, rows = 0, is_32bits = 0, banks = 0;
|
||||
u32 val;
|
||||
|
||||
if (BCMCPU_IS_6345())
|
||||
return (8 * 1024 * 1024);
|
||||
|
||||
if (BCMCPU_IS_6338() || BCMCPU_IS_6348()) {
|
||||
val = bcm_sdram_readl(SDRAM_CFG_REG);
|
||||
rows = (val & SDRAM_CFG_ROW_MASK) >> SDRAM_CFG_ROW_SHIFT;
|
||||
cols = (val & SDRAM_CFG_COL_MASK) >> SDRAM_CFG_COL_SHIFT;
|
||||
is_32bits = (val & SDRAM_CFG_32B_MASK) ? 1 : 0;
|
||||
banks = (val & SDRAM_CFG_BANK_MASK) ? 2 : 1;
|
||||
}
|
||||
|
||||
if (BCMCPU_IS_6358()) {
|
||||
val = bcm_memc_readl(MEMC_CFG_REG);
|
||||
rows = (val & MEMC_CFG_ROW_MASK) >> MEMC_CFG_ROW_SHIFT;
|
||||
cols = (val & MEMC_CFG_COL_MASK) >> MEMC_CFG_COL_SHIFT;
|
||||
is_32bits = (val & MEMC_CFG_32B_MASK) ? 0 : 1;
|
||||
banks = 2;
|
||||
}
|
||||
|
||||
/* 0 => 11 address bits ... 2 => 13 address bits */
|
||||
rows += 11;
|
||||
|
||||
/* 0 => 8 address bits ... 2 => 10 address bits */
|
||||
cols += 8;
|
||||
|
||||
return 1 << (cols + rows + (is_32bits + 1) + banks);
|
||||
}
|
||||
|
||||
void __init bcm63xx_cpu_init(void)
|
||||
{
|
||||
unsigned int tmp, expected_cpu_id;
|
||||
struct cpuinfo_mips *c = ¤t_cpu_data;
|
||||
|
||||
/* soc registers location depends on cpu type */
|
||||
expected_cpu_id = 0;
|
||||
|
||||
switch (c->cputype) {
|
||||
/*
|
||||
* BCM6338 as the same PrId as BCM3302 see arch/mips/kernel/cpu-probe.c
|
||||
*/
|
||||
case CPU_BCM3302:
|
||||
expected_cpu_id = BCM6338_CPU_ID;
|
||||
bcm63xx_regs_base = bcm96338_regs_base;
|
||||
bcm63xx_irqs = bcm96338_irqs;
|
||||
break;
|
||||
case CPU_BCM6345:
|
||||
expected_cpu_id = BCM6345_CPU_ID;
|
||||
bcm63xx_regs_base = bcm96345_regs_base;
|
||||
bcm63xx_irqs = bcm96345_irqs;
|
||||
break;
|
||||
case CPU_BCM6348:
|
||||
expected_cpu_id = BCM6348_CPU_ID;
|
||||
bcm63xx_regs_base = bcm96348_regs_base;
|
||||
bcm63xx_irqs = bcm96348_irqs;
|
||||
break;
|
||||
case CPU_BCM6358:
|
||||
expected_cpu_id = BCM6358_CPU_ID;
|
||||
bcm63xx_regs_base = bcm96358_regs_base;
|
||||
bcm63xx_irqs = bcm96358_irqs;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* really early to panic, but delaying panic would not help since we
|
||||
* will never get any working console
|
||||
*/
|
||||
if (!expected_cpu_id)
|
||||
panic("unsupported Broadcom CPU");
|
||||
|
||||
/*
|
||||
* bcm63xx_regs_base is set, we can access soc registers
|
||||
*/
|
||||
|
||||
/* double check CPU type */
|
||||
tmp = bcm_perf_readl(PERF_REV_REG);
|
||||
bcm63xx_cpu_id = (tmp & REV_CHIPID_MASK) >> REV_CHIPID_SHIFT;
|
||||
bcm63xx_cpu_rev = (tmp & REV_REVID_MASK) >> REV_REVID_SHIFT;
|
||||
|
||||
if (bcm63xx_cpu_id != expected_cpu_id)
|
||||
panic("bcm63xx CPU id mismatch");
|
||||
|
||||
bcm63xx_cpu_freq = detect_cpu_clock();
|
||||
bcm63xx_memory_size = detect_memory_size();
|
||||
|
||||
printk(KERN_INFO "Detected Broadcom 0x%04x CPU revision %02x\n",
|
||||
bcm63xx_cpu_id, bcm63xx_cpu_rev);
|
||||
printk(KERN_INFO "CPU frequency is %u MHz\n",
|
||||
bcm63xx_cpu_freq / 1000000);
|
||||
printk(KERN_INFO "%uMB of RAM installed\n",
|
||||
bcm63xx_memory_size >> 20);
|
||||
}
|
||||
144
arch/mips/bcm63xx/cs.c
Normal file
144
arch/mips/bcm63xx/cs.c
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/log2.h>
|
||||
#include <bcm63xx_cpu.h>
|
||||
#include <bcm63xx_io.h>
|
||||
#include <bcm63xx_regs.h>
|
||||
#include <bcm63xx_cs.h>
|
||||
|
||||
static DEFINE_SPINLOCK(bcm63xx_cs_lock);
|
||||
|
||||
/*
|
||||
* check if given chip select exists
|
||||
*/
|
||||
static int is_valid_cs(unsigned int cs)
|
||||
{
|
||||
if (cs > 6)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Configure chipselect base address and size (bytes).
|
||||
* Size must be a power of two between 8k and 256M.
|
||||
*/
|
||||
int bcm63xx_set_cs_base(unsigned int cs, u32 base, unsigned int size)
|
||||
{
|
||||
unsigned long flags;
|
||||
u32 val;
|
||||
|
||||
if (!is_valid_cs(cs))
|
||||
return -EINVAL;
|
||||
|
||||
/* sanity check on size */
|
||||
if (size != roundup_pow_of_two(size))
|
||||
return -EINVAL;
|
||||
|
||||
if (size < 8 * 1024 || size > 256 * 1024 * 1024)
|
||||
return -EINVAL;
|
||||
|
||||
val = (base & MPI_CSBASE_BASE_MASK);
|
||||
/* 8k => 0 - 256M => 15 */
|
||||
val |= (ilog2(size) - ilog2(8 * 1024)) << MPI_CSBASE_SIZE_SHIFT;
|
||||
|
||||
spin_lock_irqsave(&bcm63xx_cs_lock, flags);
|
||||
bcm_mpi_writel(val, MPI_CSBASE_REG(cs));
|
||||
spin_unlock_irqrestore(&bcm63xx_cs_lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(bcm63xx_set_cs_base);
|
||||
|
||||
/*
|
||||
* configure chipselect timing (ns)
|
||||
*/
|
||||
int bcm63xx_set_cs_timing(unsigned int cs, unsigned int wait,
|
||||
unsigned int setup, unsigned int hold)
|
||||
{
|
||||
unsigned long flags;
|
||||
u32 val;
|
||||
|
||||
if (!is_valid_cs(cs))
|
||||
return -EINVAL;
|
||||
|
||||
spin_lock_irqsave(&bcm63xx_cs_lock, flags);
|
||||
val = bcm_mpi_readl(MPI_CSCTL_REG(cs));
|
||||
val &= ~(MPI_CSCTL_WAIT_MASK);
|
||||
val &= ~(MPI_CSCTL_SETUP_MASK);
|
||||
val &= ~(MPI_CSCTL_HOLD_MASK);
|
||||
val |= wait << MPI_CSCTL_WAIT_SHIFT;
|
||||
val |= setup << MPI_CSCTL_SETUP_SHIFT;
|
||||
val |= hold << MPI_CSCTL_HOLD_SHIFT;
|
||||
bcm_mpi_writel(val, MPI_CSCTL_REG(cs));
|
||||
spin_unlock_irqrestore(&bcm63xx_cs_lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(bcm63xx_set_cs_timing);
|
||||
|
||||
/*
|
||||
* configure other chipselect parameter (data bus size, ...)
|
||||
*/
|
||||
int bcm63xx_set_cs_param(unsigned int cs, u32 params)
|
||||
{
|
||||
unsigned long flags;
|
||||
u32 val;
|
||||
|
||||
if (!is_valid_cs(cs))
|
||||
return -EINVAL;
|
||||
|
||||
/* none of this fields apply to pcmcia */
|
||||
if (cs == MPI_CS_PCMCIA_COMMON ||
|
||||
cs == MPI_CS_PCMCIA_ATTR ||
|
||||
cs == MPI_CS_PCMCIA_IO)
|
||||
return -EINVAL;
|
||||
|
||||
spin_lock_irqsave(&bcm63xx_cs_lock, flags);
|
||||
val = bcm_mpi_readl(MPI_CSCTL_REG(cs));
|
||||
val &= ~(MPI_CSCTL_DATA16_MASK);
|
||||
val &= ~(MPI_CSCTL_SYNCMODE_MASK);
|
||||
val &= ~(MPI_CSCTL_TSIZE_MASK);
|
||||
val &= ~(MPI_CSCTL_ENDIANSWAP_MASK);
|
||||
val |= params;
|
||||
bcm_mpi_writel(val, MPI_CSCTL_REG(cs));
|
||||
spin_unlock_irqrestore(&bcm63xx_cs_lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(bcm63xx_set_cs_param);
|
||||
|
||||
/*
|
||||
* set cs status (enable/disable)
|
||||
*/
|
||||
int bcm63xx_set_cs_status(unsigned int cs, int enable)
|
||||
{
|
||||
unsigned long flags;
|
||||
u32 val;
|
||||
|
||||
if (!is_valid_cs(cs))
|
||||
return -EINVAL;
|
||||
|
||||
spin_lock_irqsave(&bcm63xx_cs_lock, flags);
|
||||
val = bcm_mpi_readl(MPI_CSCTL_REG(cs));
|
||||
if (enable)
|
||||
val |= MPI_CSCTL_ENABLE_MASK;
|
||||
else
|
||||
val &= ~MPI_CSCTL_ENABLE_MASK;
|
||||
bcm_mpi_writel(val, MPI_CSCTL_REG(cs));
|
||||
spin_unlock_irqrestore(&bcm63xx_cs_lock, flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(bcm63xx_set_cs_status);
|
||||
56
arch/mips/bcm63xx/dev-dsp.c
Normal file
56
arch/mips/bcm63xx/dev-dsp.c
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* Broadcom BCM63xx VoIP DSP registration
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2009 Florian Fainelli <florian@openwrt.org>
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <bcm63xx_cpu.h>
|
||||
#include <bcm63xx_dev_dsp.h>
|
||||
#include <bcm63xx_regs.h>
|
||||
#include <bcm63xx_io.h>
|
||||
|
||||
static struct resource voip_dsp_resources[] = {
|
||||
{
|
||||
.start = -1, /* filled at runtime */
|
||||
.end = -1, /* filled at runtime */
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = -1, /* filled at runtime */
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device bcm63xx_voip_dsp_device = {
|
||||
.name = "bcm63xx-voip-dsp",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(voip_dsp_resources),
|
||||
.resource = voip_dsp_resources,
|
||||
};
|
||||
|
||||
int __init bcm63xx_dsp_register(const struct bcm63xx_dsp_platform_data *pd)
|
||||
{
|
||||
struct bcm63xx_dsp_platform_data *dpd;
|
||||
u32 val;
|
||||
|
||||
/* Get the memory window */
|
||||
val = bcm_mpi_readl(MPI_CSBASE_REG(pd->cs - 1));
|
||||
val &= MPI_CSBASE_BASE_MASK;
|
||||
voip_dsp_resources[0].start = val;
|
||||
voip_dsp_resources[0].end = val + 0xFFFFFFF;
|
||||
voip_dsp_resources[1].start = pd->ext_irq;
|
||||
|
||||
/* copy given platform data */
|
||||
dpd = bcm63xx_voip_dsp_device.dev.platform_data;
|
||||
memcpy(dpd, pd, sizeof (*pd));
|
||||
|
||||
return platform_device_register(&bcm63xx_voip_dsp_device);
|
||||
}
|
||||
30
arch/mips/bcm63xx/early_printk.c
Normal file
30
arch/mips/bcm63xx/early_printk.c
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <bcm63xx_io.h>
|
||||
#include <bcm63xx_regs.h>
|
||||
|
||||
static void __init wait_xfered(void)
|
||||
{
|
||||
unsigned int val;
|
||||
|
||||
/* wait for any previous char to be transmitted */
|
||||
do {
|
||||
val = bcm_uart0_readl(UART_IR_REG);
|
||||
if (val & UART_IR_STAT(UART_IR_TXEMPTY))
|
||||
break;
|
||||
} while (1);
|
||||
}
|
||||
|
||||
void __init prom_putchar(char c)
|
||||
{
|
||||
wait_xfered();
|
||||
bcm_uart0_writel(c, UART_FIFO_REG);
|
||||
wait_xfered();
|
||||
}
|
||||
134
arch/mips/bcm63xx/gpio.c
Normal file
134
arch/mips/bcm63xx/gpio.c
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
|
||||
* Copyright (C) 2008 Florian Fainelli <florian@openwrt.org>
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <bcm63xx_cpu.h>
|
||||
#include <bcm63xx_gpio.h>
|
||||
#include <bcm63xx_io.h>
|
||||
#include <bcm63xx_regs.h>
|
||||
|
||||
static DEFINE_SPINLOCK(bcm63xx_gpio_lock);
|
||||
static u32 gpio_out_low, gpio_out_high;
|
||||
|
||||
static void bcm63xx_gpio_set(struct gpio_chip *chip,
|
||||
unsigned gpio, int val)
|
||||
{
|
||||
u32 reg;
|
||||
u32 mask;
|
||||
u32 *v;
|
||||
unsigned long flags;
|
||||
|
||||
if (gpio >= chip->ngpio)
|
||||
BUG();
|
||||
|
||||
if (gpio < 32) {
|
||||
reg = GPIO_DATA_LO_REG;
|
||||
mask = 1 << gpio;
|
||||
v = &gpio_out_low;
|
||||
} else {
|
||||
reg = GPIO_DATA_HI_REG;
|
||||
mask = 1 << (gpio - 32);
|
||||
v = &gpio_out_high;
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&bcm63xx_gpio_lock, flags);
|
||||
if (val)
|
||||
*v |= mask;
|
||||
else
|
||||
*v &= ~mask;
|
||||
bcm_gpio_writel(*v, reg);
|
||||
spin_unlock_irqrestore(&bcm63xx_gpio_lock, flags);
|
||||
}
|
||||
|
||||
static int bcm63xx_gpio_get(struct gpio_chip *chip, unsigned gpio)
|
||||
{
|
||||
u32 reg;
|
||||
u32 mask;
|
||||
|
||||
if (gpio >= chip->ngpio)
|
||||
BUG();
|
||||
|
||||
if (gpio < 32) {
|
||||
reg = GPIO_DATA_LO_REG;
|
||||
mask = 1 << gpio;
|
||||
} else {
|
||||
reg = GPIO_DATA_HI_REG;
|
||||
mask = 1 << (gpio - 32);
|
||||
}
|
||||
|
||||
return !!(bcm_gpio_readl(reg) & mask);
|
||||
}
|
||||
|
||||
static int bcm63xx_gpio_set_direction(struct gpio_chip *chip,
|
||||
unsigned gpio, int dir)
|
||||
{
|
||||
u32 reg;
|
||||
u32 mask;
|
||||
u32 tmp;
|
||||
unsigned long flags;
|
||||
|
||||
if (gpio >= chip->ngpio)
|
||||
BUG();
|
||||
|
||||
if (gpio < 32) {
|
||||
reg = GPIO_CTL_LO_REG;
|
||||
mask = 1 << gpio;
|
||||
} else {
|
||||
reg = GPIO_CTL_HI_REG;
|
||||
mask = 1 << (gpio - 32);
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&bcm63xx_gpio_lock, flags);
|
||||
tmp = bcm_gpio_readl(reg);
|
||||
if (dir == GPIO_DIR_IN)
|
||||
tmp &= ~mask;
|
||||
else
|
||||
tmp |= mask;
|
||||
bcm_gpio_writel(tmp, reg);
|
||||
spin_unlock_irqrestore(&bcm63xx_gpio_lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int bcm63xx_gpio_direction_input(struct gpio_chip *chip, unsigned gpio)
|
||||
{
|
||||
return bcm63xx_gpio_set_direction(chip, gpio, GPIO_DIR_IN);
|
||||
}
|
||||
|
||||
static int bcm63xx_gpio_direction_output(struct gpio_chip *chip,
|
||||
unsigned gpio, int value)
|
||||
{
|
||||
bcm63xx_gpio_set(chip, gpio, value);
|
||||
return bcm63xx_gpio_set_direction(chip, gpio, GPIO_DIR_OUT);
|
||||
}
|
||||
|
||||
|
||||
static struct gpio_chip bcm63xx_gpio_chip = {
|
||||
.label = "bcm63xx-gpio",
|
||||
.direction_input = bcm63xx_gpio_direction_input,
|
||||
.direction_output = bcm63xx_gpio_direction_output,
|
||||
.get = bcm63xx_gpio_get,
|
||||
.set = bcm63xx_gpio_set,
|
||||
.base = 0,
|
||||
};
|
||||
|
||||
int __init bcm63xx_gpio_init(void)
|
||||
{
|
||||
bcm63xx_gpio_chip.ngpio = bcm63xx_gpio_count();
|
||||
pr_info("registering %d GPIOs\n", bcm63xx_gpio_chip.ngpio);
|
||||
|
||||
return gpiochip_add(&bcm63xx_gpio_chip);
|
||||
}
|
||||
|
||||
arch_initcall(bcm63xx_gpio_init);
|
||||
253
arch/mips/bcm63xx/irq.c
Normal file
253
arch/mips/bcm63xx/irq.c
Normal file
|
|
@ -0,0 +1,253 @@
|
|||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
|
||||
* Copyright (C) 2008 Nicolas Schichan <nschichan@freebox.fr>
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/module.h>
|
||||
#include <asm/irq_cpu.h>
|
||||
#include <asm/mipsregs.h>
|
||||
#include <bcm63xx_cpu.h>
|
||||
#include <bcm63xx_regs.h>
|
||||
#include <bcm63xx_io.h>
|
||||
#include <bcm63xx_irq.h>
|
||||
|
||||
/*
|
||||
* dispatch internal devices IRQ (uart, enet, watchdog, ...). do not
|
||||
* prioritize any interrupt relatively to another. the static counter
|
||||
* will resume the loop where it ended the last time we left this
|
||||
* function.
|
||||
*/
|
||||
static void bcm63xx_irq_dispatch_internal(void)
|
||||
{
|
||||
u32 pending;
|
||||
static int i;
|
||||
|
||||
pending = bcm_perf_readl(PERF_IRQMASK_REG) &
|
||||
bcm_perf_readl(PERF_IRQSTAT_REG);
|
||||
|
||||
if (!pending)
|
||||
return ;
|
||||
|
||||
while (1) {
|
||||
int to_call = i;
|
||||
|
||||
i = (i + 1) & 0x1f;
|
||||
if (pending & (1 << to_call)) {
|
||||
do_IRQ(to_call + IRQ_INTERNAL_BASE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
asmlinkage void plat_irq_dispatch(void)
|
||||
{
|
||||
u32 cause;
|
||||
|
||||
do {
|
||||
cause = read_c0_cause() & read_c0_status() & ST0_IM;
|
||||
|
||||
if (!cause)
|
||||
break;
|
||||
|
||||
if (cause & CAUSEF_IP7)
|
||||
do_IRQ(7);
|
||||
if (cause & CAUSEF_IP2)
|
||||
bcm63xx_irq_dispatch_internal();
|
||||
if (cause & CAUSEF_IP3)
|
||||
do_IRQ(IRQ_EXT_0);
|
||||
if (cause & CAUSEF_IP4)
|
||||
do_IRQ(IRQ_EXT_1);
|
||||
if (cause & CAUSEF_IP5)
|
||||
do_IRQ(IRQ_EXT_2);
|
||||
if (cause & CAUSEF_IP6)
|
||||
do_IRQ(IRQ_EXT_3);
|
||||
} while (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* internal IRQs operations: only mask/unmask on PERF irq mask
|
||||
* register.
|
||||
*/
|
||||
static inline void bcm63xx_internal_irq_mask(unsigned int irq)
|
||||
{
|
||||
u32 mask;
|
||||
|
||||
irq -= IRQ_INTERNAL_BASE;
|
||||
mask = bcm_perf_readl(PERF_IRQMASK_REG);
|
||||
mask &= ~(1 << irq);
|
||||
bcm_perf_writel(mask, PERF_IRQMASK_REG);
|
||||
}
|
||||
|
||||
static void bcm63xx_internal_irq_unmask(unsigned int irq)
|
||||
{
|
||||
u32 mask;
|
||||
|
||||
irq -= IRQ_INTERNAL_BASE;
|
||||
mask = bcm_perf_readl(PERF_IRQMASK_REG);
|
||||
mask |= (1 << irq);
|
||||
bcm_perf_writel(mask, PERF_IRQMASK_REG);
|
||||
}
|
||||
|
||||
static unsigned int bcm63xx_internal_irq_startup(unsigned int irq)
|
||||
{
|
||||
bcm63xx_internal_irq_unmask(irq);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* external IRQs operations: mask/unmask and clear on PERF external
|
||||
* irq control register.
|
||||
*/
|
||||
static void bcm63xx_external_irq_mask(unsigned int irq)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
irq -= IRQ_EXT_BASE;
|
||||
reg = bcm_perf_readl(PERF_EXTIRQ_CFG_REG);
|
||||
reg &= ~EXTIRQ_CFG_MASK(irq);
|
||||
bcm_perf_writel(reg, PERF_EXTIRQ_CFG_REG);
|
||||
}
|
||||
|
||||
static void bcm63xx_external_irq_unmask(unsigned int irq)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
irq -= IRQ_EXT_BASE;
|
||||
reg = bcm_perf_readl(PERF_EXTIRQ_CFG_REG);
|
||||
reg |= EXTIRQ_CFG_MASK(irq);
|
||||
bcm_perf_writel(reg, PERF_EXTIRQ_CFG_REG);
|
||||
}
|
||||
|
||||
static void bcm63xx_external_irq_clear(unsigned int irq)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
irq -= IRQ_EXT_BASE;
|
||||
reg = bcm_perf_readl(PERF_EXTIRQ_CFG_REG);
|
||||
reg |= EXTIRQ_CFG_CLEAR(irq);
|
||||
bcm_perf_writel(reg, PERF_EXTIRQ_CFG_REG);
|
||||
}
|
||||
|
||||
static unsigned int bcm63xx_external_irq_startup(unsigned int irq)
|
||||
{
|
||||
set_c0_status(0x100 << (irq - IRQ_MIPS_BASE));
|
||||
irq_enable_hazard();
|
||||
bcm63xx_external_irq_unmask(irq);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void bcm63xx_external_irq_shutdown(unsigned int irq)
|
||||
{
|
||||
bcm63xx_external_irq_mask(irq);
|
||||
clear_c0_status(0x100 << (irq - IRQ_MIPS_BASE));
|
||||
irq_disable_hazard();
|
||||
}
|
||||
|
||||
static int bcm63xx_external_irq_set_type(unsigned int irq,
|
||||
unsigned int flow_type)
|
||||
{
|
||||
u32 reg;
|
||||
struct irq_desc *desc = irq_desc + irq;
|
||||
|
||||
irq -= IRQ_EXT_BASE;
|
||||
|
||||
flow_type &= IRQ_TYPE_SENSE_MASK;
|
||||
|
||||
if (flow_type == IRQ_TYPE_NONE)
|
||||
flow_type = IRQ_TYPE_LEVEL_LOW;
|
||||
|
||||
reg = bcm_perf_readl(PERF_EXTIRQ_CFG_REG);
|
||||
switch (flow_type) {
|
||||
case IRQ_TYPE_EDGE_BOTH:
|
||||
reg &= ~EXTIRQ_CFG_LEVELSENSE(irq);
|
||||
reg |= EXTIRQ_CFG_BOTHEDGE(irq);
|
||||
break;
|
||||
|
||||
case IRQ_TYPE_EDGE_RISING:
|
||||
reg &= ~EXTIRQ_CFG_LEVELSENSE(irq);
|
||||
reg |= EXTIRQ_CFG_SENSE(irq);
|
||||
reg &= ~EXTIRQ_CFG_BOTHEDGE(irq);
|
||||
break;
|
||||
|
||||
case IRQ_TYPE_EDGE_FALLING:
|
||||
reg &= ~EXTIRQ_CFG_LEVELSENSE(irq);
|
||||
reg &= ~EXTIRQ_CFG_SENSE(irq);
|
||||
reg &= ~EXTIRQ_CFG_BOTHEDGE(irq);
|
||||
break;
|
||||
|
||||
case IRQ_TYPE_LEVEL_HIGH:
|
||||
reg |= EXTIRQ_CFG_LEVELSENSE(irq);
|
||||
reg |= EXTIRQ_CFG_SENSE(irq);
|
||||
break;
|
||||
|
||||
case IRQ_TYPE_LEVEL_LOW:
|
||||
reg |= EXTIRQ_CFG_LEVELSENSE(irq);
|
||||
reg &= ~EXTIRQ_CFG_SENSE(irq);
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(KERN_ERR "bogus flow type combination given !\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
bcm_perf_writel(reg, PERF_EXTIRQ_CFG_REG);
|
||||
|
||||
if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) {
|
||||
desc->status |= IRQ_LEVEL;
|
||||
desc->handle_irq = handle_level_irq;
|
||||
} else {
|
||||
desc->handle_irq = handle_edge_irq;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct irq_chip bcm63xx_internal_irq_chip = {
|
||||
.name = "bcm63xx_ipic",
|
||||
.startup = bcm63xx_internal_irq_startup,
|
||||
.shutdown = bcm63xx_internal_irq_mask,
|
||||
|
||||
.mask = bcm63xx_internal_irq_mask,
|
||||
.mask_ack = bcm63xx_internal_irq_mask,
|
||||
.unmask = bcm63xx_internal_irq_unmask,
|
||||
};
|
||||
|
||||
static struct irq_chip bcm63xx_external_irq_chip = {
|
||||
.name = "bcm63xx_epic",
|
||||
.startup = bcm63xx_external_irq_startup,
|
||||
.shutdown = bcm63xx_external_irq_shutdown,
|
||||
|
||||
.ack = bcm63xx_external_irq_clear,
|
||||
|
||||
.mask = bcm63xx_external_irq_mask,
|
||||
.unmask = bcm63xx_external_irq_unmask,
|
||||
|
||||
.set_type = bcm63xx_external_irq_set_type,
|
||||
};
|
||||
|
||||
static struct irqaction cpu_ip2_cascade_action = {
|
||||
.handler = no_action,
|
||||
.name = "cascade_ip2",
|
||||
};
|
||||
|
||||
void __init arch_init_irq(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
mips_cpu_irq_init();
|
||||
for (i = IRQ_INTERNAL_BASE; i < NR_IRQS; ++i)
|
||||
set_irq_chip_and_handler(i, &bcm63xx_internal_irq_chip,
|
||||
handle_level_irq);
|
||||
|
||||
for (i = IRQ_EXT_BASE; i < IRQ_EXT_BASE + 4; ++i)
|
||||
set_irq_chip_and_handler(i, &bcm63xx_external_irq_chip,
|
||||
handle_edge_irq);
|
||||
|
||||
setup_irq(IRQ_MIPS_BASE + 2, &cpu_ip2_cascade_action);
|
||||
}
|
||||
55
arch/mips/bcm63xx/prom.c
Normal file
55
arch/mips/bcm63xx/prom.c
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/bootmem.h>
|
||||
#include <asm/bootinfo.h>
|
||||
#include <bcm63xx_board.h>
|
||||
#include <bcm63xx_cpu.h>
|
||||
#include <bcm63xx_io.h>
|
||||
#include <bcm63xx_regs.h>
|
||||
#include <bcm63xx_gpio.h>
|
||||
|
||||
void __init prom_init(void)
|
||||
{
|
||||
u32 reg, mask;
|
||||
|
||||
bcm63xx_cpu_init();
|
||||
|
||||
/* stop any running watchdog */
|
||||
bcm_wdt_writel(WDT_STOP_1, WDT_CTL_REG);
|
||||
bcm_wdt_writel(WDT_STOP_2, WDT_CTL_REG);
|
||||
|
||||
/* disable all hardware blocks clock for now */
|
||||
if (BCMCPU_IS_6338())
|
||||
mask = CKCTL_6338_ALL_SAFE_EN;
|
||||
else if (BCMCPU_IS_6345())
|
||||
mask = CKCTL_6345_ALL_SAFE_EN;
|
||||
else if (BCMCPU_IS_6348())
|
||||
mask = CKCTL_6348_ALL_SAFE_EN;
|
||||
else
|
||||
/* BCMCPU_IS_6358() */
|
||||
mask = CKCTL_6358_ALL_SAFE_EN;
|
||||
|
||||
reg = bcm_perf_readl(PERF_CKCTL_REG);
|
||||
reg &= ~mask;
|
||||
bcm_perf_writel(reg, PERF_CKCTL_REG);
|
||||
|
||||
/* assign command line from kernel config */
|
||||
strcpy(arcs_cmdline, CONFIG_CMDLINE);
|
||||
|
||||
/* register gpiochip */
|
||||
bcm63xx_gpio_init();
|
||||
|
||||
/* do low level board init */
|
||||
board_prom_init();
|
||||
}
|
||||
|
||||
void __init prom_free_prom_memory(void)
|
||||
{
|
||||
}
|
||||
125
arch/mips/bcm63xx/setup.c
Normal file
125
arch/mips/bcm63xx/setup.c
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/bootmem.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/pm.h>
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/time.h>
|
||||
#include <asm/reboot.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <bcm63xx_board.h>
|
||||
#include <bcm63xx_cpu.h>
|
||||
#include <bcm63xx_regs.h>
|
||||
#include <bcm63xx_io.h>
|
||||
|
||||
void bcm63xx_machine_halt(void)
|
||||
{
|
||||
printk(KERN_INFO "System halted\n");
|
||||
while (1)
|
||||
;
|
||||
}
|
||||
|
||||
static void bcm6348_a1_reboot(void)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
/* soft reset all blocks */
|
||||
printk(KERN_INFO "soft-reseting all blocks ...\n");
|
||||
reg = bcm_perf_readl(PERF_SOFTRESET_REG);
|
||||
reg &= ~SOFTRESET_6348_ALL;
|
||||
bcm_perf_writel(reg, PERF_SOFTRESET_REG);
|
||||
mdelay(10);
|
||||
|
||||
reg = bcm_perf_readl(PERF_SOFTRESET_REG);
|
||||
reg |= SOFTRESET_6348_ALL;
|
||||
bcm_perf_writel(reg, PERF_SOFTRESET_REG);
|
||||
mdelay(10);
|
||||
|
||||
/* Jump to the power on address. */
|
||||
printk(KERN_INFO "jumping to reset vector.\n");
|
||||
/* set high vectors (base at 0xbfc00000 */
|
||||
set_c0_status(ST0_BEV | ST0_ERL);
|
||||
/* run uncached in kseg0 */
|
||||
change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED);
|
||||
__flush_cache_all();
|
||||
/* remove all wired TLB entries */
|
||||
write_c0_wired(0);
|
||||
__asm__ __volatile__(
|
||||
"jr\t%0"
|
||||
:
|
||||
: "r" (0xbfc00000));
|
||||
while (1)
|
||||
;
|
||||
}
|
||||
|
||||
void bcm63xx_machine_reboot(void)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
/* mask and clear all external irq */
|
||||
reg = bcm_perf_readl(PERF_EXTIRQ_CFG_REG);
|
||||
reg &= ~EXTIRQ_CFG_MASK_ALL;
|
||||
reg |= EXTIRQ_CFG_CLEAR_ALL;
|
||||
bcm_perf_writel(reg, PERF_EXTIRQ_CFG_REG);
|
||||
|
||||
if (BCMCPU_IS_6348() && (bcm63xx_get_cpu_rev() == 0xa1))
|
||||
bcm6348_a1_reboot();
|
||||
|
||||
printk(KERN_INFO "triggering watchdog soft-reset...\n");
|
||||
bcm_perf_writel(SYS_PLL_SOFT_RESET, PERF_SYS_PLL_CTL_REG);
|
||||
while (1)
|
||||
;
|
||||
}
|
||||
|
||||
static void __bcm63xx_machine_reboot(char *p)
|
||||
{
|
||||
bcm63xx_machine_reboot();
|
||||
}
|
||||
|
||||
/*
|
||||
* return system type in /proc/cpuinfo
|
||||
*/
|
||||
const char *get_system_type(void)
|
||||
{
|
||||
static char buf[128];
|
||||
snprintf(buf, sizeof(buf), "bcm63xx/%s (0x%04x/0x%04X)",
|
||||
board_get_name(),
|
||||
bcm63xx_get_cpu_id(), bcm63xx_get_cpu_rev());
|
||||
return buf;
|
||||
}
|
||||
|
||||
void __init plat_time_init(void)
|
||||
{
|
||||
mips_hpt_frequency = bcm63xx_get_cpu_freq() / 2;
|
||||
}
|
||||
|
||||
void __init plat_mem_setup(void)
|
||||
{
|
||||
add_memory_region(0, bcm63xx_get_memory_size(), BOOT_MEM_RAM);
|
||||
|
||||
_machine_halt = bcm63xx_machine_halt;
|
||||
_machine_restart = __bcm63xx_machine_reboot;
|
||||
pm_power_off = bcm63xx_machine_halt;
|
||||
|
||||
set_io_port_base(0);
|
||||
ioport_resource.start = 0;
|
||||
ioport_resource.end = ~0;
|
||||
|
||||
board_setup();
|
||||
}
|
||||
|
||||
int __init bcm63xx_register_devices(void)
|
||||
{
|
||||
return board_register_devices();
|
||||
}
|
||||
|
||||
arch_initcall(bcm63xx_register_devices);
|
||||
205
arch/mips/bcm63xx/timer.c
Normal file
205
arch/mips/bcm63xx/timer.c
Normal file
|
|
@ -0,0 +1,205 @@
|
|||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/clk.h>
|
||||
#include <bcm63xx_cpu.h>
|
||||
#include <bcm63xx_io.h>
|
||||
#include <bcm63xx_timer.h>
|
||||
#include <bcm63xx_regs.h>
|
||||
|
||||
static DEFINE_SPINLOCK(timer_reg_lock);
|
||||
static DEFINE_SPINLOCK(timer_data_lock);
|
||||
static struct clk *periph_clk;
|
||||
|
||||
static struct timer_data {
|
||||
void (*cb)(void *);
|
||||
void *data;
|
||||
} timer_data[BCM63XX_TIMER_COUNT];
|
||||
|
||||
static irqreturn_t timer_interrupt(int irq, void *dev_id)
|
||||
{
|
||||
u32 stat;
|
||||
int i;
|
||||
|
||||
spin_lock(&timer_reg_lock);
|
||||
stat = bcm_timer_readl(TIMER_IRQSTAT_REG);
|
||||
bcm_timer_writel(stat, TIMER_IRQSTAT_REG);
|
||||
spin_unlock(&timer_reg_lock);
|
||||
|
||||
for (i = 0; i < BCM63XX_TIMER_COUNT; i++) {
|
||||
if (!(stat & TIMER_IRQSTAT_TIMER_CAUSE(i)))
|
||||
continue;
|
||||
|
||||
spin_lock(&timer_data_lock);
|
||||
if (!timer_data[i].cb) {
|
||||
spin_unlock(&timer_data_lock);
|
||||
continue;
|
||||
}
|
||||
|
||||
timer_data[i].cb(timer_data[i].data);
|
||||
spin_unlock(&timer_data_lock);
|
||||
}
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
int bcm63xx_timer_enable(int id)
|
||||
{
|
||||
u32 reg;
|
||||
unsigned long flags;
|
||||
|
||||
if (id >= BCM63XX_TIMER_COUNT)
|
||||
return -EINVAL;
|
||||
|
||||
spin_lock_irqsave(&timer_reg_lock, flags);
|
||||
|
||||
reg = bcm_timer_readl(TIMER_CTLx_REG(id));
|
||||
reg |= TIMER_CTL_ENABLE_MASK;
|
||||
bcm_timer_writel(reg, TIMER_CTLx_REG(id));
|
||||
|
||||
reg = bcm_timer_readl(TIMER_IRQSTAT_REG);
|
||||
reg |= TIMER_IRQSTAT_TIMER_IR_EN(id);
|
||||
bcm_timer_writel(reg, TIMER_IRQSTAT_REG);
|
||||
|
||||
spin_unlock_irqrestore(&timer_reg_lock, flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(bcm63xx_timer_enable);
|
||||
|
||||
int bcm63xx_timer_disable(int id)
|
||||
{
|
||||
u32 reg;
|
||||
unsigned long flags;
|
||||
|
||||
if (id >= BCM63XX_TIMER_COUNT)
|
||||
return -EINVAL;
|
||||
|
||||
spin_lock_irqsave(&timer_reg_lock, flags);
|
||||
|
||||
reg = bcm_timer_readl(TIMER_CTLx_REG(id));
|
||||
reg &= ~TIMER_CTL_ENABLE_MASK;
|
||||
bcm_timer_writel(reg, TIMER_CTLx_REG(id));
|
||||
|
||||
reg = bcm_timer_readl(TIMER_IRQSTAT_REG);
|
||||
reg &= ~TIMER_IRQSTAT_TIMER_IR_EN(id);
|
||||
bcm_timer_writel(reg, TIMER_IRQSTAT_REG);
|
||||
|
||||
spin_unlock_irqrestore(&timer_reg_lock, flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(bcm63xx_timer_disable);
|
||||
|
||||
int bcm63xx_timer_register(int id, void (*callback)(void *data), void *data)
|
||||
{
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
if (id >= BCM63XX_TIMER_COUNT || !callback)
|
||||
return -EINVAL;
|
||||
|
||||
ret = 0;
|
||||
spin_lock_irqsave(&timer_data_lock, flags);
|
||||
if (timer_data[id].cb) {
|
||||
ret = -EBUSY;
|
||||
goto out;
|
||||
}
|
||||
|
||||
timer_data[id].cb = callback;
|
||||
timer_data[id].data = data;
|
||||
|
||||
out:
|
||||
spin_unlock_irqrestore(&timer_data_lock, flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(bcm63xx_timer_register);
|
||||
|
||||
void bcm63xx_timer_unregister(int id)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
if (id >= BCM63XX_TIMER_COUNT)
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&timer_data_lock, flags);
|
||||
timer_data[id].cb = NULL;
|
||||
spin_unlock_irqrestore(&timer_data_lock, flags);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(bcm63xx_timer_unregister);
|
||||
|
||||
unsigned int bcm63xx_timer_countdown(unsigned int countdown_us)
|
||||
{
|
||||
return (clk_get_rate(periph_clk) / (1000 * 1000)) * countdown_us;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(bcm63xx_timer_countdown);
|
||||
|
||||
int bcm63xx_timer_set(int id, int monotonic, unsigned int countdown_us)
|
||||
{
|
||||
u32 reg, countdown;
|
||||
unsigned long flags;
|
||||
|
||||
if (id >= BCM63XX_TIMER_COUNT)
|
||||
return -EINVAL;
|
||||
|
||||
countdown = bcm63xx_timer_countdown(countdown_us);
|
||||
if (countdown & ~TIMER_CTL_COUNTDOWN_MASK)
|
||||
return -EINVAL;
|
||||
|
||||
spin_lock_irqsave(&timer_reg_lock, flags);
|
||||
reg = bcm_timer_readl(TIMER_CTLx_REG(id));
|
||||
|
||||
if (monotonic)
|
||||
reg &= ~TIMER_CTL_MONOTONIC_MASK;
|
||||
else
|
||||
reg |= TIMER_CTL_MONOTONIC_MASK;
|
||||
|
||||
reg &= ~TIMER_CTL_COUNTDOWN_MASK;
|
||||
reg |= countdown;
|
||||
bcm_timer_writel(reg, TIMER_CTLx_REG(id));
|
||||
|
||||
spin_unlock_irqrestore(&timer_reg_lock, flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(bcm63xx_timer_set);
|
||||
|
||||
int bcm63xx_timer_init(void)
|
||||
{
|
||||
int ret, irq;
|
||||
u32 reg;
|
||||
|
||||
reg = bcm_timer_readl(TIMER_IRQSTAT_REG);
|
||||
reg &= ~TIMER_IRQSTAT_TIMER0_IR_EN;
|
||||
reg &= ~TIMER_IRQSTAT_TIMER1_IR_EN;
|
||||
reg &= ~TIMER_IRQSTAT_TIMER2_IR_EN;
|
||||
bcm_timer_writel(reg, TIMER_IRQSTAT_REG);
|
||||
|
||||
periph_clk = clk_get(NULL, "periph");
|
||||
if (IS_ERR(periph_clk))
|
||||
return -ENODEV;
|
||||
|
||||
irq = bcm63xx_get_irq_number(IRQ_TIMER);
|
||||
ret = request_irq(irq, timer_interrupt, 0, "bcm63xx_timer", NULL);
|
||||
if (ret) {
|
||||
printk(KERN_ERR "bcm63xx_timer: failed to register irq\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
arch_initcall(bcm63xx_timer_init);
|
||||
972
arch/mips/configs/bcm63xx_defconfig
Normal file
972
arch/mips/configs/bcm63xx_defconfig
Normal file
|
|
@ -0,0 +1,972 @@
|
|||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.30-rc6
|
||||
# Sun May 31 20:17:18 2009
|
||||
#
|
||||
CONFIG_MIPS=y
|
||||
|
||||
#
|
||||
# Machine selection
|
||||
#
|
||||
# CONFIG_MACH_ALCHEMY is not set
|
||||
# CONFIG_BASLER_EXCITE is not set
|
||||
# CONFIG_BCM47XX is not set
|
||||
CONFIG_BCM63XX=y
|
||||
# CONFIG_MIPS_COBALT is not set
|
||||
# CONFIG_MACH_DECSTATION is not set
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
# CONFIG_LASAT is not set
|
||||
# CONFIG_LEMOTE_FULONG is not set
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
# CONFIG_NEC_MARKEINS is not set
|
||||
# CONFIG_MACH_VR41XX is not set
|
||||
# CONFIG_NXP_STB220 is not set
|
||||
# CONFIG_NXP_STB225 is not set
|
||||
# CONFIG_PNX8550_JBS is not set
|
||||
# CONFIG_PNX8550_STB810 is not set
|
||||
# CONFIG_PMC_MSP is not set
|
||||
# CONFIG_PMC_YOSEMITE is not set
|
||||
# CONFIG_SGI_IP22 is not set
|
||||
# CONFIG_SGI_IP27 is not set
|
||||
# CONFIG_SGI_IP28 is not set
|
||||
# CONFIG_SGI_IP32 is not set
|
||||
# CONFIG_SIBYTE_CRHINE is not set
|
||||
# CONFIG_SIBYTE_CARMEL is not set
|
||||
# CONFIG_SIBYTE_CRHONE is not set
|
||||
# CONFIG_SIBYTE_RHONE is not set
|
||||
# CONFIG_SIBYTE_SWARM is not set
|
||||
# CONFIG_SIBYTE_LITTLESUR is not set
|
||||
# CONFIG_SIBYTE_SENTOSA is not set
|
||||
# CONFIG_SIBYTE_BIGSUR is not set
|
||||
# CONFIG_SNI_RM is not set
|
||||
# CONFIG_MACH_TX39XX is not set
|
||||
# CONFIG_MACH_TX49XX is not set
|
||||
# CONFIG_MIKROTIK_RB532 is not set
|
||||
# CONFIG_WR_PPMC is not set
|
||||
# CONFIG_CAVIUM_OCTEON_SIMULATOR is not set
|
||||
# CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set
|
||||
|
||||
#
|
||||
# CPU support
|
||||
#
|
||||
CONFIG_BCM63XX_CPU_6348=y
|
||||
CONFIG_BCM63XX_CPU_6358=y
|
||||
CONFIG_BOARD_BCM963XX=y
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
|
||||
CONFIG_ARCH_SUPPORTS_OPROFILE=y
|
||||
CONFIG_GENERIC_FIND_NEXT_BIT=y
|
||||
CONFIG_GENERIC_HWEIGHT=y
|
||||
CONFIG_GENERIC_CALIBRATE_DELAY=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_TIME=y
|
||||
CONFIG_GENERIC_CMOS_UPDATE=y
|
||||
CONFIG_SCHED_OMIT_FRAME_POINTER=y
|
||||
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
|
||||
CONFIG_CEVT_R4K_LIB=y
|
||||
CONFIG_CEVT_R4K=y
|
||||
CONFIG_CSRC_R4K_LIB=y
|
||||
CONFIG_CSRC_R4K=y
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
CONFIG_DMA_NEED_PCI_MAP_STATE=y
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_SYS_HAS_EARLY_PRINTK=y
|
||||
# CONFIG_HOTPLUG_CPU is not set
|
||||
# CONFIG_NO_IOPORT is not set
|
||||
CONFIG_GENERIC_GPIO=y
|
||||
CONFIG_CPU_BIG_ENDIAN=y
|
||||
# CONFIG_CPU_LITTLE_ENDIAN is not set
|
||||
CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
|
||||
CONFIG_IRQ_CPU=y
|
||||
CONFIG_SWAP_IO_SPACE=y
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT=5
|
||||
|
||||
#
|
||||
# CPU selection
|
||||
#
|
||||
# CONFIG_CPU_LOONGSON2 is not set
|
||||
CONFIG_CPU_MIPS32_R1=y
|
||||
# CONFIG_CPU_MIPS32_R2 is not set
|
||||
# CONFIG_CPU_MIPS64_R1 is not set
|
||||
# CONFIG_CPU_MIPS64_R2 is not set
|
||||
# CONFIG_CPU_R3000 is not set
|
||||
# CONFIG_CPU_TX39XX is not set
|
||||
# CONFIG_CPU_VR41XX is not set
|
||||
# CONFIG_CPU_R4300 is not set
|
||||
# CONFIG_CPU_R4X00 is not set
|
||||
# CONFIG_CPU_TX49XX is not set
|
||||
# CONFIG_CPU_R5000 is not set
|
||||
# CONFIG_CPU_R5432 is not set
|
||||
# CONFIG_CPU_R5500 is not set
|
||||
# CONFIG_CPU_R6000 is not set
|
||||
# CONFIG_CPU_NEVADA is not set
|
||||
# CONFIG_CPU_R8000 is not set
|
||||
# CONFIG_CPU_R10000 is not set
|
||||
# CONFIG_CPU_RM7000 is not set
|
||||
# CONFIG_CPU_RM9000 is not set
|
||||
# CONFIG_CPU_SB1 is not set
|
||||
# CONFIG_CPU_CAVIUM_OCTEON is not set
|
||||
CONFIG_SYS_HAS_CPU_MIPS32_R1=y
|
||||
CONFIG_CPU_MIPS32=y
|
||||
CONFIG_CPU_MIPSR1=y
|
||||
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_HARDWARE_WATCHPOINTS=y
|
||||
|
||||
#
|
||||
# Kernel type
|
||||
#
|
||||
CONFIG_32BIT=y
|
||||
# CONFIG_64BIT is not set
|
||||
CONFIG_PAGE_SIZE_4KB=y
|
||||
# CONFIG_PAGE_SIZE_8KB is not set
|
||||
# CONFIG_PAGE_SIZE_16KB is not set
|
||||
# CONFIG_PAGE_SIZE_32KB is not set
|
||||
# CONFIG_PAGE_SIZE_64KB is not set
|
||||
CONFIG_CPU_HAS_PREFETCH=y
|
||||
CONFIG_MIPS_MT_DISABLED=y
|
||||
# CONFIG_MIPS_MT_SMP is not set
|
||||
# CONFIG_MIPS_MT_SMTC is not set
|
||||
CONFIG_CPU_HAS_LLSC=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
CONFIG_GENERIC_HARDIRQS=y
|
||||
CONFIG_GENERIC_IRQ_PROBE=y
|
||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||
CONFIG_ARCH_FLATMEM_ENABLE=y
|
||||
CONFIG_ARCH_POPULATES_NODE_MAP=y
|
||||
CONFIG_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_FLATMEM_MANUAL=y
|
||||
# CONFIG_DISCONTIGMEM_MANUAL is not set
|
||||
# CONFIG_SPARSEMEM_MANUAL is not set
|
||||
CONFIG_FLATMEM=y
|
||||
CONFIG_FLAT_NODE_MEM_MAP=y
|
||||
CONFIG_PAGEFLAGS_EXTENDED=y
|
||||
CONFIG_SPLIT_PTLOCK_CPUS=4
|
||||
# CONFIG_PHYS_ADDR_T_64BIT is not set
|
||||
CONFIG_ZONE_DMA_FLAG=0
|
||||
CONFIG_VIRT_TO_BUS=y
|
||||
CONFIG_UNEVICTABLE_LRU=y
|
||||
CONFIG_HAVE_MLOCK=y
|
||||
CONFIG_HAVE_MLOCKED_PAGE_BIT=y
|
||||
CONFIG_TICK_ONESHOT=y
|
||||
CONFIG_NO_HZ=y
|
||||
# CONFIG_HIGH_RES_TIMERS is not set
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
|
||||
# CONFIG_HZ_48 is not set
|
||||
# CONFIG_HZ_100 is not set
|
||||
# CONFIG_HZ_128 is not set
|
||||
CONFIG_HZ_250=y
|
||||
# CONFIG_HZ_256 is not set
|
||||
# CONFIG_HZ_1000 is not set
|
||||
# CONFIG_HZ_1024 is not set
|
||||
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
||||
CONFIG_HZ=250
|
||||
CONFIG_PREEMPT_NONE=y
|
||||
# CONFIG_PREEMPT_VOLUNTARY is not set
|
||||
# CONFIG_PREEMPT is not set
|
||||
# CONFIG_KEXEC is not set
|
||||
# CONFIG_SECCOMP is not set
|
||||
CONFIG_LOCKDEP_SUPPORT=y
|
||||
CONFIG_STACKTRACE_SUPPORT=y
|
||||
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
|
||||
|
||||
#
|
||||
# General setup
|
||||
#
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_BROKEN_ON_SMP=y
|
||||
CONFIG_INIT_ENV_ARG_LIMIT=32
|
||||
CONFIG_LOCALVERSION=""
|
||||
# CONFIG_LOCALVERSION_AUTO is not set
|
||||
# CONFIG_SWAP is not set
|
||||
# CONFIG_SYSVIPC is not set
|
||||
# CONFIG_POSIX_MQUEUE is not set
|
||||
# CONFIG_BSD_PROCESS_ACCT is not set
|
||||
# CONFIG_TASKSTATS is not set
|
||||
# CONFIG_AUDIT is not set
|
||||
|
||||
#
|
||||
# RCU Subsystem
|
||||
#
|
||||
CONFIG_CLASSIC_RCU=y
|
||||
# CONFIG_TREE_RCU is not set
|
||||
# CONFIG_PREEMPT_RCU is not set
|
||||
# CONFIG_TREE_RCU_TRACE is not set
|
||||
# CONFIG_PREEMPT_RCU_TRACE is not set
|
||||
# CONFIG_IKCONFIG is not set
|
||||
CONFIG_LOG_BUF_SHIFT=17
|
||||
# CONFIG_GROUP_SCHED is not set
|
||||
# CONFIG_CGROUPS is not set
|
||||
CONFIG_SYSFS_DEPRECATED=y
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
# CONFIG_RELAY is not set
|
||||
# CONFIG_NAMESPACES is not set
|
||||
# CONFIG_BLK_DEV_INITRD is not set
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_SYSCTL=y
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_SYSCTL_SYSCALL=y
|
||||
CONFIG_KALLSYMS=y
|
||||
# CONFIG_KALLSYMS_EXTRA_PASS is not set
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
CONFIG_HOTPLUG=y
|
||||
CONFIG_PRINTK=y
|
||||
CONFIG_BUG=y
|
||||
CONFIG_ELF_CORE=y
|
||||
# CONFIG_PCSPKR_PLATFORM is not set
|
||||
CONFIG_BASE_FULL=y
|
||||
# CONFIG_FUTEX is not set
|
||||
# CONFIG_EPOLL is not set
|
||||
# CONFIG_SIGNALFD is not set
|
||||
# CONFIG_TIMERFD is not set
|
||||
# CONFIG_EVENTFD is not set
|
||||
# CONFIG_SHMEM is not set
|
||||
# CONFIG_AIO is not set
|
||||
# CONFIG_VM_EVENT_COUNTERS is not set
|
||||
CONFIG_PCI_QUIRKS=y
|
||||
# CONFIG_SLUB_DEBUG is not set
|
||||
CONFIG_COMPAT_BRK=y
|
||||
# CONFIG_SLAB is not set
|
||||
CONFIG_SLUB=y
|
||||
# CONFIG_SLOB is not set
|
||||
# CONFIG_PROFILING is not set
|
||||
# CONFIG_MARKERS is not set
|
||||
CONFIG_HAVE_OPROFILE=y
|
||||
# CONFIG_SLOW_WORK is not set
|
||||
# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
|
||||
CONFIG_BASE_SMALL=0
|
||||
# CONFIG_MODULES is not set
|
||||
CONFIG_BLOCK=y
|
||||
# CONFIG_LBD is not set
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_BLK_DEV_INTEGRITY is not set
|
||||
|
||||
#
|
||||
# IO Schedulers
|
||||
#
|
||||
CONFIG_IOSCHED_NOOP=y
|
||||
# CONFIG_IOSCHED_AS is not set
|
||||
# CONFIG_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_IOSCHED_CFQ is not set
|
||||
# CONFIG_DEFAULT_AS is not set
|
||||
# CONFIG_DEFAULT_DEADLINE is not set
|
||||
# CONFIG_DEFAULT_CFQ is not set
|
||||
CONFIG_DEFAULT_NOOP=y
|
||||
CONFIG_DEFAULT_IOSCHED="noop"
|
||||
# CONFIG_FREEZER is not set
|
||||
|
||||
#
|
||||
# Bus options (PCI, PCMCIA, EISA, ISA, TC)
|
||||
#
|
||||
CONFIG_HW_HAS_PCI=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
# CONFIG_ARCH_SUPPORTS_MSI is not set
|
||||
# CONFIG_PCI_LEGACY is not set
|
||||
# CONFIG_PCI_STUB is not set
|
||||
# CONFIG_PCI_IOV is not set
|
||||
CONFIG_MMU=y
|
||||
CONFIG_PCCARD=y
|
||||
# CONFIG_PCMCIA_DEBUG is not set
|
||||
CONFIG_PCMCIA=y
|
||||
CONFIG_PCMCIA_LOAD_CIS=y
|
||||
CONFIG_PCMCIA_IOCTL=y
|
||||
CONFIG_CARDBUS=y
|
||||
|
||||
#
|
||||
# PC-card bridges
|
||||
#
|
||||
# CONFIG_YENTA is not set
|
||||
# CONFIG_PD6729 is not set
|
||||
# CONFIG_I82092 is not set
|
||||
CONFIG_PCMCIA_BCM63XX=y
|
||||
# CONFIG_HOTPLUG_PCI is not set
|
||||
|
||||
#
|
||||
# Executable file formats
|
||||
#
|
||||
CONFIG_BINFMT_ELF=y
|
||||
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
|
||||
# CONFIG_HAVE_AOUT is not set
|
||||
# CONFIG_BINFMT_MISC is not set
|
||||
CONFIG_TRAD_SIGNALS=y
|
||||
|
||||
#
|
||||
# Power management options
|
||||
#
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
# CONFIG_PM is not set
|
||||
CONFIG_NET=y
|
||||
|
||||
#
|
||||
# Networking options
|
||||
#
|
||||
# CONFIG_PACKET is not set
|
||||
CONFIG_UNIX=y
|
||||
# CONFIG_NET_KEY is not set
|
||||
CONFIG_INET=y
|
||||
# CONFIG_IP_MULTICAST is not set
|
||||
# CONFIG_IP_ADVANCED_ROUTER is not set
|
||||
CONFIG_IP_FIB_HASH=y
|
||||
# CONFIG_IP_PNP is not set
|
||||
# CONFIG_NET_IPIP is not set
|
||||
# CONFIG_NET_IPGRE is not set
|
||||
# CONFIG_ARPD 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_INET_XFRM_TUNNEL is not set
|
||||
# CONFIG_INET_TUNNEL is not set
|
||||
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
|
||||
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
|
||||
# CONFIG_INET_XFRM_MODE_BEET is not set
|
||||
# CONFIG_INET_LRO is not set
|
||||
# CONFIG_INET_DIAG is not set
|
||||
# CONFIG_TCP_CONG_ADVANCED is not set
|
||||
CONFIG_TCP_CONG_CUBIC=y
|
||||
CONFIG_DEFAULT_TCP_CONG="cubic"
|
||||
# CONFIG_TCP_MD5SIG is not set
|
||||
# CONFIG_IPV6 is not set
|
||||
# CONFIG_NETWORK_SECMARK is not set
|
||||
# CONFIG_NETFILTER is not set
|
||||
# CONFIG_IP_DCCP is not set
|
||||
# CONFIG_IP_SCTP is not set
|
||||
# CONFIG_TIPC is not set
|
||||
# CONFIG_ATM is not set
|
||||
# CONFIG_BRIDGE is not set
|
||||
# CONFIG_NET_DSA 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
|
||||
# CONFIG_X25 is not set
|
||||
# CONFIG_LAPB is not set
|
||||
# CONFIG_ECONET is not set
|
||||
# CONFIG_WAN_ROUTER is not set
|
||||
# CONFIG_PHONET is not set
|
||||
# CONFIG_NET_SCHED is not set
|
||||
# CONFIG_DCB is not set
|
||||
|
||||
#
|
||||
# Network testing
|
||||
#
|
||||
# CONFIG_NET_PKTGEN is not set
|
||||
# CONFIG_HAMRADIO is not set
|
||||
# CONFIG_CAN is not set
|
||||
# CONFIG_IRDA is not set
|
||||
# CONFIG_BT is not set
|
||||
# CONFIG_AF_RXRPC is not set
|
||||
# CONFIG_WIRELESS is not set
|
||||
# CONFIG_WIMAX is not set
|
||||
# CONFIG_RFKILL is not set
|
||||
# CONFIG_NET_9P is not set
|
||||
|
||||
#
|
||||
# Device Drivers
|
||||
#
|
||||
|
||||
#
|
||||
# Generic Driver Options
|
||||
#
|
||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
||||
# CONFIG_STANDALONE is not set
|
||||
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
|
||||
CONFIG_FW_LOADER=y
|
||||
CONFIG_FIRMWARE_IN_KERNEL=y
|
||||
CONFIG_EXTRA_FIRMWARE=""
|
||||
# CONFIG_SYS_HYPERVISOR is not set
|
||||
# CONFIG_CONNECTOR 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
|
||||
# CONFIG_MTD_AR7_PARTS is not set
|
||||
|
||||
#
|
||||
# User Modules And Translation Layers
|
||||
#
|
||||
# CONFIG_MTD_CHAR is not set
|
||||
# CONFIG_MTD_BLKDEVS is not set
|
||||
# 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
|
||||
# CONFIG_MTD_OOPS is not set
|
||||
|
||||
#
|
||||
# RAM/ROM/Flash chip drivers
|
||||
#
|
||||
CONFIG_MTD_CFI=y
|
||||
# CONFIG_MTD_JEDECPROBE is not set
|
||||
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=y
|
||||
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
|
||||
|
||||
#
|
||||
# Mapping drivers for chip access
|
||||
#
|
||||
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
|
||||
CONFIG_MTD_PHYSMAP=y
|
||||
# CONFIG_MTD_PHYSMAP_COMPAT is not set
|
||||
# CONFIG_MTD_INTEL_VR_NOR is not set
|
||||
# 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
|
||||
# CONFIG_MTD_NAND is not set
|
||||
# CONFIG_MTD_ONENAND is not set
|
||||
|
||||
#
|
||||
# LPDDR flash memory drivers
|
||||
#
|
||||
# CONFIG_MTD_LPDDR is not set
|
||||
|
||||
#
|
||||
# UBI - Unsorted block images
|
||||
#
|
||||
# CONFIG_MTD_UBI is not set
|
||||
# CONFIG_PARPORT is not set
|
||||
# CONFIG_BLK_DEV is not set
|
||||
# CONFIG_MISC_DEVICES is not set
|
||||
CONFIG_HAVE_IDE=y
|
||||
# CONFIG_IDE is not set
|
||||
|
||||
#
|
||||
# SCSI device support
|
||||
#
|
||||
# CONFIG_RAID_ATTRS is not set
|
||||
# CONFIG_SCSI is not set
|
||||
# CONFIG_SCSI_DMA is not set
|
||||
# CONFIG_SCSI_NETLINK is not set
|
||||
# CONFIG_ATA is not set
|
||||
# CONFIG_MD is not set
|
||||
# CONFIG_FUSION is not set
|
||||
|
||||
#
|
||||
# IEEE 1394 (FireWire) support
|
||||
#
|
||||
|
||||
#
|
||||
# Enable only one of the two stacks, unless you know what you are doing
|
||||
#
|
||||
# CONFIG_FIREWIRE is not set
|
||||
# CONFIG_IEEE1394 is not set
|
||||
# CONFIG_I2O is not set
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_COMPAT_NET_DEV_OPS=y
|
||||
# CONFIG_DUMMY is not set
|
||||
# CONFIG_BONDING is not set
|
||||
# CONFIG_MACVLAN is not set
|
||||
# CONFIG_EQUALIZER is not set
|
||||
# CONFIG_TUN is not set
|
||||
# CONFIG_VETH is not set
|
||||
# CONFIG_ARCNET is not set
|
||||
CONFIG_PHYLIB=y
|
||||
|
||||
#
|
||||
# MII PHY device drivers
|
||||
#
|
||||
# CONFIG_MARVELL_PHY is not set
|
||||
# CONFIG_DAVICOM_PHY is not set
|
||||
# CONFIG_QSEMI_PHY is not set
|
||||
# CONFIG_LXT_PHY is not set
|
||||
# CONFIG_CICADA_PHY is not set
|
||||
# CONFIG_VITESSE_PHY is not set
|
||||
# CONFIG_SMSC_PHY is not set
|
||||
# CONFIG_BROADCOM_PHY is not set
|
||||
CONFIG_BCM63XX_PHY=y
|
||||
# CONFIG_ICPLUS_PHY is not set
|
||||
# CONFIG_REALTEK_PHY is not set
|
||||
# CONFIG_NATIONAL_PHY is not set
|
||||
# CONFIG_STE10XP is not set
|
||||
# CONFIG_LSI_ET1011C_PHY is not set
|
||||
# CONFIG_FIXED_PHY is not set
|
||||
# CONFIG_MDIO_BITBANG is not set
|
||||
CONFIG_NET_ETHERNET=y
|
||||
CONFIG_MII=y
|
||||
# CONFIG_AX88796 is not set
|
||||
# CONFIG_HAPPYMEAL is not set
|
||||
# CONFIG_SUNGEM is not set
|
||||
# CONFIG_CASSINI is not set
|
||||
# CONFIG_NET_VENDOR_3COM is not set
|
||||
# CONFIG_SMC91X is not set
|
||||
# CONFIG_DM9000 is not set
|
||||
# CONFIG_ETHOC is not set
|
||||
# CONFIG_DNET is not set
|
||||
# CONFIG_NET_TULIP is not set
|
||||
# CONFIG_HP100 is not set
|
||||
# CONFIG_IBM_NEW_EMAC_ZMII is not set
|
||||
# CONFIG_IBM_NEW_EMAC_RGMII is not set
|
||||
# CONFIG_IBM_NEW_EMAC_TAH is not set
|
||||
# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
|
||||
# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
|
||||
# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
|
||||
# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
|
||||
# CONFIG_NET_PCI is not set
|
||||
# CONFIG_B44 is not set
|
||||
# CONFIG_ATL2 is not set
|
||||
CONFIG_BCM63XX_ENET=y
|
||||
# CONFIG_NETDEV_1000 is not set
|
||||
# CONFIG_NETDEV_10000 is not set
|
||||
# CONFIG_TR is not set
|
||||
|
||||
#
|
||||
# Wireless LAN
|
||||
#
|
||||
# CONFIG_WLAN_PRE80211 is not set
|
||||
# CONFIG_WLAN_80211 is not set
|
||||
|
||||
#
|
||||
# Enable WiMAX (Networking options) to see the WiMAX drivers
|
||||
#
|
||||
|
||||
#
|
||||
# USB Network Adapters
|
||||
#
|
||||
# CONFIG_USB_CATC is not set
|
||||
# CONFIG_USB_KAWETH is not set
|
||||
# CONFIG_USB_PEGASUS is not set
|
||||
# CONFIG_USB_RTL8150 is not set
|
||||
# CONFIG_USB_USBNET is not set
|
||||
# CONFIG_NET_PCMCIA is not set
|
||||
# CONFIG_WAN is not set
|
||||
# CONFIG_FDDI is not set
|
||||
# CONFIG_HIPPI is not set
|
||||
# CONFIG_PPP is not set
|
||||
# CONFIG_SLIP is not set
|
||||
# CONFIG_NETCONSOLE is not set
|
||||
# CONFIG_NETPOLL is not set
|
||||
# CONFIG_NET_POLL_CONTROLLER is not set
|
||||
# CONFIG_ISDN is not set
|
||||
# CONFIG_PHONE is not set
|
||||
|
||||
#
|
||||
# Input device support
|
||||
#
|
||||
# CONFIG_INPUT is not set
|
||||
|
||||
#
|
||||
# Hardware I/O ports
|
||||
#
|
||||
# CONFIG_SERIO is not set
|
||||
# CONFIG_GAMEPORT is not set
|
||||
|
||||
#
|
||||
# Character devices
|
||||
#
|
||||
# CONFIG_VT is not set
|
||||
# CONFIG_DEVKMEM is not set
|
||||
# CONFIG_SERIAL_NONSTANDARD is not set
|
||||
# CONFIG_NOZOMI is not set
|
||||
|
||||
#
|
||||
# Serial drivers
|
||||
#
|
||||
# CONFIG_SERIAL_8250 is not set
|
||||
|
||||
#
|
||||
# Non-8250 serial port support
|
||||
#
|
||||
CONFIG_SERIAL_CORE=y
|
||||
CONFIG_SERIAL_CORE_CONSOLE=y
|
||||
# CONFIG_SERIAL_JSM is not set
|
||||
CONFIG_SERIAL_BCM63XX=y
|
||||
CONFIG_SERIAL_BCM63XX_CONSOLE=y
|
||||
# CONFIG_UNIX98_PTYS is not set
|
||||
CONFIG_LEGACY_PTYS=y
|
||||
CONFIG_LEGACY_PTY_COUNT=256
|
||||
# CONFIG_IPMI_HANDLER is not set
|
||||
# CONFIG_HW_RANDOM is not set
|
||||
# CONFIG_R3964 is not set
|
||||
# CONFIG_APPLICOM is not set
|
||||
|
||||
#
|
||||
# PCMCIA character devices
|
||||
#
|
||||
# CONFIG_SYNCLINK_CS is not set
|
||||
# CONFIG_CARDMAN_4000 is not set
|
||||
# CONFIG_CARDMAN_4040 is not set
|
||||
# CONFIG_IPWIRELESS is not set
|
||||
# CONFIG_RAW_DRIVER is not set
|
||||
# CONFIG_TCG_TPM is not set
|
||||
CONFIG_DEVPORT=y
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_SPI is not set
|
||||
CONFIG_ARCH_REQUIRE_GPIOLIB=y
|
||||
CONFIG_GPIOLIB=y
|
||||
# CONFIG_GPIO_SYSFS is not set
|
||||
|
||||
#
|
||||
# Memory mapped GPIO expanders:
|
||||
#
|
||||
|
||||
#
|
||||
# I2C GPIO expanders:
|
||||
#
|
||||
|
||||
#
|
||||
# PCI GPIO expanders:
|
||||
#
|
||||
# CONFIG_GPIO_BT8XX is not set
|
||||
|
||||
#
|
||||
# SPI GPIO expanders:
|
||||
#
|
||||
# CONFIG_W1 is not set
|
||||
# CONFIG_POWER_SUPPLY is not set
|
||||
# CONFIG_HWMON is not set
|
||||
# CONFIG_THERMAL is not set
|
||||
# CONFIG_THERMAL_HWMON is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
CONFIG_SSB_POSSIBLE=y
|
||||
|
||||
#
|
||||
# Sonics Silicon Backplane
|
||||
#
|
||||
CONFIG_SSB=y
|
||||
CONFIG_SSB_SPROM=y
|
||||
CONFIG_SSB_PCIHOST_POSSIBLE=y
|
||||
CONFIG_SSB_PCIHOST=y
|
||||
# CONFIG_SSB_B43_PCI_BRIDGE is not set
|
||||
CONFIG_SSB_PCMCIAHOST_POSSIBLE=y
|
||||
# CONFIG_SSB_PCMCIAHOST is not set
|
||||
# CONFIG_SSB_SILENT is not set
|
||||
# CONFIG_SSB_DEBUG is not set
|
||||
CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
|
||||
# CONFIG_SSB_DRIVER_PCICORE is not set
|
||||
# CONFIG_SSB_DRIVER_MIPS is not set
|
||||
|
||||
#
|
||||
# Multifunction device drivers
|
||||
#
|
||||
# CONFIG_MFD_CORE is not set
|
||||
# CONFIG_MFD_SM501 is not set
|
||||
# CONFIG_HTC_PASIC3 is not set
|
||||
# CONFIG_MFD_TMIO is not set
|
||||
# CONFIG_REGULATOR is not set
|
||||
|
||||
#
|
||||
# Multimedia devices
|
||||
#
|
||||
|
||||
#
|
||||
# Multimedia core support
|
||||
#
|
||||
# CONFIG_VIDEO_DEV is not set
|
||||
# CONFIG_DVB_CORE is not set
|
||||
# CONFIG_VIDEO_MEDIA is not set
|
||||
|
||||
#
|
||||
# Multimedia drivers
|
||||
#
|
||||
# CONFIG_DAB is not set
|
||||
|
||||
#
|
||||
# Graphics support
|
||||
#
|
||||
# CONFIG_DRM is not set
|
||||
# CONFIG_VGASTATE is not set
|
||||
# CONFIG_VIDEO_OUTPUT_CONTROL is not set
|
||||
# CONFIG_FB is not set
|
||||
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
|
||||
|
||||
#
|
||||
# Display device support
|
||||
#
|
||||
CONFIG_DISPLAY_SUPPORT=y
|
||||
|
||||
#
|
||||
# Display hardware drivers
|
||||
#
|
||||
# CONFIG_SOUND is not set
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USB_ARCH_HAS_HCD=y
|
||||
CONFIG_USB_ARCH_HAS_OHCI=y
|
||||
CONFIG_USB_ARCH_HAS_EHCI=y
|
||||
CONFIG_USB=y
|
||||
# CONFIG_USB_DEBUG is not set
|
||||
# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
|
||||
|
||||
#
|
||||
# Miscellaneous USB options
|
||||
#
|
||||
# CONFIG_USB_DEVICEFS is not set
|
||||
# CONFIG_USB_DEVICE_CLASS is not set
|
||||
# CONFIG_USB_DYNAMIC_MINORS is not set
|
||||
# CONFIG_USB_OTG is not set
|
||||
# CONFIG_USB_OTG_WHITELIST is not set
|
||||
# CONFIG_USB_OTG_BLACKLIST_HUB is not set
|
||||
# CONFIG_USB_MON is not set
|
||||
# CONFIG_USB_WUSB is not set
|
||||
# CONFIG_USB_WUSB_CBAF is not set
|
||||
|
||||
#
|
||||
# USB Host Controller Drivers
|
||||
#
|
||||
# CONFIG_USB_C67X00_HCD is not set
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
|
||||
# CONFIG_USB_EHCI_TT_NEWSCHED is not set
|
||||
CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
|
||||
# CONFIG_USB_OXU210HP_HCD is not set
|
||||
# CONFIG_USB_ISP116X_HCD is not set
|
||||
# CONFIG_USB_ISP1760_HCD is not set
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
# CONFIG_USB_OHCI_HCD_SSB is not set
|
||||
CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
|
||||
CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
|
||||
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
|
||||
# CONFIG_USB_UHCI_HCD is not set
|
||||
# CONFIG_USB_SL811_HCD is not set
|
||||
# CONFIG_USB_R8A66597_HCD is not set
|
||||
# CONFIG_USB_WHCI_HCD is not set
|
||||
# CONFIG_USB_HWA_HCD is not set
|
||||
|
||||
#
|
||||
# USB Device Class drivers
|
||||
#
|
||||
# CONFIG_USB_ACM is not set
|
||||
# CONFIG_USB_PRINTER is not set
|
||||
# CONFIG_USB_WDM is not set
|
||||
# CONFIG_USB_TMC is not set
|
||||
|
||||
#
|
||||
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
|
||||
#
|
||||
|
||||
#
|
||||
# also be needed; see USB_STORAGE Help for more info
|
||||
#
|
||||
# CONFIG_USB_LIBUSUAL is not set
|
||||
|
||||
#
|
||||
# USB Imaging devices
|
||||
#
|
||||
# CONFIG_USB_MDC800 is not set
|
||||
|
||||
#
|
||||
# USB port drivers
|
||||
#
|
||||
# CONFIG_USB_SERIAL is not set
|
||||
|
||||
#
|
||||
# USB Miscellaneous drivers
|
||||
#
|
||||
# CONFIG_USB_EMI62 is not set
|
||||
# CONFIG_USB_EMI26 is not set
|
||||
# CONFIG_USB_ADUTUX is not set
|
||||
# CONFIG_USB_SEVSEG is not set
|
||||
# CONFIG_USB_RIO500 is not set
|
||||
# CONFIG_USB_LEGOTOWER is not set
|
||||
# CONFIG_USB_LCD is not set
|
||||
# CONFIG_USB_BERRY_CHARGE is not set
|
||||
# CONFIG_USB_LED is not set
|
||||
# CONFIG_USB_CYPRESS_CY7C63 is not set
|
||||
# CONFIG_USB_CYTHERM is not set
|
||||
# CONFIG_USB_IDMOUSE is not set
|
||||
# CONFIG_USB_FTDI_ELAN is not set
|
||||
# CONFIG_USB_APPLEDISPLAY is not set
|
||||
# CONFIG_USB_SISUSBVGA is not set
|
||||
# CONFIG_USB_LD is not set
|
||||
# CONFIG_USB_TRANCEVIBRATOR is not set
|
||||
# CONFIG_USB_IOWARRIOR is not set
|
||||
# CONFIG_USB_ISIGHTFW is not set
|
||||
# CONFIG_USB_VST is not set
|
||||
# CONFIG_USB_GADGET is not set
|
||||
|
||||
#
|
||||
# OTG and related infrastructure
|
||||
#
|
||||
# CONFIG_USB_GPIO_VBUS is not set
|
||||
# CONFIG_NOP_USB_XCEIV is not set
|
||||
# CONFIG_UWB is not set
|
||||
# CONFIG_MMC is not set
|
||||
# CONFIG_MEMSTICK is not set
|
||||
# CONFIG_NEW_LEDS is not set
|
||||
# CONFIG_ACCESSIBILITY is not set
|
||||
# CONFIG_INFINIBAND is not set
|
||||
CONFIG_RTC_LIB=y
|
||||
# CONFIG_RTC_CLASS is not set
|
||||
# CONFIG_DMADEVICES is not set
|
||||
# CONFIG_AUXDISPLAY is not set
|
||||
# CONFIG_UIO is not set
|
||||
# CONFIG_STAGING is not set
|
||||
|
||||
#
|
||||
# File systems
|
||||
#
|
||||
# CONFIG_EXT2_FS is not set
|
||||
# CONFIG_EXT3_FS is not set
|
||||
# CONFIG_EXT4_FS is not set
|
||||
# CONFIG_REISERFS_FS is not set
|
||||
# CONFIG_JFS_FS is not set
|
||||
# CONFIG_FS_POSIX_ACL is not set
|
||||
# CONFIG_FILE_LOCKING is not set
|
||||
# CONFIG_XFS_FS is not set
|
||||
# CONFIG_OCFS2_FS is not set
|
||||
# CONFIG_BTRFS_FS is not set
|
||||
# CONFIG_DNOTIFY is not set
|
||||
# CONFIG_INOTIFY is not set
|
||||
# CONFIG_QUOTA is not set
|
||||
# CONFIG_AUTOFS_FS is not set
|
||||
# CONFIG_AUTOFS4_FS is not set
|
||||
# CONFIG_FUSE_FS is not set
|
||||
|
||||
#
|
||||
# Caches
|
||||
#
|
||||
# CONFIG_FSCACHE is not set
|
||||
|
||||
#
|
||||
# CD-ROM/DVD Filesystems
|
||||
#
|
||||
# CONFIG_ISO9660_FS is not set
|
||||
# CONFIG_UDF_FS is not set
|
||||
|
||||
#
|
||||
# DOS/FAT/NT Filesystems
|
||||
#
|
||||
# CONFIG_MSDOS_FS is not set
|
||||
# CONFIG_VFAT_FS is not set
|
||||
# CONFIG_NTFS_FS is not set
|
||||
|
||||
#
|
||||
# Pseudo filesystems
|
||||
#
|
||||
CONFIG_PROC_FS=y
|
||||
CONFIG_PROC_KCORE=y
|
||||
CONFIG_PROC_SYSCTL=y
|
||||
CONFIG_PROC_PAGE_MONITOR=y
|
||||
CONFIG_SYSFS=y
|
||||
CONFIG_TMPFS=y
|
||||
# CONFIG_TMPFS_POSIX_ACL is not set
|
||||
# CONFIG_HUGETLB_PAGE is not set
|
||||
# CONFIG_CONFIGFS_FS is not set
|
||||
CONFIG_MISC_FILESYSTEMS=y
|
||||
# CONFIG_ADFS_FS is not set
|
||||
# CONFIG_AFFS_FS is not set
|
||||
# CONFIG_HFS_FS is not set
|
||||
# CONFIG_HFSPLUS_FS is not set
|
||||
# CONFIG_BEFS_FS is not set
|
||||
# CONFIG_BFS_FS is not set
|
||||
# CONFIG_EFS_FS is not set
|
||||
# CONFIG_JFFS2_FS is not set
|
||||
# CONFIG_CRAMFS is not set
|
||||
# CONFIG_SQUASHFS is not set
|
||||
# CONFIG_VXFS_FS is not set
|
||||
# CONFIG_MINIX_FS is not set
|
||||
# CONFIG_OMFS_FS is not set
|
||||
# CONFIG_HPFS_FS is not set
|
||||
# CONFIG_QNX4FS_FS is not set
|
||||
# CONFIG_ROMFS_FS is not set
|
||||
# CONFIG_SYSV_FS is not set
|
||||
# CONFIG_UFS_FS is not set
|
||||
# CONFIG_NILFS2_FS is not set
|
||||
# CONFIG_NETWORK_FILESYSTEMS is not set
|
||||
|
||||
#
|
||||
# Partition Types
|
||||
#
|
||||
# CONFIG_PARTITION_ADVANCED is not set
|
||||
CONFIG_MSDOS_PARTITION=y
|
||||
# CONFIG_NLS is not set
|
||||
# CONFIG_DLM is not set
|
||||
|
||||
#
|
||||
# Kernel hacking
|
||||
#
|
||||
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
|
||||
# CONFIG_PRINTK_TIME is not set
|
||||
CONFIG_ENABLE_WARN_DEPRECATED=y
|
||||
CONFIG_ENABLE_MUST_CHECK=y
|
||||
CONFIG_FRAME_WARN=1024
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
# CONFIG_UNUSED_SYMBOLS is not set
|
||||
# CONFIG_DEBUG_FS is not set
|
||||
# CONFIG_HEADERS_CHECK is not set
|
||||
# CONFIG_DEBUG_KERNEL is not set
|
||||
# CONFIG_DEBUG_MEMORY_INIT is not set
|
||||
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
|
||||
CONFIG_SYSCTL_SYSCALL_CHECK=y
|
||||
CONFIG_TRACING_SUPPORT=y
|
||||
|
||||
#
|
||||
# Tracers
|
||||
#
|
||||
# CONFIG_IRQSOFF_TRACER is not set
|
||||
# CONFIG_SCHED_TRACER is not set
|
||||
# CONFIG_CONTEXT_SWITCH_TRACER is not set
|
||||
# CONFIG_EVENT_TRACER is not set
|
||||
# CONFIG_BOOT_TRACER is not set
|
||||
# CONFIG_TRACE_BRANCH_PROFILING is not set
|
||||
# CONFIG_KMEMTRACE is not set
|
||||
# CONFIG_WORKQUEUE_TRACER is not set
|
||||
# CONFIG_BLK_DEV_IO_TRACE is not set
|
||||
# CONFIG_SAMPLES is not set
|
||||
CONFIG_HAVE_ARCH_KGDB=y
|
||||
CONFIG_CMDLINE="console=ttyS0,115200"
|
||||
|
||||
#
|
||||
# Security options
|
||||
#
|
||||
# CONFIG_KEYS is not set
|
||||
# CONFIG_SECURITY is not set
|
||||
# CONFIG_SECURITYFS is not set
|
||||
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
|
||||
# CONFIG_CRYPTO is not set
|
||||
# CONFIG_BINARY_PRINTF is not set
|
||||
|
||||
#
|
||||
# Library routines
|
||||
#
|
||||
CONFIG_BITREVERSE=y
|
||||
CONFIG_GENERIC_FIND_LAST_BIT=y
|
||||
# CONFIG_CRC_CCITT is not set
|
||||
# CONFIG_CRC16 is not set
|
||||
# CONFIG_CRC_T10DIF is not set
|
||||
# CONFIG_CRC_ITU_T is not set
|
||||
CONFIG_CRC32=y
|
||||
# CONFIG_CRC7 is not set
|
||||
# CONFIG_LIBCRC32C is not set
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_NLATTR=y
|
||||
|
|
@ -67,11 +67,15 @@ enum fixed_addresses {
|
|||
* the start of the fixmap, and leave one page empty
|
||||
* at the top of mem..
|
||||
*/
|
||||
#ifdef CONFIG_BCM63XX
|
||||
#define FIXADDR_TOP ((unsigned long)(long)(int)0xff000000)
|
||||
#else
|
||||
#if defined(CONFIG_CPU_TX39XX) || defined(CONFIG_CPU_TX49XX)
|
||||
#define FIXADDR_TOP ((unsigned long)(long)(int)(0xff000000 - 0x20000))
|
||||
#else
|
||||
#define FIXADDR_TOP ((unsigned long)(long)(int)0xfffe0000)
|
||||
#endif
|
||||
#endif
|
||||
#define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT)
|
||||
#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
|
||||
|
||||
|
|
|
|||
12
arch/mips/include/asm/mach-bcm63xx/bcm63xx_board.h
Normal file
12
arch/mips/include/asm/mach-bcm63xx/bcm63xx_board.h
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#ifndef BCM63XX_BOARD_H_
|
||||
#define BCM63XX_BOARD_H_
|
||||
|
||||
const char *board_get_name(void);
|
||||
|
||||
void board_prom_init(void);
|
||||
|
||||
void board_setup(void);
|
||||
|
||||
int board_register_devices(void);
|
||||
|
||||
#endif /* ! BCM63XX_BOARD_H_ */
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue