1 diff -urN linux-2.6.27.4/arch/mips/bcm63xx/boards/Kconfig linux-2.6.27.4.new/arch/mips/bcm63xx/boards/Kconfig
2 --- linux-2.6.27.4/arch/mips/bcm63xx/boards/Kconfig 2008-11-03 20:00:41.000000000 +0100
3 +++ linux-2.6.27.4.new/arch/mips/bcm63xx/boards/Kconfig 2008-11-03 20:02:45.000000000 +0100
5 bool "Generic Broadcom 963xx boards"
9 + bool "Inventel Livebox(es) boards"
11 + Boards using RedBoot.
14 diff -urN linux-2.6.27.4/arch/mips/bcm63xx/boards/Makefile linux-2.6.27.4.new/arch/mips/bcm63xx/boards/Makefile
15 --- linux-2.6.27.4/arch/mips/bcm63xx/boards/Makefile 2008-11-03 20:00:41.000000000 +0100
16 +++ linux-2.6.27.4.new/arch/mips/bcm63xx/boards/Makefile 2008-11-03 20:01:34.000000000 +0100
18 obj-$(CONFIG_BOARD_BCM963XX) += board_bcm963xx.o
19 +obj-$(CONFIG_BOARD_LIVEBOX) += board_livebox.o
20 diff -urN linux-2.6.27.4/arch/mips/bcm63xx/boards/board_livebox.c linux-2.6.27.4.new/arch/mips/bcm63xx/boards/board_livebox.c
21 --- linux-2.6.27.4/arch/mips/bcm63xx/boards/board_livebox.c 1970-01-01 01:00:00.000000000 +0100
22 +++ linux-2.6.27.4.new/arch/mips/bcm63xx/boards/board_livebox.c 2008-11-03 20:03:59.000000000 +0100
25 + * This file is subject to the terms and conditions of the GNU General Public
26 + * License. See the file "COPYING" in the main directory of this archive
29 + * Copyright (C) 2008 Florian Fainelli <florian@openwrt.org>
32 +#include <linux/init.h>
33 +#include <linux/kernel.h>
34 +#include <linux/string.h>
35 +#include <linux/platform_device.h>
36 +#include <linux/mtd/mtd.h>
37 +#include <linux/mtd/partitions.h>
38 +#include <linux/mtd/physmap.h>
39 +#include <asm/addrspace.h>
40 +#include <bcm63xx_board.h>
41 +#include <bcm63xx_cpu.h>
42 +#include <bcm63xx_regs.h>
43 +#include <bcm63xx_io.h>
44 +#include <bcm63xx_board.h>
45 +#include <bcm63xx_dev_pci.h>
46 +#include <bcm63xx_dev_uart.h>
47 +#include <bcm63xx_dev_enet.h>
48 +#include <bcm63xx_dev_pcmcia.h>
49 +#include <bcm63xx_dev_usb_ohci.h>
50 +#include <bcm63xx_dev_usb_ehci.h>
51 +#include <board_bcm963xx.h>
53 +#define PFX "board_livebox: "
55 +static unsigned int mac_addr_used = 0;
56 +static struct board_info board;
61 +#ifdef CONFIG_BCM63XX_CPU_6348
62 +static struct board_info __initdata board_livebox = {
64 + .expected_cpu_id = 0x6348,
71 + .use_internal_phy = 1,
79 +static const struct board_info __initdata *bcm963xx_boards[] = {
80 +#ifdef CONFIG_BCM63XX_CPU_6348
86 + * early init callback
88 +void __init board_prom_init(void)
92 + /* read base address of boot chip select (0) */
93 + val = bcm_mpi_readl(MPI_CSBASE_REG(0));
94 + val &= MPI_CSBASE_BASE_MASK;
96 + /* assume board is a Livebox */
97 + memcpy(&board, bcm963xx_boards[0], sizeof(board));
99 + /* setup pin multiplexing depending on board enabled device,
100 + * this has to be done this early since PCI init is done
101 + * inside arch_initcall */
104 + if (board.has_pci) {
105 + bcm63xx_pci_enabled = 1;
106 + if (BCMCPU_IS_6348())
107 + val |= GPIO_MODE_6348_G2_PCI;
110 + if (board.has_pccard) {
111 + if (BCMCPU_IS_6348())
112 + val |= GPIO_MODE_6348_G1_MII_PCCARD;
115 + if (board.has_enet0 && !board.enet0.use_internal_phy) {
116 + if (BCMCPU_IS_6348())
117 + val |= GPIO_MODE_6348_G3_EXT_MII |
118 + GPIO_MODE_6348_G0_EXT_MII;
121 + if (board.has_enet1 && !board.enet1.use_internal_phy) {
122 + if (BCMCPU_IS_6348())
123 + val |= GPIO_MODE_6348_G3_EXT_MII |
124 + GPIO_MODE_6348_G0_EXT_MII;
127 + bcm_gpio_writel(val, GPIO_MODE_REG);
131 + * second stage init callback, good time to panic if we couldn't
132 + * identify on which board we're running since early printk is working
134 +void __init board_setup(void)
136 + if (!board.name[0])
137 + panic("unable to detect bcm963xx board");
138 + printk(KERN_INFO PFX "board name: %s\n", board.name);
140 + /* make sure we're running on expected cpu */
141 + if (bcm63xx_get_cpu_id() != board.expected_cpu_id)
142 + panic("unexpected CPU for bcm963xx board");
146 + * return board name for /proc/cpuinfo
148 +const char *board_get_name(void)
154 + * register & return a new board mac address
156 +static int board_get_mac_address(u8 *mac)
158 + /* Not yet implemented */
163 + * third stage init callback, register all board devices.
165 +int __init board_register_devices(void)
169 + bcm63xx_uart_register();
171 + if (board.has_pccard)
172 + bcm63xx_pcmcia_register();
174 + if (board.has_enet0 &&
175 + !board_get_mac_address(board.enet0.mac_addr))
176 + bcm63xx_enet_register(0, &board.enet0);
178 + if (board.has_enet1 &&
179 + !board_get_mac_address(board.enet1.mac_addr))
180 + bcm63xx_enet_register(1, &board.enet1);
182 + if (board.has_ohci0)
183 + bcm63xx_ohci_register();
185 + if (board.has_ehci0)
186 + bcm63xx_ehci_register();
189 + /* read base address of boot chip select (0) */
190 + val = bcm_mpi_readl(MPI_CSBASE_REG(0));
191 + val &= MPI_CSBASE_BASE_MASK;