+++ /dev/null
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -29,6 +29,7 @@
- #include <bcm63xx_dev_pcmcia.h>
- #include <bcm63xx_dev_usb_ohci.h>
- #include <bcm63xx_dev_usb_ehci.h>
-+#include <bcm63xx_dev_usb_udc.h>
- #include <board_bcm963xx.h>
-
- #define PFX "board_bcm963xx: "
-@@ -400,6 +401,8 @@ static struct board_info __initdata boar
- .has_ohci0 = 1,
- .has_pccard = 1,
- .has_ehci0 = 1,
-+
-+ .has_udc0 = 1,
- };
-
- static struct board_info __initdata board_rta1025w_16 = {
-@@ -911,6 +914,9 @@ int __init board_register_devices(void)
- if (board.has_dsp)
- bcm63xx_dsp_register(&board.dsp);
-
-+ if (board.has_udc0)
-+ bcm63xx_udc_register();
-+
- /* read base address of boot chip select (0) */
- val = bcm_mpi_readl(MPI_CSBASE_REG(0));
- val &= MPI_CSBASE_BASE_MASK;
---- /dev/null
-+++ b/arch/mips/bcm63xx/dev-usb-udc.c
-@@ -0,0 +1,58 @@
-+/*
-+ * Copyright (C) 2009 Henk Vergonet <Henk.Vergonet@gmail.com>
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License as
-+ * published by the Free Software Foundation; either version 2 of
-+ * the License, or (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-+ */
-+#include <linux/init.h>
-+#include <linux/kernel.h>
-+#include <linux/platform_device.h>
-+#include <bcm63xx_cpu.h>
-+
-+static struct resource udc_resources[] = {
-+ {
-+ .start = -1, /* filled at runtime */
-+ .end = -1, /* filled at runtime */
-+ .flags = IORESOURCE_MEM,
-+ },
-+ {
-+ .start = -1, /* filled at runtime */
-+ .flags = IORESOURCE_IRQ,
-+ },
-+};
-+
-+static u64 udc_dmamask = ~(u32)0;
-+
-+static struct platform_device bcm63xx_udc_device = {
-+ .name = "bcm63xx-udc",
-+ .id = 0,
-+ .num_resources = ARRAY_SIZE(udc_resources),
-+ .resource = udc_resources,
-+ .dev = {
-+ .dma_mask = &udc_dmamask,
-+ .coherent_dma_mask = 0xffffffff,
-+ },
-+};
-+
-+int __init bcm63xx_udc_register(void)
-+{
-+ if (!BCMCPU_IS_6338() && !BCMCPU_IS_6345() && !BCMCPU_IS_6348())
-+ return 0;
-+
-+ udc_resources[0].start = bcm63xx_regset_address(RSET_UDC0);
-+ udc_resources[0].end = udc_resources[0].start;
-+ udc_resources[0].end += RSET_UDC_SIZE - 1;
-+ udc_resources[1].start = bcm63xx_get_irq_number(IRQ_UDC0);
-+ return platform_device_register(&bcm63xx_udc_device);
-+}
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-@@ -127,7 +127,7 @@ enum bcm63xx_regs_set {
- #define BCM_6338_UART1_BASE (0xdeadbeef)
- #define BCM_6338_GPIO_BASE (0xfffe0400)
- #define BCM_6338_SPI_BASE (0xfffe0c00)
--#define BCM_6338_UDC0_BASE (0xdeadbeef)
-+#define BCM_6338_UDC0_BASE (0xfffe3000)
- #define BCM_6338_USBDMA_BASE (0xfffe2400)
- #define BCM_6338_OHCI0_BASE (0xdeadbeef)
- #define BCM_6338_OHCI_PRIV_BASE (0xfffe3000)
-@@ -158,7 +158,7 @@ enum bcm63xx_regs_set {
- #define BCM_6345_UART1_BASE (0xdeadbeef)
- #define BCM_6345_GPIO_BASE (0xfffe0400)
- #define BCM_6345_SPI_BASE (0xdeadbeef)
--#define BCM_6345_UDC0_BASE (0xdeadbeef)
-+#define BCM_6345_UDC0_BASE (0xfffe2100)
- #define BCM_6345_USBDMA_BASE (0xfffe2800)
- #define BCM_6345_ENET0_BASE (0xfffe1800)
- #define BCM_6345_ENETDMA_BASE (0xfffe2800)
-@@ -215,7 +215,7 @@ enum bcm63xx_regs_set {
- #define BCM_6358_UART1_BASE (0xfffe0120)
- #define BCM_6358_GPIO_BASE (0xfffe0080)
- #define BCM_6358_SPI_BASE (0xdeadbeef)
--#define BCM_6358_UDC0_BASE (0xfffe0800)
-+#define BCM_6358_UDC0_BASE (0xfffe0400)
- #define BCM_6358_OHCI0_BASE (0xfffe1400)
- #define BCM_6358_OHCI_PRIV_BASE (0xdeadbeef)
- #define BCM_6358_USBH_PRIV_BASE (0xfffe1500)
-@@ -444,6 +444,7 @@ enum bcm63xx_irq {
- IRQ_UART0,
- IRQ_UART1,
- IRQ_DSL,
-+ IRQ_UDC0,
- IRQ_ENET0,
- IRQ_ENET1,
- IRQ_ENET_PHY,
-@@ -486,7 +487,7 @@ enum bcm63xx_irq {
- #define BCM_6345_UART0_IRQ (IRQ_INTERNAL_BASE + 2)
- #define BCM_6345_DSL_IRQ (IRQ_INTERNAL_BASE + 3)
- #define BCM_6345_ATM_IRQ (IRQ_INTERNAL_BASE + 4)
--#define BCM_6345_USB_IRQ (IRQ_INTERNAL_BASE + 5)
-+#define BCM_6345_UDC0_IRQ (IRQ_INTERNAL_BASE + 5)
- #define BCM_6345_ENET0_IRQ (IRQ_INTERNAL_BASE + 8)
- #define BCM_6345_ENET_PHY_IRQ (IRQ_INTERNAL_BASE + 12)
- #define BCM_6345_ENET0_RXDMA_IRQ (IRQ_INTERNAL_BASE + 13 + 1)
-@@ -508,10 +509,17 @@ enum bcm63xx_irq {
- #define BCM_6348_TIMER_IRQ (IRQ_INTERNAL_BASE + 0)
- #define BCM_6348_UART0_IRQ (IRQ_INTERNAL_BASE + 2)
- #define BCM_6348_DSL_IRQ (IRQ_INTERNAL_BASE + 4)
-+#define BCM_6348_UDC0_IRQ (IRQ_INTERNAL_BASE + 6)
- #define BCM_6348_ENET1_IRQ (IRQ_INTERNAL_BASE + 7)
- #define BCM_6348_ENET0_IRQ (IRQ_INTERNAL_BASE + 8)
- #define BCM_6348_ENET_PHY_IRQ (IRQ_INTERNAL_BASE + 9)
- #define BCM_6348_OHCI0_IRQ (IRQ_INTERNAL_BASE + 12)
-+#define BCM_6348_USB_CNTL_RX_DMA_IRQ (IRQ_INTERNAL_BASE + 14)
-+#define BCM_6348_USB_CNTL_TX_DMA_IRQ (IRQ_INTERNAL_BASE + 15)
-+#define BCM_6348_USB_BULK_RX_DMA_IRQ (IRQ_INTERNAL_BASE + 16)
-+#define BCM_6348_USB_BULK_TX_DMA_IRQ (IRQ_INTERNAL_BASE + 17)
-+#define BCM_6348_USB_ISO_RX_DMA_IRQ (IRQ_INTERNAL_BASE + 18)
-+#define BCM_6348_USB_ISO_TX_DMA_IRQ (IRQ_INTERNAL_BASE + 19)
- #define BCM_6348_ENET0_RXDMA_IRQ (IRQ_INTERNAL_BASE + 20)
- #define BCM_6348_ENET0_TXDMA_IRQ (IRQ_INTERNAL_BASE + 21)
- #define BCM_6348_ENET1_RXDMA_IRQ (IRQ_INTERNAL_BASE + 22)
---- /dev/null
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_usb_udc.h
-@@ -0,0 +1,6 @@
-+#ifndef BCM63XX_DEV_USB_UDC_H_
-+#define BCM63XX_DEV_USB_UDC_H_
-+
-+int bcm63xx_udc_register(void);
-+
-+#endif /* BCM63XX_DEV_USB_UDC_H_ */
---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -47,6 +47,7 @@ struct board_info {
- unsigned int has_dsp:1;
- unsigned int has_uart0:1;
- unsigned int has_uart1:1;
-+ unsigned int has_udc0:1;
-
- /* ethernet config */
- struct bcm63xx_enet_platform_data enet0;
---- a/arch/mips/bcm63xx/Makefile
-+++ b/arch/mips/bcm63xx/Makefile
-@@ -1,6 +1,6 @@
- obj-y += clk.o cpu.o cs.o gpio.o irq.o prom.o setup.o timer.o \
- dev-dsp.o dev-enet.o dev-pcmcia.o dev-uart.o dev-wdt.o \
-- dev-usb-ohci.o dev-usb-ehci.o
-+ dev-usb-ohci.o dev-usb-ehci.o dev-usb-udc.o
- obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
-
- obj-y += boards/
---- a/arch/mips/bcm63xx/clk.c
-+++ b/arch/mips/bcm63xx/clk.c
-@@ -141,6 +141,30 @@ static struct clk clk_usbh = {
- };
-
- /*
-+ * USB slave clock
-+ */
-+static void usbs_set(struct clk *clk, int enable)
-+{
-+ u32 mask;
-+
-+ switch(bcm63xx_get_cpu_id()) {
-+ case BCM6338_CPU_ID:
-+ mask = CKCTL_6338_USBS_EN;
-+ break;
-+ case BCM6348_CPU_ID:
-+ mask = CKCTL_6348_USBS_EN;
-+ break;
-+ default:
-+ return;
-+ }
-+ bcm_hwclock_set(mask, enable);
-+}
-+
-+static struct clk clk_usbs = {
-+ .set = usbs_set,
-+};
-+
-+/*
- * SPI clock
- */
- static void spi_set(struct clk *clk, int enable)
-@@ -208,6 +232,8 @@ struct clk *clk_get(struct device *dev,
- return &clk_ephy;
- if (!strcmp(id, "usbh"))
- return &clk_usbh;
-+ if (!strcmp(id, "usbs"))
-+ return &clk_usbs;
- if (!strcmp(id, "spi"))
- return &clk_spi;
- if (!strcmp(id, "periph"))
---- a/arch/mips/bcm63xx/Kconfig
-+++ b/arch/mips/bcm63xx/Kconfig
-@@ -7,6 +7,7 @@ config BCM63XX_CPU_6338
- select USB_ARCH_HAS_OHCI
- select USB_OHCI_BIG_ENDIAN_DESC
- select USB_OHCI_BIG_ENDIAN_MMIO
-+ select USB_ARCH_HAS_UDC
-
- config BCM63XX_CPU_6345
- bool "support 6345 CPU"
-@@ -19,6 +20,7 @@ config BCM63XX_CPU_6348
- select USB_ARCH_HAS_OHCI
- select USB_OHCI_BIG_ENDIAN_DESC
- select USB_OHCI_BIG_ENDIAN_MMIO
-+ select USB_ARCH_HAS_UDC
-
- config BCM63XX_CPU_6358
- bool "support 6358 CPU"
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -917,6 +917,9 @@ int __init board_register_devices(void)
- if (board.has_udc0)
- bcm63xx_udc_register();
+@@ -911,6 +911,9 @@ int __init board_register_devices(void)
+ if (board.has_dsp)
+ bcm63xx_dsp_register(&board.dsp);
+ if (board.num_devs)
+ platform_add_devices(board.devs, board.num_devs);
val &= MPI_CSBASE_BASE_MASK;
--- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -61,6 +61,10 @@ struct board_info {
+@@ -60,6 +60,10 @@ struct board_info {
/* Buttons */
struct gpio_button buttons[4];
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -920,6 +920,9 @@ int __init board_register_devices(void)
+@@ -914,6 +914,9 @@ int __init board_register_devices(void)
if (board.num_devs)
platform_add_devices(board.devs, board.num_devs);
val &= MPI_CSBASE_BASE_MASK;
--- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -65,6 +65,10 @@ struct board_info {
+@@ -64,6 +64,10 @@ struct board_info {
/* Additional platform devices */
struct platform_device **devs;
unsigned int num_devs;
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -39,6 +39,13 @@ static unsigned int mac_addr_used;
+@@ -38,6 +38,13 @@ static unsigned int mac_addr_used;
static struct board_info board;
/*
* known 6338 boards
*/
#ifdef CONFIG_BCM63XX_CPU_6338
-@@ -752,6 +759,7 @@ void __init board_prom_init(void)
+@@ -749,6 +756,7 @@ void __init board_prom_init(void)
/* extract nvram data */
memcpy(&nvram, boot_addr + BCM963XX_NVRAM_OFFSET, sizeof(nvram));
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -823,6 +823,8 @@ void __init board_prom_init(void)
+@@ -820,6 +820,8 @@ void __init board_prom_init(void)
if (BCMCPU_IS_6348())
val |= GPIO_MODE_6348_G3_EXT_MII |
GPIO_MODE_6348_G0_EXT_MII;
#define RSET_UART_SIZE 24
#define RSET_UDC_SIZE 256
#define RSET_OHCI_SIZE 256
-@@ -214,7 +215,7 @@ enum bcm63xx_regs_set {
+@@ -214,8 +215,8 @@ enum bcm63xx_regs_set {
#define BCM_6358_UART0_BASE (0xfffe0100)
#define BCM_6358_UART1_BASE (0xfffe0120)
#define BCM_6358_GPIO_BASE (0xfffe0080)
-#define BCM_6358_SPI_BASE (0xdeadbeef)
+-#define BCM_6358_UDC0_BASE (0xfffe0800)
+#define BCM_6358_SPI_BASE (0xfffe0800)
- #define BCM_6358_UDC0_BASE (0xfffe0400)
++#define BCM_6358_UDC0_BASE (0xdeadbeef)
#define BCM_6358_OHCI0_BASE (0xfffe1400)
#define BCM_6358_OHCI_PRIV_BASE (0xdeadbeef)
+ #define BCM_6358_USBH_PRIV_BASE (0xfffe1500)
@@ -441,6 +442,7 @@ static inline unsigned long bcm63xx_regs
*/
enum bcm63xx_irq {
IRQ_UART0,
IRQ_UART1,
IRQ_DSL,
-@@ -507,6 +509,7 @@ enum bcm63xx_irq {
+@@ -506,6 +508,7 @@ enum bcm63xx_irq {
* 6348 irqs
*/
#define BCM_6348_TIMER_IRQ (IRQ_INTERNAL_BASE + 0)
+#define BCM_6348_SPI_IRQ (IRQ_INTERNAL_BASE + 1)
#define BCM_6348_UART0_IRQ (IRQ_INTERNAL_BASE + 2)
#define BCM_6348_DSL_IRQ (IRQ_INTERNAL_BASE + 4)
- #define BCM_6348_UDC0_IRQ (IRQ_INTERNAL_BASE + 6)
-@@ -531,6 +534,7 @@ enum bcm63xx_irq {
+ #define BCM_6348_ENET1_IRQ (IRQ_INTERNAL_BASE + 7)
+@@ -523,6 +526,7 @@ enum bcm63xx_irq {
* 6358 irqs
*/
#define BCM_6358_TIMER_IRQ (IRQ_INTERNAL_BASE + 0)
@@ -1,6 +1,6 @@
obj-y += clk.o cpu.o cs.o gpio.o irq.o prom.o setup.o timer.o \
dev-dsp.o dev-enet.o dev-pcmcia.o dev-uart.o dev-wdt.o \
-- dev-usb-ohci.o dev-usb-ehci.o dev-usb-udc.o
-+ dev-usb-ohci.o dev-usb-ehci.o dev-usb-udc.o dev-spi.o
+- dev-usb-ohci.o dev-usb-ehci.o
++ dev-usb-ohci.o dev-usb-ehci.o dev-spi.o
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
obj-y += boards/
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -30,6 +30,7 @@
+@@ -29,6 +29,7 @@
+ #include <bcm63xx_dev_pcmcia.h>
#include <bcm63xx_dev_usb_ohci.h>
#include <bcm63xx_dev_usb_ehci.h>
- #include <bcm63xx_dev_usb_udc.h>
+#include <bcm63xx_dev_spi.h>
#include <board_bcm963xx.h>
#define PFX "board_bcm963xx: "
-@@ -933,6 +934,8 @@ int __init board_register_devices(void)
+@@ -927,6 +928,8 @@ int __init board_register_devices(void)
if (board.num_spis)
spi_register_board_info(board.spis, board.num_spis);
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -32,9 +32,13 @@
- #include <bcm63xx_dev_usb_udc.h>
+@@ -31,9 +31,13 @@
+ #include <bcm63xx_dev_usb_ehci.h>
#include <bcm63xx_dev_spi.h>
#include <board_bcm963xx.h>
+#include <bcm_tag.h>
static struct bcm963xx_nvram nvram;
static unsigned int mac_addr_used;
static struct board_info board;
-@@ -734,6 +738,29 @@ static int board_get_mac_address(u8 *mac
+@@ -731,6 +735,29 @@ static int board_get_mac_address(u8 *mac
return 0;
}
/*
* early init callback, read nvram data from flash and checksum it
*/
-@@ -776,6 +803,11 @@ void __init board_prom_init(void)
+@@ -773,6 +800,11 @@ void __init board_prom_init(void)
return;
}
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -861,18 +861,6 @@ void __init board_prom_init(void)
+@@ -858,18 +858,6 @@ void __init board_prom_init(void)
}
bcm_gpio_writel(val, GPIO_MODE_REG);
}
/*
-@@ -948,6 +936,19 @@ int __init board_register_devices(void)
+@@ -945,6 +933,19 @@ int __init board_register_devices(void)
!board_get_mac_address(board.enet1.mac_addr))
bcm63xx_enet_register(1, &board.enet1);
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -603,6 +603,99 @@ static struct board_info __initdata boar
+@@ -600,6 +600,99 @@ static struct board_info __initdata boar
.has_ohci0 = 1,
.has_ehci0 = 1,
static struct board_info __initdata board_DWVS0 = {
--- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -57,7 +57,7 @@ struct board_info {
+@@ -56,7 +56,7 @@ struct board_info {
struct bcm63xx_dsp_platform_data dsp;
/* GPIO LEDs */
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -475,6 +475,19 @@ static struct board_info __initdata boar
+@@ -472,6 +472,19 @@ static struct board_info __initdata boar
},
.has_ohci0 = 1,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -489,6 +489,55 @@ static struct board_info __initdata boar
+@@ -486,6 +486,55 @@ static struct board_info __initdata boar
}
},
};
#endif
/*
-@@ -753,6 +802,7 @@ static const struct board_info __initdat
+@@ -750,6 +799,7 @@ static const struct board_info __initdat
&board_DV201AMR,
&board_96348gw_a,
&board_rta1025w_16,
#include <asm/addrspace.h>
#include <bcm63xx_board.h>
#include <bcm63xx_cpu.h>
-@@ -39,6 +42,12 @@
+@@ -38,6 +41,12 @@
#define CFE_OFFSET_64K 0x10000
#define CFE_OFFSET_128K 0x20000
static struct bcm963xx_nvram nvram;
static unsigned int mac_addr_used;
static struct board_info board;
-@@ -780,6 +789,502 @@ static struct board_info __initdata boar
+@@ -777,6 +786,496 @@ static struct board_info __initdata boar
.has_ohci0 = 1,
};
+ .has_pccard = 1,
+ .has_ehci0 = 1,
+
-+ .has_udc0 = 1,
-+
+ .leds = {
+ {
+ .name = "adsl",
+ .has_pccard = 1,
+ .has_ehci0 = 1,
+
-+ .has_udc0 = 1,
-+
+ .leds = {
+ {
+ .name = "adsl",
+ .has_pccard = 1,
+ .has_ehci0 = 1,
+
-+ .has_udc0 = 1,
-+
+ .leds = {
+ {
+ .name = "adsl",
#endif
/*
-@@ -810,9 +1315,30 @@ static const struct board_info __initdat
+@@ -807,9 +1306,30 @@ static const struct board_info __initdat
&board_96358vw2,
&board_AGPFS0,
&board_DWVS0,
/*
* Register a sane SPROMv2 to make the on-board
* bcm4318 WLAN work
-@@ -964,6 +1490,9 @@ void __init board_prom_init(void)
+@@ -961,6 +1481,9 @@ void __init board_prom_init(void)
boardid_fixup(boot_addr);
}
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -146,6 +146,38 @@ static struct board_info __initdata boar
+@@ -145,6 +145,38 @@ static struct board_info __initdata boar
},
},
};
#endif
/*
-@@ -1294,6 +1326,7 @@ static const struct board_info __initdat
+@@ -1285,6 +1317,7 @@ static const struct board_info __initdat
#ifdef CONFIG_BCM63XX_CPU_6338
&board_96338gw,
&board_96338w,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -685,6 +685,98 @@ static struct board_info __initdata boar
+@@ -682,6 +682,98 @@ static struct board_info __initdata boar
},
};
static struct board_info __initdata board_AGPFS0 = {
.name = "AGPF-S0",
.expected_cpu_id = 0x6358,
-@@ -1347,6 +1439,7 @@ static const struct board_info __initdat
+@@ -1338,6 +1430,7 @@ static const struct board_info __initdat
&board_96358vw,
&board_96358vw2,
&board_AGPFS0,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -914,6 +914,59 @@ static struct board_info __initdata boar
+@@ -911,6 +911,59 @@ static struct board_info __initdata boar
.has_ohci0 = 1,
};
struct spi_gpio_platform_data nb4_spi_gpio_data = {
.sck = NB4_SPI_GPIO_CLK,
.mosi = NB4_SPI_GPIO_MOSI,
-@@ -1441,6 +1494,7 @@ static const struct board_info __initdat
+@@ -1432,6 +1485,7 @@ static const struct board_info __initdat
&board_AGPFS0,
&board_CPVA642,
&board_DWVS0,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -579,6 +579,67 @@ static struct board_info __initdata boar
+@@ -576,6 +576,67 @@ static struct board_info __initdata boar
},
};
#endif
/*
-@@ -1486,6 +1547,7 @@ static const struct board_info __initdat
+@@ -1477,6 +1538,7 @@ static const struct board_info __initdat
&board_96348gw_a,
&board_rta1025w_16,
&board_96348_D4PW,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -432,6 +432,112 @@ static struct board_info __initdata boar
+@@ -431,6 +431,112 @@ static struct board_info __initdata boar
},
};
static struct board_info __initdata board_FAST2404 = {
.name = "F@ST2404",
.expected_cpu_id = 0x6348,
-@@ -1540,6 +1646,8 @@ static const struct board_info __initdat
+@@ -1531,6 +1637,8 @@ static const struct board_info __initdat
#ifdef CONFIG_BCM63XX_CPU_6348
&board_96348r,
&board_96348gw,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -746,6 +746,76 @@ static struct board_info __initdata boar
+@@ -743,6 +743,76 @@ static struct board_info __initdata boar
},
};
#endif
/*
-@@ -1656,6 +1726,7 @@ static const struct board_info __initdat
+@@ -1647,6 +1717,7 @@ static const struct board_info __initdat
&board_rta1025w_16,
&board_96348_D4PW,
&board_spw500v,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1699,6 +1699,81 @@ static struct board_info __initdata boar
+@@ -1690,6 +1690,81 @@ static struct board_info __initdata boar
.spis = nb4_spi_devices,
.num_spis = ARRAY_SIZE(nb4_spi_devices),
};
#endif
/*
-@@ -1741,6 +1816,7 @@ static const struct board_info __initdat
+@@ -1732,6 +1807,7 @@ static const struct board_info __initdat
&board_nb4_ser_r2,
&board_nb4_fxc_r1,
&board_nb4_fxc_r2,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -178,6 +178,43 @@ static struct board_info __initdata boar
+@@ -177,6 +177,43 @@ static struct board_info __initdata boar
},
},
};
#endif
/*
-@@ -1784,6 +1821,7 @@ static const struct board_info __initdat
+@@ -1775,6 +1812,7 @@ static const struct board_info __initdat
&board_96338gw,
&board_96338w,
&board_96338w2_e7t,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1811,6 +1811,72 @@ static struct board_info __initdata boar
+@@ -1802,6 +1802,72 @@ static struct board_info __initdata boar
},
},
};
#endif
/*
-@@ -1855,6 +1921,7 @@ static const struct board_info __initdat
+@@ -1846,6 +1912,7 @@ static const struct board_info __initdat
&board_nb4_fxc_r1,
&board_nb4_fxc_r2,
&board_HW553,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -853,6 +853,63 @@ static struct board_info __initdata boar
+@@ -850,6 +850,63 @@ static struct board_info __initdata boar
},
};
#endif
/*
-@@ -1906,6 +1963,7 @@ static const struct board_info __initdat
+@@ -1897,6 +1954,7 @@ static const struct board_info __initdat
&board_96348_D4PW,
&board_spw500v,
&board_96348sv,
#endif
#ifdef CONFIG_BCM63XX_CPU_6358
-@@ -2059,6 +2117,22 @@ void __init board_prom_init(void)
+@@ -2050,6 +2108,22 @@ void __init board_prom_init(void)
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;
-@@ -2260,6 +2334,13 @@ int __init board_register_devices(void)
+@@ -2248,6 +2322,13 @@ int __init board_register_devices(void)
val = bcm_mpi_readl(MPI_CSBASE_REG(0));
val &= MPI_CSBASE_BASE_MASK;
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -401,6 +401,62 @@ static struct board_info __initdata boar
+@@ -400,6 +400,62 @@ static struct board_info __initdata boar
},
};
static struct board_info __initdata board_96348gw = {
.name = "96348GW",
.expected_cpu_id = 0x6348,
-@@ -1964,6 +2020,7 @@ static const struct board_info __initdat
+@@ -1955,6 +2011,7 @@ static const struct board_info __initdat
&board_spw500v,
&board_96348sv,
&board_V2500V_BB,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -457,6 +457,49 @@ static struct board_info __initdata boar
+@@ -456,6 +456,49 @@ static struct board_info __initdata boar
};
static struct board_info __initdata board_96348gw = {
.name = "96348GW",
.expected_cpu_id = 0x6348,
-@@ -2021,6 +2064,7 @@ static const struct board_info __initdat
+@@ -2012,6 +2055,7 @@ static const struct board_info __initdat
&board_96348sv,
&board_V2500V_BB,
&board_V2110,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1327,6 +1327,8 @@ static struct board_info __initdata boar
+@@ -1324,6 +1324,8 @@ static struct board_info __initdata boar
.name = "DWV-S0",
.expected_cpu_id = 0x6358,
.has_enet0 = 1,
.has_enet1 = 1,
.has_pci = 1,
-@@ -1342,6 +1344,7 @@ static struct board_info __initdata boar
+@@ -1339,6 +1341,7 @@ static struct board_info __initdata boar
},
.has_ohci0 = 1,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1009,6 +1009,67 @@ static struct board_info __initdata boar
+@@ -1006,6 +1006,67 @@ static struct board_info __initdata boar
},
};
#endif
/*
-@@ -2068,6 +2129,7 @@ static const struct board_info __initdat
+@@ -2059,6 +2120,7 @@ static const struct board_info __initdat
&board_V2500V_BB,
&board_V2110,
&board_ct536_ct5621,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -704,6 +704,7 @@ static struct board_info __initdata boar
+@@ -701,6 +701,7 @@ static struct board_info __initdata boar
.name = "RTA1025W_16",
.expected_cpu_id = 0x6348,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1071,6 +1071,44 @@ static struct board_info __initdata boar
+@@ -1068,6 +1068,42 @@ static struct board_info __initdata boar
},
};
+ .force_duplex_full = 1,
+ },
+
-+ .has_udc0 = 1,
-+
+ .leds = {
+ {
+ .name = "phone",
#endif
/*
-@@ -2131,6 +2169,7 @@ static const struct board_info __initdat
+@@ -2122,6 +2158,7 @@ static const struct board_info __initdat
&board_V2110,
&board_ct536_ct5621,
&board_96348A_122,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -335,6 +335,17 @@ static struct board_info __initdata boar
+@@ -334,6 +334,17 @@ static struct board_info __initdata boar
.active_low = 1,
},
},
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -2221,7 +2221,7 @@ static void __init nb4_nvram_fixup(void)
+@@ -2210,7 +2210,7 @@ static void __init nb4_nvram_fixup(void)
* bcm4318 WLAN work
*/
#ifdef CONFIG_SSB_PCIHOST
.revision = 0x02,
.board_rev = 0x17,
.country_code = 0x0,
-@@ -2241,6 +2241,7 @@ static struct ssb_sprom bcm63xx_sprom =
+@@ -2230,6 +2230,7 @@ static struct ssb_sprom bcm63xx_sprom =
.boardflags_lo = 0x2848,
.boardflags_hi = 0x0000,
};
+++ /dev/null
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -29,6 +29,7 @@
- #include <bcm63xx_dev_pcmcia.h>
- #include <bcm63xx_dev_usb_ohci.h>
- #include <bcm63xx_dev_usb_ehci.h>
-+#include <bcm63xx_dev_usb_udc.h>
- #include <board_bcm963xx.h>
-
- #define PFX "board_bcm963xx: "
-@@ -400,6 +401,8 @@ static struct board_info __initdata boar
- .has_ohci0 = 1,
- .has_pccard = 1,
- .has_ehci0 = 1,
-+
-+ .has_udc0 = 1,
- };
-
- static struct board_info __initdata board_rta1025w_16 = {
-@@ -911,6 +914,9 @@ int __init board_register_devices(void)
- if (board.has_dsp)
- bcm63xx_dsp_register(&board.dsp);
-
-+ if (board.has_udc0)
-+ bcm63xx_udc_register();
-+
- /* read base address of boot chip select (0) */
- val = bcm_mpi_readl(MPI_CSBASE_REG(0));
- val &= MPI_CSBASE_BASE_MASK;
---- /dev/null
-+++ b/arch/mips/bcm63xx/dev-usb-udc.c
-@@ -0,0 +1,58 @@
-+/*
-+ * Copyright (C) 2009 Henk Vergonet <Henk.Vergonet@gmail.com>
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License as
-+ * published by the Free Software Foundation; either version 2 of
-+ * the License, or (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-+ */
-+#include <linux/init.h>
-+#include <linux/kernel.h>
-+#include <linux/platform_device.h>
-+#include <bcm63xx_cpu.h>
-+
-+static struct resource udc_resources[] = {
-+ {
-+ .start = -1, /* filled at runtime */
-+ .end = -1, /* filled at runtime */
-+ .flags = IORESOURCE_MEM,
-+ },
-+ {
-+ .start = -1, /* filled at runtime */
-+ .flags = IORESOURCE_IRQ,
-+ },
-+};
-+
-+static u64 udc_dmamask = ~(u32)0;
-+
-+static struct platform_device bcm63xx_udc_device = {
-+ .name = "bcm63xx-udc",
-+ .id = 0,
-+ .num_resources = ARRAY_SIZE(udc_resources),
-+ .resource = udc_resources,
-+ .dev = {
-+ .dma_mask = &udc_dmamask,
-+ .coherent_dma_mask = 0xffffffff,
-+ },
-+};
-+
-+int __init bcm63xx_udc_register(void)
-+{
-+ if (!BCMCPU_IS_6338() && !BCMCPU_IS_6345() && !BCMCPU_IS_6348())
-+ return 0;
-+
-+ udc_resources[0].start = bcm63xx_regset_address(RSET_UDC0);
-+ udc_resources[0].end = udc_resources[0].start;
-+ udc_resources[0].end += RSET_UDC_SIZE - 1;
-+ udc_resources[1].start = bcm63xx_get_irq_number(IRQ_UDC0);
-+ return platform_device_register(&bcm63xx_udc_device);
-+}
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-@@ -127,7 +127,7 @@ enum bcm63xx_regs_set {
- #define BCM_6338_UART1_BASE (0xdeadbeef)
- #define BCM_6338_GPIO_BASE (0xfffe0400)
- #define BCM_6338_SPI_BASE (0xfffe0c00)
--#define BCM_6338_UDC0_BASE (0xdeadbeef)
-+#define BCM_6338_UDC0_BASE (0xfffe3000)
- #define BCM_6338_USBDMA_BASE (0xfffe2400)
- #define BCM_6338_OHCI0_BASE (0xdeadbeef)
- #define BCM_6338_OHCI_PRIV_BASE (0xfffe3000)
-@@ -158,7 +158,7 @@ enum bcm63xx_regs_set {
- #define BCM_6345_UART1_BASE (0xdeadbeef)
- #define BCM_6345_GPIO_BASE (0xfffe0400)
- #define BCM_6345_SPI_BASE (0xdeadbeef)
--#define BCM_6345_UDC0_BASE (0xdeadbeef)
-+#define BCM_6345_UDC0_BASE (0xfffe2100)
- #define BCM_6345_USBDMA_BASE (0xfffe2800)
- #define BCM_6345_ENET0_BASE (0xfffe1800)
- #define BCM_6345_ENETDMA_BASE (0xfffe2800)
-@@ -215,7 +215,7 @@ enum bcm63xx_regs_set {
- #define BCM_6358_UART1_BASE (0xfffe0120)
- #define BCM_6358_GPIO_BASE (0xfffe0080)
- #define BCM_6358_SPI_BASE (0xdeadbeef)
--#define BCM_6358_UDC0_BASE (0xfffe0800)
-+#define BCM_6358_UDC0_BASE (0xfffe0400)
- #define BCM_6358_OHCI0_BASE (0xfffe1400)
- #define BCM_6358_OHCI_PRIV_BASE (0xdeadbeef)
- #define BCM_6358_USBH_PRIV_BASE (0xfffe1500)
-@@ -444,6 +444,7 @@ enum bcm63xx_irq {
- IRQ_UART0,
- IRQ_UART1,
- IRQ_DSL,
-+ IRQ_UDC0,
- IRQ_ENET0,
- IRQ_ENET1,
- IRQ_ENET_PHY,
-@@ -486,7 +487,7 @@ enum bcm63xx_irq {
- #define BCM_6345_UART0_IRQ (IRQ_INTERNAL_BASE + 2)
- #define BCM_6345_DSL_IRQ (IRQ_INTERNAL_BASE + 3)
- #define BCM_6345_ATM_IRQ (IRQ_INTERNAL_BASE + 4)
--#define BCM_6345_USB_IRQ (IRQ_INTERNAL_BASE + 5)
-+#define BCM_6345_UDC0_IRQ (IRQ_INTERNAL_BASE + 5)
- #define BCM_6345_ENET0_IRQ (IRQ_INTERNAL_BASE + 8)
- #define BCM_6345_ENET_PHY_IRQ (IRQ_INTERNAL_BASE + 12)
- #define BCM_6345_ENET0_RXDMA_IRQ (IRQ_INTERNAL_BASE + 13 + 1)
-@@ -508,10 +509,17 @@ enum bcm63xx_irq {
- #define BCM_6348_TIMER_IRQ (IRQ_INTERNAL_BASE + 0)
- #define BCM_6348_UART0_IRQ (IRQ_INTERNAL_BASE + 2)
- #define BCM_6348_DSL_IRQ (IRQ_INTERNAL_BASE + 4)
-+#define BCM_6348_UDC0_IRQ (IRQ_INTERNAL_BASE + 6)
- #define BCM_6348_ENET1_IRQ (IRQ_INTERNAL_BASE + 7)
- #define BCM_6348_ENET0_IRQ (IRQ_INTERNAL_BASE + 8)
- #define BCM_6348_ENET_PHY_IRQ (IRQ_INTERNAL_BASE + 9)
- #define BCM_6348_OHCI0_IRQ (IRQ_INTERNAL_BASE + 12)
-+#define BCM_6348_USB_CNTL_RX_DMA_IRQ (IRQ_INTERNAL_BASE + 14)
-+#define BCM_6348_USB_CNTL_TX_DMA_IRQ (IRQ_INTERNAL_BASE + 15)
-+#define BCM_6348_USB_BULK_RX_DMA_IRQ (IRQ_INTERNAL_BASE + 16)
-+#define BCM_6348_USB_BULK_TX_DMA_IRQ (IRQ_INTERNAL_BASE + 17)
-+#define BCM_6348_USB_ISO_RX_DMA_IRQ (IRQ_INTERNAL_BASE + 18)
-+#define BCM_6348_USB_ISO_TX_DMA_IRQ (IRQ_INTERNAL_BASE + 19)
- #define BCM_6348_ENET0_RXDMA_IRQ (IRQ_INTERNAL_BASE + 20)
- #define BCM_6348_ENET0_TXDMA_IRQ (IRQ_INTERNAL_BASE + 21)
- #define BCM_6348_ENET1_RXDMA_IRQ (IRQ_INTERNAL_BASE + 22)
---- /dev/null
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_usb_udc.h
-@@ -0,0 +1,6 @@
-+#ifndef BCM63XX_DEV_USB_UDC_H_
-+#define BCM63XX_DEV_USB_UDC_H_
-+
-+int bcm63xx_udc_register(void);
-+
-+#endif /* BCM63XX_DEV_USB_UDC_H_ */
---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -47,6 +47,7 @@ struct board_info {
- unsigned int has_dsp:1;
- unsigned int has_uart0:1;
- unsigned int has_uart1:1;
-+ unsigned int has_udc0:1;
-
- /* ethernet config */
- struct bcm63xx_enet_platform_data enet0;
---- a/arch/mips/bcm63xx/Makefile
-+++ b/arch/mips/bcm63xx/Makefile
-@@ -1,6 +1,6 @@
- obj-y += clk.o cpu.o cs.o gpio.o irq.o prom.o setup.o timer.o \
- dev-dsp.o dev-enet.o dev-pcmcia.o dev-uart.o dev-wdt.o \
-- dev-usb-ohci.o dev-usb-ehci.o
-+ dev-usb-ohci.o dev-usb-ehci.o dev-usb-udc.o
- obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
-
- obj-y += boards/
---- a/arch/mips/bcm63xx/clk.c
-+++ b/arch/mips/bcm63xx/clk.c
-@@ -141,6 +141,30 @@ static struct clk clk_usbh = {
- };
-
- /*
-+ * USB slave clock
-+ */
-+static void usbs_set(struct clk *clk, int enable)
-+{
-+ u32 mask;
-+
-+ switch(bcm63xx_get_cpu_id()) {
-+ case BCM6338_CPU_ID:
-+ mask = CKCTL_6338_USBS_EN;
-+ break;
-+ case BCM6348_CPU_ID:
-+ mask = CKCTL_6348_USBS_EN;
-+ break;
-+ default:
-+ return;
-+ }
-+ bcm_hwclock_set(mask, enable);
-+}
-+
-+static struct clk clk_usbs = {
-+ .set = usbs_set,
-+};
-+
-+/*
- * SPI clock
- */
- static void spi_set(struct clk *clk, int enable)
-@@ -208,6 +232,8 @@ struct clk *clk_get(struct device *dev,
- return &clk_ephy;
- if (!strcmp(id, "usbh"))
- return &clk_usbh;
-+ if (!strcmp(id, "usbs"))
-+ return &clk_usbs;
- if (!strcmp(id, "spi"))
- return &clk_spi;
- if (!strcmp(id, "periph"))
---- a/arch/mips/bcm63xx/Kconfig
-+++ b/arch/mips/bcm63xx/Kconfig
-@@ -7,6 +7,7 @@ config BCM63XX_CPU_6338
- select USB_ARCH_HAS_OHCI
- select USB_OHCI_BIG_ENDIAN_DESC
- select USB_OHCI_BIG_ENDIAN_MMIO
-+ select USB_ARCH_HAS_UDC
-
- config BCM63XX_CPU_6345
- bool "support 6345 CPU"
-@@ -19,6 +20,7 @@ config BCM63XX_CPU_6348
- select USB_ARCH_HAS_OHCI
- select USB_OHCI_BIG_ENDIAN_DESC
- select USB_OHCI_BIG_ENDIAN_MMIO
-+ select USB_ARCH_HAS_UDC
-
- config BCM63XX_CPU_6358
- bool "support 6358 CPU"
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -917,6 +917,9 @@ int __init board_register_devices(void)
- if (board.has_udc0)
- bcm63xx_udc_register();
+@@ -911,6 +911,9 @@ int __init board_register_devices(void)
+ if (board.has_dsp)
+ bcm63xx_dsp_register(&board.dsp);
+ if (board.num_devs)
+ platform_add_devices(board.devs, board.num_devs);
val &= MPI_CSBASE_BASE_MASK;
--- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -61,6 +61,10 @@ struct board_info {
+@@ -60,6 +60,10 @@ struct board_info {
/* Buttons */
struct gpio_button buttons[4];
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -920,6 +920,9 @@ int __init board_register_devices(void)
+@@ -914,6 +914,9 @@ int __init board_register_devices(void)
if (board.num_devs)
platform_add_devices(board.devs, board.num_devs);
val &= MPI_CSBASE_BASE_MASK;
--- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -65,6 +65,10 @@ struct board_info {
+@@ -64,6 +64,10 @@ struct board_info {
/* Additional platform devices */
struct platform_device **devs;
unsigned int num_devs;
#include <asm/addrspace.h>
#include <bcm63xx_board.h>
#include <bcm63xx_cpu.h>
-@@ -39,6 +40,13 @@ static unsigned int mac_addr_used;
+@@ -38,6 +39,13 @@ static unsigned int mac_addr_used;
static struct board_info board;
/*
* known 6338 boards
*/
#ifdef CONFIG_BCM63XX_CPU_6338
-@@ -752,6 +760,7 @@ void __init board_prom_init(void)
+@@ -749,6 +757,7 @@ void __init board_prom_init(void)
/* extract nvram data */
memcpy(&nvram, boot_addr + BCM963XX_NVRAM_OFFSET, sizeof(nvram));
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -824,6 +824,8 @@ void __init board_prom_init(void)
+@@ -821,6 +821,8 @@ void __init board_prom_init(void)
if (BCMCPU_IS_6348())
val |= GPIO_MODE_6348_G3_EXT_MII |
GPIO_MODE_6348_G0_EXT_MII;
#define RSET_UART_SIZE 24
#define RSET_UDC_SIZE 256
#define RSET_OHCI_SIZE 256
-@@ -214,7 +215,7 @@ enum bcm63xx_regs_set {
+@@ -214,8 +215,8 @@ enum bcm63xx_regs_set {
#define BCM_6358_UART0_BASE (0xfffe0100)
#define BCM_6358_UART1_BASE (0xfffe0120)
#define BCM_6358_GPIO_BASE (0xfffe0080)
-#define BCM_6358_SPI_BASE (0xdeadbeef)
+-#define BCM_6358_UDC0_BASE (0xfffe0800)
+#define BCM_6358_SPI_BASE (0xfffe0800)
- #define BCM_6358_UDC0_BASE (0xfffe0400)
++#define BCM_6358_UDC0_BASE (0xdeadbeef)
#define BCM_6358_OHCI0_BASE (0xfffe1400)
#define BCM_6358_OHCI_PRIV_BASE (0xdeadbeef)
+ #define BCM_6358_USBH_PRIV_BASE (0xfffe1500)
@@ -441,6 +442,7 @@ static inline unsigned long bcm63xx_regs
*/
enum bcm63xx_irq {
IRQ_UART0,
IRQ_UART1,
IRQ_DSL,
-@@ -507,6 +509,7 @@ enum bcm63xx_irq {
+@@ -506,6 +508,7 @@ enum bcm63xx_irq {
* 6348 irqs
*/
#define BCM_6348_TIMER_IRQ (IRQ_INTERNAL_BASE + 0)
+#define BCM_6348_SPI_IRQ (IRQ_INTERNAL_BASE + 1)
#define BCM_6348_UART0_IRQ (IRQ_INTERNAL_BASE + 2)
#define BCM_6348_DSL_IRQ (IRQ_INTERNAL_BASE + 4)
- #define BCM_6348_UDC0_IRQ (IRQ_INTERNAL_BASE + 6)
-@@ -531,6 +534,7 @@ enum bcm63xx_irq {
+ #define BCM_6348_ENET1_IRQ (IRQ_INTERNAL_BASE + 7)
+@@ -523,6 +526,7 @@ enum bcm63xx_irq {
* 6358 irqs
*/
#define BCM_6358_TIMER_IRQ (IRQ_INTERNAL_BASE + 0)
@@ -1,6 +1,6 @@
obj-y += clk.o cpu.o cs.o gpio.o irq.o prom.o setup.o timer.o \
dev-dsp.o dev-enet.o dev-pcmcia.o dev-uart.o dev-wdt.o \
-- dev-usb-ohci.o dev-usb-ehci.o dev-usb-udc.o
-+ dev-usb-ohci.o dev-usb-ehci.o dev-usb-udc.o dev-spi.o
+- dev-usb-ohci.o dev-usb-ehci.o
++ dev-usb-ohci.o dev-usb-ehci.o dev-spi.o
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
obj-y += boards/
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -31,6 +31,7 @@
+@@ -30,6 +30,7 @@
+ #include <bcm63xx_dev_pcmcia.h>
#include <bcm63xx_dev_usb_ohci.h>
#include <bcm63xx_dev_usb_ehci.h>
- #include <bcm63xx_dev_usb_udc.h>
+#include <bcm63xx_dev_spi.h>
#include <board_bcm963xx.h>
#define PFX "board_bcm963xx: "
-@@ -934,6 +935,8 @@ int __init board_register_devices(void)
+@@ -928,6 +929,8 @@ int __init board_register_devices(void)
if (board.num_spis)
spi_register_board_info(board.spis, board.num_spis);
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -33,9 +33,13 @@
- #include <bcm63xx_dev_usb_udc.h>
+@@ -32,9 +32,13 @@
+ #include <bcm63xx_dev_usb_ehci.h>
#include <bcm63xx_dev_spi.h>
#include <board_bcm963xx.h>
+#include <bcm_tag.h>
static struct bcm963xx_nvram nvram;
static unsigned int mac_addr_used;
static struct board_info board;
-@@ -735,6 +739,29 @@ static int board_get_mac_address(u8 *mac
+@@ -732,6 +736,29 @@ static int board_get_mac_address(u8 *mac
return 0;
}
/*
* early init callback, read nvram data from flash and checksum it
*/
-@@ -777,6 +804,11 @@ void __init board_prom_init(void)
+@@ -774,6 +801,11 @@ void __init board_prom_init(void)
return;
}
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -862,18 +862,6 @@ void __init board_prom_init(void)
+@@ -859,18 +859,6 @@ void __init board_prom_init(void)
}
bcm_gpio_writel(val, GPIO_MODE_REG);
}
/*
-@@ -949,6 +937,19 @@ int __init board_register_devices(void)
+@@ -946,6 +934,19 @@ int __init board_register_devices(void)
!board_get_mac_address(board.enet1.mac_addr))
bcm63xx_enet_register(1, &board.enet1);
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -604,6 +604,99 @@ static struct board_info __initdata boar
+@@ -601,6 +601,99 @@ static struct board_info __initdata boar
.has_ohci0 = 1,
.has_ehci0 = 1,
static struct board_info __initdata board_DWVS0 = {
--- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -57,7 +57,7 @@ struct board_info {
+@@ -56,7 +56,7 @@ struct board_info {
struct bcm63xx_dsp_platform_data dsp;
/* GPIO LEDs */
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -476,6 +476,19 @@ static struct board_info __initdata boar
+@@ -473,6 +473,19 @@ static struct board_info __initdata boar
},
.has_ohci0 = 1,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -490,6 +490,55 @@ static struct board_info __initdata boar
+@@ -487,6 +487,55 @@ static struct board_info __initdata boar
}
},
};
#endif
/*
-@@ -754,6 +803,7 @@ static const struct board_info __initdat
+@@ -751,6 +800,7 @@ static const struct board_info __initdat
&board_DV201AMR,
&board_96348gw_a,
&board_rta1025w_16,
#include <asm/addrspace.h>
#include <bcm63xx_board.h>
#include <bcm63xx_cpu.h>
-@@ -40,6 +43,12 @@
+@@ -39,6 +42,12 @@
#define CFE_OFFSET_64K 0x10000
#define CFE_OFFSET_128K 0x20000
static struct bcm963xx_nvram nvram;
static unsigned int mac_addr_used;
static struct board_info board;
-@@ -781,6 +790,502 @@ static struct board_info __initdata boar
+@@ -778,6 +787,496 @@ static struct board_info __initdata boar
.has_ohci0 = 1,
};
+ .has_pccard = 1,
+ .has_ehci0 = 1,
+
-+ .has_udc0 = 1,
-+
+ .leds = {
+ {
+ .name = "adsl",
+ .has_pccard = 1,
+ .has_ehci0 = 1,
+
-+ .has_udc0 = 1,
-+
+ .leds = {
+ {
+ .name = "adsl",
+ .has_pccard = 1,
+ .has_ehci0 = 1,
+
-+ .has_udc0 = 1,
-+
+ .leds = {
+ {
+ .name = "adsl",
#endif
/*
-@@ -811,9 +1316,30 @@ static const struct board_info __initdat
+@@ -808,9 +1307,30 @@ static const struct board_info __initdat
&board_96358vw2,
&board_AGPFS0,
&board_DWVS0,
/*
* Register a sane SPROMv2 to make the on-board
* bcm4318 WLAN work
-@@ -965,6 +1491,9 @@ void __init board_prom_init(void)
+@@ -962,6 +1482,9 @@ void __init board_prom_init(void)
boardid_fixup(boot_addr);
}
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -147,6 +147,38 @@ static struct board_info __initdata boar
+@@ -146,6 +146,38 @@ static struct board_info __initdata boar
},
},
};
#endif
/*
-@@ -1295,6 +1327,7 @@ static const struct board_info __initdat
+@@ -1286,6 +1318,7 @@ static const struct board_info __initdat
#ifdef CONFIG_BCM63XX_CPU_6338
&board_96338gw,
&board_96338w,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -686,6 +686,98 @@ static struct board_info __initdata boar
+@@ -683,6 +683,98 @@ static struct board_info __initdata boar
},
};
static struct board_info __initdata board_AGPFS0 = {
.name = "AGPF-S0",
.expected_cpu_id = 0x6358,
-@@ -1348,6 +1440,7 @@ static const struct board_info __initdat
+@@ -1339,6 +1431,7 @@ static const struct board_info __initdat
&board_96358vw,
&board_96358vw2,
&board_AGPFS0,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -915,6 +915,59 @@ static struct board_info __initdata boar
+@@ -912,6 +912,59 @@ static struct board_info __initdata boar
.has_ohci0 = 1,
};
struct spi_gpio_platform_data nb4_spi_gpio_data = {
.sck = NB4_SPI_GPIO_CLK,
.mosi = NB4_SPI_GPIO_MOSI,
-@@ -1442,6 +1495,7 @@ static const struct board_info __initdat
+@@ -1433,6 +1486,7 @@ static const struct board_info __initdat
&board_AGPFS0,
&board_CPVA642,
&board_DWVS0,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -580,6 +580,67 @@ static struct board_info __initdata boar
+@@ -577,6 +577,67 @@ static struct board_info __initdata boar
},
};
#endif
/*
-@@ -1487,6 +1548,7 @@ static const struct board_info __initdat
+@@ -1478,6 +1539,7 @@ static const struct board_info __initdat
&board_96348gw_a,
&board_rta1025w_16,
&board_96348_D4PW,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -433,6 +433,112 @@ static struct board_info __initdata boar
+@@ -432,6 +432,112 @@ static struct board_info __initdata boar
},
};
static struct board_info __initdata board_FAST2404 = {
.name = "F@ST2404",
.expected_cpu_id = 0x6348,
-@@ -1541,6 +1647,8 @@ static const struct board_info __initdat
+@@ -1532,6 +1638,8 @@ static const struct board_info __initdat
#ifdef CONFIG_BCM63XX_CPU_6348
&board_96348r,
&board_96348gw,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -747,6 +747,76 @@ static struct board_info __initdata boar
+@@ -744,6 +744,76 @@ static struct board_info __initdata boar
},
};
#endif
/*
-@@ -1657,6 +1727,7 @@ static const struct board_info __initdat
+@@ -1648,6 +1718,7 @@ static const struct board_info __initdat
&board_rta1025w_16,
&board_96348_D4PW,
&board_spw500v,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1700,6 +1700,81 @@ static struct board_info __initdata boar
+@@ -1691,6 +1691,81 @@ static struct board_info __initdata boar
.spis = nb4_spi_devices,
.num_spis = ARRAY_SIZE(nb4_spi_devices),
};
#endif
/*
-@@ -1742,6 +1817,7 @@ static const struct board_info __initdat
+@@ -1733,6 +1808,7 @@ static const struct board_info __initdat
&board_nb4_ser_r2,
&board_nb4_fxc_r1,
&board_nb4_fxc_r2,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -179,6 +179,43 @@ static struct board_info __initdata boar
+@@ -178,6 +178,43 @@ static struct board_info __initdata boar
},
},
};
#endif
/*
-@@ -1785,6 +1822,7 @@ static const struct board_info __initdat
+@@ -1776,6 +1813,7 @@ static const struct board_info __initdat
&board_96338gw,
&board_96338w,
&board_96338w2_e7t,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1812,6 +1812,72 @@ static struct board_info __initdata boar
+@@ -1803,6 +1803,72 @@ static struct board_info __initdata boar
},
},
};
#endif
/*
-@@ -1856,6 +1922,7 @@ static const struct board_info __initdat
+@@ -1847,6 +1913,7 @@ static const struct board_info __initdat
&board_nb4_fxc_r1,
&board_nb4_fxc_r2,
&board_HW553,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -854,6 +854,63 @@ static struct board_info __initdata boar
+@@ -851,6 +851,63 @@ static struct board_info __initdata boar
},
};
#endif
/*
-@@ -1907,6 +1964,7 @@ static const struct board_info __initdat
+@@ -1898,6 +1955,7 @@ static const struct board_info __initdat
&board_96348_D4PW,
&board_spw500v,
&board_96348sv,
#endif
#ifdef CONFIG_BCM63XX_CPU_6358
-@@ -2060,6 +2118,22 @@ void __init board_prom_init(void)
+@@ -2051,6 +2109,22 @@ void __init board_prom_init(void)
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;
-@@ -2261,6 +2335,13 @@ int __init board_register_devices(void)
+@@ -2249,6 +2323,13 @@ int __init board_register_devices(void)
val = bcm_mpi_readl(MPI_CSBASE_REG(0));
val &= MPI_CSBASE_BASE_MASK;
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -402,6 +402,62 @@ static struct board_info __initdata boar
+@@ -401,6 +401,62 @@ static struct board_info __initdata boar
},
};
static struct board_info __initdata board_96348gw = {
.name = "96348GW",
.expected_cpu_id = 0x6348,
-@@ -1965,6 +2021,7 @@ static const struct board_info __initdat
+@@ -1956,6 +2012,7 @@ static const struct board_info __initdat
&board_spw500v,
&board_96348sv,
&board_V2500V_BB,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -458,6 +458,49 @@ static struct board_info __initdata boar
+@@ -457,6 +457,49 @@ static struct board_info __initdata boar
};
static struct board_info __initdata board_96348gw = {
.name = "96348GW",
.expected_cpu_id = 0x6348,
-@@ -2022,6 +2065,7 @@ static const struct board_info __initdat
+@@ -2013,6 +2056,7 @@ static const struct board_info __initdat
&board_96348sv,
&board_V2500V_BB,
&board_V2110,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1328,6 +1328,8 @@ static struct board_info __initdata boar
+@@ -1325,6 +1325,8 @@ static struct board_info __initdata boar
.name = "DWV-S0",
.expected_cpu_id = 0x6358,
.has_enet0 = 1,
.has_enet1 = 1,
.has_pci = 1,
-@@ -1343,6 +1345,7 @@ static struct board_info __initdata boar
+@@ -1340,6 +1342,7 @@ static struct board_info __initdata boar
},
.has_ohci0 = 1,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1010,6 +1010,67 @@ static struct board_info __initdata boar
+@@ -1007,6 +1007,67 @@ static struct board_info __initdata boar
},
};
#endif
/*
-@@ -2069,6 +2130,7 @@ static const struct board_info __initdat
+@@ -2060,6 +2121,7 @@ static const struct board_info __initdat
&board_V2500V_BB,
&board_V2110,
&board_ct536_ct5621,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -705,6 +705,7 @@ static struct board_info __initdata boar
+@@ -702,6 +702,7 @@ static struct board_info __initdata boar
.name = "RTA1025W_16",
.expected_cpu_id = 0x6348,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1072,6 +1072,44 @@ static struct board_info __initdata boar
+@@ -1069,6 +1069,42 @@ static struct board_info __initdata boar
},
};
+ .force_duplex_full = 1,
+ },
+
-+ .has_udc0 = 1,
-+
+ .leds = {
+ {
+ .name = "phone",
#endif
/*
-@@ -2132,6 +2170,7 @@ static const struct board_info __initdat
+@@ -2123,6 +2159,7 @@ static const struct board_info __initdat
&board_V2110,
&board_ct536_ct5621,
&board_96348A_122,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -336,6 +336,17 @@ static struct board_info __initdata boar
+@@ -335,6 +335,17 @@ static struct board_info __initdata boar
.active_low = 1,
},
},
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -2222,7 +2222,7 @@ static void __init nb4_nvram_fixup(void)
+@@ -2211,7 +2211,7 @@ static void __init nb4_nvram_fixup(void)
* bcm4318 WLAN work
*/
#ifdef CONFIG_SSB_PCIHOST
.revision = 0x02,
.board_rev = 0x17,
.country_code = 0x0,
-@@ -2242,6 +2242,7 @@ static struct ssb_sprom bcm63xx_sprom =
+@@ -2231,6 +2231,7 @@ static struct ssb_sprom bcm63xx_sprom =
.boardflags_lo = 0x2848,
.boardflags_hi = 0x0000,
};
+++ /dev/null
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -29,6 +29,7 @@
- #include <bcm63xx_dev_pcmcia.h>
- #include <bcm63xx_dev_usb_ohci.h>
- #include <bcm63xx_dev_usb_ehci.h>
-+#include <bcm63xx_dev_usb_udc.h>
- #include <board_bcm963xx.h>
-
- #define PFX "board_bcm963xx: "
-@@ -400,6 +401,8 @@ static struct board_info __initdata boar
- .has_ohci0 = 1,
- .has_pccard = 1,
- .has_ehci0 = 1,
-+
-+ .has_udc0 = 1,
- };
-
- static struct board_info __initdata board_rta1025w_16 = {
-@@ -932,6 +935,9 @@ int __init board_register_devices(void)
- }
- #endif
-
-+ if (board.has_udc0)
-+ bcm63xx_udc_register();
-+
- /* read base address of boot chip select (0) */
- val = bcm_mpi_readl(MPI_CSBASE_REG(0));
- val &= MPI_CSBASE_BASE_MASK;
---- /dev/null
-+++ b/arch/mips/bcm63xx/dev-usb-udc.c
-@@ -0,0 +1,58 @@
-+/*
-+ * Copyright (C) 2009 Henk Vergonet <Henk.Vergonet@gmail.com>
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License as
-+ * published by the Free Software Foundation; either version 2 of
-+ * the License, or (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-+ */
-+#include <linux/init.h>
-+#include <linux/kernel.h>
-+#include <linux/platform_device.h>
-+#include <bcm63xx_cpu.h>
-+
-+static struct resource udc_resources[] = {
-+ {
-+ .start = -1, /* filled at runtime */
-+ .end = -1, /* filled at runtime */
-+ .flags = IORESOURCE_MEM,
-+ },
-+ {
-+ .start = -1, /* filled at runtime */
-+ .flags = IORESOURCE_IRQ,
-+ },
-+};
-+
-+static u64 udc_dmamask = ~(u32)0;
-+
-+static struct platform_device bcm63xx_udc_device = {
-+ .name = "bcm63xx-udc",
-+ .id = 0,
-+ .num_resources = ARRAY_SIZE(udc_resources),
-+ .resource = udc_resources,
-+ .dev = {
-+ .dma_mask = &udc_dmamask,
-+ .coherent_dma_mask = 0xffffffff,
-+ },
-+};
-+
-+int __init bcm63xx_udc_register(void)
-+{
-+ if (!BCMCPU_IS_6338() && !BCMCPU_IS_6345() && !BCMCPU_IS_6348())
-+ return 0;
-+
-+ udc_resources[0].start = bcm63xx_regset_address(RSET_UDC0);
-+ udc_resources[0].end = udc_resources[0].start;
-+ udc_resources[0].end += RSET_UDC_SIZE - 1;
-+ udc_resources[1].start = bcm63xx_get_irq_number(IRQ_UDC0);
-+ return platform_device_register(&bcm63xx_udc_device);
-+}
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-@@ -163,7 +163,7 @@ enum bcm63xx_regs_set {
- #define BCM_6338_GPIO_BASE (0xfffe0400)
- #define BCM_6338_SPI_BASE (0xfffe0c00)
- #define BCM_6338_SPI2_BASE (0xdeadbeef)
--#define BCM_6338_UDC0_BASE (0xdeadbeef)
-+#define BCM_6338_UDC0_BASE (0xfffe3000)
- #define BCM_6338_USBDMA_BASE (0xfffe2400)
- #define BCM_6338_OHCI0_BASE (0xdeadbeef)
- #define BCM_6338_OHCI_PRIV_BASE (0xfffe3000)
-@@ -207,7 +207,7 @@ enum bcm63xx_regs_set {
- #define BCM_6345_GPIO_BASE (0xfffe0400)
- #define BCM_6345_SPI_BASE (0xdeadbeef)
- #define BCM_6345_SPI2_BASE (0xdeadbeef)
--#define BCM_6345_UDC0_BASE (0xdeadbeef)
-+#define BCM_6345_UDC0_BASE (0xfffe2100)
- #define BCM_6345_USBDMA_BASE (0xfffe2800)
- #define BCM_6345_ENET0_BASE (0xfffe1800)
- #define BCM_6345_ENETDMA_BASE (0xfffe2800)
-@@ -291,7 +291,7 @@ enum bcm63xx_regs_set {
- #define BCM_6358_GPIO_BASE (0xfffe0080)
- #define BCM_6358_SPI_BASE (0xdeadbeef)
- #define BCM_6358_SPI2_BASE (0xfffe0800)
--#define BCM_6358_UDC0_BASE (0xfffe0800)
-+#define BCM_6358_UDC0_BASE (0xfffe0400)
- #define BCM_6358_OHCI0_BASE (0xfffe1400)
- #define BCM_6358_OHCI_PRIV_BASE (0xdeadbeef)
- #define BCM_6358_USBH_PRIV_BASE (0xfffe1500)
-@@ -481,6 +481,7 @@ enum bcm63xx_irq {
- IRQ_UART0,
- IRQ_UART1,
- IRQ_DSL,
-+ IRQ_UDC0,
- IRQ_ENET0,
- IRQ_ENET1,
- IRQ_ENET_PHY,
-@@ -547,6 +548,7 @@ enum bcm63xx_irq {
- #define BCM_6345_ENET_PHY_IRQ (IRQ_INTERNAL_BASE + 12)
- #define BCM_6345_OHCI0_IRQ 0
- #define BCM_6345_EHCI0_IRQ 0
-+#define BCM_6345_UDC0_IRQ (IRQ_INTERNAL_BASE + 5)
- #define BCM_6345_ENET0_RXDMA_IRQ (IRQ_INTERNAL_BASE + 13 + 1)
- #define BCM_6345_ENET0_TXDMA_IRQ (IRQ_INTERNAL_BASE + 13 + 2)
- #define BCM_6345_ENET1_RXDMA_IRQ 0
-@@ -577,6 +579,13 @@ enum bcm63xx_irq {
- #define BCM_6348_ENET_PHY_IRQ (IRQ_INTERNAL_BASE + 9)
- #define BCM_6348_OHCI0_IRQ (IRQ_INTERNAL_BASE + 12)
- #define BCM_6348_EHCI0_IRQ 0
-+#define BCM_6348_UDC0_IRQ (IRQ_INTERNAL_BASE + 6)
-+#define BCM_6348_USB_CNTL_RX_DMA_IRQ (IRQ_INTERNAL_BASE + 14)
-+#define BCM_6348_USB_CNTL_TX_DMA_IRQ (IRQ_INTERNAL_BASE + 15)
-+#define BCM_6348_USB_BULK_RX_DMA_IRQ (IRQ_INTERNAL_BASE + 16)
-+#define BCM_6348_USB_BULK_TX_DMA_IRQ (IRQ_INTERNAL_BASE + 17)
-+#define BCM_6348_USB_ISO_RX_DMA_IRQ (IRQ_INTERNAL_BASE + 18)
-+#define BCM_6348_USB_ISO_TX_DMA_IRQ (IRQ_INTERNAL_BASE + 19)
- #define BCM_6348_ENET0_RXDMA_IRQ (IRQ_INTERNAL_BASE + 20)
- #define BCM_6348_ENET0_TXDMA_IRQ (IRQ_INTERNAL_BASE + 21)
- #define BCM_6348_ENET1_RXDMA_IRQ (IRQ_INTERNAL_BASE + 22)
---- /dev/null
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_usb_udc.h
-@@ -0,0 +1,6 @@
-+#ifndef BCM63XX_DEV_USB_UDC_H_
-+#define BCM63XX_DEV_USB_UDC_H_
-+
-+int bcm63xx_udc_register(void);
-+
-+#endif /* BCM63XX_DEV_USB_UDC_H_ */
---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -48,6 +48,7 @@ struct board_info {
- unsigned int has_dsp:1;
- unsigned int has_uart0:1;
- unsigned int has_uart1:1;
-+ unsigned int has_udc0:1;
-
- /* ethernet config */
- struct bcm63xx_enet_platform_data enet0;
---- a/arch/mips/bcm63xx/Makefile
-+++ b/arch/mips/bcm63xx/Makefile
-@@ -1,6 +1,6 @@
- obj-y += clk.o cpu.o cs.o gpio.o irq.o prom.o setup.o timer.o \
- dev-dsp.o dev-enet.o dev-pcmcia.o dev-uart.o \
-- dev-usb-ehci.o dev-usb-ohci.o dev-wdt.o
-+ dev-usb-ehci.o dev-usb-ohci.o dev-usb-udc.o dev-wdt.o
- obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
-
- obj-y += boards/
---- a/arch/mips/bcm63xx/clk.c
-+++ b/arch/mips/bcm63xx/clk.c
-@@ -171,6 +171,30 @@ static struct clk clk_usbh = {
- };
-
- /*
-+ * USB slave clock
-+ */
-+static void usbs_set(struct clk *clk, int enable)
-+{
-+ u32 mask;
-+
-+ switch(bcm63xx_get_cpu_id()) {
-+ case BCM6338_CPU_ID:
-+ mask = CKCTL_6338_USBS_EN;
-+ break;
-+ case BCM6348_CPU_ID:
-+ mask = CKCTL_6348_USBS_EN;
-+ break;
-+ default:
-+ return;
-+ }
-+ bcm_hwclock_set(mask, enable);
-+}
-+
-+static struct clk clk_usbs = {
-+ .set = usbs_set,
-+};
-+
-+/*
- * SPI clock
- */
- static void spi_set(struct clk *clk, int enable)
-@@ -270,6 +294,8 @@ struct clk *clk_get(struct device *dev,
- return &clk_ephy;
- if (!strcmp(id, "usbh"))
- return &clk_usbh;
-+ if (!strcmp(id, "usbs"))
-+ return &clk_usbs;
- if (!strcmp(id, "spi"))
- return &clk_spi;
- if (!strcmp(id, "xtm"))
---- a/arch/mips/bcm63xx/Kconfig
-+++ b/arch/mips/bcm63xx/Kconfig
-@@ -5,6 +5,7 @@ config BCM63XX_CPU_6338
- bool "support 6338 CPU"
- select HW_HAS_PCI
- select USB_ARCH_HAS_OHCI if USB_SUPPORT
-+ select USB_ARCH_HAS_UDC
-
- config BCM63XX_CPU_6345
- bool "support 6345 CPU"
-@@ -13,6 +14,7 @@ config BCM63XX_CPU_6348
- bool "support 6348 CPU"
- select HW_HAS_PCI
- select USB_ARCH_HAS_OHCI if USB_SUPPORT
-+ select USB_ARCH_HAS_UDC
-
- config BCM63XX_CPU_6358
- bool "support 6358 CPU"
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -938,6 +938,9 @@ int __init board_register_devices(void)
- if (board.has_udc0)
- bcm63xx_udc_register();
+@@ -932,6 +932,9 @@ int __init board_register_devices(void)
+ }
+ #endif
+ if (board.num_devs)
+ platform_add_devices(board.devs, board.num_devs);
val &= MPI_CSBASE_BASE_MASK;
--- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -62,6 +62,10 @@ struct board_info {
+@@ -61,6 +61,10 @@ struct board_info {
/* Buttons */
struct gpio_button buttons[4];
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -941,6 +941,9 @@ int __init board_register_devices(void)
+@@ -935,6 +935,9 @@ int __init board_register_devices(void)
if (board.num_devs)
platform_add_devices(board.devs, board.num_devs);
val &= MPI_CSBASE_BASE_MASK;
--- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -66,6 +66,10 @@ struct board_info {
+@@ -65,6 +65,10 @@ struct board_info {
/* Additional platform devices */
struct platform_device **devs;
unsigned int num_devs;
#include <asm/addrspace.h>
#include <bcm63xx_board.h>
#include <bcm63xx_cpu.h>
-@@ -39,6 +40,13 @@ static unsigned int mac_addr_used;
+@@ -38,6 +39,13 @@ static unsigned int mac_addr_used;
static struct board_info board;
/*
* known 6338 boards
*/
#ifdef CONFIG_BCM63XX_CPU_6338
-@@ -752,6 +760,7 @@ void __init board_prom_init(void)
+@@ -749,6 +757,7 @@ void __init board_prom_init(void)
/* extract nvram data */
memcpy(&nvram, boot_addr + BCM963XX_NVRAM_OFFSET, sizeof(nvram));
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -824,6 +824,8 @@ void __init board_prom_init(void)
+@@ -821,6 +821,8 @@ void __init board_prom_init(void)
if (BCMCPU_IS_6348())
val |= GPIO_MODE_6348_G3_EXT_MII |
GPIO_MODE_6348_G0_EXT_MII;
-#define BCM_6358_SPI_BASE (0xdeadbeef)
+#define BCM_6358_SPI_BASE (0xfffe0800)
#define BCM_6358_SPI2_BASE (0xfffe0800)
- #define BCM_6358_UDC0_BASE (0xfffe0400)
+ #define BCM_6358_UDC0_BASE (0xfffe0800)
#define BCM_6358_OHCI0_BASE (0xfffe1400)
@@ -478,6 +479,7 @@ static inline unsigned long bcm63xx_regs
*/
IRQ_UART0,
IRQ_UART1,
IRQ_DSL,
-@@ -571,6 +573,7 @@ enum bcm63xx_irq {
+@@ -569,6 +571,7 @@ enum bcm63xx_irq {
* 6348 irqs
*/
#define BCM_6348_TIMER_IRQ (IRQ_INTERNAL_BASE + 0)
#define BCM_6348_UART0_IRQ (IRQ_INTERNAL_BASE + 2)
#define BCM_6348_UART1_IRQ 0
#define BCM_6348_DSL_IRQ (IRQ_INTERNAL_BASE + 4)
-@@ -608,6 +611,7 @@ enum bcm63xx_irq {
+@@ -599,6 +602,7 @@ enum bcm63xx_irq {
* 6358 irqs
*/
#define BCM_6358_TIMER_IRQ (IRQ_INTERNAL_BASE + 0)
obj-y += clk.o cpu.o cs.o gpio.o irq.o prom.o setup.o timer.o \
- dev-dsp.o dev-enet.o dev-pcmcia.o dev-uart.o \
+ dev-dsp.o dev-enet.o dev-pcmcia.o dev-spi.o dev-uart.o \
- dev-usb-ehci.o dev-usb-ohci.o dev-usb-udc.o dev-wdt.o
+ dev-usb-ehci.o dev-usb-ohci.o dev-wdt.o
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -31,6 +31,7 @@
+@@ -30,6 +30,7 @@
+ #include <bcm63xx_dev_pcmcia.h>
#include <bcm63xx_dev_usb_ohci.h>
#include <bcm63xx_dev_usb_ehci.h>
- #include <bcm63xx_dev_usb_udc.h>
+#include <bcm63xx_dev_spi.h>
#include <board_bcm963xx.h>
#define PFX "board_bcm963xx: "
-@@ -955,6 +956,8 @@ int __init board_register_devices(void)
+@@ -949,6 +950,8 @@ int __init board_register_devices(void)
if (board.num_spis)
spi_register_board_info(board.spis, board.num_spis);
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -33,9 +33,13 @@
- #include <bcm63xx_dev_usb_udc.h>
+@@ -32,9 +32,13 @@
+ #include <bcm63xx_dev_usb_ehci.h>
#include <bcm63xx_dev_spi.h>
#include <board_bcm963xx.h>
+#include <bcm_tag.h>
static struct bcm963xx_nvram nvram;
static unsigned int mac_addr_used;
static struct board_info board;
-@@ -735,6 +739,29 @@ static int board_get_mac_address(u8 *mac
+@@ -732,6 +736,29 @@ static int board_get_mac_address(u8 *mac
return 0;
}
/*
* early init callback, read nvram data from flash and checksum it
*/
-@@ -777,6 +804,11 @@ void __init board_prom_init(void)
+@@ -774,6 +801,11 @@ void __init board_prom_init(void)
return;
}
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -604,6 +604,99 @@ static struct board_info __initdata boar
+@@ -601,6 +601,99 @@ static struct board_info __initdata boar
.has_ohci0 = 1,
.has_ehci0 = 1,
static struct board_info __initdata board_DWVS0 = {
--- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -58,7 +58,7 @@ struct board_info {
+@@ -57,7 +57,7 @@ struct board_info {
struct bcm63xx_dsp_platform_data dsp;
/* GPIO LEDs */
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -476,6 +476,19 @@ static struct board_info __initdata boar
+@@ -473,6 +473,19 @@ static struct board_info __initdata boar
},
.has_ohci0 = 1,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -490,6 +490,55 @@ static struct board_info __initdata boar
+@@ -487,6 +487,55 @@ static struct board_info __initdata boar
}
},
};
#endif
/*
-@@ -754,6 +803,7 @@ static const struct board_info __initdat
+@@ -751,6 +800,7 @@ static const struct board_info __initdat
&board_DV201AMR,
&board_96348gw_a,
&board_rta1025w_16,
#include <asm/addrspace.h>
#include <bcm63xx_board.h>
#include <bcm63xx_cpu.h>
-@@ -40,6 +43,12 @@
+@@ -39,6 +42,12 @@
#define CFE_OFFSET_64K 0x10000
#define CFE_OFFSET_128K 0x20000
static struct bcm963xx_nvram nvram;
static unsigned int mac_addr_used;
static struct board_info board;
-@@ -781,6 +790,502 @@ static struct board_info __initdata boar
+@@ -778,6 +787,496 @@ static struct board_info __initdata boar
.has_ohci0 = 1,
};
+ .has_pccard = 1,
+ .has_ehci0 = 1,
+
-+ .has_udc0 = 1,
-+
+ .leds = {
+ {
+ .name = "adsl",
+ .has_pccard = 1,
+ .has_ehci0 = 1,
+
-+ .has_udc0 = 1,
-+
+ .leds = {
+ {
+ .name = "adsl",
+ .has_pccard = 1,
+ .has_ehci0 = 1,
+
-+ .has_udc0 = 1,
-+
+ .leds = {
+ {
+ .name = "adsl",
#endif
/*
-@@ -811,9 +1316,30 @@ static const struct board_info __initdat
+@@ -808,9 +1307,30 @@ static const struct board_info __initdat
&board_96358vw2,
&board_AGPFS0,
&board_DWVS0,
/*
* Register a sane SPROMv2 to make the on-board
* bcm4318 WLAN work
-@@ -965,6 +1491,9 @@ void __init board_prom_init(void)
+@@ -962,6 +1482,9 @@ void __init board_prom_init(void)
boardid_fixup(boot_addr);
}
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -147,6 +147,38 @@ static struct board_info __initdata boar
+@@ -146,6 +146,38 @@ static struct board_info __initdata boar
},
},
};
#endif
/*
-@@ -1295,6 +1327,7 @@ static const struct board_info __initdat
+@@ -1286,6 +1318,7 @@ static const struct board_info __initdat
#ifdef CONFIG_BCM63XX_CPU_6338
&board_96338gw,
&board_96338w,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -686,6 +686,98 @@ static struct board_info __initdata boar
+@@ -683,6 +683,98 @@ static struct board_info __initdata boar
},
};
static struct board_info __initdata board_AGPFS0 = {
.name = "AGPF-S0",
.expected_cpu_id = 0x6358,
-@@ -1348,6 +1440,7 @@ static const struct board_info __initdat
+@@ -1339,6 +1431,7 @@ static const struct board_info __initdat
&board_96358vw,
&board_96358vw2,
&board_AGPFS0,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -915,6 +915,59 @@ static struct board_info __initdata boar
+@@ -912,6 +912,59 @@ static struct board_info __initdata boar
.has_ohci0 = 1,
};
struct spi_gpio_platform_data nb4_spi_gpio_data = {
.sck = NB4_SPI_GPIO_CLK,
.mosi = NB4_SPI_GPIO_MOSI,
-@@ -1442,6 +1495,7 @@ static const struct board_info __initdat
+@@ -1433,6 +1486,7 @@ static const struct board_info __initdat
&board_AGPFS0,
&board_CPVA642,
&board_DWVS0,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -580,6 +580,67 @@ static struct board_info __initdata boar
+@@ -577,6 +577,67 @@ static struct board_info __initdata boar
},
};
#endif
/*
-@@ -1487,6 +1548,7 @@ static const struct board_info __initdat
+@@ -1478,6 +1539,7 @@ static const struct board_info __initdat
&board_96348gw_a,
&board_rta1025w_16,
&board_96348_D4PW,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -433,6 +433,112 @@ static struct board_info __initdata boar
+@@ -432,6 +432,112 @@ static struct board_info __initdata boar
},
};
static struct board_info __initdata board_FAST2404 = {
.name = "F@ST2404",
.expected_cpu_id = 0x6348,
-@@ -1541,6 +1647,8 @@ static const struct board_info __initdat
+@@ -1532,6 +1638,8 @@ static const struct board_info __initdat
#ifdef CONFIG_BCM63XX_CPU_6348
&board_96348r,
&board_96348gw,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -747,6 +747,76 @@ static struct board_info __initdata boar
+@@ -744,6 +744,76 @@ static struct board_info __initdata boar
},
};
#endif
/*
-@@ -1657,6 +1727,7 @@ static const struct board_info __initdat
+@@ -1648,6 +1718,7 @@ static const struct board_info __initdat
&board_rta1025w_16,
&board_96348_D4PW,
&board_spw500v,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1700,6 +1700,81 @@ static struct board_info __initdata boar
+@@ -1691,6 +1691,81 @@ static struct board_info __initdata boar
.spis = nb4_spi_devices,
.num_spis = ARRAY_SIZE(nb4_spi_devices),
};
#endif
/*
-@@ -1742,6 +1817,7 @@ static const struct board_info __initdat
+@@ -1733,6 +1808,7 @@ static const struct board_info __initdat
&board_nb4_ser_r2,
&board_nb4_fxc_r1,
&board_nb4_fxc_r2,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -179,6 +179,43 @@ static struct board_info __initdata boar
+@@ -178,6 +178,43 @@ static struct board_info __initdata boar
},
},
};
#endif
/*
-@@ -1785,6 +1822,7 @@ static const struct board_info __initdat
+@@ -1776,6 +1813,7 @@ static const struct board_info __initdat
&board_96338gw,
&board_96338w,
&board_96338w2_e7t,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1812,6 +1812,72 @@ static struct board_info __initdata boar
+@@ -1803,6 +1803,72 @@ static struct board_info __initdata boar
},
},
};
#endif
/*
-@@ -1856,6 +1922,7 @@ static const struct board_info __initdat
+@@ -1847,6 +1913,7 @@ static const struct board_info __initdat
&board_nb4_fxc_r1,
&board_nb4_fxc_r2,
&board_HW553,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -854,6 +854,63 @@ static struct board_info __initdata boar
+@@ -851,6 +851,63 @@ static struct board_info __initdata boar
},
};
#endif
/*
-@@ -1907,6 +1964,7 @@ static const struct board_info __initdat
+@@ -1898,6 +1955,7 @@ static const struct board_info __initdat
&board_96348_D4PW,
&board_spw500v,
&board_96348sv,
#endif
#ifdef CONFIG_BCM63XX_CPU_6358
-@@ -2060,6 +2118,22 @@ void __init board_prom_init(void)
+@@ -2051,6 +2109,22 @@ void __init board_prom_init(void)
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;
-@@ -2281,6 +2355,13 @@ int __init board_register_devices(void)
+@@ -2269,6 +2343,13 @@ int __init board_register_devices(void)
val = bcm_mpi_readl(MPI_CSBASE_REG(0));
val &= MPI_CSBASE_BASE_MASK;
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -402,6 +402,62 @@ static struct board_info __initdata boar
+@@ -401,6 +401,62 @@ static struct board_info __initdata boar
},
};
static struct board_info __initdata board_96348gw = {
.name = "96348GW",
.expected_cpu_id = 0x6348,
-@@ -1965,6 +2021,7 @@ static const struct board_info __initdat
+@@ -1956,6 +2012,7 @@ static const struct board_info __initdat
&board_spw500v,
&board_96348sv,
&board_V2500V_BB,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -458,6 +458,49 @@ static struct board_info __initdata boar
+@@ -457,6 +457,49 @@ static struct board_info __initdata boar
};
static struct board_info __initdata board_96348gw = {
.name = "96348GW",
.expected_cpu_id = 0x6348,
-@@ -2022,6 +2065,7 @@ static const struct board_info __initdat
+@@ -2013,6 +2056,7 @@ static const struct board_info __initdat
&board_96348sv,
&board_V2500V_BB,
&board_V2110,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1328,6 +1328,8 @@ static struct board_info __initdata boar
+@@ -1325,6 +1325,8 @@ static struct board_info __initdata boar
.name = "DWV-S0",
.expected_cpu_id = 0x6358,
.has_enet0 = 1,
.has_enet1 = 1,
.has_pci = 1,
-@@ -1343,6 +1345,7 @@ static struct board_info __initdata boar
+@@ -1340,6 +1342,7 @@ static struct board_info __initdata boar
},
.has_ohci0 = 1,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1010,6 +1010,67 @@ static struct board_info __initdata boar
+@@ -1007,6 +1007,67 @@ static struct board_info __initdata boar
},
};
#endif
/*
-@@ -2069,6 +2130,7 @@ static const struct board_info __initdat
+@@ -2060,6 +2121,7 @@ static const struct board_info __initdat
&board_V2500V_BB,
&board_V2110,
&board_ct536_ct5621,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -705,6 +705,7 @@ static struct board_info __initdata boar
+@@ -702,6 +702,7 @@ static struct board_info __initdata boar
.name = "RTA1025W_16",
.expected_cpu_id = 0x6348,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1072,6 +1072,44 @@ static struct board_info __initdata boar
+@@ -1069,6 +1069,42 @@ static struct board_info __initdata boar
},
};
+ .force_duplex_full = 1,
+ },
+
-+ .has_udc0 = 1,
-+
+ .leds = {
+ {
+ .name = "phone",
#endif
/*
-@@ -2132,6 +2170,7 @@ static const struct board_info __initdat
+@@ -2123,6 +2159,7 @@ static const struct board_info __initdat
&board_V2110,
&board_ct536_ct5621,
&board_96348A_122,
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -336,6 +336,17 @@ static struct board_info __initdata boar
+@@ -335,6 +335,17 @@ static struct board_info __initdata boar
.active_low = 1,
},
},
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -2222,7 +2222,7 @@ static void __init nb4_nvram_fixup(void)
+@@ -2211,7 +2211,7 @@ static void __init nb4_nvram_fixup(void)
* bcm4318 WLAN work
*/
#ifdef CONFIG_SSB_PCIHOST
.revision = 0x02,
.board_rev = 0x17,
.country_code = 0x0,
-@@ -2242,6 +2242,7 @@ static struct ssb_sprom bcm63xx_sprom =
+@@ -2231,6 +2231,7 @@ static struct ssb_sprom bcm63xx_sprom =
.boardflags_lo = 0x2848,
.boardflags_hi = 0x0000,
};